CN101873502B - Color space converting circuit and method - Google Patents

Color space converting circuit and method Download PDF

Info

Publication number
CN101873502B
CN101873502B CN200910106780.7A CN200910106780A CN101873502B CN 101873502 B CN101873502 B CN 101873502B CN 200910106780 A CN200910106780 A CN 200910106780A CN 101873502 B CN101873502 B CN 101873502B
Authority
CN
China
Prior art keywords
pixel component
color space
critical value
slope
packed
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.)
Expired - Fee Related
Application number
CN200910106780.7A
Other languages
Chinese (zh)
Other versions
CN101873502A (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.)
MStar Software R&D Shenzhen Ltd
MStar Semiconductor Inc Taiwan
Original Assignee
MStar Software R&D Shenzhen Ltd
MStar Semiconductor Inc Taiwan
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 MStar Software R&D Shenzhen Ltd, MStar Semiconductor Inc Taiwan filed Critical MStar Software R&D Shenzhen Ltd
Priority to CN200910106780.7A priority Critical patent/CN101873502B/en
Publication of CN101873502A publication Critical patent/CN101873502A/en
Application granted granted Critical
Publication of CN101873502B publication Critical patent/CN101873502B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The present invention relates to a kind of color space converting circuit and method, when performing xvYcc color space to the conversion of sRGB color space, with the circuit design simplified, can will exceed the part of sRGB color space, be compressed in sRGB color space, to promote visual effect.Color space converting circuit comprises converting unit.One pixel signal can be converted to sRGB color space from xvYcc color space by converting unit.In transfer process, converting unit produces the pixel component of pixel signal on each color space dimensions of sRGB color space, and when arbitrary pixel component is positioned between compressional zone, converting unit is compressed to export a packed pixel component to this pixel component.This packed pixel component does not exceed the covering scope of sRGB color space on corresponding color space dimensions.

Description

