CN101090449A - Color space changover method and its device - Google Patents

Color space changover method and its device Download PDF

Info

Publication number
CN101090449A
CN101090449A CN 200710126771 CN200710126771A CN101090449A CN 101090449 A CN101090449 A CN 101090449A CN 200710126771 CN200710126771 CN 200710126771 CN 200710126771 A CN200710126771 A CN 200710126771A CN 101090449 A CN101090449 A CN 101090449A
Authority
CN
China
Prior art keywords
look
color space
color
component
color component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200710126771
Other languages
Chinese (zh)
Other versions
CN100546336C (en
Inventor
罗翔鲲
季渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2007101267715A priority Critical patent/CN100546336C/en
Publication of CN101090449A publication Critical patent/CN101090449A/en
Application granted granted Critical
Publication of CN100546336C publication Critical patent/CN100546336C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

This invention discloses a color space conversion method and a device, which applies a lookup list plus an adder to replace a multiplier to realize matrix multiplication needed by color space conversion and divides color components of the first color space into several slices, slices at the corresponding positions form a set and bit in the set is taken as the lookup input, in which, the set can be dealt in series and a same list can be looked up and the lookup result is shift and then sum, or different lists are looked up for different segment sets then sums the results.

Description

Color space changover method and device thereof
Technical field
The present invention relates to the signal processing field, particularly the color space switch technology.
Background technology
The method for expressing of coloured image has multiple mode, as can redness (R), green (G) and blueness (B) by different proportion combining, and the famous principle of three primary colours that Here it is, the method for this expression coloured image is the RGB color space.Brightness (Y) and the color difference signal (C by different proportion and for example R, C B) the expression coloured image, the method for this expression coloured image is based on YC RC BThe color space.
Use and display device usually the RGB color space, as display.YC RC BAn advantage of color space is: because human eye is low more than the resolution capability to luminance detail to the resolution capability of colour detail, therefore can carry out sub sampling to color difference signal, to reduce the needed memory capacity of digital color image and to be reduced in data traffic in the data transmission procedure.Based on YC RC BThe advantage of color space, YC RC BThe color space is applied to the storage of image usually.
Because for display device such as display, use be the RGB color space, and the coloured image of storage uses YC usually RC BThe color space represents, therefore must be with YC when needing to show the coloured image of storing RC BThe coloured image of color space representation is converted to the coloured image of RGB color space representation.
According to ITU-R BT.601 standard, YC RC BThe color space to the conversion formula of RGB color space as the formula (1).
Y C R C B = 0.299 0.587 0.114 0.500 - 0.419 - 0.081 - 0.169 - 0.331 0.500 · R G B - - - ( 1 )
In ITU-R BT.601 standard code, for 4:2:2 sub sampling form, the span that quantizes the back brightness signal Y is 16~235, only occupies 220 values; Being exactly black when brightness is 16, is 235 o'clock to be exactly white.Quantize back color difference signal C R, C BSpan be 16~240.
According to ITU-R BT.601 standard, formula (1) is done matrixing can obtain the RGB color space to YC RC BThe conversion formula of color space, as the formula (2).
R G B = 1.164 0 1.596 1.164 - 0.391 - 0.813 1.164 2.018 0 · Y C B C R + - 222.912 135.488 - 276.428 - - - ( 2 )
The span of each component of RGB all is 0~255, and if the result that actual operation obtains is greater than 255, and then value 255; If less than 0, then value 0.
If Y, C R, C BSpan uphold 0~255, then corresponding conversion formula is as the formula (3).
R G B = 1 0 1.402 1 - 0.344 - 0.714 1 1.772 0 · Y C B C R + - 178.755 134.895 - 225.93 - - - ( 3 )
Because formula (2) and formula (3) all are matrix multiplications, traditional implementation method (prior art one) is to come computing that realization matrix multiplies each other by the employing multiplier.This multiplier is imported Y, C at the input side of multiplier as shown in Figure 1 R, C B, the Y that is imported, C R, C BObtain R, G, B result with multiplication, export from opposite side.
Yet, the present inventor finds, there is floating number in the matrix of above-mentioned conversion formula, need to use the floating number multiplier, floating number multiplier architecture complexity, area was big when chip was realized, and the computation complexity height causes power consumption bigger at application-specific integrated circuit (ASIC) (Application SpecifiedIntegrated Circuit is called for short " ASIC ").
Perhaps, also can adopt adder to realize the matrix multiplication shown in the formula (2) and (3).Promptly use the displacement adder to replace the multiplier that uses in the prior art one.Concrete substitute mode is: the floating-point coefficient in formula (2) and the formula (3) is carried out conversion, use mark of equal value to replace, can be equivalent to formula (4) suc as formula 1.164 in (2):
1.164 ≈ 1 + 1 8 + 1 32 + 1 256 + 1 256 - - - ( 4 )
By using mark of equal value to substitute all floating numbers in the matrix,, can realize the replacement of multiplication and displacement addition as the mark substitution coefficient 1.164 of equal sign right half part in the use formula (4).
Yet, the present inventor finds, since in prior art two, need with floating number be split as mark of equal value and, and in the method for expressing of this equivalence, make the similarity of equal sign the right and left high more, promptly mark and high more with the precision of floating number coupling, with item must be many more, the number of times of displacement addition is many equally more, and computation complexity is high more, and power consumption is big more.And and item is many, and the adder that adopts parallel addition to realize is just many, and area has also just increased.And to reduce the area of computation complexity and adder, just need to reduce and, reduce and, the precision of just having to reduce.As seen, computation complexity and precision can't be satisfactory to both parties.
Summary of the invention
The technical problem underlying that embodiment of the present invention will solve provides a kind of color space changover method and device thereof, can reduce computation complexity under the condition that keeps degree of precision when making the color space conversion.
For solving the problems of the technologies described above, embodiments of the present invention provide a kind of color space changover method, and each color component of first color space is divided into M fragment, and each fragment comprises at least one bit, comprises following steps:
With the synthetic slice groups of the slice groups of correspondence position in each color component of first color space, obtain M slice groups altogether respectively;
Table look-up according to the value of each slice groups respectively, obtain M group checking result altogether, comprise X value in every group of checking result, correspond respectively to second a color space X color component;
M is organized in the checking result corresponding to the value addition of the same color component of second color space, obtain X transformation result, correspond respectively to second a color space X color component; Wherein M, X are positive integer.
Embodiments of the present invention also provide a kind of color space conversion apparatus, and each color component of first color space is divided into M fragment, and each fragment comprises at least one bit, and device comprises:
Look-up table, be used for tabling look-up according to input, this input is the slice groups that the fragment combination of correspondence position in each color component of first color space forms, and exports one group of checking result, comprising X value, each value corresponds respectively to second a color space X color component; Total M slice groups, each slice groups is input to look-up table respectively and handles, and obtains M group checking result altogether;
Adder is used for M is organized the value addition of checking result corresponding to the same color component of second color space, obtains X transformation result, corresponds respectively to second a color space X color component;
Wherein M, X are positive integer.
Embodiment of the present invention compared with prior art, the main distinction and effect thereof are:
Required matrix multiplication when embodiment of the present invention adopts look-up table and adder to substitute multiplier to have realized the color space conversion, look-up table and adder chip area when realizing is less, reduced the big problem of chip area that the use because of multiplier causes effectively, reduced computation complexity and reduced power consumption.Because look-up table is to calculate in advance, when calculating in advance, can use very high precision to carry out floating-point multiplication and add operation, so the look-up table that obtains at last has higher precision; And prior art is to carry out floating-point multiplication and add operation in real time, in order to reach balance between computation complexity and precision, can only carry out floating-point multiplication and add operation with lower precision, so the precision of final result is not as the present invention.
Description of drawings
Fig. 1 is a color space conversion apparatus schematic diagram in the prior art;
Fig. 2 is the color space changover method flow chart according to first embodiment of the invention;
Fig. 3 is the color space conversion apparatus schematic diagram according to first embodiment of the invention;
Fig. 4 is the color space changover method flow chart according to second embodiment of the invention;
Fig. 5 is the color space conversion apparatus schematic diagram according to second embodiment of the invention;
Fig. 6 is the structure chart according to first look-up table of second embodiment of the invention;
Fig. 7 is the structure chart according to the second look-up table of second embodiment of the invention;
Fig. 8 is the structure chart according to the 3rd look-up table of second embodiment of the invention;
Fig. 9 is the structure chart according to the 4th look-up table of second embodiment of the invention;
Figure 10 is the computed in software flow chart of searching list item corresponding to components R according to second embodiment of the invention;
Figure 11 is the computed in software flow chart of searching list item corresponding to component G according to second embodiment of the invention;
Figure 12 is the computed in software flow chart of searching list item corresponding to component B according to second embodiment of the invention;
Figure 13 is the conversion equipment schematic diagram that comprises two groups of look-up tables and adder according to second embodiment of the invention;
Figure 14 is first kind of color space conversion apparatus structural representation according to third embodiment of the invention;
Figure 15 is second kind of color space conversion apparatus structural representation according to third embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make embodiment of the present invention is clearer, embodiments of the present invention are described in further detail below in conjunction with accompanying drawing.
First embodiment of the invention relates to a kind of color space changover method, is used for first color space is converted to second color space, and wherein, first color space is YC RC BColor space, second color space is a rgb color space, the value of each color component can be through extension or without the value of upholding.
Following elder generation describes the theoretical foundation of present embodiment.In the prior art, can realize YC according to formula (2) or formula (3) RC BColor space is done some conversion to (2) and formula (3) in the present embodiment to the conversion of rgb color space, and to obtain the color space conversion formula of present embodiment, change procedure is described below:
At first, formula (2) or (3) are expressed as
y ( n ) = Σ k = 1 3 A k x k ( n ) + C - - - ( 5 )
Wherein, the y (n) in the formula (5) is set { R, G, n element among the B}, n=1,2,3 (corresponding R, G, B).
x k(n) be input variable set { Y, the C of corresponding y (n) R, C BIn k element, k=1,2,3 (corresponding Y, C R, C B).
A kBe k weight factor of input variable, it is a constant.
Then, with x k(n) be expressed as binary form, it expresses as the formula (6) (because the derivation here relates to n, n can be omitted), wherein, and x KbBe x under the binary form k(n) bit of b position in, its value only are 0 or 1.
x k = Σ b = 0 7 x kb 2 b - - - ( 6 )
Derivation afterwards no longer needs markers n.Formula (6) substitution (5) is obtained:
y = Σ k = 1 3 A k Σ b = 0 7 x kb 2 b + C = Σ k = 1 3 Σ b = 0 7 x kb · A k 2 b + C
= Σ b = 0 7 ( Σ k = 1 3 x kb · A k ) 2 b + C - - - ( 7 )
By formula (7) as can be seen
Figure A20071012677100105
Be 3 input variable x k(Y, C R, C B) b bit and constant A kAll bit step-by-steps with the operation after do the arithmetic add operation.This shows that formula (7) can be constructed by the computing of a non-multiplication structure.Specifically, can precompute x KbVarious combination gained and the value, be stored in random access memory (Random Access Memory, be called for short " RAM ") or read-only memory (Read Only Memory, be called for short " ROM ") in, or by combinational logic realization table lookup function, table look-at draws the calculated product sum during calculating, does then and value adds up.Whole thus calculating operation is for to be made of addition and shifting function.
Formula (7) can further be transformed to,
y = Σ b = 0 7 ( Σ k = 1 3 x kb · A k ) 2 b + C = Σ b = 0 7 [ ( Σ k = 1 3 x kb · A k ) + C 255 ] 2 b - - - ( 8 )
Thus, when realizing, reduces by hardware the needed adder of additive constant C than formula (7), in the formula (8)
Figure A20071012677100112
Can precompute, because the human eye resolution capability allows certain error, present embodiment constitutes look-up table with the floating point result fixed point that precomputes, and guarantees to realize that error only for ± 1, improves the precision of conversion.
Below the flow path switch of realizing according to formula (8) is specifically described, in this flow process, each color component of YCRCB color space is divided into M fragment, and each fragment comprises a bit, comprises following key step:
(1) respectively with YC RC BThe synthetic slice groups of the slice groups of correspondence position obtains M slice groups altogether in each color component of color space;
(2) table look-up according to the value of each slice groups respectively, obtain M group checking result altogether, comprise 3 values in every group of checking result, correspond respectively to 3 color components of rgb color space;
(3) according to the fragment in each slice groups at YC RC BPosition in the color space color component is shifted respectively to 3 values in the checking result of this slice groups;
(4) will obtain 3 transformation results corresponding to the value addition of the same color component of rgb color space in the M of shifting processing group checking result, correspond respectively to 3 color components of rgb color space.
In order to accelerate conversion speed, reduce shifting function, in the present embodiment 4 steps of above-mentioned steps are overlapped and carry out, be about to import, table look-up, be shifted overlap and carry out, as shown in Figure 2 with add operation mutually.
Specifically, at first respectively with YC RC BThe slice groups of correspondence position obtains M slice groups altogether as a slice groups in each color component of color space, and M can be YC in the present embodiment RC BThe bit number of each color component of color space, each fragment only comprises 1 bit like this.Below with YC RC BEach color component of color space all is that 8 bits are that example is specifically described.
Because YC in the present embodiment RC BEach color component of color space is 8 bits, and can establish the Y component is a 0a 1a 2a 3a 4a 5a 6a 7, C RComponent is b 0b 1b 2b 3b 4b 5b 6b 7, C BComponent is c 0c 1c 2c 3c 4c 5c 6c 7, respectively with Y component, C RComponent, C BThe fragment a of correspondence position in the component 0, b 0, c 0a 1, b 1, c 1A 7, b 7, c 7Be combined into a slice groups, obtain 8 slice groups altogether.Y, C in the present embodiment R, C BThree components are the serial input, and as shown in Figure 3, in the process of serial input, bit of three every inputs of component can be formed a slice groups.
In step 201,, import Y, C successively respectively according to the order of big-endian R, C BA bit of component is formed a slice groups.Input is highest order (the 7th 's) bit first.
Then, enter step 202, table look-up, obtain one group of checking result, comprise 3 values in this checking result, correspond respectively to 3 color components of rgb color space according to the value of the slice groups of being imported in the step 201.
Wherein, this look-up table comprises slice groups 8 (2 3) plant possible values and multiply each other again and constant with coefficient matrix earlier
Figure A20071012677100121
The result of addition promptly calculates all possible Its result is stored in searches
In the table.Because look-up table is to calculate in advance, when calculating in advance, can use very high precision, realize and the loss of significance of introducing so in transformation flow, removed floating point multiplication addition calculating fixed point, obtained higher precision property.Only comprise a look-up table in the present embodiment, as shown in Figure 3,8 slice groups that each component serial input back forms are searched this table successively according to the priority of input.
Then, enter step 203, with 3 values in the checking result of this slice groups (being the checking result of epicycle) respectively with 3 value additions of last round of displacement back (step 205), obtain the end value after 3 additions of epicycle.First slice groups (is a 7b 7c 7) checking result 3 values respectively with 0 addition.
Then, enter step 204, judge whether input finishes, and whether the slice groups of promptly current participation addition is last slice groups, if then enter step 206, with the output of the end value after 3 additions of epicycle, as 3 components of rgb color space; Otherwise then enter step 205.
In step 205, the end value after 3 additions of epicycle is shifted respectively, move to left one respectively.Then enter step 201, carry out input, finding, addition and the displacement of next round, 3 end values that obtain after the displacement of the step 205 of epicycle participate in the addition step (step 203) of next rounds, promptly with the lookup result of next round in 3 value additions respectively.
Such as, import YC first RC BThe 7th bit a of 3 components of color space 7, b 7And c 7, form a slice groups a 7b 7c 7, to table look-up according to the value of this slice groups, the checking result that obtains comprises 3 value Y 7, C R7And C B7, because input first, these 3 values can only be respectively and 0 addition, because input finishes, so the result after the addition moves to left 1; Then carry out the input of next round, input YC RC BThe 6th bit a of 3 components of color space 6, b 6And c 6, form a slice groups a 6b 6c 6, to table look-up according to the value of this slice groups, the checking result that obtains comprises 3 value Y 6, C R6And C B6, with these 3 values respectively with move to left after Y 7, C R7And C B7Addition obtains 3 end values, because input does not finish, therefore respectively these 3 end values is moved to left 1, and carries out input, finding, addition and the displacement of next round; Next round input YC RC BThe 5th bit a of 3 components of color space 5, b 5And c 5, form a slice groups a 5b 5c 5, to table look-up according to the value of this slice groups, the checking result that obtains comprises 3 value Y 5, C R5And C B5, (3 end values after these 3 values are moved to left with previous round respectively promptly move to left 2 Y 7With move to left 1 Y 6And, 2 C moves to left R7With move to left 1 C R6And, 2 C moves to left B7With move to left 1 C B6And) addition, obtain 3 end values, same therefore respectively these 3 end values moved to left 1, and carry out input, finding, addition and the displacement of next round because input finishes, up to importing last bit respectively, form slice groups a 0b 0c 0, with slice groups a 0b 0c 0Checking result Y 5, C R5And C B5With last round of 3 shift result values addition, the result who obtains is as 3 components of rgb color space.
In the present embodiment, can also the result of step 206 output be rounded off, finally obtain the transformation result of 3 color components of rgb color space.The span of each component of RGB all is 0~255, and 3 transformation results that addition is obtained round off and are: the result that addition is obtained judges that if greater than 255, then value 255; If less than 0, then value 0.
As seen, required matrix multiplication when present embodiment has realized the color space conversion by adopting look-up table and adder to substitute multiplier, because look-up table and adder chip area when realizing is less, thereby can reduce the big problem of chip area that the use because of multiplier causes effectively, reduce computation complexity and reduced power consumption.
And present embodiment is undertaken by addition and displacement are overlapped, and can significantly reduce the number of times of displacement, reduces the energy consumption of equipment and changes the required time.With above-mentioned YC RC BEach color component of color space all is that 8 bits are example, if earlier according to the fragment in each slice groups at YC RC BPosition in the color space color component is shifted respectively to 3 values in the checking result of this slice groups, the results added after will being shifted again, and then for the component of 8 bit lengths, a 7b 7c 7Corresponding checking result Y 7, C R7, C B7Need move to left respectively 7 times; a 6b 6c 6Corresponding checking result Y 6, C R6, C B6Need move to left respectively 6 times; Y 5, C R5, C B5Need move to left respectively 5 times; 1 the operation of need carrying out altogether moving to left for 63 times, and in the present embodiment, by addition and displacement overlapping are carried out, 1 the operation of only need carrying out altogether moving to left for 21 times, when reducing chip area, reducing computation complexity, significantly reduce the number of times of displacement, reduce the energy consumption of equipment and change the required time.
Among Fig. 3, only need one 3 input look-up table (LUT), 3 adders and 3 shift units can realize YC RC BThe conversion of color space and rgb color space, be applicable to area requirements little, in the not high application of rate request.The shortcoming that adopts the input of 1 Bits Serial is to need the number of times of more execution cycle and addition still more, and power consumption is still bigger, for example at Y, C R, C BBe under the situation of 8 bits, need 8 clock cycle inputs to table look-up, obtain 8 groups of checking result (every group of lookup result comprises 3 values of corresponding 3 components), each component all needs 7 displacement additions can obtain final value.
Present embodiment is with YC RC BIt is example that each color component of color space is 8 bits, to YC RC BThe transfer process of color space and rgb color space is illustrated, and in actual applications, each color component also can be other length, and as 16 bits, no matter how many bit lengths is, all can realize conversion by present embodiment.
Second embodiment of the invention relates to a kind of color space changover method, the difference of the present embodiment and first execution mode is, in the first embodiment, and to each slice groups serial process, each slice groups is looked into same table successively, summation again after checking result is shifted; Because serial process only needs a look-up table, implements the simplest.And in the present embodiment, to each slice groups parallel processing, different slice groups is looked into different tables, checking result is sued for peace again; Parallel processing makes can finish conversion in a clock cycle, obtain higher throughput.
In the present embodiment, first color space of changing is YC equally RC BSpace, second color space are rgb space equally, and two each color components of color space all are 8 bits, and two color spaces all have 3 color components.In the present embodiment, YC RC BEach color component of color space is divided into 4 fragments, 2 bits of each fragment bag.
Following elder generation describes the theoretical foundation of present embodiment.Need in the present embodiment formula (8) is carried out conversion, obtain: y ≈ Σ b = 0 7 [ ( Σ k = 1 3 x kb x k ( b + 1 ) · A k ) + C 85 ] 2 b , ( b = 0,2,4,6 ) - - - ( 9 )
X in the formula (9) Kbx K (b+1)B position and b+1 bit for input variable.
The concrete flow path switch of realizing according to formula (9) as shown in Figure 4.In step 401, respectively with YC RC BThe synthetic slice groups of the slice groups of correspondence position obtains 4 slice groups altogether in each color component of color space.
Specifically, first fragment is the 0th and the 1st of color component, by YC RC BThe slice groups 1 that first fragment is formed in each color component of color space comprises Y component, C RComponent, C BThe the 0th and the 1st of component (be called for short Y[1:0], C R[1:0], C B[1:0]); Second fragment is the 2nd and the 3rd of color component, by YC RC BThe slice groups 2 that second fragment is formed in each color component of color space comprises Y component, C RComponent, C BThe the 2nd and the 3rd of component (be called for short Y[3:2], C R[3:2], C B[3:2]); The 3rd fragment is the 4th and the 5th of color component, by YC RC BThe slice groups 3 that the 3rd fragment is formed in each color component of color space comprises Y component, C RComponent, C BThe the 4th and the 5th of component (be called for short Y[5:4], C R[5:4], C B[5:4]); The 4th fragment is the 6th and the 7th of color component, by YC RC BThe slice groups 4 that the 3rd fragment is formed in each color component of color space comprises Y component, C RComponent, C BThe the 6th and the 7th of component (be called for short Y[7:6], C R[7:6], C B[7:6]), as shown in Figure 5.
In step 402,4 slice groups use 4 different look-up tables to carry out table lookup operation respectively, obtain 4 groups of checking result, comprise 3 values in every group of checking result, correspond respectively to 3 color components of rgb color space.
Specifically, slice groups 1 is used first look-up table that is output as 5 bits; Slice groups 2 is used the second look-up table that is output as 7 bits; Slice groups 3 is used the 3rd look-up table that is output as 9 bits; Slice groups 4 is used the 4th look-up table that is output as 11 bits, as shown in Figure 5.
The output valve of searching item corresponding to the individual color component of rgb color space L (L is 1 or 2 or 3) in N look-up table (N is 1,2,3,4) is
Figure A20071012677100161
X wherein Kbx K (b+1)Be YC RC BColor space k (k is 1 or 2 or 3) individual color component b and b+1 bit, A kWith C is to change the constant that relates to.
Respectively each look-up table is described below.
The structure of the first look-up table LUT1 as shown in Figure 6.
LUT1 is input as YC RC BY component, C in the color space RComponent and C BThe the 1st and the 0th bit of component, obtain checking result lut_r0_0[4:0 by three sub-look-up tables that are respectively 16X5 bit, 64X5 bit and 16X5 bit], lut_g0_o[4:0], lut_b0_o[4:0], as the output of R, G, B result's the 0th component.
According in formula (2) or (3) with Y, C R, C BThe matrix parameter that component multiplies each other can be found out, comprises 20 elements in this matrix parameter, thereby in three sub-look-up tables, a sub-look-up table can need not to import C RThe the 1st and the 0th bit of component (is called for short C R[1:0]), only according to Y[1:0] and C B[1:0] obtains checking result; A sub-look-up table (the sub-look-up table of 16X5 bit) can need not to import C B[1:0] is only according to Y[1:0] and C R[1:0] obtains checking result.Above-mentioned two sub-look-up tables are owing to have only two inputs (4 bit), thereby comprise 16 possible results (being the sub-look-up table of 1 6X5 bit); Another sub-look-up table is owing to exist three inputs (6 bit), thereby comprises 64 possible results (being the sub-look-up table of 64X5 bit).The output of above-mentioned 3 sub-look-up tables is 5 bits.
Being calculated as follows of each list item in the sub-look-up table (being possible result).
Y, C in input R, C BComponent is without under the situation about upholding, i.e. Y, C R, C BSpan do not uphold under 0~255 the situation from 16~240, can obtain list item calculating formula (10), (11) and (12) of each sub-look-up table among the LUT1 by formula (2) and formula (9):
lut _ r 0 _ o [ 4 : 0 ] = ( ( 1.164 × Y [ 1 : 0 ] + 1.596 × C R [ 1 : 0 ] ) × 256 + ( - 222.912 ) × 256 85 ) > > 7 - - - ( 10 )
lut _ g 0 _ o [ 4 : 0 ] = ( ( 1.164 × Y [ 1 : 0 ] + ( - 0.391 ) × C B [ 1 : 0 ] + ( - 0.813 ) × C R [ 1 : 0 ] ) × 256
+ ( 135.488 ) × 256 85 ) > > 7 - - - ( 11 )
lut _ b 0 _ o [ 4 : 0 ] = ( ( 1.164 × Y [ 1 : 0 ] + 2.018 × C B [ 1 : 0 ] ) × 256 + ( - 276 . 428 ) × 256 85 ) > > 7 - - - ( 12 )
And the Y, the C that import R, C BThe span of component is upheld under 0~255 the situation, can be obtained list item calculating formula (13), (14) and (15) of each sub-look-up table of LUT1 by formula (3) and formula (9):
lut _ r 0 _ o [ 4 : 0 ] = ( ( 1 × Y [ 1 : 0 ] + 1.402 × C R [ 1 : 0 ] ) × 256 + ( - 178.755 ) × 256 85 ) > > 7 - - - ( 13 )
lut _ g 0 _ o [ 4 : 0 ] = ( ( 1 × Y [ 1 : 0 ] + ( 0.344 ) × C B [ 1 : 0 ] + ( - 0.714 ) × C R [ 1 : 0 ] ) × 256
+ ( 134.895 ) × 256 85 ) > > 7 - - - ( 14 )
lut _ b 0 _ o [ 4 : 0 ] = ( ( 1 × Y [ 1 : 0 ] + 1.772 × C B [ 1 : 0 ] ) × 256 + ( - 225.93 ) 85 ) > > 7 - - - ( 15 )
According to computing needs (only needing 5 bits to participate in computing), formula (10) is only got low 5 to the result of formula (15).
The structure of second look-up table LUT2 as shown in Figure 7.
LUT2 is input as YC RC BY component, C in the color space RComponent and C BThe the 3rd and the 2nd bit of component, obtain checking result lut_r1_0[6:0 by three sub-look-up tables that are respectively 16X7 bit, 64X7 bit and 16X7 bit], lut_g1_o[6:0], lut_b1_o[6:0], as the output of R, G, B result's the 1st component.
Equally, in above-mentioned three sub-look-up tables, a sub-look-up table (the sub-look-up table of 16X7 bit) can need not to import C R[3:2]), only according to Y[3:2] and C B[3:2] obtains checking result; A sub-look-up table can need not to import C B[3:2] is only according to Y[3:2] and C R[3:2] obtains checking result.Above-mentioned two sub-look-up tables are owing to have only two inputs (4 bit), thereby comprise 16 possible results (being the sub-look-up table of 16X7 bit); Another sub-look-up table is owing to exist three inputs (6 bit), thereby comprises 64 possible results (being the sub-look-up table of 64X7 bit).The output of above-mentioned 3 sub-look-up tables is 7 bits.
Being calculated as follows of each list item in the above-mentioned sub-look-up table.
Y, C in input R, C BComponent can be obtained list item calculating formula (16), (17) and (18) of each sub-look-up table among the LUT2 without under the situation about upholding by formula (2) and formula (9):
lut _ r 1 _ o [ 6 : 0 ] = ( ( 1.164 × Y [ 3 : 2 ] + 1.596 × C R [ 3 : 2 ] ) × 256 + ( - 222.912 ) × 256 85 ) > > 5 - - - ( 16 )
lut _ g 1 _ o [ 6 : 0 ] = ( ( 1.164 × Y [ 3 : 2 ] + ( - 0.391 ) × C B [ 3 : 2 ] + ( - 0.813 ) × C R [ 3 : 2 ] ) × 256
+ ( 135.488 ) × 256 85 ) > > 5 - - - ( 17 )
lut _ b 1 _ o [ 6 : 0 ] = ( ( 1.164 × Y [ 3 : 2 ] + 2.018 × C B [ 3 : 2 ] ) × 256 + ( - 276.428 ) × 256 85 ) > > 5 - - - ( 18 )
And the Y, the C that import R, C BThe span of component is upheld under 0~255 the situation, can be obtained list item calculating formula (19), (20) and (21) of each sub-look-up table of LUT2 by formula (3) and formula (9):
lut _ r 1 _ o [ 6 : 0 ] = ( ( 1 × Y [ 3 : 2 ] + 1.402 × C R [ 3 : 2 ] ) × 256 + ( - 178.755 ) × 256 85 ) > > 5 - - - ( 19 )
lut _ g 1 _ o [ 6 : 0 ] = ( ( 1 × Y [ 3 : 2 ] + ( - 0.344 ) × C B [ 3 : 2 ] + ( - 0.714 ) × C R [ 3 : 2 ] ) × 256
+ ( 134.895 ) × 256 85 ) > > 5 - - - ( 20 )
lut _ b 1 _ o [ 6 : 0 ] = ( ( 1 × Y [ 3 : 2 ] + 1.772 × C B [ 3 : 2 ] ) × 256 + ( - 225.93 ) × 256 85 ) > > 5 - - - ( 21 )
According to computing needs (only needing 7 bits to participate in computing), formula (16) is only got low 7 to the result of formula (21).
The structure of the 3rd look-up table LUT3 as shown in Figure 8.
LUT3 is input as YC RC BY component, C in the color space RComponent and C BThe the 5th and the 4th bit of component, obtain checking result lut_r2_0[8:0 by three sub-look-up tables that are respectively 16X9 bit, 64X9 bit and 16X9 bit], lut_g2_o[8:0], lut_b2_o[8:0], as the output of R, G, B result's the 2nd component.
Equally, in above-mentioned three sub-look-up tables, a sub-look-up table (the sub-look-up table of 16X9 bit) can need not to import C R[5:4]), only according to Y[5:4] and C B[5:4] obtains checking result; A sub-look-up table can need not to import C B[5:4] is only according to Y[5:4] and C R[5:4] obtains checking result.Above-mentioned two sub-look-up tables are owing to have only two inputs (4 bit), thereby comprise 16 possible results (being the sub-look-up table of 16X9 bit); Another sub-look-up table is owing to exist three inputs (6 bit), thereby comprises 64 possible results (being the sub-look-up table of 64X9 bit).The output of above-mentioned 3 sub-look-up tables is 9 bits.
Being calculated as follows of each list item in the above-mentioned sub-look-up table.
Y, C in input R, C BComponent can be obtained list item calculating formula (22), (23) and (24) of each sub-look-up table among the LUT3 without under the situation about upholding by formula (2) and formula (9):
lut _ r 2 _ o [ 8 : 0 ] = ( ( 1.164 × Y [ 5 : 4 ] + 1.596 × C R [ 5 : 4 ] ) × 256 + ( - 222.912 ) × 256 85 ) > > 3 - - - ( 22 )
lut _ g 2 _ o [ 8 : 0 ] = ( ( 1.164 × Y [ 5 : 4 ] + ( - 0.391 ) × C B [ 5 : 4 ] + ( 0.813 ) × C R [ 5 : 4 ] ) × 256
+ ( 135.488 ) × 256 85 ) > > 3 - - - ( 23 )
lut _ b 2 _ o [ 8 : 0 ] = ( ( 1.164 × Y [ 5 : 4 ] + 2.018 × C B [ 5 : 4 ] ) × 256 + ( - 276.428 ) × 256 85 ) > > 3 - - - ( 24 )
And the Y, the C that import R, C BThe span of component is upheld under 0~255 the situation, can be obtained list item calculating formula (25), (26) and (27) of each sub-look-up table of LUT3 by formula (3) and formula (9):
lut _ r 2 _ o [ 8 : 0 ] = ( ( 1 × Y [ 5 : 4 ] + 1.402 × C R [ 5 : 4 ] ) × 256 + ( - 178.755 ) × 256 85 ) > > 3 - - - ( 25 )
lut _ g 2 _ o [ 8 : 0 ] = ( ( 1 × Y [ 5 : 4 ] + ( - 0.344 ) × C B [ 5 : 4 ] + ( 0.714 ) × C R [ 5 : 4 ] ) × 256
+ ( 134.895 ) × 256 85 ) > > 3 - - - ( 26 )
lut _ b 2 _ o [ 8 : 0 ] = ( ( 1 × Y [ 5 : 4 ] + 1.722 × C B [ 5 : 4 ] ) × 256 + ( - 225.93 ) × 256 85 ) > > 3 - - - ( 27 )
According to computing needs (only needing 9 bits to participate in computing), formula (22) is only got low 9 to the result of formula (27).
The structure of the 4th look-up table LUT4 as shown in Figure 9.
LUT4 is input as YC RC BY component, C in the color space RComponent and C BThe the 7th and the 6th bit of component, obtain checking result lut_r3_0[10:0 by three sub-look-up tables that are respectively 16X11 bit, 64X11 bit and 16X11 bit], lut_g3_o[10:0], lut_b3_o[10:0], as the output of R, G, B result's the 3rd component.
Equally, in above-mentioned three sub-look-up tables, a sub-look-up table (the sub-look-up table of 16X11 bit) can need not to import C R[7:6]), only according to Y[7:6] and C B[7:6] obtains checking result; A sub-look-up table can need not to import C B[7:6] is only according to Y[7:6] and C R[7:6] obtains checking result.Above-mentioned two sub-look-up tables are owing to have only two inputs (4 bit), thereby comprise 16 possible results (being the sub-look-up table of 16X11 bit); Another sub-look-up table is owing to exist three inputs (6 bit), thereby comprises 64 possible results (being the sub-look-up table of 64X11 bit).The output of above-mentioned 3 sub-look-up tables is 11 bits.
Being calculated as follows of each list item in the above-mentioned sub-look-up table.
Y, C in input R, C BComponent can be obtained list item calculating formula (28), (29) and (30) of each sub-look-up table among the LUT4 without under the situation about upholding by formula (2) and formula (9):
lut _ r 3 _ o [ 10 : 0 ] = ( ( 1.164 × Y [ 7 : 6 ] + 1.596 × C R [ 7 : 6 ] ) × 256 + ( - 222.912 ) × 256 85 + 2 ) > > 1 - - - ( 28 )
lut _ g 3 _ o [ 10 : 0 ] = ( ( 1.164 × Y [ 7 : 6 ] + ( - 0.391 ) × C B [ 7 : 6 ] + ( - 0.813 ) × C R [ 7 : 6 ] ) × 256
+ ( 135.488 ) × 256 85 + 2 ) > > 1 - - - ( 29 )
lut _ b 3 _ o [ 10 : 0 ] = ( ( 1.164 × Y [ 7 : 6 ] + 2.018 × C B [ 7 : 6 ] ) × 256 + ( - 276.428 ) × 256 85 + 2 ) > > 1 - - - ( 30 )
And the Y, the C that import R, C BThe span of component is upheld under 0~255 the situation, can be obtained list item calculating formula (31), (32) and (33) of each sub-look-up table of LUT4 by formula (3) and formula (9):
lut _ r 3 _ o [ 10 : 0 ] = ( ( 1 × Y [ 7 : 6 ] + 1.402 × C R [ 7 : 6 ] ) × 256 + ( - 178.755 ) × 256 85 + 2 ) > > 1 - - - ( 31 )
lut _ g 3 _ o [ 10 : 0 ] = ( ( 1 × Y [ 7 : 6 ] + ( - 0.344 ) × C B [ 7 : 6 ] + ( - 0.714 ) × C R [ 7 : 6 ] ) × 256
+ ( 134.895 ) × 256 85 + 2 ) > > 1 - - - ( 32 )
lut _ b 3 _ o [ 10 : 0 ] = ( ( 1 × Y [ 7 : 6 ] + 1.772 × C B [ 7 : 6 ] ) × 256 + ( - 225.93 ) × 256 85 + 2 ) > > 1 - - - ( 33 )
According to computing needs (only needing 11 bits to participate in computing), formula (28) is only got low 11 to the result of formula (33).
In the present embodiment, the list item of LUT1, LUT2, LUT3, LUT4 all is to calculate in advance, that is to say that formula (16) all is to use the software realization and is kept in the look-up table software realization flow such as Figure 10, Figure 11 and shown in Figure 12 to the computational process of formula (33).Wherein, Figure 10 is the computed in software flow chart of searching list item corresponding to components R.Figure 11 is the computed in software flow chart of searching list item corresponding to component G.Figure 12 is the computed in software flow chart of searching list item corresponding to component B.
Map parameter A I, j(i=0,1,2; J=0,1,2) the constant coefficient matrix element in corresponding (2) or the formula (3) respectively.Y, C R, C BComponent is without parameters C under the situation about upholding 1Corresponding constant coefficient
Figure A20071012677100218
C 2
Corresponding constant coefficient
Figure A20071012677100219
C 3Corresponding constant coefficient
Figure A200710126771002110
Y, C R, C BComponent is through parameters C under the situation about upholding 1Corresponding constant coefficient
Figure A200710126771002111
C 2Corresponding constant coefficient C 3Corresponding constant coefficient
Figure A20071012677100221
C among the LUT4 1, C 2, C 3Adding 2 is in order to be used to do 5 processing of going into of 4 houses.
Specifically, the account form of the item of tabling look-up of components R as shown in figure 10, at first value and two of the possible Y component value with the 0th row the 0th row of the constant coefficient matrix in formula (2) or the formula (3) multiplies each other, again value and possible C that the 0th row the 2nd of this matrix is listed as RTwo of components multiply each other, and afterwards, with two multiplication result additions, and addition result are moved to right 8, result and parameters C after will moving to right at last 1Addition is made the item of tabling look-up that shift left operation can obtain components R with addition result.
The account form that of component G tables look-up as shown in figure 11, value and two of the possible Y component value with the 1st row the 0th row of the constant coefficient matrix in formula (2) or the formula (3) multiplies each other at first respectively, value and a possible C that the 1st row the 1st of this matrix is listed as BTwo of components multiply each other, with value and possible C of the 1st row the 2nd row of this matrix RTwo of components multiply each other, and afterwards, with three multiplication result additions, and addition result are moved to right 8, and result and parameters C at last will move to right 2Addition is made the item of tabling look-up that shift left operation can obtain component G with addition result.
The account form that of component B tables look-up as shown in figure 12, at first value and two of the possible Y component value with the 2nd row the 0th row of the constant coefficient matrix in formula (2) or the formula (3) multiplies each other, again value and possible C that the 2nd row the 1st of this matrix is listed as BTwo of components multiply each other, and afterwards, with two multiplication result additions, and addition result are moved to right 8, and result and parameters C at last will move to right 3Addition is made the item of tabling look-up that shift left operation can obtain component B with addition result.
After the end of tabling look-up, then, enter step 403, with in 4 groups of checking result corresponding to the value addition of the same color component of rgb color space, obtain 3 transformation results, correspond respectively to 3 color components of rgb color space,, get its least-significant byte as final RGB transformation result to the processing of rounding off respectively of 3 transformation results.
The addition of each component is shown in formula (34), (35), (36).
R=(lut_r3_o of the lut_r2_o+ sign bit expansion of the lut_r1_o+ sign bit expansion of the lut_r0_o+ sign bit expansion of sign bit expansion)>>1; (34)
G=(lut_g3_o of the lut_g2_o+ sign bit expansion of the lut_g1_o+ sign bit expansion of the lut_g0_o+ sign bit expansion of sign bit expansion)>>1; (35)
B=(lut_b3_o of the lut_b2_o+ sign bit expansion of the lut_b1_o+ sign bit expansion of the lut_b0_o+ sign bit expansion of sign bit expansion)>>1; (36)
Present embodiment is passed through each slice groups parallel processing, and different slice groups is looked into different tables, again to the checking result summation, makes and can finish conversion in a clock cycle, obtains higher throughput.In addition, for YC RC BEach color component of color space is the situation of 8 bits, each color component respectively can be divided into 4 fragments, each fragment 2 bit, handle with parallel mode, thereby between look-up table area and addition number of times, obtain balance preferably, make the area of look-up table less, the addition number of times is also less, reduced power consumption effectively.
And, since the additivity constant C that will relate in will changing in the present embodiment be integrated in the item of tabling look-up (suc as formula 8 and formula 9 shown in), in look-up table, realize, thereby reduced by a sub-addition, simplified calculating.Certainly, in actual applications, also can directly finish this flow path switch, be about to constant C and be integrated in the item of tabling look-up, and realize this conversion by adder of many employings according to formula (7).
Need to prove, because Y, C R, C BComponent exists through upholding and without upholding two kinds, in the present embodiment, one group of look-up table and adder can being set, according to Y, the C of input R, C BThe value of component is selected one group of corresponding formula; Two groups of look-up tables and adder can be set, one group of processing that is used for input through upholding, another group is used for the processing without the input of upholding, select the result of which group of output with a multiplexed selector, thereby can finish processing with same device, as shown in figure 13 to dissimilar inputs.Select to table look-up output by the extend_en signal, when extend_en equals 0, select not have the look-up table LUT that upholds to search and export, when extend_en equals 1, select look-up table LUT_extend to search and export through upholding.
What deserves to be mentioned is that present embodiment is with YC RC BEach color component of color space is 8 bits, and each color component respectively is divided into 4 fragments, and each fragment 2 bit is an example, specify, but this situation is an example, and present embodiment can be applied to YC equally RC BEach color component of color space is other number of bits, or the situation of each color component being carried out other division.
Look-up table in the present embodiment (LUT) is realized by combinational logic, also can use RAM or ROM storage to search this look-up table of realization in actual applications.
In addition, the first embodiment of the invention and second execution mode specify the input of 1 Bits Serial and two kinds of situations of 8 Bits Serial input (promptly parallel input), these two kinds of situations only are indivedual examples of the present invention, in an embodiment of the present invention, can be input as the basis with any serial of 1 to 8 equally and import conversion, as 2 Bits Serial input conversion, be about to 8 bits and be divided into 4 groups, per two bit serials input, parallel input between each group, or the like.Certainly the figure place of input is also not necessarily 8, can also be 16 etc.The mode and first or second execution mode of the conversion of input back are similar, do not repeat them here.
Third embodiment of the invention relates to a kind of color space conversion apparatus.In the present embodiment, each color component of first color space is divided into M fragment, and each fragment comprises at least one bit.This device comprises:
Look-up table, be used for tabling look-up according to input, this input is the slice groups that the fragment combination of correspondence position in each color component of first color space forms, and exports one group of checking result, this checking result comprises X value, and each value corresponds respectively to second a color space X color component; Total M slice groups, each slice groups is input to corresponding look-up table respectively and handles, and obtains M group checking result altogether;
Adder unit is used for M is organized the value addition of checking result corresponding to the same color component of second color space, obtains X transformation result, corresponds respectively to second a color space X color component; Wherein M, X are positive integer.
Required matrix multiplication when present embodiment adopts look-up table and adder unit to substitute multiplier to have realized the color space conversion, look-up table and adder unit chip area when realizing is less, reduced the big problem of chip area that the use because of multiplier causes effectively, reduced computation complexity and reduced power consumption.Because look-up table is to calculate in advance, realize and the loss of significance of introducing so in this device, removed floating point multiplication addition calculating fixed point, obtained higher precision property.
This look-up table realized by combinational logic, or searched by the RAM storage and to realize, or searched by the ROM storage and to realize.
In this device, above-mentioned adder unit has X, corresponds respectively to the addition process of a color component of second color space; Above-mentioned look-up table is one, is input to this look-up table with one in M the slice groups serially successively in the different clock cycle, and this look-up table outputs to X adder unit respectively with the value of the X in the checking result; This device also comprises X shift unit, and each shift unit and an adder unit are used in combination, and is used for the output result of this adder unit is shifted the back as the input of next clock cycle of this adder unit, as shown in figure 14.This device can be to each slice groups serial process, and each slice groups is looked into same table successively, summation again after checking result is shifted.Owing to only need a look-up table, implement the simplest.
Perhaps, in this device, above-mentioned look-up table has M, and M look-up table tabled look-up to M slice groups concurrently; Above-mentioned adder unit has X, comprises at least one adder in each adder unit, is used for the checking result of M look-up table output is carried out addition corresponding to the value of the same color component of second color space, as shown in figure 15.The device that carries out above-mentioned setting can be to each slice groups parallel processing, and different slice groups is looked into different tables, checking result is sued for peace again.Parallel processing can be finished conversion in a clock cycle, obtain higher throughput.
Because Y, C R, C BComponent exists through extension with without upholding two kinds, in the present embodiment, two groups of above-mentioned look-up tables and adder unit can be set in this device, first group of look-up table and adder unit are used to handle each color component of first color space through upholding, second group of look-up table and adder unit are used to handle each color component of first color space without upholding, and two groups of look-up tables and adder unit obtain input from same source; This device also road comprises a multiplexed selector, is used for selecting one group of output from two groups of look-up tables and adder unit, thereby can finishes processing to dissimilar inputs (comprise uphold and without two kinds of inputs of extension) with same device.
In sum, in embodiments of the present invention, required matrix multiplication when adopting look-up table and adder to substitute multiplier to have realized the color space conversion, look-up table and adder chip area when realizing is less, reduced the big problem of chip area that the use because of multiplier causes effectively, reduced computation complexity and reduced power consumption.Because look-up table is to calculate in advance, when calculating in advance, can use very high precision, realize and the loss of significance of introducing so in transformation flow, removed floating point multiplication addition calculating fixed point, obtained higher precision property.
Each color component of first color space is divided into several fragments, and the fragment combination of correspondence position becomes slice groups, and each bit in the slice groups is gone to table look-up as input.Can be to each slice groups serial process, each slice groups is looked into same table successively, summation again after checking result is shifted.Serial process only needs a look-up table, implements the simplest.Also can be to each slice groups parallel processing, different slice groups is looked into different tables, checking result is sued for peace again.Parallel processing can be finished conversion in a clock cycle, obtain higher throughput.
For each color component of first color space is the situation of 8 bits, each color component respectively can be divided into 4 fragments, each fragment 2 bit, handle with parallel mode, thereby between look-up table area and addition number of times, obtain balance preferably, make the area of look-up table less, the addition number of times is also less, reduced power consumption effectively.
For the additivity constant (as the constant C in the enforcement mode) that relates in the conversion, can in look-up table, realize, thereby reduce by a sub-addition, simplified calculating.
Two groups of look-up tables and adder can be set, one group of processing that is used for input through upholding, another group is used for the processing without the input of upholding, and selects to export the result of which group with a multiplexed selector, thereby can finish processing to dissimilar inputs with same device.
Though pass through with reference to some of the preferred embodiment of the invention, the present invention is illustrated and describes, but those of ordinary skill in the art should be understood that and can do various changes to it in the form and details, and without departing from the spirit and scope of the present invention.

Claims (12)

1. a color space changover method is characterized in that, each color component of first color space is divided into M fragment, and each fragment comprises at least one bit, comprises following steps:
With the synthetic slice groups of the slice groups of correspondence position in each color component of first color space, obtain M slice groups altogether respectively;
Table look-up according to the value of each slice groups respectively, obtain M group checking result altogether, comprise X value in every group of checking result, correspond respectively to second a color space X color component;
M is organized in the checking result corresponding to the value addition of the same color component of second color space, obtain X transformation result, correspond respectively to second a color space X color component; Wherein M, X are positive integer.
2. color space changover method according to claim 1 is characterized in that, in the described step of tabling look-up, different slice groups is looked into same table;
Before the step of described addition, also comprise following steps:
According to the position of the fragment in each slice groups in the first color space color component, X value in the checking result of this slice groups is shifted respectively;
In the step of described addition, will be in the M of shifting processing group checking result corresponding to the value addition of the same color component of second color space.
3. color space changover method according to claim 1 is characterized in that, in the described step of tabling look-up, M described slice groups uses M look-up table to carry out table lookup operation respectively.
4. color space changover method according to claim 3 is characterized in that, described first color space is YC RC BThe space, described second color space is a rgb space; Two each color components of color space all are 8 bits, and described X=3, described M are 4, and each fragment comprises 2 bits, and 4 slice groups use 4 different look-up tables to carry out described table lookup operation respectively;
First fragment is the 0th and the 1st of color component, uses first look-up table that is output as 5 bits;
Second fragment is the 2nd and the 3rd of color component, uses the second look-up table that is output as 7 bits;
The 3rd fragment is the 4th and the 5th of color component, uses the 3rd look-up table that is output as 9 bits;
The 4th fragment is the 6th and the 7th of color component, uses the 4th look-up table that is output as 11 bits.
5. color space changover method according to claim 4 is characterized in that,
The output valve of searching item corresponding to L color component of second color space in the described N look-up table is [ ( Σ k = 1 3 x kb x k ( b + 1 ) · A k ) + C 85 ] , X wherein Kbx K (b+1)Be k color component b of first color space and b+1 bit, A kWith C is to change the constant that relates to, 1≤L≤X, 1≤N≤4.
6. according to each described color space changover method in the claim 1 to 5, it is characterized in that described first color space is YC RC BSpace, the value of each color component are through extension or without the value of upholding.
7. according to each described color space changover method in the claim 1 to 5, it is characterized in that, also comprise following steps after the step of described addition:
X the transformation result that addition is obtained rounds off.
8. a color space conversion apparatus is characterized in that, each color component of first color space is divided into M fragment, and each fragment comprises at least one bit, and described device comprises:
Look-up table, be used for tabling look-up according to input, this input is the slice groups that the fragment combination of correspondence position in each color component of first color space forms, and exports one group of checking result, this checking result comprises X value, and each value corresponds respectively to second a color space X color component; Total M slice groups, each slice groups is input to described look-up table respectively and handles, and obtains M group checking result altogether;
Adder unit is used for M is organized the value addition of checking result corresponding to the same color component of second color space, obtains X transformation result, corresponds respectively to second a color space X color component;
Wherein M, X are positive integer.
9. color space conversion apparatus according to claim 8 is characterized in that, described look-up table realized by combinational logic, or is searched by random access memory stores and to realize, or is searched by the read-only memory storage and to realize.
10. color space conversion apparatus according to claim 8 is characterized in that, described adder unit has X, corresponds respectively to the addition process of a color component of second color space;
Described look-up table is one, is input to this look-up table with one in M the described slice groups successively in the different clock cycle, and this look-up table outputs to X described adder unit respectively with the value of the X in the checking result;
Described device also comprises X shift unit, and each shift unit and a described adder unit are used in combination, and is used for the output result of this adder unit is shifted the back as the input of next clock cycle of this adder unit.
11. color space conversion apparatus according to claim 8 is characterized in that, described look-up table has M, and M look-up table tabled look-up to a described M slice groups concurrently;
Described adder unit has X, comprises at least one adder in each adder unit, is used for the checking result of M described look-up table output is carried out addition corresponding to the value of the same color component of second color space.
12. color space conversion apparatus according to claim 8, it is characterized in that, described look-up table and adder unit have two groups, first group of look-up table and adder unit are used to handle each color component of first color space through upholding, second group of look-up table and adder unit are used to handle each color component of first color space without upholding, and two groups of look-up tables and adder unit obtain input from same source;
Described device also comprises a multiplexed selector, is used for selecting one group of output from two groups of look-up tables and adder unit.
CNB2007101267715A 2007-06-19 2007-06-19 Color space changover method and device thereof Active CN100546336C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101267715A CN100546336C (en) 2007-06-19 2007-06-19 Color space changover method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101267715A CN100546336C (en) 2007-06-19 2007-06-19 Color space changover method and device thereof

Publications (2)

Publication Number Publication Date
CN101090449A true CN101090449A (en) 2007-12-19
CN100546336C CN100546336C (en) 2009-09-30

Family

ID=38943593

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101267715A Active CN100546336C (en) 2007-06-19 2007-06-19 Color space changover method and device thereof

Country Status (1)

Country Link
CN (1) CN100546336C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118624A (en) * 2011-03-08 2011-07-06 天脉聚源(北京)传媒科技有限公司 Method for converting an image from an RGB color space to a YUV color space
WO2018126486A1 (en) * 2017-01-09 2018-07-12 中国科学院自动化研究所 Parallel video image contrast enhancing method and apparatus
WO2018126485A1 (en) * 2017-01-09 2018-07-12 中国科学院自动化研究所 Parallel image colour enhancing method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118624A (en) * 2011-03-08 2011-07-06 天脉聚源(北京)传媒科技有限公司 Method for converting an image from an RGB color space to a YUV color space
CN102118624B (en) * 2011-03-08 2012-12-26 天脉聚源(北京)传媒科技有限公司 Method for converting an image from an RGB color space to a YUV color space
WO2018126486A1 (en) * 2017-01-09 2018-07-12 中国科学院自动化研究所 Parallel video image contrast enhancing method and apparatus
WO2018126485A1 (en) * 2017-01-09 2018-07-12 中国科学院自动化研究所 Parallel image colour enhancing method and apparatus

