[go: up one dir, main page]

TW202007151A - Circuit and method of image compression - Google Patents

Circuit and method of image compression Download PDF

Info

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
Application number
TW107122917A
Other languages
Chinese (zh)
Inventor
林佳緯
Original Assignee
晨星半導體股份有限公司
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 晨星半導體股份有限公司 filed Critical 晨星半導體股份有限公司
Priority to TW107122917A priority Critical patent/TW202007151A/en
Publication of TW202007151A publication Critical patent/TW202007151A/en

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An image compression circuit includes a least significant bit (LSB) processing unit configured to generate an LSB image; a splitter configured to split the LSB image into a plurality of single depth blocks; and a coding-and-selecting unit, configured to perform a lossless compressing encoding on a first single depth block to generate a first coded block, obtain a compression ratio according to the first single depth block and the first coded block, and determine whether the compression ratio is less than a specific value; wherein when the compression ratio is less than the specific value, the first coded block is stored into a buffer.

Description

影像壓縮電路及方法Image compression circuit and method

本發明係指一種影像壓縮電路及方法,尤指一種可有效壓縮低效位元影像的影像壓縮電路及方法。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 image playback system 1 according to an embodiment of the present invention. The video playback system 1 can be installed in a digital TV or digital TV set-top box, which includes an image compression circuit 10 and a buffer BF. Generally, the video playback system 1 stores the video frames to be played in the buffer BF before playing the video frames. For example, the buffer BF can temporarily store 10 video frames, and the video playback system 1 can play 30 video frames in 1 second. However, due to the limited storage space of the buffer BF, in order to make more effective use of the storage space of the buffer BF, the image compression circuit 10 can first perform inefficient bit image in the image frame before the image playback system 1 plays the image frame With compression, the image playback system 1 can store the compressed inefficient bit image in the buffer BF.

影像壓縮電路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 image compression circuit 10 includes an inefficient bit processing unit 12, a splitter 14 and an encoding selection unit 16. The inefficient bit processing unit 12 receives an image I, and generates an inefficient bit image I LSB of the image I. Generally speaking, the image frame includes multi-monochromatic images corresponding to multiple dimensions in the color space. The multiple dimensions in the color space may be RGB (Red/Greed/Blue) or Y/Cb/Cr, where Y represents brightness ( Luminance), Cb, Cr stands for (Chrominance), where Cb stands for blue color difference, and Cr stands for red color difference. The image I may be a monochromatic image corresponding to the luminance Y (or blue color difference Cb) (or red color difference Cr) in the image frame. In addition, each pixel in the image I can be represented by K bits, and the low-efficiency bit image I LSB is an image formed by the most/lower-efficiency N bits of the K bits. In other words, the inefficient bit processing unit 12 can discard (Most/More Significant) (KN) the most/more efficient (KN) bits out of the K bits of each pixel, while remaining (in image I) The least/lower-effect (Least/Less Significant) N bits of the K-bits of each pixel, the low-efficiency bit-image I LSB is formed at the N bits of each pixel. Among them, (KN) can be 8, K can be 10 or 12, N can be 2 or 4. In addition, the bit depth (Bit Depth) of the inefficient bit image I LSB is N.

分離器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 separator 14 is coupled to the inefficient bit processing unit 12 and is used to separate the inefficient bit image I LSB into a plurality of single bit depth blocks UCB, wherein the bit depth of each single bit depth block UCB Is 1, that is, each pixel in each single-bit depth block UCB is only represented by a single bit. In an embodiment, the separator 14 may first separate the inefficient bit image I LSB into a single bit depth image (ie, bit plane) UI 1 ˜UI N corresponding to the N least significant bits, respectively. , And then separate/divide the single-bit depth image UI n (n=1,...,N) in space (Spatial, referring to the space formed by the image width (Width) and image height (Height)) into (belonging to single bit depth image UI n) of a plurality of single-bit depth block UCB n, while the single-bit depth image UI 1 ~ UI N plurality of single-bit depth block UCB 1 ~ UCB N is the separator 14 The generated multiple single-bit depth blocks UCB, that is to say, the separator 14 can first separate the inefficient bit image I LSB in the bit depth dimension, and then perform the spatial separation/segmentation. In an embodiment, the separator 14 may first spatially separate/segment the inefficient bit image I LSB into blocks CB (1) to CB (H) , and then divide the block CB (h) (h=1 a plurality of single-bit depth block, ..., H) is separated into corresponding blocks CB (h) of the UCB (h), while the corresponding block CB (1) ~ CB (H ) bit depth single block UCB (1) ~ UCB (H) are the multiple single-bit depth blocks UCB generated by the separator 14, in other words, the separator 14 can first spatially separate the inefficient bit image I LSB / Segmentation, and then the separation in the bit depth dimension. In addition, a plurality of single bit depth blocks UCB can be output to the encoding selection unit 16 in chronological order.