Color space converting circuit and method
Technical field
Present invention is directed to color space conversion (color space conversion), espespecially a kind of color space converting circuit and method.
Background technology
YCbCr and sRGB (standard RGB) is conventional standard color space, in practical application, for example, the video signal of the exportable YCbCr form of device for image (as digital camera or DVD player etc.) is to display unit (as Digital Television etc.), display unit is converted into sRGB form again, to show.In CCIR Recommendation 601 specification, Y (lightness), Cb and Cr (chroma) respectively encode with 8 positions, and wherein the scope of Y is 16 ~ 235, Cb, the scope of Cr is respectively 16 ~ 240.When YCbCr color space is converted to sRGB color space, utilize following conversion formula:
R ′ G ′ B ′ = 0.00456621 0 . 0.00625893 0.00456621 - 0.00153632 - 0.00318811 0.00456621 0.00791071 0 . = Y 601 ′ C B C R - 16 128 128
Can learn that the scope of redness (R), green (G), blueness (B) component is respectively 0 ~ 1, represent with 8 the scope being 0 ~ 255.
Because consumer improves day by day to the requirement of visual effect, YCbCr color space does not gradually apply and uses, so in recent years, based on YCbCr color space, develop xvYcc (eXtended Video YCC, or be called x.v.Color) color space, its colour gamut is that about 1.8 times of former YCbCr color space are large, to provide abundanter color representation.In xvYcc color space, if encode with 8 equally, then the scope of Y, Cb and Cr respectively can expand as 1 ~ 254.If change the scope that this expands according to aforementioned conversion formula, then the scope of R, G, B component also expands as-17.46 ~ 277 respectively, as shown in Figure 1.But, exceed the part of 0 ~ 255, i.e. the part of-17.46 ~ 0 and 255 ~ 277, and cannot with 8 bit representations.The part of-17.46 ~ 0 is all given up and is considered as 0 by prior art system, and the part of 255 ~ 277 is all given up and is considered as 255, the wide gamut of xvYcc color space fully cannot be showed in sRGB color space, and cannot promote visual effect.
Summary of the invention
In view of this, one of the present invention object, be to provide a kind of color space converting circuit and method, can when performing xvYcc color space to the conversion of sRGB color space, with the circuit design simplified, to the part of sRGB color space be exceeded, be compressed in sRGB color space, to promote visual effect.
The invention provides a kind of color space converting circuit, in order to a pixel signal is converted to the second color space from the first color space, the second color space has at least one color space dimensions.This color space converting circuit comprises: converting unit, in order to produce the pixel component of pixel signal on this color space dimensions, and when pixel component is positioned between a compressional zone, compresses with output squeezing pixel component to pixel component; Wherein, packed pixel component does not exceed the covering scope of the second color space on this color space dimensions.
The present invention separately provides a kind of color space changover method, comprises the following step: receive the pixel signal that belongs to the first color space; Produce the pixel component of pixel signal on the color space dimensions of the second color space; And when pixel component is positioned between a compressional zone, compress with output squeezing pixel component to pixel component, wherein packed pixel component does not exceed the covering scope of the second color space on its color space dimensions.
Accompanying drawing explanation
The schematic diagram of the relative size of Fig. 1 system display YCbCr color space and xvYcc color space.
The calcspar of one of the color space converting circuit of Fig. 2 system the present invention embodiment.
How the converting unit that Fig. 3 system shows Fig. 2 carries out the schematic diagram of compressed action.
The flow chart of one of the color space changover method of Fig. 4 system the present invention embodiment.
In figure, 20 is color space converting circuits, and 21,22 is buffers, and 23 is converting units, and 24 is buffer units, and 41 ~ 45 is process steps of one of color space changover method embodiment.
Embodiment
The calcspar of one of the color space converting circuit 20 of Fig. 2 system the present invention embodiment, comprises buffer unit 24 and a converting unit 23.Color space converting circuit 20 can perform the conversion of xvYcc color space (hereinafter referred xvYcc) to sRGB color space (hereinafter referred sRGB).SRGB has three color space dimensions, i.e. red, green, blue dimension.SRGB all has a covering scope in each dimension, and this covering scope has a lower limit and a higher limit (being hereafter called the first lower limit and the first higher limit), if represent with 8, is respectively 0 and 255.When xvYcc is converted to sRGB, xvYcc also each tool one lower limit and higher limit (being hereafter called the second lower limit and the second higher limit) in red, green, blue dimension, if with 8 bit representations, be respectively-17.46 and 277.Therefore, the second lower limit is less than the first lower limit, and the second higher limit is greater than the first higher limit.
Buffer unit 24 can comprise buffer 21 and 22.Buffer 21 stores the first critical value and the first slope, and buffer 22 stores the second critical value and the second slope, and the first critical value is greater than the second critical value.These parameters stored by buffer 21,22 can adjust according to actual needs.Converting unit 23 is coupled to buffer 21,22, according to the parameter value stored by buffer 21,22, can belong to the input pixel signal of xvYcc, export one after being converted to the output pixel signal belonging to sRGB.In this transfer process, input pixel signal is first converted to the pixel component on each color space dimensions of sRGB by converting unit 23, i.e. red component, green component and blue component.Then, converting unit 23 judges whether the size of each pixel component is positioned between compressional zone, if so, then compresses; Otherwise, do not compress.In other words, the pixel value that between compressional zone, representative need be carried out compressing is interval.In this embodiment, comprise between compressional zone: the pixel value that lower limit and the upper limit are respectively the first critical value and the second higher limit is interval, and lower limit is respectively the pixel value interval of the second lower limit and the second critical value with the upper limit.Therefore, the large I between compressional zone adjusts by change first critical value or the second critical value.When arbitrary pixel component (as red component) is greater than the first critical value and is not more than the second higher limit (as the higher limit of xvYcc in red dimension), converting unit 23 performs the first compressed action to export the first packed pixel component to this pixel component, make the first packed pixel component not higher than the first higher limit (as the higher limit of sRGB in red dimension), and for having the linear relationship of the first slope between the first packed pixel component and this pixel component; When arbitrary pixel component is less than the second critical value and is not less than the second lower limit, converting unit 23 performs the second compressed action to export the second packed pixel component to this pixel component, make the second packed pixel component be not less than the first lower limit, and the second packed pixel component and this pixel component are for having the linear relationship of the second slope; On the other hand, converting unit 23 to the arbitrary pixel component between the first critical value and the second critical value, does not then perform any compressed action, directly exports this pixel component.Therefore, in converting unit 23 in the output pixel signal that exports, red, green and blue component is all in the gamut range of sRGB.
How Fig. 3 system display converting unit 23 carries out the schematic diagram of compressed action, wherein, the input pixel component input pixel signal that is Fig. 2 changed red, green and blue component one of them, the output pixel signal that output pixel component is Fig. 2 comprised redness, green and blue component one of them.In figure 3, when input pixel component is greater than the first critical value and is not more than the second higher limit, or, when being less than the second critical value and being not less than the second lower limit, can be compressed to produce output pixel component, so, originally can be compressed in sRGB gamut range more than the pixel component of sRGB gamut range, to manifest the color of different levels, and same color can not be treated as process.For example, the red component of 260 and 270 (upper limits all more than 255), after overcompression process, can present the redness of different levels, and the redness that all can not be treated as 255 shows.Fig. 3 shows two kinds of compress modes, and in this embodiment, one is curve compression (curve compression), and another is linear compression (linear compression).Preferably, curve compression produced according to gamma curve, to meet the vision of human eye.Or, in the color space converting circuit 20 of the present invention, carry out approximating curve compression in the mode of linear compression, so can reduce circuit cost, and reach the visual effect be similar to very much with curve compression.
In this embodiment, the oblique line between the first critical value and the second higher limit, its slope is the first slope, and namely aforementioned first compressed action performs linear compression according to the first slope, that is:
Output pixel component (i.e. the first packed pixel component)=(input pixel component-the first critical value) × first slope+the first critical value formula (1)
Oblique line between the second critical value and the second lower limit, its slope is the second slope, and namely aforementioned second compressed action performs linear compression according to the second slope, that is:
Output pixel component (i.e. the second packed pixel component)=(input pixel component one second critical value) × second slope+the second critical value formula (2)
Formula (1) can be considered and perform linear interpolation (linearinterpolation) between the first critical value and the second higher limit, and formula (2) can be considered and perform linear interpolation between the second critical value and the second lower limit.Preferably, change-over circuit 23 comprises interpolating circuit (figure does not show), in order to perform the linear interpolation computing of formula (1) and formula (2).
In formula (1), when inputting pixel component and the first packed pixel component is respectively the second higher limit and the first higher limit, if the first critical value is known, then the first slope can be derived by the first critical value, the first higher limit and the second higher limit are substituted into formula (1) and be produced; If the first slope is known, then the first critical value can be derived by the first slope, the first higher limit and the second higher limit are substituted into formula (1) and be produced.In like manner, in formula (2), when inputting pixel component and the second packed pixel component is respectively the second lower limit and the first lower limit, if the second critical value is known, then the second slope can be derived by the second critical value, the first lower limit and the second lower limit are substituted into formula (2) and be produced; If the second slope is known, then the second critical value can be derived by the second slope, the first lower limit and the second lower limit are substituted into formula (2) and be produced.Therefore, in which case, buffer 21 only needs storage first critical value and the first slope one, and buffer 22 only needs storage second critical value and the second slope one, and non-storage person can be produced by derivation, so can save memory space.
In another specific embodiment, converting unit 23 comprises a question blank (lookup table, figure does not show), in order to store the output pixel component of input pixel component and correspondence, wherein, when inputting pixel component and being greater than the first critical value and being not more than the second higher limit, the output pixel component of correspondence is the first packed pixel component; When inputting pixel component and being less than the second critical value and being not less than the second lower limit, the output pixel component of correspondence is the second packed pixel component; When inputting pixel component between the first critical value and the second critical value, the output pixel component of correspondence is the input pixel component of script.Therefore, converting unit 23 according to this question blank, can perform the first compressed action and the second compressed action rapidly.
Preferably, the input pixel signal for xvYcc produces red, green and blue component through conversion, and converting unit 23 can use different critical values and slope respectively, performs aforementioned linear compression.These different critical values and slope, can be stored in buffer 21,22.
Due to HDMI (High Definition Multimedia Interface) (High-definition Multimedia Interface, HDMI) start to support xvYcc in the specification of its 1.3 version, the color space converting circuit 20 of the present invention is applicable to HDMI receiver, in order to by HDMI receiver the signal of xvYcc form that receives, be converted to the signal of sRGB form, in display unit as Digital Television shows.
The flow chart of one of the color space changover method of Fig. 4 system the present invention embodiment, for the conversion of the first color space to the second color space.The method comprises the following step:
Step 41: receive the pixel signal that belongs to the first color space.
Step 42: produce the pixel component of this pixel signal on each color space dimensions of the second color space.
Step 43: when the pixel component on arbitrary color space dimensions is greater than the first critical value and is not more than the higher limit of this pixel component, first compressed action is performed to export the first packed pixel component to this pixel component, wherein the first packed pixel component is not higher than the higher limit of the second color space on this color space dimensions, and for having the linear relationship of the first slope between the first packed pixel component and this pixel component.
Step 44: when the pixel component on arbitrary color space dimensions is less than the second critical value and is not less than the lower limit of this pixel component, second compressed action is performed to export the second packed pixel component to this pixel component, wherein the second packed pixel component is not less than the lower limit of the second color space on this color space dimensions, and for having the linear relationship of the second slope between the second packed pixel component and this pixel component.
Step 45: when the pixel component on arbitrary color space dimensions is between the first critical value and the second critical value, directly exports this pixel component.
In abovementioned steps, the first critical value is greater than the second critical value; The higher limit of the pixel component on arbitrary color space dimensions is greater than the higher limit of the second color space on this color space dimensions; The lower limit of the pixel component on arbitrary color space dimensions is less than the lower limit of the second color space on this color space dimensions.
Preferably, the first color space is xvYcc color space, and the second color space is sRGB color space, and it comprises three color space dimensions such as redness, green and blue dimension.The color space changover method of Fig. 4 can be applied to HDMI receiver.
Preferably, step 43 ~ 45 are perform according to a question blank.This question blank in advance storing step 42 the pixel component of the corresponding output of the pixel component of different sizes and step 43 ~ 45 that produces, namely the preimage prime component of the first packed pixel component, the second packed pixel component or uncompressed, so can accelerate the execution speed of step 43 ~ 45.
The above is utilize preferred embodiment to describe the present invention in detail, and the scope of unrestricted the present invention.Allly know this skill personage and all can understand, many may change can be made according to the announcement of above embodiment, still not depart from the spirit and scope of the present invention.

