TW200425744A - Quantization matrix adjusting method for quality improvement - Google Patents

Quantization matrix adjusting method for quality improvement Download PDF

Info

Publication number
TW200425744A
TW200425744A TW92112855A TW92112855A TW200425744A TW 200425744 A TW200425744 A TW 200425744A TW 92112855 A TW92112855 A TW 92112855A TW 92112855 A TW92112855 A TW 92112855A TW 200425744 A TW200425744 A TW 200425744A
Authority
TW
Taiwan
Prior art keywords
image
quantization
adjustment
matrix
factor
Prior art date
Application number
TW92112855A
Other languages
Chinese (zh)
Other versions
TWI221742B (en
Inventor
Yung-Ching Chang
Original Assignee
Silicon Integrated Sys Corp
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 Silicon Integrated Sys Corp filed Critical Silicon Integrated Sys Corp
Priority to TW92112855A priority Critical patent/TWI221742B/en
Application granted granted Critical
Publication of TWI221742B publication Critical patent/TWI221742B/en
Publication of TW200425744A publication Critical patent/TW200425744A/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A quantization matrix adjusting method for quality improvement by scaling down the default quantization matrix. The adjusting method comprising the steps of: updating a used bits BB_X and an average quantizer scale Avg_Q; allocating the bit budget BB_C for the current picture; calculating an estimated quantizer scale Est_Q according to the used bits BB_X, average quantizer scale Avg_Q and the bit budget BB_C; deciding the operation mode, the encoder entering an adjusting mode when the estimated quantizer scale Est_Q is smaller than a threshold Th_Q, otherwise the encoder remaining at normal mode; scaling down the default quantization matrix as a new quantization matrix when the operation mode is the adjusting mode; and coding the current picture, the encoder coding the current using the new quantization matrix and default quantization matrix in the adjusting mode and normal mode, respectively.

Description

200425744200425744

【發明所屬之技術領域】 矩陣調整方法,特 品質的量化矩陣調 本發明係關於改善影像品質的量化 別疋關於利用縮小量化矩陣來改善影像 整方法。 口 / 二、【先前技術】 為了縮小影像資料量,-般會㈣像進行塵縮,例如 MPEG格式之影像編碼(coding)。影像編碼之基本單元 (basic unit)為巨集區塊(macr〇 — bl〇ck)。若取樣[Technical field to which the invention belongs] Matrix adjustment method, special-quality quantization matrix adjustment The present invention relates to quantization for improving image quality, not to mention reducing quantization matrix to improve image adjustment method.口 / 2. [Previous technology] In order to reduce the amount of image data, images are usually reduced in size, such as MPEG format image coding. The basic unit of image coding is a macro block (macr0 — bloc). If sampling

(sampling)為4:2:0格式,則每個巨集區塊具有6個區塊 (block) ’分別為4個Y區塊、一個cb區塊、以及一個cr區 塊。每個區塊必須先經過離散餘弦轉換(discrete c〇sine transform,以下簡稱DCT)後,再將DCT係數 (coefficient)量化成整數(integer)。一種鋸齒形 (zigzag)掃描或其他替代之掃描方法被用來將二維 (two-di mens ion)之量化係數陣列排列成一維 (one-di mens ion)資料。最後,再利用所謂可變長度編碼 (variable-length coding,以下簡稱VLC)進行熵編碼 (entropy coding) 〇 通常’DCT係數F[v][u]的量化可表示成: QF[v][u] = 16 * F[v][u] / (Q * W[v][u])…(1) 其中,v、u為二維陣列之指標(index),範圍從0〜7。 Q為每個巨集區塊内之各區塊的量化比例因子(Quantizer scale),可隨著不同之巨集區塊改變。W[v][u]為整張圖(sampling) is in 4: 2: 0 format, then each macro block has 6 blocks ′, which are 4 Y blocks, one cb block, and one cr block. Each block must first undergo a discrete cosine transform (hereinafter referred to as DCT), and then the DCT coefficients (coefficient) are quantized into integers. A zigzag scan or other alternative scanning method is used to arrange a two-dimension quantization coefficient array into one-dimension data. Finally, the so-called variable-length coding (VLC for short) is used to perform entropy coding. Generally, the quantization of the 'DCT coefficient F [v] [u] can be expressed as: QF [v] [u ] = 16 * F [v] [u] / (Q * W [v] [u]) ... (1) where v and u are indexes of the two-dimensional array, ranging from 0 to 7. Q is the quantizer scale of each block in each macro block, which can be changed with different macro blocks. W [v] [u] is the whole picture

第6頁 438 200425744 五、發明說明(2) 像(picture)所定義之量化矩陣(qUantizati〇n matrix), 用來指定每個不同DCT係數之權值(weighting factor)。 圖1顯示在MPEG-2規格中對内部區塊(intra block)所定義 的預設量化矩陣。如圖1之量化矩陣所示,該量化矩陣的 值耆陣列指標v、u的增加而逐漸變大。此特性使得具有 高頻之量化係數較易變成〇,原因是人類的眼睛對於低頻 信號較敏感,而對高頻信號較不敏感。 另外’反量化(inverse-quantization)被使用於回復 (recover) DCT係數。通常量化之DCT係數QF[v] [u]的反量 化被定義為: F’[v][u] = QF[v][u] * Q * W[vnu] / 16 …(2) 其中F’[v][u]為回復之DCT係數。原始之DCT係數 F[v][u]與回復之DCT係數F,[v][u]的差值被稱為量化誤差 (quantization error),且被定義為: E[v][u] = F[v] [u] - Γ [v][u] …(3) 而量化比例因子Q被用於調整量化矩陣W [ v ] [ u ]之内容 的比例值,Q值的範圍係從1〜31。應用於MPEG-1與MPEG-2 之可適應性量化(adaptive quantization)可隨意變化每 個巨集區塊之〇值,但於^^£6-4時僅能些微(31丨2]11:17)調 整相鄰巨集區塊的Q值。而且,MPEG-2具有將量化比例因 子從(1〜3 1 )對應到從(〇 . 5〜5 6 )之非線性之實際量化比例因 子。 調整量化比例因子Q可以控制巨集區塊之位元消耗 (bit consumption)以及編碼品質(c〇ded quality)。對於Page 6 438 200425744 V. Description of the invention (2) The quantization matrix (qUantization matrix) defined by the picture is used to specify the weighting factor of each different DCT coefficient. Figure 1 shows the preset quantization matrix defined in the MPEG-2 intra block. As shown in the quantization matrix of Fig. 1, the value of the quantization matrix 耆 array index v, u increases gradually and becomes larger. This characteristic makes quantization coefficients with high frequencies easier to become 0, because human eyes are more sensitive to low-frequency signals and less sensitive to high-frequency signals. In addition, 'inverse-quantization' is used to recover DCT coefficients. The inverse quantization of the commonly quantized DCT coefficients QF [v] [u] is defined as: F '[v] [u] = QF [v] [u] * Q * W [vnu] / 16… (2) where F '[v] [u] is the DCT coefficient of the reply. The difference between the original DCT coefficient F [v] [u] and the returned DCT coefficient F, [v] [u] is called the quantization error and is defined as: E [v] [u] = F [v] [u]-Γ [v] [u]… (3) and the quantization scale factor Q is used to adjust the content of the quantization matrix W [v] [u]. The value of Q ranges from 1 ~ 31. The adaptive quantization applied to MPEG-1 and MPEG-2 can change the value of each macroblock at will, but it can only be slightly (31 丨 2) 11 at ^^ £ 6-4: 17) Adjust the Q value of the adjacent macro block. Furthermore, MPEG-2 has an actual quantization scale factor that corresponds to a non-linearity from (1 to 3 1) to (0.5 to 5 6). Adjusting the quantization scale factor Q can control the bit consumption and coding quality of the macro block. for