編碼選擇單元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 code selection unit 16 is coupled to the separator 14 and is used to perform distortionless compression coding on the single bit depth block UCB to generate a coded block CCB, and according to the compression performance corresponding to the coded block CCB (eg Compression ratio), selectively store the encoded block CCB in the buffer BF. In detail, please refer to FIG. 2, which is a schematic diagram of a code selection unit 26 according to an embodiment of the present invention. The code selection unit 26 may be used to implement the code selection unit 16, and the code selection unit 26 may include an encoder 260, a control unit 262, and a multiplexer MUX. The encoder 260 is used to perform lossless compression coding on the single-bit depth block UCB to generate a coded block CCB. The control unit 262 obtains the corresponding coded block according to the single-bit depth block UCB and the coded block CCB A compression rate R of the block CCB, and determine whether the compression rate R is less than a specific value γ. The compression ratio R can be R=IN(CCB)/IN(UCB), where IN(UCB) represents the data amount/bit number of a single bit depth block UCB, and IN(CCB) represents the data of the encoded block CCB Quantity/bit number. When the compression rate R is less than a specific value γ, the control unit 262 controls the encoding selection unit 26 to output the encoded block CCB, and the video playback system 1 stores the encoded block CCB in the buffer BF. Conversely, when the compression ratio R is not less than a specific value γ, the control unit 262 controls the encoding selection unit 26 to output a single bit depth block UCB, and the video playback system 1 stores the single bit depth block UCB in the buffer BF .

更進一步地,控制單元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 control unit 262 can control the encoder 260 so that the encoder 260 can perform run-length encoding (Run-Length Encoding, respectively) on a single bit depth block UCB according to a plurality of different scanning sequences SS 1 ˜SS G , respectively. RLE) (Run-length encoding is a distortion-free compression encoding), and a plurality of pre-encoding blocks PCB 1 to PCB G corresponding to multiple scanning sequences SS 1 to SS G are generated, and the control unit 262 may calculate corresponding to the pre-encoding blocks The front compression ratio R 1 ~R G of PCB 1 ~PCB G. Similarly, the front compression ratio R g (g=1,...,G) can be R g =IN(PCB g )/IN(UCB), IN( PCB g ) represents the amount of data/bits of PCB g in the previous coding block.

於一實施例中,控制單元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 control unit 262 can control the encoder 260 so that the encoder 260 outputs the front coding blocks PCB 1 to PCB g * in the front coding blocks PCB 1 ˜PCB G (that is, the coding post-region output by the encoder 260 Block CCB), where the pre-compression rate R g* corresponding to the pre-coding block PCB g * is the minimum value of the pre-compression rate R 1 ~R G , that is, R g* =min(R 1 ,...,R G ) , Where the front compression ratio R g* is the minimum front compression ratio. In this way, the encoded block CCB output by the encoder 260 is the pre-encoding block PCB g * , and the compression rate R of the encoded block CCB is the pre-compression rate R g* .

於一實施例中,控制單元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 control unit 262 can control the encoder 260 so that the encoder 260 performs run-length encoding on the subsequent single-bit depth block UCB according to the optimal scanning order SS g* corresponding to the minimum compression rate R g * , In other words, at time t0, the encoder 260 can separately run-length encode the single bit depth block UCB 0 received at time t0 according to the scanning order SS 1 ˜SS G , and at the same time, the control unit 262 can obtain the minimum compression rate R g * and the optimal scanning order SS g* . At time tn after time t0, the control unit 262 can control the encoder 260 so that the encoder 260 can scan multiple single-bit depth regions after the single-bit depth block UCB 0 according to the optimal scanning order SS g* The block UCB n performs run- length coding.

另外,掃描順序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 control unit 262 determines that the compression ratio R is less than a specific value γ, the control unit 262 generates a selection signal sel to control the multiplexer MUX to output the encoded block CCB. Conversely, when the control unit 262 determines that the compression ratio R is not less than a specific value γ, the control unit 262 generates a selection signal sel to control the multiplexer MUX to output a single bit depth block UCB.

關於影像壓縮電路10/影像播放系統1的操作,可進一步歸納為一影像壓縮方法。請參考第4圖,第4圖為本發明實施例一影像壓縮方法40之流程圖。影像壓縮方法40可包括以下步驟:The operation of the image compression circuit 10/image playback system 1 can be further summarized as an image compression method. Please refer to FIG. 4, which is a flowchart of an image compression method 40 according to an embodiment of the present invention. The image compression method 40 may include the following steps:

步驟400:接收影像I,並產生影像I的低效位元影像ILSBStep 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 step 410; if no, go to step 412

步驟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 image compression method 40, step 400 may be performed by the inefficient bit processing unit 12, step 402 may be performed by the separator 14, step 404 may be performed by the encoding selection unit 16 or the encoder 260, and steps 406 and 408 may be performed by the encoding selection unit 16 or the control unit 262 to execute. For the remaining operation details of the image compression method 40, please refer to the aforementioned relevant paragraphs, which will not be repeated here.

一般來說,影像中最/較高效的(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‧‧‧Image playback system 10‧‧‧Image compression circuit 12‧‧‧Inefficient bit processing unit 14‧‧‧ Separator 16, 26‧‧‧Encoding selection unit 260‧‧‧Encoder 262‧‧‧Control Unit 40‧‧‧Method 400~412‧‧‧Step BF‧‧‧Buffered CCB‧‧‧Coded block I, I LSB ‧‧‧ Video MUX‧‧‧Multiplexer UCB‧‧‧ Single bit depth Block

第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)

一種影像壓縮電路,應用於一影像播放系統中,用來於播放影像前,對一影像的一低效位元影像進行壓縮,該影像壓縮電路包括: 一低效位元處理單元,用來接收該影像,並產生該低效位元影像,其中該影像中每一像素包括多個位元,該低效位元影像為由該多個位元中最低效的至少一位元所形成的影像; 一分離器,耦接於該低效位元處理單元,用來將該低效位元影像分離成多個單一位元深度區塊,其中該多個單一位元深度區塊的位元深度為1;以及 一編碼選擇單元,耦接於該分離器,用來對該多個單一位元深度區塊中一第一單一位元深度區塊進行無失真壓縮編碼,以產生一第一編碼後區塊,並根據對應於該第一編碼後區塊的一壓縮率,決定是否將該第一編碼後區塊儲存於該影像播放系統的一緩衝器。An image compression circuit 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 for receiving The image, and the inefficient bit image is generated, wherein each pixel in the image includes a plurality of bits, and the inefficient bit image is an image formed by at least one bit of the least efficient of the plurality of bits A separator, coupled to the inefficient bit processing unit, used to separate the inefficient bit image into multiple single bit depth blocks, wherein the bit depth of the multiple single bit depth blocks Is 1; and a code selection unit, coupled to the separator, is used to perform distortionless compression coding on a first single bit depth block among the plurality of single bit depth blocks to generate a first code After the block, and according to a compression rate corresponding to the first encoded block, it is determined whether to store the first encoded block in a buffer of the video playback system. 如請求項1所述的影像壓縮電路,其中該編碼選擇單元包括: 一編碼器,該編碼器用來對該第一單一位元深度區塊進行無失真壓縮編碼,以產生該第一編碼後區塊;以及 一控制單元,用來根據該第一單一位元深度區塊及該第一編碼後區塊,取得對應於該第一編碼後區塊的該壓縮率,並根據該壓縮率,決定是否將該第一編碼後區塊儲存於該緩衝器。The image compression circuit according to claim 1, wherein the encoding selection unit comprises: an encoder for performing distortion-free compression encoding on the first single bit depth block to generate the first encoded post-region Block; and a control unit for obtaining the compression rate corresponding to the first encoded block based on the first single bit depth block and the first encoded block, and determining the compression rate according to the compression rate Whether to store the first encoded block in the buffer. 如請求項1所述的影像壓縮電路,其中當該壓縮率小於一特定值時,該控制單元控制該編碼選擇單元輸出該第一編碼後區塊,該影像播放系統將該第一編碼後區塊儲存於該緩衝器。The image compression circuit according to claim 1, wherein when the compression ratio is less than a specific value, the control unit controls the code selection unit to output the first coded block, and the image playback system divides the first coded area The block is stored in the buffer. 如請求項3所述的影像壓縮電路,其中當該壓縮率不小於該特定值時,該控制單元控制該編碼選擇單元輸出該第一單一位元深度區塊,該影像播放系統將該第一單一位元深度區塊儲存於該緩衝器。The image compression circuit according to claim 3, wherein when the compression ratio is not less than the specific value, the control unit controls the code selection unit to output the first single bit depth block, and the image playback system applies the first A single bit depth block is stored in the buffer. 如請求項1所述的影像壓縮電路,其中該分離器將該低效位元影像分離成至少一單一位元深度影像,並將該至少一單一位元深度影像分離成該多個單一位元深度區塊。The image compression circuit according to claim 1, wherein the separator separates the inefficient bit image into at least one single bit depth image, and separates the at least one single bit depth image into the plurality of single bits Deep blocks. 如請求項1所述的影像壓縮電路,其中該分離器將該低效位元影像分離成多個區塊,並將該多個區塊分離成該多個單一位元深度區塊。The image compression circuit of claim 1, wherein the separator separates the inefficient bit image into a plurality of blocks, and separates the plurality of blocks into the plurality of single bit depth blocks. 如請求項1所述的影像壓縮電路,其中該控制單元控制該編碼器,使得該編碼器分別依照多個掃描順序,對該第一單一位元深度區塊進行遊程編碼(Run-Length Encoding,RLE),產生對應於該多個掃描順序的多個前編碼區塊,該第一編碼後區塊相關於該多個前編碼區塊中具有最小壓縮率的前編碼區塊。The image compression circuit according to claim 1, wherein the control unit controls the encoder so that the encoder performs run-length encoding on the first single bit depth block according to a plurality of scanning sequences, respectively RLE), a plurality of pre-encoded blocks corresponding to the plurality of scan sequences are generated, and the first post-encoded block is related to the pre-encoded block having the smallest compression rate among the plurality of pre-encoded blocks. 如請求項7所述的影像壓縮電路,其中該多個掃描順序包括水平逐線掃描(Raster Scan)、垂直逐線掃描(Vertical Scan)、螺旋形掃描(Circular Scan)、逐線蛇形掃描(Raster Snake)、垂直蛇形掃描(Vertical Snake)或蜿蜒(Zig-Zag)掃描。The image compression circuit according to claim 7, wherein the plurality of scanning sequences include horizontal line-by-line scanning (Raster Scan), vertical line-by-line scanning (Vertical Scan), spiral scanning (Circular Scan), and line-by-line serpentine scanning ( Raster Snake, Vertical Snake or Zig-Zag scanning. 如請求項7所述的影像壓縮電路,其中該多個前編碼區塊分別具有多個前壓縮率,該控制單元取得該多前壓縮率中的一最小前壓縮率,該最小前壓縮率對應於該多個掃描順序中的一最佳掃描順序,該控制單元控制該編碼器,使得該編碼器依照該最佳掃描順序對該多個單一位元深度區塊中於該第一單一位元深度區塊之後的多個第二單一位元深度區塊進行遊程編碼。The image compression circuit according to claim 7, wherein the plurality of pre-encoding blocks respectively have a plurality of pre-compression ratios, and the control unit obtains a minimum pre-compression ratio among the multiple pre-compression ratios, the minimum pre-compression ratio corresponding to In an optimal scanning order among the plurality of scanning orders, the control unit controls the encoder so that the encoder is in the first single bit in the plurality of single bit depth blocks according to the optimal scanning order A plurality of second single-bit depth blocks after the depth block are run-length encoded. 如請求項1所述的影像壓縮電路,其中該編碼選擇單元包括: 一多工器,受控於該控制單元; 其中,當該壓縮率小於該特定值時,該多工器輸出該第一編碼後區塊。The image compression circuit according to claim 1, wherein the encoding selection unit includes: a multiplexer controlled by the control unit; wherein, when the compression ratio is less than the specific value, the multiplexer outputs the first Block after encoding. 如請求項1所述的影像壓縮電路,其中當該壓縮率不小於該特定值時,該多工器輸出該第一單一位元深度區塊。The image compression circuit of claim 1, wherein when the compression ratio is not less than the specific value, the multiplexer outputs the first single bit depth block. 一種影像壓縮方法,用來於播放影像前,對一影像的一低效位元影像進行壓縮,該影像壓縮方法包括: 接收該影像,並產生該低效位元影像,其中該影像中每一像素包括多個位元,該低效位元影像為由該多個位元中最低效的至少一位元所形成的影像; 將該低效位元影像分離成多個單一位元深度區塊,其中該多個單一位元深度區塊的位元深度為1; 對該多個單一位元深度區塊中一第一單一位元深度區塊進行無失真壓縮編碼,以產生一第一編碼後區塊; 根據該第一單一位元深度區塊及該第一編碼後區塊,取得對應於該第一單一位元深度區塊的一壓縮率;以及 根據於該壓縮率,決定是否將該第一編碼後區塊儲存於該影像播放系統的一緩衝器。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 of the images The pixel includes a plurality of bits, and the inefficient bit image is an image formed by at least one of the least effective bits among the plurality of bits; the inefficient bit image is separated into a plurality of single bit depth blocks , Where the bit depth of the plurality of single bit depth blocks is 1; a distortion-free compression coding is performed on a first single bit depth block among the plurality of single bit depth blocks to generate a first code After the block; based on the first single bit depth block and the first encoded block, obtain a compression rate corresponding to the first single bit depth block; and based on the compression rate, decide whether to The first encoded block is stored in a buffer of the video playback system. 如請求項12所述的影像壓縮方法,另包括: 判斷該壓縮率是否小於一特定值;以及 當該壓縮率小於該特定值時,將該第一編碼後區塊儲存於一緩衝器。The image compression method according to claim 12, further comprising: determining whether the compression rate is less than a specific value; and when the compression rate is less than the specific value, storing the first encoded block in a buffer. 如請求項13所述的影像壓縮方法,另包括: 當該壓縮率不小於該特定值時,將該第一單一位元深度區塊儲存於該緩衝器。The image compression method according to claim 13, further comprising: when the compression ratio is not less than the specific value, storing the first single bit depth block in the buffer. 如請求項12所述的影像壓縮方法,其中將該第一單色度低效位元影像分離成多個單一位元深度區塊的步驟包括: 將該低效位元影像分離成至少一單一位元深度影像;以及 將該至少一單一位元深度影像分離成該多個單一位元深度區塊。The image compression method according to claim 12, wherein the step of separating the first monochromatic inefficient bit image into a plurality of single bit depth blocks includes: separating the inefficient bit image into at least one unit Bit depth image; and separating the at least one single bit depth image into the plurality of single bit depth blocks. 如請求項12所述的影像壓縮方法,其中將該第一單色度低效位元影像分離成多個單一位元深度區塊的步驟包括: 將該低效位元影像分離成多個區塊;以及 將該多個區塊分離成該多個單一位元深度區塊。The image compression method according to claim 12, wherein the step of separating the first monochromatic low-efficiency bit image into a plurality of single bit depth blocks includes: separating the low-efficiency bit image into a plurality of regions Block; and separating the plurality of blocks into the plurality of single bit depth blocks. 如請求項12所述的影像壓縮方法,其中對該第一單一位元深度區塊進行無失真壓縮編碼,以產生該第一編碼後區塊的步驟包括: 分別依照多個掃描順序,對該第一單一位元深度區塊進行遊程編碼(Run-Length Encoding,RLE),產生對應於該多個掃描順序的多個前編碼區塊;以及 產生該第一編碼後區塊,其中該第一編碼後區塊相關於該多個前編碼區塊中具有最小壓縮率的前編碼區塊。The image compression method according to claim 12, wherein the step of performing distortion-free compression encoding on the first single bit depth block to generate the first encoded block includes: according to multiple scanning orders, respectively Run-Length Encoding (RLE) the first single bit depth block to generate multiple pre-encoded blocks corresponding to the multiple scan sequences; and generate the first post-encoded block, wherein the first The encoded block is related to the pre-encoded block having the smallest compression rate among the plurality of pre-encoded blocks. 如請求項17所述的影像壓縮方法,其中該多個掃描順序包括水平逐線掃描(Raster Scan)、垂直逐線掃描(Vertical Scan)、螺旋形掃描(Circular Scan)、逐線蛇形掃描(Raster Snake)、垂直蛇形掃描(Vertical Snake)或蜿蜒(Zig-Zag)掃描。The image compression method according to claim 17, wherein the plurality of scanning sequences include horizontal line-by-line scanning (Raster Scan), vertical line-by-line scanning (Vertical Scan), spiral scanning (Circular Scan), and line-by-line snake scanning ( Raster Snake, Vertical Snake or Zig-Zag scanning. 如請求項17所述的影像壓縮方法,其中該多個前編碼區塊分別具有多個前壓縮率,該影像壓縮方法另包含: 取得該多前壓縮率中的一最小前壓縮率,其中該最小前壓縮率對應於該多個掃描順序中的一最佳掃描順序;以及 依照該最佳掃描順序對該多個單一位元深度區塊中於該第一單一位元深度區塊之後的多個第二單一位元深度區塊進行遊程編碼。The image compression method according to claim 17, wherein the plurality of pre-encoded blocks each have a plurality of pre-compression ratios, and the image compression method further comprises: obtaining a minimum pre-compression ratio among the plurality of pre-compression ratios, wherein the The minimum pre-compression ratio corresponds to an optimal scanning order among the plurality of scanning orders; and according to the optimal scanning order, the multiple of the plurality of single bit depth blocks after the first single bit depth block A second single bit depth block is run-length encoded.
TW107122917A 2018-07-03 2018-07-03 Circuit and method of image compression TW202007151A (en)

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)

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