TW201101235A - System and method for estimating sum absolute difference - Google Patents

System and method for estimating sum absolute difference Download PDF

Info

Publication number
TW201101235A
TW201101235A TW98121926A TW98121926A TW201101235A TW 201101235 A TW201101235 A TW 201101235A TW 98121926 A TW98121926 A TW 98121926A TW 98121926 A TW98121926 A TW 98121926A TW 201101235 A TW201101235 A TW 201101235A
Authority
TW
Taiwan
Prior art keywords
block
value
sub
absolute error
absolute
Prior art date
Application number
TW98121926A
Other languages
Chinese (zh)
Inventor
Shao-Wen Wang
Pi-Jye Tsaur
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW98121926A priority Critical patent/TW201101235A/en
Publication of TW201101235A publication Critical patent/TW201101235A/en

Links

Abstract

A system for estimating sum absolute difference (SAD) value of a macro block. The macro block includes a plurality of sub macro blocks. The system includes a searching and comparing module and a calculating module. The searching and comparing module selects some of image points of the macro block to function as a plurality of sample points. The searching and comparing module searches image points of a candidate block, each of which has a most close point value to one of the plurality of sample points. The calculating module calculates an absolute difference of each of the sample points, and calculates an average value of the absolute differences of the sample points of each of the sub macro block. The average value of each of the sub macro block is multiplied by a number of the sample points of the sub macro block by the calculating module to obtain a sub absolute difference. The sub absolute differences of all of the sub macro blocks are summated by the calculating module to obtain the SAD value of the macro block. A method for estimating the SAD value is also provided.

Description

201101235 六 [0001] [0002] [0003] 發明說明: · 【發明所屬之技術領域】 本發明係關於一種絕對誤差總和(Sum Absolute Difference, SAD) 值估算系統及方法。 【先前技術】 動態影像預測編碼的概念就是用當前畫框(Current Frame)和參考畫框(Reference Frame)的差異當作 傳送資料,依次做編碼和解碼補償。由於相鄰的點與點 之間的關聯性皆非常高,會發生巨大差異的機率很小, 故’當編碼端送出的資料不是整張圖像,而只送出如同 殘餘(Residual)和移動向量(Motion Vector ,簡 稱MV)差異值的時候,將會大大減少位元的傳輸,使資 料的傳輸變得更有效率,即可達到壓縮的目的。 動態衫像預測編碼模式分為兩種,>—種是在同一張影像 内做預測的Intra預測模式(intra Prediction); 另一種則是在兩張影像之間做預測的lnter預測模式( Inter Prediction) ’這需要依靠移動估算的技巧來 取得移動的向量’在移動估算的研究當中,快速移動估 算/臾鼻法大部分是以基於方塊(Bi〇ck Base)的架構做 方塊匹配(Block Matching),稱為以方塊匹配為基礎 的演算法。當前晝框可分成複數巨集方塊,該等巨集方 塊與前一張參考畫框的搜尋區域中的候選區塊(Candid_ ate Block)做比對,設法找到匹配的相對位置,每一 個候選區塊左上方的點座標就代表候選區塊的座標,當 找到匹配的候選區塊時,相對位置的偏移量就是所謂的 098121926 表單編號A0101 第4頁/共25頁 0982037268-0 201101235 [0004] [0005] Ο [0006] . [0007] ❹ [0008] “移動向量”。將移動向量及殘餘做編碼、解碼與補償 來重建影像,即可降低運算量與複雜度,尋找運動向量 的預測叫做移動估算(Motion Estimation)。 以方塊匹配為基礎的移動估算演算法中,常常利用絕對 誤差總和(Sum Absolute Difference, SAD)值的大 小作為區塊搜尋的匹配條件,不同的演算法會依據取得 的SAD值修正搜尋路徑或是調整搜尋方式。 習知之SAD值的計算方法如下: 腳:ΣΣ ;!〇/-〇 上式表示區塊的大小為M*N,當前區塊(上式中的ft)左 上角區塊的座標為(x,y),前一張參考畫框的候選區 塊(上式中的f+ 座標為(x+j,y + k),透過在搜尋201101235 [0001] [0002] [0003] [Technical Field] The present invention relates to an Sum Absolute Difference (SAD) value estimation system and method. [Prior Art] The concept of motion picture predictive coding is to use the difference between the current frame and the reference frame as the transmitted data, and sequentially perform coding and decoding compensation. Since the correlation between adjacent points is very high, the probability of a huge difference is small, so 'the data sent by the encoding end is not the whole image, but only the residual and the moving vector. (Motion Vector, referred to as MV) difference value, will greatly reduce the transmission of the bit, so that the data transmission becomes more efficient, you can achieve the purpose of compression. The dynamic shirt image predictive coding mode is divided into two types, namely, an Intra Prediction mode in which prediction is performed in the same image, and an LTE prediction mode in which prediction is performed between two images (Inter Prediction) 'This requires the use of mobile estimation techniques to obtain moving vectors'. In the study of motion estimation, the fast motion estimation/snap method mostly uses block-based (Bi〇ck Base) architecture for block matching (Block Matching). ), called the algorithm based on block matching. The current frame can be divided into a plurality of macro blocks, which are compared with the candidate blocks in the search area of the previous reference frame, and try to find the relative positions of the matches, each candidate area. The point coordinates at the upper left of the block represent the coordinates of the candidate block. When a matching candidate block is found, the offset of the relative position is called 098121926. Form No. A0101 Page 4 / Total 25 Page 0982037268-0 201101235 [0004] [0005] [0007] [0008] "Moving Vector". By encoding, decoding, and compensating the motion vectors and residuals to reconstruct the image, the computational complexity and complexity can be reduced. The prediction of the motion vector is called Motion Estimation. In the motion estimation algorithm based on block matching, the Sum Absolute Difference (SAD) value is often used as the matching condition of block search. Different algorithms will correct the search path based on the obtained SAD value. Adjust the search method. The conventional SAD value is calculated as follows: Foot: ΣΣ ;! 〇 / - 〇 The above block indicates that the size of the block is M*N, and the coordinates of the upper block of the current block (ft in the above formula) are (x, y), the candidate block of the previous reference frame (the f+ coordinate in the above formula is (x+j, y + k))

t — I 視窗裏尋找匹配的候選區塊(匹配意指SAD值最小), 然後依此候選區塊與當前區塊的座標相減作為移動方向 特徵的擷取方式,其最大的缺點是必須加總巨集方塊中 全部影像的絕對誤差值才能決定SAD值,故,產生巨大且 繁複的計算數量,由此可見,前述方式仍有諸多缺點, 而亟待加以改良。 【發明内容】 鑒於前述内容,有必要提供一種絕對誤差總和值估算系 統及方法,不需要加總巨集方塊中全部像點的絕對誤差 就能提前決定SAD值的大小,能有效縮減計算量,並且適 098121926 表單編號A0101 第5頁/共25頁 0982037268-0 201101235 用於以方塊匹配為基礎的移動估算演算法中。 [0009] 一種絕對誤差總和值估算系統,用於估算一當前畫面的 一巨集方塊相對於一參考畫面的一候選區塊的絕對誤差 總和值,該巨集方塊與該候選區塊的像點數相等,該巨 集方塊包括複數子方塊,該絕對誤差總和值估算系統包 括一搜尋比較模塊及一運算模塊,該搜尋比較模塊用於 在每一子方塊中選擇複數像點作為取樣點,並在該候選 區塊中尋找與每一取樣點的像點值最接近的一像點,該 運算模塊將每一取樣點的像點值與該候選區塊中對應像 0 點的像點值之差取絕對值以得到每一取樣點的絕對誤差 值,並計算每一子方塊中的所有取樣點的絕對誤差值的 平均值,該運算模塊將該平均值與對應的子方塊中的所 ' 有像點的數量相乘以得到每一子方塊的子絕對誤差總和 _ 值,並將該巨集方塊中的所有子方塊的子絕對誤差總和 值相加以得到該巨集方塊的絕對誤差總和值。 [0010] 一種絕對誤差總和值估算方法,用於估算一當前畫面的 一巨集方塊的絕對誤差總和值以對該巨集方塊進行移動 (, 估算,該巨集方塊包括複數子方塊,該絕對誤差總和值 估算方法包括以下步驟: [0011] 一搜尋比較模塊選擇每一子方塊中的部分像點作為取樣 點; [0012] 該搜尋比較模塊在一候選區塊中尋找與每一取樣點的像 點值最接近的一像點,該候選區塊為在一參考晝面中與 該巨集方塊具有相等數量的像點的一區塊; 098121926 表單編號A0101 第6頁/共25頁 0982037268-0 201101235 [_ -運算模塊計算每-取樣㈣目對於其最接近的像點的像 點值的絕對誤差值; [_該《模塊計算每-子錢中⑽有取樣_絕對誤差 值的平均值,並將該平均值與對應的子方塊中的像點的 錄相乘’以得到對應子方塊的子簡誤差總和值; [_錢算模祕所有衫_句對料值相加以得到該 巨集方塊的絕對誤差總和值;以& [_—模塊順虹集方_絕對誤差齡值與-臨界 ° ㈣關係’ #該絕賴錢和值小於該臨界值時,結束 對該巨集方塊的移動估算。 [0017]前述絕對誤差總和值估算系統及方法不需要計算全部的 像點就能以前述所預測的SAD值取代傳統的計算方式,大 幅度的降低演算法的搜尋點數,可有效的降低系統運算 量與複雜度。該絕對誤差總和值祜算系統及方法可套用 e 4 ^ * r * ^ 在任何以方塊匹配為秦礎的移動估算演算法中,具有相 Q 容與移植的價值,_贫任何已發旱的以方塊搜尋為基礎 的演算法都具有運算性能提升的效果。該絕對誤差總和 值估算方法透過設定臨界值的方式而提前結束對巨集方 塊的移動估算,可提高估算效率以及減少估算誤差。該 絕對誤差總和值估算系統及方法適用於任何視訊壓縮技 術,只要是以方塊匹配為基礎的移動搜尋演算法中,並 以SAD值作為匹配條件,例如H. 264,MPEG4等技術中所 使用的各種移動估算方法均可套用。 【實施方式】 098121926 表單編號A0101 第7頁/共25頁 0982037268-0 201101235 [0018] 請參閱圖1 ’本發明絕對誤差總和(Sum Absolute Difference,SAD)值估算系統1用於在壓縮一動態影 像時對一當前畫面(圖未示)與一參考畫面(圖未示) 進行比對分析,以得到該當前畫面的一巨集方塊的絕對 誤差總和值,即SAD值。本實施例中,該當前畫面及參考 晝面為在該動態影像中連續播放的畫面。該絕對誤差總 和值估算系統1的較佳實施例包括一區塊劃分模塊10、一 搜尋比較模塊20、一運算模塊30及一判斷模塊40。 [0019] 請一併參閱圖2及圖3,該當前畫面包括複數巨集方塊, 該區塊劃分模塊1〇用於將每一巨集方塊劃分為複數子方 塊。本實施例中’以該等巨集方塊中的其中一·巨集方塊 100為例進行說明。該巨集方塊1〇〇以“九宮格”的方式 被劃分為九個子方塊SMB1-SMB9,每一子方塊 SMB卜SMB9包括M*N個小方塊,其中,Μ為每一子方塊 SMB1-SMB9的小方塊在水平方向的個數,Ν為每一子方塊 SMB1-SMB9的小方塊在豎直方向的個數,如子方塊SMB1 在水平方向與登直方向;:均包括有5個小方塊。本實施例中 ,該巨集方塊1 〇 〇包括以1 6排16列的方式排列的2 5 6個小 方塊’每一小方塊為該巨集方塊1〇〇的一像點101。 [0020] 請一併參閱圖4 ’以子方塊SMB 1為例,其具有以5排5列的 方式排列的25個像點1〇1。 L0021]請一併參閱圖5及圖6 ’每一巨集方塊在該參考畫面中具 有一對應的搜尋區域,每一搜尋區域包括複數與對應的 巨集方塊大小相等的候選區塊。本實施例中,以該參考 畫面中與該巨集方塊1〇〇相對應的一搜尋區域200為例進 表單煸號Α0101 098121926 第8頁/共25頁 0982037268-0 201101235 G 行說明,該搜尋區域200包括複數候選區塊21〇,每一候 選區塊2丨〇包括複數與該巨集方塊100中像點101的數量 相等的小方塊,每一小方塊為一像點211,即,每一候選 區塊210的大小與該巨集方塊1〇〇的大小相同。該搜尋區 域20〇中的候選區塊210的數量為(2Χ + 1) * (2Υ + 1), 其中,X為該搜尋區域200中心點處的一候選區塊(如圖5 中以陰影標示的候選區塊220 )左邊或右邊的候選區塊的 數量,Υ為該候選區塊220上側或下侧的候選區塊的數量 ,本實施例中,X、γ的值均自定義為7,該搜尋區域2〇〇 中的候選區塊210是以15排15列的方式排列的,其數量為 225。 [0022] 0 該巨集方塊100可與至少一候選區塊21〇進行比較來找到 該搜尋區域200中與該巨集方塊1〇〇所匹配的一候選區塊 21〇。在比較的過程中,該巨集方塊1〇〇可依據一定的順 序與該等候選區塊210進行比對/直到尋找到與該巨集方 塊100相匹配的候選區塊210。如,該搜尋比較模塊2〇可 先從該搜尋區域2〇〇中心點處的候選區.塊22〇進行比較, 若該候選區塊220與巨集方塊100匹配,則無需與其他候 選區塊210進行比較;若該候豸區塊22〇與該巨集方塊 1〇〇不匹配’則再將該巨集方塊m與該候選區塊22〇相 鄰的其他㈣區塊騎比較。在其他實施财,該巨集 方塊100亦可採用其他的比較順序,#,從左到右對該搜 尋區域200的候職塊210分別與該巨集方塊1〇〇進行比 較,來尋找與該巨集方塊1〇〇相匹配的候選區塊21〇。 [0023] 在尋找與該巨集方塊1〇〇相匹配的候選區塊21〇時該絕 098121926 表單編號A0101 第9頁/共25頁 0982037268-0 201101235 對誤差總和值估算系統1依次將該子方塊SMB1-SMB9的子 絕對誤差總和(Sub Sum Absolute Difference, SSAD)值相累加以得到該巨集方塊100的SAD值。在計算 該SAD值的過程中,該搜尋比較模塊20用於在每一子方塊 SMB卜SMB9中選擇複數小方塊101作為取樣點1〇2,本實 施例中’該取樣點102為圖3及圖4中以陰影標示的小方塊 。以子方塊SMB1為例,該搜尋比較模塊20選擇該子方塊 SMB1中心的小方塊以及其周邊的四個小方塊作為取樣點 102。該搜尋比較模塊20還用於將每一取樣點1〇2的像點 值分別與該候選區塊2 2 0中的所有像點211的像點值進行 比較,以在該候選區塊220内找到與每一取樣點1〇2的像 點值最接近的一像點211,該.像點值表示該參考畫面及當 前畫面中每一像點處的圖像特徵,如圖像亮度、畫素值 等,當任一取樣點102與該候選區塊220内對應的一像點 211的像點值之間的差異最小時,即表示該兩點的圖像特 徵最相似。 [0024] 以該子方塊SMB1中左上角的一取樣點1〇2為例,該搜尋比 較模塊20將該取樣點102的像點值與候選區塊220中的每 一像點211的像點值進行比較後,找到該候選區塊220中 與該取樣點102的像點值最為接近的一像點221 (如圖6中 的實心小方塊),以此方法可在該候選區塊220中分別找 到與每一取樣點102的像點值最接近的像點211。 [0025] 該運算模塊30用於將每一取樣點1〇2的像點值減去在該候 選區塊220中與其像點值最接近的像點211的像點值之後 再對得到的差值取絕對值,即得到每一取樣點102的絕對 098121926 表單編號A0101 第10頁/共25頁 0982037268-0 201101235 誤差值。該運算模塊3〇還用於計算每一子方塊 SMB卜SMB9中的所有取樣點1〇2的絕對誤差值的平均值 以及將該平均值乘以對應子方塊中所有像點1 〇丨的數量即 可對應得到每一子方塊SMB卜SMB9的SSAD值。 [0026] ❹ 該判斷模塊40用以將該SAD值與一預設的臨界值進行比軟 ,當該SAD值小於該臨界值時,說明該巨集方塊1〇〇與兮 候選區塊220互相匹配,即,該巨集方塊1〇〇在該表考晝 面中的相對位置已經確定,此時將該SAD值設為〇,則無 需將該巨集方塊1〇〇與該搜尋區域2Ό0中的其他候選區土鬼 210進行比較,故,可提前結束對該巨集方塊1〇〇的移動 估算。當該SAD值大於該臨界值時,則繼續#算該巨集方 塊100相對于其他候選區塊210的SAD值,最終找到—最 小的SAD值,以在該參考畫面中找到與該巨集方塊100相 匹配的候選區塊210,以實現對該巨集方塊1〇〇的移動估 算。該臨界值可由用戶自行設定。 [0027] 請一併參閱圖7,本發明移動估算方法應用於該絕對誤差 G 總和值估算系統1,其包括以下步驟: [0028] 步驟S1 :初始化參數i ’使i等於〇 ’ i可表示該子方塊 SMB1-SMB9的序列號,例如i為2時表示第2個子方塊 SMB2 ; [0029] 步驟S2:該搜尋比較模塊2〇選擇第i個子方塊中心處的 像點101以及該中心處的像點101周邊的四個像點101作 為該取樣點102 ; [0030] 步驟S3:該搜尋比較模塊20計算該第丄個子方塊中的所 098121926 0982037268-0 表單編號A0101 第11頁/共25頁 201101235 有取樣點10 2的絕對誤差值的平均值。其中,該搜尋比較 模塊20先將該第i個子方塊的每一取樣點1〇2的像點值分 別與該搜尋區域200内的一候選區塊,如候選區塊22〇的 所有像點211的像點值進行比較,以在該候選區塊22〇内 找到與每一取樣點102的像點值最接近的一像點211 ;並 將第i個子方塊每一取樣點1〇2的像點值減去在該候選區 塊220内與其像點值最接近的像點211的像點值之後再取 絕對值’以得到每一取樣點102的絕對誤差值,即可得到 該第i個子方塊中的所有取樣點102的絕對誤差值的平均 值; [画]步驟S4 :該運算模塊30判斷i是否等於1、5、6或7,若i 等於1、5、6或7,則執行步驟S5,否細:,執行步驟S6 f [0032] 步驟S5 :將第i個子方塊SMB1、SMB5、SMB6或SMB7的取 樣點102的絕對誤差值的平均值乘以25,以計算該第i個 子方塊的SSAD值,並執行#^S9 ; [0033] 步驟S6 :判斷i是否等於2、3、8或9,若i等於2、3、8 或9,則執行步驟S7,否則,執行步驟S8 ; [〇〇34] 步驟S7 :將第i個子方塊SMB2、SMB3、SMB8或SMB9的取 樣點102的絕對誤差值的平均值乘以30,以計算該第i個 子方塊的SSAD值,並執行步驟S9 ; [0035] 步驟S8 :將子方塊SMB4的取樣點1〇2的絕對誤差值的平 均值乘以36,以計算該第子方塊SMB4的SSAD值,並執行 步驟S9 ; 098121926 表單編號A0101 第12頁/共25頁 0982037268-0 201101235 [0036] 步驟S9 :將得到的SSAD值相累加以得到一 sad值,並將土 的值加1 ; [0037] 步驟SU):判斷i是否等於10’$不等於1〇,返回步驟 si,否則,執行步驟sii ; [0038] 步細:該判斷模塊40判斷該SAD值是否小於該臨界值 ,若該SM)值小於該臨界值,則執行步驟312;及 [0039]Ο [0040] 步驟S12 :將該SAD值設為〇,則結束將該巨集方塊1〇〇與 該候選區塊22G進行比較,並結束對該巨集方塊州的移 動估算。 若該SAD值獅於該臨界值,則結束將該巨集方塊1〇〇與 該候選區塊220進行比較,而繼續用以上方法將該巨集方 塊⑽與該搜尋區域200内的其他候選區塊21〇進行比較 ’以得到一最小的SAD值,故, 相匹配的候選區塊21 〇。 可找到與該巨集方塊1 〇 〇 [0041] 〇 該絕對誤差總和值估算系統及方法不需要計算全部的像 點就能以前述所預測的SAD值取代傳統的計算方式,大幅 度的降低演算法的搜尋崎,此亦表示可有效的降低系 統運算量與複雜度。 [0042] 本發明絕對誤差總和值估算系統及方法是利用快速收斂 的方式預測SAD值,以達到在移動估算的演算法中加速估 算時間與降低運算複雜度,其可套用在任何以方塊匹配 為基礎的移純算演算法巾,具有相容與移植的價值, 對於任何已發展的以方塊匹配為基礎的演算法都具有運 算性能提升的效果。 098121926 表單編號A0101 第13頁/共25頁 0982037268-0 201101235 [0043] 本發明還透過設定臨界值的方式而提前結束對巨集方塊 的移動估算,可提高估算效率以及減少估算誤差。 [0044] 另’該絕對誤差總和值估算系統及方法可相容於任何以 方塊匹配為基礎的移動估算演算法中,對於任何視訊廢 縮技術,只要是以方塊匹配為基礎的移動搜尋演算法中 ’並以SAD作為匹配條件,例如η. 264,MPEG4等技術中 所使用的各種移動估算方法均可套用。 [0045] 綜上所述,本發明符合發明專利要件,爰依法提出專利 申請。惟,以上所述者僅為冬發明夂較佳實施例,舉凡 熟悉本案技藝之人士,在爰依本發明精神所作之等效修 飾或變化,皆應涵蓋於以下之申請專利範圍内。 【圖式簡單說明】 [〇〇46 ]圖1是本發明絕對誤差總和值估算系統較佳實施例的模塊 圖。 [0047] 圖2是圖1中的區塊劃分模塊將一巨集方塊劃分為複數子 方塊的示意圖。 [0048] 圖3是圖2中的巨集方塊的示意圖。 [0049] 圖4是圖2中一子方塊的示意圖。 [0050] 圖5是圖2中的巨集方塊所對應的一搜尋區域的示意圖。 [0051] 圖6是圖5中的搜尋區域的一候選區塊的示魚圖。 [0052] 圖7是本發明絕對誤差總和值估算方法較佳實施例的流程 圖。 【主要元件符號說明】 098121926 表單編號A0101 第14頁/共25頁 0982037268-0 絕對誤差總和 1 區塊劃分模塊 10 值估算系統 搜尋比較模塊 20 運算模塊 30 判斷模塊 40 巨集方塊 100 搜尋區域 200 候選區塊 210 、 220 像點 101 ' 211 ' 取樣點 102 221 子方塊 SMB1-SMB9 201101235 Οt — I finds the matching candidate block in the window (the matching means the SAD value is the smallest), and then subtracts the coordinates of the candidate block from the current block as the moving direction feature. The biggest disadvantage is that it must be added. The absolute error value of all the images in the total macro block can determine the SAD value, so that a huge and complicated calculation amount is generated, and thus, the foregoing method still has many disadvantages, and needs to be improved. SUMMARY OF THE INVENTION In view of the foregoing, it is necessary to provide an absolute error summation value estimation system and method, which can determine the size of the SAD value in advance without increasing the absolute error of all the image points in the macroblock, and can effectively reduce the calculation amount. And 098121926 Form No. A0101 Page 5 / Total 25 Page 0982037268-0 201101235 Used in the block estimation based motion estimation algorithm. [0009] An absolute error summation value estimation system, configured to estimate an absolute error sum of a macroblock of a current picture relative to a candidate block of a reference picture, the macro block and an image point of the candidate block Equally, the macro block includes a plurality of sub-blocks, the absolute error sum value estimation system includes a search comparison module and an operation module, wherein the search comparison module is configured to select a plurality of pixels as sampling points in each sub-block, and Finding an image point closest to the image point value of each sampling point in the candidate block, the operation module sets the image point value of each sampling point and the pixel value of the corresponding image 0 point in the candidate block. The difference is taken as an absolute value to obtain an absolute error value for each sample point, and an average value of the absolute error values of all the sample points in each sub-block is calculated, and the operation module compares the average value with the corresponding sub-squares Multiplying the number of image points to obtain the sub-absolute error sum_value of each sub-block, and adding the sum of the sub-absolute errors of all sub-blocks in the macro-block to obtain the macro-block The sum of the error values. [0010] An absolute error summation value estimation method for estimating an absolute error sum value of a macroblock of a current picture to move the macro block (it is estimated that the macro block includes a plurality of sub-blocks, the absolute The error sum value estimation method comprises the following steps: [0011] a search comparison module selects a partial image point in each sub-block as a sampling point; [0012] the search comparison module searches for a candidate point in each candidate block The image point closest to the point value, the candidate block is a block having an equal number of image points in the reference frame with the macro block; 098121926 Form No. A0101 Page 6 / Total 25 Page 0982037268- 0 201101235 [_ - The arithmetic module calculates the absolute error value of the image point value of each closest pixel of each sample (four); [_ The module calculates the average value of the sample_absolute error value for each (10) And multiplying the average value with the video of the pixel in the corresponding sub-block to obtain the sum of the sub-simple errors of the corresponding sub-block; [_ money calculation model all the shirt_sentence value is added to obtain the giant Set of squares For the error sum value; to & [_—module shun rainbow set _ absolute error age value and -critical ° (four) relationship ' # The absolute money and value is less than the critical value, end the movement estimation of the macro block [0017] The foregoing absolute error summation value estimation system and method can replace the traditional calculation method with the aforementioned predicted SAD value without calculating all the image points, and greatly reduce the number of search points of the algorithm, which can effectively reduce System computational complexity and complexity. The absolute error summation system and method can apply e 4 ^ * r * ^ in any mobile estimation algorithm based on block matching, which has the value of phase Q capacity and transplantation. _ Poor any block-based algorithm based on block search has the effect of improving the performance. The absolute error sum estimation method ends the estimation of the movement of the macro block early by setting the threshold value, which can improve the estimation. Efficiency and reduction of estimation error. The absolute error summation estimation system and method are applicable to any video compression technology, as long as the block search is based on mobile search calculus In the middle, and using the SAD value as a matching condition, various motion estimation methods used in technologies such as H.264, MPEG4, etc. can be applied. [Embodiment] 098121926 Form No. A0101 Page 7/Total 25 Page 0982037268-0 201101235 [ 0018] Please refer to FIG. 1 'The Sum Absolute Difference (SAD) value estimation system 1 is used to perform a current picture (not shown) and a reference picture (not shown) when compressing a motion picture. The analysis is performed to obtain the sum of absolute errors of a macroblock of the current picture, that is, the SAD value. In this embodiment, the current picture and the reference picture are pictures continuously played in the motion picture. The preferred embodiment of the absolute error total value estimation system 1 includes a block division module 10, a search comparison module 20, an operation module 30, and a determination module 40. [0019] Referring to FIG. 2 and FIG. 3 together, the current picture includes a complex macroblock, and the block dividing module 1 is configured to divide each macro block into a plurality of sub-blocks. In the present embodiment, the description of one of the macroblocks 100 in the macroblocks is taken as an example. The macro block 1 is divided into nine sub-blocks SMB1-SMB9 in the manner of "nine squares", and each sub-block SMB SMB9 includes M*N small squares, wherein Μ is for each sub-block SMB1-SMB9 The number of small squares in the horizontal direction is the number of small squares of each sub-block SMB1-SMB9 in the vertical direction, such as the sub-block SMB1 in the horizontal direction and the straightening direction; each includes 5 small squares. In this embodiment, the macro block 1 〇 〇 includes 2 5 6 small squares arranged in a row of 16 rows and 16 columns. Each small square is an image point 101 of the macro block 1 。. [0020] Please refer to FIG. 4' with the sub-block SMB 1 as an example, which has 25 image points 1〇1 arranged in 5 rows and 5 columns. L0021] Please refer to FIG. 5 and FIG. 6' each macroblock has a corresponding search area in the reference picture, and each search area includes a plurality of candidate blocks equal in size to the corresponding macro block. In this embodiment, a search area 200 corresponding to the macro block 1〇〇 in the reference picture is taken as an example. The form number Α0101 098121926 page 8/25 pages 0982037268-0 201101235 G line description, the search The area 200 includes a plurality of candidate blocks 21〇, each of the candidate blocks 2丨〇 includes a plurality of small squares equal to the number of the image points 101 in the macroblock 100, each small square being an image point 211, ie, each The size of a candidate block 210 is the same as the size of the macro block 1〇〇. The number of candidate blocks 210 in the search area 20〇 is (2Χ + 1) * (2Υ + 1), where X is a candidate block at the center point of the search area 200 (as indicated by a hatching in FIG. 5) The number of candidate blocks on the left or the right side of the candidate block 220 is 数量, the number of candidate blocks on the upper side or the lower side of the candidate block 220. In this embodiment, the values of X and γ are all defined as 7, The candidate blocks 210 in the search area 2 are arranged in 15 rows and 15 columns, and the number is 225. [0022] The macroblock 100 can be compared with at least one candidate block 21〇 to find a candidate block 21〇 in the search area 200 that matches the macro block 1〇〇. In the process of comparison, the macroblocks may be compared with the candidate blocks 210 according to a certain order until a candidate block 210 matching the macroblock 100 is found. For example, the search comparison module 2 can first compare from the candidate region block 22 at the center of the search region 2, and if the candidate block 220 matches the macro block 100, it does not need to be combined with other candidate blocks. 210: If the candidate block 22〇 does not match the macro block 1〇〇, then the macro block m is compared with the other (four) block rides adjacent to the candidate block 22〇. In other implementations, the macro block 100 may also use other comparison order, #, from left to right, the candidate block 210 of the search area 200 is compared with the macro block 1〇〇 to find and The macroblock 1〇〇 matches the candidate block 21〇. [0023] When searching for the candidate block 21〇 matching the macro block 1〇〇, the 098121926 form number A0101 page 9/total 25 page 0982037268-0 201101235 The error sum value estimation system 1 sequentially substitutes the sub-block The Sub Sum Absolute Difference (SSAD) values of the blocks SMB1-SMB9 are added to obtain the SAD value of the macro block 100. In the process of calculating the SAD value, the search comparison module 20 is configured to select a plurality of small blocks 101 as sampling points 1 〇 2 in each sub-block SMB SMB9. In this embodiment, the sampling point 102 is FIG. 3 and The small squares are shaded in Figure 4. Taking the sub-block SMB1 as an example, the search comparison module 20 selects a small square at the center of the sub-block SMB1 and four small squares around it as the sampling point 102. The search comparison module 20 is further configured to compare the pixel values of each sampling point 1〇2 with the image point values of all the image points 211 in the candidate block 2200, respectively, to be in the candidate block 220. Find an image point 211 that is closest to the image point value of each sampling point 1〇2, and the image point value represents the image features at the image point and the image point in the current picture, such as image brightness, drawing The prime value or the like, when the difference between the image point values of any of the sample points 102 and the corresponding image point 211 in the candidate block 220 is the smallest, that is, the image features of the two points are most similar. [0024] Taking a sampling point 1〇2 in the upper left corner of the sub-block SMB1 as an example, the search comparison module 20 compares the image point value of the sampling point 102 with the image point of each image point 211 in the candidate block 220. After the values are compared, an image point 221 (such as a solid small square in FIG. 6) closest to the image point value of the sampling point 102 in the candidate block 220 is found, and in this candidate block 220, the method can be used in the candidate block 220. The image point 211 closest to the image point value of each sampling point 102 is found separately. [0025] The operation module 30 is configured to subtract the pixel value of each sample point 1〇2 from the image point value of the image point 211 closest to the image point value in the candidate block 220, and then obtain the difference. The value takes the absolute value, that is, the absolute value of each sample point 102 is obtained 098121926 Form No. A0101 Page 10 / Total 25 Page 0982037268-0 201101235 Error value. The operation module 3〇 is further configured to calculate an average value of absolute error values of all sampling points 1〇2 in each sub-block SMB SMB9 and multiply the average value by the number of all image points 1 对应 in the corresponding sub-block The SSAD value of each sub-block SMB SMB9 can be obtained correspondingly. The determining module 40 is configured to compare the SAD value with a preset threshold. When the SAD value is less than the threshold, the macroblock 1〇〇 and the candidate block 220 are mutually Matching, that is, the relative position of the macroblock 1〇〇 in the table has been determined. At this time, the SAD value is set to 〇, and the macroblock 1〇〇 is not required to be in the search area 2Ό0. The other candidate areas of the ghosts 210 are compared, so the estimation of the movement of the macro block 1〇〇 can be ended early. When the SAD value is greater than the threshold, then the SAD value of the macroblock 100 relative to the other candidate blocks 210 is calculated, and finally the minimum SAD value is found to find the macroblock in the reference picture. 100 matching candidate blocks 210 to achieve motion estimation for the macro block 1〇〇. This threshold can be set by the user. [0027] Referring to FIG. 7, the motion estimation method of the present invention is applied to the absolute error G total value estimation system 1, which includes the following steps: [0028] Step S1: Initializing the parameter i 'so that i is equal to 〇' i can represent The sequence number of the sub-blocks SMB1-SMB9, for example, when i is 2, represents the second sub-block SMB2; [0029] Step S2: the search comparison module 2 selects the image point 101 at the center of the i-th sub-block and the center The four image points 101 around the pixel 101 serve as the sampling point 102; [0030] Step S3: The search comparison module 20 calculates the 098121926 0982037268-0 in the third sub-block. Form No. A0101 Page 11 of 25 201101235 There is an average of the absolute error values of the sampling point 10 2 . The search comparison module 20 firstly compares the image point values of each sampling point 1〇2 of the i-th sub-block with a candidate block in the search area 200, such as all the image points 211 of the candidate block 22〇. The image point values are compared to find an image point 211 closest to the image point value of each sampling point 102 in the candidate block 22〇; and the image of each sampling point of the i-th sub-block 1〇2 The ith value is obtained by subtracting the pixel value of the image point 211 closest to the image point value in the candidate block 220 and then taking the absolute value ' to obtain the absolute error value of each sample point 102. The average of the absolute error values of all the sampling points 102 in the square; [Drawing] Step S4: The arithmetic module 30 determines whether i is equal to 1, 5, 6, or 7, and if i is equal to 1, 5, 6, or 7, execution is performed. Step S5, no detail: performing step S6 f [0032] Step S5: multiplying the average value of the absolute error values of the sampling points 102 of the i-th sub-block SMB1, SMB5, SMB6 or SMB7 by 25 to calculate the i-th sub- The SSAD value of the block, and execute #^S9; [0033] Step S6: Determine whether i is equal to 2, 3, 8, or 9, if i is equal to 2, 3, 8, or 9, Then, step S7 is performed; otherwise, step S8 is performed; [〇〇34] Step S7: multiplying the average value of the absolute error values of the sampling points 102 of the i-th sub-block SMB2, SMB3, SMB8 or SMB9 by 30 to calculate the number The SSAD value of the i sub-blocks, and step S9 is performed; [0035] Step S8: multiplying the average value of the absolute error values of the sampling points 1 〇 2 of the sub-block SMB4 by 36 to calculate the SSAD value of the first sub-block SMB4, And step S9 is executed; 098121926 Form No. A0101 Page 12 / Total 25 page 0982037268-0 201101235 [0036] Step S9: The obtained SSAD values are added together to obtain a sad value, and the value of the soil is increased by 1; [0037] Step SU): determining whether i is equal to 10'$ is not equal to 1〇, returning to step si, otherwise, performing step sii; [0038] Step: The determining module 40 determines whether the SAD value is less than the critical value, if the SM) If the value is less than the threshold, step 312 is performed; and [0039] step S12: setting the SAD value to 〇, ending the comparison of the macro block 1〇〇 with the candidate block 22G, and End the mobile estimation for the macro block state. If the SAD value is at the threshold, the macro block 1〇〇 is compared with the candidate block 220, and the macro block (10) and the other candidate areas in the search area 200 are continued by the above method. Block 21 〇 compares ' to obtain a minimum SAD value, so the matching candidate block 21 〇. Can be found with the macro block 1 〇〇 [0041] 〇 The absolute error sum value estimation system and method can replace the traditional calculation method with the aforementioned predicted SAD value without calculating all the image points, and greatly reduce the calculation The search for the law, this also means that the amount and complexity of the system can be effectively reduced. [0042] The absolute error summation value estimation system and method of the present invention predicts the SAD value by means of fast convergence, so as to accelerate the estimation time and reduce the computational complexity in the motion estimation algorithm, which can be applied to any block matching. The basic shifting algorithm algorithm has the value of compatibility and portability, and has the effect of improving the performance of any developed block-based algorithm. 098121926 Form No. A0101 Page 13 of 25 0982037268-0 201101235 [0043] The present invention also ends the estimation of the movement of the macroblock in advance by setting a threshold value, which can improve the estimation efficiency and reduce the estimation error. [0044] The 'absolute error summation value estimation system and method can be compatible with any block matching based motion estimation algorithm. For any video discretion technique, as long as the block search is based on the mobile search algorithm. In the middle and using SAD as a matching condition, various motion estimation methods used in technologies such as η.264, MPEG4, etc. can be applied. [0045] In summary, the present invention complies with the requirements of the invention patent, and submits a patent application according to law. However, the above description is only a preferred embodiment of the invention, and equivalent modifications or variations made by those skilled in the art will be covered by the following claims. BRIEF DESCRIPTION OF THE DRAWINGS [FIG. 1] FIG. 1 is a block diagram showing a preferred embodiment of the absolute error total value estimation system of the present invention. 2 is a schematic diagram of the block partitioning module of FIG. 1 dividing a macroblock into a plurality of sub-blocks. 3 is a schematic diagram of a macroblock in FIG. 2. 4 is a schematic diagram of a sub-block of FIG. 2. 5 is a schematic diagram of a search area corresponding to the macro block in FIG. 2. 6 is a fish diagram of a candidate block of the search area in FIG. 5. 7 is a flow chart of a preferred embodiment of the method for estimating the absolute error sum value of the present invention. [Main component symbol description] 098121926 Form No. A0101 Page 14/Total 25 page 0982037268-0 Absolute error sum 1 Block division module 10 Value estimation system search comparison module 20 Operation module 30 Judgment module 40 Macro block 100 Search area 200 Candidates Block 210, 220 Image 101 '211 ' Sample point 102 221 Sub-block SMB1-SMB9 201101235 Ο

098121926 表單編號Α0101 第15頁/共25頁 0982037268-0098121926 Form No. Α0101 Page 15 of 25 0982037268-0

Claims (1)

201101235 七、申請專利範圍: 1 . 一種絕對誤差總和值估算系統,用於估算一當前晝面的一 巨集方塊相對於一參考畫面的一候選區塊的絕對誤差總和 值,該巨集方塊與該候選區塊的像點數相等,該巨集方塊 包括複數子方塊,該絕對誤差總和值估算系統包括一搜尋 比較模塊及一運算模塊,該搜尋比較模塊用於在每一子方 塊中選擇複數像點作為取樣點,並在該候選區塊中尋找與 每一取樣點的像點值最接近的一像點,該運算模塊將每一 取樣點的像點值與該候選區塊中對應像點的像點值之差取 絕對值以得到每一取樣點的絕對誤差值,並計算每一子方 塊中的所有取樣點的絕對誤差值的平均值,該運算模塊將 該平均值與對應的子方塊中的所有像點的數量相乘以得到 每一子方塊的子絕對誤差總和值,並將該巨集方塊中的所 有子方塊的子絕對誤差總和值相加以得到該巨集方塊的絕 對誤差總和值。 2 .如申請專利範圍第1項所述之絕對誤差總和值估算系統, 其中該等子方塊是透過一區塊劃分模塊對該巨集方塊劃分 而成的,該取樣點為對應子方塊中的所有像點的一部分。 3 .如申請專利範圍第1項所述之絕對誤差總和值估算系統, 其中該巨集方塊包括9個子方塊,該9個子方塊在該巨集方 塊中以三排三列的方式排列。 4 .如申請專利範圍第1項所述之絕對誤差總和值估算系統, 其中該當前畫面與該參考晝面為一動態影像中連續播放的 兩畫面。 5 . —種絕對誤差總和值估算方法,用於估算一當前畫面的一 098121926 表單編號A0101 第16頁/共25頁 0982037268-0 201101235 巨集方塊的絕對誤差總和值以對該巨集方塊進行移動估算 ,該巨集方塊包括複數子方塊,該絕對誤差總和值估算方 法包括以下步驟: 一搜尋比較模塊選擇每一子方塊中的部分像點作為取樣點 該搜哥比較模塊在一候選區塊中尋找與每一取樣點的像點 值最接近的一像點,該候選區塊為在一參考畫面中與該巨 集方塊具有相等數量的像點的一區塊;201101235 VII. Patent application scope: 1. An absolute error summation value estimation system for estimating the sum of absolute errors of a macroblock of a current pupil relative to a candidate block of a reference picture, the macroblock and The candidate block has the same number of image points, and the macro block includes a plurality of sub-blocks. The absolute error sum value estimation system includes a search comparison module and an operation module, and the search comparison module is configured to select a complex number in each sub-block. The image point is used as a sampling point, and an image point closest to the image point value of each sampling point is found in the candidate block, and the operation module compares the image point value of each sampling point with the corresponding image in the candidate block. The difference between the image point values of the points takes an absolute value to obtain an absolute error value of each sampling point, and calculates an average value of absolute error values of all sampling points in each sub-block, and the arithmetic module compares the average value with the corresponding The number of all image points in the sub-block is multiplied to obtain the sum of the sub-absolute errors of each sub-block, and the sum of the sub-absolute errors of all the sub-blocks in the macro-block is Macro block to obtain the absolute value error sum. 2. The system for estimating an absolute error sum value according to claim 1, wherein the sub-blocks are divided by the block division module, and the sampling points are in the corresponding sub-blocks. All part of the like point. 3. The absolute error sum value estimation system according to claim 1, wherein the macro block comprises 9 sub-blocks arranged in three rows and three columns in the macro block. 4. The system for estimating an absolute error sum value according to claim 1, wherein the current picture and the reference picture are two pictures continuously played in a motion picture. 5 . A method for estimating the sum of absolute errors, which is used to estimate a sum of absolute errors of a macro block by a 098121926 form number A0101 page 16 / 25 pages 0982037268-0 201101235 of a current picture to move the macro block Estimating that the macroblock includes a plurality of sub-blocks, and the absolute error sum value estimation method comprises the following steps: a search comparison module selects a partial image point in each sub-block as a sampling point. The search comparison module is in a candidate block. Finding an image point closest to the image point value of each sampling point, the candidate block being a block having an equal number of image points with the macro block in a reference picture; 一運算模塊計算每一取樣點相對於其最接近的像點的像點 值的絕對誤差值; 該運算模塊計算每一子方塊中的所有取樣點的絕對誤差值 的平均值,並將該平均值與對應的子方塊中的像點的個數 相乘’以得到對應子方塊的子絕對誤差總和值; 該運算模塊將所有子方塊的子絕對誤差值相加以得到該巨 集方塊的絕對誤差總和值;以及 一判斷模塊判斷該巨集方塊的m對誤差總和值與一臨界值 的關係,當該絕對誤差總和值小於該臨界值時,結束對該An arithmetic module calculates an absolute error value of an image point value of each sampling point relative to its closest image point; the operation module calculates an average value of absolute error values of all sampling points in each sub-block, and averages the average The value is multiplied by the number of image points in the corresponding sub-block to obtain the sum of the sub-absolute errors of the corresponding sub-block; the arithmetic module adds the sub-absolute error values of all the sub-blocks to obtain the absolute error of the macro-block a sum value; and a judging module determining a relationship between the m-to-error sum value of the macro block and a threshold value, and when the absolute error sum value is less than the threshold value, ending the 巨集方塊的移動估算。 4… 6 .如申請專利範圍第5項所述之絕對誤差總和值估算方法, 其中該判斷模塊是透過將該絕對誤差總和值設為〇的方式 結束該巨集方塊的移動估算的。 γ .如申請專利範圍第5項所述之絕對誤差總和值估算方法, 其中該等子方塊是對該巨集方塊以“九宮格”的方式劃分 而成的第一至第九子方塊。 8 .如申請專利範圍第7項所述之絕對誤差總和值估算方法, 其中該搜尋比較模塊是依次在該第一至第九子方塊中選擇 098121926 表單編號Α0101 第17頁/共25頁 0982037268-0 201101235 取樣點,以使該運算模塊依次計算第一至第九子方塊中所 有取樣點的絕對誤差值的平均值的。 9 .如申請專利範圍第5項所述之絕對誤差總和值估算方法, 其中該搜尋比較模塊是將每一取樣點的像點值與該候選區 塊中的所有像點的像點值進行比較之後而得到與每一取樣 點的像點值最接近的像點的。 098121926 表單編號A0101 第18頁/共25頁 0982037268-0The estimation of the movement of the macro block. 4: 6. The absolute error sum value estimation method according to claim 5, wherein the judging module ends the movement estimation of the macro block by setting the absolute error sum value to 〇. γ. The method for estimating the sum of absolute error values as recited in claim 5, wherein the sub-blocks are first to ninth sub-blocks divided into a "nine-square grid" manner for the macro block. 8. The method for estimating an absolute error sum value according to claim 7, wherein the search comparison module sequentially selects 098121926 in the first to ninth sub-blocks, form number Α 0101, page 17 / total 25 pages 0982037268- 0 201101235 Sampling points, so that the arithmetic module sequentially calculates the average of the absolute error values of all the sampling points in the first to ninth sub-blocks. 9. The method for estimating an absolute error sum value according to claim 5, wherein the search comparison module compares a pixel value of each sampling point with a pixel value of all image points in the candidate block. Then, the image point closest to the pixel value of each sampling point is obtained. 098121926 Form No. A0101 Page 18 of 25 0982037268-0
TW98121926A 2009-06-29 2009-06-29 System and method for estimating sum absolute difference TW201101235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98121926A TW201101235A (en) 2009-06-29 2009-06-29 System and method for estimating sum absolute difference

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98121926A TW201101235A (en) 2009-06-29 2009-06-29 System and method for estimating sum absolute difference

Publications (1)

Publication Number Publication Date
TW201101235A true TW201101235A (en) 2011-01-01

Family

ID=44836955

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98121926A TW201101235A (en) 2009-06-29 2009-06-29 System and method for estimating sum absolute difference

Country Status (1)

Country Link
TW (1) TW201101235A (en)

Similar Documents

Publication Publication Date Title
JP7252282B2 (en) Image prediction method and related device
JP5044568B2 (en) Motion estimation using predictive guided decimation search
US9351014B2 (en) Moving image encoding and decoding system
US8761254B2 (en) Image prediction encoding device, image prediction decoding device, image prediction encoding method, image prediction decoding method, image prediction encoding program, and image prediction decoding program
TWI376159B (en) Method for video coding
JP6636615B2 (en) Motion vector field encoding method, decoding method, encoding device, and decoding device
BRPI1000861A2 (en) intra-prediction method and apparatus for a group of samples in an image being encoded
EP3282701B1 (en) Prediction mode selection method, apparatus and device
RU2519525C2 (en) Motion vector predictive encoding method, motion vector predictive decoding method, moving picture encoding apparatus, moving picture decoding apparatus, and programmes thereof
CN108419082B (en) Motion estimation method and device
JP6394876B2 (en) Encoding circuit and encoding method
WO2012086829A1 (en) Movement estimation device, movement estimation method, movement estimation program, and video image encoding device
KR20110050480A (en) Method and system for determining a metric for comparing image blocks in motion compensated video coding
CN108810549B (en) Low-power-consumption-oriented streaming media playing method
CN107360433A (en) A kind of interframe prediction encoding method and device
JP2011010297A (en) System and method for estimating sum of absolute differences
WO2016131270A1 (en) Error concealment method and apparatus
TW201101235A (en) System and method for estimating sum absolute difference
JP6390275B2 (en) Encoding circuit and encoding method
US9549205B2 (en) Method and device for encoding video
TWI324482B (en) Algorithm of video coding
TWI825751B (en) Method and apparatuses for video encoding
KR101182037B1 (en) Apparatus and method for high precision motion estimation in video signal
KR101610028B1 (en) Method and apparatus for fast motion estimation and video encoding apparatus using the same
KR101074919B1 (en) Apparatuses and methods of decoding distributed video coded video