TWI499283B - Video compression method and device - Google Patents

Video compression method and device Download PDF

Info

Publication number
TWI499283B
TWI499283B TW101124167A TW101124167A TWI499283B TW I499283 B TWI499283 B TW I499283B TW 101124167 A TW101124167 A TW 101124167A TW 101124167 A TW101124167 A TW 101124167A TW I499283 B TWI499283 B TW I499283B
Authority
TW
Taiwan
Prior art keywords
macroblock
pixel block
current
output
motion vector
Prior art date
Application number
TW101124167A
Other languages
Chinese (zh)
Other versions
TW201404157A (en
Inventor
Fan Di Jou
Shi Jay Chen
Chih Hao Chang
Original Assignee
Ind Tech Res Inst
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 Ind Tech Res Inst filed Critical Ind Tech Res Inst
Priority to TW101124167A priority Critical patent/TWI499283B/en
Priority to CN201210276252.8A priority patent/CN103533375B/en
Publication of TW201404157A publication Critical patent/TW201404157A/en
Application granted granted Critical
Publication of TWI499283B publication Critical patent/TWI499283B/en

Links

Description

視訊壓縮方法與視訊壓縮裝置Video compression method and video compression device

本發明係揭露一種視訊壓縮方法與視訊壓縮裝置。The invention discloses a video compression method and a video compression device.

視訊壓縮包括一畫面間預測(inter prediction)技術。畫面間預測包括:尋出一當前畫面與一參考畫面之間的變化(例如,移動向量/motion vector),再根據移動向量自該參考畫面估算出一預測畫面。準確的預測畫面會使得該當前畫面與該預測畫面之間的差值(residues)資料量極小-所討論之視訊壓縮即是壓縮此差值。Video compression includes an inter prediction technique. Inter-picture prediction includes: finding a change between a current picture and a reference picture (for example, a motion vector/motion vector), and estimating a prediction picture from the reference picture according to the motion vector. Accurate prediction of the picture will result in a very small amount of data between the current picture and the predicted picture - the video compression in question is to compress the difference.

由上述內容可知,視訊壓縮的效果取決於預測畫面的準確度,而預測畫面的準確度又受移動向量估算技術影響。關於欲編碼的一圖樣之移動向量估算,通常需先在參考畫面中搜尋相似圖樣。參考畫面中關於相似圖樣的搜尋起點之設定可能會顯著影響視訊壓縮效果。It can be seen from the above that the effect of video compression depends on the accuracy of the predicted picture, and the accuracy of the predicted picture is affected by the motion vector estimation technique. Regarding the motion vector estimation of a pattern to be encoded, it is usually necessary to search for a similar pattern in the reference picture. The setting of the search starting point for similar patterns in the reference picture may significantly affect the video compression effect.

一種視訊壓縮方法與裝置。A video compression method and device.

根據一種實施方式所實現的視訊壓縮方法包括:提取一當前宏塊的複數個參考移動向量,該等參考移動向量係由該當前宏塊之參考宏塊內至少兩種尺寸之像素區塊所提供;自該等參考移動向量辨識出一中位值移動向量,並根據該中位值移動向量設定一相似宏塊搜尋起點;根據該相似宏塊搜尋起點於一參考畫面起始搜尋該當前宏塊的一最 相似宏塊;以及根據搜尋到的該最相似宏塊與該當前宏塊,求得該當前宏塊的移動向量供視訊壓縮使用。A video compression method implemented according to an embodiment includes: extracting a plurality of reference motion vectors of a current macroblock, where the reference motion vectors are provided by pixel blocks of at least two sizes within a reference macroblock of the current macroblock. Recognizing a median value motion vector from the reference motion vectors, and setting a similar macroblock search starting point according to the median value motion vector; searching for the current macroblock starting from a reference picture according to the similar macroblock search starting point One of the most And a similar macroblock; and determining, according to the most similar macroblock found and the current macroblock, a motion vector of the current macroblock for video compression use.

根據一種實施方式實現的一視訊壓縮裝置包括:一記憶單元以及一移動偵測模組。該記憶單元儲存一參考畫面、以及一當前畫面中一當前宏塊的複數個參考移動向量。該等參考移動向量係由該當前宏塊之參考宏塊內至少兩種尺寸之像素區塊所提供。該移動偵測模組係自該記憶單元提取該當前宏塊的該等參考移動向量,且自該等參考移動向量辨識出一中位值移動向量以根據該中位值移動向量設定一相似宏塊搜尋起點。根據該相似宏塊搜尋起點,該移動偵測模組於該記憶單元所儲存的該參考畫面起始搜尋該當前宏塊的一最相似宏塊,且根據搜尋到的該最相似宏塊與當前宏塊求得移動向量供視訊壓縮使用。A video compression device implemented according to an embodiment includes: a memory unit and a motion detection module. The memory unit stores a reference picture and a plurality of reference motion vectors of a current macroblock in the current picture. The reference motion vectors are provided by pixel blocks of at least two sizes within the reference macroblock of the current macroblock. The motion detection module extracts the reference motion vectors of the current macroblock from the memory unit, and recognizes a median value motion vector from the reference motion vectors to set a similar macro according to the median value motion vector. Block search starting point. And searching, according to the similar macroblock search starting point, the motion detection module to search for a most similar macroblock of the current macroblock in the reference picture stored by the memory unit, and according to the most similar macroblock and the current searched The macroblock obtains the motion vector for video compression.

為使本發明之上述目的、特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式,詳細說明如下。The above described objects, features and advantages of the present invention will become more apparent from the description of the appended claims.

第1圖以方塊圖圖解視訊壓縮裝置的一種實施方式,其中應用畫面間預測(inter-prediction)以及畫面內預測(intra-prediction)兩種技術,以下特別說明畫面間預測技術。1 is a block diagram illustrating an embodiment of a video compression apparatus in which inter-prediction and intra-prediction techniques are applied, and inter-picture prediction techniques are specifically described below.

如圖所示,一移動偵測(motion estimation)模組102自一記憶單元104提取關於一當前畫面以及一參考畫面之資訊,以作移動向量(motion vector)估算。移動偵測模組102之輸出會供應給一移動補償(motion compensation)模組106,使之對該參考畫面之資訊作移動補償,實現畫面間預 測。該移動補償模組106所產生的一預測畫面108將與當前畫面作比較,兩者間的差值(residues)110經轉換、量化後,可更經掃描排序(reorder)以及熵值編碼(entropy encoder)傳送至網路提取層(NAL)。所揭露技術係對該移動偵測模組102作特殊設計,其中對相似宏塊搜尋起點(Initial Search Point,ISP)之設定有特別設計。As shown, a motion estimation module 102 extracts information about a current picture and a reference picture from a memory unit 104 for motion vector estimation. The output of the motion detection module 102 is supplied to a motion compensation module 106 for motion compensation of the information of the reference picture to achieve inter-picture pre-preparation. Measurement. A prediction picture 108 generated by the motion compensation module 106 will be compared with the current picture, and the difference 110 between the two will be converted and re-encoded and entropy encoded (entropy). The encoder is transferred to the network abstraction layer (NAL). The disclosed technology is specially designed for the motion detection module 102, wherein the setting of a similar macro search point (ISP) is specially designed.

第1圖所示內容可以系統單晶片(Soc)方式實現、或由電腦系統/微控制器執行程式以實現之,或者,也可以硬體電路方式實現以製作為晶片。The content shown in Fig. 1 can be implemented in a system single chip (Soc) mode, or can be implemented by a computer system/microcontroller, or can be implemented as a chip in a hardware circuit.

第2圖舉例定義一相似宏塊搜尋起點(ISP)。在當前畫面202中,當前欲編碼的宏塊(稱為當前宏塊)標示為CurMB。所謂移動偵測為自一參考畫面204尋出與當前宏塊CurMB最相似的一最相似宏塊BestMatchedMB。在局部區域搜尋(partial search)的實施方式中,需設定一相似宏塊搜尋起點ISP,自該相似宏塊搜尋起點ISP起始一局部搜尋區域206內的相似宏塊搜尋操作。倘若相似宏塊搜尋起點ISP設定錯誤,所對應的局部搜尋區域將不涵括該最相似宏塊BestMatchedMB,移動偵測的效果會大受影響。根據所揭露技術,相似宏塊搜尋起點ISP之設定將更準確。Figure 2 illustrates an example of a similar macroblock search starting point (ISP). In the current picture 202, the macroblock currently to be encoded (referred to as the current macroblock) is labeled as CurMB. The so-called motion detection is to find a most similar macroblock BestMatchedMB which is most similar to the current macroblock CurMB from a reference picture 204. In a partial local search implementation, a similar macroblock search starting point ISP is set to initiate a similar macroblock search operation within a local search area 206 from the similar macroblock search starting point ISP. If the ISP setting of the similar macroblock search starting point is wrong, the corresponding local search area will not cover the most similar macroblock BestMatchedMB, and the effect of motion detection will be greatly affected. According to the disclosed technique, the setting of the similar macroblock search starting point ISP will be more accurate.

關於一當前宏塊CurMB,第3圖圖解其移動偵測之相似宏塊搜尋起點ISP設定所需要的資訊。圖中為當前宏塊CurMB定義多個參考宏塊,包括:位於當前宏塊CurMB 左側的參考宏塊Left;位於當前宏塊CurMB上方的參考宏塊Upper;以及位於當前宏塊CurMB右上方的參考宏塊UpperRight。Regarding a current macroblock CurMB, FIG. 3 illustrates the information required for the ISP setting of the similar macroblock search starting point for motion detection. The figure defines multiple reference macroblocks for the current macroblock CurMB, including: located in the current macroblock CurMB The reference macroblock Left on the left; the reference macroblock Upper located above the current macroblock CurMB; and the reference macroblock UpperRight located at the upper right of the current macroblock CurMB.

參考宏塊Left可有多種像素區塊劃分方式,其移動向量(motion vectors)皆可用作該當前宏塊CurMB的參考移動向量,包括:●16x16尺寸之像素區塊所提供的參考移動向量MV_L16x16;●右半部8x16尺寸之像素區塊所提供的參考移動向量MV_L_R8x16;●下半部16x8尺寸之像素區塊所提供的參考移動向量MV_L_D16x8;以及●上半部16x8尺寸之像素區塊所提供的參考移動向量MV_L_U16x8。The reference macroblock Left may have multiple pixel block division modes, and its motion vectors may be used as the reference motion vector of the current macroblock CurMB, including: ● The reference motion vector MV_L16x16 provided by the pixel block of 16×16 size ; ● The right half of the 8x16 size pixel block provides the reference motion vector MV_L_R8x16; ● the lower half of the 16x8 size pixel block provides the reference motion vector MV_L_D16x8; and ● the upper half of the 16x8 size pixel block provides The reference movement vector MV_L_U16x8.

參考宏塊Upper可有多種像素區塊劃分方式,其移動向量皆可用作該當前宏塊CurMB的參考移動向量,包括:●16x16尺寸之像素區塊所提供的參考移動向量MV_U16x16;以及●下半部16x8尺寸之像素區塊所提供的參考移動向量MV_U_D16x8。The reference macroblock Upper may have multiple pixel block division modes, and its motion vector may be used as the reference motion vector of the current macroblock CurMB, including: ● a reference motion vector MV_U16x16 provided by a 16x16 size pixel block; and ● The reference motion vector MV_U_D16x8 provided by the half 16x8 size pixel block.

參考宏塊UpperRight可有多種像素區塊劃分方式,其移動向量皆可用作該當前宏塊CurMB的參考移動向量,包括:●16x16尺寸之像素區塊所提供的參考移動向量 MV_UR16x16;以及●下半部16x8尺寸之像素區塊所提供的參考移動向量MV_UR_D16x8。The reference macroblock UpperRight can have multiple pixel block division modes, and its motion vector can be used as the reference motion vector of the current macroblock CurMB, including: ● reference motion vector provided by the pixel block of 16x16 size MV_UR16x16; and ● The reference movement vector MV_UR_D16x8 provided by the lower half of the 16x8 size pixel block.

以上參考移動向量亦可暫存在第1圖記憶單元104中供移動偵測模組102提取使用。The above reference motion vector may also be temporarily stored in the memory unit 104 of FIG. 1 for use by the motion detection module 102.

根據當前宏塊CurMB於一當前畫面之所在位置不同,其移動偵測可參照的參考移動向量數量可能會有變動。以下參照第4圖舉例說明之。Depending on where the current macroblock CurMB is located at a current picture, the number of reference motion vectors that can be referenced by motion detection may vary. This will be exemplified below with reference to Fig. 4.

狀況一,當前宏塊CurMB為當前畫面左上角第一個宏塊402。此時,當前宏塊CurMB之移動向量(motion vector)可設定為0值。In the first case, the current macroblock CurMB is the first macroblock 402 in the upper left corner of the current picture. At this time, the motion vector of the current macroblock CurMB can be set to a value of zero.

狀況二,當前宏塊CurMB位於當前畫面之上邊際區域404。此時,當前宏塊CurMB可以左側之宏塊(第3圖標號Left所示意之宏塊)作參考宏塊。一種實施方式係令該當前宏塊CurMB之移動偵測可參照第3圖所定義的四個參考移動向量:MV_L16x16、MV_L_R8x16、MV_L_D16x8以及MV_L_U16x8。In the second case, the current macroblock CurMB is located in the marginal area 404 above the current picture. At this time, the current macroblock CurMB can be used as a reference macroblock by the macroblock on the left side (the macroblock indicated by the third icon number Left). One embodiment is such that the motion detection of the current macroblock CurMB can refer to the four reference motion vectors defined in FIG. 3: MV_L16x16, MV_L_R8x16, MV_L_D16x8, and MV_L_U16x8.

狀況三,當前宏塊CurMB位於當前畫面之左邊際區域406。此時,當前宏塊CurMB可以其上方與右上方之宏塊(第3圖標號Upper與UpperRight所示意之宏塊)作參考宏塊。 一種實施方式係令該當前宏塊CurMB之移動偵測可參照第3圖所定義的四個參考移動向量:MV_U16x16、MV_U_D16x8、MV_UR16x16以及MV_UR_D16x8。In the third case, the current macroblock CurMB is located in the left side area 406 of the current picture. At this time, the current macroblock CurMB can be used as a reference macroblock for the macroblock above it and the upper right macroblock (the third icon number Upper and UpperRight). One embodiment is such that the motion detection of the current macroblock CurMB can refer to the four reference motion vectors defined in FIG. 3: MV_U16x16, MV_U_D16x8, MV_UR16x16, and MV_UR_D16x8.

狀況四,當前宏塊CurMB位於當前畫面之右邊際區域408。此時,當前宏塊CurMB可以其左側與上方之宏塊(第3圖標號Left與Upper所示意之宏塊)作參考宏塊。一種實施方式係令該當前宏塊CurMB之移動偵測可參照第3圖所定義的四個參考移動向量:MV_L16x16、MV_L_R8x16、MV_U16x16以及MV_U_D16x8。In the fourth case, the current macroblock CurMB is located in the right side region 408 of the current picture. At this time, the current macroblock CurMB can be used as a reference macroblock for the macroblocks on the left and above (the macroblocks indicated by the third icon numbers Left and Upper). One embodiment is such that the motion detection of the current macroblock CurMB can refer to the four reference motion vectors defined in FIG. 3: MV_L16x16, MV_L_R8x16, MV_U16x16, and MV_U_D16x8.

狀況五,當前宏塊CurMB位於當前畫面之非邊際區域410。此時,當前宏塊CurMB可以其左側、上方與右上方之宏塊(第3圖標號Left、Upper與UpperRight所示意之宏塊)作參考宏塊。一種實施方式係令該當前宏塊CurMB之移動偵測可參照第3圖所定義的六個參考移動向量:MV_L16x16、MV_L_R8x16、MV_L_D16x8、MV_U16x16、MV_U_D16x8以及MV_UR16x16。In the fifth case, the current macroblock CurMB is located in the non-marginal region 410 of the current picture. At this time, the current macroblock CurMB can be used as a reference macroblock for the macroblocks on the left, upper, and upper right sides (the macroblocks indicated by the third icon numbers Left, Upper, and UpperRight). One embodiment is such that the motion detection of the current macroblock CurMB can refer to the six reference motion vectors defined in FIG. 3: MV_L16x16, MV_L_R8x16, MV_L_D16x8, MV_U16x16, MV_U_D16x8, and MV_UR16x16.

以上所介紹之參考移動向量設計將使得相似宏塊搜尋起點ISP之設定將更準確。特別說明之,以上敘述並不意圖限定各狀況的參考移動向量數量或詳細採用狀況。凡是自該當前宏塊之參考宏塊內至少兩種尺寸之像素區塊取得參考移動向量的技術皆與本案相關。The reference motion vector design described above will make the setting of the similar macroblock search starting point ISP more accurate. In particular, the above description is not intended to limit the number of reference motion vectors or the detailed adoption conditions for each situation. The techniques for obtaining the reference motion vector from at least two pixel blocks of the reference macroblock of the current macroblock are all related to the present case.

第5圖以流程圖整理所揭露的影像壓縮方法中關於一當前宏塊(如第2圖標號CurMB)之移動偵測。步驟S502提取該當前宏塊的複數個參考移動向量;該等參考移動向量係由該當前宏塊之參考宏塊內至少兩種尺寸之像素區塊所提供-可參照前述多種狀況有多種來源。步驟S504自該等 參考移動向量辨識出一中位值移動向量,並根據該中位值移動向量設定一相似宏塊搜尋起點(如第2圖標號ISP)。步驟S506根據該相似宏塊搜尋起點(ISP)於一參考畫面起始搜尋該當前宏塊的一最相似宏塊(如第2圖標號BestMatchedMB)。步驟S508係根據搜尋到的該最相似宏塊(BestMatchedMB)與該當前宏塊求得該當前宏塊的移動向量(motion vector),供視訊壓縮使用。FIG. 5 is a flow chart illustrating the motion detection of a current macroblock (such as the second icon number CurMB) in the image compression method disclosed. Step S502 extracts a plurality of reference motion vectors of the current macroblock; the reference motion vectors are provided by pixel blocks of at least two sizes in the reference macroblock of the current macroblock - and may have multiple sources according to the foregoing various conditions. Step S504 from such The reference motion vector identifies a median value motion vector, and sets a similar macroblock search starting point (such as the second icon number ISP) according to the median value motion vector. Step S506 searches for a most similar macroblock of the current macroblock (such as the second icon number BestMatchedMB) according to the similar macroblock search starting point (ISP) starting from a reference picture. Step S508: Obtain a motion vector of the current macroblock according to the searched most similar macroblock (BestMatchedMB) and the current macroblock, for video compression use.

特別聲明之,以上相似宏塊搜尋起點(ISP)並不限定應用在第2圖所示之局部區域搜尋技術。第6A圖所示之三步驟搜尋(three step search)、第6B圖所示之菱形搜尋(diamond search)、第6C圖所示之六角搜尋(hexagonal search)亦可採用所揭露之技術設定其最相似宏塊搜尋起點ISP。In particular, the above similar macroblock search starting point (ISP) does not limit the local area search technique applied in FIG. The three step search shown in FIG. 6A, the diamond search shown in FIG. 6B, and the hexagonal search shown in FIG. 6C can also be set using the disclosed technique. Similar macroblock search starting point ISP.

關於以上狀況二~狀況四所列舉實施例,一當前宏塊參照的參考移動向量數量為4。第7圖圖解一中位值向量估算設計Median-of-4,針對狀況二~狀況四所列舉實施例實現第5圖步驟S504-自四個參考移動向量辨識出中位值移動向量。Regarding the above-mentioned second to fourth embodiment, the number of reference motion vectors referred to by a current macroblock is four. Fig. 7 illustrates a median value vector estimation design Median-of-4, and for the second embodiment of the situation, the implementation of the fifth embodiment, step S504, identifies the median value motion vector from the four reference motion vectors.

中位值向量估算設計Median-of-4包括兩個比較器cmp1以及cmp2,其中反覆利用此兩個比較器cmp1以及cmp2,以完成多個移動向量之大小排序。各比較器(cmp1或cmp2)負責比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者。如第7圖所 示,第一輪操作Cycle1中,比較器cmp1辨識出兩輸入A與B中較大者Max(A,B)與較小者Min(A,B),且比較器cmp2辨識出兩輸入C與D中較大者Max(C,D)與較小者Min(C,D)。第二輪操作Cycle2會再次使用比較器cmp1與cmp2:數值Max(A,B)與數值Max(C,D)再作比較,求得數值A~D中最大值者Max(A,B,C,D)與一第一中位值者702;並且,數值Min(A,B)與數值Min(C,D)再作比較,求得數值A~D中最小值者Min(A,B,C,D)與一第二中位值者704。該第一以及該第二中位值702與704所對應的兩個參考移動向量之向量平均可被視為所揭露之中位值移動向量-參照步驟S504,用於設定上述相似宏塊搜尋起點(ISP)。The median vector estimate design Median-of-4 includes two comparators cmp1 and cmp2, which repeatedly use the two comparators cmp1 and cmp2 to complete the size ordering of multiple motion vectors. Each comparator (cmp1 or cmp2) is responsible for comparing the sizes of the two inputs, and outputs the larger one with a first output and the smaller one with a second output. As shown in Figure 7 In the first round of operation Cycle1, the comparator cmp1 recognizes the larger of the two inputs A and B, Max (A, B) and the smaller one, Min (A, B), and the comparator cmp2 recognizes the two inputs C and The larger of D is Max (C, D) and the smaller is Min (C, D). The second round of operation Cycle2 will use the comparators cmp1 and cmp2 again: the value Max(A, B) is compared with the value Max(C, D) to find the maximum value of the values A~D Max (A, B, C) , D) and a first median value 702; and, the value Min (A, B) is compared with the value Min (C, D), and the minimum value Min (A, B, of the values A to D is obtained. C, D) and a second median value 704. The vector average of the two reference motion vectors corresponding to the first and the second median values 702 and 704 can be regarded as the revealed median value motion vector - referring to step S504, for setting the similar macroblock search starting point described above. (ISP).