Also Published As

Publication number Publication date
CN100546336C (en) 2009-09-30

Similar Documents

Publication Publication Date Title
EP1710951A2 (en) Elliptic curve calculation apparatus capable of calculating multiples at high speed
US6956951B2 (en) Extended key preparing apparatus, extended key preparing method, recording medium and computer program
Saha et al. A lower bound for radio k-chromatic number
CN100546336C (en) Color space changover method and device thereof
EP0741355B1 (en) Finite field multiple bit multiplier
KR100322739B1 (en) Finite Field Computation Method and Its Apparatus
US7480691B2 (en) Arithmetic device for multiple precision arithmetic for Montgomery multiplication residue arithmetic
US6038576A (en) Bit-depth increase by bit replication
Huczynska et al. Frequency permutation arrays
CN109379191B (en) Dot multiplication operation circuit and method based on elliptic curve base point
US6275558B1 (en) Circuit and method for arbitrarily shifting M-sequence
Delorme et al. Barycentric sequences and barycentric Ramsey numbers stars
JPH08237497A (en) Image processing unit and its method
Ellingham et al. Isomorphic factorization of regular graphs and 3-regular multigraphs
Gütschow et al. The fractal structure of cellular automata on abelian groups
Craigen Boolean and ternary complementary pairs
Asplund et al. Enumerating cycles in the graph of overlapping permutations
CN102184159A (en) Base is {2n-1, 2n+1,2n} and {2n-1, 2n+1,22n+1} remainder system backward conversion device and method
CN116822537A (en) Multi-addend adder circuit for random calculation
JP4288865B2 (en) Color interpolation method and color interpolation apparatus
Dimitrov et al. Linear time construction of a compressed Gray code
CN110598172B (en) Convolution operation method and circuit based on CSA adder
Meng et al. Uniformly resolvable three-wise balanced designs with block sizes four and six
US20140012889A1 (en) Construction Methods for Finite Fields with Split-optimal Multipliers
JPH08292876A (en) Arithmetic unit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210422

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
DD01 Delivery of document by public notice

Addressee: Xu Xiuhong

Document name: Notification of eligibility

DD01 Delivery of document by public notice