第7頁 43! 200425744 五、發明說明(3) 較大之Q值會使量化DCT係數變小,而造成更多之量化〇cT 係數為0。因此,經過VLC處理後的編碼位元流(c〇ded bi七 stream)會變短。然而,結果會造成量化誤差變大,造成 解碼後之影像品質變差。若我們希望得到較好的影像品 質,則必須設定較小的Q值以降低量化誤差,但是編碼位 元流會變長。 在一般的應用中,MPEG位元流的位元率(bit —rate)是 受到限制的(constrained)。例如,在數位影音光碟 (Digital Versatile Disk,DVD)的標準中即定 aMpEG — 2 視訊流(video stream)的位元率不可高於每秒9 8肠,所 以在編碼過程中必須控制位元消耗來滿足該項限制。 在一連串視甙畫面中的每張圖像的内容均有變化,且 編碼之複雜度(complexity)在每個部分亦不盡相同。使用 於M^PEG-l之視訊緩衝核驗器(vide〇 buffer verifier,以 下簡稱VBV)對於不同圖像雖多少有提供位元率消耗之通融 性(:^4乂;11)丨1“7),但長時間之整體位元率仍為固定位元"1 率 ^constant bit rate,以下簡稱CBR)。而 MPEG-2 引進了 可變=兀率(variable bit rate,以下簡稱VBR)操作模 ^丄f供了每張圖像位元率消耗之變化更大通融性。VBV 緩衝器被用來模仿(emulate)MpEG解碼器之輸入緩衝器 且=MPEG編碼器產生之位元流不可違反(vi〇late) νπ纒 衝器之限制,否則位元流將無法適當地被解碼。 二 =器以在固⑽㈣模式之示意圖。如該_^ 刀係表不以固疋位元率輸入緩衝器之編碼資料,而垂直線 200425744 五、發明說明(4) 部分係表示從緩衝器瞬間移出之被解碼圖像的資料。 為了使位元流滿足MPEG位元控制的要求,當解碼器要解碼 圖像時’圖像的資料必須已經儲存於緩衝器内,且解碼器 之緩衝器不可過滿(overf i 1 1 )。參考圖2,若一張圖像消 耗太多位元,則VBV緩衝器或許會資料不足(underfl〇w), 因此可分配位元(all ocat able bits)的上限(upper bound)為UB。相同的,若一張圖像消耗太少位元,則VBV 緩衝器或許會資料溢流(overf l〇w),因此可分配位元 (allocatable bits)的下限(i〇wer bound)為LB 。圖3 顯示 VBV緩衝器在VBR操作模式之示意圖。vBR與CBR操作模式之 差異性是VBR操作模式是以指定的最大位元率輸入νβν緩衝 器直到VBV緩衝器滿載為止,因此VBr操作模式的平均位元 率輸入率是可變的。所以,VBR沒有最少位元率之限制, 只有可分配最大位元率UB的限制。 為了滿足VBV的限制,編碼器必須對每張圖像分配一 個位元預算值(bit budget),之後試著控制實際的消耗位 元接近位元預异值。一般是利用虛擬緩衝機制(v丨r丨工 buffer mechanism)來控制位元消耗。當緩衝器佔有量低 =〇時,則將量化比例因子Q對應為!;而當緩衝器佔=量 高於一門播值R( threshold)時,則將量化比例因子q對應 為31。門檻值R—般被稱為反應因子(reacti〇n 在對一張圖像編碼之前,虛擬緩衝器之佔有量D初始為 d 0 ’初始之量化比例因子q為q 〇,貝,! ^ = r * q 〇 / 31。 編碼器即利用該量化比例因子q對第一個巨集區塊進行量 200425744Page 7 43! 200425744 V. Explanation of the invention (3) A larger Q value will make the quantized DCT coefficient smaller, which will cause more quantified occ coefficient to be 0. Therefore, the coded bit stream (codded bi-seven stream) after VLC processing will be shortened. However, as a result, the quantization error becomes larger, resulting in poorer image quality after decoding. If we want to get better image quality, we must set a smaller Q value to reduce the quantization error, but the encoding bit stream will become longer. In general applications, the bit rate of an MPEG bit stream is constrained. For example, in the standard of Digital Versatile Disk (DVD), aMpEG-2 video bit rate cannot be higher than 98 intestines per second, so the bit consumption must be controlled during the encoding process. To meet this limitation. The content of each image in a series of visual glycoside pictures varies, and the complexity of the coding varies from part to part. The video buffer verifier (VideV buffer verifier (hereinafter referred to as VBV)) used in M ^ PEG-1 has the flexibility to provide bit rate consumption for different images (: ^ 4 乂; 11) 丨 1 "7) However, the overall bit rate for a long time is still a fixed bit " 1 rate ^ constant bit rate (hereinafter referred to as CBR). And MPEG-2 introduced a variable = variable bit rate (hereinafter referred to as VBR) operation mode ^ 丄 f provides more flexibility for the change of the bit rate consumption of each image. The VBV buffer is used to emulate the input buffer of the MpEG decoder and the bit stream generated by the MPEG encoder cannot be violated ( vi〇late) νπ 纒 the limiter of the buffer, otherwise the bit stream will not be able to be decoded properly. Second = the schematic diagram of the device in the fixed mode. If the _ ^ knife system table does not enter the buffer at the fixed bit rate The vertical line is 200425744. V. The description of the invention (4) part refers to the data of the decoded image that is removed from the buffer instantaneously. In order to make the bit stream meet the requirements of MPEG bit control, when the decoder needs to decode the image The image data must be stored in the buffer. And the decoder's buffer cannot be overfull (overf i 1 1). Referring to Figure 2, if an image consumes too many bits, the VBV buffer may be under-informed (underfl0w), so the bits can be allocated The upper bound of (all ocat able bits) is UB. Similarly, if an image consumes too few bits, the VBV buffer may overflow the data (overf l0w), so the bits can be allocated The lower limit of the (allocatable bits) is LB. Figure 3 shows a schematic diagram of the VBV buffer in VBR operating mode. The difference between vBR and CBR operating modes is that VBR operating mode is input at the specified maximum bit rate νβν The buffer is until the VBV buffer is fully loaded, so the average bit rate input rate of the VBr operation mode is variable. Therefore, VBR has no limit on the minimum bit rate, only the limit that can allocate the maximum bit rate UB. In order to meet the VBV The encoder must allocate a bit budget to each image, and then try to control the actual consumed bits close to the bit pre-exception. Generally, the virtual buffer mechanism (v 丨 r 丨 work) is used. buffer mechanism) Control bit consumption. When the buffer occupancy is low = 0, the quantization scale factor Q is corresponding to!; And when the buffer occupancy = amount is higher than a gate value R (threshold), the quantization scale factor q is corresponding. Is 31. The threshold R is generally called the response factor (reacti0n) Before encoding an image, the virtual buffer occupancy D is initially d 0 'The initial quantization scale factor q is q 〇, ! ^ = r * q 〇 / 31. The encoder uses the quantization scale factor q to perform the amount of the first macro block 200425744

