TW201026022A - Method of color components compression - Google Patents

Method of color components compression Download PDF

Info

Publication number
TW201026022A
TW201026022A TW97150124A TW97150124A TW201026022A TW 201026022 A TW201026022 A TW 201026022A TW 97150124 A TW97150124 A TW 97150124A TW 97150124 A TW97150124 A TW 97150124A TW 201026022 A TW201026022 A TW 201026022A
Authority
TW
Taiwan
Prior art keywords
video data
pixel
color
color component
color components
Prior art date
Application number
TW97150124A
Other languages
Chinese (zh)
Other versions
TWI396431B (en
Inventor
Ying-Ru Chen
Original Assignee
Himax Tech 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 Himax Tech Ltd filed Critical Himax Tech Ltd
Priority to TW97150124A priority Critical patent/TWI396431B/en
Publication of TW201026022A publication Critical patent/TW201026022A/en
Application granted granted Critical
Publication of TWI396431B publication Critical patent/TWI396431B/en

Links

Abstract

A method of color components compression is provided. In the present method, when receiving video data encoded by a 4: 4: 4 sampling format, color components of each set of neighboring pixels in the video data is down-sampled and a first difference of the color components between the video data before and after down-sampling in a down-sampling mode is calculated. Then, the color components of each pixel in the video data are truncated and a second difference of the color components between the video data before and after truncation in a truncation mode is calculated. The first difference and the second difference are compared and the down-sampling mode or the truncation mode that has a smaller difference is selected to compress the video data into a 4: 2: 2 sampling format.

Description

201026022 HM-20U8-0045-TW 29015twf.doc/n 六、發明說明: 【發明所屬之技術領域】 本發明是有關於一種壓縮的方法’且特別是有關於一種 顏色分量的壓縮方法。 【先前技術】201026022 HM-20U8-0045-TW 29015twf.doc/n VI. Description of the Invention: [Technical Field] The present invention relates to a method of compression and in particular to a method of compressing a color component. [Prior Art]

在一般積體電路(Integrated Circuit,1C)的設計中,積體電 路與記憶體之間傳輸的資料尺寸大小被認為是限制積體電路 性能的主要因素。為了要減少傳輸資料的時間與儲存資料的空 間,在資料尺寸大小相對來說龐大時,通常會在儲存資料於記 憶體之刖執行資料壓縮(data compression)程序。 在一般視訊資料壓縮的程序中,視訊資料係被壓縮成標準 的壓縮格式’例如 H.261、H.263、MPEG-1、MPEG-2 與 MPEG-4,然後被壓縮的視訊資料會被儲存到光碟(c〇mpactIn the design of a general integrated circuit (1C), the size of the data transmitted between the integrated circuit and the memory is considered to be a major factor limiting the performance of the integrated circuit. In order to reduce the time for transferring data and the space for storing data, when the size of the data is relatively large, the data compression program is usually executed after the data is stored in the memory. In the general video data compression process, the video data is compressed into a standard compression format such as H.261, H.263, MPEG-1, MPEG-2 and MPEG-4, and then the compressed video data is stored. To the disc (c〇mpact

Disc, CD)或數位影音光碟(Digital Video Disc,DVD)中。當需 要。I取這些被儲存的視訊資料時,壓縮資料會先被解 後儲存到記憶體中。由於解壓縮資料的位元速率^因: 可將-些能夠即時處理資料之簡單解壓縮的 積體電路與記憶體之間的資料路徑上。 μ用在 然而,當視訊資料被產縮時,一些視訊資料的細 述的壓縮過程中喪b故此,如何在不影響視訊資料品产 況下將視訊㈣壓縮成較小的m尺寸大小 電$ 造廠商要解決駐要議題。 冊4路1 【發明内容】 有鑑於此,本發明提供一種顏色分量的壓縮方法,此方法 201026022 HM-2008-0045-TW 29015twf.doc/n 中利用兩種壓縮模式來壓縮視訊資料,因此能夠降低視訊資料 的尺寸大小且同時維持視訊資料的品質。 為了達到上述或其他目的,本發明提供一種顏色分量的麗 縮方法。此方法首先接受一筆以4:4:4取樣格式編碼的視訊資 料,此視訊資料包括多個像素的資料。接著,在一降低取樣模 式中’將視訊資料中之多組鄰近像素的顏色分量降低取樣’並 計算此視訊資料在被降低取樣前後的第一差值。接著,在一截 斷模式中’則是將視訊資料中各像素之顏色分量截斷,並計算 ❿此視訊資料在被截斷前後的第二差值《^最後則比較第一差值與 第二差值’並選擇降低取樣模式或截斷模式中具有較小差值者 來將視訊資料壓縮成一 4:2:2取樣格式。 在本發明的一實施例中,視訊資料會被分解成多組鄰近像 素,且每一組鄰近像素包括兩個像素。 在本發明的一實施例中,上述將視訊資料中每一組鄰近像 素的顏色分量進行降低取樣的步驟係在每一組鄰近像素中的 兩個像素之中’保留其中一個像素的顏色分量,且忽略另一個 像素的顏色分量。 ® 在本發,的一實施例中,上述將視訊資料中每一組鄉近像 素的顏色分1進行截斷的步驟係將視訊資料中各像素之顏色 分量的最後四個位元截斷。 鋇巴 在本發明的一實施例中,上述將視訊資料中每一組鄰近像 素,顏色分量進行截_步㈣包括計算各像素之顏色分量 的,後四個位元的十進位值(deeimal’且判定此十進位 ,疋否大於8。若十進位值大於8時,則將顏色分量 位元進位1。 在本發明的—實施例中,在上述將視訊資料壓縮為4:2:2 201026022 WM-ZUU8-UU45-TW 29015twf.doc/n 取樣格式後,本方法還進一步將壓縮的視訊資料存入記憶體 中。 〜一 在本發明的一實施例中,在上述將壓縮的視訊資料存入記 憶體之刖,本方法還包含在各像素之亮度(luminance)的最後— 個位元儲存一個指標’此指標紀錄被選擇用以壓縮像素之 分量的壓縮模式。 3巴 在本發明的一實施例中,在上述將壓縮的視訊資料存入記 憶體之後,本方法還包括將記憶體中的壓縮視訊資料解壓縮°。 在本發明的一實施例中,上述將記憶體中的壓縮視訊 解壓縮之步驟係先從記憶體存取被壓縮視訊資料之各像 指標’據以判斷壓縮像素之顏色分量的壓縮模式。假設壓縮^ 式被判定為降低取樣模式,則計算鄰近像素之顏色分量的、 ,和(亦即將左邊像素的顏色分量與右邊像素的顏色方量加總 ^除以二)’並以此加權總和作為每—組鄰近像素集之間之&amp; =。親縮模式被判定為截斷模式,則將所紀錄之 刀量位移四個位元且將顏色分量之最後四個位 兀補二最後’以4:4:4取樣格式輸出被解壓縮的視訊資料。 在本^月的-實施例中,在以Ο:4取樣格式輸出被解壓 = ’本方法還檢查是否各像素相鄰近之兩個鄰 ^素被,縮後的免度相同但與此像素被解_後的亮度 素_^形成立’則此像素的顏色分量會被修改為鄰近像 量與實施例中’上述之顏色分量包括咖 本發明係針騎減之視崎 斷運算,且將壓縮後的視替料魅士 /直接降低取樣與截 的視訊貝科與原本的視訊資料比較以決定 201026022 HM-^UU8-UU45-TW 29015twf.doc/n 壓縮視訊資料的最佳模式。如此,可降低視訊資料的顏色分量 之尺寸大小且可將視訊資料的品質保持在一個可接受的範^ 内。基於上述,本發明可增加視訊資料的傳送速率,同時也可 減少用以儲存視訊資料的空間。 為讓本發明之上述特徵和優點能更明顯易懂,下文特舉實 施例’並配合所附圖式作詳細說明如下。 只 【實施方式】 ❹ 彩色視訊資料(⑶video data)通常是以亮度(iuminance) 及顏色分量(color components)的格式來傳送,其中,亮度保留 原本視訊資料百分之九十的細節。當對彩色視訊資料進行失真 壓縮(distortion compression)時,亮度的失真容易被人眼辨識出 來。故此’本發明提供一種顏色分量的壓縮方法。 視訊資料通常是用真(real)4:4:4取樣格式(sampling format) 傳送或者是以4:2:2内插所得之偽(pseudo)4:4:4取樣格式傳 送。雖然這兩種視訊資料看起來都像是4:4:4取樣格式的資 料’但是兩種視訊資料的特徵卻仍然不相同。因此,若兩種視 ❿訊資料都被視為是經過内插處理、直接取樣之4:4:4取樣格式 的資料,並存入記憶體,道將會減損資料在真4:七4取樣格式 中的特徵。 圖1是依照本發明之一實施例所繪示的一種顏色分量的 壓縮方法的示意圖。請參照圖1,本實施例使用兩種壓縮方法 來進行視訊資料的壓縮。其中一種方法是直接進行降低取樣 (down-sampling)方法,此降低取樣方法係保留任兩個像素中8 位元的U分量及8位元的V分量,適合對有較少視訊分量變 化的視訊資料進行壓縮。另一種方法是截斷(truncation)方法, 201026022 HM-^UU5-UU45-TW 29015twf.doc/n ,截斷方法健留各像素的4位元的U分量及4位元的V分 量’適合對有較多視訊分量變化的視崎料進行麼縮。 »月參如、圖卜在壓縮110過程中,當接受到以4 4 4資料 位元速率(data rate)取樣的視訊資料時,即在此視訊資料上進行 $降低取樣模式112與截斷模式114。而壓縮資料則被用來 作為模式選擇U6的基礎,其中包括計算壓縮資料與原本資料 的差值’並選擇直接降低取樣模式⑴與截斷模式ιΐ4中且有 較少差值者來將視訊資料壓縮為4:2:2的取樣格式。最後則將 瞻此以4=2資料位元速率取樣的壓縮資料存入記憶體—中。 接著’當接收到讀取指令時,儲存在記憶體12〇中的壓縮 視訊資料會被存取㈣:ieved),对被存取的已壓縮視訊資料 上進行解壓縮130程序以將視訊資料回復到4:4:4的資料位元 速率。最後則以正常的4:4:4取樣格式輸出視訊資料。為了描 述利用以上架構來麗縮與解壓縮視訊資料之顏色分量,以下提 供兩個實施例來說明之。 圖2是依照本發明之—實施例麟示的-種顏色分量的 壓縮方法的流程圖。請參關2,本實施例描賴縮視訊資料 之流程’其巾視訊倾原本是制4义4的資料位 取樣的。 首先,接收以4:4:4取樣格式編碼之視訊資料(步驟 S202) ’其中視訊資料可以被分解為多組鄰近像素且每一組鄰 近像素包含兩個像素。 接者,在一降低取樣模式中,會將視訊資料中鄰近像素的 顏色分量進行降低取樣,且計算在降低取樣前後視訊資料之顏 色分,的第一差值(步驟S204)。更精確地說,在降低取樣模式 中,每一組鄰近像素的兩個像素之中,會保留其中一個像素的 201026022 HM-2UU8-〇U45-TW 29015twf.doc/n 顏色分量,並忽略另一個像素的顏色分量。當叶曾第一差值 時,將降低取樣到4:2:2取樣格式之視訊資二内^理為以 4:4:4取樣格式取樣的視訊資料,然後計算所得之取樣格 式的視訊資料之顏色分量與所接收之原始視訊資料之顏色分 -量之間的差值,而將此差值作為第一差值。 、 ^ 同時,在-截斷模式t,會將視訊資料中各像素的顏色分 量截斷且計算視訊資料在被截斷前後顏色分量之第二差值(步 驟S206)。更精確地說,在截斷模式中,視訊資料中各像素之 顏色分量的最後四個位元會被截斷。當要計算第二差值時則 參會將截斷成4位元之視訊資料擴展為8位元,然後再計瞀所得 之4:4:4取樣格式的視訊資料之顏色分量與所接收之原=視訊 資料之顏色分量之間的差值,而將此差值作為第二差值。 在本實施例中值得一提的是’當在截斷視訊資料中各像素 之顏色分量時’本實施例之顏色分量的壓縮方法還計算各像素 之顏色分量最後四個位元的十進位值並判定此十進位數值是 否大於8。若此十進位數值大於8,則將此顏色分量之第五個 位元進位1。如此,各像素之被截斷的顏色分量會更接近原本 Φ 的顏色分量,因為被戴斷之顏色分量的第5個位元會被無條件 進位(round up)或無條件捨去(round down)。 隶後,比較前述步驟中計算所得的第一差值與第二差值, 以選擇降低取樣模式或截斷模式中具有較小之差值者,將視訊 資料壓縮為4:2:2取樣格式(步驟S208)。更精確地說,若第— 差值比第一差值小’則會選擇以降低取樣模式來將視訊資料壓 縮為4:2:2取樣格式。相反地,若第二差值比第一差值小,則 會選擇以截斷模式來將視訊資料壓縮為4:2:2取樣格式。' 藉由上述的壓縮方法,即可在不喪失視訊資料之顏色分量 的細節的情況下’相對性地縮減視訊資料的尺寸大小。故此, 201026022 nivi_zinM-WH5-TW29015twf.doc,n 此視訊資料的傳送速率(transmissi〇nrateW會增加,而積體電 路存取η己隐體内視5孔資料的性能(perf〇rmance)也會提昇。 值知一提的是’壓縮後的視訊資料還被傳送並儲存到記憶 體中。為了辨識視訊資料實際被壓縮的模式,本實施例還在各 個像素之亮度的最後—個位元中儲存一個指標,其甲此指標紀 錄了當初被選擇用以壓縮視訊資料之顏色分量的模式。據此, 以下提供一個實施例以說明一種根據前述紀錄之指標,而對視 訊資料進行解壓縮的方法。 圖3是依照本發明之一實施例所繪示的一種視訊資料的 顏色^量之解壓縮方法的流程圖。請參照圖3,本實施例描述 視訊資料解壓縮之流程,此視訊資料係被降低取樣或被截斷成 4:2:2取樣格式,並由指標記錄其原先被壓縮的模式而 於記憶體内。 首先,從記憶體中存取壓縮視訊資料中各個像素的指標 (步驟S3G2),以舰之前壓縮此像素之顏色分量時所採用= 式。所述指標可以藉由存取各個像素之亮度的最後—個位元而 取得,並用以辨識此像素原本被壓縮時採用的模式。舉例來 鲁說,若所讀取的指標為〇,則祝訊資料的壓縮模式辨識為直接 降低取樣模式。若所讀取的指標為丨,則視訊資料的壓 辨識為截斷模式。 、、、式 若視訊資料的壓縮模式被判定為直接降低取樣模式, 將鄰近像素之顏色分量的加權總和作為在每一組鄰近&quot;像素° 間之像素的顏色分量(步驟S306),以此來還原在4:4:4取 式下的視訊資料。更精確地說,每一個目標像素的左邊像素盥 右邊像素的顏色分量相加後除以二,亦即(左邊像素的顏色父 量+右邊像素的顏色分量)/2,而以此加權總和作為目^刀 顏色分量。 * π像素的 201026022 ttm-zuuo-Wtt5-TW29015twf.doc/n 德I右視訊資料的壓縮模式被判定為截斷模式,則所紀錄各個 ^之顏色分量會被移位四個位元,且在最後四個位元補变 (&gt;*驟^〇8) ’以此來還原4:4:4取樣格式的視訊資料。飞 德春值得一提的是,為了減少在解壓縮過程中可能發生之鄰近 ,素免度上_顯差異’在賴縮完錢,本實施例還會檢查 =各個像素相鄰近之兩個像素解壓縮後的亮度相同但與^ 素之解墨縮後的亮度不同(步驟S310)。若此相鄰近之兩i -、解壓縮後的亮度相同但與其間像素之解壓 ❹S31’2)則將此像素的顏色分量修改為鄰近像素的顏色分量(2 更精確地說’針對一個目標像素,本實施例還檢查此目標 篆素左右兩邊的一個像素,並判斷此兩個鄰近像素的亮度是否 =。^兩個鄰近像素的亮度相同,則本實施例還判斷此目標 二之冗度疋否與此兩個鄰近像素的亮度相同。若此目標像素 ^免度與此_鄰近像素的紐不同,則可關定在此目標像 ,令有明顯的亮度差異。因此,本實施例會將此目標像素的顏 料個鄰近像素的顏色分量取代,以使壓縮後的視訊資 最後,在步驟S310與步驟S312的”平順,,過程後,解壓缩 =㈣會以4:4:4的取樣格式輸出(步驟S31== =的解壓縮方法,4:2:2取樣格式的視訊資料可以被還原為 .丄取樣格式的視訊資料’且A部分視訊#料之顏色分量的 細郎都會可被保留。 综上所述,本發明提供一種顏色分量的壓縮方法,其係在 *斤接收的視訊資料進行直接降低取樣模式與截斷模式,以找 二有較田節々IL失的模式來壓縮視訊資料,如此可減少用以 儲存視訊資料的空間’且仍可保留視訊資料的品質。另外,僅 以各個像素之亮度的一個位元來作為紀錄所述兩種模式的指 201026022 nivi-^v/U〇-uw5-TW 29015twf.doc/n 才示丄I藉^讀取指標,即可辨識出原本用以壓縮視訊資料之顏 色分置的模式’而能夠用來正確地將視訊⑽解壓 个 取樣格式。 1广.4.4 雖然本發明已以實施例揭露如上,然其並非用以限定本發 明,任何所屬技術領域中具有通常知識者,在不脫離本笋明之 精神和範圍内,當可作些許之更動與潤飾’故本發明之^護範 圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明1 _ 圖1是依照本發明之一實施例所繪示的一種顏色分量的 壓縮方法的示意圖。 圖2疋依照本發明之一實施例所繪示的一種顏色 壓縮方法的流程圖。 圖3疋依照本發明之一實施例所緣示的一種對視訊資料 的顏色分量解壓縮之方法的流程圖。 【主要元件符號說明】Disc, CD) or Digital Video Disc (DVD). When needed. When I take these stored video data, the compressed data is first solved and stored in the memory. Due to the bit rate of the decompressed data, the data path between the simple decompressed integrated circuit and the memory that can process the data in real time can be used. μ is used, however, when the video data is contracted, some of the video data is compressed in detail, so how to compress the video (4) into a smaller m size and size without affecting the video data. Manufacturers must solve the stagnation issue. SUMMARY OF THE INVENTION In view of the above, the present invention provides a method for compressing color components, which uses two compression modes to compress video data in 201026022 HM-2008-0045-TW 29015twf.doc/n. Reduce the size of video data while maintaining the quality of video data. In order to achieve the above or other objects, the present invention provides a method of refraction of a color component. This method first accepts a video material encoded in a 4:4:4 sampling format, which includes data for multiple pixels. Next, in a downsampling mode, the color components of the plurality of sets of neighboring pixels in the video material are desampled and the first difference of the video material before and after the downsampling is calculated. Then, in a truncation mode, the color component of each pixel in the video data is truncated, and the second difference before and after the video data is truncated is calculated. ^ Finally, the first difference and the second difference are compared. 'And choose to reduce the sampling mode or the small difference in the truncation mode to compress the video data into a 4:2:2 sampling format. In an embodiment of the invention, the video material is decomposed into a plurality of sets of neighboring pixels, and each set of neighboring pixels includes two pixels. In an embodiment of the invention, the step of downsampling the color components of each set of adjacent pixels in the video data is to 'retain the color component of one of the two pixels in each set of adjacent pixels. And ignore the color component of another pixel. In an embodiment of the present invention, the step of dividing the color of each group of near-pixels in the video material by one is to cut off the last four bits of the color component of each pixel in the video material. In an embodiment of the invention, the color component is truncated in each of the adjacent pixels in the video data, and the decimal component of the last four bits is calculated (deeimal' And determine the decimal, 疋 no greater than 8. If the decimal value is greater than 8, then the color component bit is carried to 1. In the embodiment of the invention, the video data is compressed to 4:2:2 201026022 WM-ZUU8-UU45-TW 29015twf.doc/n After the sampling format, the method further stores the compressed video data into the memory. In an embodiment of the present invention, the compressed video data is stored in the above. After entering the memory, the method further includes storing an indicator at the last bit of the luminance of each pixel. This indicator records a compression mode selected to compress the components of the pixel. In an embodiment, after the compressing the video data into the memory, the method further comprises decompressing the compressed video data in the memory. In an embodiment of the invention, the compressing the memory in the memory The step of decompressing firstly accesses the image indicators of the compressed video data from the memory to determine the compression mode of the color components of the compressed pixels. Assuming that the compression method is determined to reduce the sampling mode, the color components of the adjacent pixels are calculated. And , (and also the color component of the left pixel and the color of the right pixel plus ^ divided by two)' and use this weighted sum as the &amp; = between each set of neighboring pixel sets. If it is judged to be the truncation mode, the recorded tool amount is shifted by four bits and the last four bits of the color component are complemented by the last 'outputting the decompressed video data in the 4:4:4 sampling format. In the month-embodiment, the output is decompressed in the Ο:4 sampling format = 'This method also checks whether the two adjacent pixels of each pixel are adjacent, and the reduced degree of exemption is the same but after the pixel is solved _ The brightness factor of the pixel is changed to the adjacent image, and the color component of the pixel is modified to be adjacent to the image amount and the color component of the above embodiment is included in the embodiment of the invention. Replacement charm / direct reduction The video and video data of the sample and the cut are compared with the original video data to determine the best mode for compressing the video data of 201026022 HM-^UU8-UU45-TW 29015twf.doc/n. Thus, the size of the color component of the video material can be reduced. The quality of the video material can be maintained within an acceptable range. Based on the above, the present invention can increase the transmission rate of video data, and can also reduce the space for storing video data. To make the above features and advantages of the present invention It can be more clearly understood, and the following specific embodiments are described in detail below with reference to the drawings. Only [Embodiment] 彩色 Color video data ((3) video data) is usually iuminance and color components. The format is transmitted, where the brightness retains 90% of the details of the original video material. When distortion compression is applied to color video data, the distortion of the brightness is easily recognized by the human eye. Thus, the present invention provides a method of compressing color components. Video data is usually transmitted in real 4:4:4 sampling format or in a pseudo 4:4:4 sampling format with 4:2:2 interpolation. Although both types of video data appear to be in the 4:4:4 sampling format, the characteristics of the two video materials are still different. Therefore, if both types of visual data are considered to be interpolated and directly sampled in 4:4:4 sampling format and stored in memory, the channel will be degraded in true 4:7 4 samples. Features in the format. 1 is a schematic diagram of a method of compressing a color component according to an embodiment of the invention. Referring to Figure 1, this embodiment uses two compression methods for compression of video data. One of the methods is to directly perform a down-sampling method, which preserves the U component of 8 bits and the V component of 8 bits in any two pixels, and is suitable for video with less video component changes. The data is compressed. Another method is the truncation method, 201026022 HM-^UU5-UU45-TW 29015twf.doc/n. The truncation method retains the U component of the 4-bit and the V component of the 4-bit of each pixel. The apparent weathering of the multi-video component changes. In the process of compressing 110, when the video data sampled at the data rate is received, the lower sampling mode 112 and the truncation mode 114 are performed on the video data. . The compressed data is used as the basis for the mode selection U6, including calculating the difference between the compressed data and the original data' and selecting the direct reduction sampling mode (1) and the truncation mode ιΐ4 and there are fewer differences to compress the video data. It is a 4:2:2 sampling format. Finally, the compressed data sampled at the 4=2 data bit rate is stored in the memory. Then, when the read command is received, the compressed video data stored in the memory 12 is accessed (4): ieved), and the compressed video data is decompressed on the accessed video program 130 to reply the video data. The data bit rate to 4:4:4. Finally, the video data is output in the normal 4:4:4 sampling format. To illustrate the use of the above architecture to condense and decompress the color components of the video material, two embodiments are provided below to illustrate. Figure 2 is a flow diagram of a method of compressing a color component in accordance with an embodiment of the present invention. Please refer to 2, this embodiment describes the process of shrinking the video data. The video video is originally sampled by the data bit of the 4th. First, the video material encoded in the 4:4:4 sampling format is received (step S202)' wherein the video material can be decomposed into a plurality of sets of adjacent pixels and each set of adjacent pixels includes two pixels. In a reduced sampling mode, the color component of the adjacent pixels in the video data is downsampled, and the first difference in the color score of the video data before and after the sampling is reduced (step S204). More precisely, in the reduced sampling mode, among the two pixels of each set of adjacent pixels, the 201026022 HM-2UU8-〇U45-TW 29015twf.doc/n color component of one of the pixels is retained, and the other is ignored. The color component of the pixel. When the leaf has the first difference, the video data sampled into the 4:2:2 sampling format will be reduced to the video data sampled in the 4:4:4 sampling format, and then the video data of the obtained sampling format will be calculated. The difference between the color component and the color component of the received original video material, and the difference is taken as the first difference. At the same time, in the - truncation mode t, the color component of each pixel in the video data is truncated and the second difference of the color components of the video data before and after being truncated is calculated (step S206). More precisely, in the truncation mode, the last four bits of the color component of each pixel in the video material are truncated. When the second difference is to be calculated, the participant will expand the video data truncated to 4 bits into 8 bits, and then calculate the color component of the obtained video data in the 4:4:4 sampling format and the received original. = the difference between the color components of the video material, and this difference is taken as the second difference. In the present embodiment, it is worth mentioning that 'when the color component of each pixel in the video data is truncated, the compression method of the color component of the present embodiment also calculates the decimal value of the last four bits of the color component of each pixel and Determine if this decimal value is greater than 8. If the decimal value is greater than 8, the fifth bit of the color component is incremented by one. Thus, the truncated color component of each pixel will be closer to the original Φ color component because the fifth bit of the worn-out color component will be unconditionally rounded up or unconditionally rounded down. After the comparison, the first difference and the second difference calculated in the foregoing steps are compared to select a lower difference between the sampling mode or the truncation mode, and the video data is compressed into a 4:2:2 sampling format ( Step S208). More precisely, if the first difference is smaller than the first difference, then the sampling mode is selected to compress the video data into a 4:2:2 sampling format. Conversely, if the second difference is smaller than the first difference, then the truncation mode is selected to compress the video data into a 4:2:2 sampling format. By the above compression method, the size of the video material can be relatively reduced without losing the detail of the color component of the video material. Therefore, 201026022 nivi_zinM-WH5-TW29015twf.doc,n the transfer rate of this video data (transmissi〇nrateW will increase, and the performance of the integrated circuit access η 隐 invisible 5 hole data (perf〇rmance) will also increase The value is that the 'compressed video data is also transmitted and stored in the memory. In order to identify the mode in which the video data is actually compressed, this embodiment also stores in the last bit of the brightness of each pixel. An indicator that records the mode that was originally selected to compress the color component of the video material. Accordingly, an embodiment is provided below to illustrate a method of decompressing video data based on the aforementioned recorded indicators. 3 is a flow chart of a method for decompressing color data of a video data according to an embodiment of the present invention. Referring to FIG. 3, this embodiment describes a process of decompressing video data, and the video data is Reduce the sampling or cut off into a 4:2:2 sampling format, and record the original compressed mode in the memory by the indicator. First, access the compression from the memory. The indicator of each pixel in the video data (step S3G2) is used to compress the color component of the pixel before the ship. The index can be obtained by accessing the last bit of the brightness of each pixel, and used Identify the mode that the pixel was originally compressed. For example, if the index read is 〇, the compression mode of the data is recognized as a direct reduction sampling mode. If the index read is 丨, then the video The pressure of the data is identified as the truncation mode. If the compression mode of the video data is determined to be the direct decrement sampling mode, the weighted sum of the color components of the adjacent pixels is taken as the color of the pixel between each group of adjacent pixels. a component (step S306), thereby restoring the video material in the 4:4:4 mode. More precisely, the color components of the left pixel and the right pixel of each target pixel are added and divided by two, that is, (the color of the left pixel + the color component of the right pixel)/2, and the weighted sum is used as the color component of the object. * π pixel 201026022 ttm-zuuo-Wtt5-TW29015twf.doc/n De I right When the compression mode of the video data is determined to be the truncation mode, the color components of each record are shifted by four bits, and the last four bits are complemented (&gt;*jj^8). Restore the video data in the 4:4:4 sampling format. It is worth mentioning that in order to reduce the proximity that may occur during the decompression process, the degree of voicing is reduced. It is also checked that the two pixels adjacent to each pixel are decompressed with the same brightness but different from the decompressed brightness of the element (step S310). If the adjacent two i-, the decompressed brightness is the same However, the decompression of the pixel ❹S31'2) modifies the color component of the pixel to the color component of the adjacent pixel (2 more precisely, for one target pixel, this embodiment also checks one pixel on the left and right sides of the target pixel) And determine whether the brightness of the two adjacent pixels is =. ^ The brightness of two adjacent pixels is the same, and the embodiment further determines whether the redundancy of the target 2 is the same as the brightness of the two adjacent pixels. If the target pixel ^ degree is different from the neighboring pixel, the target image can be determined to have a significant brightness difference. Therefore, in this embodiment, the color components of the neighboring pixels of the target pixel are replaced, so that the compressed video is finally smoothed in steps S310 and S312, and after the process, the decompression = (4) will be 4: 4:4 sampling format output (step S31 == = decompression method, 4:2:2 sampling format video data can be restored to .丄 sampling format video data' and A part of the video material color component In summary, the present invention provides a method for compressing a color component, which is to directly reduce the sampling mode and the truncation mode in the video data received by the microphone, so as to find that there is a loss of the field. Mode to compress video data, thus reducing the space for storing video data' and still retaining the quality of video data. In addition, only one bit of the brightness of each pixel is used as a record for the two modes 201026022 nivi -^v/U〇-uw5-TW 29015twf.doc/n The 丄I borrows the ^ indicator to identify the pattern used to compress the color distribution of the video data' and can be used to correctly view the video. (10) Solution The present invention has been disclosed in the above embodiments, but it is not intended to limit the invention, and any one of ordinary skill in the art can be </ RTI> </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> Illustrated in accordance with an embodiment of the present invention FIG. 2 is a flow chart of a color compression method according to an embodiment of the present invention. FIG. 3 is a view of a video material according to an embodiment of the present invention. Flowchart of the method of decompressing color components. [Main component symbol description]

110 :壓縮 112 :降低取樣 114 :載斷 116:模式選擇 120 :記憶體 130 :解壓縮 S202〜S208 ·本發明一實施例之顏色分量的壓縮方法之各 步驟 S302-S314 :本發明一實施例之視訊資料之顏色分量的解 壓縮方法之各步驟 11110: Compression 112: Down sampling 114: Load 116: Mode selection 120: Memory 130: Decompression S202 to S208. Steps S302-S314 of the compression method of the color component according to an embodiment of the present invention: an embodiment of the present invention Step 11 of the decompression method of the color component of the video data

Claims (2)

201026022 ηινι-^υ〇-^5-ΤΨ 29015twf.doc/n 七 申請專利範面: ^一種顏色分量的_方法,包括下列步驟: 包二SC樣格式編,-視訊資料,該視訊資料 色八^降^取樣模式^對該視訊資料之多組鄰近像素的顏 顏^量二計异降低取樣前後該視訊資料之該些 ❹ 、隹4齡截斷模^令,對該視訊資料中各像素的該些顏色分量 二^值;十异截斷前後該視訊資料之該些顏色分量的一第 賴差值與該第二差值’並選擇轉低取樣模式與 ΐ樣格Γ具有較小差值者,以壓縮該視訊資料為一4:2:2 2‘如申明專利範圍第i項所述顏色 中每-組鄰近像素包括兩個像素。 ㈣方去其 .如U利範圍第丨項所述顏色分量的壓 1 參 ==見訊資叙料鄰近像㈣齡分量騎降低取樣; 保留每一組鄰近像素中兩個像素其中之一 量且忽略另i素的該些顏色分量。。 h顏色刀 如申明專利範圍第1項所述顏色分量的壓縮方法,盆 中對該視訊資料巾各像钱該魏色分量進行_的步驟i 括. —截斷該魏資料+各像素之該魏色分量的最後四個位 元。 5.如申請專利範圍第4項所述顏色分量的壓縮方法,其 中對-¾視Λ資料巾各像素之該些顏色分量進行戴斷的步驟更 12201026022 ηινι-^υ〇-^5-ΤΨ 29015twf.doc/n Seven application patents: ^ A method of color component, including the following steps: Package 2 SC-like format, - Video data, the video data color eight ^降^Sampling mode^ The color of the adjacent pixels of the video data is reduced by two different calculations, and the video data of the video data of the ❹, 隹 4 age truncation module, the pixel of the video data The color component has two values; a difference between the first and second of the color components of the video data before and after the ten-cut is selected, and the difference between the low sampling mode and the sample is smaller. The video data is compressed to be a 4:2:2 2', and each of the adjacent pixels in the color described in the i-th item of the claimed patent includes two pixels. (4) to go to it. For example, the pressure component of the color component of the U Scope range is 1 parameter == see the neighboring image (four) age component ride down sampling; retain one of the two pixels in each group of adjacent pixels And ignore the color components of the other elements. . h color knife, such as the compression method of the color component described in the first item of the patent scope, the step i of the video material towel for each video component of the video data is included. - truncating the Wei data + the pixel of the Wei The last four bits of the color component. 5. A method of compressing a color component as recited in claim 4, wherein the step of breaking the color components of each pixel of the -3⁄4 data towel is further 15-TW 29015twf.doc/n 201026022 包括: 計算各像素之該顏色分量之最後四個位元的一十進位值; 判定該十進位值是否大於8 ;以及 若該十進位值大於8,則將該顏色分量之第五個位元進位 6.如申請專利範圍第1項所述顏色分量的壓縮方法,其 中在壓縮該視訊資料為該4:2:2取樣格式的步驟之後,更包括: 儲存被壓縮之該視訊資料於一記憶體中。 ® 7.如申請專利範圍第6項所述顏色分量的壓縮方法,並 中在儲存被壓縮之該視訊資料於該記憶體的步驟之前,更包 括: 儲存一指標於各像素之亮度的最後一個位元中,其中該指 標紀錄被選擇用以壓縮該視訊資料之該些顏色分量的一壓縮 模式。 、 8·如申請專利範圍第6項所述顏色分量的壓縮方法,其 中在儲存被壓縮之該視訊資料於該記憶體的步驟之後,更包15-TW 29015twf.doc/n 201026022 includes: calculating a decimal value of the last four bits of the color component of each pixel; determining whether the decimal value is greater than 8; and if the decimal value is greater than 8, The fifth bit of the color component is a method of compressing a color component as described in claim 1, wherein after compressing the video data into the 4:2:2 sampling format, the method further comprises: storing The compressed video material is in a memory. ® 7. The compression method of the color component according to claim 6 of the patent application, and before storing the compressed video material in the memory, further comprising: storing an indicator of the last brightness of each pixel In the bit, wherein the indicator record is selected to compress a compression mode of the color components of the video material. 8. The method of compressing a color component according to item 6 of the patent application, wherein after the step of storing the compressed video material in the memory, 解壓縮該記憶體中被壓縮之該視訊資料。 9.如申請專利範圍第8項所述顏色分量的壓縮方法,其 中解壓縮該記憶體中被壓縮之該視訊資料的步驟更包括: 從該記憶體中存取被壓縮之該視訊資料中各像素的該指 軚,以判定被選擇用以壓縮該像素之該些顏色分量的該壓縮模 若該壓縮模式被判定為該降低取樣模式,則採用該此糊 像素之該些顏色分量的一加權總和作為在每—組=ς. 間之像素的該些顏色分量; &quot; 13 201026022 * 〜仍5-TW 290I5twf.doc/n 、,該壓縮模式被判定為該戴斷模式,則將各像素之該些顏 色分量移位四個位元且將最後四個位元補零;以及 以該4:4:4取樣格式輸出被解壓縮之該視訊資料。 10.如申請專利範圍第9項所述顏色分量的壓縮方法,其 :在以5亥4:4:4取樣格式輸出被解壓縮的該視訊資料的步驟之 前’更包括: 檢查是否各像素相鄰近之兩個鄰近像素解壓縮後的亮度 相同但與該像素解壓縮後的亮度不同 ;以及 / ^該些鄰近像素解壓縮後的亮度相同但與該像素解壓縮 後的%度不同’則將該像素之該些顏色分量修改為該些鄰近像 素的該些顏色分量。 u.如申請專利範圍第1項所述顏色分量的壓縮方法,其 +該些顏色分量包括u顏色分量及V顏色分量。The video material compressed in the memory is decompressed. 9. The method of compressing a color component according to claim 8, wherein the step of decompressing the compressed video material in the memory further comprises: accessing the compressed video material from the memory. The fingerprint of the pixel to determine the compression mode selected to compress the color components of the pixel. If the compression mode is determined to be the down sampling mode, a weighting of the color components of the paste pixel is employed. The sum is the color component of the pixel between each group = ;.; &quot; 13 201026022 * ~ still 5-TW 290I5twf.doc/n, the compression mode is determined to be the wear mode, then each pixel The color components are shifted by four bits and the last four bits are padded with zeros; and the decompressed video material is output in the 4:4:4 sample format. 10. The method of compressing a color component according to claim 9 of the patent application, wherein: before the step of outputting the decompressed video material in a 5:4:4:4 sampling format, the method further comprises: checking whether each pixel phase The neighboring pixels are decompressed with the same brightness but different from the decompressed brightness of the pixel; and / ^ the neighboring pixels are decompressed with the same brightness but different from the decompressed % degree' The color components of the pixel are modified to the color components of the neighboring pixels. U. The method of compressing color components as recited in claim 1, wherein the color components comprise u color components and V color components. 1414
TW97150124A 2008-12-22 2008-12-22 Method of color components compression TWI396431B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97150124A TWI396431B (en) 2008-12-22 2008-12-22 Method of color components compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97150124A TWI396431B (en) 2008-12-22 2008-12-22 Method of color components compression

Publications (2)

Publication Number Publication Date
TW201026022A true TW201026022A (en) 2010-07-01
TWI396431B TWI396431B (en) 2013-05-11

Family

ID=44852794

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97150124A TWI396431B (en) 2008-12-22 2008-12-22 Method of color components compression

Country Status (1)

Country Link
TW (1) TWI396431B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259741B1 (en) * 1999-02-18 2001-07-10 General Instrument Corporation Method of architecture for converting MPEG-2 4:2:2-profile bitstreams into main-profile bitstreams
JP4617644B2 (en) * 2003-07-18 2011-01-26 ソニー株式会社 Encoding apparatus and method
US7376265B2 (en) * 2004-06-17 2008-05-20 Seiko Epson Corporation Segmentation-based hybrid compression scheme for scanned documents
JP2006304203A (en) * 2005-04-25 2006-11-02 Nikon Corp Electronic camera with color difference interleave conversion function

Also Published As

Publication number Publication date
TWI396431B (en) 2013-05-11

Similar Documents

Publication Publication Date Title
US9082160B2 (en) Image processing method, image compression device and mobile terminal
JP4919743B2 (en) Method and apparatus for generating thumbnails with digital images
US10819994B2 (en) Image encoding and decoding methods and devices thereof
TWI325582B (en)
US8407565B2 (en) System and method for producing importance rate-based rich media, and server applied to the same
CN106105177A (en) Alternative approach and converting means
JP2010529804A (en) System and method for generating and playing 3D video files based on 2D video media standards
US8094931B2 (en) Method of color components compression
TWI336567B (en) A variable length decoder and decoding method therefor
JP2010171609A (en) Image processing apparatus
TWI297471B (en) Method for video content complexity estimation, scene change detection and video encoding
JP2001094990A (en) Image coder
Xie et al. A reversible data hiding scheme for JPEG images by doubling small quantized AC coefficients
TWI308459B (en) Context-aware frame memory scheme for motion compensation in video decoding
US8671164B2 (en) Efficient size optimization of visual information or auditory information
CN103109535B (en) Image-reproducing method, image-reproducing apparatus, camera system and regenerative system
TW201026022A (en) Method of color components compression
JP2008166895A (en) Video display device, its control method, program and recording medium
CN107079130A (en) Image processing equipment and image processing method
US20060080591A1 (en) Apparatus and method for automated temporal compression of multimedia content
US7539094B2 (en) Multi-bit stream of multimedia data processing
TWI523541B (en) Wireless video/audio data transmission systems and methods, and computer products thereof
US8203619B2 (en) Target bit rate decision method for wavelet-based image compression
Sun et al. High-dynamic-range texture compression for rendering systems of different capacities
TW201023587A (en) Method of high capacity reversible data hiding scheme using edge prediction error

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees