A kind of color bits depth access method and system
Technical field
The invention belongs to image field of storage, more particularly to a kind of color bits depth access method and system.
Background technology
Color depth(Color Depth)Also referred to as color bits depth, it is to use bit(bit)Count to represent digital image number of colors
Purpose unit.Bit is the binary unit that computer calculates(Or position), i.e., manageable most basic data or news in computer
Breath.
1 bit image is 21 power (=2), can only show two kinds of colors of B&W.2 bit shadow
Picture, then it is 2 square (=4), 4 kinds of colors can be showed, so in addition to black and white, can also shows between them
Two kinds of tones.And 3 bit image, be exactly 23 powers (=8), represent the photo in a width black and white or GTG
In, 8 kinds of colors including black and white can be shown.According to above computational methods, 24 bit image can be shown
16,777,216 kinds of colors, the color that naked eyes can be differentiated is sufficiently close to, so it is color (True color) to be referred to as euchroic.
In existing Display Technique, single pixel is stored with 16bit, 18bit, 24bit, 32bit, 48bit etc., more often
In 32bit, in view data frame buffer, display controller is only read out to the 24bit among 32bit, you can complete
Into display;Wherein 8bit by the frame buffer of internal memory when reading data to display controller, forfeiture effect;Such a phenomenon according to
Bus bandwidth so is occupied, increases system power dissipation.
Also, in pixel values such as neighbor pixel appearance, traditionally it is required for being read and writen caching, such as phase
Adjacent pixel has 8 to wait pixel value, and each pixel value is 24bit, and traditional technology needs 8 × 24bit data all to write
Enter in caching, then also need to once or repeatedly read out, this phenomenon has also accounted for many bus bandwidths, occupies interior
Deposit, increase the power consumption of system.
The content of the invention
In view of this, the technical problems to be solved by the invention are to provide a kind of color bits depth access method and system.For
There is a basic understanding to some aspects of the embodiment of disclosure, shown below is simple summary.The summarized section is not
It is extensive overview, nor to determine key/critical component or describe the protection domain of these embodiments.Its sole purpose
It is that some concepts are presented with simple form, in this, as the preamble of following detailed description.
An aspect of of the present present invention is to disclose a kind of color bits depth storage method, including:
Judge whether the pixel value that color depth is closed in frame buffer is equal;
Fusion coding is carried out to equal multiple color depths;
Store the color depth after fusion encodes.
In some optional embodiments, the fusion coding that carried out to equal multiple color depths specifically includes:Determine phase
Etc. the individual numerical value of color depth;The reservation color depth individual numerical value being stored in multiple equal color depths;Store the picture of the reservation color depth
Element value;Leave out other equal color depths.
In some optional embodiments, the fusion coding that carried out to equal multiple color depths also includes:According to advance
The threshold value of definition is contrasted with the individual numerical value, if exceeding threshold value, threshold value is stored in and retains color depth.
In some optional embodiments, the color depth that retains is the first color depth in multiple equal color depths.
In some optional embodiments, the color depth after the fusion coding includes pixel value and encoded radio.
In some optional embodiments, the encoded radio in the color depth includes closing on the number of equal color depth.
When reading, the invention discloses a kind of color bits depth read method, including:
Judge in frame buffer with the presence or absence of reservation color depth;
According to the encoded radio for retaining color depth, respective numbers pixel value identical color depth is added;
Output display after being decoded to color depth.
Another aspect of the present invention is to disclose a kind of color bits depth storage system, including:
Color depth judging unit:Judge whether the pixel value that color depth is closed in frame buffer is equal;
Merge coding unit:Fusion coding is carried out to equal multiple color depths;
Writing unit:Store the color depth after fusion encodes.
In some optional embodiments, the fusion coding unit specifically includes:
Etc. color depth computing module:Determine the individual numerical value of equal color depth;
Retain color depth coding module:The reservation color depth individual numerical value being stored in multiple equal color depths;
Retain color depth picture element module:Store the pixel value of the reservation color depth;
Removing module:Leave out other equal color depths.
In some optional embodiments, the fusion coding unit also includes:
Threshold setting module:Contrasted according to pre-defined threshold value and the individual numerical value, if exceeding threshold value, by threshold
Value deposit retains color depth.
In some optional embodiments, the color depth that retains is the first color depth in multiple equal color depths.
In some optional embodiments, the color depth after the fusion coding includes pixel value and encoded radio.
In some optional embodiments, the encoded radio in the color depth includes closing on the number of equal color depth.
When reading, the invention discloses a kind of color bits depth to read system, including:
Color depth chooses unit:Judge in frame buffer with the presence or absence of reservation color depth;
Color depth adding device:According to the encoded radio for retaining color depth, respective numbers pixel value identical color depth is added;
Output unit:Output display after being decoded to color depth.
For above-mentioned and related purpose, one or more embodiments include will be explained in below and in claim
In the feature that particularly points out.Following explanation and accompanying drawing describe some illustrative aspects in detail, and its instruction is only
Some modes in the utilizable various modes of principle of each embodiment.Other benefits and novel features will be under
The detailed description in face is considered in conjunction with the accompanying and becomes obvious, the disclosed embodiments be will include all these aspects and they
Be equal.
The present invention in storage, has saved spatial cache by the way that the color depth of identical pigment value is carried out into fusion coding;Passing
On defeated, the demand of bus bandwidth is saved;In total system aspect, system power dissipation is reduced.
Brief description of the drawings
Fig. 1 is the storage method flow chart of the present invention;
Fig. 2 is the read method flow chart of the present invention;
Fig. 3 is the storage system schematic diagram of the present invention;
Fig. 4 is color depth memory system architecture schematic diagram in the prior art;
Fig. 5 is color depth access system schematic of the present invention;
Fig. 6 is that color depth of the present invention reads system schematic.
Embodiment
The following description and drawings fully show specific embodiments of the present invention, to enable those skilled in the art to
Put into practice them.Other embodiments can include structure, logic, it is electric, process and other change.Embodiment
Only represent possible change.Unless explicitly requested, otherwise single component and function are optional, and the order operated can be with
Change.The part of some embodiments and feature can be included in or replace part and the feature of other embodiments.This hair
The scope of bright embodiment includes the gamut of claims, and claims is all obtainable equivalent
Thing.Herein, these embodiments of the invention can individually or generally be represented that this is only with term " invention "
For convenience, and if in fact disclosing the invention more than one, the scope for being not meant to automatically limit the application is to appoint
What single invention or inventive concept.
As shown in figure 1, an aspect of of the present present invention is to disclose a kind of color bits depth storage method, including:
Step S101:Judge whether the pixel value that color depth is closed in frame buffer is equal;
Step S102:Fusion coding is carried out to equal multiple color depths;
Step S103:Store the color depth after fusion encodes.
In some optional embodiments, the fusion coding that carried out to equal multiple color depths specifically includes:Determine phase
Etc. the individual numerical value of color depth;The reservation color depth individual numerical value being stored in multiple equal color depths;Store the picture of the reservation color depth
Element value;Leave out other equal color depths.
In some optional embodiments, the fusion coding that carried out to equal multiple color depths also includes:According to advance
The threshold value of definition is contrasted with the individual numerical value, if exceeding threshold value, threshold value is stored in and retains color depth.
In some optional embodiments, the color depth that retains is the first color depth in multiple equal color depths.
In some optional embodiments, the color depth after the fusion coding includes pixel value and encoded radio.
In some optional embodiments, the encoded radio in the color depth includes closing on the number of equal color depth.
When reading, as shown in Fig. 2 the invention discloses a kind of color bits depth read method, including:
Step S201:Judge in frame buffer with the presence or absence of reservation color depth;
Step S202:According to the encoded radio for retaining color depth, respective numbers pixel value identical color depth is added;
Step S203:Output display after being decoded to color depth.
As shown in figure 3, another aspect of the present invention is to disclose a kind of color bits depth storage system, including:
Color depth judging unit 301:Judge whether the pixel value that color depth is closed in frame buffer is equal;
Merge coding unit 302:Fusion coding is carried out to equal multiple color depths;
Writing unit 303:Store the color depth after fusion encodes.
In some optional embodiments, the fusion coding unit specifically includes:
Etc. color depth computing module 3021:Determine the individual numerical value of equal color depth;
Retain color depth coding module 3022:The reservation color depth individual numerical value being stored in multiple equal color depths;
Retain color depth picture element module 3023:Store the pixel value of the reservation color depth;
Removing module 3024:Leave out other equal color depths.
In some optional embodiments, the fusion coding unit also includes:
Threshold setting module:Contrasted according to pre-defined threshold value and the individual numerical value, if exceeding threshold value, by threshold
Value deposit retains color depth.
In some optional embodiments, the color depth that retains is the first color depth in multiple equal color depths.
In some optional embodiments, the color depth after the fusion coding includes pixel value and encoded radio.
In some optional embodiments, the encoded radio in the color depth includes closing on the number of equal color depth.
When reading, the invention discloses a kind of color bits depth to read system, including:
Color depth chooses unit:Judge in frame buffer with the presence or absence of reservation color depth;
Color depth adding device:According to the encoded radio for retaining color depth, respective numbers pixel value identical color depth is added;
Output unit:Output display after being decoded to color depth.
The color depth storage system of prior art is as shown in figure 4, picture encodes to form binary system shape by CPU, GPU or VPU
The data of formula, by the transmission of bus bridge, the binary data of picture is stored in frame buffer, and is that order arranges, one
The corresponding color depth data of pixel.In some other realizations, picture can also be divided into several subregions and be preserved, point
Color depth in area is still tactic.In digital independent, cache controller extracts the data in frame buffer, enters
The transmission for crossing bus bridge is sent to display controller, is decoded by display controller, is finally completed the display of picture.
Fig. 5 is a kind of system schematic of preferably embodiment of the present invention, is encoded by being added in color storage system
Integrated unit, when picture color depth is stored, binary color depth data are compared, the color depth of same pixel value is entered
Row coding fusion, wherein coding fusion specifically includes:After picture is encoded by CPU, GPU or VPU, binary color depth number is formed
According to 32bit color depths common in the art, wherein there is 24bit storing pixel values, the 24bit can show 16,777,216
Kind color, remaining 8bit data forfeiture effect during color depth reads display controller by frame buffer, so
In the prior art, the 8bit is vacant.For such 32bit color depths, the present invention first, is led to using above-mentioned 8bit space
The color depth computing module 3021 such as cross, determine other color depth pixel values that a certain color depth is closed on, i.e., whether is above-mentioned 24bit color value
It is equal, determine the number of the equal color depth;Secondly, retain color depth coding module 3022, above-mentioned individual numerical value is stored in multiple phases
Etc. the reservation color depth in color depth, the reservation color depth remains 32bit, wherein, retain color depth picture element module 3023, i.e. in 32bit
24bit preserve pixel value, 8bit preserves the individual numerical value in addition;Again, removing module 3024, will be removed in multiple equal color depths
Go to retain other color depths deletion after color depth, which reduces the demand for frame buffer, discharged partial memory;And
During bus transfer, the utilization for bus bandwidth is also reduced, totally makes the lower power consumption of system.
For in the prior art, the color depth of other unit, the present invention can also play good effect, for example, 16bit,
In 18bit or 24bit color depth, the present invention can only be extended when encoding fusion, increase reservation color depth to retaining color depth
Add the memory space of corresponding encoded value, so as to reservation color depth is preserved, delete other equal color depths, save the utilization of caching.
Fig. 6 is that color depth of the present invention reads system, and the purpose of the system is that the color depth after present invention coding fusion is solved
Code, complete output display.The system in certain embodiments, is added between bus bridge and display controller, and bus bridge is by color
Deep data are sent to decoder module, are screened by address, contrast after the color depth data are common color depth, or encoded fusion
Reservation color depth;If common color depth, decoded by identical mode in the prior art, then output display controls;
If retaining color depth, first, the encoded radio retained in color depth is read(cnt), according to encoded radio in the Tracing Control of buffering
Increase corresponding color depth number, then, by the pixel value of the reservation color depth(pdata)Newly-increased color depth all is assigned to, is reduced
Multiple equal color depths.
The present invention in storage, has saved spatial cache by the way that the color depth of identical pigment value is carried out into fusion coding;Passing
On defeated, the demand of bus bandwidth is saved;In total system aspect, system power dissipation is reduced.
Unless otherwise specific statement, term such as handle, calculate, computing, determination, display etc. can refer to it is one or more
Individual processing or action and/or the process of computing system or similar devices, the action and/or process will be indicated as processing system
The data manipulation of physics (such as electronics) amount in the register or memory of system and it is converted into and is similarly represented as processing system
Memory, other data of the register either storage of other this type of informations, transmitting or physical quantity in display device.Information
It can be represented with signal using any one of a variety of different technologies and method.For example, in above description
Data, instruction, order, information, signal, bit, symbol and the chip referred to can use voltage, electric current, electromagnetic wave, magnetic field or grain
Son, light field or particle or its any combination represent.
It should be understood that the particular order or level of the step of during disclosed are the examples of illustrative methods.Based on setting
Count preference, it should be appreciated that during the step of particular order or level can be in the feelings for the protection domain for not departing from the disclosure
Rearranged under condition.Appended claim to a method gives the key element of various steps with exemplary order, and not
It is to be limited to described particular order or level.
In above-mentioned detailed description, various features combine in single embodiment together, to simplify the disclosure.No
This open method should be construed to reflect such intention, i.e. the embodiment of theme claimed needs to compare
The more features of feature clearly stated in each claim.On the contrary, as appended claims is reflected
Like that, the present invention is in the state fewer than whole features of disclosed single embodiment.Therefore, appended claims
It is hereby expressly incorporated into detailed description, wherein each claim is alone as the single preferred embodiment of the present invention.
It should also be appreciated by one skilled in the art that the various illustrative boxes described with reference to the embodiments herein, mould
Block, circuit and algorithm steps can be implemented as electronic hardware, computer software or its combination.In order to clearly demonstrate hardware and
Interchangeability between software, various illustrative part, frame, module, circuit and steps are carried out around its function above
It is generally described.Hardware is implemented as this function and is also implemented as software, depending on specific application and to whole
The design constraint that system is applied.Those skilled in the art can be directed to each application-specific, be realized in a manner of flexible
Described function, it is still, this to realize that decision-making should not be construed as the protection domain away from the disclosure.
For performing the general processor, digital signal processor (DSP), application specific integrated circuit of herein described function
(ASIC), field programmable gate array (FPGA) or other PLDs, discrete gate or transistor logic, discrete hard
Part component or its any combination, it is possible to achieve or various illustrative boxes of the execution with reference to described by the embodiments herein
Figure, module and circuit.General processor can be microprocessor, or, the processor can also be any conventional processor,
Controller, microcontroller or state machine.Processor may also be embodied as the combination of computing device, for example, DSP and microprocessor
Combination, the combination of multi-microprocessor, one or more microprocessors and DSP core, or any other such structure.
The step of method or algorithm with reference to described by the embodiments herein, can be embodied directly in hardware, be held by processor
Capable software module or its combination.Software module can be located at RAM memory, flash memory, ROM memory, eprom memory,
The storage of eeprom memory, register, hard disk, mobile disk, CD-ROM or any other form well known in the art is situated between
In matter.A kind of exemplary storage medium is connected to processor, so as to enable a processor to from the read information, and
Information can be write to the storage medium.Certainly, storage medium can also be the part of processor.Processor and storage medium
It can be located in ASIC.The ASIC can be located in user terminal.Certainly, processor and storage medium can also be used as discrete sets
Part is present in user terminal.
To enable any technical staff in the art to realize or using the present invention, disclosed embodiment being entered above
Description is gone.To those skilled in the art;The various modification modes of these embodiments will be apparent from, and this
The General Principle of text definition can also be applied to other embodiments on the basis of the spirit and scope of the disclosure is not departed from.
Therefore, the disclosure is not limited to embodiments set forth herein, but most wide with principle disclosed in the present application and novel features
Scope is consistent.
Realized for software, technology described in this application can use the module for performing herein described function (for example, mistake
Journey, function etc.) realize.These software codes can be stored in memory cell and by computing device.Memory cell can
With realize in processor, can also realize outside processor, in the latter case, it via various means by correspondence
It is coupled to processor, these are all well known in the art.
Moreover, various aspects or features described herein can be as the programming using standard and/or engineering technology
Method, apparatus or product realize.Term as used herein " product " is that to include can be from any computer-readable
Equipment, carrier wave or medium are come the computer program that accesses.For example, computer-readable medium can include but is not limited to magnetic storage
Equipment (for example, hard disk, floppy disk, tape etc.), CD (for example, compact discs (CD), digital versatile disc (DVD) etc.), intelligence
Card and flash memory device (for example, EPROM, card, rod, Keyed actuator etc.).In addition, various storage media described herein
It is expressed as one or more equipment for storage information and/or other machine readable medias.Term " machine readable media " wraps
Include but be not limited to store, include and/or carry wireless channel and the various other media of instruction and/or data.
Described above includes the citing of one or more embodiments.Certainly, in order to above-described embodiment is described and description portion
The all possible combination of part or method is impossible, but it will be appreciated by one of ordinary skill in the art that each implementation
Example can do further combinations and permutations.Therefore, embodiment described herein is intended to fall into appended claims
Protection domain in all such changes, modifications and variations.In addition, with regard to the term used in specification or claims
"comprising", the mode that covers of the word are similar to term " comprising ", just as " including " solved in the claims as link word
As releasing.In addition, the use of any one term "or" in the specification of claims is to represent " non-exclusionism
Or ".