Processing method, device and system, storage medium and the processor of image data
Technical field
The present invention relates to image processing fields, in particular to a kind of processing method of image data, device and are
System, storage medium and processor.
Background technology
With the continuous development of science and technology, computer screen is more and more, and the crossover rate and frame per second of screen picture are also increasingly
Height, two-way picture synchronization transmission and display also more and more apply in engineering design.It is this to be based on multichannel, high-resolution
Along with the demand of lossless compression, requirements at the higher level, memory are proposed to image data storage for the image procossing of rate and high frame frequency
The bandwidth of storage, cost and power consumption are also higher and higher.Memory storage bandwidth how is reduced, reduces the cost and work(of image procossing
Consumption is that present image procossing is badly in need of the critical issue to be solved.
There are mainly two types of the methods for reducing memory bandwidth at present, and a kind of is that original image is divided into the small of two-way and multidiameter delay
Image, all the way small image ram is stored using on piece and is stored and is controlled, the small image of another way in DDR using storing;
Another kind is first to carry out lossless compression to data, and compressed data are stored in DDR, when reading data later, then is carried out
Decompression.But two schemes can all increase a large amount of process resources, and area and cost is caused to increase.
For it is above-mentioned the problem of, currently no effective solution has been proposed.
Invention content
An embodiment of the present invention provides a kind of processing method of image data, device and system, storage medium and processor,
At least to solve image storage method in the prior art, in order to reduce DDR memory bandwidths, a large amount of process resources are increased, lead to face
The technical issues of product and cost increase.
One side according to embodiments of the present invention provides a kind of processing method of image data, including:It obtains and waits to locate
The multiple images unit of the image data of reason and the corresponding flag information of each elementary area, wherein, flag information is used to mark
Whether will carries out storage operation to each elementary area;According to the corresponding flag information of each elementary area, by least one figure
The default storage region into double-speed Synchronous Dynamic Random Access Memory is stored as unit;It is corresponding according to each elementary area
Flag information obtains pending image data from default storage region;Export pending image data.
Further, the corresponding flag information of each elementary area is obtained, including:Determine first in multiple images unit
The corresponding flag information of a elementary area is the first flag information;It obtains in the following way and first is removed in multiple images unit
The corresponding flag information of each elementary area except elementary area:According to pixel-by-pixel by each elementary area and processed figure
As unit is compared, judge whether each elementary area is identical with processed elementary area;If each elementary area with
Processed elementary area differs, it is determined that the corresponding flag information of each elementary area is the first flag information;It is if every
A elementary area is identical with processed elementary area, it is determined that the corresponding flag information of each elementary area is believed for the second mark
Breath.
Further, processed elementary area includes:It is laterally adjacent with each elementary area and get flag information
Elementary area and/or, elementary area that is longitudinally adjacent with each elementary area and getting flag information.
Further, according to the corresponding flag information of each elementary area, at least one elementary area is stored to double
Default storage region in fast Synchronous Dynamic Random Access Memory, including:If the corresponding flag information of the first elementary area is
First flag information then stores the first elementary area to default storage region;If the corresponding mark letter of the second elementary area
It ceases for the second flag information, then forbids storing the second elementary area to default storage region.
Further, after the corresponding flag information of each elementary area is obtained, the above method further includes:To each it scheme
As the corresponding flag information of unit is stored into flag information random access memory.
Further, the multiple images unit of pending image data is obtained, including:Obtain pending picture number
According to;Pending image data is split, obtains multiple images unit.
Further, after pending image data is obtained, the above method further includes:By pending image data
It deposits into the first ping-pong buffer area.
Further, it according to the corresponding flag information of each elementary area, is obtained from default storage region pending
Image data, including:First elementary area in multiple images unit is read from default storage region;In the following way
Read each elementary area in addition to first elementary area in multiple images unit:If the corresponding mark of the first elementary area
Will information is the first flag information, then the first elementary area is read from default storage region;If the second elementary area corresponds to
Flag information for the second flag information, then the processed elementary area adjacent to the second elementary area replicates;To be more
A elementary area is combined, and obtains pending image data.
Further, it according to the corresponding flag information of each elementary area, is obtained from default storage region pending
Image data after, the above method further includes:Pending image data is deposited into the second ping-pong buffer area.
Another aspect according to embodiments of the present invention additionally provides a kind of processing unit of image data, including:First obtains
Unit is taken, for obtaining the multiple images unit of pending image data and the corresponding flag information of each elementary area,
Wherein, whether flag information carries out storage operation for mark to each elementary area;First storage unit, for according to each
The corresponding flag information of elementary area, at least one elementary area is stored into double-speed Synchronous Dynamic Random Access Memory
Default storage region;Second acquisition unit, for according to the corresponding flag information of each elementary area, from default storage region
Obtain pending image data;Output unit, for exporting pending image data.
Further, first acquisition unit includes:Determining module, for determining first image in multiple images unit
The corresponding flag information of unit is the first flag information;First acquisition module, for obtaining multiple images list in the following way
The corresponding flag information of each elementary area in member in addition to first elementary area:According to pixel-by-pixel by each elementary area
It is compared with processed elementary area, judges whether each elementary area is identical with processed elementary area, if often
A elementary area is differed with processed elementary area, it is determined that the corresponding flag information of each elementary area is the first mark
Information, if each elementary area is identical with processed elementary area, it is determined that the corresponding flag information of each elementary area
For the second flag information.
Further, processed elementary area includes:It is laterally adjacent with each elementary area and get flag information
Elementary area and/or, elementary area that is longitudinally adjacent with each elementary area and getting flag information.
Further, the first storage unit includes:First memory module, if for the corresponding mark of the first elementary area
Information is the first flag information, then stores the first elementary area to default storage region;Second memory module, if for
The corresponding flag information of two elementary areas is the second flag information, then forbids storing the second elementary area to default memory block
Domain.
Further, above device further includes:Second storage unit, for by the corresponding flag information of each elementary area
It stores into flag information random access memory.
Further, first acquisition unit includes:Second acquisition module, for obtaining pending image data;It splits
Module for being split to pending image data, obtains multiple images unit.
Further, above device further includes:Third storage unit, for depositing pending image data to the first table tennis
In pang buffer area.
Further, second acquisition unit includes:First read module, for reading multiple figures from default storage region
As first elementary area in unit;Second read module, for reading in the following way in multiple images unit except the
Each elementary area except one elementary area:If the corresponding flag information of the first elementary area is the first flag information,
The first elementary area is then read from default storage region;If the corresponding flag information of the second elementary area is believed for the second mark
Breath, then the processed elementary area adjacent to the second elementary area replicates;Composite module, for by multiple images unit
It is combined, obtains pending image data.
Further, above device further includes:4th storage unit, for depositing pending image data to the second table tennis
In pang buffer area.
Another aspect according to embodiments of the present invention additionally provides a kind of processing system of image data, including:Control dress
It puts, for obtaining the multiple images unit of pending image data and the corresponding flag information of each elementary area,
In, whether flag information carries out storage operation for mark to each elementary area;First processor is connect with control device,
For according to the corresponding flag information of each elementary area, at least one elementary area to be stored to double-speed synchronous dynamic random
Default storage region in access memory;Second processor is connect with control device, for corresponding according to each elementary area
Flag information obtains pending image data from default storage region;Control device is additionally operable to export pending image
Data.
Further, control device includes:Third processor, for determining first image list in multiple images unit
The corresponding flag information of member is the first flag information, and obtains first image list is removed in multiple images unit in the following way
The corresponding flag information of each elementary area except member:According to pixel-by-pixel that each elementary area is adjacent with each elementary area
Processed elementary area be compared, judge whether each elementary area identical with processed elementary area;It is if every
A elementary area is differed with processed elementary area, it is determined that the corresponding flag information of each elementary area is the first mark
Information;If each elementary area is identical with processed elementary area, it is determined that the corresponding flag information of each elementary area
For the second flag information.
Further, processed elementary area includes:It is laterally adjacent with each elementary area and get flag information
Elementary area and/or, elementary area that is longitudinally adjacent with each elementary area and getting flag information.
Further, if first processor is additionally operable to the corresponding flag information of the first elementary area and believes for the first mark
Breath, then store the first elementary area to default storage region;If the corresponding flag information of the second elementary area is the second mark
Will information then forbids storing the second elementary area to default storage region.
Further, control device includes:Flag information random access memory, it is corresponding for storing each elementary area
Flag information.
Further, control device includes:Fourth processing unit for obtaining pending image data, and treats place
The image data of reason is split, and obtains multiple images unit.
Further, control device further includes:First ping-pong buffer area, connect with control device, pending for storing
Image data.
Further, second processor is additionally operable to read first figure in multiple images unit from default storage region
As unit, and each elementary area in multiple images unit in addition to first elementary area is read in the following way:Such as
The corresponding flag information of the first elementary area of fruit is the first flag information, then the first image list is read from default storage region
Member;If the corresponding flag information of the second elementary area is the second flag information, adjacent to the second elementary area is processed
Elementary area replicated;Multiple images unit is combined, obtains pending image data.
Further, control device includes:Second ping-pong buffer area, connect with third processor, pending for storing
Image data.
Another aspect according to embodiments of the present invention, additionally provides a kind of storage medium, and storage medium includes the journey of storage
Sequence, wherein, equipment where storage medium is controlled to perform the image data of any one in above-described embodiment when program is run
Processing method.
Another aspect according to embodiments of the present invention additionally provides a kind of processor, and processor is used to run program,
In, program performs the processing method of the image data of any one in above-described embodiment when running.
In embodiments of the present invention, the multiple images unit of pending image data and each elementary area are obtained
According to the corresponding flag information of each elementary area, at least one elementary area is stored to double-speed for corresponding flag information
Default storage region in Synchronous Dynamic Random Access Memory according to the corresponding flag information of each elementary area, is deposited from default
Pending image data is obtained in storage area domain, exports pending image data.It is easily noted that, due to according to mark
Information, integral image calculation unit in the middle part of the multiple images unit of pending image data is stored rather than will be pending
Image data is stored or is stored again, and read and treated according to flag information after pending image data is compressed
The image data of processing, moreover, only needing to get pending image before pending image data is stored
The multiple images unit of data, so as to fulfill only needing to increase a small amount of processing logic, you can reduce the memory bandwidth of DDR
Purpose solves image storage method in the prior art and, in order to reduce DDR memory bandwidths, increases a large amount of process resources, cause
The technical issues of area and cost increase.Therefore, the scheme provided by the above embodiment of the present invention, can reach reduces DDR
Memory bandwidth, reduce the technique effect of area and cost.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and forms the part of the application, this hair
Bright illustrative embodiments and their description do not constitute improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of the processing method of image data according to embodiments of the present invention;
Fig. 2 a are the schematic diagrames that a kind of optional elementary area according to embodiments of the present invention laterally compares;
Fig. 2 b are the schematic diagrames that a kind of optional elementary area according to embodiments of the present invention longitudinally compares;
Fig. 2 c are the schematic diagrames that a kind of optional elementary area transverse and longitudinal according to embodiments of the present invention compares;
Fig. 3 is the schematic diagram that a kind of optional image data according to embodiments of the present invention splits mode;
Fig. 4 is a kind of flow chart of the processing method of optional image data according to embodiments of the present invention;
Fig. 5 is a kind of schematic diagram of the processing unit of image data according to embodiments of the present invention;
Fig. 6 is a kind of schematic diagram of the processing system of image data according to embodiments of the present invention;
Fig. 7 is a kind of schematic diagram of the processing system of optional image data according to embodiments of the present invention;And
Fig. 8 is a kind of schematic diagram of optional control device according to embodiments of the present invention.
Specific embodiment
In order to which those skilled in the art is made to more fully understand the present invention program, below in conjunction in the embodiment of the present invention
The technical solution in the embodiment of the present invention is clearly and completely described in attached drawing, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
Member's all other embodiments obtained without making creative work should all belong to the model that the present invention protects
It encloses.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, "
Two " etc. be the object for distinguishing similar, and specific sequence or precedence are described without being used for.It should be appreciated that it uses in this way
Data can be interchanged in the appropriate case, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment
Those steps or unit clearly listed, but may include not listing clearly or for these processes, method, product
Or the intrinsic other steps of equipment or unit.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the processing method of image data is provided, it should be noted that
The step of flow of attached drawing illustrates can perform in the computer system of such as a group of computer-executable instructions, also,
It, in some cases, can be to be different from shown in sequence herein performs although showing logical order in flow charts
The step of going out or describing.
Fig. 1 is a kind of flow chart of the processing method of image data according to embodiments of the present invention, as shown in Figure 1, the party
Method includes the following steps:
Step S102 obtains the multiple images unit of pending image data and the corresponding mark of each elementary area
Will information, wherein, whether flag information carries out storage operation for mark to each elementary area.
Specifically, above-mentioned pending image data can be shown in one in the screen picture in computer screen
Frame, but it is not limited only to this;Above-mentioned elementary area can be in various ways, after being split to pending image data
Image, for example, can be according to as unit of 1/2,1/4,1/8 etc. of a line of image or image a line, to image data
It is split;Above-mentioned flag information can whether carry out the information of storage operation to elementary area for mark, for example, such as
Fruit flag information is a flag mark, then can be indicated with flag=0 and store corresponding elementary area, indicated with flag=1
Corresponding elementary area is not stored.
According to the corresponding flag information of each elementary area, at least one elementary area is stored to double by step S104
Default storage region in fast Synchronous Dynamic Random Access Memory.
Specifically, above-mentioned at least one elementary area can be that corresponding flag information needs to carry out storage behaviour for mark
The unit of work;Above-mentioned default storage region can be that double-speed Synchronous Dynamic Random Access Memory DDR (is Double Data
The abbreviation of Rate) in for storing the region of pending image data.
Step S106 according to the corresponding flag information of each elementary area, is obtained pending from default storage region
Image data.
Step S108 exports pending image data.
It, can be to pending image after collected pending image data in a kind of optional scheme
Data are split, and obtain multiple images unit, and according to the characteristics of image of each elementary area, judge that each elementary area is
It is no to need to store, so as to obtain the flag information of each elementary area, then according to each elementary area, it would be desirable to the figure of storage
As unit is stored into memory or DDR.When pending screen picture is read from memory or DDR, it can get first every
The flag information of a elementary area, and according to the flag information of each elementary area, each image is got from memory and DDR
Unit is combined multiple images unit, obtains pending image data, and the pending image data read out is defeated
Go out to processing module, so as to fulfill the purpose handled pending image data.
According to the above embodiment of the present invention, the multiple images unit of pending image data and each image are obtained
According to the corresponding flag information of each elementary area, at least one elementary area is stored to double for the corresponding flag information of unit
Default storage region in speed Synchronous Dynamic Random Access Memory, according to the corresponding flag information of each elementary area, from pre-
If obtaining pending image data in storage region, pending image data is exported.It is easily noted that, due to basis
Integral image calculation unit in the middle part of the multiple images unit of pending image data is stored rather than will wait to locate by flag information
The image data of reason is stored or is stored again, and read according to flag information after pending image data is compressed
To pending image data, moreover, only needing to get before pending image data is stored pending
The multiple images unit of image data, so as to fulfill only needing to increase a small amount of processing logic, you can reduce the storage tape of DDR
Wide purpose, solves in the prior art that image storage method in order to reduce DDR memory bandwidths, increases a large amount of process resources,
The technical issues of leading to area and cost increase.Therefore, the scheme provided by the above embodiment of the present invention, can reach reduction
The memory bandwidth of DDR reduces area and the technique effect of cost.
Optionally, in the above embodiment of the present invention, step S102 obtains the corresponding flag information of each elementary area,
Including:
Step S1022, it is the first mark to determine the corresponding flag information of first elementary area in multiple images unit
Information.
Specifically, the first above-mentioned flag information can be the information for carrying out storage operation to elementary area for mark,
For example, a flag is indicated, flag=0;Two flag are indicated, flag=00.
It should be noted that first elementary area in pending image data is bound in deposit memory or DDR,
It is the first flag information that can determine the corresponding flag information of first unit.
Step S1024 obtains each figure in multiple images unit in addition to first elementary area in the following way
As the corresponding flag information of unit:
Step S10242 according to each elementary area is compared with processed elementary area pixel-by-pixel, judges every
Whether a elementary area is identical with processed elementary area.
Optionally, in the above embodiment of the present invention, processed elementary area includes:With each elementary area transverse direction phase
Elementary area that is adjacent and getting flag information and/or, figure that is longitudinally adjacent with each elementary area and getting flag information
As unit.
Specifically, above-mentioned processed elementary area can be it is adjacent with the elementary area for currently needing to store
It gets the elementary area of flag information or the elementary area with currently needing to store is closest, and indicate letter
The elementary area for the first flag information is ceased, though it is closest with the elementary area that currently needs to store, and store to interior
Deposit or DDR in elementary area.
It should be noted that can be using processed elementary area as with reference to elementary area, alignments are different, reference
The selection mode of elementary area is different, specifically, alignments can be laterally compare (as shown in Figure 2 a), longitudinal direction compares (such as
Shown in Fig. 2 b), transverse and longitudinal compare (as shown in Figure 2 c).Moreover, when alignments is laterally comparisons or longitudinal direction comparison, mark letter
Breath can be a flag, i.e. 1bit flag;When alignments are compared for transverse and longitudinal, flag information can be two flag, i.e.,
2bit flag, wherein, first flag represent with the reference picture unit in transverse direction obtain more afterwards as a result, second
Flag represents the result obtained more afterwards with longitudinal reference unit.
Step S10244, if each elementary area is differed with processed elementary area, it is determined that each image list
The corresponding flag information of member is the first flag information.
Step S10246, if each elementary area is identical with processed elementary area, it is determined that each elementary area
Corresponding flag information is the second flag information.
Specifically, the second above-mentioned flag information can be the letter for not carrying out storage operation to elementary area for mark
Breath, for example, indicating for a flag, flag=1;Two flag are indicated, flag=10 or flag=01, wherein,
Flag=10 represents identical with the processed unit in transverse direction, different from longitudinal processed unit;Flag=01 tables
Show it is different from the processed unit in transverse direction, it is identical with longitudinal processed unit.
It should be noted that when alignments are compared for transverse and longitudinal, it may be determined that the priority in transverse and longitudinal comparison, for example,
Setting laterally compares priority height, if elementary area is identical with lateral processed elementary area, without continuing and indulging
To processed elementary area be compared.
In the first optional scheme, when alignments is laterally compare, as shown in Figure 2 a, it may be determined that pending
Image data the first row in first elementary area flag=0;By second elementary area and the first row in the first row
In first elementary area be compared, if identical, it is determined that second elementary area flag=1 in the first row;If no
Together, it is determined that second elementary area flag=0 in the first row;It will be second in third elementary area in the first row and the first row
A elementary area is compared, if identical, it is determined that third elementary area flag=1 in the first row;If it is different, then really
Determine third elementary area flag=0 in the first row;And so on, the mark letter of first elementary area in determining per a line
During breath, it can will be compared per first elementary area in a line with the last one elementary area in lastrow.
In second of optional scheme, when alignments are compared for longitudinal direction, as shown in Figure 2 b, it may be determined that pending
Image data first row in first elementary area flag=0;By second elementary area and first row in first row
In second elementary area be compared, if identical, it is determined that second elementary area flag=1 in first row;If no
Together, it is determined that second elementary area flag=0 in first row;It will be second in third elementary area in first row and first row
A elementary area is compared, if identical, it is determined that third elementary area flag=1 in first row;If it is different, then really
Determine third elementary area flag=0 in first row;And so on, the mark letter of first elementary area in each row are determined
During breath, first elementary area in each row can be compared with the last one elementary area in previous column.
In the third optional scheme, when alignments are compared for transverse and longitudinal, and laterally comparison priority is high, such as Fig. 2 c
It is shown, it may be determined that the flag=00 of first elementary area in the first row of pending image data;By in the first row
Two elementary areas are compared with first elementary area in the first row, if identical, it is determined that second image list in the first row
First flag=10;If it is different, then determine second elementary area flag=00 in the first row;And so on, until the first row
All elementary area comparisons finish.By first elementary area in the second row compared with the last one elementary area in the first row,
If identical, without first elementary area in the second row be compared with first elementary area in the first row, i.e., without
Longitudinal comparison need to be carried out, directly determines first elementary area flag=10 in the second row;If it is different, then further by second
First elementary area is compared with first elementary area in the first row in row, that is, needs to carry out longitudinal comparison, if not
Together, it is determined that first elementary area flag=00 in the second row;It is if identical, it is determined that first elementary area in the second row
Flag=01;And so on, until the comparison of all elementary areas finishes, so as to obtain each image of pending elementary area
The corresponding flag information flag of unit.
In the 4th kind of optional scheme, when alignments are compared for transverse and longitudinal, and longitudinal direction comparison priority is high, such as Fig. 2 c
It is shown, it may be determined that the flag=00 of first elementary area in the first row of pending image data;By in the second row
One elementary area is compared with first elementary area in the first row, if identical, it is determined that first image list in the second row
First flag=01;If it is different, then determine first elementary area flag=00 in the second row;And so on, until first row
In all elementary area comparisons finish.By second elementary area in the first row and the last one elementary area ratio in first row
Compared with if identical, without second elementary area in the first row is compared with first elementary area in the first row, i.e.,
Without carrying out lateral comparison, first elementary area flag=01 in the second row is directly determined;If it is different, then further by
Second elementary area is compared with first elementary area in the first row in a line, that is, needs to carry out lateral comparison, if
It is different, it is determined that first elementary area flag=00 in the second row;It is if identical, it is determined that first image list in the second row
First flag=10;And so on, until the comparison of all elementary areas finishes, so as to obtain each figure of pending elementary area
As the corresponding flag information flag of unit.
Optionally, in the above embodiment of the present invention, step S104, according to the corresponding flag information of each elementary area,
At least one elementary area is stored into the default storage region into double-speed Synchronous Dynamic Random Access Memory, including:
Step S1042, if the corresponding flag information of the first elementary area is the first flag information, by the first image list
Member is stored to default storage region.
Step S1044 if the corresponding flag information of the second elementary area is the second flag information, forbids the second figure
As unit is stored to default storage region.
In a kind of optional scheme, when alignments is laterally comparisons or longitudinal direction comparison, such as Fig. 2 a or Fig. 2 b institutes
Show, to get to after the flag of each elementary area after the corresponding flag information of each elementary area is got, Ke Yigen
Determine whether to carry out storage operation to the elementary area according to the flag of each elementary area, if the flag=of an elementary area
0, i.e. the corresponding flag information of the first elementary area is the first flag information, it is determined that needs to store the elementary area, then starts
Write operation stores the elementary area into memory or DDR;If the flag=1 of an elementary area, i.e. the second elementary area
Corresponding flag information is the second flag information, it is determined that does not need to store the elementary area, then will not start write operation.
In another optional scheme, when alignments are compared for transverse and longitudinal, as shown in Figure 2 c, each figure is being got
As after the corresponding flag information of unit to get to after the flag of each elementary area, can be according to each elementary area
Flag determines whether to carry out storage operation to the elementary area, if the flag=00 of an elementary area, i.e. the first image list
The corresponding flag information of member is the first flag information, it is determined that needs to store the elementary area, then starts write operation, by the image
Unit is stored in memory or DDR;If the flag=10 or flag=01 of an elementary area, i.e. the second elementary area pair
The flag information answered is the second flag information, it is determined that does not need to store the elementary area, does not then start write operation.
Optionally, in the above embodiment of the present invention, in step S102, the corresponding flag information of each elementary area is obtained
Later, this method further includes:
Step S110 stores the corresponding flag information of each elementary area into flag information random access memory.
In a kind of optional scheme, in order to ensure that the elementary area of storage is normally read from memory or DDR, thus into
One step gets pending image data, can be by all elementary areas after the flag for getting each elementary area
Flag be stored in flag information random access memory flag_ram.
Optionally, in the above embodiment of the present invention, step S102 obtains the multiple images list of pending image data
Member, including:
Step S1026 obtains pending image data.
Step S1028 splits pending image data, obtains multiple images unit.
It, can be according to point of image data after pending image data is got in a kind of optional scheme
Resolution selects different fractionation modes, and pending image data is split according to corresponding fractionation mode, so as to
To multiple images unit, for example, as shown in figure 3, can be split according to as unit of a line of image to image data,
Obtain elementary area;Image data can also be split, obtained according to as unit of the 1/2 of image a line, 1/4,1/8 etc.
To elementary area.
Optionally, in the above embodiment of the present invention, in step S1026, after obtaining pending image data, the party
Method further includes:
Step S1020 deposits pending image data into the first ping-pong buffer area.
In a kind of optional scheme, memory or the efficiency of DDR are stored in order to not influence image, table tennis may be used
The mode of buffer carries out data buffer storage, the pending image data that gets is stored in table tennis buffer, and will
The image data read from table tennis buffer carries out write operation, stores into memory or DDR.
Optionally, in the above embodiment of the present invention, step S106, according to the corresponding flag information of each elementary area,
Pending image data is obtained from default storage region, including:
Step S1062 reads first elementary area in multiple images unit from default storage region.
In a kind of optional scheme, when reading pending image data from memory or DDR, can first from
Corresponding flag marks are read in flag_ram, it, then can be first since first elementary area is bound in deposit memory or DDR
First elementary area is first read from memory or DDR.
Step S1064 reads each figure in multiple images unit in addition to first elementary area in the following way
As unit:
Step S10642, if the corresponding flag information of the first elementary area is the first flag information, from default storage
The first elementary area is read in region.
Step S10644, if the corresponding flag information of the second elementary area is the second flag information, to the second image
The adjacent processed elementary area of unit is replicated.
In the first optional scheme, when alignments is laterally compare, as shown in Figure 2 a, the first row is being read out
In after first elementary area, the flag marks of second elementary area in the first row can be read from flag_ram, such as
Fruit flag=0, then start read operation, and second elementary area in the first row of storage is read out from memory or DDR;If
Flag=1 does not start read operation then, first elementary area in the first row directly is replicated output, as in the first row second
A elementary area;The flag marks of third elementary area in the first row are read from flag_ram, if flag=0, are opened
Dynamic read operation, reads out third elementary area in the first row of storage from memory or DDR;If flag=1 does not start
Second elementary area in the first row is directly replicated output, as third elementary area in the first row by read operation;Class successively
It pushes away, in reading per a line from flag_ram after the flag marks of first elementary area, if flag=1, does not start
The last one elementary area in lastrow is directly replicated output, as first elementary area in every a line by read operation.
In second of optional scheme, when alignments are compared for longitudinal direction, as shown in Figure 2 b, first row is being read out
In after first elementary area, the flag marks of second elementary area in first row can be read from flag_ram, such as
Fruit flag=0, then start read operation, and second elementary area in the first row of storage is read out from memory or DDR;If
Flag=1 does not start read operation then, first elementary area in first row directly is replicated output, as in first row second
A elementary area;The flag marks of third elementary area in first row are read from flag_ram, if flag=0, are opened
Dynamic read operation, reads out third elementary area in the first row of storage from memory or DDR;If flag=1 does not start
Second elementary area in first row is directly replicated output, as third elementary area in first row by read operation;Class successively
It pushes away, in each row are read from flag_ram after the flag marks of first elementary area, if flag=1, does not start
The last one elementary area in previous column is directly replicated output, as first elementary area in each row by read operation.
In the third optional scheme, when alignments are compared for transverse and longitudinal, and laterally comparison priority is high, such as Fig. 2 c
It is shown, in the first row is read out after first elementary area, second figure in the first row can be read from flag_ram
As the flag marks of unit, if flag=00, start read operation, read out in the first row of storage from memory or DDR
Second elementary area;If flag=10, do not start read operation, directly replicate first elementary area in the first row defeated
Go out, as second elementary area in the first row;And so on, until reading out all elementary areas in the first row.From flag_
The flag marks of first elementary area are read in the second row in ram, if flag=00, start read operation, from memory or
First elementary area in the second row of storage is read out in DDR;If flag=10, do not start read operation, directly by
The last one elementary area replicates output in a line, as first elementary area in the second row;If flag=01 is not opened
First elementary area in the first row is directly replicated output, as first elementary area in the second row by dynamic read operation;Successively
Analogize, until reading out all elementary areas.
In the 4th kind of optional scheme, when alignments are compared for transverse and longitudinal, and longitudinal direction comparison priority is high, such as Fig. 2 c
It is shown, in first row is read out after first elementary area, second figure in first row can be read from flag_ram
As the flag marks of unit, if flag=00, start read operation, read out in the first row of storage from memory or DDR
Second elementary area;If flag=01, do not start read operation, directly replicate first elementary area in first row defeated
Go out, as second elementary area in first row;And so on, until reading out all elementary areas in first row.From flag_
The flag marks of first elementary area in secondary series are read in ram, if flag=00, start read operation, from memory or
First elementary area in the secondary series of storage is read out in DDR;If flag=01, do not start read operation, directly by
The last one elementary area replicates output in one row, as first elementary area in secondary series;If flag=10 is not opened
First elementary area in first row is directly replicated output, as first elementary area in secondary series by dynamic read operation;Successively
Analogize, until reading out all elementary areas.
Multiple images unit is combined by step S1066, obtains pending image data.
In a kind of optional scheme, all elementary areas read out can be combined according to fractionation mode,
Pending image data so as to be got.
Optionally, in the above embodiment of the present invention, in step S106, believed according to the corresponding mark of each elementary area
Breath, after pending image data is obtained from default storage region, this method further includes:
Step S112 deposits pending image data into the second ping-pong buffer area.
In a kind of optional scheme, memory or the efficiency of DDR are stored in order to not influence image, table tennis may be used
The mode of buffer carries out data buffer storage, and pending image data after combination is stored in table tennis buffer, and is led to
It crosses table tennis buffer to export pending image data into subsequent processing module, so as to fulfill to pending picture number
According to the purpose handled.
Fig. 4 is a kind of flow chart of the processing method of optional image data according to embodiments of the present invention, with reference to
A kind of preferred embodiment of the present invention is described in detail in Fig. 4, as shown in figure 4, this method may include steps of:
The video of acquisition and picture signal are placed into buffer and cache by step S41.
Optionally, efficiency to memory or DDR is stored in order to not influence image, is carried out by the way of the buffer that rattles
Data buffer storage.
Step S42 by the digital independent of buffer memory storages, and is written in memory or DDR.
Optionally, it when data are read from buffer, according to characteristics of image, chooses a kind of preferable control algolithm and carrys out logarithm
According to being handled, the selection of the control algolithm depends on three factors, specific as follows:First factor is the tool in input picture source
Body resolution ratio, different resolution ratio can select different control algolithms;Second factor is the basic unit of control algolithm, control
Unit processed can with a line of selected as image, can also selected as image a line 1/2,1/4,1/8 ..., different selections institute
The resource for needing the flag_ram consumed is different, also different to the amount of bandwidth for reducing memory or DDR, and flag_ram
Resource occupation it is bigger, the bandwidth for reducing memory or DDR is more apparent;Third factor is the manner of comparison of basic unit, can be with
Individually selection basic unit carries out lateral comparison with adjacent basic unit, can also individually select basic unit and adjacent base
This unit carries out longitudinal comparison, and basic unit can also be selected to be carried out at the same time horizontal, longitudinal comparison with adjacent basic unit, work as horizontal stroke
To or only longitudinal comparison when, the bit wide selected as 1bit of flag_ram, when transverse direction+longitudinal comparison, the position of flag_ram
Wide selected as 2bit, the increasing of RAM resources is twice, but it also has the bandwidth for reducing memory or DDR income by about one time.
For example, for the image of 1080p, the data for choosing 1920 YUV or RGB of a line are basic control unit.One
The first row of frame image is bound in write-in memory or DDR, and it is 0 to generate flag marks, and mark is stored to flag_ram
In.During the first row write operation, the second row data in table tennis buffer are read, are compared with the first row data, such as
Fruit the second row data are identical with the first row data corresponding position comparing, then it is 1 to generate flag marks, and mark is stored
Into flag_ram, and the data of the second row are controlled without write operation;If the second row data and the first row data correspond to
Position data comparison is not exactly the same, then it is 0 to generate flag marks, and mark is stored into flag_ram, and controls second
Capable data continue write operation, and the second row data are written in memory or DDR;And so on push away at the data of other rows
Reason is completed until a complete frame operates.
Step S43 reads data from memory or DDR.
Optionally, when data are read from memory or DDR, the correspondence row of corresponding frame is read first from flag_ram
Flag indicates.The first row flag marks one per frame are set to 0, need to read the data of the first row from DDR;Starting the second row
Read operation before, read the flag marks for the second row for correspond to frame in flag_ram, if the mark is 0, continue startup the
The read operation of two rows;If the mark is 1, the data of the second row are not read, are directly replicated the data of the first row a defeated
Go out;And so on other rows data processing, until a complete frame operate complete.
Step S44, the data of reading are output to other processing modules by buffer controls.
By above-mentioned steps, recessive information can be extracted, and control by recessive information by analyzing feature of image
The storage and reading of DDR, to reduce the bandwidth of DDR, and due to the recessive character for extracting image, it is only necessary to increase less place
Logic is managed, compared with currently existing scheme, reduces area and cost, and the delay for storing and handling without image.
Embodiment 2
According to embodiments of the present invention, a kind of embodiment of the processing unit of image data is provided.
Fig. 5 is a kind of schematic diagram of the processing unit of image data according to embodiments of the present invention, as shown in figure 5, the dress
Put including:
First acquisition unit 51, for obtaining the multiple images unit of pending image data and each image list
The corresponding flag information of member, wherein, whether flag information carries out storage operation for mark to each elementary area.
Specifically, above-mentioned pending image data can be shown in one in the screen picture in computer screen
Frame, but it is not limited only to this;Above-mentioned elementary area can be in various ways, after being split to pending image data
Image, for example, can be according to as unit of 1/2,1/4,1/8 etc. of a line of image or image a line, to image data
It is split;Above-mentioned flag information can whether carry out the information of storage operation to elementary area for mark, for example, such as
Fruit flag information is a flag mark, then can be indicated with flag=0 and store corresponding elementary area, indicated with flag=1
Corresponding elementary area is not stored.
First storage unit 53, for according to the corresponding flag information of each elementary area, by least one elementary area
Store the default storage region into double-speed Synchronous Dynamic Random Access Memory.
Specifically, above-mentioned at least one elementary area can be that corresponding flag information needs to carry out storage behaviour for mark
The unit of work;Above-mentioned default storage region can be that double-speed Synchronous Dynamic Random Access Memory DDR (is Double Data
The abbreviation of Rate) in for storing the region of pending image data.
Second acquisition unit 55, for according to the corresponding flag information of each elementary area, being obtained from default storage region
Take pending image data.
Output unit 57, for exporting pending image data.
It, can be to pending image after collected pending image data in a kind of optional scheme
Data are split, and obtain multiple images unit, and according to the characteristics of image of each elementary area, judge that each elementary area is
It is no to need to store, so as to obtain the flag information of each elementary area, then according to each elementary area, it would be desirable to the figure of storage
As unit is stored into memory or DDR.When pending screen picture is read from memory or DDR, it can get first every
The flag information of a elementary area, and according to the flag information of each elementary area, each image is got from memory and DDR
Unit is combined multiple images unit, obtains pending image data, and the pending image data read out is defeated
Go out to processing module, so as to fulfill the purpose handled pending image data.
According to the above embodiment of the present invention, the multiple images unit of pending image data and each image are obtained
According to the corresponding flag information of each elementary area, at least one elementary area is stored to double for the corresponding flag information of unit
Default storage region in speed Synchronous Dynamic Random Access Memory, according to the corresponding flag information of each elementary area, from pre-
If obtaining pending image data in storage region, pending image data is exported.It is easily noted that, due to basis
Integral image calculation unit in the middle part of the multiple images unit of pending image data is stored rather than will wait to locate by flag information
The image data of reason is stored or is stored again, and read according to flag information after pending image data is compressed
To pending image data, moreover, only needing to get before pending image data is stored pending
The multiple images unit of image data, so as to fulfill only needing to increase a small amount of processing logic, you can reduce the storage tape of DDR
Wide purpose, solves in the prior art that image storage method in order to reduce DDR memory bandwidths, increases a large amount of process resources,
The technical issues of leading to area and cost increase.Therefore, the scheme provided by the above embodiment of the present invention, can reach reduction
The memory bandwidth of DDR reduces area and the technique effect of cost.
Optionally, in the above embodiment of the present invention, first acquisition unit 51 includes:
Determining module, for determining the corresponding flag information of first elementary area in multiple images unit for the first mark
Will information.
First acquisition module, for obtaining in the following way in multiple images unit in addition to first elementary area
The corresponding flag information of each elementary area:According to each elementary area and processed elementary area are compared pixel-by-pixel
It is right, judge whether each elementary area is identical with processed elementary area, if each elementary area and processed image
Unit differs, it is determined that each corresponding flag information of elementary area is the first flag information, if each elementary area with
Processed elementary area is identical, it is determined that the corresponding flag information of each elementary area is the second flag information.
Optionally, in the above embodiment of the present invention, processed elementary area includes:With each elementary area transverse direction phase
Elementary area that is adjacent and getting flag information and/or, figure that is longitudinally adjacent with each elementary area and getting flag information
As unit.
Optionally, in the above embodiment of the present invention, the first storage unit 53 includes:
First memory module, if being the first flag information for the corresponding flag information of the first elementary area, by the
One elementary area is stored to default storage region.
Second memory module if being the second flag information for the corresponding flag information of the second elementary area, is forbidden
Second elementary area is stored to default storage region.
Optionally, in the above embodiment of the present invention, which further includes:Second storage unit, for by each image
The corresponding flag information of unit is stored into flag information random access memory.
Optionally, in the above embodiment of the present invention, first acquisition unit 51 includes:
Second acquisition module, for obtaining pending image data.
Module is split, for being split to pending image data, obtains multiple images unit.
Optionally, in the above embodiment of the present invention, which further includes:Third storage unit, for will be pending
Image data is deposited into the first ping-pong buffer area.
Optionally, in the above embodiment of the present invention, second acquisition unit 55 includes:
First read module, for reading first elementary area in multiple images unit from default storage region.
Second read module, for reading in the following way in multiple images unit in addition to first elementary area
Each elementary area:If the corresponding flag information of the first elementary area is the first flag information, from default storage region
The first elementary area is read, if the corresponding flag information of the second elementary area is the second flag information, to the second image list
The adjacent processed elementary area of member is replicated.
Composite module for multiple images unit to be combined, obtains pending image data.
Optionally, in the above embodiment of the present invention, which further includes:4th storage unit, for will be pending
Image data is deposited into the second ping-pong buffer area.
It should be noted that the preferred embodiment in the present embodiment may refer to the associated description in embodiment 1, herein
It repeats no more.
Embodiment 3
According to embodiments of the present invention, a kind of embodiment of the processing system of image data is provided.
Fig. 6 is a kind of schematic diagram of the processing system of image data according to embodiments of the present invention, as shown in fig. 6, this is
System includes:
Control device 61, for obtaining the multiple images unit of pending image data and each elementary area pair
The flag information answered, wherein, whether flag information carries out storage operation for mark to each elementary area.
Specifically, above-mentioned pending image data can be shown in one in the screen picture in computer screen
Frame, but it is not limited only to this;Above-mentioned elementary area can be in various ways, after being split to pending image data
Image, for example, can be according to as unit of 1/2,1/4,1/8 etc. of a line of image or image a line, to image data
It is split;Above-mentioned flag information can whether carry out the information of storage operation to elementary area for mark, for example, such as
Fruit flag information is a flag mark, then can be indicated with flag=0 and store corresponding elementary area, indicated with flag=1
Corresponding elementary area is not stored.
First processor 63, connect with control device, will at least for according to the corresponding flag information of each elementary area
One elementary area stores the default storage region into double-speed Synchronous Dynamic Random Access Memory.
Specifically, above-mentioned at least one elementary area can be that corresponding flag information needs to carry out storage behaviour for mark
The unit of work;Above-mentioned default storage region can be that double-speed Synchronous Dynamic Random Access Memory DDR (is Double Data
The abbreviation of Rate) in for storing the region of pending image data.
Second processor 65, connect with control device, for according to the corresponding flag information of each elementary area, from default
Pending image data is obtained in storage region.
Control device is additionally operable to export pending image data.
It, can be to pending image after collected pending image data in a kind of optional scheme
Data are split, and obtain multiple images unit, and according to the characteristics of image of each elementary area, judge that each elementary area is
It is no to need to store, so as to obtain the flag information of each elementary area, then according to each elementary area, it would be desirable to the figure of storage
As unit is stored into memory or DDR.When pending screen picture is read from memory or DDR, it can get first every
The flag information of a elementary area, and according to the flag information of each elementary area, each image is got from memory and DDR
Unit is combined multiple images unit, obtains pending image data, and the pending image data read out is defeated
Go out to processing module, so as to fulfill the purpose handled pending image data.
According to the above embodiment of the present invention, the multiple images unit of pending image data and each image are obtained
According to the corresponding flag information of each elementary area, at least one elementary area is stored to double for the corresponding flag information of unit
Default storage region in speed Synchronous Dynamic Random Access Memory, according to the corresponding flag information of each elementary area, from pre-
If obtaining pending image data in storage region, pending image data is exported.It is easily noted that, due to basis
Integral image calculation unit in the middle part of the multiple images unit of pending image data is stored rather than will wait to locate by flag information
The image data of reason is stored or is stored again, and read according to flag information after pending image data is compressed
To pending image data, moreover, only needing to get before pending image data is stored pending
The multiple images unit of image data, so as to fulfill only needing to increase a small amount of processing logic, you can reduce the storage tape of DDR
Wide purpose, solves in the prior art that image storage method in order to reduce DDR memory bandwidths, increases a large amount of process resources,
The technical issues of leading to area and cost increase.Therefore, the scheme provided by the above embodiment of the present invention, can reach reduction
The memory bandwidth of DDR reduces area and the technique effect of cost.
Optionally, in the above embodiment of the present invention, control device includes:
Third processor, for determining that the corresponding flag information of first elementary area in multiple images unit is first
Flag information, and each elementary area pair in multiple images unit in addition to first elementary area is obtained in the following way
The flag information answered:According to each elementary area is compared with processed elementary area pixel-by-pixel, each image is judged
Whether unit is identical with processed elementary area, if each elementary area is differed with processed elementary area, really
It is the first flag information to determine the corresponding flag information of each elementary area, if each elementary area and processed elementary area
It is identical, it is determined that the corresponding flag information of each elementary area is the second flag information.
Optionally, in the above embodiment of the present invention, processed elementary area includes:With each elementary area transverse direction phase
Elementary area that is adjacent and getting flag information and/or, figure that is longitudinally adjacent with each elementary area and getting flag information
As unit.
Optionally, in the above embodiment of the present invention, if first processor is additionally operable to the corresponding mark of the first elementary area
Will information is the first flag information, then stores the first elementary area to default storage region;If the second elementary area corresponds to
Flag information for the second flag information, then forbid storing the second elementary area to default storage region.
Optionally, in the above embodiment of the present invention, control device includes:
Flag information random access memory, for storing the corresponding flag information of each elementary area.
Optionally, control device includes:Fourth processing unit, for obtaining pending image data, and to pending
Image data split, obtain multiple images unit.
Optionally, control device further includes:First ping-pong buffer area, connect with fourth processing unit, for will be pending
Image data deposit into the first ping-pong buffer area.
Optionally, in the above embodiment of the present invention, second processor is additionally operable to read from default storage region multiple
First elementary area in elementary area, and read in the following way in multiple images unit except first elementary area it
Outer each elementary area:If the corresponding flag information of the first elementary area is the first flag information, from default memory block
The first elementary area is read in domain, if the corresponding flag information of the second elementary area is the second flag information, to the second figure
As the adjacent processed elementary area of unit is replicated;Multiple images unit is combined, obtains pending image
Data.
Optionally, in the above embodiment of the present invention, control device includes:Second ping-pong buffer area, at described second
Device connection is managed, for storing pending image data.
It should be noted that the preferred embodiment in the present embodiment may refer to the associated description in embodiment 1, herein
It repeats no more.
Fig. 7 is a kind of schematic diagram of the processing system of optional image data according to embodiments of the present invention, and Fig. 8 is basis
The schematic diagram of a kind of optional control device of the embodiment of the present invention, with reference to Fig. 7 and Fig. 8 to a kind of preferred reality of the present invention
Example is applied to be described in detail.As shown in fig. 7, the system can include:DDR, (the first i.e. above-mentioned processing of write operation control module
Device), read operation control module (i.e. above-mentioned first processor), flag information control module (i.e. above-mentioned control device) and place
Module is managed, wherein, DDR is important component, and the main storage for completing data since the data volume of image data is very big, uses
The storage scheme of DDR is more effective;Write operation control module is important component, and the main DDR that writes for completing image data controls work(
Energy;Read operation control module is important component, the main reading DDR control functions for completing image data;Flag information control module
It is key component, the main feature extraction for completing image data, and storing extraction for the read-write control to DDR
System;Processing module is accessory part, main other processing completed after image data is read.As shown in figure 8, flag information controls
Module can include two table tennis buffer, data comparator, flag_ram and controller, wherein, first table tennis buffer
Data buffer storage is carried out for the video to acquisition and picture signal, efficiency to memory or DDR is stored so as to influence image;The
Two table tennis buffer are used to carry out data buffer storage to the data of reading;Data comparator is used to compare two elementary areas
Compared with the flag for obtaining elementary area indicates;Flag_ram is used to store the flag marks of each elementary area;Controller for pair
First table tennis buffer and flag_ram is controlled.
Embodiment 4
According to embodiments of the present invention, a kind of embodiment of storage medium is provided, storage medium includes the program of storage,
In, equipment where storage medium is controlled to perform the processing method of the image data in above-described embodiment 1 when program is run.
Embodiment 5
According to embodiments of the present invention, a kind of embodiment of processor is provided.Processor is used to run program, wherein, journey
The processing method of the image data in above-described embodiment 1 is performed during sort run.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
In the above embodiment of the present invention, all emphasize particularly on different fields to the description of each embodiment, do not have in some embodiment
The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of division of logic function, can there is an other dividing mode in actual implementation, for example, multiple units or component can combine or
Person is desirably integrated into another system or some features can be ignored or does not perform.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module
It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple
On unit.Some or all of unit therein can be selected according to the actual needs to realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is independent product sale or uses
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially
The part to contribute in other words to the prior art or all or part of the technical solution can be in the form of software products
It embodies, which is stored in a storage medium, is used including some instructions so that a computer
Equipment (can be personal computer, server or network equipment etc.) perform each embodiment the method for the present invention whole or
Part steps.And aforementioned storage medium includes:USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can to store program code
Medium.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should
It is considered as protection scope of the present invention.