TWI220847B - Fast compression and decompression method for animation - Google Patents

Fast compression and decompression method for animation Download PDF

Info

Publication number
TWI220847B
TWI220847B TW92121810A TW92121810A TWI220847B TW I220847 B TWI220847 B TW I220847B TW 92121810 A TW92121810 A TW 92121810A TW 92121810 A TW92121810 A TW 92121810A TW I220847 B TWI220847 B TW I220847B
Authority
TW
Taiwan
Prior art keywords
graphic
color
compression
graphics
decompression
Prior art date
Application number
TW92121810A
Other languages
Chinese (zh)
Other versions
TW200507653A (en
Inventor
Fred Huai-Yan Chen
Spring X C Wang
Harley Yan
Original Assignee
Inventec Besta Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Besta Co Ltd filed Critical Inventec Besta Co Ltd
Priority to TW92121810A priority Critical patent/TWI220847B/en
Application granted granted Critical
Publication of TWI220847B publication Critical patent/TWI220847B/en
Publication of TW200507653A publication Critical patent/TW200507653A/en

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

The present invention provides a fast compression and decompression method for animation, wherein the compression process includes: converting the pictures in the animation file as a low color level graphic; shielding the same portion therein and clipping to keep the effective portion; generating the color palette based on the features of output equipment; and employing the dictionary compression based on the color levels of effective portion to obtain the animation compression file. The decompression process includes: performing decompression based on the compression dictionary to obtain the decompressed picture; composing a complete picture based on the shielding manner; confirming with the algorithm for recovering to the original color level based on the color palette; conducting the color conversion on the entire picture based on the algorithm to obtain the current picture; and, playing the current picture on the output equipment by pasting the picture.

Description

1220847 五、發明說明(1) 【發明之技術領域】 本發明係為一種圖形壓縮及解壓方法,特別是一種高 壓縮比的動晝快速壓縮及解壓方法。 【先前技術】 當前,各種攜帶型電子設備在大家的生活中運用的範 圍十分廣泛,例如移動電話、PDA、MMV、掌上電腦等等。 隨著多媒體技術的不斷發展,由於其所具備的多種聲光效1220847 V. Description of the Invention (1) [Technical Field of the Invention] The present invention is a graphic compression and decompression method, particularly a dynamic daytime fast compression and decompression method with a high compression ratio. [Previous technology] At present, various portable electronic devices are widely used in everyone's life, such as mobile phones, PDAs, MMVs, handheld computers, and so on. With the continuous development of multimedia technology, due to its various sound and light effects

I 應,在上述攜帶型電子設備上播放這些各種多媒體資訊是 廣大用戶的所共同期望的。 動晝檔案一般都較大,為了適應在攜帶型電子設備上 播放,通常需要對其進行壓縮處理。現有的動晝壓縮方法 分為兩類: 1、 將每一幀内容將每一幀内容分別壓縮,然後於播 放時逐幀解壓縮,顯示出來。此類方法實現簡單,但壓縮 率往往很不理想; 2、 將動晝内容視為一個整體,將顏色信號與亮度信 號及色渡信號分離,然後作有損壓縮,如MPEG.,其優點 是壓縮率高,但運算量大。在使用低速晶片的設備上無法 流暢播放。大多數此類壓縮演算法基於24位元RGB色域空 間。針對當前大量手持設備的LCD僅1 2b i t的色深,在資料 傳輸及解壓運算上造成空間及時間的雙重浪費。 然而,在現有的各種攜帶型電子設備,所提供的硬體 條件也千差萬別。在電子設備上播放多媒體資訊,特別是 動畫檔案時,由需要對壓縮的動晝檔案進行解壓,因此對It should be expected that playing all kinds of multimedia information on the above-mentioned portable electronic devices is a common expectation of users. Moving day files are generally large. In order to be suitable for playing on portable electronic devices, they usually need to be compressed. The existing dynamic daytime compression methods are divided into two categories: 1. Each frame is compressed separately, and then decompressed frame by frame during playback and displayed. This type of method is simple to implement, but the compression rate is often not ideal. 2. Consider the dynamic content as a whole, separate the color signal from the luminance signal and color signal, and then perform lossy compression, such as MPEG. The advantages are The compression rate is high, but the amount of calculation is large. Cannot play smoothly on devices using low speed chips. Most of these compression algorithms are based on a 24-bit RGB color gamut space. For the current large number of handheld devices, the LCD has a color depth of only 1 2b t, which causes a double waste of space and time in data transmission and decompression operations. However, in the various existing portable electronic devices, the hardware conditions provided vary widely. When playing multimedia information on electronic devices, especially animation files, the compressed moving files need to be decompressed.

第5頁 1220847 五、發明說明(2) 電子設備的硬體,特別是處理器及儲存設備有一定的要 求,如果想在某些配置較低的電子設備上播放動晝時,播 放效果往往會不是十分理想。 此時,就需要一種高壓縮比的動晝壓縮及解壓方法來 解決上述問題。 【發明内容】 有鑒於此,本發明為解決上述問題而提出了一種動晝 快速解壓縮及解壓方法,其目的在於解決上述習知技術中 壓縮率低及在資料傳輸及解壓運算上造成空間及時間的雙 重浪費等缺點,為低硬體配置的彩色機種提供了可觀的動 晝性能及低成本動晝存儲方案。 本發明提出了一種動晝快速壓縮及解壓方法,其壓縮 過程包括如下步驟:將動晝檔案内所有圖形轉換為低色階 圖形;遮蔽該低色階圖形中相同的部分;對經過遮蔽的圖 形進行剪切,保留其有效部分;根據輸出設備的特點生成 對應的調色板;根據該有效部分的色階,通過字典壓縮獲 取動晝壓縮檔案。其解壓步驟包括如下步驟:根據壓縮字 典類型解壓動晝壓縮檔案,獲取解壓圖形;根據該解壓圖 形的遮蔽方式將其合成為完整圖形;根據輸出設備的調色 板,確定將該完整圖形還原為初始色階的演算法;根據該 演算法對該完整圖形進行轉色,獲取當前圖形;通過貼圖 在輸出設備上播放該當前圖形。 與現有的方法相比,本發明提供的壓縮及解壓方法, 綜合使用了多種技術和優化方法的高壓縮比的動晝快速解 1 1220847 五、發明說明(3) 壓縮/解壓/顯示方案,實現很高的動晝壓縮率,以及快 速的解壓顯示性能及並充分發揮了主機寬廣的色域範圍。 從而解決了傳統方法壓縮效率低,解壓運算浪費空間 及時間等問題,使在低硬體配置的彩色機播放動晝能更加 流暢。 有關本發明之詳細内容及方法,茲就配合圖示說明如 下。 【實施方式】 下面結合附圖對本發明進行詳細說明: 請參見『第1圖』,該圖係為本發明所提之動畫快速 壓縮方法之總體流程圖,說明如下: 將動晝檔案内所有圖形轉換為低色階圖形(步驟 110):遮蔽該低色階圖形中相同的部分(步驟1 20):對 經過遮蔽的圖形進行剪切,保留其有效部分(步驟 130):根據輸出設備的特點生成對應的調色板(步驟 140):根據該有效部分的色階,通過字典壓縮獲取動畫 壓縮檔案(步驟1 50)。 動晝檔案内包括由一系列内容相似的圖形,但構成動 晝的圖形的往往是真彩等儲存格式的圖片,例如為2 4b i t 色或更高的圖形,其檔案大小過大,不適合在配置相對與 電腦較低的攜帶型電子設備中進行播放。所以首先需要將 對動晝檔案内所有圖形的資料進行簡化,也就是將動晝檔 案内原始圖形通過壓縮轉為2 5 6色或1 6色圖形的低色階圖 形,以降低圖形的資料量及資料複雜度。對一全彩(如Page 5 1220847 V. Description of the invention (2) The hardware of electronic equipment, especially the processor and storage equipment, has certain requirements. If you want to play the dynamic day on some low-profile electronic equipment, the playback effect will often be Not very ideal. At this time, a dynamic compression and decompression method with high compression ratio is needed to solve the above problems. [Summary of the Invention] In view of this, the present invention proposes a dynamic decompressing and decompressing method in order to solve the above problems. The purpose of the present invention is to solve the low compression rate and cause space in data transmission and decompression operations in the conventional techniques. Disadvantages, such as the double waste of time, provide considerable dynamic performance and low-cost storage solutions for color models with low hardware configuration. The invention proposes a method for fast compression and decompression of moving day. The compression process includes the following steps: converting all the graphics in the moving day file into low-level graphics; shielding the same part of the low-level graphics; and blocking the graphics Cut it to retain its effective part; generate the corresponding color palette according to the characteristics of the output device; and obtain the moving day compression archive through dictionary compression according to the color level of the effective part. The decompression step includes the following steps: decompress the moving daytime compressed file according to the compression dictionary type to obtain the decompressed graphic; synthesize the decompressed graphic into a complete graphic according to the masking method; and determine to restore the complete graphic to The algorithm of the initial color gradation; according to the algorithm, the complete graphic is converted to obtain the current graphic; the current graphic is played on the output device through the map. Compared with the existing methods, the compression and decompression method provided by the present invention uses a variety of technologies and optimization methods to combine high-speed and dynamic-day fast solutions. 1 1220847 V. Description of the invention (3) Compression / decompression / display scheme High dynamic compression ratio, fast decompression display performance, and make full use of the host's wide color gamut range. This solves the problems of low compression efficiency and waste of space and time in the decompression operation of the traditional method, and makes the color machine playing on the low hardware configuration smoother. The details and methods of the present invention are described below with reference to the drawings. [Embodiment] The present invention will be described in detail below with reference to the drawings: Please refer to "Figure 1", which is a general flowchart of the rapid compression method of animation provided by the present invention, as described below: All graphics in the moving day file Convert to low-level graphics (step 110): mask the same part of the low-level graphics (step 1 20): cut the masked graphic to retain its effective part (step 130): according to the characteristics of the output device Generate a corresponding color palette (step 140): obtain an animated compressed archive through dictionary compression based on the color gradation of the effective portion (step 150). The moving day file contains a series of similar graphics. However, the graphics that make up the moving day are often pictures in storage formats such as true color, such as 2 4b it color or higher graphics. The file size is too large and it is not suitable for configuration. Play in a portable electronic device that is relatively low compared to a computer. Therefore, the data of all graphics in the moving day file must be simplified first, that is, the original graphics in the moving day file are compressed into low-level graphics of 256-color or 16-color graphics to reduce the data volume of the graphics. And data complexity. Against a full color (such as

第7頁 1220847 五、發明說明(4) 2 4b it色或更高)圖形,我們可根據其内容采用抖色或者 選色的方法轉為2 5 6色的圖形,而仍然保持圖形原有的觀 感。常見的抖色方法有雙線抖色及佛洛伊德-司登堡抖色 等方法;選色較常用的方法則有球殼選色等。 抖色或者選色之類的方法利用人眼對亮度資訊敏感而 對顏色資訊不敏感的特性,以很少的顏色數目取代成千上 萬種顏色,而有近似的顯示效果,使圖形資料大為簡化與 縮小。同其他有損壓縮的方法一樣,本方案將圖形轉為 2 5 6色實際上也會丟棄部分圖形資訊。采用常見的球殼選 色法或佛絡伊得-斯騰堡抖色皆可取的較理想之效果。對 於使用顏色數本來很少的圖形,可以轉為1 6色的圖形以進 一步降低資料量。 下面,進一步說明本發明的壓縮流程。 請參見『第2圖』,該圖係為本發明所提之遮蔽該低 色階圖形中相同的部分之流程圖,說明如下: 當該解壓圖形使用關鍵幀遮蔽方式時,選擇動晝檔案 内第1幀圖形為關鍵幀,其他圖形作為後續幀(步驟 210):對後續幀中與第1幀内相同的部分進行遮蔽(步驟 2 2 0),最後進入步驟130。 當該解壓圖形使用次序幀遮蔽方式時,將動晝檔案内 的每幅圖形作為單獨幀(步驟2 3 0):從第2幀開始,將每 一鴨中與前一 i5貞相同的地方進行遮蔽(步驟2 4 0),最後 進入步驟1 3 0。 採用圖形轉色壓縮的圖形在資料内容較為單一時能獲Page 7 1220847 V. Description of the invention (4) 2 4b color or higher) graphics, we can use dithering or color selection method to convert to 2 5 6 color graphics according to its content, while still maintaining the original graphics Look and feel. Common dithering methods include two-line dithering and Freud-Sternberg dithering; and more commonly used methods include spherical shell color selection. Methods such as dithering or color selection make use of the characteristics of human eyes that are sensitive to brightness information but not sensitive to color information, and replace thousands of colors with a small number of colors, and have approximate display effects, making graphic data large To simplify and shrink. Like other lossy compression methods, this scheme will actually discard some graphics information when converting the graphics to 2 56 colors. The commonly used spherical shell color selection method or Freud-Steinberg dithering color are both preferable. For graphics with a small number of colors, you can switch to 16-color graphics to further reduce the amount of data. The compression process of the present invention will be further described below. Please refer to "Figure 2", which is a flowchart of masking the same part of the low-level graphics according to the present invention, which is explained as follows: When the decompressed graphics uses the key frame masking method, select The first frame graphic is a key frame, and other graphics are used as subsequent frames (step 210): the same portion of the subsequent frame as in the first frame is masked (step 2 2 0), and finally proceeds to step 130. When the decompressed graphic uses the sequential frame masking method, each graphic in the moving day file is treated as a separate frame (step 2 30): starting from the second frame, the same place in each duck as the previous i5 frame is performed. Mask (step 2 4 0), and finally go to step 1 3 0. Graphics with color conversion compression can be obtained when the data content is relatively single

第8頁 1220847Page 8 1220847

五、發明說明(5) 如果每一幀圖形 。而且即便以較 如何先進,其壓 即無數據冗餘之 圖形,此值仍相 有一定關聯的序 。所以,本本發 壓縮圖形。對動 面的晝面有所相 往只占到全部晝 内容,那麼下一 >基於這種思想 得較南的壓縮率^ # 表現力不免有所# ^ 形,不管壓縮演算〉去 會趨近一較小的_ < -定具體内容之彩色 由於動畫是上~p 形都可以看作是—巾貞 Mask)技術來簡化待 都可能和其前面或後^ 也就是變化的部分往 我們已知上一晝面的 20%就可以繪製出來 都以大色塊構成,其 少顏色繪製簡單圖 縮後的圖片尺寸也只 理想值);對於具有 當大。 列晝面’將每一幅圖 明采用遮蔽(Shadow 晝來說’每一補晝面 同。而不同的部分, 面的2 0 %不到。假定 晝面只需知道不同的 ’在壓縮之前先對所5. Description of the invention (5) If each frame is graphic. And even if it is more advanced, its pressure is a graph with no data redundancy, this value still has a certain related order. Therefore, this article compresses the graphics. The diurnal aspect of the moving side only accounts for the entire diurnal content, so the next > compression ratio based on this idea is more south ^ # Expressive cannot be unavoidable # ^ shape, regardless of the compression calculation, it will tend to Nearly a small _ <-set the specific content of color because the animation is up ~ p-shaped can be regarded as-Jinzhen Mask) technology to simplify the treatment of all possible and its front or back ^ that is, the changing part to us It is known that 20% of the previous diurnal surface can be drawn with large color blocks, and the size of the simple image with a small amount of drawing is only an ideal value); The column of the day surface uses every picture to be shaded. (Shadow for the day, each day surface is the same. For different parts, less than 20% of the surface. It is assumed that the day surface only needs to know the different ones before compression. First

有的圖形進行内容比較,將相同的冗餘部分變為Mask Shadow,這樣就使得Mask Shadow占到待壓圖形的大部分 面積,也就是說去除了冗餘内容的Shadowed圖形文件中絕 大部分面積都是同一種顏色,也就是Mask Shadow的顏 色。經過上述處理過的圖形壓縮後的圖形資料量從總體上 已遠小於只采用轉色壓縮的結果。Some graphics are compared for content, and the same redundant part becomes Mask Shadow, so that Mask Shadow occupies most of the area of the graphic to be compressed, that is to say, most of the area in the shadowed graphics file with redundant content removed Both are the same color, which is the color of Mask Shadow. The amount of graphics data after the graphics compression processed as described above is far less than the result of using only color conversion compression.

本發明使用的遮蔽技術包括關鍵禎遮蔽及次序巾貞 (Sequenced Mask)遮蔽兩種方式。假定有一組動畫共十 幀’如後九幀同第一幀比較平均每福相同的圖元為7 〇 %, 而同第二禎比較則可能平均每幀相同的圖元為80%。全部 都比一遍則需比較幾十次,如幀數較多則全部比較的次數 以平方關係隨幀數上升。The masking technology used in the present invention includes two methods: key masking and sequenced mask masking. Suppose there is a group of animations with a total of ten frames. If the next nine frames are compared with the first frame, the average number of the same primitives is 70%, and when compared with the second frame, the average number of the same pixels may be 80%. All of them need to be compared dozens of times. If the number of frames is large, the number of all comparisons increases with the squared relationship with the number of frames.

1220847 五、發明說明(6) 其中,關鍵幀法遮蔽方式的原則如下:先以第一幀為 關鍵補’其後的福以此巾貞為板板進行比較生成M a s k Shadow 5在此過程中設定一個Gai n值,當某禎的M a s k Shadow的面積小於此Ga i n值’即認為動晝内容同前一幀相 比發生了較大變化,即將此幀也當作關鍵幀,不進行遮 蔽。在此之後的動晝就以前面的關鍵幀分別進行比較然後 取遮蔽面積大的,並將其所使用關鍵禎I D記入此遮蔽圖。 此方法的好處是各禎内容相對獨立,可單獨解出。 次序幀(Sequenced Mask)遮蔽方式原則如下:即假 定每一幀同上一幀相似度最高(實際往往也如此),每一禎 都以上一禎為模板生成遮蔽部分。此方法的解壓合成速度 快,但每一巾貞對上一巾貞有依賴性,適合順序播放。 對動晝檔案内的圖形進行了遮蔽處理後,就需要對其 進行進一步的剪切處理:只保留其有效部分,本發明是通 過使用智慧裁減的技術來完成對圖形的這項工作的。當動 晝内容被S h a d 〇 w M a s k處理過之後,其壓縮大小相對處理 前已經大大縮小,但對於一定尺寸之圖形,既使其中沒有 任何内容(例如全白),其壓縮後也還是有一定尺寸。此處 引入智慧裁減的方法進一步減小資料,此方法的思想是如 果大塊的連續區域都為Mask Shadow所覆蓋,則乾脆將此 區域拋棄,而只記下其位置。經此裁減之後遮蔽過的圖形 面積也大大縮小,其壓縮後尺寸就更小,相似度很高的幀 有時甚至會僅剩下幾百,幾十甚至零位元組。 在剪切過程完畢後,進入色彩的處理階段,本發明是1220847 V. Description of the invention (6) Among them, the principle of the key frame masking method is as follows: the first frame is used as the key to supplement the 'blessing'. The subsequent blessing is compared with this frame to generate M ask Shadow 5 in the process. Set a Gain value. When the area of a certain M ask Shadow is smaller than this Ga in value, it means that the content of the moving day has changed greatly compared with the previous frame, that is, this frame is also regarded as a key frame without masking. . After that, the day after day is compared with the previous key frame, then the one with a large masking area is taken, and the key 祯 ID used by it is recorded in this mask. The advantage of this method is that each content is relatively independent and can be solved separately. The principle of sequential masking is as follows: assuming that each frame has the highest similarity to the previous frame (which is often the case), each frame generates a masking part for the template. The decompression synthesis speed of this method is fast, but each frame is dependent on the previous frame, which is suitable for sequential playback. After the graphics in the moving day file are masked, it needs to be further cut: only the effective part is retained. The present invention accomplishes this task by using the technology of smart cut. After the dynamic day content has been processed by Shad 〇w M ask, its compression size has been greatly reduced compared to before processing, but for a certain size graphic, even if there is no content in it (such as all white), there is still Certain size. The method of smart reduction is introduced here to further reduce the data. The idea of this method is that if a large continuous area is covered by Mask Shadow, then this area is simply discarded, and only its position is recorded. After this trimming, the area of the masked image is also greatly reduced, and its size after compression is smaller. Sometimes, only a few hundred, dozens, or even zero bytes of frames with high similarity are left. After the cutting process is completed, the color processing stage is entered. The present invention is

_醒_ 第10頁 1220847 五、發明說明(7) 通過使用色盤調整技術來進行的。由於所處理的是2 5 6/ 1 6色圖形’當播放該圖形時,輸出設備可能是4 6色的, 所以需要根據輸出設備的色深生成對應的冗余合成調色 板’將該保留部分的色階映射到該調色板上。本發明在這 裏加入了 2 4 b i ΐ真彩色向4 0 9 6色調色板調整的過程,並針 對16色/ 2 5 6色圖形分別生成16色合成調色板和256色奇偶 冗餘調色板。由於並非所有的圖形都擁有2 5 6種顏色,所 从針對非2 5 6色的圖形,僅保留其實際用到的顏色的調色 板項,而將未用到的項目予以刪除·將2 5 6色奇偶冗餘的調 色板裁掉以占用最小的空間。 色盤調整過程完畢後,就進入壓縮階段的最後一個步 ::.二忒圖形所保留的有效部分的色階,選擇適當的字典 而2 ΐ縮為基於該色階存格式的動晝壓縮檔案。由於在前 耷的二^中已經將動晝槽案内的原始圖形轉換為1 6// 2 5 6 對並、隹/階圖形’此時就可以根據基於1 6〆2 5 6色的字典 對其進行壓縮。 壓性i ί:ϊ ϊ典模型的壓縮以其相對其他演算法快速解 LZH等多種。、:曾。、土其中可使用有LZ77、LZSS、LZW、LZA及 程度不一。、^、t法上的差异使的對不同類型的資料敏感 在ΐ縮圖,形的壓縮率也有所不㈤。上述演算法 關係很大71 ^ π都有一共性,即資料複雜度和壓縮率的 積越大,m二t5兄就是,當圖形中少數顏色的内容占的面 壓縮率越高。 4十對以上牲& , %點’本方案選用基於2 5 6色及16色存儲格 1220847 五、發明說明(8) 式進行壓縮,其原因如下,4 0 9 6色為12b it圖元格式,由 於交錯存儲,圖元被打碎,交錯組合造成資料複雜度提 高,壓縮後壓縮率不高。而使用2 5 6色每圖元一個位元 組,當有大色塊時其資料單一重復,壓縮率高。而1 6色則 因其1 6種顏色總共只可能有2 5 6種資料組合,且源資料量 較小,而能獲得較少的資料複雜度及不錯的壓縮率。 本發明並不限使用何種具體壓縮演算法,但只要是上 述方法之一或其他基於資料字典的方法,均可利用本方案 取得高度的壓縮效果。 至此,動晝檔案内圖形的壓縮過程全部完畢。 下面對解壓過程進行說明。請參見『第3圖』,該圖 係為本發明所提之動晝快速解壓方法之流程圖,說明如 下: 根據壓縮字典類型解壓動畫壓縮檔案,獲取解壓圖形 (步驟3 1 0);根據該解壓圖形的遮蔽方式將其合成為完 整圖形(步驟3 2 0);根據輸出設備的調色板,確定將該 完整圖形還原為初始色階的演算法(步驟3 3 0);根據該 演算法對該完整圖形進行轉色,獲取當前圖形(步驟 3 4 0);通過貼圖在輸出設備上播放該當前圖形(步驟 3 5 0)。 當需要在各種攜帶型電子設備上播放經過壓縮處理的 動晝檔案時,就需要對其進行解壓處理。首先,確定壓縮 處理時所選擇的字典類型,根據類型將壓縮檔案檔案解壓 縮。然後取定在壓縮過程中所選擇的遮蔽方式,也就是解_ 醒 _ Page 10 1220847 V. Description of the Invention (7) It is performed by using the color wheel adjustment technology. Because the processed 2 5 6/16 color graphics 'When playing this graphic, the output device may be 4 6 colors, so the corresponding redundant synthesis palette needs to be generated according to the color depth of the output device' to retain this Part of the color scale is mapped to the palette. In the present invention, a process of adjusting a 2 4 bi ΐ true color to a 4 0 9 6 color palette is added here, and a 16-color composite palette and a 256-color parity redundant color palette are generated for 16-color / 256-color graphics, respectively. board. Because not all graphics have 256 colors, for graphics that are not 256 colors, only the palette items of the colors actually used are retained, and unused items are deleted. 2 5 6-color parity redundant palettes are trimmed to take up minimal space. After the color wheel adjustment process is completed, it enters the last step of the compression stage ::. The color level of the effective part retained in the second image is selected. An appropriate dictionary is selected and 2 is compressed into a dynamic day compression file based on the color level storage format. . Since the original figure in the moving day slot case has been converted into a 16 // 2 5 6 pair union, 隹 / order figure in the previous two ^, at this time, it can be based on a dictionary pair based on 16 6 2 5 6 colors. It is compressed. Compressibility i ϊ: ϊ The compression of the canonical model is fast compared to other algorithms, such as LZH and so on. ,:Once. Among them, LZ77, LZSS, LZW, LZA can be used and the degree is different. The differences in the ^, t, and t methods make it sensitive to different types of data. In shrinking the image, the compression ratio of the shape is also not good. The above algorithm has a close relationship. 71 ^ π have a commonality, that is, the larger the product of data complexity and compression ratio, the higher the compression ratio is when the content of a few colors in the graph occupies a larger area. More than ten pairs of animals &% points' This scheme uses a memory cell 1220847 based on 256 colors and 16 colors. V. Description of invention (8) The compression is performed for the following reasons. 4 0 9 6 colors are 12b it In the format, due to the interlaced storage, the primitives are broken, the data complexity is increased due to the interlaced combination, and the compression rate is not high after compression. When using 2 56 colors, one byte per pixel, when there is a large color block, the data is repetitively repeated, and the compression rate is high. For 16 colors, there are only 256 data combinations possible for its 16 colors, and the amount of source data is small, so it can obtain less data complexity and good compression ratio. The present invention is not limited to any specific compression algorithm, but as long as it is one of the above methods or other data dictionary-based methods, this solution can be used to achieve a high compression effect. At this point, the compression process of the graphics in the moving day file is all completed. The decompression process is described below. Please refer to "Figure 3", which is a flow chart of the rapid decompression method of moving day and time according to the present invention, which is described as follows: Decompress the animation compression file according to the compression dictionary type to obtain the decompression graphic (step 3 1 0); Decompress the masking method of the graphic to synthesize it into a complete graphic (step 3 2 0); according to the color palette of the output device, determine the algorithm to restore the complete graphic to the original color level (step 3 3 0); according to the algorithm Perform color conversion on the complete graphic to obtain the current graphic (step 340); play the current graphic on the output device through the map (step 540). When you need to play compressed compressed daily files on various portable electronic devices, you need to decompress them. First, determine the type of dictionary selected for the compression process, and decompress the compressed archive file based on the type. Then determine the masking method selected during the compression process, that is, the solution

第12頁 1220847 五、發明說明(9) 壓圖形的遮蔽方式’根據遮敞方式執行相應的後續操作。 如果確定在解壓的圖形中使用次序幀遮蔽方式時,通 過直接解壓合成(Direct: Unmask Uncompress)來合成完 整圖形,如果確定在解壓的圖形中使用關鍵這遮蔽方式 時,那麼將使用解結合成技術來合成完整圖形。 請參見『第4圖』,該圖係為本發明之根據壓縮字典 類型解壓動晝壓縮檔案之流程圖,說明如下: 當該解壓圖形使用次序幀遮蔽方式時,通過直接解壓 合成完整圖形,首先對該壓縮檔案内的關鍵幀進行解壓 (步驟4 1 0):然後對該壓縮檔案内的遮蔽幀進行解壓 (步驟4 2 0);根據所裁去的遮蔽部分的位置訊息,將遮 蔽幀圖元及關鍵幀的圖元合並為完整圖形(步驟4 3 0), 最後進入步驟2 2 0。 當該解壓圖形使用關鍵這遮蔽方式時,首先對該壓縮 檔案内的關鍵幀進行解壓(步驟4 4 0) •,然後對該壓縮檔 案内的遮蔽幀進行解壓(步驟4 5 0);最後進入步驟3 2 0。 如果確定在解壓的圖形中使用次序幀遮蔽方式時,通 過直接解壓合成(Direct Unmask Uncompress)來合成完 整圖形’這個過程是在與圖形的解壓縮過程將同時進行。 如果解出的是遮蔽圖元,則丟棄,否則貼到上一幀圖 形的對應位置上。此法在解壓完成後就得到了當前的圖 形。速度相當快。適合於順序播放的動晝。 如果確定在解壓的圖形中使用關鍵幀遮蔽方式時,那 麼將使用解壓合成技術來合成完整圖形,解壓過程僅僅是Page 12 1220847 V. Description of the invention (9) Masking method of pressing the graphic 'performs the corresponding subsequent operation according to the masking method. If it is determined that the sequential frame masking method is used in the decompressed graphic, the complete graphic is synthesized by direct decompression synthesis (Direct: Unmask Uncompress). If it is determined that the key masking method is used in the decompressed graphic, then the decombination technology will be used To compose a complete graphic. Please refer to "Figure 4", which is a flowchart of decompressing a dynamic daytime compressed file according to the compression dictionary type of the present invention, which is explained as follows: When the decompressed graphic uses the sequential frame masking method, a complete graphic is synthesized by direct decompression. First, Decompress the key frames in the compressed file (step 4 1 0): then decompress the masked frames in the compressed file (step 4 2 0); according to the position information of the cut out masked portion, the masked frame image The primitives and primitives of key frames are combined into a complete graphic (step 4 3 0), and finally enter step 2 2 0. When the decompressed graphic uses the key masking method, first decompress the key frames in the compressed file (step 4 4 0) •, then decompress the mask frames in the compressed file (step 4 5 0); finally enter Step 3 2 0. If it is determined that the sequential frame masking method is used in the decompressed graphic, the complete graphic is synthesized through Direct Unmask Uncompress (Direct Unmask Uncompress). This process is performed simultaneously with the graphic decompression process. If the solved primitives are occluded, they are discarded, otherwise they are pasted to the corresponding position of the previous frame. This method obtains the current graphic after decompression is completed. It's pretty fast. Suitable for moving day in sequence. If it is determined to use the key frame masking method in the decompressed graphics, then the decompression synthesis technology will be used to synthesize the complete graphics. The decompression process is only

第13頁 1220847 五、發明說明(ίο) 把關鍵幀及遮蔽幀從壓縮檔案中解壓出來。 請參見『第5圖』’該圖係為本發明之使用關鍵巾貞遮 蔽方式時將解壓圖形合成為完整圖形之流程圖,說明如 下: 丟棄解壓所得到的遮蔽部分的圖元步驟5 1 0);將解 壓得到的非遮蔽圖元與上一幀進行合成,得到當前幀的完 整圖形(步驟5 2 0);最後進入步驟3 3 0。 當使用關鍵禎遮蔽方式時,當圖形被解壓,顯然,一 幅遮蔽圖要依賴關鍵禎或前一幀的内容來還原其本來的内 容。間接合成用於關鍵幀法壓縮的動晝,當一俩遮蔽圖被 解壓時,先解出關鍵幀(此幀也可能在記憶體中緩沖,以 直接使用加快速度),然後解出遮蔽幀,將遮蔽幀上的未 遮蔽圖元與關鍵幀合並成生為一幀就已還原出這一幀。 由於圖形在壓縮過程中被轉換為2 5 6/ 1 6色,與輸出 設備色深不同,所以在作解壓時需要通過對其進行轉色將 資料轉為輸出設備色深。為減小運算量可僅根據遮蔽資訊 轉換未遮蔽的部分。 當壓縮圖形被合成為完成圖形後,首先進入根據輸出 設備的色深生成對應的冗余合成調色板,制定將該完整圖 形中的色階還原為原始圖形中的色階的演算法之步驟。本 發明使用了快速轉色(F a s t M a p P a 1 e 11 e)技術來制定這 種演算法。 通過上面的解壓縮出的圖形資料都還是1 6色或2 5 6色 的圖形資料,要最終能夠顯示,還要把它轉成4 0 9 6色。 1220847 五、發明說明(11) 一般轉色方法通過調色板將1 6色映射到4 0 9 6色,需將 1 6色數據(4 b i t/ p i X e 1)從一個位元組中取出,然後再 調色板中找到其所對應的顏色(1 2 b i t/ p i X e 1),然後將 此1 2 b i t數據向目標圖形合成。這其中涉及幾次位元組的 拆分,合成、轉換效率低下。 為了能夠取得快速的轉色過程,在壓縮圖形中攜帶了 1 6色合成調色板,避免了位運算。所謂合成調色板對 1 2 b i t色來說,每圖元要占1. 5位元組空間,那麼,兩圖元 共有3位元組,將來兩圖元看成一個顏色操作,則源資料 每次操作1位元組,目標資料每次操作3位元組。由於十六 種顏色任意兩像素結合為一個位元組,其可能'性僅2 5 6 種,所以可預先合成一各2 5 6項的調色板,使兩個像素使 用一個調色板項,這樣轉換的過程就變為:取出兩個像素 數據(一個位元組),調色板中找到其所對應的顏色項 (2 4b i t,三個位元組),將顏色項寫入目標圖形,完全 避免了位元運算,轉換效率大大提高。 對於2 5 6色如采用合成調色板轉色則調色板太大,此 處使用奇偶冗餘調色板技術。此方法要素為,每種顏色建 立4位元組的調色板,兩個位元組為奇圖元,兩個位元組 為偶像素。交替使用以減少位運算而獲致高速。為了能讓 速度進一步提高,對於1 6色轉色中,將上述兩種方法結合 起來,構成冗余合成調色板,在CPU上取得了進一步的性 能提升。 冗餘調色板的設計思想是使用1 6 b i t來放置一個1 2 b i tPage 13 1220847 V. Description of the Invention (ίο) Extract the key frames and occlusion frames from the compressed file. Please refer to "Figure 5". This figure is a flowchart of synthesizing the decompressed graphic into a complete graphic when using the key mask masking method of the present invention, and the description is as follows: Discard the image element of the masked part obtained by decompression. ); Combining the decompressed non-occluded primitives with the previous frame to obtain the complete graphic of the current frame (step 5 2 0); finally enter step 3 3 0. When using the key frame masking method, when the graphic is decompressed, it is obvious that an occlusion map depends on the content of the key frame or the previous frame to restore its original content. Indirect synthesis is used for dynamic day compression of key frame method. When one or two occlusion maps are decompressed, the key frames are first extracted (this frame may also be buffered in memory for direct use to speed up), and then the occlusion frames are extracted. Combining the unoccluded primitives on the occluded frame with the key frames into a single frame has restored this frame. Because the graphics are converted to 2 5 6/16 colors during the compression process, which is different from the color depth of the output device, you need to convert the data to the output device color depth when decompressing. To reduce the amount of calculation, the unmasked part can be converted based on only the masked information. When the compressed graphic is synthesized into a completed graphic, first enter the step of generating a corresponding redundant composite palette based on the color depth of the output device, and formulate the algorithm steps of restoring the color gradation in the complete graphic to that in the original graphic . The present invention uses a fast color transfer (F a s t M a p P a 1 e 11 e) technique to formulate this algorithm. The graphic data obtained through the above decompression are still 16-color or 256-color graphic data. In order to be able to display it finally, it must be converted into 4096 colors. 1220847 V. Description of the invention (11) The general color conversion method maps 16 colors to 4 0 96 colors through the color palette. It is necessary to take 16 color data (4 bit / pi X e 1) out of one byte. , Then find its corresponding color in the palette (1 2 bit / pi X e 1), and then synthesize this 1 2 bit data to the target graphic. This involves several byte splits, resulting in low synthesis and conversion efficiency. In order to achieve a fast color conversion process, a 16-color composite palette is carried in the compressed graphics, avoiding bit operations. For the so-called synthetic palette, for each 1-bit color, each pixel occupies 1.5 bytes of space. Then, the two pixels have a total of 3 bytes. In the future, the two pixels will be regarded as a color operation. The source data One byte is operated at a time, and the target data is operated at 3 bytes at a time. Since any two pixels of sixteen colors are combined into one byte, it may have only 256 types, so a palette of 256 items can be synthesized in advance, so that two pixels use one palette item , So the conversion process becomes: take two pixel data (one byte), find its corresponding color item (2 4b it, three bytes) in the palette, and write the color item to the target The graphics completely avoid bit operations and greatly improve the conversion efficiency. For 2 5 6 colors, the color palette is too large if the color is converted to a synthetic color palette. Here, the parity redundant color palette technology is used. The elements of this method are: each color creates a 4-byte palette, two bytes are odd pixels, and two bytes are even pixels. Used alternately to reduce bit operations to achieve high speed. In order to further increase the speed, for the 16-color conversion, the above two methods are combined to form a redundant composite palette, which has further improved the performance on the CPU. The design idea of the redundant palette is to use 1 6 b i t to place a 1 2 b i t

第15頁 1220847 五、發明說明(12) 的調色板項,使此顏色項從調色板中取出時能夠避免位元 拆分,從而減少運算時間。在32位元處理器上,CPU訪問 數據總線(BUS) —次取出4個位元組,如要取三個則反而 要增加一些運算轉為三個。所以將合成調色板的顏色項也 做一冗餘處理,使用4個位元組放置2 4位元的顏色項,可 進一步加快轉色運算的速度。 演算法制定好後,將根據該演算法,經過轉色將合成 好的圖形顯示出來。本發明提供了兩種方式來進行轉色, 一種為全域轉色方式’另外一種為局域轉色方式。 全域轉色(Global Area Map Palette)方式利用了 關键幀中包含其他禎中沒有的圖像資料的特點,因此針對 關鍵幀使用全域轉色法,將整幀圖像配合冗余合成調色板 進行轉換。 局域轉色(Local Area Map Palette)方式利用了 裁減後的圖形對前一幀的依賴,由前述技術可知,針對次 序幀(Sequenced Mask)方式的圖形每幀圖形都是前一幀 圖形的局部改變。所以,此處只要采用靈巧的方法配合冗 佘合成調色板對發生改變的部分圖元進行轉色就可以得到 正確的結果。由於這一部分的圖元僅是全部圖形面積的一 小部分。局域轉色使得轉色操作的資料大大減少。從而使 轉色速度明顯提高。 最後,通過貼圖在輸出設備上播放該當前圖形。 本發明提供了全域貼圖(G 1 〇 b a 1 A r e a BitTransfer)和局域貼圖(Local Area BitTransfer)Page 15 1220847 V. The palette item of the description of the invention (12) can avoid bit splitting when this color item is taken out from the palette, thereby reducing the calculation time. On a 32-bit processor, the CPU accesses the data bus (BUS) — fetching 4 bytes at a time. If you want to take three, you need to add some operations to three. Therefore, the color items of the synthesized palette are also processed redundantly, and the 24-bit color items are placed using 4 bytes, which can further speed up the color conversion operation. After the algorithm is formulated, the synthesized graphics will be displayed after color conversion according to the algorithm. The present invention provides two methods for color conversion, one is a global color conversion method 'and the other is a local color conversion method. The Global Area Map Palette method takes advantage of the fact that the key frame contains image data not found in other frames. Therefore, the global frame color palette method is used for the key frame, and the entire frame image is converted with the redundant synthesis palette. . The Local Area Map Palette method makes use of the dependence of the cut graphic on the previous frame. As can be seen from the foregoing techniques, for the sequenced mask method, each frame of the graphic is a part of the previous frame. change. Therefore, as long as a clever method is used here with the redundant composite palette to change the color of some of the primitives that are changed, you can get correct results. Because the graphics primitives in this part are only a small part of the total graphics area. Local color conversion greatly reduces the data of color conversion operation. As a result, the color transfer speed is significantly increased. Finally, the current graphic is played on the output device through a map. The present invention provides a global map (G 1 〇 b a 1 A r e a BitTransfer) and a local map (Local Area BitTransfer)