Claims (15)

1. a color space converting circuit, is characterized in that, comprises:
One converting unit, in order to a pixel signal is converted to one second color space from one first color space, this second color space has at least one color space dimensions, wherein, this first color space is xvYcc color space, and this second color space is sRGB color space;
Wherein, this converting unit produces this pixel signal pixel component one of on this color space dimensions, and when this pixel component is positioned between a compressional zone, compress to export a packed pixel component to this pixel component, making this packed pixel component not exceed this second color space covering scope one of on this color space dimensions, is a linear relationship between this packed pixel component and this pixel component;
Between described compressional zone, lower limit and the upper limit are respectively one of one first critical value and this pixel component higher limit for it, and this packed pixel component is not higher than one of this covering scope higher limit, and now, the linear relationship between this packed pixel component and this pixel component is:
Packed pixel component=(pixel component-the first critical value) × first slope+the first critical value, wherein, the first slope is the slope of one of the first critical value and this pixel component higher limit; Or the upper limit between described compressional zone and lower limit are respectively one of one second critical value and this pixel component lower limit, this packed pixel component is not less than one of this covering scope lower limit, and now, the linear relationship between this packed pixel component and this pixel component is:
Packed pixel component=(pixel component-the second critical value) × second slope+the second critical value, wherein, the second slope is the slope of one of the second critical value and this pixel component lower limit;
Described first critical value is greater than described second critical value;
Described converting unit directly exports the arbitrary pixel component between described first critical value and described second critical value.
2. color space converting circuit according to claim 1, is characterized in that, when this pixel component is positioned at outer between this compressional zone, this converting unit directly exports this pixel component.
3. color space converting circuit according to claim 1, is characterized in that, this converting unit comprises a question blank, in order to store this packed pixel component of this pixel component and correspondence; This converting unit is compressed this pixel component according to this question blank.
4. color space converting circuit according to claim 1, is characterized in that, more comprises:
One buffer unit, is coupled to this converting unit, in order to store one of this linear relationship slope.
5. color space converting circuit according to claim 1, is characterized in that, this higher limit of this pixel component is greater than this higher limit of this covering scope.
6. color space converting circuit according to claim 1, is characterized in that, this packed pixel component system is according to this pixel component, one of this first critical value and this linear relationship slope and determining.
7. color space converting circuit according to claim 1, is characterized in that, more comprises:
One buffer unit, is coupled to this converting unit, in order to store this first critical value.
8. color space converting circuit according to claim 1, is characterized in that, one of this linear relationship slope system determines according to this higher limit of this first critical value, this pixel component and this higher limit of this covering scope.
9. color space converting circuit according to claim 1, is characterized in that, this lower limit of this pixel component is less than this lower limit of this covering scope.
10. color space converting circuit according to claim 1, is characterized in that, this packed pixel component system is according to this pixel component, one of this second critical value and this linear relationship slope and determining.
11. color space converting circuits according to claim 1, is characterized in that, more comprise:
One buffer unit, is coupled to this converting unit, in order to store this second critical value.
12. color space converting circuits according to claim 1, is characterized in that, one of this linear relationship slope system determines according to this lower limit of this second critical value, this pixel component and this lower limit of this covering scope.
13. color space converting circuits according to claim 1, is characterized in that, this color space converting circuit system is implemented in a HDMI (High Definition Multimedia Interface) (HDMI) receiver.
14. 1 kinds of color space changover methods, is characterized in that, comprise:
Receive the pixel signal that belongs to one first color space;
This pixel signal is converted to one second color space one of to produce one of this second color space color space dimensions pixel component from this first color space, wherein, this first color space is xvYcc color space, and this second color space is sRGB color space; And
When this pixel component is positioned between a compressional zone, compress to export a packed pixel component to this pixel component, making this packed pixel component not exceed this second color space covering scope one of on this color space dimensions, is a linear relationship between this packed pixel component and this pixel component;
Wherein, the lower limit between described compressional zone and the upper limit are respectively one of one first critical value and this pixel component higher limit, and this packed pixel component is not higher than one of this covering scope higher limit, and now, the linear relationship between this packed pixel component and this pixel component is:
Packed pixel component=(pixel component-the first critical value) × first slope+the first critical value, wherein, the first slope is the slope of one of the first critical value and this pixel component higher limit;
Or the upper limit between described compressional zone and lower limit are respectively one of one second critical value and this pixel component lower limit, this packed pixel component is not less than one of this covering scope lower limit
, now, the linear relationship between this packed pixel component and this pixel component is:
Packed pixel component=(pixel component-the second critical value) × second slope+the second critical value, wherein, the second slope is the slope of one of the second critical value and this pixel component lower limit;
Described first critical value is greater than described second critical value;
When this pixel component is between described first critical value and described second critical value, directly export this pixel component.
15. color space changover methods according to claim 14, is characterized in that, this compression step system performs according to a question blank, and wherein this question blank stores this packed pixel component of this pixel component and correspondence.
CN200910106780.7A 2009-04-24 2009-04-24 Color space converting circuit and method Expired - Fee Related CN101873502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910106780.7A CN101873502B (en) 2009-04-24 2009-04-24 Color space converting circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910106780.7A CN101873502B (en) 2009-04-24 2009-04-24 Color space converting circuit and method