關於以上狀況五所列舉實施例,當前宏塊參照的參考移動向量數量為6。第8圖圖解一中位值向量估算設計Median-of-6,用於針對狀況五所列舉的實施例實現第5圖步驟S504-自六個參考移動向量辨識出中位值移動向量。Regarding the five enumerated embodiments of the above situation, the number of reference motion vectors referred to by the current macroblock is 6. Figure 8 illustrates a median value vector estimation design Median-of-6 for implementing the fifth embodiment of step S504 for the embodiment listed in Condition 5 - identifying the median value motion vector from the six reference motion vectors.

中位值向量估算設計Median-of-6同樣是反覆利用兩個比較器cmp1以及cmp2完成多個移動向量之大小排序。在第一輪以及第二輪操作Cycle1與Cycle2中,比較器cmp1與cmp2採第7圖之中位值向量估算設計Median-of-4操作,辨識出數值A~D中的最大值者Max(A:D)、最小值者Min(A:D)與兩中位值者802、804。第三輪操作Cycle3再次使用比較器cmp1與cmp2:數值Max(A:D)與數值E比較,得出較大者Max(A:D,E)與較小者806;並且,數值Min(A:D) 與數值F比較,得出較小者Min(A:D,F)與較大者808。接著,第四輪與第五輪操作Cycle4與Cycle5再次使用中位值向量估算設計Median-of-4,辨識出輸入802、804、806與808中的兩個中位值810與812-亦即六個數值A~F間中間大小的兩個數值。中位值810與812對應的兩參考移動向量之向量平均可被視為所揭露之中位值移動向量。參照步驟S504,用於設定上述相似宏塊搜尋起點(ISP)。The median vector estimation design Median-of-6 also repeats the size ordering of multiple motion vectors by using the two comparators cmp1 and cmp2. In the first and second rounds of operation Cycle1 and Cycle2, the comparators cmp1 and cmp2 use the bit value vector estimation design Median-of-4 operation in Fig. 7, and identify the maximum value Max of the values A~D ( A: D), the minimum value Min (A: D) and the two median values 802, 804. The third round of operation Cycle3 uses the comparators cmp1 and cmp2 again: the value Max(A:D) is compared with the value E to obtain the larger Max(A:D, E) and the smaller one 806; and, the value Min(A) :D) Comparing with the value F, the smaller Min(A:D,F) and the larger 808 are obtained. Next, the fourth and fifth rounds of operation Cycle4 and Cycle5 again use the median vector vector to estimate the design Median-of-4, identifying the two median values 810 and 812 of the inputs 802, 804, 806 and 808. Two values of the intermediate value between the six values A~F. The vector average of the two reference motion vectors corresponding to the median values 810 and 812 can be considered as the revealed median value motion vector. Referring to step S504, it is used to set the similar macroblock search starting point (ISP).