第16頁 1220847 五、發明說明(13) 兩種方式。 對於關鍵禎,使用全域貼圖法,將整個圖像拋入顯示 缓衝,從而進行播放。 局域貼圖的方法同局域轉色的方法有點類似,在我們 最終顯示時我們也不必把全部的圖形資料拋到螢幕,只要 把發生改變的部分拋到螢幕就可以得到正確的結果。由於 這一部分的圖元僅是全部圖形面積的一小部分。局域貼圖 使得貼圖操作的資料大大減少。從而使貼圖速度也明顯提 高。 至此,對壓縮的動晝圖形檔案進行解壓及播放的過程 全部完畢。 下面用一個較佳的實例來說明本發明中遮蔽及智慧裁 減的具體流程。 請參見第6圖,該圖係為本發明所提之遮蔽及智慧裁 減之示意圖,說明如下: 第一排的四幅圖形是動畫檔案内的所包含的原始圖 形,不難看出上面動晝内容中有不少相似的部分。 第二排的四幅圖形是經過遮蔽後的圖形。在這裏選用 關鍵幀的方式對四幅原始圖形中相同的地方進行遮蔽以第 一幀為模板,假定遮蔽部分顏色為黑色。可以看出,從第 二幀起,同第一幀内容相同的部分都被遮蔽部分取代。這 使得後面幾巾貞的資料内容大大簡單化。也就是說壓縮的效 率會大大提高。 第三排的四幅圖形是對經過遮蔽後的圖形進行智慧裁Page 16 1220847 V. Description of the invention (13) Two methods. For key frames, use the global mapping method to throw the entire image into the display buffer for playback. The method of local mapping is similar to the method of local color conversion. When we finally display it, we don't have to throw all the graphic data to the screen. We only need to throw the changed part to the screen to get the correct result. Because this part of the picture element is only a small part of the total picture area. Local maps greatly reduce the data for map operations. As a result, the mapping speed is also significantly increased. At this point, the process of decompressing and playing the compressed moving day graphic file is all completed. The following uses a preferred example to explain the specific process of shielding and smart reduction in the present invention. Please refer to Figure 6, which is a schematic diagram of the masking and smart reduction mentioned in the present invention, which is explained as follows: The four graphics in the first row are the original graphics contained in the animation file. There are quite a few similarities. The four graphics in the second row are masked graphics. The key frame method is used here to mask the same place in the four original graphics. The first frame is used as a template, and the color of the masked part is assumed to be black. It can be seen that from the second frame, the same parts as those in the first frame are replaced by the masked parts. This greatly simplifies the contents of the materials of the next few towels. In other words, the efficiency of compression will be greatly improved. The four graphics in the third row are smart cuts of the masked graphics

