經濟部中央標準局員工消費合作社印製 A7 ___B7 五、發明説明(ί ) 一種轉換色彩空間的裝置及方法,gp—種由數位YCbCr亮度色 度色彩空間訊號,轉換至數位RGB色彩空間訊號的色彩空間訊號轉 換裝置及方法,特別指一種使用預設碼與補償碼,轉換色彩空間的 .裝置與方法。 在多媒體電腦系統上,常需要倂合影像訊號(Video Signal)與 圖开多訊號(Graphic signal)^其中影像訊號,係爲亮度-色度(Luminance-Chrominance)色彩空間訊號,其具有可以較低頻寬傳輸,及較少資料 儲存的優點,可取自一具有抓取能力(Capture or frame grabbing capabHity )的影像處理系統,或來自光碟,如數位影音光碟 (DVD:Digital Video Disc)或是網路的視訊回放系統。然而,電腦螢幕 顯示,係使用RGB ( Red-Green-Blue:紅-綠-藍)色彩空間訊號,爲 了將此影像訊號可以在電腦顯示,因此,將YCbCr亮度-色度色彩空 間訊號(Y爲亮度,Cb A爲色度),轉換爲RGB色彩空間訊號是— 必要的。 在數位影像應用中,像素的色彩,常使用YCbCr 4:2:2的空 間解析度格式。因爲人類的視覺,,對於色度的敏感程度,低於對亮 度的敏感。使用YCbCr 4:2:2表示一影像的像素色度Cb與Cr,相較 於在水平方向的亮度,只要一半的解析度即已足夠。甚至,在影像 壓縮(例如MPEG, JPEG等)與數位影像應用結合時,影像垂直方 向的解析度,更可將色度Cb與Cr,削減一半,使成爲YCbCr 4:2:0 或4:1:1的格式。因此色度Cb與Cr,常伴隨亮度Y交互傳輸,在色 彩空間轉換時,可以共用資源,而使整個色彩空間轉換裝置,使用 較少的處理元件。 國際無線電通訊諮議委員會(the Comite Consultatif International des Radiocommunications : CCIR),建議的 CCER 601 規 本紙張尺度逋用t國國家標準(CNS ) A4規格(210X297公釐) ill· — 一.-I — IP----訂——ί!線 JiL· (請先閲讀背面之注意事項再填窝本J) 經濟部中央標準局員工消費合作社印製 A7 ____B7 五、發明説明(之) 格’建財’以將γ㈤離色獅触麵,轉換爲 RGB色彩空間: .. R = Y + 1.402 (Cr-128 ) ______(a ]) G = Y-0.714(0- 128) -0.344 (Cb-128) (a 2) B = Y+ 1.772 (Cb-128) ______(a 3 ) 如果使用u與V ’分別代表雛色度(Cb _ 128 )及(Cr _ 12 -則上述的公式,可以改寫爲: R = Y+ 1.402 V …、 G = Y-0.714V-0.344 U -----(b.2 ) B = Y+ 1.772 U --(b.3) 其中,Y,Cb,Cr等色彩空間元件在八位元的表示中,Y的範圍爲 (0,255),而 U與 V 的範圍是(.128J27)。 &彩@間轉換,通常是利用乘法器,或是檢視表,來達到矩 陣的乘法運算。若用硬體來製作乘法器印話,設計與製作會相當複 雜,因而成本較高。相形之下,使用檢視表的話,構造較簡單.,成 本也較低。而因矩陣乘法運算,常是決定色彩空間轉換硬體複雜程 度的關鍵,所1¾,檢視表的使用數量,,也就決定了色彩空間轉換裝 置的價格。爲了執行YCbCr至RGB色彩空間轉換的程式 (a.l)〜(a.3),習知的色彩空間轉換器,爲了 1.402(0128),0.714(Cr-128),0.344(Cb-128)以及1.772(Cb-128)等四個乘法運算,常要使用四 個檢視表。雖然,這比另一習知使用3X3乘法矩陣的色彩空間轉換 器要便宜.,但是,若能進一步減少檢視表數量的使用,簡化結構, 降低成本,會更理想。 發明槪要: ίί!ρ_ (請先閲讀背面之注意事項再填寫本頁) -、11 線 0! 本紙張尺度適用中圃國家梯準(CNS ) A4規格(210X297公釐) 經濟部中央標準局員工消費合作社印製 A7 B7 五、發明説明(3 ) 是以,本發明的主要目的,在於提供一種轉換色彩空間的方 法,得以降低色彩空間轉換裝置的成本。. 本發明的另一目的,提供一種轉換色彩空間的裝置,得 以降低色彩空間轉換裝置的成本。 本發明的又一目的,在於提供一種色彩空間轉換的方法,得 '以使色彩空間轉換的裝置,有更簡化的結構。 本發明的再一目的,在於提供一種色彩空間轉換的裝置,得 '以使色彩空間轉換的裝置,有更簡化的結構。 爲了達到上述目的,本發明所提供色彩空間轉換的方法,係 將包括四個起始色度色彩項的標準轉換程式展開,得到包括預設項 與補償項的線性組合。其中,一預設碼產生器產生預設轉換碼,使 該預設轉換碼在第一時序對應第一色度色彩空間訊號,在第二時序 對應第二色度色彩空間訊號。而一補償碼產生器產生補償轉換碼, 使該補償轉換碼在第一時序對應第一色度色彩空間訊號,在第二時 序對應第二色度色彩空間訊號。該來自預設碼產生器與補償碼產生 器的預設轉換碼、補償轉換碼,分別是該預設項與該補償項的轉換 値,將其加以線性組合,即得到起始色度色彩項的轉換値。再將這 些起始色度色彩項的轉換値,依據標準的轉換程式,結合亮度色彩 空間訊號,即得到RGB色彩空間訊號。 依據本發明的另一個觀點,本發明所提供由數位YCbCr亮 度色度色彩空間訊號,轉換至數位RGB色彩空間訊號的色彩空間訊 號轉換裝置,係依據一組標準的轉換程式。該組標準的轉換程式, 包括四個起始色度色彩項,而該等起始色度色彩項,可以線性方式 展開,成爲只包含預設項與補償項的線性組合。本裝置包括一預設 碼產生器,一補償碼產生器,線性組合構件與輸出組合構件。該預 設碼產生器產生預設轉換碼,使該預設轉換碼在第一時序與第一色 (請先閲讀背面之注意事項再填寫本瓦) •r 訂 -線 (210X297公釐) A7 B7 五、發明説明(4· 度色彩空間訊號有關連,在第二時序與第二色度色彩空間訊號有關 連。而該補償碼產生器產生補償轉換碼,使該補償轉換碼在第一時 序與第一色度色彩空間訊號有關連,在第二時序與第二色度色彩空 間訊號有關連。該預設轉換碼與補償轉換碼,分別是該預設項與該 .補償項的轉換値。該線娃組合構件,連接至預設碼產生器及補償碼' .產生器,並且線性組合來自預設碼產生器及補償碼產生器的預設轉 換碼、補償轉換碼,以得到起始色度色彩項的轉換値。該輸出組合 構件’連接至線性組合構件,並且依據標準的轉換程式,結合起始 色度色彩項的轉換値,與亮度色彩空間訊號,以得到RGB色彩空間 訊號。 以下所揭示的較佳實施例中,在預設碼產生器及補償碼產生 器之中’至少其中之一,係使用檢視表單元(Look-up table unit)。若 預設碼產生器及補償碼產生器,能同時使用單一的檢視表單元,會 更理想。 . 圖式的簡要說明: 經濟部中央榇準局員工消費合作社印製 —.—ί---。----- (請先閱讀背面之注意事頃再填寫本頁) 訂 -線 桌一圖爲本發明第一實施例之色彩空間轉換裝置的功能方塊圖 第二圖爲本發明第二實施例之色彩空間轉換裝置的功能方塊圖 •第三圖爲本發明第三實施例之色彩空間轉換裝1造_|方興歷 第四圖爲本發明第四實施例之色彩空間轉換裝置的功能方塊ft 第五圖爲本發明第五實施例之色彩空間轉換裝置的功能方塊圖 声/、圖爲本發明預設碼舆補償碼產生器的較佳實施例 ".................... 發明說明 第一圖揭示本發明色彩空間轉換裝置之第一實施例,在此實 施例中’包括一多工器1、一預設碼產生器2、一補償碼產生器3, A7 , — ----?z_________ 五、發明説明(5 ) —線性組合構件’包括移位器41,43,、加法器42,45,46、減法器 44,第一閂鎖5、第二閂鎖6、第三閂鎖7、第四閃鎖8,以及第 —輸出結合卓兀9、桌一輸出結合單兀10、第二輸出結合單元11。 而第一輸出結合單元9、第二輸出結合單元10、第三輸出結合單元 ,可統稱爲輸出結合單兀。而移位器、加法器、減法器與問鎖的 詳盡實施細節’對於習於此項技藝之人士而言,屬於習知~電路'技 藝,故在此不予贅述。 - 多工器1接收數位輸入色度色彩空間訊號Cb及Cr,並回應 時序訊號(timing select signals)tu與tv,而輸出Cb或Cr其中之一色度 色彩空間訊號。自多工器1發出的該色度色彩空間訊號,傳到預設 碼產生器2及補償碼產生器3,以產生預設轉換碼及補償轉〇 在本實施例中,補償轉換碼以.0.013(C-128)表示,爲補償項 的轉換値,而預設轉換碼是以1.402(0128)表示,爲預設項的轉換 値。其中C,在tu時序時,代表Cb色度色彩空間訊號,在〜時序’ 時,代表Cr色度色彩空間訊號。如果使用ϋ與V取代Cb與Cr,以 表示輸入色度色彩空間訊號,則預設轉換碼與補償轉換碼,分別成 爲1.402C與0.013C。其中C ’在tu時序時,代表u色度色彩空間 訊號,在tv時序時,代表V色度色彩空間訊號。 如前所述,標準的轉換程式,包括四組起始色度色彩項 (Chrominance-in-color terms),亦即 1.402(Cr-128),0.714(Cr-128), 〇.344(Cb_128)以及1.772(Cb-128)。在本發明中,標準的轉換程式 (a. 1)至(a.3),可以藉由展開起始色度色彩項,改寫成只包括預設 項與補償項的線性組合。 在本實施例中,既然其中一起始色度色彩項1.402(Cr-128), 已經等於預設項,是以該起始色度色彩項1.402(Cr-128)並不需要再 展開。而其它起始色度色彩項〇.714(Cr-128),〇.344(Cb-12S)及 ^氏張尺度適用中國國家揉準(CNS ) A4規格( 210X297公釐) 經濟部中央標準局貝工消費合作社印製 A7 _____B7_^____ 五、發明説明(6 ) 1.772(Cb-128),並不等於預設或補償項,則可以展開成爲: 0.714(Cr-128) = 1/2(1.402)(Cr-128)+0.013(Cr-128) —(c.1) 0.344(Cb-128) = 1/2[1/2(1.402)(Cb-128)+0.013(Cb-128)]-0.013(Cb-128) -(c.2) 1.772(Cb-128) = 1.402(Cb-128)+ 1 /2[1 /2(1,402)(Cb-128)+0.013(Cb- 128)]+0.013(Cb-128) (c.3) 線性組合構件,是依據上述的展開式(c.l)至(c.3),將自預設 碼產生器2及補償碼產生器;3而來的預設轉換碼與補償轉換碼加以組 合,以得到該等起始色度色彩項的轉換値,讓色彩空間的轉換,只 要線性組合預設轉換碼及補償轉換碼,即可達到。進一步內容,請 參下述說明。 來自預設碼產生器2的預設轉換碼,亦即爲1.402(0128), 經由移位器41 ,執行算術的右向移位,以將預設轉換碼除以二,得 到1/2(1.402(C-128))= 0.701(C-128)値。來自補償碼產生器3的補償 轉換碼,亦即爲0.013(0128),經過加法器42,加上移位器41的輸 出値0.701(0128),以在tv時序時,C=Cr得到起始色度色彩項 、0.714(Cr-128)的轉換値。 移位器43,對加法器42的輸出0.714(C-128)執行算術右向 移位,亦即除以二,得到輸出〇.357(C-128)。來自移位器'43的輸出 値0.357(0128),經過減法器44執行減法,減去0.013(0128),以在 tu時序時,OCb得到起始色度色彩項0.344(Cb-128)的轉換値。 來自預設碼產生器2的預設轉換碼1.402(0128),再經過加 法器45,加上移位器43的0.357(0128)輸出値,得到1_759(C-128) 的輸出。來自補償碼產生器3的補償轉換碼0.013(0128),經過加法 器46,加上加法器45的輸出値1.759(0128),在tu時序時,OCb 得到起始色度色彩項1.772(Cb-128)的轉換値。 本紙張尺度適用中國國家標準(CNS ) A4说格(210X297公釐) I--U---^1----rv —-----IT------0,0— (請先閎讀背面之注意事頃再填寫本頁) . 經濟部中央樣準局員工消費合作社印製 A7 B7 五、發明説明(7 ) 第一閂鎖5,在tv時序時,鎖住來自預設碼產生器2的預 設轉換碼’以得到所欲的Cr-in-R轉換値,亦即1.402(0:-128)。第二 閂鎖6,在itv時序時,鎖住加法器42的輸出値,以得到所欲的Cr_ m-G轉換値’亦即0.714(0-128)。第三閂鎖7,在tu時序時,鎖住 減法器44的輸出値,以得到所欲的cb-in-G轉換値,亦即〇.344(Cb-.128)。第四閂鎖8 ’在tu時序時,鎖住加法器46的輸出値,以得到 所欲的Cb-in-B轉換値,亦即1.772(Cb-128)。 第一輸出結合單元9,包括一個加法器,加上第一閂鎖5的 輸出値以及數位Y亮度訊號,以得到R色彩空間訊號》 第二輸出結合單元10,包括一個加法器101以及一個減法 器102。其中加法器1〇1,用以加上第二閂鎖6與第三問鎖7的輸出 値。減法器102,用以自數位γ亮度訊號扣除加法器101的輸出 値,以得到G色彩空間訊號。 第三輸出結合單元11 ’包括一個加法器,以加上ΪΙ四閂鎖 8的輸出値與數位Y亮度訊號,以得到B色彩空間訊號。 亦即,以R色彩訊號而言,由(a.l)知:R = Y + 1.402 (Cr -.128 )亦即以預設轉換碼1.402(0128) ’在tv時序時,加上Y亮度, 即可獲得。 對G色彩訊號而言,由(a.2)可知G = Y - 0.714 (Cr -128 ) _ 0.344 (Cb- 128 )’將起始色度色彩項,代入以預設項與補 償項展開的程式(c.l)與程式(c.2)後,得到G = Y - l/2(1.402)(Cr-128)-0.013(Cr-128> l/2[l/2(1.402)(Cb-128)+0.013(Cb-128)]+0.013(Cb- 128),亦即 G = Y -閂鎖 6 的輸出[l/2(1.402)(Cr-128)+0.013(Cr-128)]_ 問鎖 7 的輸出 l/2[l/2(1.402)(Cb-128)+0_013(Cb-128)]-0.013(Cb-128)。 依此類推可得到B色彩訊號。 是以,只要使用預設碼與補償碼爲基礎元件,加以線性組 本紙張尺度逋用中國國家梯準(CNS ) A4C格(210X297公釐) ——L---1----^u· — (請先閣讀背面之注意事項再填寫本頁)Printed by A7 ___B7 of the Consumer Cooperatives of the Central Standards Bureau of the Ministry of Economic Affairs 5. Description of the Invention (ί) A device and method for converting color space, gp—a color converted from digital YCbCr luminance chroma color space signal to digital RGB color space signal Spatial signal conversion device and method, in particular, a device and method for converting a color space using a preset code and a compensation code. On multimedia computer systems, it is often necessary to combine a video signal and a graphic signal ^ wherein the video signal is a Luminance-Chrominance color space signal, which can be lower Bandwidth transmission and the advantages of less data storage can be taken from an image processing system with capture or frame grabbing capabHity, or from optical discs, such as digital video discs (DVD: Digital Video Disc) or Internet Video playback system. However, computer screen displays use RGB (Red-Green-Blue) color space signals. In order to display this image signal on a computer, the YCbCr luminance-chrominance color space signal (Y is Brightness, Cb A is chromaticity), conversion to RGB color space signal is-necessary. In digital imaging applications, YCbCr 4: 2: 2 spatial resolution format is often used for pixel color. Because of human vision, the sensitivity to chroma is lower than the sensitivity to brightness. Using YCbCr 4: 2: 2 to represent the pixel chroma Cb and Cr of an image, compared to the horizontal brightness, only half the resolution is sufficient. Even when image compression (such as MPEG, JPEG, etc.) is combined with digital image applications, the vertical resolution of the image can reduce the chroma Cb and Cr by half to YCbCr 4: 2: 0 or 4: 1 : 1 format. Therefore, chrominance Cb and Cr are often transmitted along with luminance Y. When color space is converted, resources can be shared, so that the entire color space conversion device uses fewer processing elements. The International Radio Communications Consultative Committee (the Comite Consultatif International des Radiocommunications: CCIR), the proposed CCER 601 paper size, using the National Standard (CNS) A4 specification (210X297 mm) ill · — 一 .-I — IP ---- Order——ί! Line JiL · (Please read the notes on the back before filling in the booklet J) Printed by the Consumer Cooperatives of the Central Standards Bureau of the Ministry of Economic Affairs A7 ____B7 V. Description of the invention (of) “Building wealth” In order to convert γ㈤ from the color lion to the RGB color space: .. R = Y + 1.402 (Cr-128) ______ (a)) G = Y-0.714 (0- 128) -0.344 (Cb-128) ( a 2) B = Y + 1.772 (Cb-128) ______ (a 3) If u and V 'are used to represent the young chroma (Cb _ 128) and (Cr _ 12-then the above formula can be rewritten as: R = Y + 1.402 V…, G = Y-0.714V-0.344 U ----- (b.2) B = Y + 1.772 U-(b.3) where Y, Cb, Cr and other color space components are in eight bits In the representation of the element, the range of Y is (0,255), and the range of U and V is (.128J27). The conversion between color and color is usually achieved by using a multiplier or a lookup table to achieve matrix multiplication. If used The design and production of multiplier imprints in hardware will be quite complicated and therefore costly. In contrast, the use of a look-up table will have a simpler structure and lower cost. The matrix multiplication often determines the color The key to the complexity of the space conversion hardware is the number of look-up tables used, which determines the price of the color space conversion device. In order to execute the program (al) ~ (a.3) from YCbCr to RGB color space conversion, Conventional color space converters often use four look-up tables for four multiplication operations such as 1.402 (0128), 0.714 (Cr-128), 0.344 (Cb-128), and 1.772 (Cb-128). Although, This is cheaper than another conventional color space converter using a 3X3 multiplication matrix. However, it would be more ideal if the number of look-up tables could be further reduced, the structure simplified, and the cost reduced. It would be more desirable to invent: ίί! Ρ_ (Please (Please read the notes on the back before filling this page)-, 11 line 0! This paper size is applicable to the China National Standard for Ladder (CNS) A4 (210X297 mm) Printed by the Consumer Cooperatives of the Central Standards Bureau of the Ministry of Economic Affairs A7 B7 5. Invention description (3) Therefore, the main object of the present invention is to provide a method for converting a color space, which can reduce the cost of the color space conversion device. Another object of the present invention is to provide a color space conversion device to reduce the cost of the color space conversion device. Another object of the present invention is to provide a method for color space conversion, so that the device for color space conversion has a more simplified structure. Yet another object of the present invention is to provide a color space conversion device, so that the color space conversion device has a more simplified structure. In order to achieve the above object, the color space conversion method provided by the present invention expands a standard conversion program including four initial chrominance color terms to obtain a linear combination including preset terms and compensation terms. A preset code generator generates a preset conversion code, so that the preset conversion code corresponds to a first chrominance color space signal at a first timing and a second chrominance color space signal at a second timing. A compensation code generator generates a compensation conversion code, so that the compensation conversion code corresponds to a first chrominance color space signal at a first timing and a second chrominance color space signal at a second timing. The preset conversion code and compensation conversion code from the preset code generator and compensation code generator are the conversions of the preset item and the compensation item, respectively, and they are linearly combined to obtain the initial chrominance color item. Conversion 値. Then convert these initial chrominance color items, and according to the standard conversion program, combine the luminance color space signal to obtain the RGB color space signal. According to another aspect of the present invention, a color space signal conversion device provided by the present invention for converting a digital YCbCr luminance chrominance color space signal into a digital RGB color space signal is based on a set of standard conversion programs. This set of standard conversion programs includes four initial chrominance color terms, and these initial chrominance color terms can be expanded in a linear manner to become a linear combination of only the preset and compensation terms. The device includes a preset code generator, a compensation code generator, a linear combination component and an output combination component. The preset code generator generates a preset conversion code, so that the preset conversion code is in the first sequence and the first color (please read the precautions on the back before filling in this tile) • r order-line (210X297 mm) A7 B7 V. Description of the invention (4 · degree color space signal is related, and it is related to the second chromaticity color space signal at the second timing. And the compensation code generator generates a compensation conversion code, so that the compensation conversion code is in the first The timing is related to the first chroma color space signal, and the second timing is related to the second chroma color space signal. The preset conversion code and the compensation conversion code are respectively the preset item and the compensation item. Conversion 値. This line baby combination component is connected to the preset code generator and compensation code '. Generator, and the preset conversion code and compensation conversion code from the preset code generator and compensation code generator are linearly combined to obtain Conversion of the initial chrominance color term. The output combination component is connected to the linear combination component, and according to a standard conversion program, the conversion of the initial chrominance color term is combined with the luminance color space signal to obtain the RGB color space. Signal. In the preferred embodiment disclosed below, at least one of the preset code generator and the compensation code generator uses a look-up table unit. If the preset code generator And compensation code generator, it is more ideal to use a single look-up table unit at the same time.. Brief description of the drawing: Printed by the Consumer Cooperatives of the Central Procurement Bureau of the Ministry of Economic Affairs —.— ί ---.----- (Please read the notes on the back before filling out this page) Order-line table is a functional block diagram of the color space conversion device in the first embodiment of the present invention. The second image is the color space conversion in the second embodiment of the present invention. Functional block diagram of the device • The third diagram is a color space conversion device of the third embodiment of the present invention. Fang Xingli The fourth diagram is the functional block ft of the color space conversion device of the fourth embodiment of the present invention. The fifth diagram is The functional block diagram of the color space conversion device of the fifth embodiment of the present invention is a preferred embodiment of the preset code compensation code generator of the present invention " .............. ... Description of the invention The first figure discloses the color space conversion device of the present invention The first embodiment, in this embodiment, 'includes a multiplexer 1, a preset code generator 2, a compensation code generator 3, A7, — ----? Z_________ 5. Description of the invention (5) —The linear combination member 'includes a shifter 41, 43, an adder 42, 45, 46, a subtracter 44, a first latch 5, a second latch 6, a third latch 7, and a fourth flash lock 8, And the first-output combining unit 9, the first-output combining unit 10, and the second output combining unit 11. The first output combining unit 9, the second output combining unit 10, and the third output combining unit may be collectively referred to as output combining The detailed implementation details of the shifter, adder, subtractor, and interlock are 'for the person skilled in this technique, it is a technique known to the circuit', so I will not repeat it here. -Multiplexer 1 receives digital input chrominance color space signals Cb and Cr, and responds to timing select signals tu and tv, and outputs one of Cb or Cr chrominance color space signals. The chrominance color space signal sent from the multiplexer 1 is transmitted to the preset code generator 2 and the compensation code generator 3 to generate a preset conversion code and a compensation conversion. In this embodiment, the compensation conversion code is used to. 0.013 (C-128) indicates that it is the conversion unit of the compensation item, and the preset conversion code is 1.402 (0128), which is the conversion unit of the preset item. Among them, C represents the Cb chrominance color space signal at the time sequence of tu, and represents Cr chrominance color space signal at the time sequence of '. If ϋ and V are used instead of Cb and Cr to represent the input chrominance color space signal, the default conversion code and compensation conversion code are 1.402C and 0.013C, respectively. Among them, C ′ represents the u chromaticity color space signal at the time sequence of tu, and represents the V chromaticity color space signal at the time sequence of tv. As mentioned earlier, the standard conversion program includes four sets of initial chrominance-in-color terms, namely 1.402 (Cr-128), 0.714 (Cr-128), 0.344 (Cb_128) And 1.772 (Cb-128). In the present invention, the standard conversion programs (a. 1) to (a.3) can be rewritten by expanding the initial chromaticity color terms to include only a linear combination of preset terms and compensation terms. In this embodiment, since one of the initial chromaticity color items 1.402 (Cr-128) is already equal to the preset item, the initial chromaticity color item 1.402 (Cr-128) does not need to be expanded. And other initial chromaticity color items of 0.714 (Cr-128), 0.334 (Cb-12S) and ^ 's Zhang scale are applicable to China National Standard (CNS) A4 specifications (210X297 mm) Central Bureau of Standards, Ministry of Economic Affairs Printed by Shelley Consumer Cooperative A7 _____ B7 _ ^ ____ 5. Description of the Invention (6) 1.772 (Cb-128), which is not equal to the preset or compensation term, can be expanded into: 0.714 (Cr-128) = 1/2 (1.402 ) (Cr-128) +0.013 (Cr-128) — (c.1) 0.344 (Cb-128) = 1/2 [1/2 (1.402) (Cb-128) +0.013 (Cb-128)]- 0.013 (Cb-128)-(c.2) 1.772 (Cb-128) = 1.402 (Cb-128) + 1/2 [1 /2(1,402)(Cb-128)+0.013(Cb- 128)] + 0.013 (Cb-128) (c.3) The linear combination component is based on the expansion formulas (cl) to (c.3) described above. The preset code generator 2 and the compensation code generator; The conversion code and the compensation conversion code are combined to obtain the conversion of the initial chrominance color items, so that the color space conversion can be achieved by linearly combining the preset conversion code and the compensation conversion code. For further details, please refer to the following description. The preset conversion code from the preset code generator 2 is 1.402 (0128), and the right shift of the arithmetic is performed via the shifter 41 to divide the preset conversion code by two to obtain 1/2 ( 1.402 (C-128)) = 0.701 (C-128) 値. The compensation conversion code from the compensation code generator 3 is 0.013 (0128). After the adder 42, the output of the shifter 41 is added to 010.701 (0128). At the tv timing, C = Cr gets the start. Chroma color term, 0.714 (Cr-128) conversion. The shifter 43 performs an arithmetic right shift on the output 0.714 (C-128) of the adder 42, which is divided by two to obtain an output of 0.357 (C-128). The output from the shifter '43 is 0.357 (0128). After the subtractor 44 performs a subtraction, 0.013 (0128) is subtracted to obtain a conversion of the initial chrominance color term 0.344 (Cb-128) at the time sequence of tu value. The preset conversion code 1.402 (0128) from the preset code generator 2 passes through the adder 45 and the 0.357 (0128) output 移位 of the shifter 43 to obtain the output of 1_759 (C-128). The compensation conversion code 0.013 (0128) from the compensation code generator 3 passes through the adder 46 and the output of the adder 45 値 1.759 (0128). At the timing of tu, OCb obtains the initial chrominance color term 1.772 (Cb- 128) Conversion 値. This paper size applies Chinese National Standard (CNS) A4 grid (210X297 mm) I--U --- ^ 1 ---- rv —----- IT ------ 0,0— ( Please read the notes on the back before filling out this page). A7 B7 printed by the Consumer Cooperatives of the Central Procurement Bureau of the Ministry of Economic Affairs 5. Description of the Invention (7) The first latch 5 is locked at the time of tv timing. The preset conversion code 'of the coding generator 2 is obtained to obtain a desired Cr-in-R conversion 値, which is 1.402 (0: -128). The second latch 6 locks the output 値 of the adder 42 at the timing of itv to obtain a desired Cr_m-G conversion 値 ', that is, 0.714 (0-128). The third latch 7 locks the output 値 of the subtractor 44 at the timing of tu to obtain the desired cb-in-G conversion 値, that is, 0.3344 (Cb-.128). The fourth latch 8 'locks the output 値 of the adder 46 at the timing of tu to obtain the desired Cb-in-B conversion 値, that is, 1.772 (Cb-128). The first output combining unit 9 includes an adder, plus the output of the first latch 5 and the digital Y luminance signal to obtain the R color space signal. The second output combining unit 10 includes an adder 101 and a subtraction.器 102。 102. The adder 101 is used to add the outputs 第二 of the second latch 6 and the third interlock 7. The subtracter 102 is configured to subtract the output 値 of the adder 101 from the digital gamma luminance signal to obtain a G color space signal. The third output combining unit 11 'includes an adder to add the output of the Ϊ quad latch 8 and the digital Y luminance signal to obtain a B color space signal. That is, in terms of R color signals, it is known from (al): R = Y + 1.402 (Cr -.128), that is, with a preset conversion code of 1.402 (0128) 'at the tv timing, add Y brightness, that is, Available. For the G color signal, it can be known from (a.2) that G = Y-0.714 (Cr -128) _ 0.344 (Cb- 128) '. After formula (cl) and formula (c.2), we get G = Y-l / 2 (1.402) (Cr-128) -0.013 (Cr-128 > l / 2 [l / 2 (1.402) (Cb-128 ) +0.013 (Cb-128)] + 0.013 (Cb- 128), that is, G = Y-the output of latch 6 [l / 2 (1.402) (Cr-128) +0.013 (Cr-128)] _ ask The output of lock 7 is l / 2 [l / 2 (1.402) (Cb-128) + 0_013 (Cb-128)]-0.013 (Cb-128). By analogy, you can get the B color signal. Therefore, as long as you use The coding and compensation codes are used as the basic components, and the paper size is linearly combined. The Chinese National Standard (CNS) A4C (210X297 mm) is used. ——L --- 1 ---- ^ u · — (Read the notes on the back and fill out this page)
,tT 線 經濟部中央標準局貝工消費合作社印製 A7 ____ Β7 五、發明説明(θ ) 合,在適當時序獲得起始色度色彩項的轉換値,再依據標準轉換程 式,加上Y亮度訊號,即可完成YCbCr至RGB的色彩空間轉換。 第二圖,揭示本發明第二個由數位YCbCr亮度色度色彩空 間訊號’轉換至數位RGB色彩空間訊號的色彩空間訊號轉換裝置實 施例。在本實施例中,色彩空間訊號轉換裝置包括一個多工器1、 一個預設碼產生器21、一補償碼產生器31,一線性組合構件包括移 位器52,53,、加法器55,56、減法器51,54,第一閂鎖5、第二問鎖 ,6、第三閂鎖7、第四閂鎖.8,以及第一輸出結合單元9、第二輸出 結合單元10、第三輸出結合單元11。 此第二實施例大致上與前述第一實施例近似,然而,在本實 施例中,預設轉換礙系以0.714(0128)表示,爲預設項的轉換値,而 補償轉換碼則仍以0.013(0128)表示,爲補償項的轉換値。其中C, 在tu時序時,代表Cb色度色彩空間訊號,在tv時序時,代表Cr色 度色彩空間訊號。如果使用U與V取代Cb與Cr,以表示輸入色度 色彩空間訊號,則蕷設轉換碼與補償轉換碼,分別成爲0.714C與 0.013C。其中C,在tu時序時,代表U色度色彩空間訊號,在tv時 序時,代表V.色度色彩空間訊號。 對於第二實施麵言,既然起始色度色彩項0.714(Cr-128), 已經等於預設項,並不需要展開。而因爲起始色度色彩項ljOICCr-US), 0_344(Cb-128) 以及 1.772(Cb-128) , 並不等於預設或補償項 ,貝 [J 可以展開成爲: 1.402(Cr-128) = 2[0.714(Cr-128)-0.013(Cr-128)] 0.344(Cb-128) = 1/2[0.714(Cb-128)]-0.013(Cb-128) 1.772(Cb-128)=2[0.714(Cb-128)-0.013(Cb-128)]+1/2[0.714(Cb- 128)]+0.013(Cb-128) (讀先閔讀背面之注意事項再填寫本頁), tT Printed by the Central Standards Bureau of the Ministry of Economic Affairs, Shellfish Consumer Cooperatives, A7 ____ Β7 V. Description of the invention (θ), to obtain the conversion of the initial chromaticity and color terms at the appropriate timing, and then according to the standard conversion program, add Y brightness Signal, you can complete the YCbCr to RGB color space conversion. The second figure shows an embodiment of a color space signal conversion device for converting a digital YCbCr luminance chrominance color space signal 'to a digital RGB color space signal according to the present invention. In this embodiment, the color space signal conversion device includes a multiplexer 1, a preset code generator 21, a compensation code generator 31, and a linear combination member including shifters 52, 53, and an adder 55. 56, subtracters 51, 54, first latch 5, second interlock, 6, third latch 7, fourth latch. 8, and first output combining unit 9, second output combining unit 10, first Three output combining unit 11. This second embodiment is roughly similar to the aforementioned first embodiment. However, in this embodiment, the preset conversion obstacle is represented by 0.714 (0128), which is the conversion of the preset item, and the compensation conversion code is still 0.013 (0128) indicates that it is the conversion of the compensation term. Among them, C represents the Cb chromaticity color space signal at the time sequence of tu, and represents the Cr chromaticity color space signal at the time sequence of tv. If U and V are used instead of Cb and Cr to represent the input chrominance color space signal, the conversion code and compensation conversion code are set to 0.714C and 0.013C, respectively. Among them, C represents the U chroma color space signal at the time sequence of tu, and represents the V. chroma color space signal at the time sequence of tv. For the second implementation, since the initial chromaticity color item 0.714 (Cr-128) is already equal to the preset item, it does not need to be expanded. And because the initial chromaticity color terms ljOICCr-US), 0_344 (Cb-128) and 1.772 (Cb-128) are not equal to the preset or compensation terms, [J can be expanded into: 1.402 (Cr-128) = 2 [0.714 (Cr-128) -0.013 (Cr-128)] 0.344 (Cb-128) = 1/2 [0.714 (Cb-128)]-0.013 (Cb-128) 1.772 (Cb-128) = 2 [ 0.714 (Cb-128) -0.013 (Cb-128)] + 1/2 [0.714 (Cb- 128)] + 0.013 (Cb-128) (Read the precautions on the back of the book before filling in this page)
、1T 線 JL. 經濟部中央標準局員工消費合作社印装 A7 B7 五、發明説明(?) 線性組合構件,是依據上述展開式,將自預設碼產生器21 及補償碼產生器31而來的預設轉換碼與補償轉換碼組合,以得到該 三個起始色度色彩項的轉換値。 來自預設碼產生器21的預設轉換碼,經由減法器51,減去 來自補償碼產生器3的補償轉換碼。移位器52執行算術左向移位, 爲一個乘以二的運算,以在tv時序時,獲得起始色度色彩項 1.402(0-128)的轉換値。亦即,第一閂鎖5的輸出値爲了 2*[0.714(Cr-128)-0.013(Cr-128)]。而由(a.l)知 R = γ+1 4〇2(&_128)= Y+2[0.7l4(Cr-128)-a.013(Cr-l28)],亦即第〜閂鎖的輸出値,加上γ 値,即爲II値。 來自預設碼產生器21的預設轉換碼,經由移位器53執行萬 術右向移位(亦即除以二)。預設轉換碼被除以二後,再經過減法 器54,減去來自補償碼產生器31的補償轉換碼,而在挝時序時, 得到起始色度色彩項〇.344(Cb-128)的轉換値。 加法器55加上來自移位器52及53的輸出値。加法器56, 加上加I法器55的輸出値,以及來自補償碼產生器31的補償轉換碼, 在tu時序時,得到起始色度色彩項[772(0^28)的轉換値。 第一閂鎖5,在tv時序’鎖住移位器52的輸出値,得到所 欲的Cr-in-R的轉換値,亦即i.4〇2(Cr-l28)。第二問鎖6,在抆時 序,鎖住來自預設碼產生器21的預設轉換碼,以得到的轉 換値’亦即0.714(0128)。第三閂鎖7,在挝時序,鎖住減法器54 的輸出値,以得到Cb-in-G的轉換値,亦即〇.344(cb_128)。第四閂 鎖8 ’在tu時序’鎖住加法器56的輸出値,以得到所欲的仏化七 轉換値’亦即1.772(Cb-128)。 — 而第一至第三輸出結合單元9,丨〇,11等,有如前述實施例所 不般地作用,對於習於此項技藝之人士而言,當可輕易思及,在此 私紙浪纽適用中國国家榇準(CNS)从胁(2丨〇χ297公釐) (請先閱讀背面之注意事項再填寫本頁) 線 , 經濟部中央榡準局員工消«·合作,杜印製 A7 ._ . ._B7 _ 五、發明説明(丨〇 ) 不再贅述。 請參第三圖’其爲本發明之第三實施例,揭示另一由數位 YCbCr壳度色度色彩空間訊號,轉換至數位rgB色彩空間訊號的色 .彩空間訊號轉換裝置的實施例。在本實施例中,色彩空間訊號轉換 裝置包括一個多工器1、一個預設碼產生器22、一補償碼產生器 •32 ’ 一線性組合構件包括移位器62,63,65、加法器66、減法器 61,64,第一閂鎖5、第二閂鎖6、第三閂鎖7、第四閂鎖8,以及 第一輸出結合單元9 .、第二輸出結合單元10、第三輸出結合單元 11。 第三實施例與前述實施例大致相近,但是在本實施例中,預 設轉換碼設爲0.357(0128)、而補償轉換碼設爲0.013(C_128);其中. C,在tu時序時,代表Cb色度色彩空間訊號,在忟時序時,代表 Cr色度色彩空間訊號。如果使用U與V取代cb與Cr,以表示輸入 色度色彩空藺訊號,貝頓設轉換碼與補償轉換碼,分別成爲0.357C 與0.013C。其中C,在tu時序時,代表U色度色彩空間訊號,在tv 時序時,代表V色度色彩空間訊號。 因此,對於第三實施例,起始色度色彩項1.402(0-128), 0_714(Cr-128),0.344(Cb-128)以及 1.772(Cb-128),可以展開成爲: 0.714(Cr-128) = 2(0.357)(Cr-128) 1.402(Cr-128) = 2[2(0.357)(Cr-128)-0.013(Cr-128)] 0.344(Cb-128) = 0.357(Cb-128)-0.013(Cb-128) 1.772(Cb-128) =2[2(0.357)(Cb-128)]+0.357(Cb-128)-0.013(Cb-128) 線性組合構件,是依據上述的展開式,將自預設碼產生器 22及補償碼產生器32而來的預設轉換碼與補償轉換碼組合,以得到 起始色度色彩項的轉換値。 (#先閣讀背面之注意事項再填寫本頁) 訂 線 經濟部中央標準局員工消費合作社印製 A7 __;_;___B7__ —____ 五、發明説明(η ) 來自預設碼產生器22的預設轉換碼,經過移位器63,執行 算術左向移位,以將預設轉換碼乘以二,在.tv時序,得到起始色度 色彩項〇.714(Cr-128)的轉換値。 樹立器63的輸出〇.714(C-128),經減法器61,減去來自補 償碼產生器32的補償轉換碼。移位器62執行算術左向移位,以對減 法器61的輸出値乘以二,在忟時序,得到起始色度色彩項1 402(Cr_ 128)的轉換値。 ' 來自預設碼產生器22的預設轉換碼,經減法器64減去來自 補償碼產生器32的補償轉換碼,在tu時序,得到起始爸度色彩項 0.344(Cb-128)的轉換値。 移位器65,對移位器63的輸出値0.714(0128),執行算術 左向移位(乘以二)。而加法器66加上減法器64與移位器65的輸 出値,以在tu時序,得到起始色度色彩項1.772(Cb-128)的轉換値。 第一閂鎖5,.在tv時序,鎖住移位器62的輸出値',得到所 欲的Cr-in-R的轉換値,亦即1402(0128)。第二閂鎖6,在tv時 序’鎖住移位器63的輸出値.,以得到Cr_in-G的轉換値,亦即 -0.714(Cr-128)。第三閂鎖7 ’在tu時序,鎖住減法器64的輸出値, 以得到Cb-in-G的轉換値,亦即〇.344(Cb-128)。第四閂鎖8,在tu 時序,鎖住加法器66的輸出値,以得到所欲的Cb-in-B轉換値,亦 gp 1.772(Cb-128) 〇 而第一至第三輸出結合單元9,10,11等,有如前述實施例所 示般地作用,對於習於此項技藝之人士而言,當可輕易思及,在此 亦不再贅述。 . 請參第四圖,其爲本發明之第四實施例,揭示另一由數位 YCbCr亮度色度色彩空間訊號,轉換至數位RGB色彩空間訊號的色 本紙張尺度適用中國國家橾率(CNS ) Μ规格(210X297公釐) (#先閡讀背面之注意事項再填寫本頁)Line 1T JL. Printed by A7 B7 of the Consumer Cooperatives of the Central Standards Bureau of the Ministry of Economic Affairs 5. The description of the invention (?) The linear combination component is based on the above expansion formula, and will come from the preset code generator 21 and the compensation code generator 31. The preset conversion code and the compensation conversion code are combined to obtain the conversion 値 of the three starting chrominance color items. The preset conversion code from the preset code generator 21 subtracts the compensation conversion code from the compensation code generator 3 via the subtractor 51. The shifter 52 performs an arithmetic leftward shift, which is a multiplication by two operation to obtain a conversion 値 of the initial chrominance color term 1.402 (0-128) at the tv timing. That is, the output of the first latch 5 is 2 * [0.714 (Cr-128) -0.013 (Cr-128)]. And (al) knows that R = γ + 1 4〇2 (& _128) = Y + 2 [0.7l4 (Cr-128) -a.013 (Cr-l28)], that is, the output of the ~ latch値, plus γ 値, is II 値. The preset conversion code from the preset code generator 21 performs a universal right shift (ie, divides by two) via the shifter 53. The preset conversion code is divided by two, and then passes through the subtractor 54 to subtract the compensation conversion code from the compensation code generator 31. At the time of Laos, the initial chroma color term 0.334 (Cb-128) is obtained. Conversion 値. The adder 55 adds the outputs 値 from the shifters 52 and 53. The adder 56 adds the output 値 of the adder 55 and the compensation conversion code from the compensation code generator 31 to obtain the conversion 値 of the initial chrominance color term [772 (0 ^ 28) at the timing of tu. The first latch 5 locks the output 値 of the shifter 52 at tv timing ', and obtains the desired Cr-in-R conversion 値, i.e., i.042 (Cr-l28). The second question lock 6, locks the preset conversion code from the preset code generator 21 in the time sequence, to obtain the conversion 値 ', that is, 0.714 (0128). The third latch 7 locks the output 値 of the subtractor 54 at the timing of Laos to obtain the conversion 値 of Cb-in-G, which is 0.344 (cb_128). The fourth latch 8 'locks the output of the adder 56 at the timing of tu to obtain the desired conversion of seven conversions', that is, 1.772 (Cb-128). — And the first to third output combining units 9, 丨 〇, 11, etc., have the functions that are different from those in the previous embodiment. For those who are accustomed to this technique, they can easily think about it. New Zealand applies to China National Standards (CNS) Congxiu (2 丨 〇χ297mm) (Please read the precautions on the back before filling out this page) Line, the Central Government Standards Bureau staff of the Ministry of Economic Affairs «· cooperation, Du printed A7 ._. ._B7 _ 5. Description of the Invention (丨 〇) I will not repeat them. Please refer to the third figure ', which is a third embodiment of the present invention, and discloses another embodiment of a color space signal conversion device that converts a digital YCbCr shell chromaticity color space signal to a digital rgB color space signal. In this embodiment, the color space signal conversion device includes a multiplexer 1, a preset code generator 22, a compensation code generator 32 ', and a linear combination member including shifters 62, 63, 65, and an adder. 66. Subtractors 61, 64, first latch 5, second latch 6, third latch 7, fourth latch 8, and first output combining unit 9, second output combining unit 10, third Output combining unit 11. The third embodiment is roughly similar to the previous embodiment, but in this embodiment, the preset conversion code is set to 0.357 (0128) and the compensation conversion code is set to 0.013 (C_128); where. C, at the time of tu, represents The Cb chromaticity color space signal represents the Cr chromaticity color space signal at the time of timing. If U and V are used instead of cb and Cr to represent the input chroma and color space signal, Beton sets the conversion code and compensation conversion code to 0.357C and 0.013C, respectively. Among them, C represents the U chromaticity color space signal at the time sequence of tu, and represents the V chromaticity color space signal at the time sequence of tv. Therefore, for the third embodiment, the initial chromaticity color items 1.402 (0-128), 0_714 (Cr-128), 0.344 (Cb-128), and 1.772 (Cb-128) can be expanded into: 0.714 (Cr- 128) = 2 (0.357) (Cr-128) 1.402 (Cr-128) = 2 [2 (0.357) (Cr-128) -0.013 (Cr-128)] 0.344 (Cb-128) = 0.357 (Cb-128 ) -0.013 (Cb-128) 1.772 (Cb-128) = 2 [2 (0.357) (Cb-128)] + 0.357 (Cb-128) -0.013 (Cb-128) The linear combination is based on the above expansion Formula, the preset conversion code and the compensation conversion code from the preset code generator 22 and the compensation code generator 32 are combined to obtain the conversion of the initial chrominance color term. (#Xiange read the notes on the back before filling this page) Printed by the Consumer Standards Cooperative of the Central Standards Bureau of the Ministry of Economic Affairs A7 __; _; _B7__ —____ V. Description of the invention (η) Set the conversion code and perform an arithmetic leftward shift through the shifter 63 to multiply the preset conversion code by two. At the time of .tv, get the conversion of the initial chroma color item 0.714 (Cr-128). . The output of the setter 63 is 0.714 (C-128), and the compensation conversion code from the compensation code generator 32 is subtracted by the subtractor 61. The shifter 62 performs an arithmetic leftward shift to multiply the output 値 of the subtracter 61 by two, and at a timing of 忟, a conversion 値 of the initial chrominance color term 1 402 (Cr_128) is obtained. 'The preset conversion code from the preset code generator 22 is subtracted from the compensation conversion code from the compensation code generator 32 by the subtractor 64, and at the time of tu, the conversion of the initial dad color item 0.344 (Cb-128) is obtained. value. The shifter 65 performs an arithmetic left shift (multiplying by two) on the output of the shifter 63 by 0.714 (0128). The adder 66 adds the output 値 of the subtracter 64 and the shifter 65 to obtain the conversion 値 of the initial chrominance color term 1.772 (Cb-128) at the timing of tu. The first latch 5, at tv timing, locks the output 値 'of the shifter 62 to obtain a desired Cr-in-R conversion 値, that is, 1402 (0128). The second latch 6 locks the output 値. Of the shifter 63 at tv timing ′ to obtain the Cr_in-G conversion 値, that is, -0.714 (Cr-128). The third latch 7 'locks the output 値 of the subtracter 64 at the timing of tu to obtain the Cb-in-G conversion 値, which is 0.344 (Cb-128). The fourth latch 8, at the timing of tu, locks the output 値 of the adder 66 to obtain the desired Cb-in-B conversion 亦, also gp 1.772 (Cb-128) 〇 and the first to third output combining unit 9, 10, 11 and so on, have the effect as shown in the foregoing embodiment, for those who are accustomed to this technique, it can be easily considered, and it will not be repeated here. Please refer to the fourth figure, which is the fourth embodiment of the present invention, which reveals another color scale paper converted from digital YCbCr luminance chrominance color space signal to digital RGB color space signal. The paper size is applicable to China National Standard (CNS) Μ specifications (210X297 mm) (#Read the precautions on the back before filling in this page)
經濟部中央標準局員工消費合作社印製 A7 ______B7 _ 五、發明説明(汉) 彩空間訊號轉換裝置的實施例。在本實施例中,色彩空間訊號轉換 裝置包括一個多工器1、一個預設碼產生器23、一補償碼產生器 33,一線性組合構件包括移位器72,73,74、加法器76、減法器 71,75,第一閂鎖5、第二閂鎖ό、第三閂鎖7、第四閂鎖8,以及 第一輸出結合單元9、第二輸出結合單元10、第三輸出結合單元 11 ° 第四實施例大致與前述實施例相似,但是在本實施例中,預 .設轉換碼設爲1.428(c-128)、而補償轉換碼設爲0.013(c-128);其中 C,在tu時序時,代表Cb色度色彩空間訊號,在tv時序時,代表 Cr色度色彩空間訊號。如果使用U與V取代Cb與Cr ’以表示輸入 色度色彩空間訊號,則預設轉換碼與補償轉換碼,分別成爲1.428C 與0.013C。其中C,在tu時序時,代表U色度色彩空間訊號,在tv 時序時,代表V色度色彩空間訊號。 因此,對於第四實施例,起始色度色彩項1.402(Cr-128), 0.714(CM28),0.344(Cb-128)以及 1.772(Cb-128),可以展開如下的程 式: .1.402(Cr-128) = 2[1/2(1.428)(C「-128)-0.013(Cr-128)] 0.714(Cr-128) = 1/2 (1.428)(Cr-128) 0.344(Cb-128) = 1/2[1/2(1.428)(Cb-128)]-0.013(Cb-128) 1.772(Cb-128) = 1.428(Cb-128) +1/2[1/2(1.428)(Cb-128)]-0.013(Cb-128) 線性組合構件,是依據上述展開式,將自預設碼產生器23 及補償碼產生器33而來的預設轉換碼與補償轉換碼組合,以得到起 始色度色彩項的轉換値。. 來自預設碼產生器23的預設轉換碼,經過移位器73,執行 算術右向移位(除以二),在tv時序,得到起始色度色彩項 210X297公釐) (許先S讀背面之注意事項再填寫本頁) •f 線 經濟部中央標準局員工消費合作杜印製 A7 __B7 五、發明説明(丨3 ) 0.714(Cr-128)的轉換値。 移位器73的輸出0.714(C-128),經減法器71 ',減去來自補 償碼產生器33的補償轉換碼。移位器72執行算術左向移位,以對減 法器71的輸出値乘以二,在tv時序,得到起始色度色彩項! 4〇2(Cr_ 128)的轉換値。 ' 移位器74,對移位器73的輸出値〇.714(C-128),執行算術 右向移位(除以二)。而減法器75將移位器74的輸出値,減去來自 ‘補償碼產生器33的補償轉換碼,在加時序,得至彳起始色度色彩項 0.344(Cb-128)的轉換値。 加法器76,加上來自預設碼產生器23的預設轉換碼,以及 減法器75的輸出値0.344(Cb-128),在tu時序,得到起始色度色彩項 1.772(Cb-128)的轉換値。 第一閂鎖5,在tv時序,鎖住移位器72的輸出値,得到所· 欲的Cr-in-R的轉換値,亦β卩1.4〇2(Cr-128)。第二閂鎖6,在tv時 序,鎖住移位器73的輸出値,以得到Cr_in_G的轉換値,亦即 0.714(0128)。第三閂鎖7,在tu時序,鎖住減法器75的輸出値, 以得到Cb-in-G的轉換値,亦艮卩〇.344(Cb-128)。第四閂鎖8,在tu 時序,鎖住加法器76的輸出値,以得到所欲的cb-in-B轉換値,亦 即 1.772(Cb-128)。 而第一至第三輸出結合單元9,10,11等,有如前述實施例戶斤 示般地作用,對於習於此項技藝之人士而言,當可輕易思及,在此 不再贅述。 請參第五圖,爲本發明之第五實施例,掲示另一由數位 YCbCr亮度色度色彩空間訊號,轉換至數位RGB色彩空間訊號的色 彩空間訊號轉換裝置的實施例。在本實施例中,色彩空間訊號轉換 本紙張尺度逋用中國國家揉準(CNS ) A4说格(210X297公嫠) (請先閣讀背面之注意事項再填寫本頁) 訂 線_ 五、發明説明(协) 裝置包括一個多工器1、一個預設碼產生器24、一補償碼產生器 34,一線性組合構件包括移位器82,83、加法器81,84 ,第一閂鎖 5、第二閂鎖6、第三閂鎖7、第四問鎖8,以及第一輸出結合單元 9、第二輸出結合單元10、第三輸出結合單元11。 ' 第五實施例大致與前述實施例相似,但是在本實施例中,預 竣轉換碼設爲〇.714(C-128)、而補償轉換碼設爲〇.344(C-128);其中 C ’在tu時序時’代表Cb色度色彩空間訊號,在tv時序時,代表 Cr色度色彩空間訊號.。如果使用ϋ與V取代Cb與Cr,以表示輸入 色度色彩空間訊號’則預設轉換碼與補償轉換碼,分別成爲〇.714C 與0.344C。其中C,在tu時序時,代表U色度色彩空間訊號,在tv 時序時,代表V色度色彩空間訊號。 因此,對於此一第五實施例而言,既然預設轉換碼與補償轉 換碼,分別等於起始色度色彩項0.714(0-128)以及0.344(Cb-128)的 轉換値。因而只需對另二起始色度色彩項1.402(Cr-1.28)以及 l-772(Cb-128)展開如下的程式: 1.402(Cr-128) = 0.714(Cr-128)+2[0.344(Cr-128)] 1.772(Cb-128) = 2[0.714(Cb-128)]+0.344(Cb-128) 線性組合構件,是依據上述展開式,將自預設碼產生器24. 及補償碼產生器34而來的預設轉換碼與補償轉換碼組合,以得到該 二起始色度色彩項的轉換値。 來自補償碼產生器34的補償轉換碼,經移位器83,執行左 向移位(乘以二)。加法器81加上來自預設碼產生器24的預設轉換 碼,以及移位器83的輸出値,在tv時序,得到起始色度色彩項 1.402(Cr-128)的轉換値。 來自預設碼產生器24的預設轉換碼,經過移位器82 ,執行 1——ί —— ρ (詩先Μ讀背面之注意事項再填寫本頁) 訂 經濟部中央襟準局員工消費合作杜印製 ^纸張尺度適用中國國家標準(〇灿)八4規格(210父297公釐) 經濟部中央標準局貞工消費合作社印褽 A7 B7 五、發明説明(丨5 ) 算術左向移位(乘以二)。加法器84,加上移位器82的輸出値,以 及來自補償碼產生器34的補償轉換碼,在加時序,得到起始色度色 彩項1.772(Cb-128)的轉換値。 第一閂鎖5 ’在tv時序,鎖住加法81的輸出値/得到所欲 的Cr-in-R的轉換値,亦即〗.402(0128)。第二閂鎖6,在tv時序, 鎖住來自預設碼產生器24的預設轉換碼,以得到Cr-in-G的轉換 値,亦即0.714(&-128)。第三閂鎖7,在tu時序,鎖住來自補償碼 .產生器34的補償轉換碼,以得到Cb如G的轉換値,亦即〇 344(Cb_ 128)。第四閂鎖8,在tu時序,鎖住加法器84的輸出値,·以得到所 欲的 Cb-in-B 轉換値,亦即 i_772(Cb-128) 〇 而第一至第三輸出結合單元9,1〇,11等,有如前述實施例所 示般地作用,對於習於此項技藝之人士而言,當可輕易思及,在此 不再贅述。' 在前述所列數個實施例中’預設碼產生器及補償碼塗生器, 可以使用檢視表。如果,將預設碼產生器及補償碼產生器,以一個 檢視表單元(unit)來實施,如同第六圖所示,則預設碼產生器及補償 碼產生器將只包括一簡單的電路,例如記憶裝置,可因而減少本發 明色彩空間轉換裝置的成本。 如第六圖所示’檢視表12包括一包含預設轉換碼的預設碼 部份121,以及一包含補償轉換碼的補償碼部份122。當所選的色度 色彩空間訊號Cb或Cr ’查閱檢視表單元12,會經由第〜輸出(p)及 第一輸出(C) ’輸出一對應的字碼(codeword),而該字碼包括一來自 預設碼部份121的預設轉換碼,以及一來自補償碼部份122的補償轉 換碼。其中該預設轉換碼,係由第一輸出(P)提供,而該補償轉換 碼,係由第二輸出(C)所提供。 雖然在上述揭示的某些實施例中’'選用起始色度色彩項的轉 本紙浪尺度適用中國國家榇準(CNS ) A4規格(210X297公釐) (詩'^聞讀背面之注意事項再填寫本頁) ------------Γίό!—— 訂 ί |丨| 知——— — — — — —____ 五、發明説明(馆) A7 B7 換値作爲預設轉換碼,事實上,亦可使用起始色度色彩項的轉換 値,作爲補償轉換碼,這對於習於此項技藝之人士而言,係顯而易 知的,因此,.細節不在此贅述。 該注意的是,雖然本發明的較佳實施例以硬體電路的方塊圖 表示,但是,本發明可以容易而有效率地使用微處理器 (MicropiOcessoi·)以及相關的系統記憶體,以達到轉換的運算。 由上述可知,本發明使用預設轉換碼以及補償轉換碼,分時 共用於雨個色度色彩空間訊號,以完成一由數位亮度色度色彩空間 訊號,轉換至數位RGB色彩空間訊號的色彩空間訊號轉換裝置。是 以,本發明只要在預設碼產生器或補償碼產生器,使用檢視表,或 是乘法器,即可達到前述的發明目的,較之習知三個以上的檢視 表,可有效的簡化電路、降低成本。 .當本發明以上述數個實施例作說明時,並不代表本發明的範 圍,僅限於所揭示的實施例中。對於習於此項技藝之人士而言,對 本發明作顯而易知的修改’或是使用均等物替代其中的元件’而不 脫本發明之精神與範圍,仍應爲本發明所涵蓋才是。 ----„---K-------- (#先聞#背面之注意事項再填寫本頁) !.1T------線 經濟部中央榡準局員工消費合作社印製Printed by the Consumer Cooperatives of the Central Standards Bureau of the Ministry of Economic Affairs A7 ______B7 _ V. Description of the Invention (Chinese) Example of color space signal conversion device. In this embodiment, the color space signal conversion device includes a multiplexer 1, a preset code generator 23, a compensation code generator 33, and a linear combination member including shifters 72, 73, 74, and an adder 76. Subtractors 71, 75, first latch 5, second latch 6, third latch 7, fourth latch 8, and first output combining unit 9, second output combining unit 10, third output combining The fourth embodiment of the unit 11 ° is substantially similar to the previous embodiment, but in this embodiment, the preset conversion code is set to 1.428 (c-128) and the compensation conversion code is set to 0.013 (c-128); where C At the time sequence of tu, it represents the Cb color space signal, and at the time sequence of TV, it represents the Cr color space signal. If U and V are used instead of Cb and Cr to represent the input chrominance color space signal, the preset conversion code and compensation conversion code become 1.428C and 0.013C, respectively. Among them, C represents the U chromaticity color space signal at the time sequence of tu, and represents the V chromaticity color space signal at the time sequence of tv. Therefore, for the fourth embodiment, the initial chrominance color items 1.402 (Cr-128), 0.714 (CM28), 0.344 (Cb-128), and 1.772 (Cb-128) can be expanded as follows: .1.402 (Cr -128) = 2 [1/2 (1.428) (C 「-128) -0.013 (Cr-128)] 0.714 (Cr-128) = 1/2 (1.428) (Cr-128) 0.344 (Cb-128) = 1/2 [1/2 (1.428) (Cb-128)]-0.013 (Cb-128) 1.772 (Cb-128) = 1.428 (Cb-128) +1/2 [1/2 (1.428) (Cb -128)]-0.013 (Cb-128) The linear combination component is a combination of the preset conversion code and the compensation conversion code from the preset code generator 23 and the compensation code generator 33 according to the above expansion formula to obtain Conversion of starting chrominance color items 値. The preset conversion code from the preset code generator 23, through the shifter 73, performs an arithmetic right shift (divided by two), and obtains the starting color at tv timing Degree color item 210X297mm) (Xu S read the notes on the back and then fill out this page) • f Consumers' cooperation of the Central Bureau of Standards of the Ministry of Economic Affairs printed A7 __B7 V. Description of the invention (丨 3) 0.714 (Cr-128 ). 値. The output of the shifter 73 is 0.714 (C-128), which is subtracted from the compensation code generator 33 by the subtractor 71 '. The shifter 72 performs an arithmetic leftward shift to multiply the output 値 of the subtracter 71 by two, and at the tv timing, the initial chrominance color term is obtained! The conversion 4 of 402 (Cr_128). 'Shifter 74 performs an arithmetic right shift (divided by two) on the output 値 .714 (C-128) of shifter 73. Subtractor 75 subtracts the output of shifter 74 by 値The compensation conversion code from the 'compensation code generator 33' is added at the timing to obtain a conversion of 彳 initial chroma color term 0.344 (Cb-128). The adder 76 adds the Set the conversion code and the output 値 0.344 (Cb-128) of the subtractor 75 to obtain the conversion of the initial chroma color term 1.772 (Cb-128) at the time sequence tu. The first latch 5, at the time sequence tv, lock Hold the output 移位 of the shifter 72 to get the desired conversion of Cr-in-R, also β 卩 1.42 (Cr-128). The second latch 6, locks the shifter at tv timing The output 値 of 73 is used to obtain the conversion Cr of Cr_in_G, which is 0.714 (0128). The third latch 7 locks the output 値 of the subtractor 75 at the timing of tu to obtain the conversion 値 of Cb-in-G. That is, 0.344 (Cb-128). The fourth latch 8 locks the output 値 of the adder 76 at the timing of tu to obtain the desired cb-in-B conversion 値, which is 1.772 (Cb-128). The first to third output combining units 9, 10, 11 and the like function as the household example in the previous embodiment. For those skilled in the art, it can be easily considered and will not be repeated here. Please refer to the fifth figure, which is a fifth embodiment of the present invention, showing another embodiment of a color space signal conversion device that converts a digital YCbCr luminance chrominance color space signal to a digital RGB color space signal. In this example, the color space signal is converted to the paper size using the Chinese National Standard (CNS) A4 scale (210X297 cm) (please read the precautions on the back before filling out this page) Thread _ V. Invention Explanation (co) The device includes a multiplexer 1, a preset code generator 24, a compensation code generator 34, a linear combination component including shifters 82, 83, adders 81, 84, and a first latch 5 , Second latch 6, third latch 7, fourth interlock 8, and first output combining unit 9, second output combining unit 10, and third output combining unit 11. 'The fifth embodiment is substantially similar to the previous embodiment, but in this embodiment, the pre-completion conversion code is set to 0.714 (C-128) and the compensation conversion code is set to 0.344 (C-128); where C 'at tu timing' represents Cb chromaticity color space signal, and at tv timing, represents Cr chromaticity color space signal. If ϋ and V are used instead of Cb and Cr to represent the input chrominance color space signal ’, the preset conversion code and compensation conversion code will become 0.714C and 0.344C, respectively. Among them, C represents the U chromaticity color space signal at the time sequence of tu, and represents the V chromaticity color space signal at the time sequence of tv. Therefore, for this fifth embodiment, since the preset conversion code and the compensation conversion code are respectively equal to the conversion 値 of the initial chroma color terms 0.714 (0-128) and 0.344 (Cb-128). Therefore, it is only necessary to develop the following formulas for the other two initial chromaticity color items 1.402 (Cr-1.28) and l-772 (Cb-128): 1.402 (Cr-128) = 0.714 (Cr-128) +2 [0.344 ( Cr-128)] 1.772 (Cb-128) = 2 [0.714 (Cb-128)] + 0.344 (Cb-128) The linear combination of components is based on the above-mentioned expansion formula, and will be derived from the preset code generator 24. and the compensation code The preset conversion code and the compensation conversion code from the generator 34 are combined to obtain the conversion chirp of the two initial chrominance color items. The compensation conversion code from the compensation code generator 34 is subjected to a left shift (multiplied by two) via the shifter 83. The adder 81 adds the preset conversion code from the preset code generator 24 and the output 値 of the shifter 83 to obtain a conversion 値 of the initial chroma color term 1.402 (Cr-128) at the tv timing. The preset conversion code from the preset code generator 24 passes through the shifter 82 and executes 1——ί —— ρ (Notes on the back of the poem before reading this page, and then fill in this page). Cooperative Du printed ^ Paper size applies Chinese national standard (〇 Chan) 8 4 specifications (210 father 297 mm) The Central Standards Bureau of the Ministry of Economy Zhengong Consumer Cooperative Seal A7 B7 V. Description of invention (5) Arithmetic left Shift (multiply by two). The adder 84 adds the output 値 of the shifter 82 and the compensation conversion code from the compensation code generator 34 to obtain a conversion 値 of the starting chroma color item 1.772 (Cb-128) at the timing of addition. The first latch 5 'locks the output of the addition 81 at the tv timing 値 / gets the desired Cr-in-R conversion 値, i.e., 402 (0128). The second latch 6 locks the preset conversion code from the preset code generator 24 at tv timing to obtain the Cr-in-G conversion 値, which is 0.714 (& -128). The third latch 7 locks the compensation conversion code from the compensation code generator 34 at the timing of tu to obtain the conversion 値 of Cb such as G, that is, 0 344 (Cb_128). The fourth latch 8 locks the output of the adder 84 at the timing of tu, to obtain the desired Cb-in-B conversion, i.e., i_772 (Cb-128). The first to third outputs are combined. Units 9, 10, 11 and so on have the same functions as shown in the previous embodiment. For those skilled in the art, it can be easily considered and will not be repeated here. 'In the several embodiments listed above,' the preset code generator and the compensation code generator may use a look-up table. If the preset code generator and the compensation code generator are implemented in a look-up table unit, as shown in the sixth figure, the preset code generator and the compensation code generator will only include a simple circuit. , Such as a memory device, thereby reducing the cost of the color space conversion device of the present invention. As shown in the sixth figure, 'view table 12 includes a preset code portion 121 including a preset conversion code, and a compensation code portion 122 including a compensation conversion code. When the selected chroma color space signal Cb or Cr 'look up the look-up table unit 12, a corresponding codeword is output through the first output (p) and the first output (C)', and the word code includes a codeword from The preset conversion code of the preset code portion 121 and a compensation conversion code from the compensation code portion 122. The preset conversion code is provided by the first output (P), and the compensation conversion code is provided by the second output (C). Although in some of the embodiments disclosed above, the paper scale of the original paper with the chromaticity and color items selected is applicable to the Chinese National Standard (CNS) A4 specification (210X297 mm) (Poem '^ Notes on the back of the reading (Fill in this page) ------------ Γίό! —— Order ί | 丨 | Know ———— — — — — —____ V. Description of the Invention (Gallery) A7 B7 Change 値 as a preset conversion In fact, it is also possible to use the conversion 起始 of the starting chrominance color item as a compensation conversion code. This is obvious and obvious to those skilled in this art, so the details are not repeated here. It should be noted that although the preferred embodiment of the present invention is represented by a block diagram of a hardware circuit, the present invention can easily and efficiently use a microprocessor (MicropiOcessoi ·) and related system memory to achieve conversion Operation. It can be known from the above that the present invention uses a preset conversion code and a compensation conversion code, which are used in time sharing for rain color space signals to complete a color space converted from a digital luminance color space signal to a digital RGB color space signal. Signal conversion device. Therefore, as long as the present invention uses a look-up table or a multiplier in the preset code generator or the compensation code generator, the above-mentioned object of the invention can be achieved. Compared with three or more conventional look-up tables, it can effectively simplify Circuit, reducing costs. When the present invention is described with the above several embodiments, it does not represent the scope of the present invention, and is limited to the disclosed embodiments. For those skilled in the art, obvious modifications of the present invention, or the use of equivalents to replace the elements therein, without departing from the spirit and scope of the present invention, should still be covered by the present invention. . ---- „--- K -------- (Notes on the back of # 先 闻 # before filling out this page) !. 1T ------ Employee Cooperatives of Central Bureau of Standards, Ministry of Economic Affairs Print
Μ %1/ S !Ν _- .JH____^___;__- i公Μ% 1 / S! Ν _- .JH ____ ^ ___; __- i 公