一個巨集區塊所消耗之位元量若大於平均位元 虛擬緩衝器佔有量D增加,否則虛擬緩衝器佔 若虛擬緩衝器佔有量D增加超過d 〇 + R / 3 1, 例因子Q設定成q〇 + 1。此狀況意味著位元消 多’所以增加量化比例因子Q來試圖減少位元 虛擬緩衝器佔有量D減少低於d〇 — R/31,則將 子Q設定成qO - 1。此狀況意味著位元消耗量 ,所以減少量化比例因子Q來試圖增加位元消 擬缓衝機制來控制位元消耗的問題是要如何指 器初始佔有里d 0。邊虛擬緩衝器初始佔有量⑽ 化並編碼Q 預算值,則 有量D減少( 則將量化比 耗量超過太 消耗率。若 量化比例因 低於預期值 耗率。If the amount of bits consumed by a macro block is greater than the average bit, the virtual buffer occupancy D increases, otherwise the virtual buffer occupancy increases if the virtual buffer occupancy D exceeds d 〇 + R / 31, for example, the factor Q is set Into q〇 + 1. This situation means that the bit is disappearing, so increase the quantization scale factor Q to try to reduce the bit. The virtual buffer occupancy D decreases below d0-R / 31, and the sub-Q is set to qO-1. This situation means bit consumption, so reducing the quantization scale factor Q to try to increase the bit buffering mechanism to control the bit consumption is how to refer to the initial occupation of d 0. When the initial occupancy of the edge virtual buffer is reduced and the Q budget value is encoded, the quantity D is reduced (then the quantization ratio consumption exceeds the consumption ratio. If the quantization ratio is lower than the expected value consumption ratio.

使用虛 定虛擬緩衝Use virtual dummy buffer

可視為目前圖片之編碼複雜度的估測值(e s t i m a t i 〇 n )。對 於一個固定的位元預算值而言,若目前圖像之複雜度相對 的較高,則必須選擇較高之虛擬緩衝器初始佔有量d〇,使 得每個巨集區塊之量化比例因子Q相對的提高。但是,編 碼器並不知道目前圖像之複雜度直到該圖像被實際編碼 後。一種解決方式是繼承(inher i t)前一張圖像之虛擬緩 衝器佔有量。此種簡單方式可處理大部分狀況而不會有嚴 重問題,但是當一連串之視訊的影像内容有快速改變時, 則會造成VBV資料不足。 每個巨集區塊之量化比例因子Q的範圍是從1至31,此 範圍可以處该視訊編碼之大部分狀況。然而,當一連串之 视訊都很單純,且目標位元率彳艮高時,則量化比例因子會 變的非常小來產生更多的位元。甚至當視訊真的太單純,It can be regarded as the estimated value of the coding complexity of the current picture (e s t i m a t i 〇 n). For a fixed bit budget value, if the complexity of the current image is relatively high, you must choose a higher initial occupancy of the virtual buffer d0, so that the quantization scale factor Q of each macro block Relative improvement. However, the encoder does not know the complexity of the current image until the image is actually encoded. One solution is to inherit the virtual buffer occupancy of the previous image. This simple method can handle most situations without serious problems, but when the content of a series of video images changes rapidly, VBV data will be insufficient. The range of the quantization scale factor Q of each macroblock is from 1 to 31, and this range can be in most of the conditions of the video coding. However, when a series of videos are simple and the target bit rate is high, the quantization scale factor will become very small to generate more bits. Even when the video is really too simple,

第10頁 200425744 五、發明說明(6) 即使量化比例因子Q被設定成1都無法產生足 致於需要增加填補位元(stuffing bits), 率。另外,當平均量化比例因子Avg一q為丨· 5 分的巨集區塊最恰當的量化比例因子應為j. 須選擇1或2。所以,當量化比例因子的值變 析度亦變的越粗(c 〇 a r s e r),結果造成量化^ 地在1與2之間變化,使得影像的平坦區域產 塊狀效應(blocking artifact)。 夠的位元,以 而浪費位元 時,對於大部 5,但是卻必 的越小,其解 匕例因子快速 生輕微可視之 述目的, 列步驟: 前圖像指 已使用位 估測量化 化比例因 定為調整 編碼模式 行編碼, 陣進行編 矩陣進行 三、【發明内容】 有鑒於上述問題,本發明之目的是提供 化比例因子解析度變粗,同時可提昇影像品 使用位元量以 預算值;計算 平均量化比例 子;判斷是否 一量化比例因 為 整方法 例因子 因子, 元預算 式,當 則編碼 量化矩 縮小; 小後之 據預設 達成上 包含下 ;對目 係根據 值計算 估測量 模式設 陣,當 以及進 量化矩 之量化 更新已 定位元 元量、 比例因 子小於 模式, 為調整 當編瑪 石馬’當 編碼。 否則保 模式時 权式為 編瑪模 J不口口 持為一 ’將預 調整模 式為一 一種可避免量 質之量化矩陣 的量化矩陣調 及平均量化比 估測量化比例 因子、以及位 進入調整模 子門檻值時, 般模式;調整 设之量化矩陣 式時,根據縮 般模式時,根 200425744Page 10 200425744 V. Description of the invention (6) Even if the quantization scale factor Q is set to 1, it cannot generate enough bits to increase the stuffing bits (rate). In addition, when the average quantization scale factor Avg-q is 丨 · 5 points, the most appropriate quantization scale factor should be j. 1 or 2 must be selected. Therefore, when the value of the quantization scale factor becomes coarser (c0 ar s er), the result will cause the quantization to change between 1 and 2, making the flat area of the image produce blocking artifacts. Enough bits to waste bits, for most of the five, but it must be smaller, its solution factor quickly generates a slightly visible purpose, listed steps: the previous image refers to the measurement using bit estimation The scaling factor is set to adjust the encoding mode. The coding is performed on the matrix. [Abstract] In view of the above problems, the purpose of the present invention is to provide a coarser scaling factor resolution, and at the same time can improve the amount of image quality Use budget value; calculate average quantization ratio; determine whether a quantization ratio is due to the factor factor of the whole method, meta-budgeting formula, and then the encoding quantization moment is reduced; after the little ones are preset to achieve the upper and lower inclusion; the calculation is based on the value The estimation measurement mode is set up, and the quantization update of the moment and the quantization update has positioned the element quantity and the scale factor are less than the mode, in order to adjust the Dangma Shima'dang encoding. Otherwise, when the mode is maintained, the weighting formula is “Mama J.” The “pre-adjustment mode” is a quantization matrix that can avoid qualitative quantization matrices and the average quantization ratio. The measurement scale factor and the bit entry. When adjusting the threshold of the mold, the general mode; when adjusting the set quantization matrix formula, according to the normal mode, the root is 200425744.

由於該發明在調整模式時將預設之量化矩陣縮小,可 避免估測量化比例因子太低,藉以提昇編碼後之影像品 負’並避免平坦影像區域產生輕微可視之塊狀效應。 四、【實施方式】 以下參考圖式詳細說明本發明改善影像品質的量化 陣調整方法。 ^ 當所計算之目前圖像的估測量化比例因子EstQ一C變的 很小,且目前圖像以預設之量化矩陣進行編碼時,平垣影 像區域會產生輕微可視之塊狀效應。為了解決此問題了 $ 發明之編碼器利用減少量化矩陣之權值(心;[帥1:][叫),藉 以將估測量化比例因子EstQ —C調整成較大的值。例如,曰如 式(曰1)所示,當預設之量化矩陣w[v][u]縮小為1/4時,° 均量化比例因子Avg_Q可以從1· 5放大為6,此時量化比 因子Q可以增加為7或8來減少位元率消耗,或降低為5 2 來增加位元率消耗。所以,相鄰之巨集區塊的量化= 以大為降低。 、差可 在MPEG-1與MPEG-2規格中,在每個編碼位元流 必須配置一串標頭(sequence header)資料,且該棒: 被加入隨後的位元流。一旦解碼器接收到標頭資料「二 化矩陣W[v][u]會被設定成預設值。在MpEG-1中,定、j里 (customized)的量化矩陣W[v] [u]僅可在標頭中設定j 忒才示頭僅可插入一圖像群組(g r 〇 u p 0 f p ^ c七u r e s,ρ且 稱GOP)之前。此意味著當解碼器要變更量化矩陣時M下簡 、 解石馬Because the invention reduces the preset quantization matrix when adjusting the mode, it can avoid the estimation scale factor being too low, thereby improving the negative image quality of the encoded image and avoiding the slight visible blocking effect in the flat image area. 4. [Embodiment] The method for adjusting the quantization array for improving the image quality of the present invention is described in detail below with reference to the drawings. ^ When the calculated estimated scaling factor EstQ-C of the current image becomes small and the current image is encoded with a preset quantization matrix, the Hiragaki image area will have a slightly visible blocking effect. In order to solve this problem, the encoder of the invention uses a reduction of the weight of the quantization matrix (heart; [handsome 1:] [call]) to adjust the estimated scale factor EstQ-C to a larger value. For example, as shown in the formula (1), when the preset quantization matrix w [v] [u] is reduced to 1/4, the average quantization scaling factor Avg_Q can be enlarged from 1.5 to 6 at this time. The specific factor Q can be increased to 7 or 8 to reduce the bit rate consumption, or 5 2 to increase the bit rate consumption. Therefore, the quantization of neighboring macroblocks = greatly reduced. Differences In the MPEG-1 and MPEG-2 specifications, a sequence of header data must be configured for each encoded bit stream, and the stick: is added to the subsequent bit stream. Once the decoder receives the header data, "the two-dimensionalization matrix W [v] [u] will be set to the default value. In MpEG-1, the quantization matrix W [v] [u] of the customized You can only set j j in the header to indicate that the header can only be inserted before a group of pictures (gr 0up 0 fp ^ c sevenures, ρ and GOP). This means that when the decoder wants to change the quantization matrix M Under Jane, Calcite Horse

第12頁 436 200425744 五、發明說明(8) 器必須重新起始—個G0P ’在G0P前插入一標頭資料, 標頭貧料中配置新的量化矩陣。而在MPEG_2中,新 矩陣不僅可以配置於標頭資料中,亦可插入—外延量H匕 :碼:::若解…變更量化矩陣時’必須在每張圖像 圖4顯示本發明改善影像品質的量化矩陣調整方法 -實施例的流程圖。該實施例的流程是編碼器 斜^ 圖像事先分析即進行目前圖像之編碼動作。由於 乂 有事先掃描分析圖像之複雜度即對圖像進屬、就= 知TEST模型5(test m〇del 5,TM5)位元率控制==像習 (rate control aig〇rithm),編碼器只能利用前一担 =像來預估目前圖像之複雜度。該第一實施例的步驟^碼 步驟S402 :更新已使用位元量Ββ —χ以及平 因子Avg_Q。在一張χ圖像(χ可為!圖像、ρ圖像或 編碼之後,編碼器即取得該χ圖像之平均量化比因子 Avg_Q、最後虛擬緩衝器佔有量乜χ、以及已使曰 ββ_Χ。 q诅兀罝 、步驟S404 :對目前圖像指定位元預算值BB乂。 狀況下,下一張圖像之初始虛擬緩衝器佔有量⑽ : 定成最後虛擬緩衝器佔有量d — x,且初始量化比例?合,又 被设疋成平均量化比例因子Avg—Q。而且,由圖 率控制(frame-levei rate contr〇1)來指 曰 70 元預算值BB_C。 ⑺圖像之位Page 12 436 200425744 V. Description of the invention (8) The device must be restarted-a G0P 'inserts a header data before G0P, and a new quantization matrix is configured in the header lean material. And in MPEG_2, the new matrix can not only be configured in the header data, but also can be inserted-the epitaxial amount H ::::: If solution ... When changing the quantization matrix 'must be shown in each image Figure 4 shows the improved image of the present invention Quality quantization matrix adjustment method-a flowchart of the embodiment. The flow of this embodiment is that the encoder obliquely analyzes the image in advance to perform the encoding operation of the current image. Because there is no complexity of scanning and analyzing the image in advance, that is, the image belongs to the image, so = TEST model 5 (test m〇del 5, TM5) bit rate control = = rate control aig〇rithm, encoding The device can only use the previous load = image to estimate the complexity of the current image. Step ^ code of the first embodiment Step S402: Update the used bit amount Ββ —χ and the square factor Avg_Q. After a χ image (χ can be a! Image, ρ image, or encoding, the encoder obtains the average quantization ratio factor Avg_Q for the χ image, the final virtual buffer occupancy 乜 χ, and the ββ_χ Q Curse, step S404: Specify a bit budget value BB 乂 for the current image. In the situation, the initial virtual buffer occupancy of the next image ⑽: is set to the final virtual buffer occupancy d — x, And the initial quantization ratio is combined, and it is set to the average quantization scale factor Avg-Q. Moreover, the frame-levei rate contr0 refers to the budget value of 70 yuan BB_C. ⑺The position of the image

第13頁 437 200425744 五、發明說明(9) . 步驟S406 :計算估測量化比例因子EstQ_C。由於相同 格式之相鄰圖像其活動程度大致相同,因此該解碼器利用 ^ 前一張圖像之已使用位元量BB_X、目前圖像之位元預算值 BB_C、以及平均量化比例因子Avg_Q來計算目前圖像之估 測量化比例因子EstQ_C :Page 13 437 200425744 V. Description of the invention (9). Step S406: Calculate the estimated scale factor EstQ_C. Because adjacent images of the same format have approximately the same degree of activity, the decoder uses the used bit amount BB_X of the previous image, the bit budget value BB_C of the current image, and the average quantization scale factor Avg_Q to Calculate the estimated scale factor EstQ_C of the current image:

EstQ—C = (BB—X/BB—C) * Avg—Q …(4) 步驟S408 :偵測是否進入調整模式。當估測量化比例 因子EstQ —C小於一比例因子門檻值ThQ_X時,例如ThQ_X為 2、3或4,表示該視訊之圖像内容對於所給的位元率而言 是相當單純的。若上一張編碼圖像之已使用位元量以 _ 及指定給目前圖像之位元預算值大致相等,則可猜測 以指定給目前圖像之位元預算值BB_c將造成估測量化比例 — 因子EstQ一C太小。因此,當估測量化比例因子EstQ_c小於 比例因子門檻值ThQ一X時,則編碼器進入步驟S4i〇的調整 模式’否則以步驟S 4 1 6的一般模式處理。 、步驟S4 1 0 :縮小量化矩陣成為新的量化矩陣。在調整 模式中’編碼器會希望將目前圖像之最後平均量化比例因 ,提升到一個安全值Sq —X,而該安全值SQ— χ可能會大於或 等於比例因子門檻值ThQ 一Χ。因此,本發明係將利用〆調 _ 整因子(adjustment factor)S來縮小預設之量化矩陣,真 初始虛擬緩衝器佔有量會被提昇成d〇j/s。該調整因子s 為一個小於1的數值,且可由下式計算: s = EstQ—C / SQ—X …(5) 而新的量化矩陣W,[v] [u]為:EstQ—C = (BB—X / BB—C) * Avg—Q… (4) Step S408: Detect whether the adjustment mode is entered. When the measured scale factor EstQ-C is less than a scale factor threshold ThQ_X, for example, ThQ_X is 2, 3, or 4, it means that the image content of the video is quite simple for the given bit rate. If the used bit amount of the previous coded image and _ and the bit budget value assigned to the current image are approximately equal, it can be guessed that the bit budget value BB_c assigned to the current image will cause an estimated measurement ratio — The factor EstQ-C is too small. Therefore, when the estimated scale factor EstQ_c is smaller than the scale factor threshold value ThQ-X, the encoder enters the adjustment mode of step S4i0 '; otherwise, it is processed in the general mode of step S416. Step S4 1 0: Reduce the quantization matrix into a new quantization matrix. In the adjustment mode, the 'encoder will hope to increase the final average quantization scale factor of the current image to a safety value Sq —X, and the safety value SQ — χ may be greater than or equal to the threshold value ThQ —X. Therefore, the present invention will use the adjustment factor S to reduce the preset quantization matrix, and the true initial virtual buffer occupancy will be increased to do0j / s. The adjustment factor s is a value less than 1, and can be calculated by the following formula: s = EstQ—C / SQ—X… (5) and the new quantization matrix W, [v] [u] is:

200425744 五、發明說明(10) W’ [v][u] = W0[v][u] * s …(6) 其中v與u為〇〜7的指標。W0[v][u]可為預設之量化矩 陣或為使用者定義之量化矩陣。因此,安全值§(〇越大, 調整因子S就會越小。由於量化矩陣的最小值為】,因此 w’ [ v ] [ u ]之内容的最小值被限制為1。 另外,編碼器中會使用兩個量化矩陣,一個是給内部 (intra)區塊使用,而另一個是給互相關聯(inter)'^塊使 :::於更新一個量化矩陣需要51 2位元來編碼該量化矩 陣本身以及一些額外的位元,因此在位元使用量有限的情 ::,乃量減少量化矩陣更新的數量。例如Λ :僅 而要内部量化矩陣,而B圖像可能僅 化矩陣即ΐ μ 口 1豕J此僅而要更新互相關聯量 多夠。而對於p圖像而言,則要依據該圖像存在 門檻值的巨#區塊。若内部編碼的巨集區塊大於一 否則只兩承必須更新内部量化矩陣與互相關聯量化矩陣, 、/、而更新互相關聯量化矩陣即可。 行編i_12:以新的量化矩陣『[v][u]對目前之圖像進 成,ΞΓ回41 牛4:檢查目前圖像是否編碼完成,若編碼完 步驟S V驟3402 ’若尚未完成則跳回步驟以10。 進行i碼。416:以預設的量化矩陣w[v][u]對目前之圖像200425744 V. Description of the invention (10) W ’[v] [u] = W0 [v] [u] * s (6) where v and u are indexes of 0 ~ 7. W0 [v] [u] can be a preset quantization matrix or a user-defined quantization matrix. Therefore, the larger the safety value § (0, the smaller the adjustment factor S. Since the minimum value of the quantization matrix is], the minimum value of the content of w '[v] [u] is limited to 1. In addition, the encoder Will use two quantization matrices, one is for the intra block, and the other is for the inter (^) block so that ::: Updating a quantization matrix requires 51 2 bits to encode the quantization The matrix itself and some extra bits, so in the case of limited bit usage: ::, the amount of quantization matrix updates is reduced. For example, Λ: only the internal quantization matrix, and the B image may only be the matrix ΐ μ 口 1 豕 J This is just enough to update the amount of interrelationship. For p-images, it is necessary to rely on the existence of a threshold #mega block for the image. If the internally encoded macro block is greater than one, otherwise It is only necessary to update the internal quantization matrix and the interrelated quantization matrix, and /, and update the interrelated quantization matrix. Edit i_12: Use the new quantization matrix [[v] [u] to develop the current image, ΞΓ 回 41 牛 4: Check whether the current image is encoded. End Step S V Step 3402 ′ If it has not been completed, go back to step 10. Perform i-code. 416: Use the preset quantization matrix w [v] [u] for the current image

步驟S 4 1 D 成,則跳二檢查目!圖像是否編碼完成’若編石馬完 在上、^驟8402,若尚未完成則跳回步驟S41〇。 迷步驟中,若編碼之X圖像進入調整模式,則量If step S 4 1 D is completed, then skip to the second step to check whether the image is coded '. If the stone horse editing is completed at step 8402, if not, skip back to step S41. In the step, if the encoded X image enters the adjustment mode, the amount

d<Q 200425744 五、發明說明(11) 1 匕矩陣:縮小為1/8倍’由於巨集區塊以新的量化矩陣來 量化,因此在計算平均量化比例 該等巨集區塊之Q值缩/丨、·! /Q垃”。丄— 兀义3將 #告,告斜+ 映貫際的編碼複雜度。 — 田子於相郇圖像之調整因子S的差異不大,則 :母:圖像變更量化矩陣來反應該微小差異並非好的方 式:因:匕•可以在調整因子s的差異超過 行量化矩陣的變更。另外,有—種解決方法是將調整因進子 S預設幾個範圍’並計算好其對應之量化凡 調整因子S0可設定為U、U、0.4、0.2等四個]值預& 應之量化矩陣分別為W1、W2、W3、W4,因此當調整因;子 為0.67、0.62、〇·54、〇.61或〇.58時,其更新之量 均為W2,且只有第一張圖像需要將量化矩陣w2編碼到位: 流,其餘幾張圖像亦使用量化矩陣W2直到標頭改變。 圖5顯示本發明改善影像品質的量化矩陣調整方法 二實施例的流程圖。該實施例的流程是編碼器事先對 圖像分析後,#進行目前圖像之編碼動作。若編碼器可: 對圖像預U析來收集複雜度估測之f訊,則該編碼 更正確地決定是否變更量化矩陣以及如何變更。一般。 言’目前圖像之複雜度可藉由進行動作估測(〇1〇1:1〇11又而 estimation)時來進行估測。對於I圖像而言,可以取尸— 個内部編碼之巨集區塊的相異(variance)。對於p與b ^每 而a ’必須根據内部編碼與互相關聯編碼模式之相異來像 行模式判斷(mode decision)。相異的總和一般被稱為進 前圖像之活動程度(activity)。在進行圖像編碼之前,3編d & Q 200425744 V. Description of the invention (11) 1 Dagger matrix: reduced to 1/8 times' Since the macro blocks are quantized with a new quantization matrix, the average Q ratio of these macro blocks is being calculated. Shrink / 丨, ·! / Q LU ". 丄 — Wuyi 3 will # 告, 告 斜 + Encoding complexity. — Tian Zi in the relative image of the adjustment factor S is not much different, then: mother: image change quantization matrix It is not a good way to reflect this small difference: because: the difference in the adjustment factor s can exceed the change of the row quantization matrix. In addition, there is a solution is to preset the adjustment factor into the range S and calculate Fortunately, the corresponding quantization adjustment factor S0 can be set to four U, U, 0.4, 0.2, etc.] The pre-amplification quantization matrices are W1, W2, W3, and W4, so when the adjustment factor is set to 0.67, At 0.62, 0.54, 0.61, or 0.58, the update amount is W2, and only the first image needs to encode the quantization matrix w2 in place: the stream, and the rest of the images also use the quantization matrix W2 Until the header changes. Figure 5 shows a flowchart of a second embodiment of a quantization matrix adjustment method for improving image quality according to the present invention. The flow of this embodiment is that after the encoder analyzes the image in advance, #the current image encoding operation is performed. The encoder can: pre-analyze the image to collect the f signal of the complexity estimate, This coding more accurately decides whether to change the quantization matrix and how to change it. In general, the complexity of the current image can be estimated by performing motion estimation (0101: 1011 and optimization). For the I image, you can take the difference of the internally encoded macro block. For p and b ^, each a 'must be based on the difference between the internal encoding and the correlation encoding mode. Mode decision. The sum of the differences is generally referred to as the activity of the pre-advance image. Before image coding, 3 edits

448 200425744 五、發明說明(12) 碼器可以獲得該圖像之活動程度Act一c。而在圖像編碼之 後’平均量化比例因子Avg一Q以及實際使用位元BBj可以 用來計算該圖像之複雜度Com。 當編碼器無法對圖像預先分析目前圖像時,編碼器只 =根據前一張解碼圖像來決定是否變更量化矩陣以及如何 變更。但是當相鄰兩張圖片的圖像内容有快速變化時,此 種方式的決定可能錯誤。例如,當前一張圖像之平岣量化 比例因子Avg —Q僅稍低於比例因子門檻值ThQ一χ時,目前圖 2將不會進入調整模式。然而,若目前圖像之編碼複雜度 达=於則一張圖像之複雜度時,目前圖像編碼後之位元率 將遠低於位元預算值,則位元率將過低。相反的,若前一 張圖像之複雜度相當低,但目前圖像之複雜度相當高,則 過於縮小之量化矩陣將造成影像品質大為衰減。 、 田 此,第二實施例之方法與第一實施例之方法的差異 是該實施例預先估測目前圖像之活動程度Act-C後,再根 據A /舌動程度Act —C進行估測量化比例因子estQ c之計 算。估測量化比例因子EstQ —C之計算如下式:— °448 200425744 V. Description of the invention (12) The encoder can obtain the activity level Act-c of the image. After image coding, the average quantization scale factor Avg-Q and the actual bits BBj can be used to calculate the complexity Com of the image. When the encoder cannot analyze the current image in advance, the encoder only decides whether to change the quantization matrix and how to change it according to the previous decoded image. However, when the image content of two adjacent pictures changes rapidly, the decision of this method may be wrong. For example, when the horizontal quantization scale factor Avg-Q of the current image is only slightly lower than the scale factor threshold value ThQ-χ, FIG. 2 will not enter the adjustment mode at present. However, if the encoding complexity of the current image is equal to the complexity of an image, the bit rate of the current image after encoding will be far lower than the bit budget value, the bit rate will be too low. Conversely, if the complexity of the previous image is relatively low, but the complexity of the current image is quite high, an overly reduced quantization matrix will cause the image quality to be greatly attenuated. Here, the difference between the method of the second embodiment and the method of the first embodiment is that the embodiment estimates the activity level of the current image Act-C in advance, and then estimates it based on A / tongue movement Act-C. Calculation of quantized scale factor estQ c. The calculation of the estimated scale factor EstQ —C is as follows: — °

EstQ—C =(BB—X/BB—C)*Avg—Q*(Act—C/Act_X)…(7) 式(7 )與式(4 )的差異是式(7)在計算估測量化比例因 子EstQ — C時,除了考慮位元預算值、平均量化比例因子 Avg —Q外,還同時考慮活動程度Act。亦即,當位元預算值 與平均量化比例因子Avg一Q均相等的狀況下,若目前圖像 的活動程度高於前-張圖像之活動程度,斤計算出來的 估測量化比例因子EstQ 一C會相對的提高,使目前圖像編碼EstQ—C = (BB—X / BB—C) * Avg—Q * (Act—C / Act_X) ... (7) The difference between formula (7) and formula (4) is that formula (7) is calculated and measured In the case of the scale factor EstQ-C, in addition to the bit budget value and the average quantified scale factor Avg-Q, the activity level Act is also considered. That is, when the bit budget value is equal to the average quantization scale factor Avg-Q, if the current degree of activity of the image is higher than that of the previous image, the calculated estimated scale factor EstQ is calculated. A C will be relatively improved, so that the current image encoding

200425744 五、發明說明(13) 後之位元率不會超過位元預算值太多。相反的,若目前圖 像的活動程度低於前一張圖像之活動程度,則所計算出來 的估測量化比例因子EstQ_C會相對的降低,使目前圖像編 碼後之位元率不會低餘位元預算值太多。 當計算出估測量化比例因子Es tQ_C後,第二實施例與 第一實施例相同,均利用估測量化比例因子EstQ—C來判斷 疋否進入調整模式。當估測量化比例因子EstQ一C小於比例 因子門檻值ThQ一X時,則進入調整模式,否則以一般模式 處理。 當進入調整模式後,編碼器將預設之量化矩陣縮小成 為新的量化矩陣。在調整模式中,編碼器會希望將目前圖 像之最後平均量化比例因子提升到一個安全值Sq — x,而該 安全值SQ-X可能會大於或等於比例因子Π檻值ThQ一X。因 it上本舍明係將利用一調整因子(a d〗u s t m e n t f a c七〇 r〕$來 縮小預設之量化矩陣,且初值初始虛擬緩衝器佔有量 減少成d〇:X/S。該調整因子S為一個小於1的數值,且可由 式(5)計算出來。而新的量化矩陣w,[v][u]可由式(6) 算出來。由於量化矩陣的最小值為i,因此w, [v][u]之 容的最小值被限制為!。後續之動作與第一實施例, 不再重複說明。 但並不因此限定本發明 ,該行業者可進行各種 以上雖以實施例說明本發明 之範圍,只要不脫離本發明之要 變形或變更。200425744 V. Description of invention (13) The bit rate after (13) will not exceed the bit budget value too much. Conversely, if the activity of the current image is lower than that of the previous image, the calculated estimated scaling factor EstQ_C will be relatively reduced, so that the bit rate of the current image after encoding will not be low. Too many budget values. After the estimated measurement scale factor Es tQ_C is calculated, the second embodiment is the same as the first embodiment, and both use the estimated measurement scale factor EstQ-C to determine whether to enter the adjustment mode. When the measured scale factor EstQ-C is less than the scale factor threshold ThQ-X, it enters the adjustment mode, otherwise it is processed in the general mode. After entering the adjustment mode, the encoder reduces the preset quantization matrix into a new quantization matrix. In the adjustment mode, the encoder will hope to increase the final average quantization scale factor of the current image to a safety value Sq — x, and the safety value SQ-X may be greater than or equal to the scale factor Π threshold ThQ-X. Because it will use an adjustment factor (ad〗 ustmentfac 70r) $ to reduce the preset quantization matrix, and the initial value of the initial virtual buffer occupancy is reduced to d0: X / S. This adjustment factor S is a value less than 1 and can be calculated by equation (5). The new quantization matrix w, [v] [u] can be calculated by equation (6). Since the minimum value of the quantization matrix is i, w, The minimum value of the content of [v] [u] is limited to!. The subsequent actions and the first embodiment will not be described repeatedly. However, the present invention is not limited by this. The scope of the present invention can be modified or changed without departing from the scope of the present invention.

第18頁 200425744 圖式簡單說明 ~ 圖1顯示在MPEG-2規格中對内部區塊所定義的預設量 化矩陣。 圖2顯示VBV緩衝器在CBR操作模式之示意圖。 圖3顯示VBV緩衝器在VBR操作模式之示意圖。 圖4顯示本發明改善影像品質的量化矩陣調整方法第 一實施例的流程圖。 圖5顯示本發明改善影像品質的量化矩陣調整方法第 二實施例的流程圖。Page 18 200425744 Brief description of the drawings ~ Figure 1 shows the preset quantization matrix defined for the internal blocks in the MPEG-2 specification. Figure 2 shows the VBV buffer in CBR operation mode. FIG. 3 shows the VBV buffer in VBR operation mode. FIG. 4 shows a flowchart of a first embodiment of a quantization matrix adjustment method for improving image quality according to the present invention. FIG. 5 shows a flowchart of a second embodiment of a quantization matrix adjustment method for improving image quality according to the present invention.

第19頁Page 19

Claims (1)

200425744 六 、申請專利範圍 •種改善影像品質的量化矩陣調整方法,孫、7 , 碼器對一遠志m褚、隹—^ ^平w登方沄係以一編 陣,1 二 仃、、扁碼,該編碼器具有預設之量化矩 干 4 5周整方法包含下列步驟: J新已使用位元量以及平均量化比例因子; 對目前圖像指定位元預算值; 汁异估測量化比例因子,係根據前沭P佶田A -前述平均量化比例因子、以及俞、十、據則述f使用位凡量、 化比例因子; 1 a立元預异值計算估測量 於-H否進入調整模式,當前述估測量化比例因子似 二=化比例因子門檻值時,:=子低 式,否則保持為一般模式; 僎π-又疋為调整模 =量:矩陣,當編碼模式為調整 e又之置化矩陣縮小;以及 將別述預 進行圖像編碼,當編碼模式為調整模 後之量化矩陣進行圖像編碼,當編碼模式:’根據縮小 則根據預設之量化矩陣進行圖像編碼、^ 一般模式時, 2·如申請專利範圍第丨項所記載之改善影 化矩陣調整方法,其中前述計算估測量化;質的量 中,前述估測量化比例因子=(已使用位元旦因子的步驟 *平均量化比例因子。 里位元預算值) 3·如申請專利範圍第2項所記載之改盖 化矩陣調整m中前述調整量化矩^、步像品質的量 一調整因子來縮小預設之量化矩陣。 "中,係以 4.如申請專利範圍第3項所記 戰 D衫像品質的量 第20頁 444 200425744 六、申請專利範圍 化矩陣調整方法,1中俞 調整因子為前述估&旦+二°°正里匕矩陣的步驟中,前述 的比值。測里化比例因子與-安全量化比例因子 二;二載化之改善影像品質的量 6.如申請專利範圍第4項所記載之改善影像為 量 化矩陣調整方法,其中該編碼器包整 :,以及複數個對應之縮小量化矩陣,當進夂整心 時,選擇預設調整因子中最接近前述調 :且二 的縮小量化矩陣作為縮小後之量化矩陣。 、、且對應 7· —種改善影像品質的量化矩陣調整方 碼器對一連串圖像進行編碼,該你^ 、、届 陣,該調整方法包含下列步驟亥、·扁碼"具有預設之量化矩 3已使用位元量、活動程度Act_x、以及平均量化 比例因子, 對目前圖像指定位元預算值; 計算目前圖像之活動程度A c t c ; 1 ΐ ί:Γ ?化比例因子,係根據前述已使用位元量、 刖述平均罝化比例因子、前十 U —κ A - π Μ 引这/舌動私度Act-X與Act-C、以 及刖述位=預异值計算估測量化比例因子; ^ =疋否進入調整模式,當前述估測量化比例因子低 ΪΤΓ目::因子門檻值時’則編碼模式設定為調整模 式否則保持為一般模式; 凋王里化矩陣,當編碼模式為調整模式時,將前述預 第21頁 445 200425744 六、申請專利範圍 設之量化矩陣縮小;以及 進行圖像編碼,當編碼模式 =化矩陣進行圖像編碼,當編:馬;:”,根據縮小 則根據預設之量化矩陣進行圖像編、弋為一般模式時, 8·如申請專利範圍第7項所記載之改盖⑨ 化矩陣調整方法,其中前述計算估 ^衫像品質的量 中,前述估測量化比例因子=(已用二例因子的步驟 *(活動程度Act —C/活動程度杬七量/位元預算值) 9·如申請專利範圍第8項所二 十g里化比例因子。 化矩陣調整方法,其中前述調整m善^像品質的量 一調整因子來縮小預設之量化矩陣。匕矩陣的步驟中,係以 10·如申請專利範圍第9項 化矩陣調整方法,#中前述調整:善影像品質的量 調整因子為前述估測量化比例J巧的步驟中,前述 的比值。 子與一女全量化比例因子 11 ·如申請專利範圍第J 0項 量化矩陣調整方法,其中前 °曰載之文。影像品質的 19 j. vh ^ ^ 女王量化比例因子為6 〇 12·如申請專利範圍第1〇項 』口于马b 量化矩陣調整方法,苴中哕 °己載之改。影像品質的 子,以及複數個對應:::'ί =含;數個預設調整因 時,選擇預設調整因子中最接D陣,當進入調整模式 的&小量化矩陣作為縮小後之量化矩^ R、、且對應 1 3.如申請專利範圍第7項 化矩陣調整方法,《中前述叶曾° f之改““象品質的量 冲斤目别圖像之活動程度 I 44fi 第22頁 200425744 六、申請專利範圍 Act_C的步驟中,對於I圖像而言,係取得每個内部編碼之 巨集區塊的相異,對於P與B圖像而言,係根據内部編碼與 互相關聯編碼模式之相異來進行模式判斷,其相異的總和 係為目前圖像之活動程度Act_C。200425744 6. Scope of patent application • A quantization matrix adjustment method for improving image quality. Sun, 7, Encoder to a polygraph m Chu, 隹 — ^ ^ Ping Weng Fang Fang is a series of arrays, 1 仃, 扁Code, the encoder has a preset quantization moment, and the 5-week integer method includes the following steps: J new used bit quantity and average quantization scale factor; assigning a bit budget value to the current image; different estimates of the measurement scale The factor is based on the former 沭 P 佶 田 A-the above-mentioned average quantization scale factor, and Yu, X, and Z. According to f, we use the quantified and scale factor; Adjustment mode, when the aforementioned estimated scale factor looks like two = scale factor threshold value, the == sub-low form, otherwise it stays in the general mode; 僎 π- is again the adjustment modulus = quantity: matrix, when the encoding mode is adjustment e reduces the localization matrix; and encodes the other image in advance, when the encoding mode is the adjusted quantization matrix for image encoding, when the encoding mode: 'according to reduction, the image is performed according to a preset quantization matrix Encoding, ^ In the general mode, 2 · The method for adjusting the improvement matrix as described in item 丨 of the scope of patent application, in which the foregoing calculation estimates the measurement; in the qualitative quantity, the foregoing evaluation measures the scaling factor = (the step of using the New Year's Day factor) * Average quantization scale factor. Median budget value) 3. Adjust the quantization moment ^ and the step image quality adjustment factor as described in the modification matrix adjustment m described in item 2 of the patent application scope to reduce the preset ones. Quantization matrix. ", is based on 4. The quality of D-shirt image quality as described in item 3 of the scope of patent application, page 20 444 200425744 6. Method of adjusting the scope of patent application matrix, 1 The adjustment factor of Zhongyu is the aforementioned estimate & In the step of + 2 °° positive matrix, the aforementioned ratio. Determining scale factor and -safe quantization scale factor two; the amount of improvement of image quality by second loading 6. As described in item 4 of the scope of patent application, the improved image is a quantization matrix adjustment method, where the encoder is rounded :, And a plurality of corresponding reduced quantization matrices, when the centering is performed, the preset adjustment factor closest to the aforementioned tone is selected: and the two reduced quantization matrices are used as the reduced quantization matrix. Corresponding to 7 · — A kind of quantization matrix adjustment codec for improving image quality encodes a series of images. The adjustment method includes the following steps: · Flat code " has a preset Quantitative Moment 3 has used the bit amount, activity level Act_x, and average quantization scale factor to assign a bit budget value to the current image; calculate the activity level of the current image A ctc; 1 ί Γ: Γ scale factor Calculate estimates based on the amount of bits used, the average scaling factor described above, the top ten U — κ A-π Μ / the degree of tongue activity Act-X and Act-C, and the narration = pre-differentiation Measured scaling factor; ^ = 疋 No enters the adjustment mode. When the aforementioned estimated measurement scaling factor is low: ΤΓ 目 :: factor threshold value, then the coding mode is set to the adjustment mode, otherwise it remains the general mode; When the encoding mode is the adjustment mode, the aforementioned pre-p.21 445 200425744 VI. The quantization matrix set in the scope of the patent application is reduced; and the image encoding is performed. When the encoding mode is equal to the matrix for image encoding, When editing: horse ;: ", according to the reduction, the image is edited according to the preset quantization matrix, and the normal mode is used. 8. The method of adjusting the transformation matrix as described in item 7 of the scope of patent application, where In the calculation of the estimated quality of the shirt image, the above-mentioned estimated measurement scale factor = (the steps of the two case factors used * (activity level Act — C / activity level 杬 7 volume / bit budget value) 9. If the scope of patent application The scale factor of 20g in the 8th project. The adjustment method of the transformation matrix, in which the aforementioned adjustment of the quality of the image quality is an adjustment factor to reduce the preset quantization matrix. In the step of the dagger matrix, the 10 is used as the application The ninth itemization matrix adjustment method of the patent scope, the aforementioned adjustment in #: the quantity adjustment factor for good image quality is the aforementioned ratio in the step of estimating the measurement ratio J Q. The full quantization scale factor 11 for a child and a woman. The method of adjusting the quantization matrix of the 0th item of the patent, including the article described in the previous °. The image quality is 19 j. Vh ^ ^ The quantization scale factor of the queen is 6 〇12. Such as the 10th item of the patent application. 口 于 马 b Quantization matrix tuning This method has already been modified. The quality of the image, and multiple correspondences :: 'ί = Include; When there are several preset adjustment factors, choose the D array that is most connected to the preset adjustment factor. When entering The & small quantization matrix of the adjustment mode is used as the reduced quantization moment ^ R, and corresponds to 1 The activity level of the image in the category I 44fi Page 22 200425744 VI. In the step of applying for the scope of the patent Act_C, for the I image, the difference between each internally encoded macro block is obtained. For P and For the B image, the mode judgment is performed according to the difference between the internal coding and the interrelated coding modes, and the sum of the differences is the current degree of activity Act_C.
TW92112855A 2003-05-12 2003-05-12 Quantization matrix adjusting method for quality improvement TWI221742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW92112855A TWI221742B (en) 2003-05-12 2003-05-12 Quantization matrix adjusting method for quality improvement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW92112855A TWI221742B (en) 2003-05-12 2003-05-12 Quantization matrix adjusting method for quality improvement

Publications (2)

Publication Number Publication Date
TWI221742B TWI221742B (en) 2004-10-01
TW200425744A true TW200425744A (en) 2004-11-16

Family

ID=34389021

Family Applications (1)

Application Number Title Priority Date Filing Date
TW92112855A TWI221742B (en) 2003-05-12 2003-05-12 Quantization matrix adjusting method for quality improvement

Country Status (1)

Country Link
TW (1) TWI221742B (en)

Also Published As

Publication number Publication date
TWI221742B (en) 2004-10-01

Similar Documents

Publication Publication Date Title
TWI335763B (en)
JP5461443B2 (en) Video encoding
JP5470405B2 (en) Image coding apparatus and method
JP5015967B2 (en) Method and apparatus for determining bit allocation for groups of pixel blocks in an image in image signal encoding
JP5806219B2 (en) Method and apparatus for adjusting embedded quantization parameter in video encoding and decoding
US7388995B2 (en) Quantization matrix adjusting method for avoiding underflow of data
KR101599561B1 (en) Method and apparatus for rate control accuracy in video encoding and decoding
WO2007143876A1 (en) Method and apparatus for adaptively determining a bit budget for encoding video pictures
CN101895758B (en) H.264 code rate control method based on frame complexity
KR20090087471A (en) Method of encoding an image and device implementing said method
US20170374361A1 (en) Method and System Of Controlling A Video Content System
Chen et al. A reformative frame layer rate control algorithm for H. 264
TW200425744A (en) Quantization matrix adjusting method for quality improvement
TW201208385A (en) Code amount control method and apparatus
US7391916B2 (en) Quantization matrix adjusting method for quality improvement
TWI221743B (en) Quantization matrix adjusting method for avoiding underflow of data
KR100324471B1 (en) Method and apparatus for coding moving picture and computer readable recording medium for recording computer program therefor
TWI224469B (en) Rate control method with region of interesting support
CN1303822C (en) Quantized matrix adjusting method for improving quality of video
Feng et al. No-reference PSNR estimation based on HEVC coding
JP2007300557A (en) Image encoding device and image encoding method
Wu et al. A content-adaptive distortion-quantization model for intra coding in H. 264/AVC
TWI232684B (en) Apparatus for variable bit rate control in video compression and target bit allocator thereof
JP2002218464A (en) Method, device and program for performing transcoding of moving image coded data and recording medium
JP6341202B2 (en) Moving picture coding apparatus, moving picture coding method, and program

Legal Events

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