第7圖與第8圖並非意圖限定中位值向量估算於圖中所示之設計。任何得以辨識中位值向量的設計皆可被套用。Figures 7 and 8 are not intended to limit the median value vector to the design shown in the figure. Any design that recognizes the median vector can be applied.

另外,參考移動向量之數量與來源並不限定以上所述實施方式。以下以數量為例。關於數量較少的參考移動向量-如,3個,使用者可令第7圖之中位值向量估算設計Median-of-4的一個輸入為極大值或極小值,以將該設計Median-of-4修正為對三個輸入作排序。或者,若參考移動向量數目為5個,則使用者可令第8圖之中位值向量估算設計Median-of-6的一個輸入為極大值或極小值,以將該設計Median-of-6修正為對五個輸入作排序。In addition, the number and source of reference motion vectors are not limited to the embodiments described above. The following is an example of quantity. With regard to a small number of reference motion vectors - for example, three, the user can estimate the value of the bit value vector in Fig. 7 to design an input of Median-of-4 to a maximum or minimum value to design the Median-of The -4 correction is to sort the three inputs. Alternatively, if the number of reference motion vectors is five, the user can estimate the input of the bit value vector in FIG. 8 to design an input of Median-of-6 to a maximum value or a minimum value to design the Median-of-6. Fixed to sorting the five inputs.

第9圖圖解一種搜尋方法,用以在第2圖之局部搜尋區域206中根據路徑指示902尋出最相似宏塊BestMatchedMB。Figure 9 illustrates a search method for finding the most similar macroblock BestMatchedMB in accordance with the path indication 902 in the local search area 206 of Figure 2.

一種實施方式係定義一評價值cost_value,其中,cost_value=SAD+f(QP).MV, SAD為像素資料的絕對差值和,f(QP)為量化參數QP的一函式,MV為移動向量之位元表示。One embodiment defines an evaluation value cost_value, where cost_value=SAD+f(QP). MV, SAD is the absolute difference sum of the pixel data, f(QP) is a function of the quantization parameter QP, and MV is the bit representation of the motion vector.

沿著路徑指示902所取得的宏塊ComMB的各種尺寸劃分(例如,一16X16像素區塊、或上半部之16x8像素區塊、或下半部之16x8像素區塊、或左半部之8x16像素區塊、或右半部之8x16像素區塊、或十六區的4x4像素區塊、或四區的8x8像素區塊、或8區的4x8像素區塊、或8區的8x4像素區塊)都需進行上述評價值cost_value估算。一種實施方式係針不同尺寸劃分提供專屬比較器,使各尺寸最低評價值cost_value者所屬宏塊之移動向量得以紀錄在暫存器中。各尺寸的最低評價值cost_value彼此會再作比較;基於最低值者所對應的暫存器內儲存的移動向量,即可尋得最相似宏塊BestMatchedMB。Various sizes of macroblocks ComMB taken along path indication 902 (eg, a 16×16 pixel block, or a 16x8 pixel block in the upper half, or a 16x8 pixel block in the lower half, or 8x16 in the left half) a pixel block, or an 8x16 pixel block in the right half, or a 4x4 pixel block in a 16-segment, or an 8x8 pixel block in a four-region, or a 4x8 pixel block in an 8-region, or an 8x4 pixel block in an 8-region ) The above evaluation value cost_value estimation is required. In one embodiment, the different sizes of the pins are provided to provide a dedicated comparator, so that the motion vector of the macroblock to which the lowest evaluation value cost_value of each dimension belongs is recorded in the temporary register. The lowest evaluation value cost_value of each size will be compared with each other; based on the motion vector stored in the temporary register corresponding to the lowest value, the most similar macroblock BestMatchedMB can be found.

雖然本發明已以多個實施例揭露如上,然其並非用以限定本發明,任何熟悉此項技藝者,在不脫離本發明之精神和範圍內,當可做些許更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。The present invention has been disclosed in the above embodiments in various embodiments, and is not intended to limit the invention, and the present invention may be modified and modified without departing from the spirit and scope of the invention. The scope of protection is subject to the definition of the scope of the patent application.

102‧‧‧移動偵測模組102‧‧‧Motion detection module

104‧‧‧記憶單元104‧‧‧ memory unit

106‧‧‧移動補償模組106‧‧‧Moving compensation module

108‧‧‧預測畫面108‧‧‧ Forecast screen

110‧‧‧兩畫面間的差值110‧‧‧Difference between two screens

202‧‧‧當前畫面202‧‧‧ current picture

204‧‧‧參考畫面204‧‧‧Reference screen

206‧‧‧局部搜尋區域206‧‧‧Local search area

402‧‧‧當前畫面左上角第一個宏塊402‧‧‧The first macroblock in the upper left corner of the current screen

404‧‧‧當前畫面之上邊際區域404‧‧‧The marginal area above the current picture

406‧‧‧當前畫面之左邊際區域406‧‧‧The left side of the current picture

408‧‧‧當前畫面之右邊際區域408‧‧‧The right side of the current picture

410‧‧‧當前畫面之非邊際區域410‧‧‧The non-marginal area of the current picture

