TWI589151B - Image data compression device and its compression method - Google Patents
Image data compression device and its compression method Download PDFInfo
- Publication number
- TWI589151B TWI589151B TW103134508A TW103134508A TWI589151B TW I589151 B TWI589151 B TW I589151B TW 103134508 A TW103134508 A TW 103134508A TW 103134508 A TW103134508 A TW 103134508A TW I589151 B TWI589151 B TW I589151B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- unit
- encoded data
- bit
- image input
- Prior art date
Links
- 238000007906 compression Methods 0.000 title claims description 104
- 230000006835 compression Effects 0.000 title claims description 100
- 238000000034 method Methods 0.000 title claims description 15
- 238000013144 data compression Methods 0.000 title description 2
- 238000001303 quality assessment method Methods 0.000 claims description 23
- 238000013441 quality evaluation Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 11
- 239000000463 material Substances 0.000 description 7
- 230000006837 decompression Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 2
- 230000000052 comparative effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 235000015096 spirit Nutrition 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
本發明是關於一種影像資料,尤其是關於壓縮影像資料之壓縮裝置及壓縮方法。
The present invention relates to an image material, and more particularly to a compression device and a compression method for compressing image data.
現今科技蓬勃發展,為更貼近人性需求,許多電子產品皆設置顯示器,讓使用者方便操作電子產品。小型電子產品諸如手機、平板電腦或手錶…等,類此行動裝置無法像一般家電直接外接電源,因此,耗電量之控制則非常重要。Today's technology is booming, and in order to be closer to human needs, many electronic products are equipped with displays to allow users to conveniently operate electronic products. Small electronic products such as mobile phones, tablets or watches, etc., such mobile devices cannot be directly connected to external power sources, so the control of power consumption is very important.
一般顯示器之驅動晶片(driver IC)的內部記憶體係作為一畫幀緩衝器(frame buffer),用以儲存主機(Host)所傳送的畫素資料。為節省耗電量與降低記憶體所佔用的空間,於習知技術中會透過壓縮編碼方式對畫素資料進行壓縮,藉以將資料量降低,記憶體之儲存空間的使用量及耗電量即會一併降低。資料壓縮方法分為固定長度編碼及變動長度編碼,例如:脈衝編碼調變(Pulse-Code Modulation,下稱PCM),資料經由PCM編碼而產生之編碼資料的位元數皆相同,所以其係固定長度編碼的一種;差分脈衝編碼調變(Differential Pulse-Code Modulation,下稱DPCM)係變動長度編碼的一種。DPCM主要包含預測器,其壓縮效能好壞取決於預測器之設計,惟若預測器預測之值偏差過大時,將導致編碼後所產生的編碼資料的位元數過長。整體而言,變動長度編碼之效能優於固定長度編碼之效能。The internal memory system of a driver IC of a general display acts as a frame buffer for storing pixel data transmitted by a host. In order to save power consumption and reduce the space occupied by the memory, in the prior art, the pixel data is compressed by compression coding, thereby reducing the amount of data, the storage space of the memory and the power consumption. Will be reduced together. The data compression method is divided into fixed length coding and variable length coding, for example, Pulse-Code Modulation (hereinafter referred to as PCM), and the number of bits of the encoded data generated by the PCM coding is the same, so the system is fixed. One type of length coding; Differential Pulse-Code Modulation (DPCM) is a type of variable length coding. DPCM mainly includes a predictor, and its compression performance depends on the design of the predictor. However, if the value predicted by the predictor is too large, the number of bits of the encoded data generated after encoding will be too long. Overall, the performance of variable length coding is better than the performance of fixed length coding.
一般情況下,由於固定長度編碼之編碼資料的位元數相同,所以可控制每筆編碼資料的位元數,卻其壓縮效能不如變動長度編碼之壓縮效能。但是變動長度編碼卻無法精準控制編碼資料的位元數,所以可能造成編碼資料的長度過長,而不適合儲存於畫幀緩衝器。In general, since the number of bits of the coded data of the fixed length code is the same, the number of bits of each coded data can be controlled, but the compression performance is not as good as the compression performance of the variable length code. However, the variable length coding cannot accurately control the number of bits of the encoded data, so the length of the encoded data may be too long, and it is not suitable for storage in the frame buffer.
綜上所述,欲將資料經編碼後而完整儲存在畫幀緩衝器中,必須考量到壓縮率,以確保壓縮處理後所產生的編碼資料可儲存於畫幀緩衝器,若要兼顧壓縮效能,其更為艱難,影像資料的習知處理方式仍無法達到兩全其美之目的。
In summary, in order to encode the data and store it in the frame buffer, the compression ratio must be considered to ensure that the encoded data generated after the compression process can be stored in the frame buffer, and the compression efficiency should be balanced. It is even more difficult, and the conventional processing of image data still cannot achieve the best of both worlds.
本發明之主要目的在於提供一種影像資料之壓縮裝置及其壓縮方法,其運用固定長度編碼與變動長度編碼對影像輸入資料進行編碼,以保證壓縮率能達到預定壓縮率,而確保影像輸入資料經壓縮處理後可儲存於儲存單元。The main object of the present invention is to provide a compression device for image data and a compression method thereof, which encodes image input data by using fixed length coding and variable length coding to ensure that the compression ratio can reach a predetermined compression ratio, and the image input data is ensured. After compression processing, it can be stored in the storage unit.
本發明之另一目的在於提供一種影像資料之壓縮裝置及其壓縮方法,其將影像顯示裝置之每一條水平行畫素資料劃分為複數區塊畫素資料而作為複數影像輸入資料,以進行壓縮處理,如此便於壓縮處理,以提高壓縮處理的效率。Another object of the present invention is to provide a compression device for image data and a compression method thereof, which divide each horizontal pixel data of the image display device into a plurality of block pixel data and use it as a plurality of image input data for compression. Processing, so easy to compress processing to improve the efficiency of the compression process.
本發明之又一目的在於提供一種影像資料之壓縮裝置及其壓縮方法,其運用固定長度編碼與變動長度編碼對影像輸入資料進行編碼,並檢視兩者所產生的兩個編碼資料的品質,以在確保壓縮率之外,更能達到較高的壓縮效能。Another object of the present invention is to provide a compression device for image data and a compression method thereof, which encodes image input data by using fixed length coding and variable length coding, and examines the quality of two encoded data generated by the two, In addition to ensuring the compression ratio, higher compression performance can be achieved.
本發明係揭露一種影像資料之壓縮裝置,其包含一固定長度編碼單元、一變動長度編碼單元、一選擇單元與一控制單元。固定長度編碼單元接收一影像輸入資料,並對影像輸入資料進行一固定長度編碼而產生一第一編碼資料。變動長度編碼單元接收影像輸入資料,並對影像輸入資料進行一變動長度編碼而產生一第二編碼資料。選擇單元接收第一編碼資料與第二編碼資料,並輸出第一編碼資料或第二編碼資料至一儲存單元。控制單元比較第二編碼資料之長度與一門檻,當第二編碼資料之長度小於門檻時,控制單元控制該選擇單元輸出第二編碼資料至儲存單元;當第二編碼資料之長度大於門檻時,控制單元控制該選擇單元輸出第一編碼資料至儲存單元。The invention discloses a compression device for image data, which comprises a fixed length coding unit, a variable length coding unit, a selection unit and a control unit. The fixed length coding unit receives an image input data, and performs a fixed length coding on the image input data to generate a first encoded data. The variable length coding unit receives the image input data, and performs a variable length coding on the image input data to generate a second encoded data. The selecting unit receives the first encoded data and the second encoded data, and outputs the first encoded data or the second encoded data to a storage unit. The control unit compares the length of the second encoded data with a threshold. When the length of the second encoded data is less than the threshold, the control unit controls the selecting unit to output the second encoded data to the storage unit; when the length of the second encoded data is greater than the threshold, The control unit controls the selection unit to output the first encoded data to the storage unit.
本發明係揭露一種影像資料之處理方法,其接收一影像輸入資料;對影像輸入資料進行一固定長度編碼與一變動長度編碼,而產生一第一編碼資料與一第二編碼資料;以及比較第二編碼資料之長度與一門檻,當第二編碼資料之長度小於門檻時,則將第二編碼資料儲存於一儲存單元;當第二編碼資料之長度大於門檻時,則將第一編碼資料儲存於儲存單元。The present invention discloses a method for processing image data, which receives an image input data, performs a fixed length encoding and a variable length encoding on the image input data, and generates a first encoded data and a second encoded data; The length of the second encoded data and a threshold, when the length of the second encoded data is less than the threshold, the second encoded data is stored in a storage unit; when the length of the second encoded data is greater than the threshold, the first encoded data is stored In the storage unit.
本發明更揭露一種影像資料之壓縮裝置,其包含一固定長度編碼單元、一變動長度編碼單元、一選擇單元、一比較單元與一控制單元。固定長度編碼單元接收一影像輸入資料,並對影像輸入資料進行一固定長度編碼而產生一第一編碼資料。變動長度編碼單元接收影像輸入資料,並對影像輸入資料進行一變動長度編碼而產生一第二編碼資料。選擇單元接收第一編碼資料與第二編碼資料,並輸出第一編碼資料或第二編碼資料至一儲存單元。比較單元比較第一編碼資料之品質與第二編碼資料之品質,而產生一比較訊號。控制單元比較第二編碼資料之長度與一門檻,當第二編碼資料之長度小於門檻時,控制單元依據比較訊號得知第二編碼資料之品質是否高於第一編碼資料之品質,若第二編碼資料之品質高於第一編碼資料之品質,控制單元控制該選擇單元輸出第二編碼資料至儲存單元,若第二編碼資料之品質低於第一編碼資料之品質,控制單元控制該選擇單元輸出第一編碼資料至儲存單元;當第二編碼資料之長度大於門檻時,控制單元控制該選擇單元輸出第一編碼資料至儲存單元。The invention further discloses a compression device for image data, comprising a fixed length coding unit, a variable length coding unit, a selection unit, a comparison unit and a control unit. The fixed length coding unit receives an image input data, and performs a fixed length coding on the image input data to generate a first encoded data. The variable length coding unit receives the image input data, and performs a variable length coding on the image input data to generate a second encoded data. The selecting unit receives the first encoded data and the second encoded data, and outputs the first encoded data or the second encoded data to a storage unit. The comparing unit compares the quality of the first encoded data with the quality of the second encoded data to generate a comparison signal. The control unit compares the length of the second encoded data with a threshold. When the length of the second encoded data is less than the threshold, the control unit determines whether the quality of the second encoded data is higher than the quality of the first encoded data according to the comparison signal, if the second The quality of the encoded data is higher than the quality of the first encoded data, and the control unit controls the selecting unit to output the second encoded data to the storage unit. If the quality of the second encoded data is lower than the quality of the first encoded data, the control unit controls the selecting unit. And outputting the first encoded data to the storage unit; when the length of the second encoded data is greater than the threshold, the control unit controls the selecting unit to output the first encoded data to the storage unit.
1‧‧‧主機
3‧‧‧驅動晶片
5‧‧‧儲存單元
9‧‧‧影像顯示裝置
10‧‧‧壓縮裝置
11‧‧‧固定長度編碼單元
13‧‧‧變動長度編碼單元
15‧‧‧控制單元
17‧‧‧選擇單元
19‧‧‧劃分單元
21‧‧‧比較單元
30‧‧‧解壓縮裝置
31‧‧‧標頭解碼單元
33‧‧‧切換單元
35‧‧‧固定長度解碼單元
37‧‧‧變動長度解碼單元
39‧‧‧選擇單元1‧‧‧Host
3‧‧‧Drive chip
5‧‧‧ storage unit
9‧‧‧Image display device
10‧‧‧Compression device
11‧‧‧Fixed length coding unit
13‧‧‧Variable length coding unit
15‧‧‧Control unit
17‧‧‧Selection unit
19‧‧‧ Division
21‧‧‧Comparative unit
30‧‧‧Decompression device
31‧‧‧Header Decoding Unit
33‧‧‧Switch unit
35‧‧‧Fixed length decoding unit
37‧‧‧Variable length decoding unit
39‧‧‧Selection unit
第一圖:其為本發明之壓縮裝置運用於影像顯示裝置之驅動晶片的方塊圖;
第二圖:其為本發明之壓縮裝置之一實施例的方塊圖;
第三圖:其為本發明之壓縮裝置之另一實施例的方塊圖;
第四圖:其為本發明之壓縮裝置之又一實施例的方塊圖;以及
第五圖:其為本發明之解壓縮裝置之一實施例的方塊圖。
First: a block diagram of a driving chip applied to an image display device of the compression device of the present invention;
Second drawing: a block diagram of an embodiment of a compression device of the present invention;
Third drawing: a block diagram of another embodiment of a compression device of the present invention;
Figure 4 is a block diagram of yet another embodiment of a compression device of the present invention; and a fifth diagram: a block diagram of one embodiment of a decompression device of the present invention.
在說明書及後續的申請專利範圍當中使用了某些詞彙來指稱特定的元件。所屬領域中具有通常知識者應可理解,硬體製造商可能會用不同的名詞來稱呼同一個元件。本說明書及後續的申請專利範圍並不以名稱的差異來作為區分元件的方式,而是以元件在功能上的差異來作為區分的準則。在通篇說明書及後續的請求項當中所提及的「包含」係為一開放式的用語,故應解釋成「包含但不限定於」。以外,「耦接」一詞在此係包含任何直接及間接的電氣連接手段。因此,若文中描述一第一裝置耦接於一第二裝置,則代表該第一裝置可直接電氣連接於該第二裝置,或透過其他裝置或連接手段間接地電氣連接至該第二裝置。Certain terms are used throughout the description and following claims to refer to particular elements. Those of ordinary skill in the art should understand that a hardware manufacturer may refer to the same component by a different noun. The scope of this specification and the subsequent patent application do not use the difference of the names as the means for distinguishing the elements, but the difference in function of the elements as the criterion for distinguishing. The term "including" as used throughout the specification and subsequent claims is an open term and should be interpreted as "including but not limited to". In addition, the term "coupled" is used herein to include any direct and indirect electrical connection. Therefore, if a first device is coupled to a second device, it means that the first device can be directly electrically connected to the second device or indirectly electrically connected to the second device through other devices or connection means.
為使 貴審查委員對本發明之特徵及所達成之功效有更進一步之瞭解與認識,謹佐以較佳之實施例及配合詳細之說明,說明如後:In order to provide a better understanding and understanding of the features and the efficacies of the present invention, the preferred embodiment and the detailed description are as follows:
參照第一圖,其為本發明之壓縮裝置運用於影像顯示裝置之驅動晶片的方塊圖。如圖所示,本發明之壓縮裝置10設置於驅動晶片3內,驅動晶片3尚設置有一儲存單元5與一解壓縮裝置30,驅動晶片3耦接於主機1與影像顯示裝置9之間,驅動晶片3為顯示驅動晶片。主機1會傳送複數畫素資料至驅動晶片3,驅動晶片3之壓縮裝置10會接收畫素資料作為複數影像輸入資料,並對影像輸入資料進行壓縮處理,且將經壓縮處理後之影像輸入資料儲存於儲存單元5內。解壓縮裝置30會讀取儲存單元5所儲存之經壓縮處理的影像輸入資料,並進行解壓縮處理,並傳送經解壓縮處理的影像輸入資料至影像顯示裝置9,以顯示影像。上述之主機1可為電腦、數位相機、或者其他可傳輸畫素資料至驅動晶片3之裝置。此外,主機1可為基頻晶片(baseband IC),例如行動電話的基頻晶片,而驅動晶片3為行動電話的顯示驅動晶片。於本發明之一實施例中,儲存單元5為隨機存取記憶體RAM,用於作為畫幀緩衝器(frame buffer)。Referring to the first figure, it is a block diagram of a driving device of the present invention applied to a driving chip of an image display device. As shown in the figure, the compression device 10 of the present invention is disposed in the driving chip 3. The driving chip 3 is further provided with a storage unit 5 and a decompression device 30. The driving chip 3 is coupled between the host 1 and the image display device 9. The drive wafer 3 is a display drive wafer. The host 1 transmits a plurality of pixel data to the driving chip 3. The compression device 10 that drives the chip 3 receives the pixel data as a plurality of image input data, compresses the image input data, and inputs the compressed image into the data. It is stored in the storage unit 5. The decompressing device 30 reads the compressed image input data stored in the storage unit 5, performs decompression processing, and transmits the decompressed image input data to the image display device 9 to display the image. The host 1 described above may be a computer, a digital camera, or other device that can transmit pixel data to the drive chip 3. Further, the host 1 may be a baseband IC, such as a baseband chip of a mobile phone, and the drive die 3 is a display driver chip of a mobile phone. In an embodiment of the invention, the storage unit 5 is a random access memory RAM for use as a frame buffer.
運用本發明之壓縮裝置10可保證壓縮處理的壓縮率能達到預定壓縮率,而確保影像輸入資料經壓縮處理後可儲存於儲存單元5。以下將對壓縮裝置10進行詳細說明。The compression device 10 of the present invention can ensure that the compression ratio of the compression process can reach a predetermined compression rate, and the image input data can be stored in the storage unit 5 after being compressed. The compression device 10 will be described in detail below.
請參照第二圖,其為本發明之壓縮裝置之一實施例的方塊圖。如圖所示,壓縮裝置10包含一固定長度編碼單元11、一變動長度編碼單元13、一控制單元15與一選擇單元17。固定長度編碼單元11與變動長度編碼單元13皆耦接主機1(如第一圖所示),而接收影像輸入資料。固定長度編碼單元11對影像輸入資料進行固定長度編碼,以產生一第一編碼資料,第一編碼資料之長度(位元數)為固定值。變動長度編碼單元13對影像輸入資料進行變動長度編碼,以產生一第二編碼資料,第二編碼資料之長度(位元數)為變動值。第一編碼資料與第二編碼資料各包含一標頭(header)位元,其表示第一編碼資料與第二編碼資料是運用何種編碼方式所產生。Please refer to the second figure, which is a block diagram of an embodiment of a compression device of the present invention. As shown, the compression device 10 includes a fixed length coding unit 11, a variable length coding unit 13, a control unit 15, and a selection unit 17. Both the fixed length coding unit 11 and the variable length coding unit 13 are coupled to the host 1 (as shown in the first figure) to receive image input data. The fixed length encoding unit 11 performs fixed length encoding on the image input data to generate a first encoded data, and the length (number of bits) of the first encoded data is a fixed value. The variable length encoding unit 13 performs variable length encoding on the image input data to generate a second encoded data, and the length (number of bits) of the second encoded data is a variable value. The first encoded data and the second encoded data each include a header bit, which indicates which encoding mode is used by the first encoded data and the second encoded data.
固定長度編碼單元11之種類甚多,例如脈衝編碼調變(Pulse-Code Modulation,PCM)、區塊截短編碼(Block Truncation Coding,BTC)與向量量化區塊截短編碼(Vector Quantization Block Truncation Coding,VQ-BTC)等。變動長度編碼單元13之種類甚多,例如差分脈衝編碼調變(Differential Pulse-Code Modulation,DPCM)。上述之舉例僅為本發明之實施方式,並非限制本發明僅能利用上述舉例作為固定長度編碼單元11或變動長度編碼單元13。There are many types of fixed length coding units 11, such as Pulse-Code Modulation (PCM), Block Truncation Coding (BTC), and Vector Quantization Block Truncation Coding. , VQ-BTC) and so on. There are many types of variable length coding units 13, such as Differential Pulse-Code Modulation (DPCM). The above-described examples are merely embodiments of the present invention, and are not intended to limit the present invention to only the above-described examples as the fixed length coding unit 11 or the variable length coding unit 13.
復參閱第二圖,選擇單元17耦接固定長度編碼單元11與變動長度編碼單元13,而接收第一編碼資料與第二編碼資料,並輸出第一編碼資料或者第二編碼資料至儲存單元5,以儲存於儲存單元5。控制單元15亦耦接固定長度編碼單元11與變動長度編碼單元13,固定長度編碼單元11與變動長度編碼單元13對影像輸入資料編碼後會傳送一第一編碼資料長度與一第二編碼資料長度至控制單元15。第一編碼資料長度與第二編碼資料長度分別表示第一編碼資料之長度(位元數)與第二編碼資料之長度(位元數)。Referring to the second figure, the selecting unit 17 is coupled to the fixed length encoding unit 11 and the variable length encoding unit 13, and receives the first encoded data and the second encoded data, and outputs the first encoded data or the second encoded data to the storage unit 5. To be stored in the storage unit 5. The control unit 15 is also coupled to the fixed length encoding unit 11 and the variable length encoding unit 13. The fixed length encoding unit 11 and the variable length encoding unit 13 encode a video encoded data to transmit a first encoded data length and a second encoded data length. To the control unit 15. The length of the first encoded data and the length of the second encoded data represent the length (number of bits) of the first encoded data and the length (number of bits) of the second encoded data, respectively.
控制單元15比較第二編碼資料長度與一門檻,當第二編碼資料長度小於門檻時,控制單元15控制選擇單元17輸出第二編碼資料至儲存單元5。若第二編碼資料長度大於門檻時,其表示第二編碼資料的位元數過大而不適合儲存於儲存單元5,所以控制單元15則控制選擇單元17輸出第一編碼資料至儲存單元5。於本發明之一實施例中,選擇單元為一多工器。控制單元15會先比較第二編碼資料的長度與門檻,以得知變動長度編碼單元13所產生之第二編碼資料的位元數是否過大,而不適合儲存於儲存單元5內。若第二編碼資料的位元數過大,則儲存固定長度編碼單元11所產生之第一編碼資料於儲存單元5。第一編碼資料之長度小於或等於門檻,如此即可保證壓縮裝置10之壓縮率符合預定的壓縮率,而確保影像輸入資料經壓縮裝置10壓縮處理後能儲放於儲存單元5。The control unit 15 compares the length of the second encoded data with a threshold. When the length of the second encoded data is less than the threshold, the control unit 15 controls the selecting unit 17 to output the second encoded data to the storage unit 5. If the length of the second encoded data is greater than the threshold, it indicates that the number of bits of the second encoded data is too large to be stored in the storage unit 5, so the control unit 15 controls the selecting unit 17 to output the first encoded data to the storage unit 5. In an embodiment of the invention, the selection unit is a multiplexer. The control unit 15 compares the length and threshold of the second encoded data to know whether the number of bits of the second encoded data generated by the variable length encoding unit 13 is too large, and is not suitable for storage in the storage unit 5. If the number of bits of the second encoded data is too large, the first encoded data generated by the fixed length encoding unit 11 is stored in the storage unit 5. The length of the first encoded data is less than or equal to the threshold, so that the compression ratio of the compression device 10 can be ensured to meet the predetermined compression ratio, and the image input data can be stored in the storage unit 5 after being compressed by the compression device 10.
一般而言,變動長度編碼之壓縮效能雖不是必定優於固定長度編碼之壓縮效能,但是通常優於固定長度編碼之壓縮效能,所以當變動長度編碼單元13所產生之第二編碼資料可儲放於儲存單元5時,應能提高壓縮效能。由上述可知,本發明之壓縮裝置10運用固定長度編碼與變動長度編碼對影像輸入資料進行編碼,除了確保影像輸入資料經壓縮處理後可儲存於儲存單元5之外,亦應可提高壓縮效能。In general, the compression performance of the variable length coding is not necessarily better than the compression performance of the fixed length coding, but is generally better than the compression performance of the fixed length coding, so that the second encoded data generated by the variable length coding unit 13 can be stored. When the unit 5 is stored, the compression performance should be improved. It can be seen from the above that the compression device 10 of the present invention encodes the image input data by using the fixed length coding and the variable length coding. In addition to ensuring that the image input data can be stored in the storage unit 5 after being compressed, the compression performance should be improved.
一般而言,主機1(如第一圖所示)傳送畫素資料之方式通常是依序傳送要顯示於影像顯示裝置9(如第一圖所示)之水平行畫素資料。主機1所傳送的每筆畫素資料(每一條水平行畫素資料)即表示顯示於影像顯示裝置9之每一條水平行影像。舉例來說,若影像顯示裝置9之顯示解析度為1280*720,主機1所傳送之每一條水平行畫素資料即包含有720個畫素點的資料,又每個畫素點為彩色畫素點而包含有紅、綠與藍色子畫素,每一個子畫素用8位元(bit)表示,如此每一條水平行畫素資料總共有17280(720*24)位元。儲存單元5用於儲存經壓縮處理後之水平行畫素資料。本發明為了提高壓縮裝置10之處理效率,本發明之壓縮裝置10先劃分主機1所傳送之水平行畫素資料而產生複數區塊畫素資料,再提供至固定長度編碼單元11與變動長度編碼單元13。In general, the way in which the host 1 (as shown in the first figure) transmits pixel data is generally to sequentially transmit horizontal line pixel data to be displayed on the image display device 9 (as shown in the first figure). Each pixel data (each horizontal line pixel data) transmitted by the host computer 1 represents each horizontal line image displayed on the image display device 9. For example, if the display resolution of the image display device 9 is 1280*720, each horizontal line pixel data transmitted by the host 1 includes data of 720 pixel points, and each pixel point is a color picture. The prime point contains red, green and blue sub-pixels, each sub-pixel is represented by 8 bits, so that each horizontal line of pixel data has a total of 17280 (720 * 24) bits. The storage unit 5 is configured to store the compressed horizontal line pixel data. In order to improve the processing efficiency of the compression device 10, the compression device 10 of the present invention first divides the horizontal line pixel data transmitted by the host 1 to generate a plurality of block pixel data, and supplies the data to the fixed length coding unit 11 and the variable length coding. Unit 13.
請參照第三圖,其為本發明之壓縮裝置之另一實施例的方塊圖。如圖所示,此實施例之壓縮裝置10更包含有一劃分單元19,其耦接主機1(如第一圖所示),以接收所傳送的水平行畫素資料,而劃分水平行畫素資料以產生複數區塊畫素資料而作為複數筆影像輸入資料。劃分單元19更耦接固定長度編碼單元11與變動長度編碼單元13,以依序傳送該些區塊畫素資料至固定長度編碼單元11與變動長度編碼單元13。於此實施例中,劃分單元19劃分每一條水平行畫素資料為90筆區塊畫素資料,例如將包含有720個畫素的水平行畫素資料劃分為90筆區塊畫素資料,因而每筆區塊畫素資料包含有8個畫素的資料。Please refer to the third figure, which is a block diagram of another embodiment of the compression device of the present invention. As shown in the figure, the compression device 10 of this embodiment further includes a dividing unit 19 coupled to the host 1 (as shown in the first figure) to receive the transmitted horizontal line pixel data and divide the horizontal line pixels. The data is used as a plurality of image input data to generate a plurality of block pixel data. The dividing unit 19 is further coupled to the fixed length encoding unit 11 and the variable length encoding unit 13 to sequentially transmit the block pixel data to the fixed length encoding unit 11 and the variable length encoding unit 13. In this embodiment, the dividing unit 19 divides each horizontal line pixel data into 90 block pixel data, for example, divides horizontal line pixel data including 720 pixels into 90 block pixel data. Therefore, each block of pixel data contains 8 pixels of data.
於此實施例中,固定長度編碼單元11與變動長度編碼單元13即接收區塊畫素資料(影像輸入資料)而進行編碼處理,以產生第一編碼資料與第二編碼資料,且傳送第一編碼資料長度與第二編碼資料長度至控制單元15,控制單元15即會比較第二編碼資料長度與門檻,以判斷第二編碼資料是否過長,而決定儲存第二編碼資料或者第一編碼資料於儲存單元5。In this embodiment, the fixed length encoding unit 11 and the variable length encoding unit 13 receive the block pixel data (image input data) and perform encoding processing to generate the first encoded data and the second encoded data, and transmit the first The length of the encoded data and the length of the second encoded data are sent to the control unit 15, and the control unit 15 compares the length and threshold of the second encoded data to determine whether the second encoded data is too long, and determines to store the second encoded data or the first encoded data. In the storage unit 5.
於一實施例中,門檻可為固定門檻。固定門檻為每筆影像輸入資料的畫素點的總數、每個畫素點的位元總數與預定壓縮率的乘積。於此實施例中,每筆影像輸入資料(區塊畫素資料)包含8個畫素點,每個畫素點用24位元表示,預定壓縮率為0.5,所以固定門檻為96(8*24*0.5),此即表示第二編碼資料的位元數必須等於或小於96才能儲放於儲存單元5。此外,由於固定長度編碼單元11可被設定,使其產生之第一編碼資料的位元數小於或等於門檻,而保證第一編碼資料可儲存於儲存單元5。如此,即可保證壓縮裝置10之壓縮率符合預定壓縮率,以確保影像輸入資料經壓縮處理後可儲存於儲存單元5,更可提高壓縮效能。In an embodiment, the threshold may be a fixed threshold. The fixed threshold is the total number of pixel points for each image input data, the total number of bits per pixel point, and the predetermined compression ratio. In this embodiment, each image input data (block pixel data) includes 8 pixel points, each pixel point is represented by 24 bits, and the predetermined compression ratio is 0.5, so the fixed threshold is 96 (8*). 24*0.5), which means that the number of bits of the second encoded material must be equal to or less than 96 to be stored in the storage unit 5. In addition, since the fixed length encoding unit 11 can be set such that the number of bits of the first encoded material generated is less than or equal to the threshold, the first encoded data can be stored in the storage unit 5. In this way, the compression ratio of the compression device 10 can be ensured to meet the predetermined compression ratio, so as to ensure that the image input data can be stored in the storage unit 5 after being compressed, and the compression performance can be improved.
於本發明之另一實施例中,門檻可為變動門檻。控制單元15依據一配額位元與一多餘位元決定變動門檻,變動門檻為配額位元與多餘位元的總合。配額位元為對應每一筆影像輸入資料所配額之儲存位元的數量,即分配給對應於每一筆影像輸入資料之每一筆編碼資料可儲存的空間大小。於一實施例中,配額位元相同於上述之固定門檻,其為一筆影像輸入資料的畫素點的總數、每個畫素點的位元總數與預定壓縮率的乘積,配額位元為一固定值。舉例來說,若配額位元為96個位元,即表示每一筆影像輸入資料經壓縮處理後所產生之編碼資料分配有96個位元的儲存空間。多餘位元為儲存單元5之多餘儲存位元的數量,即儲存單元5目前多餘的儲存空間。In another embodiment of the invention, the threshold may be a varying threshold. The control unit 15 determines the change threshold according to a quota bit and a redundant bit, and the change threshold is the sum of the quota bit and the extra bit. The quota bit is the number of storage bits corresponding to each image input data quota, that is, the space size that can be stored for each coded data corresponding to each image input data. In an embodiment, the quota bit is the same as the fixed threshold described above, which is the total number of pixel points of a piece of image input data, the total number of bits per pixel point and a predetermined compression ratio, and the quota bit is one. Fixed value. For example, if the quota bit is 96 bits, it means that the encoded data generated by the compression processing of each image input data is allocated 96 bits of storage space. The extra bit is the number of redundant storage bits of the storage unit 5, that is, the storage space currently stored by the storage unit 5.
依據上述說明可知,配額位元表示分配給對應於每一筆影像輸入資料之每一筆編碼資料儲存於儲存單元5的空間大小。儲存單元5有一預定儲存空間,其用於儲存一條水平行影像的資料,即用於儲存一條水平行畫素資料經壓縮處理後之編碼資料,所以一條水平行畫素資料之所有區塊畫素資料的配額位元的總和必須小於或等於儲存單元5的預定儲存空間。於本發明之實施例中,每筆影像輸入資料(區塊畫素資料)的配額位元為相同值,但也可以是不相同,只要符合一條水平行畫素資料之所有區塊畫素資料的配額位元的總和小於或等於儲存單元5的預定儲存空間之條件即可。According to the above description, the quota bit indicates the size of the space allocated to the storage unit 5 for each piece of coded data corresponding to each image input data. The storage unit 5 has a predetermined storage space for storing data of a horizontal line image, that is, a coded data for storing a horizontal line of pixel data after compression processing, so that all block pixels of a horizontal line of pixel data The sum of the quota bits of the data must be less than or equal to the predetermined storage space of the storage unit 5. In the embodiment of the present invention, the quota bits of each image input data (block pixel data) are the same value, but may also be different, as long as all the block pixel data of one horizontal line pixel data are met. The sum of the quota bits may be less than or equal to the condition of the predetermined storage space of the storage unit 5.
上述說明,每筆影像輸入資料(區塊畫素資料)的配額位元可為不相同值,其預先設定於控制單元15,而固定長度編碼之編碼參數會對應配額位元而預先設定於固定長度編碼單元11,所以固定長度編碼單元11依序接收到該些筆影像輸入資料時,其會依據預先設定之編碼參數進行固定長度編碼,以配合預先設定之配額位元,例如第一筆與第三筆影像輸入資料的配額位元為96,而第二筆影像輸入資料的配額位元為48,如此對應於第一筆與第三筆影像輸入資料之壓縮率為0.5,第一筆與第三筆之第一編碼資料之長度為96位元(8*24*0.5),而對應於第二筆影像輸入資料之壓縮率為0.25,第二筆之第一編碼資料之長度即為48位元(8*24*0.25)。In the above description, the quota bits of each image input data (block pixel data) may be different values, which are preset in the control unit 15, and the coding parameters of the fixed length code are preset to be fixed corresponding to the quota bits. The length encoding unit 11 so that the fixed length encoding unit 11 sequentially receives the pen image input data, and performs fixed length encoding according to the preset encoding parameters to match the preset quota bit, for example, the first pen and The quota bit of the third image input data is 96, and the quota bit of the second image input data is 48, so the compression ratio corresponding to the first and third image input data is 0.5, the first pen and The length of the first encoded data of the third stroke is 96 bits (8*24*0.5), and the compression ratio corresponding to the second image input data is 0.25, and the length of the first encoded data of the second stroke is 48. Bit (8*24*0.25).
雖然上述實施例之配額位元並非為固定,但每一筆影像輸入資料之配額位元已預先決定,而固定長度編碼單元11之編碼參數也預先被設定,其表示固定長度編碼單元11所產生之每一筆第一編碼資料的長度已經預先被決定,因此不論影像輸入資料之內容如何,固定長度編碼單元11對影像輸入資料進行編碼後所產生之第一編碼資料的長度會是預先設定的編碼長度,而為固定編碼長度,例如第一筆與第三筆之第一編碼資料之長度固定為96位元,而第二筆之第一編碼資料之長度固定為48位元。Although the quota bit of the above embodiment is not fixed, the quota bit of each image input data is predetermined, and the coding parameter of the fixed length coding unit 11 is also set in advance, which indicates that the fixed length coding unit 11 generates The length of each first encoded data has been determined in advance, so regardless of the content of the image input data, the length of the first encoded data generated by the fixed length encoding unit 11 after encoding the image input data is a preset encoding length. For a fixed code length, for example, the length of the first coded data of the first pen and the third pen is fixed to 96 bits, and the length of the first coded data of the second pen is fixed to 48 bits.
以下舉例詳細說明此實施例之壓縮裝置10之運作與壓縮方式,一開始壓縮裝置10尚未接收影像輸入資料,而儲存單元5尚未儲存資料,設定多餘位元為0,而配額位元為96個位元,所以初始之變動門檻(多餘位元與配額位元之總合)為96。固定長度編碼單元11與變動長度編碼單元13對第一筆影像輸入資料編碼,而產生第一編碼資料與第二編碼資料。第一編碼資料之長度小於或等於配額位元。於此實施例中,第一編碼資料之長度為96個位元,而第二編碼資料之長度為40個位元。The following is a detailed description of the operation and compression mode of the compression device 10 of this embodiment. At first, the compression device 10 has not received the image input data, and the storage unit 5 has not stored the data, and the redundant bit is set to 0, and the quota bit is 96. Bit, so the initial change threshold (the sum of the extra bits and the quota bits) is 96. The fixed length encoding unit 11 and the variable length encoding unit 13 encode the first image input data to generate the first encoded data and the second encoded data. The length of the first encoded data is less than or equal to the quota bit. In this embodiment, the length of the first encoded data is 96 bits, and the length of the second encoded data is 40 bits.
控制單元15比較第二編碼資料長度與變動門檻,第二編碼資料長度小於變動門檻,所以控制單元15控制選擇單元17輸出第二編碼資料至儲存單元5,而儲存第二編碼資料。由於對應於第一筆影像輸入資料之第二編碼資料之長度為40個位元,而配額位元與變動門檻為96個位元,所以儲存單元5即多出56個位元(變動門檻與儲存單元5所儲存之第二編碼資料之長度的差值),如此多餘位元會被更新為56個位元,變動門檻亦會隨之改變而為152(配額位元與多餘位元的總合),此新變動門檻(152)係對應於下一筆影像輸入資料(下一筆區塊畫素資料),其表示儲放至儲存單元5之下一筆編碼資料的最大長度可為152個位元。The control unit 15 compares the second encoded data length with the variation threshold, and the second encoded data length is smaller than the variation threshold, so the control unit 15 controls the selection unit 17 to output the second encoded data to the storage unit 5, and stores the second encoded data. Since the length of the second encoded data corresponding to the first image input data is 40 bits, and the quota bit and the variation threshold are 96 bits, the storage unit 5 has 56 more bits (change threshold and The difference between the lengths of the second encoded data stored in the storage unit 5, so that the redundant bits are updated to 56 bits, and the change threshold is also changed to 152 (the total of the quota bits and the redundant bits) In addition, the new change threshold (152) corresponds to the next image input data (next block pixel data), which indicates that the maximum length of a piece of coded data stored in the storage unit 5 can be 152 bits. .
若前述對應於第一筆影像輸入資料之第二編碼資料之長度為130個位元,而大於初始變動門檻(96)時,控制單元15則會控制選擇單元17輸出第一編碼資料至儲存單元5。由於第一編碼資料之長度為96個位元而等於配額位元(96),所以儲存單元5即沒有多出位元,如此多餘位元即同樣維持為0,而變動門檻不會隨之改變,而同樣為96(配額位元與多餘位元的總合)。由上述可知,運用變動門檻可有效運用儲存單元5的儲存空間,且可儲放多筆資料長度較長的第二編碼資料,所以可以提高壓縮效能。此外,上述之初始多餘位元並非一定為0,例如儲存單元5之預定儲存空間較大,而一條水平行畫素資料之所有區塊畫素資料之配額位元的總和小於預定儲存空間的狀況下,初始多餘位元就不會為0,初始多餘位元表示為如下:
初始多餘位元 = 預定儲存空間 - 所有區塊畫素資料之配額位元的總和If the length of the second encoded data corresponding to the first image input data is 130 bits, and is greater than the initial variation threshold (96), the control unit 15 controls the selection unit 17 to output the first encoded data to the storage unit. 5. Since the length of the first encoded data is 96 bits and is equal to the quota bit (96), the storage unit 5 does not have more bits, so the redundant bits are also maintained at 0, and the change threshold does not change accordingly. And the same is 96 (the sum of quota bits and extra bits). It can be seen from the above that the storage threshold of the storage unit 5 can be effectively utilized by using the variation threshold, and a plurality of second encoded data having a long data length can be stored, so that the compression performance can be improved. In addition, the initial redundant bit is not necessarily 0. For example, the predetermined storage space of the storage unit 5 is large, and the sum of the quota bits of all the block pixel data of one horizontal line of pixel data is smaller than the predetermined storage space. Next, the initial extra bits will not be 0, and the initial extra bits are represented as follows:
Initial extra bit = predetermined storage space - the sum of the quota bits of all block pixel data
由上述說明可知,儲存單元5儲存第一編碼資料或第二編碼資料後,控制單元15會更新多餘位元為當下變動門檻與儲存單元5所儲存之第一編碼資料或第二編碼資料之長度的差值,控制單元15更會依據配額位元與更新後之多餘位元而調整該變動門檻,以應用於下一筆影像輸入資料的壓縮處理。此外,控制單元15更具有計數功能,控制單元15於完成每次比較之後,即會計數一次,以得知壓縮裝置10已處理之影像輸入資料的總數,而判斷是否已處理完一條水平行畫素資料。於此實施例中,一條水平行畫素資料(720個畫素點)劃分為90筆影像輸入資料,所以控制單元15計數到90時,即表示壓縮裝置10已完成壓縮一條水平行畫素資料,而將壓縮水平行畫素資料所產生之編碼資料儲存於儲存單元5。若計數值未為90,即表示壓縮裝置10未完成壓縮一條水平行畫素資料,壓縮裝置10即會依據上述之處理方式接續處理下一筆影像輸入資料,直至完成處理90筆影像輸入資料。It can be seen from the above description that after the storage unit 5 stores the first coded data or the second coded data, the control unit 15 updates the excess bit to the length of the first coded data or the second coded data stored in the current change threshold and the storage unit 5. For the difference, the control unit 15 adjusts the change threshold according to the quota bit and the updated extra bit to apply to the compression process of the next image input data. In addition, the control unit 15 further has a counting function. After completing each comparison, the control unit 15 counts once to know the total number of image input materials processed by the compression device 10, and determines whether a horizontal line has been processed. Pixel information. In this embodiment, one horizontal line pixel data (720 pixel points) is divided into 90 pieces of image input data, so when the control unit 15 counts to 90, it means that the compression device 10 has completed compressing one horizontal line of pixel data. The encoded data generated by compressing the horizontal line pixel data is stored in the storage unit 5. If the count value is not 90, it means that the compression device 10 has not finished compressing one horizontal line of pixel data, and the compression device 10 successively processes the next image input data according to the above processing manner until the processing of 90 pieces of image input data is completed.
請參照第四圖,其為本發明之壓縮裝置之又一實施例的方塊圖。如圖所示,此實施例更包含一比較單元21,比較單元21耦接固定長度編碼單元11、變動長度編碼單元13與控制單元15。此實施例之固定長度編碼單元11與變動長度編碼單元13對影像輸入資料完成編碼後,兩者會執行一影像品質評估(Image Quality Assessment,IQA),而分別對第一編碼資料與第二編碼資料進行品質評估,並分別得到一第一品質評估與一第二品質評估,且輸出第一品質評估與第二品質評估至比較單元21。第一品質評估之數值表示第一編碼資料之品質,第二品質評估之數值表示第二編碼資料之品質。影像品質評估之方式甚多,例如均方誤差 (Mean Square Error,MSE)、絕對差值合 (Sum of Absolute Difference,SAD)與結構相似性指標(Structural Similarity,SSIM)。Please refer to the fourth figure, which is a block diagram of still another embodiment of the compression device of the present invention. As shown in the figure, this embodiment further includes a comparison unit 21, which is coupled to the fixed length coding unit 11, the variable length coding unit 13, and the control unit 15. After the fixed length encoding unit 11 and the variable length encoding unit 13 of the embodiment complete encoding the image input data, the two perform an image quality assessment (IQA), and respectively the first encoded data and the second encoding. The data is subjected to quality evaluation, and a first quality assessment and a second quality assessment are respectively obtained, and the first quality assessment and the second quality assessment are output to the comparison unit 21. The value of the first quality assessment indicates the quality of the first encoded material, and the value of the second quality assessment indicates the quality of the second encoded material. There are many ways to evaluate image quality, such as Mean Square Error (MSE), Sum of Absolute Difference (SAD) and Structural Similarity (SSIM).
比較單元21接收第一品質評估與第二品質評估,並比較第一品質評估與第二品質評估,以比較第二編碼資料之品質與第一編碼資料之品質,且輸出一比較訊號至控制單元15。如此,控制單元15依據比較訊號即可得知變動長度編碼單元13所產生之第二編碼資料的品質是否優於固定長度編碼單元11所產生之第一編碼資料的品質,編碼資料的品質也就是表示編碼單元的壓縮效能。當第二編碼資料長度小於門檻時,控制單元15會更進一步依據比較訊號決定是否將第二編碼資料儲存於儲存單元5。若第二編碼資料之品質高於第一編碼資料之品質,控制單元15則控制選擇單元17輸出第二編碼資料至儲存單元5。若第二編碼資料之品質低於第一編碼資料之品質,控制單元15則控制選擇單元17輸出第一編碼資料至儲存單元5。如此,即可確保儲存品質較佳之編碼資料於儲存單元5,因而壓縮裝置10在確保壓縮率之外,更能達到較高的壓縮效能。The comparing unit 21 receives the first quality assessment and the second quality assessment, and compares the first quality assessment with the second quality assessment to compare the quality of the second encoded data with the quality of the first encoded data, and outputs a comparison signal to the control unit. 15. In this way, the control unit 15 can know whether the quality of the second encoded data generated by the variable length encoding unit 13 is better than the quality of the first encoded data generated by the fixed length encoding unit 11 according to the comparison signal, and the quality of the encoded data is Indicates the compression performance of the coding unit. When the length of the second encoded data is less than the threshold, the control unit 15 further determines whether to store the second encoded data in the storage unit 5 according to the comparison signal. If the quality of the second encoded data is higher than the quality of the first encoded data, the control unit 15 controls the selecting unit 17 to output the second encoded data to the storage unit 5. If the quality of the second encoded data is lower than the quality of the first encoded data, the control unit 15 controls the selecting unit 17 to output the first encoded data to the storage unit 5. In this way, it is ensured that the encoded data of better quality is stored in the storage unit 5, so that the compression device 10 can achieve higher compression performance in addition to ensuring the compression ratio.
此外,比較單元21更接收一致能訊號,致能訊號用於致能比較單元21,以驅使比較單元21正常運作。若致能訊號並未致能比較單元21時,比較單元21即不會比較第一品質評估與第二品質評估。一般而言,變動長度編碼之壓縮效能大都優於固定長度編碼之壓縮效能,所以當比較單元21未被致能時,比較單元21所產生之比較訊號表示選擇變動長度編碼單元13所產生之第二編碼資料,如此當第二編碼資料長度小於變動門檻下,控制單元15則會依據比較訊號控制選擇單元17輸出第二編碼資料至儲存單元5。In addition, the comparing unit 21 further receives the consistent energy signal, and the enabling signal is used to enable the comparing unit 21 to drive the comparing unit 21 to operate normally. If the enabling signal does not enable the comparing unit 21, the comparing unit 21 does not compare the first quality assessment with the second quality assessment. In general, the compression performance of the variable length coding is much better than the compression performance of the fixed length coding. Therefore, when the comparison unit 21 is not enabled, the comparison signal generated by the comparison unit 21 indicates that the selection variable length coding unit 13 generates the first generation. The second coded data is such that when the length of the second coded data is less than the change threshold, the control unit 15 outputs the second coded data to the storage unit 5 according to the comparison signal control selection unit 17.
於本發明之另一實施例中,致能訊號更發送至控制單元15(圖未示),致能訊號致能比較單元21時,控制單元15依據致能訊號而採用比較訊號。若致能訊號未致能比較單元21時,控制單元15則依據致能訊號得知比較單元21未被致能,如此控制單元15則不採用比較訊號,所以當第二編碼資料長度小於門檻下,控制單元15則會控制選擇單元17輸出第二編碼資料至儲存單元5。In another embodiment of the present invention, the enable signal is further sent to the control unit 15 (not shown). When the signal enable comparison unit 21 is enabled, the control unit 15 uses the comparison signal according to the enable signal. If the enabling unit 21 does not enable the comparing unit 21, the control unit 15 knows that the comparing unit 21 is not enabled according to the enabling signal, so that the control unit 15 does not use the comparison signal, so when the second encoded data length is less than the threshold The control unit 15 then controls the selection unit 17 to output the second encoded material to the storage unit 5.
請參照第五圖,其為本發明之解壓縮裝置之一實施例的方塊圖。如圖所示,解壓縮裝置30包含一標頭解碼單元31、一切換單元33、一固定長度解碼單元35、一變動長度解碼單元37與一選擇單元39。標頭解碼單元31與切換單元33耦接儲存單元5,切換單元33讀取儲存於儲存單元5之編碼資料,其為第一編碼資料或者第二編碼資料,而標頭解碼單元31讀取編碼資料之標頭位元,並對編頭位元進行解碼,以得知切換單元33讀取之編碼資料為第一編碼資料或者第二編碼資料,並輸出一解碼訊號至切換單元33,切換單元33依據解碼訊號傳送讀取之編碼資料至固定長度解碼單元35或者變動長度解碼單元37。Please refer to the fifth figure, which is a block diagram of an embodiment of the decompression device of the present invention. As shown, the decompression device 30 includes a header decoding unit 31, a switching unit 33, a fixed length decoding unit 35, a variable length decoding unit 37, and a selection unit 39. The header decoding unit 31 and the switching unit 33 are coupled to the storage unit 5. The switching unit 33 reads the encoded data stored in the storage unit 5, which is the first encoded data or the second encoded data, and the header decoding unit 31 reads the encoded code. The header bit of the data, and decoding the header bit to know that the encoded data read by the switching unit 33 is the first encoded data or the second encoded data, and outputs a decoded signal to the switching unit 33, and the switching unit 33 transmits the read encoded data to the fixed length decoding unit 35 or the variable length decoding unit 37 in accordance with the decoded signal.
承上所述,當解碼訊號表示編碼資料為第一編碼資料時,切換單元33即會依據解碼訊號傳送第一編碼資料至固定長度解碼單元35,固定長度解碼單元35即會對第一編碼資料進行解碼,而輸出一第一解碼資料至選擇單元39。當解碼訊號表示編碼資料為第二編碼資料時,切換單元33即會依據解碼訊號傳送第二編碼資料至變動長度解碼單元37,變動長度解碼單元37即會對第二編碼資料進行解碼,而輸出一第二解碼資料至選擇單元39。選擇單元39耦接標頭解碼單元31,而接收解碼訊號並依據解碼訊號輸出第一解碼資料或第二解碼資料,以提供第一解碼資料或者第二解碼資料至影像顯示裝置9(如第一圖所示),而顯示影像。於本發明之一實施例中,選擇單元39為一多工器。As described above, when the decoded signal indicates that the encoded data is the first encoded data, the switching unit 33 transmits the first encoded data to the fixed length decoding unit 35 according to the decoded signal, and the fixed length decoding unit 35 will be the first encoded data. Decoding is performed, and a first decoded data is output to the selection unit 39. When the decoded signal indicates that the encoded data is the second encoded data, the switching unit 33 transmits the second encoded data to the variable length decoding unit 37 according to the decoded signal, and the variable length decoding unit 37 decodes the second encoded data, and outputs A second decoded data is sent to the selection unit 39. The selecting unit 39 is coupled to the header decoding unit 31, and receives the decoded signal and outputs the first decoded data or the second decoded data according to the decoded signal to provide the first decoded data or the second decoded data to the image display device 9 (eg, the first The figure shows) and the image is displayed. In an embodiment of the invention, the selection unit 39 is a multiplexer.
綜上所述,本發明揭露之影像資料的壓縮裝置與壓縮方法是運用固定長度編碼與變動長度編碼同時對影像輸入資料進行編碼,若變動長度編碼對影像輸入資料進行編碼所產生之編碼資料的長度小於門檻,則儲存此編碼資料至儲存單元,若此編碼資料的長度大於門檻下,則儲存固定長度編碼對影像輸入資料進行編碼所產生之編碼資料。如此即可以保證壓縮率能符合預定壓縮率,而確保影像輸入資料經壓縮處理後可儲存於儲存單元。In summary, the compression device and the compression method of the image data disclosed by the present invention encode the image input data by using fixed length coding and variable length coding, and if the variable length coding encodes the image input data, the encoded data is generated. If the length is less than the threshold, the coded data is stored in the storage unit. If the length of the coded data is greater than the threshold, the coded data generated by encoding the image input data by the fixed length code is stored. In this way, the compression ratio can be ensured to meet the predetermined compression ratio, and the image input data can be stored in the storage unit after being compressed.
此外,於儲存變動長度編碼所產生之編碼資料之前可先判斷變動長度編碼所產生之編碼資料的品質是否高於固定長度編碼所產生之編碼資料的品質。若變動長度編碼所產生之編碼資料的品質低於固定長度編碼所產生之編碼資料的品質,則儲存固定長度編碼所產生之編碼資料。如此,除了確保壓縮率之外,更能達到較高的壓縮效能。In addition, before storing the encoded data generated by the variable length coding, it may be determined whether the quality of the encoded data generated by the variable length coding is higher than the quality of the encoded data generated by the fixed length coding. If the quality of the encoded data generated by the variable length coding is lower than the quality of the encoded data generated by the fixed length coding, the encoded data generated by the fixed length coding is stored. In this way, in addition to ensuring the compression ratio, higher compression performance can be achieved.
故本發明實為一具有新穎性、進步性及可供產業上利用者,應符合我國專利法專利申請要件無疑,爰依法提出發明專利申請,祈 鈞局早日賜准專利,至感為禱。Therefore, the present invention is a novelty, progressive and available for industrial use. It should be in accordance with the requirements of patent applications for patent law in China. It is undoubtedly to file an invention patent application according to law, and the Prayer Council will grant patents as soon as possible.
惟以上所述者,僅為本發明一實施例而已,並非用來限定本發明實施之範圍,故舉凡依本發明申請專利範圍所述之形狀、構造、特徵及精神所為之均等變化與修飾,均應包括於本發明之申請專利範圍內。The above is only an embodiment of the present invention, and is not intended to limit the scope of the present invention, so that the shapes, structures, features, and spirits described in the claims of the present invention are equally changed and modified. All should be included in the scope of the patent application of the present invention.
5‧‧‧儲存單元 5‧‧‧ storage unit
10‧‧‧壓縮裝置 10‧‧‧Compression device
11‧‧‧固定長度編碼單元 11‧‧‧Fixed length coding unit
13‧‧‧變動長度編碼單元 13‧‧‧Variable length coding unit
15‧‧‧控制單元 15‧‧‧Control unit
17‧‧‧選擇單元 17‧‧‧Selection unit
Claims (13)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW103134508A TWI589151B (en) | 2014-10-03 | 2014-10-03 | Image data compression device and its compression method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW103134508A TWI589151B (en) | 2014-10-03 | 2014-10-03 | Image data compression device and its compression method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201615019A TW201615019A (en) | 2016-04-16 |
| TWI589151B true TWI589151B (en) | 2017-06-21 |
Family
ID=56361328
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW103134508A TWI589151B (en) | 2014-10-03 | 2014-10-03 | Image data compression device and its compression method |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI589151B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW308776B (en) * | 1995-12-27 | 1997-06-21 | Thomson Consumer Electronics | Memory management for an image signal processor |
| US6983017B2 (en) * | 2001-08-20 | 2006-01-03 | Broadcom Corporation | Method and apparatus for implementing reduced memory mode for high-definition television |
| TW201246939A (en) * | 2011-02-10 | 2012-11-16 | Panasonic Corp | Picture encoding method, picture encoding device, picture decoding method, picture decoding device and picture encoding decoding device |
-
2014
- 2014-10-03 TW TW103134508A patent/TWI589151B/en not_active IP Right Cessation
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW308776B (en) * | 1995-12-27 | 1997-06-21 | Thomson Consumer Electronics | Memory management for an image signal processor |
| US6983017B2 (en) * | 2001-08-20 | 2006-01-03 | Broadcom Corporation | Method and apparatus for implementing reduced memory mode for high-definition television |
| TW201246939A (en) * | 2011-02-10 | 2012-11-16 | Panasonic Corp | Picture encoding method, picture encoding device, picture decoding method, picture decoding device and picture encoding decoding device |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201615019A (en) | 2016-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6297601B2 (en) | Mixed mode for frame buffer compression | |
| CN105323583B (en) | Encoding method, decoding method, encoding/decoding system, encoder and decoder | |
| EP3635953B1 (en) | Electronic device for high-speed compression processing of feature map of cnn utilizing system and controlling method thereof | |
| JP2014523703A (en) | Selective lossless-lossy compression of image data based on bit allocation | |
| TW201223290A (en) | Image data compression and decompression methods and display driving device using the same | |
| CN110999287A (en) | Digital Content Streaming Compression | |
| JP2014027658A (en) | Compression encoding and decoding method and apparatus | |
| CN107396082B (en) | Image data processing method and device | |
| TW202220441A (en) | Image compression method and apparatus | |
| JP2014078860A (en) | Compressor, driving device, display device, and compression method | |
| KR20170008772A (en) | System and method to optimize video performance in wireless-dock with ultra-high definition display | |
| US10304213B2 (en) | Near lossless compression scheme and system for processing high dynamic range (HDR) images | |
| US10075183B2 (en) | Compression and encryption of a file | |
| CN105791819B (en) | The decompression method and device of a kind of frame compression method of image, image | |
| CN110087072A (en) | Image processing apparatus | |
| US12095981B2 (en) | Visual lossless image/video fixed-rate compression | |
| CN106162192A (en) | Process the method and apparatus of video data | |
| CN116708800A (en) | Image coding and decoding method, device and system | |
| TWI589151B (en) | Image data compression device and its compression method | |
| US20240422358A1 (en) | Systems and methods for streaming extensions for video encoding | |
| US20240314361A1 (en) | Systems and methods for data partitioning in video encoding | |
| US20210126736A1 (en) | Encoding data arrays | |
| CN116489132A (en) | Virtual desktop data transmission method, server, client and storage medium | |
| US20250373814A1 (en) | Systems and methods of rate control for multiple pass video encoding | |
| US10002586B1 (en) | Compression of display data stored locally on a GPU |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |