TW202007151A - Circuit and method of image compression - Google Patents
Circuit and method of image compression Download PDFInfo
- Publication number
- TW202007151A TW202007151A TW107122917A TW107122917A TW202007151A TW 202007151 A TW202007151 A TW 202007151A TW 107122917 A TW107122917 A TW 107122917A TW 107122917 A TW107122917 A TW 107122917A TW 202007151 A TW202007151 A TW 202007151A
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- bit depth
- block
- compression
- single bit
- Prior art date
Links
- 230000006835 compression Effects 0.000 title claims abstract description 108
- 238000007906 compression Methods 0.000 title claims abstract description 108
- 238000000034 method Methods 0.000 title claims description 24
- 241000270295 Serpentes Species 0.000 claims description 6
- WYTGDNHDOZPMIW-RCBQFDQVSA-N alstonine Natural products C1=CC2=C3C=CC=CC3=NC2=C2N1C[C@H]1[C@H](C)OC=C(C(=O)OC)[C@H]1C2 WYTGDNHDOZPMIW-RCBQFDQVSA-N 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- LAXBNTIAOJWAOP-UHFFFAOYSA-N 2-chlorobiphenyl Chemical compound ClC1=CC=CC=C1C1=CC=CC=C1 LAXBNTIAOJWAOP-UHFFFAOYSA-N 0.000 description 4
- 230000011218 segmentation Effects 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 238000005520 cutting process Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本發明係指一種影像壓縮電路及方法,尤指一種可有效壓縮低效位元影像的影像壓縮電路及方法。The invention refers to an image compression circuit and method, in particular to an image compression circuit and method that can effectively compress low-efficiency bit images.
高動態範圍(High Dynamic Range)影像可捕捉大範圍亮度,具有較佳的視覺效果,而已應用於如數位電視等系統中。相較於傳統影像,高動態範圍影像具有較多的像素位元數,也就是影像中單一像素值以較多的像素位元來表示。High Dynamic Range (High Dynamic Range) images can capture a wide range of brightness and have better visual effects, and have been used in systems such as digital TV. Compared with the traditional image, the high dynamic range image has more pixel bits, that is, the single pixel value in the image is represented by more pixel bits.
另一方面,數位電視系統在播放影像畫面之前,會先將欲播放的影像畫面儲存於畫面緩衝器(Frame Buffer)中,而畫面緩衝器的儲存空間是有限的,例如,畫面緩衝器可能一次只能儲存10張畫面。另外,高動態範圍影像中低效位元於空間中的關聯性較低,不一定可達到良好的壓縮效能,因此習知技術並未針對低效位元所形成的低效位元影像進行壓縮。On the other hand, the digital TV system will store the image frame to be played in the frame buffer before playing the image frame, and the storage space of the frame buffer is limited, for example, the frame buffer may be Only 10 frames can be saved. In addition, the low-efficiency bits in the high dynamic range image have a low correlation in space, and may not necessarily achieve good compression performance, so the conventional technology does not compress the inefficient bit images formed by the low-efficiency bits. .
如此一來,在因應高動態範圍影像較多像素位元數的情況下,勢必要增加畫面緩衝器的儲存空間,而造成生產成本的增加。In this way, in response to the high number of pixels in high dynamic range images, it is necessary to increase the storage space of the picture buffer, resulting in an increase in production costs.
因此,習知技術實有改善之必要。Therefore, it is necessary to improve the conventional technology.
因此,本發明之主要目的即在於提供一種可有效壓縮低效位元影像的影像壓縮電路及方法,以改善習知技術的缺點。Therefore, the main purpose of the present invention is to provide an image compression circuit and method that can effectively compress inefficient bit images to improve the disadvantages of the conventional technology.
本發明實施例揭露一種影像壓縮電路,應用於一影像播放系統中,用來於播放影像前,對一影像的一低效位元影像進行壓縮,該影像壓縮電路包括一低效位元處理單元,用來接收該影像,並產生該低效位元影像,其中該影像中每一像素包括多個位元,該低效位元影像為由該多個位元中最低效的至少一位元所形成的影像;一分離器,耦接於該低效位元處理單元,用來將該低效位元影像分離成多個單一位元深度區塊,其中該多個單一位元深度區塊的位元深度為1;以及一編碼選擇單元,耦接於該分離器,用來對該多個單一位元深度區塊中一第一單一位元深度區塊進行無失真壓縮編碼,以產生一第一編碼後區塊,並根據對應於該第一編碼後區塊的一壓縮率,決定是否將該第一編碼後區塊儲存於該影像播放系統的一緩衝器。An embodiment of the present invention discloses an image compression circuit, which is used in an image playback system to compress an inefficient bit image of an image before playing the image. The image compression circuit includes an inefficient bit processing unit , Used to receive the image and generate the low-efficiency bit image, wherein each pixel in the image includes multiple bits, and the low-efficiency bit image is at least one bit of the least efficient among the multiple bits A formed image; a separator, coupled to the inefficient bit processing unit, for separating the inefficient bit image into a plurality of single bit depth blocks, wherein the plurality of single bit depth blocks Has a bit depth of 1; and a code selection unit, coupled to the separator, is used to perform distortion-free compression coding on a first single bit depth block among the multiple single bit depth blocks to generate A first encoded block, and according to a compression rate corresponding to the first encoded block, decide whether to store the first encoded block in a buffer of the video playback system.
本發明實施例另揭露一種影像壓縮方法,用來於播放影像前,對一影像的一低效位元影像進行壓縮,該影像壓縮方法包括接收該影像,並產生該低效位元影像,其中該影像中每一像素包括多個位元,該低效位元影像為由該多個位元中最低效的至少一位元所形成的影像;將該低效位元影像分離成多個單一位元深度區塊,其中該多個單一位元深度區塊的位元深度為1;對該多個單一位元深度區塊中一第一單一位元深度區塊進行無失真壓縮編碼,以產生一第一編碼後區塊;根據該第一單一位元深度區塊及該第一編碼後區塊,取得對應於該第一單一位元深度區塊的一壓縮率;以及根據於該壓縮率,決定是否將該第一編碼後區塊儲存於該影像播放系統的一緩衝器。An embodiment of the present invention further discloses an image compression method for compressing an inefficient bit image of an image before playing the image. The image compression method includes receiving the image and generating the inefficient bit image, wherein Each pixel in the image includes multiple bits, and the low-efficiency bit image is an image formed by at least one bit of the least efficient of the multiple bits; the low-efficiency bit image is separated into a plurality of single bits A bit depth block, wherein the bit depth of the plurality of single bit depth blocks is 1; the first single bit depth block among the plurality of single bit depth blocks is subjected to distortion-free compression coding to Generating a first encoded block; based on the first single bit depth block and the first encoded block, obtaining a compression rate corresponding to the first single bit depth block; and based on the compression Rate determines whether the first encoded block is stored in a buffer of the video playback system.
請參考第1圖,第1圖為本發明實施例一影像播放系統1之示意圖。影像播放系統1可設置於數位電視或數位電視機上盒中,其包括一影像壓縮電路10以及一緩衝器BF。一般來說,影像播放系統1於播放影像畫面之前,會先將欲播放的影像畫面儲存於緩衝器BF中。舉例來說,緩衝器BF可暫時儲存10張影像畫面,而影像播放系統1可於1秒內播放30張影像畫面。然而,由於緩衝器BF的儲存空間有限,為了使緩衝器BF的儲存空間有更有效的利用,影像壓縮電路10可於影像播放系統1播放影像畫面之前,先對影像畫面中低效位元影像進行壓縮,影像播放系統1可將壓縮過的低效位元影像儲存於緩衝器BF中。Please refer to FIG. 1, which is a schematic diagram of an
影像壓縮電路10包括一低效位元處理單元12、一分離器(Splitter)14以及一編碼選擇單元16。低效位元處理單元12接收一影像I,並產生影像I的一低效位元影像ILSB
。一般來說,影像畫面包括對應於色彩空間中多個維度的多單色度影像,色彩空間中多個維度可為RGB(Red/Greed/Blue)或是Y/Cb/Cr,Y代表亮度(Luminance),Cb、Cr代表(Chrominance),其中Cb代表藍色色差,Cr代表紅色色差。影像I可為影像畫面中對應於亮度Y(或藍色色差Cb)(或紅色色差Cr)的一個單色度影像。另外,影像I中每一個像素可用K個位元來表示,而低效位元影像ILSB
為由K個位元中最/較低效的N個位元所形成的影像。換句話說,低效位元處理單元12可屏棄(Discard)每個像素的K個位元中最/較高效(Most/More Significant)的(K-N)個位元,而存留(影像I中)每個像素的K個位元中最/較低效(Least/Less Significant)的N個位元,此時於每個像素的N個位元即形成低效位元影像ILSB
。其中,(K-N)可為8,K可為10或12,N可為2或4。另外,低效位元影像ILSB
的位元深度(Bit Depth)為N。The
分離器14耦接於低效位元處理單元12,用來將低效位元影像ILSB
分離成多個單一位元深度區塊UCB,其中每個單一位元深度區塊UCB的位元深度為1,即每個單一位元深度區塊UCB中每個像素僅以單一位元來表示。於一實施例中,分離器14可先將低效位元影像ILSB
分離成分別對應於N個最低效位元的單一位元深度影像(即位元平面(bit plane))UI1
~UIN
,再將單一位元深度影像UIn
(n=1,…,N)於空間上(Spatial,指的是影像寬(Width)及影像高(Height)所構成的空間)分離/分割成(屬於單一位元深度影像UIn
的)多個單一位元深度區塊UCBn
,而單一位元深度影像UI1
~UIN
的多個單一位元深度區塊UCB1
~UCBN
即為分離器14所產生的多個單一位元深度區塊UCB,也就是說,分離器14可將低效位元影像ILSB
先進行位元深度維度上的分離,再進行空間上的分離/分割。於一實施例中,分離器14可先將低效位元影像ILSB
於空間上分離/分割成區塊CB(1)
~CB(H)
,再將區塊CB(h)
(h=1,…,H)分離成對應於區塊CB(h)
的多個單一位元深度區塊UCB(h)
,而對應於區塊CB(1)
~CB(H)
的單一位元深度區塊UCB(1)
~UCB(H)
即為分離器14所產生的多個單一位元深度區塊UCB,換句話說,分離器14可將低效位元影像ILSB
先進行空間上的分離/分割,再進行位元深度維度上的分離。另外,多個單一位元深度區塊UCB可依照時間次序輸出至編碼選擇單元16。The
編碼選擇單元16耦接於分離器14,用來對單一位元深度區塊UCB進行無失真壓縮編碼,以產生一編碼後區塊CCB,並根據對應於編碼後區塊CCB的壓縮效能(如壓縮率),選擇性地將編碼後區塊CCB儲存於於緩衝器BF中。詳細來說,請參考第2圖,第2圖為本發明實施例一編碼選擇單元26之示意圖。編碼選擇單元26可用來實現編碼選擇單元16,編碼選擇單元26可包括一編碼器260、一控制單元262以及一多工器MUX。編碼器260用來對單一位元深度區塊UCB進行無失真壓縮編碼,以產生編碼後區塊CCB,控制單元262根據單一位元深度區塊UCB及編碼後區塊CCB,取得對應於編碼後區塊CCB的一壓縮率R,並判斷壓縮率R是否小於一特定值γ。壓縮率R可為R=IN(CCB)/IN(UCB),其中IN(UCB)代表單一位元深度區塊UCB的資料量/位元數,IN(CCB)代表編碼後區塊CCB的資料量/位元數。當壓縮率R小於特定值γ時,控制單元262控制編碼選擇單元26以輸出編碼後區塊CCB,而影像播放系統1將編碼後區塊CCB儲存於緩衝器BF中。反之,當壓縮率R不小於特定值γ時,控制單元262控制編碼選擇單元26以輸出單一位元深度區塊UCB,而影像播放系統1將單一位元深度區塊UCB儲存於緩衝器BF中。The
更進一步地,控制單元262可控制編碼器260,使得編碼器260可分別依照多個不同的掃描順序SS1
~SSG
,分別對單一位元深度區塊UCB進行遊程編碼(Run-Length Encoding,RLE)(遊程編碼為一種無失真壓縮編碼),而產生對應於多個掃描順序SS1
~SSG
的多個前編碼區塊PCB1
~PCBG
,控制單元262可計算對應於前編碼區塊PCB1
~PCBG
的前壓縮率R1
~RG
,同樣地,前壓縮率Rg
(g=1,…,G)可為Rg
=IN(PCBg
)/IN(UCB),IN(PCBg
)代表前編碼區塊PCBg
的資料量/位元數。Furthermore, the
於一實施例中,控制單元262可控制編碼器260,使得編碼器260輸出前編碼區塊PCB1
~PCBG
中的前編碼區塊PCBg *
(即為編碼器260所輸出的編碼後區塊CCB),其中對應於前編碼區塊PCBg *
的前壓縮率Rg*
為前壓縮率R1
~RG
中的最小值,即Rg*
=min(R1
,…,RG
),其中前壓縮率Rg*
即為最小前壓縮率。如此一來,編碼器260所輸出的編碼後區塊CCB即為前編碼區塊PCBg *
,編碼後區塊CCB的壓縮率R即為前壓縮率Rg*
。In an embodiment, the
於一實施例中,控制單元262可控制編碼器260,使得編碼器260依照對應於最小壓縮率Rg *
的最佳掃描順序SSg*
對後續的單一位元深度區塊UCB進行遊程編碼,也就是說,於時間t0,編碼器260可分別依照掃描順序SS1
~SSG
對於時間t0所收到的單一位元深度區塊UCB0
分別進行遊程編碼,同時控制單元262可取得最小壓縮率Rg *
及最佳掃描順序SSg*
。而於時間t0之後的時間tn,控制單元262可控制編碼器260,使得編碼器260可依照最佳掃描順序SSg*
,對單一位元深度區塊UCB0
之後的多個單一位元深度區塊UCBn
進行遊程編碼。In an embodiment, the
另外,掃描順序SS1 ~SSG 可包括水平逐線掃描(Raster Scan)、垂直逐線掃描(Vertical Scan)、螺旋形掃描(Circular Scan)、逐線蛇形掃描(Raster Snake)、垂直蛇形掃描(Vertical Snake)或蜿蜒(Zig-Zag)掃描等不同的掃描順序,如第3圖所示,而不在此限。In addition, the scanning sequence SS 1 to SS G may include horizontal line-by-line scanning (Raster Scan), vertical line-by-line scanning (Vertical Scan), spiral scanning (Circular Scan), line-by-line snake scanning (Raster Snake), vertical snake Scanning (Vertical Snake) or meandering (Zig-Zag) scanning and other different scanning order, as shown in Figure 3, is not limited to this.
當控制單元262判斷壓縮率R小於特定值γ時,控制單元262產生一選擇信號sel,以控制多工器MUX輸出編碼後區塊CCB。反之,當控制單元262判斷壓縮率R不小於特定值γ時,控制單元262產生選擇信號sel,以控制多工器MUX輸出單一位元深度區塊UCB。When the
關於影像壓縮電路10/影像播放系統1的操作,可進一步歸納為一影像壓縮方法。請參考第4圖,第4圖為本發明實施例一影像壓縮方法40之流程圖。影像壓縮方法40可包括以下步驟:The operation of the
步驟400:接收影像I,並產生影像I的低效位元影像ILSB 。Step 400: Receive the image I, and generate the inefficient bit image I LSB of the image I.
步驟402:將低效位元影像ILSB 分離成多個單一位元深度區塊UCB。Step 402: Separate the inefficient bit image I LSB into multiple single-bit depth blocks UCB.
步驟404:對單一位元深度區塊UCB進行無失真壓縮編碼,以產生編碼後區塊CCB。Step 404: Perform distortion-free compression coding on the single-bit depth block UCB to generate a coded block CCB.
步驟406:根據單一位元深度區塊UCB及編碼後區塊CCB,取得對應於編碼後區塊CCB的壓縮率R。Step 406: Obtain the compression rate R corresponding to the encoded block CCB according to the single bit depth block UCB and the encoded block CCB.
步驟408:判斷壓縮率R是否小於特定值γ?若是,執行步驟410;若否,執行步驟412Step 408: Determine whether the compression ratio R is less than a specific value γ? If yes, go to
步驟410:將編碼後區塊CCB儲存於緩衝器BF中。Step 410: Store the encoded block CCB in the buffer BF.
步驟412:將單一位元深度區塊UCB儲存於緩衝器BF中。Step 412: Store the single bit depth block UCB in the buffer BF.
影像壓縮方法40中,步驟400可由低效位元處理單元12來執行,步驟402可由分離器14來執行,步驟404可由編碼選擇單元16或編碼器260來執行,步驟406、408可由編碼選擇單元16或控制單元262來執行。其餘關於影像壓縮方法40的操作細節,請參考前述相關段落,於此不再贅述。In the
一般來說,影像中最/較高效的(K-N)個位元應具有較高的空間關聯性,即相鄰像素的位元值之間具有較高關聯性,可達到較佳的壓縮效能,而影像中最/較低效的N個位元關聯性較低,不一定可達到良好的壓縮效能,因此習知技術並未針對低效位元影像ILSB 進行壓縮。In general, the most/more efficient (KN) bits in the image should have a higher spatial correlation, that is, the bit values of adjacent pixels have a higher correlation, which can achieve better compression performance. However, the most/lower-efficiency N bits in the image have a lower correlation and may not necessarily achieve good compression performance. Therefore, the conventional technology does not compress the low-efficiency bit image I LSB .
相較之下,本發明可針對低效位元影像ILSB 進行壓縮。簡單來說,本發明將低效位元影像ILSB 分離成單一位元深度影像UI/位元平面(bit plane),並將單一位元深度影像切割為單一位元深度區塊UCB後,嘗試不同的掃描順序來對單一位元深度區塊UCB進行遊程編碼。若可達到良好壓縮效能,則將編碼後區塊CCB儲存於緩衝器BF中。另外,本發明可依照最佳掃描順序對後續的單一位元深度區塊進行遊程編碼。In contrast, the present invention can compress the low-efficiency bit image I LSB . To put it simply, the present invention separates the inefficient bit image I LSB into a single bit depth image UI/bit plane, and after cutting the single bit depth image into a single bit depth block UCB, try Different scan sequences are used to run-length encode a single bit depth block UCB. If good compression performance can be achieved, the encoded block CCB is stored in the buffer BF. In addition, the present invention can run-length encode the subsequent single bit depth block according to the optimal scanning order.
本發明可用來處理高動態範圍(High Dynamic Range)的影像。為了使影像具有高動態範圍,現有影像標準將像素位元數由8位元擴增成10位元(HDR-10)或12位元(HDR-12)。其中,影像/像素中最高效的8位元可利用現有技術進行壓縮處理,而最低效的2位元或4位元可利用本發明進行壓縮處理,以進一步達到有效利用緩衝器BF儲存空間的功效。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。The invention can be used to process high dynamic range (High Dynamic Range) images. In order to make the image have a high dynamic range, the current image standard expands the number of pixel bits from 8 bits to 10 bits (HDR-10) or 12 bits (HDR-12). Among them, the most efficient 8-bit image/pixel can be compressed using the existing technology, and the least efficient 2-bit or 4-bit can be compressed using the present invention to further effectively use the buffer BF storage space effect. The above are only the preferred embodiments of the present invention, and all changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.
1‧‧‧影像播放系統
10‧‧‧影像壓縮電路
12‧‧‧低效位元處理單元
14‧‧‧分離器
16、26‧‧‧編碼選擇單元
260‧‧‧編碼器
262‧‧‧控制單元
40‧‧‧方法
400~412‧‧‧步驟
BF‧‧‧緩衝器
CCB‧‧‧編碼後區塊
I、ILSB‧‧‧影像
MUX‧‧‧多工器
UCB‧‧‧單一位元深度區塊
1‧‧‧
第1圖為本發明實施例一影像播放系統之方塊圖。 第2圖為本發明實施例一編碼選擇單元之方塊圖。 第3圖為本發明實施例多個掃描順序之示意圖。 第4圖為本發明實施例一影像壓縮方法之流程圖。FIG. 1 is a block diagram of an image playback system according to an embodiment of the invention. FIG. 2 is a block diagram of a code selection unit according to an embodiment of the invention. FIG. 3 is a schematic diagram of multiple scanning sequences according to an embodiment of the invention. FIG. 4 is a flowchart of an image compression method according to an embodiment of the invention.
1‧‧‧影像播放系統 1‧‧‧Video playback system
10‧‧‧影像壓縮電路 10‧‧‧Image compression circuit
12‧‧‧低效位元處理單元 12‧‧‧Inefficient bit processing unit
14‧‧‧分離器 14‧‧‧separator
16‧‧‧編碼選擇單元 16‧‧‧Code selection unit
I、ILSB‧‧‧影像 I, I LSB ‧‧‧ video
BF‧‧‧緩衝器 BF‧‧‧Buffer
UCB‧‧‧單一位元深度區塊 UCB‧‧‧Single bit depth block
Claims (19)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW107122917A TW202007151A (en) | 2018-07-03 | 2018-07-03 | Circuit and method of image compression |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW107122917A TW202007151A (en) | 2018-07-03 | 2018-07-03 | Circuit and method of image compression |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| TW202007151A true TW202007151A (en) | 2020-02-01 |
Family
ID=70413090
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW107122917A TW202007151A (en) | 2018-07-03 | 2018-07-03 | Circuit and method of image compression |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TW202007151A (en) |
-
2018
- 2018-07-03 TW TW107122917A patent/TW202007151A/en unknown
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10681306B2 (en) | Conversion method and conversion apparatus | |
| US10205946B2 (en) | Image processing apparatus and image processing method | |
| US20210044839A1 (en) | Encoding method and apparatus and decoding method and apparatus | |
| US9872042B2 (en) | Image encoding apparatus and image encoding method | |
| US20190238839A1 (en) | Image processing apparatus and image processing method | |
| US20230171404A1 (en) | Method and device for encoding/decoding image using color space conversion, and method for transmitting bitstream | |
| JP2017184250A (en) | Apparatus and method for decoding using coefficient compression | |
| US11445160B2 (en) | Image processing device and method for operating image processing device | |
| US10887616B2 (en) | Image processing devices having enhanced frame buffer compressors therein | |
| US11991347B2 (en) | Image processing device | |
| US11044466B2 (en) | Image processing device | |
| CN105122809A (en) | Method and apparatus for prediction value derivation of intra-coding | |
| US11503296B2 (en) | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium | |
| US10154262B2 (en) | Image processing apparatus and image processing method using improved predictive encoding techniques | |
| US11190810B2 (en) | Device and method for compressing image data using quantization parameter and entropy tables | |
| CN102550009A (en) | Joint scalar embedded graphics coding for color images | |
| CN106954074B (en) | Video data processing method and device | |
| TW202007151A (en) | Circuit and method of image compression | |
| TWI820063B (en) | Image processing device and method for operating image processing device | |
| CN110769253A (en) | Image compression circuit and method | |
| TWI846680B (en) | Image processing device and method for operating image processing device | |
| JPH0678297A (en) | Method for encoding of digital video signal | |
| TWI827579B (en) | Image processing device | |
| JPH07112243B2 (en) | Block division sequential reproduction coding method |