702、704‧‧‧數值A…D中兩中位值者702, 704‧‧‧Two median values in the values A...D

802、804、806、808‧‧‧數值A…F中四中位值者802, 804, 806, 808‧‧‧ four median values in the values A...F

810、812‧‧‧數值802、804、806、808中兩中位值者810, 812‧‧‧ values of the two median values of 802, 804, 806, 808

902‧‧‧路徑指示902‧‧‧Path indication

A…F‧‧‧數值A...F‧‧‧ values

cmp1、cmp2‧‧‧比較器Cmp1, cmp2‧‧‧ comparator

Cycle1…Cycle5‧‧‧第一…第五輪操作Cycle1...Cycle5‧‧‧First...Fifth Round Operation

ComMB‧‧‧沿著路徑指示902取樣的宏塊ComMB‧‧‧ Macroblocks sampled along path indication 902

CurMB‧‧‧當前宏塊CurMB‧‧‧ current macroblock

ISP‧‧‧相似宏塊搜尋起點ISP‧‧‧similar macroblock search starting point

Left‧‧‧當前宏塊CurMB左側的參考宏塊Left‧‧‧Reference macroblock on the left side of the current macroblock CurMB

BestMatchedMB‧‧‧最相似宏塊BestMatchedMB‧‧‧ most similar macroblock

Median-of-4‧‧‧四輸入的中位值向量估算設計Median-of-4‧‧‧ four-input median vector estimation design

Median-of-6‧‧‧六輸入的中位值向量估算設計Median-of-6‧‧‧ six-input median vector estimation design

MV_L16x16、MV_L_R8x16、MV_L_D16x8、 MV_L_U16x8、MV_U16x16、MV_U_D16x8、 MV_UR16x16、MV_UR_D16x8‧‧‧參考移動向量MV_L16x16, MV_L_R8x16, MV_L_D16x8, MV_L_U16x8, MV_U16x16, MV_U_D16x8, MV_UR16x16, MV_UR_D16x8‧‧‧ reference motion vector

Upper‧‧‧當前宏塊CurMB上方的參考宏塊Upper ‧‧Reference macroblock above the current macroblock CurMB

UpperRight‧‧‧當前宏塊CurMB右上方的參考宏塊UpperRight‧‧‧Reference macroblock at the top right of the current macroblock CurMB

第1圖以方塊圖圖解視訊壓縮裝置的一種實施方式;第2圖圖解相似宏塊搜尋起點(Initial Search Point,ISP)之定義;第3圖圖解當前宏塊CurMB移動偵測設定相似宏塊搜尋起點ISP時所需要的資訊;第4圖圖解一當前畫面的邊際劃分;第5圖以流程圖說明所揭露的影像壓縮方法中關於一當前宏塊之移動偵測;第6A圖、第6B圖、第6C圖分別圖解「三步驟搜尋(three step search)」、「菱形搜尋(diamond search)」以及「六角搜尋(hexagonal search)」技術;第7圖圖解一中位值向量估算設計Median-of-4;第8圖圖解一中位值向量估算設計Median-of-6;且第9圖圖解一種搜尋方法,用以在第2圖之局部搜尋區域206中根據路徑指示902尋出最相似宏塊BestMatchedMB。1 is a block diagram illustrating one embodiment of a video compression device; FIG. 2 illustrates a definition of a similar macroblock search starting point (ISP); and FIG. 3 illustrates a current macroblock CurMB motion detection setting similar macroblock search. Information required for starting ISP; Figure 4 illustrates the marginal division of the current picture; Figure 5 is a flow chart illustrating the motion detection of a current macroblock in the image compression method disclosed; Figure 6A, Figure 6B Figure 6C illustrates the "three step search", "diamond search" and "hexagonal search" techniques respectively; Figure 7 illustrates a median value vector estimation design Median-of -4; Figure 8 illustrates a median vector estimation design Median-of-6; and Figure 9 illustrates a search method for finding the most similar macro based on the path indication 902 in the local search region 206 of Figure 2. Block BestMatchedMB.

S502…S508‧‧‧步驟S502...S508‧‧‧Steps

Claims (14)