Publications (2)

Publication Number Publication Date
CN101873502A CN101873502A (en) 2010-10-27
CN101873502B true CN101873502B (en) 2015-08-19

Family

ID=42998119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910106780.7A Expired - Fee Related CN101873502B (en) 2009-04-24 2009-04-24 Color space converting circuit and method

Country Status (1)

Country Link
CN (1) CN101873502B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104581102A (en) * 2013-10-09 2015-04-29 联咏科技股份有限公司 Color converting method and color converting system
CN103763538B (en) * 2014-02-21 2016-08-31 深圳创维-Rgb电子有限公司 A kind of realize the method and device that signal colour shows
CN106887218B (en) * 2017-03-22 2019-10-25 深圳市华星光电技术有限公司 Color conditioning method and regulating system based on high color gamut display
CN110188680B (en) * 2019-05-29 2021-08-24 南京林业大学 Tea tree tender shoot intelligent identification method based on factor iteration

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1655626A (en) * 2004-01-30 2005-08-17 美国博通公司 System and method for clipping values of pixels
CN1972368A (en) * 2005-09-08 2007-05-30 索尼株式会社 Gamut compression method and device and program
CN101390153A (en) * 2005-10-14 2009-03-18 三星电子株式会社 Improved gamut mapping and subpixel rendering system and method
CN101409066A (en) * 2007-10-09 2009-04-15 三星电子株式会社 Systems and methods for selective handling of out-of-gamut color conversions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1655626A (en) * 2004-01-30 2005-08-17 美国博通公司 System and method for clipping values of pixels
CN1972368A (en) * 2005-09-08 2007-05-30 索尼株式会社 Gamut compression method and device and program
CN101390153A (en) * 2005-10-14 2009-03-18 三星电子株式会社 Improved gamut mapping and subpixel rendering system and method
CN101409066A (en) * 2007-10-09 2009-04-15 三星电子株式会社 Systems and methods for selective handling of out-of-gamut color conversions

Also Published As

Publication number Publication date
CN101873502A (en) 2010-10-27

Similar Documents

Publication Publication Date Title
CN107360429B (en) Method and circuit for converting and inversely converting depth-of-field packaging and unpackaging RGB format and YUV format
CN102577397B (en) Image processing device and image processing method
EP2254090B1 (en) Color conversion output device, color conversion table and method for creating same
EP3257042B1 (en) Pixel pre-processing and encoding
KR100782818B1 (en) Method and system for luminance preserving color conversion from YUV to RGB
EP3341918B1 (en) Coding and decoding method and corresponding devices
EP3113495A1 (en) Methods and devices for encoding and decoding a hdr color picture
EP3923580A1 (en) Method and device for decoding a color picture
KR20160130163A (en) Perceptual color transformations for wide color gamut video coding
EP2753083A1 (en) Signal processing apparatus, method and program for representing colors in a color range wider than a conventional color range
CN101729913B (en) Method and system for adjusting image saturation
EP3087725B1 (en) Method of mapping source colors of images of a video content into the target color gamut of a target color device
CN101873502B (en) Color space converting circuit and method
JP2006229925A (en) Dynamic image saturation enhancement apparatus
JP5253274B2 (en) Color conversion output device
EP2482559A2 (en) System and method for generating rgb primaries for a wide color gamut, and color encoding system using rgb primaries
CN105100763A (en) Color compensation method and circuit and display device
TWI410953B (en) Circuit and method for color space conversion
JP2007142494A (en) Image processing apparatus and method, and program
Xue et al. Color space conversion based on FPGA
US11322104B2 (en) Over-drive compensation method and device thereof
CN103974052A (en) Adjusting method, device and equipment for image saturation
Ogura et al. 4K HDR workflow: From capture to display
CN100488247C (en) Conversion equipment of video format
US10417994B2 (en) RGB format adjustment and reconstruction method and circuit for depth frame packing and depacking

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150819

Termination date: 20190424