第17頁 1220847 五、發明說明(14) 減後的結果。:圖所示,裁減後附圖只剩下幾個與關鍵幀 内容不同的小圖塊,資料量大大減少了。 綜上所遂無通過對以上十大創新關鍵技術的結合使 用,本發明在實現了高度的動晝壓縮率(16〇*16〇動晝平 均每幀不到1 k位元組)的同時提供了快速的播放性能 (1 6 0 * 1 6 0動畫已超過1 〇幀/秒)以及盡矸能多的色彩運 用空間(因内欣調色板,美工可以任選所需的若干種顏 色,而不必局限於標準色板)。 通過以上流程實施之動晝壓縮解壓,對一般動晝可取 得1 0 : 1---3 0 : 1的高度壓縮率,而動畫的播放也快於現有 之其他壓縮方法。在低端處理器(T〇shiba T 9 0 0 ( 1 8MHZ) 平臺上播放160*16 0尺寸的彩色動書&lt;達l〇fps。 以上所述者,僅為本發明其中的較隹實施例而已,並 非用來限定本發明的實施範圍;即凡依本創作申請專利範 圍所作的均等變化與修飾,皆為本創作專利範圍所涵蓋。Page 17 1220847 V. Description of the invention (14) Subtracted result. : As shown in the figure, only a few small tiles with different contents from the key frame are left in the drawing after the reduction, and the amount of data is greatly reduced. In summary, the above-mentioned ten key technologies of innovation are not used in combination. The present invention provides a high dynamic day compression ratio (average of less than 1 kbytes per frame per day). Fast playback performance (16 0 * 1 60 animations have exceeded 10 frames per second) and as much color use space as possible (because of the Neshin palette, the artist can choose as many colors as needed, And not necessarily limited to standard swatches). The dynamic day compression and decompression implemented through the above process can achieve a high compression ratio of 10: 1 --- 3 0: 1 for general dynamic day, and the animation playback is faster than other existing compression methods. Play 160 * 160 size color animations <10fps on a low-end processor (Toshiba T 9 0 (18MHZ) platform. The above is only a relatively small implementation of the present invention. The examples are not intended to limit the scope of implementation of the present invention; that is, all equivalent changes and modifications made in accordance with the scope of the patent application for this creation are covered by the scope of the invention patent.

第18頁 1220847 圖式簡單說明 第1圖係為本發明所之一種動晝快速壓縮方法之總體流程 圖; 第2圖係為本發明所提之遮蔽該低色階圖形中相同的部分 之流程圖; 第3圖係為本發明所提之動晝快速解壓方法之流程圖; 第4圖係為本發明之根據壓縮字典類型解壓動晝壓縮檔案 之流程圖; 第5圖係為本發明之使用關鍵幀遮蔽方式時將解壓圖形合 成為完整圖形之流程圖;及 第6圖係為本發明之遮蔽及智慧裁減之示意圖。 【圖式符號說明】 110 將動晝檔案内所有圖形轉換為低色階圖形; 120 遮蔽該低色階圖形中相同的部分 1 3 0 對經過遮蔽的圖形進行剪切,保留其有效部分 140 根據輸出設備的特點生成對應的調色板 150 根據該有效部分的色階,通過字典壓縮獲取動晝 壓縮檔案 210 選擇動晝檔案内第1幀圖形為關鍵幀,其他圖形作 為後續幀 2 2 0 對後續幀中與第1幀内相同的部分進行遮蔽。 2 3 0 將動晝檔案内的每幅圖形作為單獨幀 2 4 0 從第2幀開始,將每一幀中與前一幀相同的地方進 行遮蔽 310 根據壓縮字典類型解壓動晝壓縮檔案,獲取解壓1220847 on page 18 Brief description of the diagram. The first diagram is a general flowchart of a fast-day compression method according to the present invention. The second diagram is the process of masking the same part of the low-level graphics according to the present invention. Figure 3 is a flow chart of the fast daytime decompression method provided by the present invention; Figure 4 is a flow chart of the present invention based on the compression dictionary type to decompress the moving daytime compressed file; Figure 5 is a flow chart of the present invention A flowchart of synthesizing decompressed graphics into a complete graphic when using the key frame masking method; and Figure 6 is a schematic diagram of masking and smart reduction of the present invention. [Illustration of graphical symbols] 110 Convert all the graphics in the moving day file into low-level graphics; 120 Mask the same part of the low-level graphics 1 3 0 Cut the masked graphics and keep the valid part 140 according to The characteristics of the output device are used to generate the corresponding color palette. 150 According to the color gradation of the effective part, the moving day compression file is obtained through dictionary compression. 210 The first frame graphic in the moving day file is selected as the key frame, and other graphics are used as subsequent frames. 2 2 0 pairs In subsequent frames, the same parts as in the first frame are masked. 2 3 0 Use each image in the moving day file as a separate frame 2 4 0 Starting from the second frame, mask the same place in each frame as the previous frame 310 Decompress the moving day compressed file according to the compression dictionary type to obtain Unzip

第19頁 1220847 圖式簡單說明 圖形 3 2 0 根據該解壓圖形的遮蔽方式將其合成為完整圖形 3 3 0 根據輸出設備的調色板,確定將該完整圖形還原 為初始色階的演算法 34 0 根據該演算法對該完整圖形進行轉色,獲取當前 圖形 3 5 0 通過貼圖在輸出設備上播放該當前圖形, 410 對該壓縮檔案内的關鍵幀進行解壓 4 2 0 對該壓縮檔案内的遮蔽幀進行解壓 4 3 0 根據所裁去的遮蔽部分的位置訊息,將遮蔽幀圖 元及關鍵幀的圖元合併為完整圖形 44 0 對該壓縮檔案内的關鍵幀進行解壓 4 5 0 對該壓縮檔案内的遮蔽幀進行解壓 510 丟棄解壓所得到的遮蔽部分的圖元 5 2 0 將解壓得到的非遮蔽圖元與上一幀進行合成,得 到當前幀的完整圖形Page 19 1220847 Schematic illustration of the graphic 3 2 0 The decompressed graphic is synthesized into a complete graphic according to the masking method of the decompressed graphic 3 3 0 Based on the palette of the output device, the algorithm for restoring the complete graphic to its original color level is determined. 34 0 Convert the complete graphic according to the algorithm to obtain the current graphic 3 5 0 Play the current graphic on the output device through a map, 410 decompress the key frames in the compressed file 4 2 0 Decompress the occluded frame 4 3 0 Combine the occluded frame primitives and key frame primitives into a complete graphic according to the position information of the cropped occluded part 44 0 Decompress the key frames in the compressed file 4 5 0 Decompress the masked frames in the compressed file. 510 Discard the masked parts of the decompressed image. 5 2 0 Combine the decompressed non-obscured graphics with the previous frame to get the complete graphic of the current frame.

Claims (1)

1220847 六、申請專利範圍 1、 一種動晝 將動 遮蔽 對經 根據 根據 壓縮檔案 2、 如專利申 中將動晝 對該圖形 該圖形的 3、 如專利申 中將動晝 對該圖形 該圖形的 4、 如專利申 中遮蔽該 鍵幀的方 選擇 作為後續 對後 5、 如專利申 中遮蔽該 序鍵幀的 請範圍 檔案内 進行抖 資料量 請範圍 檔案内 進行選 資料量 請範圍 低色階 式進行 動晝檔 幀;及 續幀中 請範圍 低色階 方式進 快速壓縮方法,該方法包括如下步驟: 晝檔案内所有圖形轉換為低色階圖形; 該低色階圖形中相同的部分; 過遮蔽的圖形進行剪切,保留其有效部分; 輸出設備的特點生成對應的調色板;及 該有效部分的色階,通過字典壓縮獲取動晝 第1項所述之動晝快速壓縮方法,其 所有圖形轉換為低色階圖形係為通過 色處理使其轉換為低色階圖形,降低 0 第1項所述之動畫快速壓縮方法,其 所有圖形轉換為低色階圖形係為通過 色處理使其轉換為低色階圖形,降低 0 第1項所述之動晝快速壓縮方法,其 圖形中相同的部分之步驟係為通過關 遮蔽,其更包括如下步驟: 案内第1幀圖形為關鍵幀,其他圖形 與第1幀内相同的部分進行遮蔽。 第1項所述之動晝快速壓縮方法,其 圖形中相同的部分之步驟係為通過次 行遮蔽,其更包括如下步驟:1220847 VI. Application for Patent Scope 1. A moving day will be based on the compressed file 2. According to the compressed file 2, such as the patent application will be the day of the graphic 3, such as the patent application will be the day of the graphic 4. If the party who masked the key frame in the patent application selects it as the subsequent pairing 5. If the patent application masks the key frame in the order, please shake the amount of data in the range file Please select the amount of data in the range file Please range low level Use the low-level mode to perform a fast compression method in a continuous low-level mode. The method includes the following steps: All graphics in the day file are converted to low-level graphics; the same portion of the low-level graphics; Cut the over-shaded graphic to retain its effective part; generate the corresponding color palette based on the characteristics of the output device; and the color level of the effective part, use dictionary compression to obtain the moving day fast compression method described in item 1, All graphics are converted to low-level graphics. Color processing is used to convert low-level graphics to low-level graphics, reducing the speed of the animation described in item 1 of 0. Method, all of its graphics are converted to low-level graphics by color processing to convert them to low-level graphics, which reduces the dynamic fast compression method described in item 1 above, and the steps of the same part of the graphics are passed Turning off masking includes the following steps: The first frame of the case is a key frame, and the other parts of the figure are the same as those in the first frame. The moving day fast compression method described in the first item, the steps of the same part in the figure are through the secondary masking, which further includes the following steps: 第21頁 1220847 六、申請專利範圍 將動晝檔案内的每幅圖形作為單獨幀;及 從第2幀開始,將每一幀中與前一幀相同的地方 進行遮蔽。 6、 如專利申請範圍第1項所述之動晝快速壓縮方法,其 中對經過遮蔽的圖形進行剪切,保留其有效部分係為 將每一幅圖形中的空白部分及進行遮蔽的部分裁去, 並記錄所裁去部分的位置。 7、 如專利申請範圍第1項所述之動晝快速壓縮方法,其 中根據輸出設備的特點生成對應的調色板係為根據輸 出設備的色深生成對應的冗余合成調色板,將該保留 部分的色階映射到該調色板上。 8、 如專利申請範圍第1項所述之動晝快速壓縮方法,其 中根據該有效部分的色階,通過字典壓縮獲取動畫壓 縮檔案係為根據該圖形所保留的有效部分的色階,選 擇適當的字典將其壓縮為基於該色階存格式的動晝壓 縮檔案。 9、 一種動晝快速解壓方法,該方法包括如下步驟: 根據壓縮字典類型解壓動晝壓縮檔案,獲取解壓 圖形; 根據該解壓圖形的遮蔽方式將其合成為完整圖 形; 根據輸出設備的調色板’確定將該完整圖形還 原為初始色階的演算法; 根據該演算法對該完整圖形進行轉色,獲取當前Page 21 1220847 6. Scope of patent application Each graphic in the moving day file is treated as a separate frame; and starting from the second frame, the same place in each frame as the previous frame is masked. 6. The quick day-to-day compression method as described in item 1 of the scope of patent application, wherein the masked graphics are cut, and the effective part is retained by cutting the blank part and the masked part in each figure. , And record the position of the cropped part. 7. The rapid day-to-day compression method as described in the first item of the scope of patent application, wherein generating a corresponding color palette according to the characteristics of the output device is to generate a corresponding redundant composite color palette according to the color depth of the output device. The gradations of the remaining parts are mapped onto this palette. 8. The fast day-to-day compression method as described in item 1 of the scope of patent application, wherein the animation compression file obtained by dictionary compression based on the color level of the effective portion is selected according to the color level of the effective portion retained by the graphic. Dictionary compresses it into a moving day compressed file based on the color gradation storage format. 9. A dynamic daytime rapid decompression method, the method includes the following steps: decompress the dynamic daytime compressed file according to the compression dictionary type to obtain a decompressed graphic; synthesize the decompressed graphic into a complete graphic according to the masking method; and according to the color palette of the output device 'Determine the algorithm to restore the complete graphic to the initial color level; perform color conversion on the complete graphic according to the algorithm to obtain the current 第22頁 1220847 六、申請專利範圍 圖形;及 通過貼圖在輸出設備上播放該當前圖形。 1 0、如專利申請範圍第9項所述之動晝快速解壓方法,其 中根據壓縮字典類型解壓動晝壓縮檔案,獲取解壓圖 形之步驟更包括當該解壓圖形使用次序幀遮蔽方式 時,通過直接解壓合成完成圖形之步驟,其中更包括 如下步驟: 對該壓縮檔案内的關鍵幀進行解壓; 對該壓縮檔案内的遮蔽幀進行解壓;及 根據所裁去的遮蔽部分的位置訊息,將遮蔽幀圖 元及關鍵幀的圖元合並為完整圖形。 1 1、如專利申請範圍第9項所述之動晝快速解壓方法,其 中根據壓縮字典類型解壓動晝壓縮檔案,獲取解壓圖 形之步驟更包括當該解壓圖形使用關鍵這遮蔽方式 時,更包括如下步驟: 對該壓縮檔案内的關鍵幀進行解壓;及 對該壓縮檔案内的遮蔽幀進行解壓。 1 2、如專利申請範圍第9項所述之動晝快速解壓方法,其 中根據該解壓圖形的遮蔽方式將其合成為完整圖形步 驟係為當該解壓圖形使用關鍵幀遮蔽方式時,通過間 ^ 接合成完成圖形之步驟,其中更包括如下步驟: 丟棄解壓所得到的遮蔽部分的圖元;及 將解壓得到的非遮蔽圖元與上一巾貞進行合成,得 到當前幀的完整圖形。Page 22 1220847 VI. Patent scope graphic; and play the current graphic on the output device through a map. 10. The dynamic daytime rapid decompression method as described in item 9 of the scope of patent application, wherein the step of decompressing the dynamic daytime compression file according to the compression dictionary type, and the step of obtaining the decompression graphic further includes when the decompression graphic uses the sequential frame masking method, by directly The steps of decompression and synthesis to complete the graphics include the following steps: decompress the key frames in the compressed file; decompress the masked frames in the compressed file; and mask the frames according to the position information of the cut out masked parts Primitives and primitives of keyframes are combined into a complete graphic. 1 1. The dynamic daytime rapid decompression method as described in item 9 of the scope of patent applications, wherein the step of decompressing the dynamic daytime compression file according to the type of compression dictionary, and obtaining the decompression graphic further includes when the decompression graphic uses the key masking method, including The following steps: Decompress the key frames in the compressed file; and decompress the masked frames in the compressed file. 1 2. The dynamic daytime rapid decompression method as described in item 9 of the scope of patent application, wherein the step of synthesizing the decompressed graphic into a complete graphic is performed when the decompressed graphic uses a key frame masking method. The step of synthesizing the completed graphic further includes the following steps: discard the primitives of the masked part obtained by decompression; and synthesize the non-occluded primitives obtained by decompression with the previous frame to obtain a complete graphic of the current frame. 第23頁 1220847 六、申請專利範圍 1 3、如專利申請範圍第9項所述之動晝快速解壓方法,其 中該調色板為根據輸出設備的色深生成對應的冗余合 成調色板。 1 4、如專利申請範圍第9項所述之動晝快速解壓方法,其 中根據該演算法對該完整圖形進行轉色,獲取當前圖 形係為通過對色階還原的圖形進行局域轉色處理的方 法來得到當前圖形。 1 5、如專利申請範圍第9項所述之動晝快速解壓方法,其 中根據該演算法對該完整圖形進行轉色,獲取當前圖 形係為通過對色階還原的圖形進行全域轉色處理的方 法來得到當前圖形。 1 6、如專利申請範圍第9項所述之動晝快速解壓方法,其 中通過貼圖在輸出設備上播放該當前圖形係為通過全 域貼圖的方法在輸出設備中顯示動晝中的圖形。 1 7、如專利申請範圍第9項所述之動晝快速解壓方法,其 中通過貼圖在輸出設備上播放該當前圖形係為通過局 域貼圖的方法在輸出設備中顯示動晝中的圖形。Page 23 1220847 VI. Scope of patent application 1 3. The dynamic daytime decompression method as described in item 9 of the scope of patent application, where the palette is a corresponding redundant synthesis palette based on the color depth of the output device. 14. The dynamic daytime rapid decompression method as described in item 9 of the scope of patent applications, wherein the complete graphic is color-changed according to the algorithm, and the current graphic is obtained by performing local color conversion on the graphic restored by color gradation. Method to get the current graphic. 15. The dynamic daytime rapid decompression method as described in item 9 of the scope of patent applications, wherein the complete graphic is color-changed according to the algorithm, and the current graphic is obtained by performing global color conversion on the graphic restored by the color gradation. Method to get the current graphic. 16. The fast daytime decompression method as described in item 9 of the scope of patent application, wherein playing the current graphic on the output device through a map is to display the graphic in the daytime on the output device through a global map method. 17. The fast daytime decompression method as described in item 9 of the scope of patent application, wherein playing the current graphic on the output device through a map is to display the graphic in the daytime on the output device through a local map method. 第24頁Page 24
TW92121810A 2003-08-08 2003-08-08 Fast compression and decompression method for animation TWI220847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW92121810A TWI220847B (en) 2003-08-08 2003-08-08 Fast compression and decompression method for animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW92121810A TWI220847B (en) 2003-08-08 2003-08-08 Fast compression and decompression method for animation

Publications (2)

Publication Number Publication Date
TWI220847B true TWI220847B (en) 2004-09-01
TW200507653A TW200507653A (en) 2005-02-16

Family

ID=34114704

Family Applications (1)

Application Number Title Priority Date Filing Date
TW92121810A TWI220847B (en) 2003-08-08 2003-08-08 Fast compression and decompression method for animation

Country Status (1)

Country Link
TW (1) TWI220847B (en)

Also Published As

Publication number Publication date
TW200507653A (en) 2005-02-16

Similar Documents

Publication Publication Date Title
JP2968582B2 (en) Method and apparatus for processing digital data
JP6703032B2 (en) Backward compatibility extended image format
US7450129B2 (en) Compression of streams of rendering commands
US20070076971A1 (en) Compression of images for computer graphics
CN115908644A (en) Animation processing method and device
TW200904145A (en) Method for encoding an input image and method and apparatus for displaying an encoded image
CN104952087A (en) Mipmap compression
CN112118449B (en) Method and device for compressing and decompressing image
CN112714357A (en) Video playing method, video playing device, electronic equipment and storage medium
US10282889B2 (en) Vertex attribute compression and decompression in hardware
US20090067733A1 (en) Byte Representation for Enhanced Image Compression
TWI220847B (en) Fast compression and decompression method for animation
JPH08205144A (en) Image encoding device
JPH10190478A (en) Data compressing device and method, recording medium, and data expanding device and method
CN111193928A (en) Method and apparatus for communicating region of interest information in video
CN113766319A (en) Image information processing method and device, and storage medium
US20030219163A1 (en) Image compression in retained-mode renderer
CN102523449A (en) Operation method by converting color mode
CN113450293A (en) Video information processing method, device and system, electronic equipment and storage medium
CN100593795C (en) Cartoon compression and decompression method based on wireless handhold equipment
TW476921B (en) Method of block-based texture compression using edge information in a block
CN1555198A (en) Cartoon quick condensing and decondensing method
JP3901499B2 (en) Display device and background image generation method
US20050185852A1 (en) Method and apparatus to generate complex borders
JP2000261803A (en) Coding and decoding method for image information

Legal Events

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