一種視訊壓縮方法,包括:提取一當前宏塊的複數個參考移動向量,該等參考移動向量係由該當前宏塊之參考宏塊內至少兩種尺寸之像素區塊所提供;自該等參考移動向量辨識出一中位值移動向量,並根據該中位值移動向量設定一相似宏塊搜尋起點;根據該相似宏塊搜尋起點於一參考畫面起始搜尋該當前宏塊的一最相似宏塊;以及根據搜尋到之該最相似宏塊與該當前宏塊,求得該當前宏塊的移動向量供視訊壓縮使用。A video compression method includes: extracting a plurality of reference motion vectors of a current macroblock, wherein the reference motion vectors are provided by pixel blocks of at least two sizes in a reference macroblock of the current macroblock; The motion vector identifies a median value motion vector, and sets a similar macroblock search starting point according to the median value motion vector; searches for a most similar macro of the current macroblock starting from a reference picture according to the similar macroblock search starting point. And obtaining a motion vector of the current macroblock for video compression according to the most similar macroblock searched and the current macroblock. 如申請專利範圍第1項所述之視訊壓縮方法,其中,當該當前宏塊位於一當前畫面的上邊際區域時,該當前宏塊之參考宏塊位於該當前宏塊之左方、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、一8x16尺寸之像素區塊提供一第二參考移動向量、以及兩個16x8尺寸之像素區塊提供一第三以及一第四參考移動向量,該8x16尺寸之像素區塊緊鄰該當前宏塊,且上述兩個16x8尺寸之像素區塊組成該參考宏塊。The video compression method of claim 1, wherein when the current macroblock is located in an upper margin region of a current picture, the reference macroblock of the current macroblock is located to the left of the current macroblock, and is Providing a first reference motion vector, an 8x16 size pixel block providing a second reference motion vector, and two 16x8 size pixel blocks providing a third and a fourth reference in a 16x16 size pixel block Moving the vector, the 8x16 size pixel block is adjacent to the current macro block, and the two 16x8 size pixel blocks constitute the reference macro block. 如申請專利範圍第1項所述之視訊壓縮方法,其中,當該當前宏塊位於一當前畫面的左邊際區域時,該當前宏塊之參考宏塊包括一第一參考宏塊以及一第二參考宏塊,該第一參考宏塊位於該當前宏塊之上方、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、以及一16x8尺寸之像素區塊提供一第二參考移動向量,該第二 參考宏塊位於該當前宏塊之右上方、且係以其中一16x16尺寸之像素區塊提供一第三參考移動向量、以及一16x8尺寸之像素區塊提供一第四參考移動向量,該第一參考宏塊內的該16x8尺寸之像素區塊緊鄰該當前宏塊,且該第二參考宏塊內的該16x8尺寸之像素區塊屬於該第二參考宏塊之下半部。The video compression method of claim 1, wherein when the current macroblock is located in a left-hand region of a current picture, the reference macroblock of the current macroblock includes a first reference macroblock and a second a reference macroblock, the first reference macroblock is located above the current macroblock, and a 16x16-sized pixel block provides a first reference motion vector, and a 16x8-sized pixel block provides a second reference. Moving vector, the second The reference macroblock is located at the upper right of the current macroblock, and a pixel block of a 16x16 size provides a third reference motion vector, and a pixel block of a 16x8 size provides a fourth reference motion vector, the first The 16x8 sized pixel block within the reference macroblock is immediately adjacent to the current macroblock, and the 16x8 sized pixel block within the second reference macroblock belongs to the lower half of the second reference macroblock. 如申請專利範圍第1項所述之視訊壓縮方法,其中,當該當前宏塊位於一當前畫面的右邊際區域時,該當前宏塊之參考宏塊包括一第一參考宏塊以及一第二參考宏塊,該第一參考宏塊位於該當前宏塊之左側、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、以及一8x16尺寸之像素區塊提供一第二參考移動向量,該第二參考宏塊位於該當前宏塊之上方、且係以其中一16x16尺寸之像素區塊提供一第三參考移動向量、以及一16x8尺寸之像素區塊提供一第四參考移動向量,該第一參考宏塊內的該8x16尺寸之像素區塊緊鄰該當前宏塊,且該第二參考宏塊內的該16x8尺寸之像素區塊緊鄰該當前宏塊。The video compression method of claim 1, wherein the reference macroblock of the current macroblock includes a first reference macroblock and a second when the current macroblock is located in a right region of a current picture. a reference macroblock, the first reference macroblock being located to the left of the current macroblock, and providing a first reference motion vector by a 16x16 size pixel block and an 8x16 size pixel block providing a second reference a motion vector, the second reference macroblock is located above the current macroblock, and a 16x16-sized pixel block provides a third reference motion vector, and a 16x8-sized pixel block provides a fourth reference movement. a vector, the 8x16 sized pixel block in the first reference macroblock is immediately adjacent to the current macroblock, and the 16x8 sized pixel block in the second reference macroblock is immediately adjacent to the current macroblock. 如申請專利範圍第1項所述之視訊壓縮方法,其中,當該當前宏塊位於一當前畫面的非邊際區域時,該當前宏塊之參考宏塊包括一第一參考宏塊、一第二參考宏塊以及一第三參考宏塊,該第一參考宏塊位於該當前宏塊之左側、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、一8x16尺寸之像素區塊提供一第二參考移動向量、以及一16x8尺寸之像素區塊提供一第三參考移動向 量,該第二參考宏塊位於該當前宏塊之上方、且係以其中一16x16尺寸之像素區塊提供一第四參考移動向量、以及一16x8尺寸之像素區塊提供一第五參考移動向量,該第三參考宏塊位於該當前宏塊之右上方、且係以其中一16x16尺寸之像素區塊提供一第六參考移動向量,該第一參考宏塊內的該8x16尺寸之像素區塊緊鄰該當前宏塊,該第一參考宏塊內的該16x8尺寸之像素區塊屬於該第一參考宏塊之下半部,且該第二參考宏塊內的該16x8尺寸之像素區塊緊鄰該當前宏塊。The video compression method of claim 1, wherein the reference macroblock of the current macroblock includes a first reference macroblock and a second when the current macroblock is located in a non-marginal region of a current picture. a reference macroblock and a third reference macroblock, the first reference macroblock being located to the left of the current macroblock and having a 16x16 size pixel block providing a first reference motion vector and an 8x16 size pixel region The block provides a second reference motion vector, and a 16x8 sized pixel block provides a third reference movement direction The second reference macroblock is located above the current macroblock, and a 16x16-sized pixel block provides a fourth reference motion vector, and a 16x8-sized pixel block provides a fifth reference motion vector. The third reference macroblock is located at the upper right of the current macroblock, and provides a sixth reference motion vector in a 16x16 size pixel block, and the 8x16 size pixel block in the first reference macroblock. Adjacent to the current macroblock, the 16x8 sized pixel block in the first reference macroblock belongs to the lower half of the first reference macroblock, and the 16x8 sized pixel block in the second reference macroblock is in close proximity The current macroblock. 一種視訊壓縮裝置,包括:一記憶單元,儲存一參考畫面、以及一當前畫面的一當前宏塊的複數個參考移動向量,該等參考移動向量係由該當前宏塊之參考宏塊內至少兩種尺寸之像素區塊所提供;以及一移動偵測模組,自該記憶單元提取該當前宏塊的該等參考移動向量,且自該等參考移動向量辨識出一中位值移動向量以根據該中位值移動向量設定一相似宏塊搜尋起點,且根據該相似宏塊搜尋起點於該記憶單元所儲存的該參考畫面起始搜尋該當前宏塊的一最相似宏塊,且根據搜尋到之該最相似宏塊與該當前宏塊求得該當前宏塊的移動向量供視訊壓縮使用。A video compression device includes: a memory unit storing a reference picture and a plurality of reference motion vectors of a current macroblock of a current picture, the reference motion vectors being at least two of the reference macroblocks of the current macroblock Provided by the pixel block of the size; and a motion detection module, extracting the reference motion vectors of the current macroblock from the memory unit, and recognizing a median value motion vector from the reference motion vectors to The median value motion vector sets a similar macroblock search starting point, and searches for a most similar macroblock of the current macroblock starting from the reference picture stored in the memory unit according to the similar macroblock search starting point, and according to the search The most similar macroblock and the current macroblock obtain the motion vector of the current macroblock for video compression. 如申請專利範圍第6項所述之視訊壓縮裝置,其中,當該當前宏塊位於一當前畫面的上邊際區域時,該當前宏塊之參考宏塊位於該當前宏塊之左方、且係以其中一 16x16尺寸之像素區塊提供一第一參考移動向量、一8x16尺寸之像素區塊提供一第二參考移動向量、以及兩個16x8尺寸之像素區塊提供一第三以及一第四參考移動向量,該8x16尺寸之像素區塊緊鄰該當前宏塊,且上述兩個16x8尺寸之像素區塊組成該參考宏塊。The video compression device of claim 6, wherein when the current macroblock is located in an upper margin region of a current picture, the reference macroblock of the current macroblock is located to the left of the current macroblock, and is One of them A 16x16 sized pixel block provides a first reference motion vector, an 8x16 sized pixel block provides a second reference motion vector, and two 16x8 sized pixel blocks provide a third and a fourth reference motion vector. The 8x16 size pixel block is adjacent to the current macro block, and the two 16x8 size pixel blocks constitute the reference macro block. 如申請專利範圍第7項所述之視訊壓縮裝置,更包括:一第一比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;一第二比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;其中:於一第一輪操作,上述第一至第四參考移動向量兩兩供應給該第一以及該第二比較器作比較;於一第二輪操作,該第一以及該第二比較器再次被使用,其間,該第一比較器該第一輸出端於該第一輪操作時所輸出的信號係與該第二比較器該第一輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四參考移動向量中最大值者與一第一中位值者,且該第一比較器該第二輸出端於該第一輪操作時所輸出的信號係與該第二比較器該第二輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四參考移動向量中最小值者與一第二中位值者;且該第一至該第四參考移動向量中經辨識為該第一與該 第二中位值者的向量平均即上述中位值移動向量。The video compression device of claim 7, further comprising: a first comparator for comparing the sizes of the two inputs, and outputting the larger one with a first output and the output with a second output a second comparator that compares the sizes of the two inputs and outputs a larger one with a first output and a smaller one with a second output; wherein: in a first round of operation, the above One to four reference movement vectors are supplied to the first and the second comparator for comparison; in a second round operation, the first and the second comparator are used again, during which the first comparator The signal outputted by the first output terminal during the first round operation is compared with the signal output by the second comparator when the first output terminal is operated during the first round operation to identify the first to the first And a signal that is output by the second comparator in the first round of operation and the second output of the second comparator Compare the signals output during the first round of operation Identifying a minimum of the first to the fourth reference motion vectors and a second median value; and identifying the first and the first to the fourth reference motion vectors The vector average of the second median value is the above median value motion vector. 如申請專利範圍第6項所述之視訊壓縮裝置,其中,當該當前宏塊位於一當前畫面的左邊際區域時,該當前宏塊之參考宏塊包括一第一參考宏塊以及一第二參考宏塊,該第一參考宏塊位於該當前宏塊之上方、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、以及一16x8尺寸之像素區塊提供一第二參考移動向量,該第二參考宏塊位於該當前宏塊之右上方、且係以其中一16x16尺寸之像素區塊提供一第三參考移動向量、以及一16x8尺寸之像素區塊提供一第四參考移動向量,該第一參考宏塊內的該16x8尺寸之像素區塊緊鄰該當前宏塊,且該第二參考宏塊內的該16x8尺寸之像素區塊屬於該第二參考宏塊之下半部。The video compression device of claim 6, wherein when the current macroblock is located in a left-hand region of a current picture, the reference macroblock of the current macroblock includes a first reference macroblock and a second a reference macroblock, the first reference macroblock is located above the current macroblock, and a 16x16-sized pixel block provides a first reference motion vector, and a 16x8-sized pixel block provides a second reference. a motion vector, the second reference macroblock is located at a right upper side of the current macroblock, and a 16x16-sized pixel block provides a third reference motion vector, and a 16x8-sized pixel block provides a fourth reference. Moving a vector, the 16x8 sized pixel block in the first reference macroblock is immediately adjacent to the current macroblock, and the 16x8 sized pixel block in the second reference macroblock belongs to the lower half of the second reference macroblock unit. 如申請專利範圍第9項所述之視訊壓縮裝置,更包括:一第一比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;一第二比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;其中:於一第一輪操作,上述第一至第四參考移動向量兩兩供應給該第一以及該第二比較器作比較;於一第二輪操作,該第一以及該第二比較器再次被使用,其間,該第一比較器該第一輸出端於該第一輪操作時 所輸出的信號係與該第二比較器該第一輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四參考移動向量中最大值者與一第一中位值者,且該第一比較器該第二輸出端於該第一輪操作時所輸出的信號係與該第二比較器該第二輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四參考移動向量中最小值者與一第二中位值者;且該第一至該第四參考移動向量中經辨識為該第一與該第二中位值者的向量平均即上述中位值移動向量。The video compression device of claim 9, further comprising: a first comparator for comparing the sizes of the two inputs, and outputting the larger one with a first output and the output with a second output a second comparator that compares the sizes of the two inputs and outputs a larger one with a first output and a smaller one with a second output; wherein: in a first round of operation, the above One to four reference movement vectors are supplied to the first and the second comparator for comparison; in a second round operation, the first and the second comparator are used again, during which the first comparator The first output is in the first round of operation The output signal is compared with the signal output by the first output of the second comparator during the first round operation to identify the maximum value of the first to the fourth reference motion vectors and a first a median value, and the signal output by the second output of the first comparator during the first round operation and the signal output by the second output of the second comparator during the first round operation Comparing to identify a minimum value of the first to the fourth reference motion vectors and a second median value; and the first to the fourth reference motion vectors are identified as the first and the second The vector average of the median value is the above median value motion vector. 如申請專利範圍第6項所述之視訊壓縮裝置,其中,當該當前宏塊位於一當前畫面的右邊際區域時,該當前宏塊之參考宏塊包括一第一參考宏塊以及一第二參考宏塊,該第一參考宏塊位於該當前宏塊之左側、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、以及一8x16尺寸之像素區塊提供一第二參考移動向量,該第二參考宏塊位於該當前宏塊之上方、且係以其中一16x16尺寸之像素區塊提供一第三參考移動向量、以及一16x8尺寸之像素區塊提供一第四參考移動向量,該第一參考宏塊內的該8x16尺寸之像素區塊緊鄰該當前宏塊,且該第二參考宏塊內的該16x8尺寸之像素區塊緊鄰該當前宏塊。The video compression device of claim 6, wherein when the current macroblock is located in a right region of a current picture, the reference macroblock of the current macroblock includes a first reference macroblock and a second a reference macroblock, the first reference macroblock being located to the left of the current macroblock, and providing a first reference motion vector by a 16x16 size pixel block and an 8x16 size pixel block providing a second reference a motion vector, the second reference macroblock is located above the current macroblock, and a 16x16-sized pixel block provides a third reference motion vector, and a 16x8-sized pixel block provides a fourth reference movement. a vector, the 8x16 sized pixel block in the first reference macroblock is immediately adjacent to the current macroblock, and the 16x8 sized pixel block in the second reference macroblock is immediately adjacent to the current macroblock. 如申請專利範圍第11項所述之視訊壓縮裝置,更包括:一第一比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者; 一第二比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;其中:於一第一輪操作,上述第一至第四參考移動向量兩兩供應給該第一以及該第二比較器作比較;於一第二輪操作,該第一以及該第二比較器再次被使用,其間,該第一比較器該第一輸出端於該第一輪操作時所輸出的信號係與該第二比較器該第一輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四參考移動向量中最大值者與一第一中位值者,且該第一比較器該第二輸出端於該第一輪操作時所輸出的信號係與該第二比較器該第二輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四參考移動向量中最小值者與一第二中位值者;且該第一至該第四參考移動向量中經辨識為該第一與該第二中位值者的向量平均即上述中位值移動向量。The video compression device of claim 11, further comprising: a first comparator, comparing the sizes of the two inputs, and outputting the larger one with a first output and the output with a second output Small a second comparator, comparing the sizes of the two inputs, and outputting the larger one with a first output and the smaller one with a second output; wherein: the first to the first Four reference movement vectors are supplied to the first and the second comparator for comparison; in a second round operation, the first and the second comparator are used again, during which the first comparator is first The signal output by the output terminal during the first round operation is compared with the signal output by the second comparator when the first output terminal is operated during the first round operation to identify the first to the fourth reference movement a maximum value of the vector and a first median value, and the first output of the first comparator outputs the signal during the first round operation and the second output of the second comparator The signals outputted during the first round of operation are compared to identify the minimum of the first to fourth reference motion vectors and a second median value; and the first to the fourth reference motion vectors are The vector average identified as the first and the second median value is the above Median motion vector. 如申請專利範圍第6項所述之視訊壓縮裝置,其中,當該當前宏塊位於一當前畫面的非邊際區域時,該當前宏塊之參考宏塊包括一第一參考宏塊、一第二參考宏塊以及一第三參考宏塊,該第一參考宏塊位於該當前宏塊之左側、且係以其中一16x16尺寸之像素區塊提供一第一參考移動向量、一8x16尺寸之像素區塊提供一第二參考移動向量、以及一16x8尺寸之像素區塊提供一第三參考移動向量,該第二參考宏塊位於該當前宏塊之上方、且係以其中 一16x16尺寸之像素區塊提供一第四參考移動向量、以及一16x8尺寸之像素區塊提供一第五參考移動向量,該第三參考宏塊位於該當前宏塊之右上方、且係以其中一16x16尺寸之像素區塊提供一第六參考移動向量,該第一參考宏塊內的該8x16尺寸之像素區塊緊鄰該當前宏塊,該第一參考宏塊內的該16x8尺寸之像素區塊屬於該第一參考宏塊之下半部,且該第二參考宏塊內的該16x8尺寸之像素區塊緊鄰該當前宏塊。The video compression device of claim 6, wherein when the current macroblock is located in a non-marginal region of a current picture, the reference macroblock of the current macroblock includes a first reference macroblock, a second a reference macroblock and a third reference macroblock, the first reference macroblock being located to the left of the current macroblock and having a 16x16 size pixel block providing a first reference motion vector and an 8x16 size pixel region The block provides a second reference motion vector, and a 16x8 sized pixel block provides a third reference motion vector, the second reference macroblock being located above the current macroblock and associated with A 16x16 sized pixel block provides a fourth reference motion vector, and a 16x8 sized pixel block provides a fifth reference motion vector, the third reference macroblock being located at the upper right of the current macroblock and associated with A 16x16 size pixel block provides a sixth reference motion vector, the 8x16 size pixel block in the first reference macro block is adjacent to the current macro block, and the 16x8 size pixel area in the first reference macro block The block belongs to the lower half of the first reference macroblock, and the 16x8 sized pixel block within the second reference macroblock is immediately adjacent to the current macroblock. 如申請專利範圍第13項所述之視訊壓縮裝置,更包括:一第一比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;一第二比較器,比較兩輸入的大小,並且以一第一輸出端輸出較大者、以及以一第二輸出端輸出較小者;其中:於一第一輪操作,任選上述第一至第六參考移動向量中一第一、一第二、一第三以及一第四向量兩兩供應給該第一以及該第二比較器作比較;於一第二輪操作,該第一以及該第二比較器再次被使用,其間,該第一比較器該第一輸出端於該第一輪操作時所輸出的信號係與該第二比較器該第一輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四向量中最大值者與一第一中位值參考,且該第一比較器該第二輸出端於該第一輪操作時所輸出的信號係與該第二比較器 該第二輸出端於該第一輪操作時所輸出的信號作比較以辨識出該第一至該第四向量中最小值者與一第二中位值參考;於一第三輪操作,該第一以及該第二比較器再次被使用,其間,上述第一至第六參考移動向量中一第五向量與該第一至該第四向量中最大值者作比較以辨識出較小者為一第三中位值參考,且上述第一至第六參考移動向量中一第六向量與該第一至該第四向量中最小值者作比較以辨識出較大者為一第四中位值參考;於一第四輪以及一第五輪操作,該第一以及該第二比較器反覆兩次操作,以辨識出上述第一至第四中位值參考中的一第一以及一第二中位值者;且該第一至該第四中位值參考中經辨識為該第一與該第二中位值者的向量平均即上述中位值移動向量。The video compression device of claim 13, further comprising: a first comparator, comparing the sizes of the two inputs, and outputting the larger one with a first output and the output with a second output a second comparator that compares the sizes of the two inputs and outputs the larger one with a first output and the smaller one with a second output; wherein: in a first round of operation, optional a first, a second, a third, and a fourth vector of the first to sixth reference motion vectors are supplied to the first and the second comparator for comparison; in a second round operation, the second round operation The first and the second comparator are used again, during which the signal output by the first output of the first comparator during the first round operation and the first output of the second comparator are The signals outputted during one round of operation are compared to identify the maximum of the first to the fourth vectors and a first median value reference, and the first output of the first comparator is in the first round The signal output during operation and the second comparator Comparing the signals output by the second output in the first round operation to identify the minimum of the first to the fourth vectors and a second median value reference; in a third round operation, the First and the second comparator are used again, wherein a fifth vector of the first to sixth reference motion vectors is compared with a maximum of the first to the fourth vectors to identify that the smaller one is a third median value reference, and a sixth vector of the first to sixth reference motion vectors is compared with a minimum of the first to the fourth vectors to identify that the larger one is a fourth median Value reference; in a fourth round and a fifth round operation, the first and the second comparators are repeatedly operated twice to identify one of the first to fourth median reference and the first a median value; and the vector average of the first to the fourth median value referenced as the first and the second median value is the median value motion vector.
TW101124167A 2012-07-05 2012-07-05 Video compression method and device TWI499283B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW101124167A TWI499283B (en) 2012-07-05 2012-07-05 Video compression method and device
CN201210276252.8A CN103533375B (en) 2012-07-05 2012-08-06 Video compression method and video compression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101124167A TWI499283B (en) 2012-07-05 2012-07-05 Video compression method and device

Publications (2)

Publication Number Publication Date
TW201404157A TW201404157A (en) 2014-01-16
TWI499283B true TWI499283B (en) 2015-09-01

Family

ID=49934985

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101124167A TWI499283B (en) 2012-07-05 2012-07-05 Video compression method and device

Country Status (2)

Country Link
CN (1) CN103533375B (en)
TW (1) TWI499283B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050220190A1 (en) * 2004-03-31 2005-10-06 Samsung Electronics Co., Ltd. Method and apparatus for effectively compressing motion vectors in multi-layer structure
US20070230576A1 (en) * 2003-09-21 2007-10-04 Dror Heller Deriving Motion Detection Information From Motion-Vector-Search Type Video Encoders
US20080285653A1 (en) * 2007-05-14 2008-11-20 Himax Technologies Limited Motion estimation method
TWI310654B (en) * 2006-01-12 2009-06-01
TWI324484B (en) * 2006-05-23 2010-05-01 Jiunin Guo Method for reducing calculation complexity of video compression standard
US20120121021A1 (en) * 2009-07-03 2012-05-17 France Telecom Prediction of a movement vector of a current image partition pointing to a reference zone that covers several reference image partitions and encoding and decoding using one such prediction

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100649654B1 (en) * 1998-09-07 2006-11-24 톰슨 멀티미디어 Method of motion estimation for transmission cost reduction of motion vectors
KR100446083B1 (en) * 2002-01-02 2004-08-30 삼성전자주식회사 Apparatus for motion estimation and mode decision and method thereof
CN100433835C (en) * 2005-03-01 2008-11-12 凌阳科技股份有限公司 Method and system for dynamically adjusting motion estimation
CN1791224A (en) * 2005-12-19 2006-06-21 宁波大学 Self-adaptive block searching range rapid motion estimating method based on H.264
US20090245374A1 (en) * 2008-03-26 2009-10-01 Mediatek Inc. Video encoder and motion estimation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070230576A1 (en) * 2003-09-21 2007-10-04 Dror Heller Deriving Motion Detection Information From Motion-Vector-Search Type Video Encoders
US20050220190A1 (en) * 2004-03-31 2005-10-06 Samsung Electronics Co., Ltd. Method and apparatus for effectively compressing motion vectors in multi-layer structure
TWI310654B (en) * 2006-01-12 2009-06-01
TWI324484B (en) * 2006-05-23 2010-05-01 Jiunin Guo Method for reducing calculation complexity of video compression standard
US20080285653A1 (en) * 2007-05-14 2008-11-20 Himax Technologies Limited Motion estimation method
US20120121021A1 (en) * 2009-07-03 2012-05-17 France Telecom Prediction of a movement vector of a current image partition pointing to a reference zone that covers several reference image partitions and encoding and decoding using one such prediction

Also Published As

Publication number Publication date
TW201404157A (en) 2014-01-16
CN103533375A (en) 2014-01-22
CN103533375B (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN112584164B (en) Coding and decoding method and equipment thereof
RU2381630C2 (en) Method and device for determining block conformity quality
CN105393537B (en) Hash table building and availability inspection for the Block- matching based on hash
CN105981382B (en) The encoder based on hash for Video coding determines
CN102801972A (en) Characteristic-based motion vector estimation and transmission method
ES2609303T3 (en) Video coding device, video coding procedure and video coding program
TWI499283B (en) Video compression method and device
WO2014155543A1 (en) Encoding device, method, program, computer system and recording medium
KR102345258B1 (en) Object Region Detection Method, Device and Computer Program Thereof
Bhandari et al. Analysis the Performance of Three Step Search Algorithm for Motion Estimation
Joshi et al. Review of standard traditional distortion metrics and a need for perceptual distortion metric at a (sub) macroblock level