TWI258991B - Motion vector derivation method - Google Patents
Motion vector derivation method Download PDFInfo
- Publication number
- TWI258991B TWI258991B TW92109090A TW92109090A TWI258991B TW I258991 B TWI258991 B TW I258991B TW 92109090 A TW92109090 A TW 92109090A TW 92109090 A TW92109090 A TW 92109090A TW I258991 B TWI258991 B TW I258991B
- Authority
- TW
- Taiwan
- Prior art keywords
- motion vector
- image
- block
- motion
- case
- Prior art date
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
1258991 玖、發明說明 (發明說明應欽明:發明所屬之技術領域'先前技術、内容、實施方式及圖式簡單說明) I:發明戶斤屬之技術領域3 發明領域 本發明是有關於動態圖像之編碼方法及解碼方法,特 5 別是參照以已經編碼完之顯示時間在前方之多數圖像、或 以時間順序在後方之多數圖像、或以時間順序在前方及後 方之雙方的多數圖像而進行預測編碼的方法者。 發明背景 ίο —般動態圖像之編碼係以削減時間方向及空間方向之 冗長性的情形而進行資訊量的壓縮。因此在以削減時間上 之冗長性爲目的之圖像間預測編碼方面,乃參照前方或後 方之圖像而以區塊單位進行移動的檢測及移動補償,並對 於所獲得之預測圖像與現有之圖像的差分値進行編碼。 目前標準化之動態圖像編碼方法的H. 26L乃提出有僅 進行在圖像內預測編碼的圖像(以下稱I圖像)、以及參照1 幀圖像而進行圖像間預測編碼的圖像(以下稱p圖像),進 而參照以顯示時間順序在前方之2幀圖像或以顯示時間順 序在後方之2幀圖像或以顯示時間順序在前方及後方之各 2〇 1幀圖像而進行圖像間預測編碼的圖像(以下稱B圖像)。 第1圖是表示上述動態圖像編碼方法中的各圖像,與 依此所參照之圖像之參照關係的例子。 圖像11係不具有參照圖像而進行圖像內預測編碼,圖 像10係參照以顯示時間順序在前方之P7而進行圖像間預 1258991 玖、發明說明 測編碼。又,圖像B6係參照以顯示時間順序在前方之二 個圖像,圖像B12係參照顯示時間順序在後方之二個圖像 ’圖像B18係參照顯示時間順序在前方及後方之各一個圖 像而進行圖像間預測編碼。 5 參照以顯示時間順序在前方及後方之各一個圖像而進 行圖像間預測編碼之二方向預測之一個預測模式乃有直接 模式。直接模式係不使編碼對象區塊直接具有移動向量, 而藉著參照以顯示時間順序在近旁之編碼完之圖像內之相 同位置之區塊的移動向量而算出用以實際進行移動補償之 1〇 =個移動向量以作成預測圖像。 第2圖是表示於直接模式中用以決定移動向量所參照 之編碼完的圖像,具有僅參照以顯示時間順序在前方之1 幀圖像之移動向量之情形的例子。於同圖中,以垂直方向 之線段表示之「P」與圖像型態無關,僅表示圖像。同圖中 15 ’圖像P83係作爲現有編碼對象之圖像,而將圖像P82及 圖像P84作爲參照圖像進行兩個方向預測。於此圖像P83 將要進行編碼之區塊作爲區塊MB81時,區塊MB81之移 動向量乃使用在編碼完之後方參照圖像之圖像P84相同位 置之區塊MB 82所具有之移動向量而決定。由於此區塊 20 MB82之移動向量僅具有移動向量MV81之一個,故所要 求得之二個之移動向量MV82及移動向量MV83乃依據式 1(a)及(b)而直接對於移動向量MV81及時間間隔TR81應 用定標而算出。 • · ·式 1 MV82 = MV81/TR81 X TR82 7 1258991 第3圖(a)是表示使用習知之直接模式之空間性的預測 方法,而於B圖像參照以顯示時間順序在前方之圖像時之 向量預測方法的一例。同圖中,P表示P圖像,B表示B 圖像,附加於右側4圖像之圖像型態的數字表示各圖像被 5 編碼的順序碼。在此說明於圖像B4附加斜線之巨集區塊 係設成編碼對象者。使用直接模式之空間性的預測方法計 算編碼對象巨集區塊之移動的情形下,首先,從編碼對象 巨集區塊周邊選擇三個經編碼完之巨集區塊(虛線部)。於 此省略周邊三個巨集區塊之選擇方法的說明。編碼完之三 10個巨集區塊之移動向量已計算而被保持著。此移動向量爲 相同圖像中之巨集區塊亦有於每個巨集區塊參照不同的圖 像而求得的情形。此周邊三個巨集區塊到底是分別參照何 圖像者’乃可藉著將各巨集區塊予以編碼之際所使用之參 照圖像的參照索引而得知。有關於參照索引之詳細將於後 15 述之。 例如對於第3圖(a)所示之編碼對象巨集區塊選擇周邊 三個巨集區塊,而將各編碼完之巨集區塊的移動向量分別 設爲移動向量a、移動向量b及移動向量c。於此,移動向 量a與移動向量b參照圖像編號11爲「11」之P圖像而求 20 得,移動向量C參照圖像編號11爲「8」之P圖像而求得 。此情形下,此等移動向量a、b及c之中,參照以顯示時 間距編碼對象圖像在最近距離之圖像之移動向量的移動向 量a、b二者成爲編碼對象巨集區塊之移動向量候選。此時 將移動向量c視爲「〇」,而選擇移動向量a、移動向量b 1258991 玖、翻飄 —— 及移動向量C之三個之中的中央値並設爲編碼對象巨集區 塊的移動向量。 然而,在MPEG-4等編碼方式亦可以進行交錯之場構 造將圖像內之各巨集區塊予以編碼,亦可以不進行交錯之 5 框構造進行編碼。因此,在MPEG-4於參照框1框中會產 生混合以場構造編碼之巨集區塊與以框構造編碼之巨集區 塊的情形。此情形下,編碼對象巨集區塊之周邊三個巨集 區塊均與編碼對象巨集區塊相同構造編碼的話,使用前述 直接模式之空間性的預測方法而能無問題地導出一個編碼 10 對象巨集區塊之移動向量。即,對於以框構造之被編碼的 編碼對象巨集區塊亦以框構造編碼時,或對於以場構造之 被編碼的編碼對象巨集區塊亦以場構造編碼的情形。前者 的情形如已說明的內容。又,後者的情形對應編碼對象巨 集區塊頂場藉著使用對應周邊三個巨集區塊之頂場的三個 15 移動向量,又,對應編碼對象巨集區塊之底場藉著使用對 應周邊三個巨集區塊之底場的三個移動向量,而對於各別 的頂場與底場以前述方法而能導出編碼對象巨集區塊的移 動向量。 但是直接模式之時間上之預測的情形,於進行圖像間 20 預測編碼之區塊藉直接模式而進行移動補償之際,參照移 動向量之區塊屬於第1圖之B6那樣的B圖像時,由於前 述區塊具有多數移動向量而會產生不能直接運用依據式1 之定標所算出之移動向量的問題。又,因算出移動向量之 後進行除法計算,會產生移動向量値之精確度(例如1/2 10 1258991 衷、WW — 像素或1/4像素精確度)不一致於預定的精確度的情形。 又’空間上之預測的情形,編碼對象巨集區塊與周邊 巨集區塊之其中任何以不同構造編碼時,並未規定將編碼 對象巨集區塊以場構造及框構造之其中任何構造編碼,又 5 ’亦未規定從混合存在以場構造編碼者與以框構造編碼者 之周邊巨集區塊之移動向量之中選擇編碼對象巨集區塊之 移動向量的方法。 【發明内容3 發明槪要 10 本發明之目的在於提供一種移動向量預測方法,該方 法係提供於混合存在以場構造編碼之區塊或是以框構造編 碼之區塊的情形下,於直接模式中亦能有良好精確度之空 間方向的移動向量預測方法。 爲了達到上述目的,本發明之移動向量計算方法係從 15 已算出之周邊區塊之移動向量來導出要構成動態圖像之圖 像的之區塊之移動向量的移動向量計算方法,於成爲導出 對象之區塊以框構造而編碼或解碼的情形下,對於以場構 造編碼或解碼之周邊區塊,使用在頂場之區塊之移動向量 與底場之區塊的移動向量之中,滿足一定條件之移動向量 20而導出成爲前述導出對象之區塊的移動向量,於成爲導出 對象之區塊以場構造而編碼或解碼的情形下’對於以框構 造編碼或解碼之周邊區塊,使用在相互鄰接之二個區塊的 移動向量中,滿足一^定條件之移動向童而導出成爲則述導 出對象之區塊的移動向量,因此,成爲導出對象之區塊與 1258991 玖 周邊區塊之編碼或解碼構造不同的情形下,亦能使用在各 周邊區塊之二個區塊的移動向量之中,滿足一定條件之移 動向量而導出成爲前述導出對象之區塊的移動向量。 又’於本發明之前述移動向量計算方法,前述一定條 5件係於成爲導出對象之區塊以框構造而編碼或解碼的情形 下’前述頂場之區塊的移動向量與前述底場之區塊的移動 向量分別參照之圖像,係在可參照之圖像之中具有所謂相 同參照索引之圖像的條件,而成爲導出對象之區塊以場構 造而編碼或解碼的情形下,前述相互鄰接之二個區塊之移 10 動向量分別參照的圖像,係在可參照之圖像中具有所謂相 同參照索引之圖像的條件。 再者,於本發明之前述移動向量計算方法,前述二個 區塊之移動向量的雙方滿足前述一定條件的情形下,亦可 使用前述二個區塊之移動向量的平均値而導出成爲前述導 15 出對象之區塊的移動向量。 又,本說明書乃納入之前的日本發明專利申請案「特 願 2002-118598」、「特願 2002-121053」、「特願 2002-156266」、「特願 2002-177889」、「特願 2002-193027」、「特 願 2002-204713」、「特願 2002-262151」、「特願 2002-20 290542」、「特願 2002-323096」、美國申請案「60/378643 」及「60/378954」的內容。 圖式之簡單說明: 第1圖係用以說明習知例之圖像之參照關係的模式圖 12 1258991 ————— —1258991 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明 发明The encoding method and the decoding method are not limited to a plurality of images in which the display time is already encoded, a plurality of images in the rear in the chronological order, or a plurality of images in the front and the rear in chronological order. For example, the method of predictive coding is performed. BACKGROUND OF THE INVENTION The encoding of a general moving image is compressed by reducing the length of the time direction and the spatial direction. Therefore, in the inter-picture predictive coding aiming at reducing the verbosity of time, the detection and motion compensation in the block unit are referred to the front or rear image, and the obtained predicted image and the existing image are obtained. The difference 値 of the image is encoded. H. 26L of the current standard motion picture coding method proposes an image in which only intra-picture predictive coding (hereinafter referred to as an I picture) and an inter-picture predictive coding with reference to a 1-frame picture are proposed. (hereinafter referred to as p image), and further refer to two frames of images in front of the display time sequence or two frames of images in the rear in the display time order or two frames of images in the front and rear in order of display time. An image for predictive coding between images (hereinafter referred to as a B image) is performed. Fig. 1 is a view showing an example of a reference relationship between each image in the above-described moving image encoding method and an image referred to here. The image 11 is subjected to intra-image predictive coding without a reference image, and the image 10 is referred to as P7 in front of the display time sequence to perform pre-image pre-image processing, and to describe the code. Further, the image B6 refers to two images in front of the display time sequence, and the image B12 refers to two images in the rear in the display time sequence. The image B18 refers to each of the front and rear in the display time sequence. The image is inter-image predictively encoded. 5 There is a direct mode in the prediction mode of the two-direction prediction in which the inter-image predictive coding is performed in each of the front and rear images in the chronological order. The direct mode does not cause the coding target block to directly have a motion vector, but calculates the motion compensation for actual motion by referring to the motion vector of the block at the same position in the recently coded image in the chronological order. 〇 = one motion vector to make a predicted image. Fig. 2 is a view showing an example of the case where the encoded image referenced by the motion vector is determined in the direct mode, and the motion vector of only one frame image in front of the display time order is referred to. In the same figure, the "P" indicated by the line segment in the vertical direction is independent of the image type and represents only the image. In the same figure, the 15' image P83 is used as an image of the conventional encoding target, and the image P82 and the image P84 are used as reference images for two-direction prediction. When the image P83 is to be coded as the block MB81, the motion vector of the block MB81 is the motion vector of the block MB 82 at the same position of the image P84 after the encoding is completed. Decide. Since the motion vector of the block 20 MB82 has only one of the motion vectors MV81, the two required motion vectors MV82 and motion vectors MV83 are directly related to the motion vector MV81 according to Equations 1(a) and (b). The time interval TR81 is calculated by applying a calibration. • · · Equation 1 MV82 = MV81/TR81 X TR82 7 1258991 Figure 3 (a) shows the spatial prediction method using the conventional direct mode, and when the B image refers to the image in front of the display chronological order An example of a vector prediction method. In the same figure, P denotes a P image, B denotes a B image, and a number added to the image type of the right 4 image indicates a sequential code in which each image is 5 encoded. Here, it is explained that the macroblock to which the oblique line is added to the image B4 is set as the encoding target. In the case where the motion of the coding target macroblock is calculated using the spatial prediction method of the direct mode, first, three encoded macroblocks (dashed line portions) are selected from the periphery of the coding target macroblock. The description of the selection method of the three surrounding macroblocks is omitted here. After the coding, the motion vectors of the 10 macroblocks have been calculated and are maintained. This motion vector is a situation in which macroblocks in the same image are also obtained by referring to different images in each macroblock. The three macroblocks in the periphery are referred to by reference to the image, respectively, by the reference index of the reference image used to encode each macroblock. The details of the reference index will be described in the next section. For example, for the coding target macroblock shown in FIG. 3(a), three surrounding macroblocks are selected, and the motion vectors of each encoded macroblock are respectively set as a motion vector a, a motion vector b, and Move vector c. Here, the moving vector a and the motion vector b are obtained by referring to the P image whose image number 11 is "11", and the motion vector C is obtained by referring to the P image whose image number 11 is "8". In this case, among the motion vectors a, b, and c, the motion vectors a and b that refer to the motion vector of the image in which the target image is displayed at the closest distance by the display time interval become the coding target macroblock. Motion vector candidates. At this time, the motion vector c is regarded as "〇", and the center 値 among the three of the motion vector a, the motion vector b 1258991 玖, the fluttering - and the motion vector C is selected and set as the coding target macro block. Move the vector. However, in the encoding method such as MPEG-4, the interlaced field structure can be used to encode the macroblocks in the image, or the interleaving frame structure can be used for encoding. Therefore, in the case of MPEG-4 in the frame of reference frame 1, a case where a macroblock block coded by the field structure and a macroblock block coded by the frame structure are generated may be generated. In this case, if the three macroblocks around the coding object macroblock are the same as the coding object macroblock, the spatial prediction method of the direct mode can be used to derive an encoding 10 without problems. The motion vector of the object macro block. That is, the case where the coding target macroblock encoded in the frame structure is also coded in the frame structure, or the coding target macroblock in the field structure is also encoded in the field structure. The former situation is as explained. Moreover, the latter case corresponds to the top field of the coding object macroblock by using three 15 motion vectors corresponding to the top field of the three surrounding macroblocks, and the bottom field corresponding to the coding object macroblock is used by Corresponding to the three motion vectors of the bottom fields of the three macroblocks, the motion vectors of the coding target macroblocks can be derived for the respective top and bottom fields by the foregoing method. However, in the case of the temporal prediction of the direct mode, when the block in which the inter-picture 20 prediction coding is performed is compensated by the direct mode, when the block in which the motion vector is referred to belongs to the B picture as shown in FIG. 1 Since the aforementioned block has a plurality of motion vectors, there arises a problem that the motion vector calculated by the scaling of Equation 1 cannot be directly used. Also, since the division calculation is performed after the calculation of the motion vector, the accuracy of the motion vector ( (e.g., 1/2 10 1258991, WW-pixel or 1/4 pixel accuracy) is inconsistent with the predetermined accuracy. In the case of spatial prediction, when any of the coding object macroblock and the surrounding macroblock is encoded in a different structure, there is no provision for any of the structures of the coding object macroblock in the field structure and the frame structure. The encoding, 5' also does not specify a method of selecting a motion vector of a coding target macroblock from among the motion vectors of the field structure coder and the surrounding macroblock of the frame structure coder. SUMMARY OF THE INVENTION [Invention 3] It is an object of the present invention to provide a motion vector prediction method which is provided in a direct mode in a case where a block which is encoded by a field structure or a block which is coded by a frame structure is mixed. It also has a motion vector prediction method with good accuracy in the spatial direction. In order to achieve the above object, the motion vector calculation method of the present invention derives a motion vector calculation method for a motion vector of a block to constitute an image of a moving image from a calculated motion vector of a peripheral block of 15 In the case where the block of the object is encoded or decoded in a frame structure, for the peripheral block coded or decoded by the field structure, the motion vector of the block of the top field and the motion vector of the block of the bottom field are used, The movement vector of the block to be derived is derived by the motion vector 20 of a certain condition, and in the case where the block to be derived is encoded or decoded by the field structure, 'for the peripheral block coded or decoded by the frame structure, use In the motion vector of the two blocks adjacent to each other, the movement satisfying the predetermined condition is derived as the motion vector of the block to be derived, and thus the block to be exported and the surrounding block of 1258991 In the case where the coding or decoding structure is different, it can also be used in the motion vectors of the two blocks of each peripheral block to satisfy certain conditions. The motion vector is derived as a motion vector of the block to be derived. Further, in the above-described moving vector calculation method of the present invention, the predetermined number of five pieces is the case where the block of the derivation target is encoded or decoded in a frame structure, and the movement vector of the block of the top field and the aforementioned bottom field are The image in which the motion vector of the block is referred to separately is a condition in which an image of the same reference index is included in the image that can be referred to, and in the case where the block to be derived is encoded or decoded by the field structure, the foregoing The image in which the moving blocks of the two adjacent blocks are respectively referred to are images having the so-called image of the same reference index in the image that can be referred to. Furthermore, in the above-described motion vector calculation method of the present invention, when both of the motion vectors of the two blocks satisfy the predetermined condition, the average of the motion vectors of the two blocks may be used as the guide. 15 The movement vector of the block of the object. In addition, this manual incorporates the previous Japanese invention patent application "Special Wishes 2002-118598", "Special Wishes 2002-121053", "Special Wishes 2002-156266", "Special Wishes 2002-177889", "Special Wishes 2002- 193027", "Special Wishes 2002-204713", "Special Wishes 2002-262151", "Special Wishes 2002-20 290542", "Special Wishes 2002-323096", US Applications "60/378643" and "60/378954" Content. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic diagram for explaining the reference relationship of the image of the conventional example. 12 125899 ————— —
P 第2圖係用以說明習知例之直接模式之動作的模式圖P Fig. 2 is a schematic view for explaining the action of the direct mode of the conventional example
V 〇 第3圖(a)係表示使用習知直接模式之空間性的預測方 ‘ 法,而於B圖像參照時間上之前方圖像情形下之移動向量 - 5 預測方法的一例。 第3圖(b)係表示作成各編碼對象圖像之參照圖像列表 的一例。 第4圖(A)、(B)係圖像號碼與參照索引的說明圖。 · 第5圖係表示習知圖像編碼裝置所構成之圖像編碼信 10 號格式的槪念圖。 第6圖係用以說明本發明之實施樣態1及實施樣態2 所構成之編碼動作的方塊圖。 第7圖係用以說明於直接模式中參照移動向量之區塊 具有以參照以顯示時間順序前方之二個移動向量之情形下 15 之動作的模式圖。 第8圖(a)、(b)係用以比較顯示順序及編碼順序之圖像 · 爹照關係的模式圖。 第9圖係用以說明於直接模式中參照移動向量之區塊 # 具有參照以顯示時間順序在後方之二個移動向量之情形下 ~ 2〇 之動作的模式圖。 第10圖(a)、(b)係用以比較顯示順序及編碼順序之圖 像參照關係的模式圖。 第11圖係用以說明本發明之實施樣態5及實施樣態6 所構成之解碼動作的方塊圖。 13 1258991 玖、—ffiOTT— 第12圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在前方之二個移動向量之情形下 之動作的模式圖。 第13圖係用以說明於直接模式中參照移動向量之區塊 5 具有參照以顯示時間順序在後方之二個移動向量之情形下 之動作的模式圖。 第14圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在後方之二個移動向量之情形下 之動作的模式圖。 10 第15圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在前方之二個移動向量之情形下 之動作的模式圖。 第16圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在前方之二個移動向量之情形下 15 之動作的模式圖。 第17圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在前方之二個移動向量之情形下 之動作的模式圖。 第18圖係用以說明於直接模式中參照移動向量之區塊 20 具有參照以顯示時間順序在前方之二個移動向量之情形下 之動作的模式圖。 第19圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在後方之二個移動向量之情形下 之動作的模式圖。 14 1258991 玫τ發明說明+ 第41圖(b)係表示將第41圖(a)所示之框的排列依編碼 順序替換排列情形之順序。 第42圖係表示用以說明第1實施樣態之參照圖像列表 的構造。 5 第43圖(a)係表示使用混合存在以場構造編碼之巨集 區塊配對與以框構造編碼之巨集區塊之情形的直接模式空 間上之預測方法之移動向量計算順序之一例的流程圖。 第43圖(b)係表示編碼對象巨集區塊配對以框構造編 碼之情形下,本發明所應用之周邊巨集區塊配對之配置的 10 一例。 第43圖(c)係表示編碼對象巨集區塊配對以場構造編 碼之情形下,本發明所應用之周邊巨集區塊配對之配置的 一例。 第44圖係表示以框構造編碼情形下之巨集區塊配對的 15資料構成與以場構造編碼情形下之巨集區塊的資料構成。 第45圖係表示第43圖所示之步驟S302之更詳細之處 理順序的流程圖。 第46圖表示參照場索引與參照框索引之關係的關係顯 示圖。 20 第47圖係表示第43圖所示之步驟S303之更詳細之處 理順序的流程圖。 第48圖(a)、(b)係表示用以說明第1實施樣態之編碼 對象區塊配對與周邊巨集區塊配對的位置關係。 第49圖(a)、(b)係表示用以說明第i實施樣態之編碼 17 1258991 玖、發明說明 第3圖(b)係表示作成各編碼對象圖像之參照圖像列表 的一例。在第3圖(b)所示之參照圖像列表1〇以一個b圖 像爲中心而在時間上之其前後顯示,表示可參照該B圖胃 的周邊圖像、此等圖像之圖像型態、圖像號碼u、第i夹 5照索引12及第2參照索引13。圖像號碼U例如表示各圖 像經編碼順序的號碼。第1參照索引12表示對於編碼胃_ 圖像之周邊圖像之相對性位置關係的第1索引,例如 使用於編碼對象圖像參照以顯示時間順序在前方圖像日寺$ 索引。此第1參照索引12之列表稱爲「參照索引列表 10 〇(HstO)」或「第1參照索引列表」。又,參照索引亦稱爲相 對索引。第3圖(b)之參照圖像列表10於第1參照索引12 之値’首先對於具有比編碼對象圖像更前之顯示時刻的參 照圖像,於編碼對象圖像分配以顯示時間順序從較近的順 序由「〇」各上昇「1」之整數値。對於具有比編碼對象圖 15 像更前之顯示時刻之全部參照圖像分配從「〇」各上昇「1 」之値的話,其次對於具有比編碼對象圖像更後之顯示時 刻之參照圖像於編碼對象圖像分配由顯示時間順序較接近 的順序連續之値。 第2參照索引13表示對於編碼對象圖像之周邊圖像之 20 相對性位置關係的第2索引,例如主要使用於編碼對象圖 像參照以顯示時間順序在後方圖像時之索引。此第2參照 索引Π之列表稱爲「參照索引列表l(listl)」或「第2參 照索引列表」。又,第2參照索引I2之値,首先對於具有 比編碼對象圖像更後之顯示時刻的參照圖像,於編碼對象 19 1258991 圖像分配以顯示時間順序從較近的順序由「〇」各上昇「1 」之整數値。對於具有比編碼對象更後之顯示時刻之全部 參照圖像分配從「0」各上昇「1」之値的話,其次對於具 有比編碼對象圖像更前之顯示時刻之參照圖像,於編碼對 5 象圖像分配由顯示時間順序較接近的順序連續之値。因此 ,觀看此參照圖像列表10的話,可得知第1參照索引12 、第2參照索引13,參照索引之値愈小的參照圖像以顯示 時間順序愈接近編碼對象圖像。以上說明了在參照索弓丨$ 初期狀態之號碼的分配方式,然而參照索引之號碼的分酉己 10 方式能以圖像單位或截割(slice)單位來變更。參照索弓丨之^ 號碼的分配方式雖然亦可例如對於以顯示時間順序相離& 圖像分配小的號碼,然而如此的參照索引,例如參照以_ 示時間順序相離之圖像的方式係使用於提昇編碼效率的情 形。即,區塊中的參照索引藉著可變長度碼字而顯現,由 15 於値愈小則分配愈短的碼長的碼,故相對於藉參照而提昇 編碼效率的圖像,以分配較小參照索引而減少參照索引的 碼量進而提昇編碼效率者。 第4圖係圖像號碼與參照索引之說明圖。第4圖表斧: 參照圖像列表之例,乃表示將中央的B圖像(虛線表示考) 2〇 予以編碼時使用之參照圖像及其圖像號碼與參照索引者。 第4圖(A)表示藉第3圖所說明之在初期狀態之參照索引的 分配方式而分配參照索引的情形。 第5圖係表示習知圖像編碼裝置所構成之圖像編碼信 號格式的槪念圖。Picture表示1圖像份量的編碼信號, 20 1258991V 〇 Fig. 3(a) shows an example of a motion vector -5 prediction method in the case of a B-image reference time using the spatial prediction method of the conventional direct mode. Fig. 3(b) shows an example of a reference image list in which each encoding target image is created. Fig. 4 (A) and (B) are explanatory diagrams of an image number and a reference index. Fig. 5 is a view showing a format of an image coding signal No. 10 format constituted by a conventional image coding apparatus. Fig. 6 is a block diagram for explaining the coding operation of the embodiment 1 and the embodiment 2 of the present invention. Fig. 7 is a schematic diagram for explaining the action of the block in which the reference vector is referred to in the direct mode with the reference to display the two motion vectors ahead in the chronological order. Fig. 8 (a) and (b) are images for comparing the display order and the coding order. Fig. 9 is a view for explaining a block in which a motion vector is referred to in the direct mode. # A mode diagram having an action of referring to the two motion vectors in the rear in the chronological order. Fig. 10 (a) and (b) are pattern diagrams for comparing the image reference relationship between the display order and the encoding order. Figure 11 is a block diagram for explaining the decoding operation of the embodiment 5 and the embodiment 6 of the present invention. 13 1258991 —, -ffiOTT - Fig. 12 is a schematic diagram for explaining the operation of the reference moving vector in the direct mode with reference to the two moving vectors in the chronological order. Fig. 13 is a schematic diagram for explaining the operation of the block 5 which refers to the motion vector in the direct mode with reference to the case of displaying the two motion vectors in the rear in the chronological order. Fig. 14 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. 10 Fig. 15 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the two mobile vectors in the chronological order. Fig. 16 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. Fig. 17 is a schematic diagram for explaining the operation of the block in which the motion vector is referred to in the direct mode with reference to the two motion vectors in the chronological order. Fig. 18 is a schematic diagram for explaining the operation of the block 20 which refers to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. Fig. 19 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. 14 1258991 Rose τ invention description + Fig. 41 (b) shows the order in which the arrangement of the frames shown in Fig. 41 (a) is replaced by the coding order. Fig. 42 is a view showing the construction of a reference image list for explaining the first embodiment. 5 Fig. 43(a) shows an example of a motion vector calculation sequence using a prediction method in a direct mode space in which a macroblock block paired with a field structure code and a macroblock block coded by a frame structure are mixed. flow chart. Fig. 43(b) shows an example of the arrangement of the peripheral macroblock pairings to which the present invention is applied in the case where the coding target macroblock pairing is coded in a frame structure. Fig. 43(c) shows an example of the arrangement of the peripheral macroblock pairing to which the present invention is applied in the case where the encoding target macroblock pairing is coded by the field structure. Fig. 44 is a diagram showing the data composition of the macroblock block pairing in the frame structure coding case and the data structure of the macroblock block in the case of the field structure coding. Fig. 45 is a flow chart showing a more detailed sequence of steps of step S302 shown in Fig. 43. Fig. 46 is a view showing the relationship between the reference field index and the reference frame index. 20 Fig. 47 is a flow chart showing a more detailed sequence of steps of step S303 shown in Fig. 43. Fig. 48 (a) and (b) are diagrams showing the positional relationship between the encoding target block pairing and the peripheral macroblock pairing in the first embodiment. Fig. 49 (a) and (b) show coding for explaining the i-th embodiment. 17 1258991 发明, description of the invention Fig. 3(b) shows an example of a reference image list for creating each coding target image. The reference image list 1 shown in FIG. 3(b) is displayed in front of and behind the time centering on one b image, and indicates a peripheral image of the stomach of the B image, and a map of the images. The image type, the image number u, the i-th folder 5, and the second reference index 13. The image number U indicates, for example, the number of each image in the encoding order. The first reference index 12 indicates a first index for the relative positional relationship of the peripheral image of the stomach image, and is used, for example, in the encoding target image to display the chronological order in the front image. The list of the first reference index 12 is referred to as "reference index list 10 〇 (HstO)" or "first reference index list". Also, the reference index is also referred to as a relative index. In the reference image list 10 of FIG. 3(b), after the first reference index 12, first, for the reference image having the display time earlier than the encoding target image, the encoding target image is allocated in display time order from The more recent order is increased by "〇" by an integer of "1". When all the reference image assignments having the display time earlier than the image of the encoding target image 15 are increased by "1" from "〇", the reference image having the display time later than the encoding target image is next. The encoding object image distribution is continuous by the order in which the display time sequences are relatively close. The second reference index 13 indicates a second index of the relative positional relationship with respect to the peripheral image of the image to be encoded, and is mainly used, for example, for the index of the encoding target image to be displayed in the chronological order in the rear image. The list of the second reference index is called "reference index list l (listl)" or "second reference index list". Further, after the second reference index I2, first, for the reference image having the display time later than the encoding target image, the image is assigned to the encoding target 19 1258991 in order of display time from the closer order by "〇". Raise the integer 「 of "1". When all the reference image assignments having the display time later than the encoding target are increased by "1" from "0", the reference image having the display time earlier than the encoding target image is used in the encoding pair. 5 Image image assignment is continuous by the order in which the display time sequence is closer. Therefore, when the reference image list 10 is viewed, the first reference index 12 and the second reference index 13 can be known, and the reference image whose reference index is smaller is closer to the encoding target image in the display time order. The above has explained the allocation method of the number in the initial state of the reference cable. However, the method of referring to the number of the index can be changed in the image unit or the slice unit. Referring to the method of assigning the numbers of the reference numerals, for example, it is also possible to assign a small number to the image in the order of display time, but such a reference index, for example, refers to an image in which the images are separated in time order. It is used in situations where coding efficiency is improved. That is, the reference index in the block is represented by the variable length codeword, and the code of the shorter code length is allocated from 15 when the recovery is smaller, so that the image with higher coding efficiency is improved relative to the reference. A small reference index reduces the amount of code of the reference index and further improves the coding efficiency. Fig. 4 is an explanatory diagram of an image number and a reference index. The fourth chart axe: The example of the reference image list indicates the B image at the center (the dotted line indicates the test). 2) The reference image used for encoding and its image number and reference index. Fig. 4(A) shows a case where the reference index is allocated by the allocation method of the reference index in the initial state explained in Fig. 3. Fig. 5 is a view showing a format of an image coded signal format constituted by a conventional image coding apparatus. Picture indicates the encoded signal of 1 image size, 20 1258991
Header表示包含於圖像前頭之前頭編碼信號,Blockl表示 以直接模式所構成之區塊的編碼信號,Block2表示以直接 模式以外之插値預測所構成之區塊的編碼信號,RidxO、 Ridxl分別表示第1參照索引及第2參照索引,MV0、 5 MV1分別表示第1移動向量及第2移動向量。編碼區塊 Block2係用以表示使用於插値之二個參照圖像而將參照索 引RidxO、Ridxl依此順序設於編碼信號中。又,編碼區塊 Block2之第1移動向量MV0與第2移動向量MV1以此順 序在編碼區塊Block2之編碼信號內被編碼。到底要使用參 10 照索引RidxO、Ridxl之其中何者,乃能以PredType來判 斷。又,以第1參照索引RidxO表示引第1移動向量MV0 要參照之圖像(第1參照圖像),以第2參照索引Ridxl表 示引第2移動向量MV1要參照之圖像(第2參照圖像)。例 如表示在移動向量MV0及MV1之二個方向參照圖像的情 15 形下可使用RidxO及Ridxl,表示在移動向量MV0或MV1 之其中一個方向參照圖像的情形下可使用因應該移動向量 之參照索引的RidxO或Ridxl,而在表示直接模式的情形 下RidxO、Ridxl均不使用。第1參照圖像藉第1參照索引 而指定,一般爲具有比編碼對象圖像更前之顯示時刻的圖 20 像,第2參照圖像藉第2參照索引而指定,一般爲具有比 編碼對象圖像更後之顯示時刻的圖像。但是由第4圖之參 照索引的授與方法例可得知亦可第1參照圖像係具有比編 碼對象圖像更後之顯示時刻的圖像,而第2參照圖像係具 有比編碼對象圖像更前之顯示時刻之圖像的情形。第1參 21 1258991 — — ——Header indicates the header coded signal before the head of the picture, Block1 indicates the coded signal of the block formed by the direct mode, and Block2 indicates the coded signal of the block formed by the interpolation prediction other than the direct mode, RidxO and Ridxl respectively indicate The first reference index and the second reference index, MV0 and 5 MV1 respectively indicate the first motion vector and the second motion vector. The coding block Block 2 is used to indicate the two reference pictures used for the interpolation, and the reference indices RidxO and Ridxl are set in the coded signal in this order. Further, the first motion vector MV0 and the second motion vector MV1 of the coding block Block 2 are encoded in the coded signal of the coding block Block2 in this order. In the end, you can use the PredType to determine which of RidxO and Ridxl is used. Further, the image to be referred to by the first motion vector MV0 (first reference image) is indicated by the first reference index RidxO, and the image to be referred to by the second motion vector MV1 is indicated by the second reference index Ridx1 (second reference) image). For example, RidxO and Ridx1 can be used in the case of referring to the image in the two directions of the motion vectors MV0 and MV1, and it is indicated that the vector can be used in the case where the image is referred to in one of the motion vectors MV0 or MV1. Refer to RidxO or Ridxl of the index, and in the case of direct mode, RidxO and Ridxl are not used. The first reference image is specified by the first reference index, and is generally a picture of FIG. 20 having a display time earlier than the image to be encoded. The second reference picture is specified by the second reference index, and generally has a comparison target. The image is displayed later in the image. However, it can be seen from the example of the method of the reference index of FIG. 4 that the first reference image system has an image at a display time later than the image to be encoded, and the second reference image has a comparison target. The case where the image is displayed in front of the image. The first reference 21 1258991 — — —
照索引RidxO表示參照區塊Block2之第1移動向量MVO 之第1參照圖像的參照索引,第2參照索引Ridxl表示參 · 照區塊Block2之第2移動向量MV1之第2參照圖像的參 , 照索引。 5 另一方面,藉使用編碼信號中的緩衝控制信號(第5圖The index RidxO indicates the reference index of the first reference image of the first motion vector MVO of the reference block Block2, and the second reference index Ridx1 indicates the reference of the second reference image of the second motion vector MV1 of the reference block Block2. , according to the index. 5 On the other hand, by using the buffer control signal in the encoded signal (Figure 5)
Header內的RPSL)而明示性的指示,乃能任意地變更對參 - 照索引之參照圖像的分配。亦可藉此變更分配而能使第2 參照索引將「0」之參照圖像設成任意的參照圖像,例如第 春 4圖(B)所示能變更對圖像號碼之參照索引的分配。 10 爰此,由於能任意地變更對參照索引之參照圖像的分 配,且由於一般變更對此參照索引之參照圖像的分配,參 照圖像乃藉著選擇而相對於編碼效率變高之圖像要分配更 ~ 小的參照索引,因此一旦將移動向量所參照之參照圖像之 參照索引値爲最小的移動向量設爲直接模式中所使用之移 15 動向量的話,能提高編碼效率。 (實施樣態1) · 以第6圖所示之方塊圖來說明本發明之實施樣態1之 動態圖像編碼方法。 ’ 成爲編碼對象之動態圖像依時間順序而以圖像單位輸 u 20 入框記憶體101,並依進行編碼的順序替換排列。各個圖 像稱爲區塊。例如分割成水平16 X垂直16像素的群而能 以區塊單位進行之後的處理。 從框記憶體101讀出之區塊被輸入移動向量檢測部 106。在此說明將儲存於框記憶體105之編碼完之圖像予以 22 1258991 莰— —— — · 解碼之圖像作爲圖像使用而進行檢測作爲編碼對象之區塊 的移動向量。此時在模式選擇部107參照著在移動向量檢 測部106獲得之移動向量或在記憶於移動向量記憶部108 , 之編碼完的圖像使用之移動向量而決定最適當的預測模式 - 5 。依據在模式選擇部1〇7獲得之預測模式與使在其預測模 式使用之移動向量而決定之預測圖像被輸入差分運算部 ' 109,藉取得與編碼對象之區塊的差分而產生預測殘差圖像 ,並於預測殘差編碼部102進行編碼。又,爲了敷使在模 隹 式選擇部107獲得之預測模式使用之移動向量利用於之後 10 的圖像或區塊的編碼,而記憶於移動向量記憶部108。以 上處理的流程爲選擇圖像間預測編碼時的動作,惟能以開 關111進行與圖像內預測編碼的切換。最後藉著碼列產生 部103而對於從移動向量等之控制資訊及預測殘差編碼部 102輸出之圖像資訊進行可變長度編碼而產生最後輸出的 15 碼列。 以上表示了編碼之流程槪要,然而在以下要說明詳細 · 的移動向量檢測部106及模式選擇部107的處理。 移動向量的檢測係於每個區塊或每個分割區塊的領域 ’ 進行。對於作爲編碼對象之圖像乃以顯示時間順序將位於 & 2〇 前方及後方之編碼完的圖像作爲參照圖像,並於該圖像內 之探索領域藉著決定表示其預測爲最適當之位置的移動向 量及預測模式而作成夤預測圖像。 ~ 參照以顯示時間順序在前方及後方之二幀圖像,作爲 進行圖像間預測編碼之二個方向預測之一者乃有直接模式 23 1258991 wvmmm ———— — 。直接模式並非直接使編碼對象之區塊具有移動向量,而 係以參照以顯示時間順序在近旁之編碼完圖像內之相同位 置區塊的移動向量而算出用以實際進行補償之二個移動向 量並作成預測圖像。 5 第7圖係說明於直接模式中用以決定移動向量而參照 之移動向量之區塊具有參照以顯示時間順序在前方之二幀 圖像之二個移動向量之情形下之動作者。圖像P23爲係作 爲現在編碼對象的圖像,而將圖像P22及圖像P24作爲參 照圖像而進行二個方向預測者。一旦將要進行編碼之區塊 10 設爲區塊MB21時,則此時被視爲必要之二個移動向量係 使用位於編碼完之後方參照圖像(以第2參照索引指定之 第2參照圖像)之圖像P24相同位置之區塊MB22所具有之 移動向量而決定。此區塊MBU在作爲移動向量上乃具有 移動向量MV21及移動向量MV22等二個,因此,無法藉 15 著應用與式1同樣直接定標而算出要求之出之二個移動向 量MVU及移動向量MV24。因此如式2在作爲應用定標 之移動向量上,乃從區塊MB22所具有之二個移動向量之 平均値算出移動向量MV_REF,同樣地從平均値算出此時 的時間間隔TR—REF。依據式3而對於移動向量MV— 20 REF及時間間隔TR—REF以應用定標而算出移動向量 MV23及移動向量MV24。此時之時間間隔TR21表示從圖 像P24至圖像PM,亦即表示至移動向量MV21所參照之 圖像爲止之時間間隔,時間間隔TR22表示至移動向量 MV22所參照之圖像爲止的時間間隔。又,時間間隔TR23 24 1258991 ------------------------------------------- - 表示至移動向量MV23所參照之圖像爲止的時間間隔,時 間間隔TR24表示至移動向量MV24所參照之圖像爲止的 時間間隔。此等圖像間之時間間隔能依據例如附於各圖像 之表示顯示時間或顯示順序的資訊,或是依據其資訊差而 5決定。又,在第7圖例子之作爲編碼對象的圖像係參照相 鄰的圖像,惟即使參照非相鄰的圖像時亦能進行同樣的處 理。The RPSL in the header and the explicit indication can arbitrarily change the allocation of the reference image to the index. By changing the allocation, the reference image of "0" can be set to an arbitrary reference image in the second reference index. For example, the assignment of the reference index to the image number can be changed as shown in Fig. 4 (B). . In this case, since the assignment of the reference image to the reference index can be arbitrarily changed, and the assignment of the reference image to the reference index is generally changed, the reference image is increased in comparison with the coding efficiency by selection. As if a smaller reference index is to be allocated, the coding efficiency can be improved by setting the motion vector whose reference index of the reference image referenced by the motion vector to the minimum is set to the motion vector used in the direct mode. (Implementation Mode 1) A moving picture coding method according to Embodiment 1 of the present invention will be described with reference to a block diagram shown in Fig. 6. The moving image to be encoded is input to the frame memory 101 in units of images in chronological order, and is arranged in the order in which the encoding is performed. Each image is called a block. For example, it is divided into groups of 16 X vertical and 16 pixels horizontally, and the subsequent processing can be performed in block units. The block read from the frame memory 101 is input to the motion vector detecting unit 106. Here, it is explained that the encoded image stored in the frame memory 105 is used as an image to detect the motion vector of the block to be encoded as the image to be decoded. At this time, the mode selection unit 107 refers to the motion vector obtained by the motion vector detecting unit 106 or the motion vector used in the encoded image stored in the motion vector storage unit 108 to determine the most appropriate prediction mode -5. The prediction image obtained by the mode selection unit 1〇7 and the prediction image determined by using the motion vector used in the prediction mode are input to the difference calculation unit '109, and the prediction residual is generated by taking the difference from the block to be coded. The difference image is encoded by the prediction residual encoding unit 102. Further, the motion vector used in the prediction mode obtained by the modular selection unit 107 is used for encoding the image or block of the subsequent 10, and is stored in the motion vector storage unit 108. The above processing flow is an operation for selecting inter-picture predictive coding, and switching with intra-picture predictive coding can be performed only by the switch 111. Finally, the code column generating unit 103 performs variable length coding on the control information output from the motion vector and the image information output from the prediction residual encoding unit 102 to generate a final output 15 code sequence. The above shows the flow of the encoding. However, the processing of the motion vector detecting unit 106 and the mode selecting unit 107 will be described in detail below. The detection of the motion vector is performed in the field of each block or each partition. For the image to be encoded, the encoded image located in front of and behind the & 2 is used as the reference image in the display time sequence, and the prediction field in the image is determined by the decision to be the most appropriate. The motion vector and the prediction mode of the position are used as the predicted image. ~ Refer to the two frames of images in front and back in order to display one of the two directions for inter-picture predictive coding. There is a direct mode 23 1258991 wvmmm —————— . The direct mode does not directly make the block of the coding object have a motion vector, but calculates the two motion vectors for actually compensating by referring to the motion vector of the same position block in the coded image in the chronological order. And make a predicted image. 5 Fig. 7 illustrates the actor in the case where the block of the motion vector referred to in the direct mode for determining the motion vector has a reference to display two motion vectors of the two frames in front of the chronological order. The image P23 is an image to be encoded now, and the image P22 and the image P24 are used as reference images to perform two-direction prediction. When the block 10 to be coded is set as the block MB21, the two motion vectors that are deemed to be necessary at this time use the second reference image specified by the second reference index after the encoding is completed. The image P24 is determined by the motion vector of the block MB22 at the same position. The block MBU has two motion vectors MV21 and a motion vector MV22 as motion vectors. Therefore, it is impossible to directly calculate the required two motion vectors MVU and motion vectors by applying the same direct scaling as Equation 1. MV24. Therefore, as in Equation 2, on the motion vector to which the application is scaled, the motion vector MV_REF is calculated from the average of the two motion vectors of the block MB22, and the time interval TR_REF at this time is calculated from the average 同样. The motion vector MV23 and the motion vector MV24 are calculated for the motion vector MV-20 REF and the time interval TR_REF by applying scaling according to Equation 3. At this time, the time interval TR21 indicates the time interval from the image P24 to the image PM, that is, the image to which the motion vector MV21 refers, and the time interval TR22 indicates the time interval until the image to which the motion vector MV22 refers. . Also, the time interval TR23 24 1258991 ------------------------------------------- - The time interval until the image referred to by the motion vector MV23 is indicated, and the time interval TR24 indicates the time interval until the image referred to by the motion vector MV24. The time interval between the images can be determined based on, for example, information indicating the display time or display order of each image, or based on the information difference. Further, the image to be encoded in the example of Fig. 7 refers to an adjacent image, but the same processing can be performed even when referring to a non-adjacent image.
MV_REF= (MV21 + MV22)/2 · · · ·式 2 ⑷ 10 TR_REF- (TR21 + TR22)/2 · · · ·式 2 (b) MV23 = MV—REF/TR—REF x TR23 (a) MV24- -MV_REF/TR_REF x TR24 15 (b)MV_REF= (MV21 + MV22)/2 · · · · Equation 2 (4) 10 TR_REF- (TR21 + TR22)/2 · · · · Equation 2 (b) MV23 = MV—REF/TR—REF x TR23 (a) MV24 - -MV_REF/TR_REF x TR24 15 (b)
如所述,上述實施型態表示於直接模式中,參照移 動向量之區塊具有參照以顯示時間順序在前方之圖像之多 數移動向量的情形下,使用前述多數移動向量而產生一個 $重力向4 ’藉著應用定標而決定用以實際使用於移動向補 20 償的二個移動向量,即使於直接模式中參照移動向量之區 b圖像的情形下亦能無矛盾地使用直接模式進行圖 像間預測編碼的編碼方法。 又’要求出第7圖中的二個移動向量MV23及移動向 胃MV24時,用以算出成爲進行定對標之對象的移動向量 25 1258991 玖、翻— - MV—REF及時間間隔TR—REF,而在取得移動向量 MV21與移動向量MV22與之平均値及時間間隔TR21與時 間間隔TR22之平均値的方法上,乃可取代式2而使用式4 。首先,如第4圖⑷所示對於移動向量MV21時間間隔與 5 移動向量MV22相同地進行定標並算出移動向量MV21,。 藉取得移動向量MV21’與移動向量MV22的平均而決定移 動向量MV—REF。此時時間間隔TR_REF乃原原本本地 使用時間間隔TR22。又,取代對於移動向量MV21施予定 標而設成移動向量MV21’的情形而對於移動向量MV22施 1〇 予定標而設成移動向量MV22’的情形亦能同樣地進行。 MV21,= MV21/TR21 X TR22 · · · ·式 4 ⑷ MV_REF=(MV21’ + MV22)/2 · · · ·式 4 (b) 15 TR_REF=TR22 · · ••式 4 (c) 又,於算出第7圖之二個移動向量MV23及移動向量 MV24之際,作爲要施予定標之對象之移動向量MV_REF 及時間間隔TR_REF乃可取代式2之使用二個移動向量的 20 平均値,而可直接使用式5之參照對於參照移動向量之圖 像P24之時間間隔短的圖像P22的移動向量MV22及時間 間隔TR22。同樣地可將參照時間間隔長的圖像P21的移動 向量MV21及時間間隔TR21作爲移動向量MV—REF及時 間間隔TR_REF而直接使用。藉此方法,屬於要參照移動 26 1258991 向量之圖像P24之各區塊能以僅記憶二個移動向量之中的 單方的狀態而實現移動補償,因此能將編碼裝置之移動向 量記憶部的容量抑制得小。 MV_ 一 REF 二 :MV22 • · ••式 5 5 (a) TR 一 _REF二 TR22 • · · ·式 5 (b) MV. 一 REF 二 :MV21 • · · ·式 6 (a) 10 TR 一 _REF = TR21 • · · •式 6 (b) 又,於算出第7圖之二個移動向量MV23及移動向量 MV24之際,作爲要施予定標之對象之移動向量MV—REF 及時間間隔TR一REF乃可取代式2之使用二個移動向量的 15平均値,而直接使用參照要編碼之順序在先之圖像的移動 向量。第8圖(a)是表示與第7圖以作爲動態圖像顯示之圖 像的排列方式的參照關係者,在第8圖(b)表示於第6圖之 框記憶體101要編碼之順序替換排列的一例。又,圖像 P23表示藉著直接模式而進行編碼的圖像,圖像24表示其 20時參照移動向量的圖像。如第8圖(b)那般替換排列時,由 於直接使用爹照要編碼之順序在先之圖像的移動向量,故 如式5所示,能直接應用移動向量MV22及時間間隔TR22 以作爲移動向量MV—REF及時間間隔TR—REF。同樣地 ,亦可直接使用參照要編碼之順序在後之圖像的移動向量 27 1258991 。此情形下,如式6所示,能直接應用移動向量MV21及 時間間隔TR21以作爲移動向量MV—REF及時間間隔TR _REF。藉此方法,屬於要參照移動向量之圖像p24之各 區塊能以僅記憶二個移動向量之中的單方的狀態而實現移 5動補償’因此能將編碼裝置之移動向量記憶部的容量抑制 得小。 又’於本貫施樣態說明了對於要參照之移動向量使用 圖像間之時間的距離而進行定標,而計算於直接模式使 用之移動向量的情形,此亦可將要參照之移動向量予以常 1〇數倍計算。在此說明,使用於常數倍之常數在以多數區塊 單位或多數圖像單位編碼或解碼的情形下亦可變更。 又’於式2(a)或式4(b)計算移動向量MV_REF之際 ’計算式2(a)或式4(b)之右邊後,亦可弄在預定之移動向 量精確度(例如1/2像素精確度之移動向量的話爲〇.5像 15素單位之値)內。至於移動向量之精確度並不限於1/2像 素精確度。且此移動向量的精確度例如決定於區塊單位、 圖像單位、順序單位。又,於式3(a)、 式3(b)、或4(a)計 算移動向量MV23、移動向量MV24、移動向量MV21,之 際亦可hn十算式3(a)、式3(b)、或4(a)之右邊後弄成預定 20 之移動向量精確度。 (實施樣態2) 依據第6圖之編碼處理的槪要乃與實施樣態1完全相 同。於此使用第9圖來詳細說明對於直接模式之二個方向 預測的動作。 28 1258991 玖、SHMT— — — 第9圖係說明於直接模式中用以決定移動向量而參照 之區塊具有參照以顯示時間順序在後方之二個移動向量之 情形下的動作。圖像P43係現在編碼對象的圖像,將圖像 P42及圖像P44當作參照圖像而進行二個方向預測者。一 5旦將要進行編碼之區塊設成區塊MB41,則此時視爲必要 之二個移動向量乃使用位於編碼完後方參照圖像(第2參照 索引所指定之第2參照圖像)之圖像P44相同位置之區塊 MB42所具有的移動向量而決定。此區塊MB42具有移動 向量MV45及移動向量MV46等二個移動向量,因此無法 10與式1同樣地直接應用定標來算出所要求出的二個移動向 量MV43及移動向量MV44。如第7圖所示,在作爲應用 定標之移動向量上乃從區塊MB42具有之二個移動向量的 平均値來決定移動向量MV_REF,同樣地由平均値來決定 此時之時間間隔TR—REF。依據式8而對於移動向量MV 15 —REF及時間間隔TR_REF藉著應用定標算出移動向量 MV43及移動向量MV44。此時時間間隔TR45表示從圖像 P44至圖像P45,亦即表示至移動向量MV45所參照之圖 像爲止之時間的間隔,時間間隔TR46表示至移動向量 MV46所參照之圖像爲止之時間的間隔。又,時間間隔 20 TR43表示至移動向量MV43所參照之圖像爲止之時間的間 隔。時間間隔TR44表示至移動向量MV44所參照之圖像 爲止之時間的間隔。此等圖像間的時間間隔乃與實施樣態 1所說明的情形相同,例如依據表示附於各圖像之顯示時 間或顯示順序之資訊、或其資訊差而決定。又,第9圖之 29 1258991 例子之作爲編碼對象的圖像係參照相鄰的圖像,惟參照非 相鄰之圖像時亦能同樣地處理。 MV_REF= (MV45 + MV46)/2 (a) • · · ·式 7 5 TR—REF = (TR45 + TR46)/ 2 (b) • · ••式 7 MV43= -MV_REF/TR_REF x TR43 (a) • · · ·式 8 MV44=MV_REF/TR_REF x TR44 • · ••式 8 10 (b) 如上所述上述實施樣態,揭示了一種編碼方法,係於 直接模式參照移動向量之區塊具有參照以顯示時間順序在 後方之圖像的多數移動向量的情形下,使用前述多數移動 向量而產生一個移動向量,藉著應用定標而決定用以實際 15 使用於移動補償之二個移動向量,而於直接模式即使參照 移動向量之區塊屬於B圖像的情形下亦能無矛盾地達到使 用直接模式之圖像間預測編碼的編碼方法。 又,要求得第9圖中之二個移動向量MV43及移動向 量MV44之際,爲了算出施予定標之對象的移動向量MV 20 —REF及時間間隔TR—REF,在作爲取得移動向量MV45 與移動向量MV46之平均値及時間間隔TR45與時間間隔 TR46之平均値的方法上,可取代式7而使用式9。首先, 如第9圖(a)對移動向量MV46施予定標以使時間間隔與移 動向量MV45相同那般地算出移動向量MV46,。以取得移 30 1258991 發明說明 動向量MV46’與移動向量MV45之平均而決定移動向量 MV_REF。此時時間間隔TR_REF則原原本本地使用時 間間隔TR41。又,取代對移動向量MV46施予定標而作爲 移動向量MV46’而改以對移動向量MV45施予定標而作爲 5 移動向量MV45’的情形亦能同樣地處理。 MV46,-MV46/TR46 x TR45 · · · ·式 9 (a) MV_REF=(MV46’ + MV45)/2 · · · •式 9 (b) 10 TR_REF-TR45 · · · ·式 9 (c) 又,於算出第9圖之二個移動向量MV43及移動向量 MV44之際,在作爲施予定標對象之移動向量MV—REF 及時間間隔TR—REF上,乃可取代式7之使用二個移動向 15 量的平均値,而如式10對於要參照之移動向量之圖像P44 直接使用參照時間間隔短的圖像P45的移動向量MV45及 時間間隔TR45。同樣地,亦可如式11將要參照之時間間 隔長的圖像P46之移動向量MV46及時間間隔TR46作爲 移動向量MV—REF及時間間隔TR—REF而直接使用。藉 20 此方法,屬於要參照移動向量之圖像P44之各區塊能以僅 記憶二個移動向量之中的單方的狀態而實現移動補償,因 此能將編碼裝置之移動向量記憶部的容量抑制得小。 MV_REF = MV45 · · · ·式 10 1258991 玖、— TR 一 一REF=TR45 • · · ·式 10 (b) MV_ _REF=MV46 • · ••式 11 ⑷ TR 一 一 REF=TR46 • · · ·式 11 (b) 又, 於算出第9圖之 :二個移動向量MV43及移動向量 MV44之際,在作爲施予定標對象之移動向量MV_REF 及時間間隔TR—REF上,乃可取代式7之使用二個移動向 10量的平均値,而直接使用參照要編碼之順序爲先之圖像的 移動向量。第10圖(a)表示如同第9圖作爲動態圖像顯示 之順序之圖像的排列方式的參照關係者,第10圖(b)表示 於第6圖之框記憶體101以要編碼之順序替換排列之一例 。又,圖像P43表示藉直接模式而進行編碼的圖像,圖像 15 P44表示於此時參照移動向量的圖像。由第10圖(b)替換排 列時藉著直接使用參照要編碼之順序爲先之圖像的移動向 量,而能如式11直接使用移動向量MV46及時間間隔 TR46以作爲移動向量MV—REF及時間間隔TR—REF。同 樣亦能直接使用參照編碼順序爲後之圖像的移動向量。此 20 情形下,如式10可直接應用移動向量MV45及時間間隔 TR#以作爲移動向量MV_REF及時間間隔TR—REF。藉 此方法’屬於要參照移動向量之圖像P44之各區塊能以僅 記憶二個移動向量之中的單方的狀態而實現移動補償,因 此能將編碼裝置之移動向量記憶部的容量抑制得小。 32 1258991 莰、——— —— 又,於直接模式用以決定移動向量而參照之圖像係參 照以顯示時間順序在後之二幀圖像的二個移動向量時,亦 可將要求得之二個移動向量MV43及移動向量MV44設爲 「〇」而進行移動補償。藉此方法,屬於要參照移動向量之 5圖像P44之各區塊能不必要先_3憶移動向量,因此能將編 碼裝置之移動向量記憶部的容量抑制得小,且能省略用以 算出移動向量的處理。 又,於直接模式用以決定移動向量而參照之圖像具有 參照以顯示時間順序在後方之二幀圖像之二個移動向量的 10情形下,亦可禁止參照移動向量而僅應用直接模式以外的 預測編碼。如第9圖之圖像P44參照以顯示時間順序在後 方之二幀圖像的情形下,可得知與以顯示時間順序在前方 之圖像相關的可能性低,故以禁止直接模式而選擇其他的 預測方法乃能產生更正確的預測圖像。 15 又,於本實施樣態說明了對於要參照之移動向量使用 圖像間之時間上的距離而予以定標,藉此計算於直接模式 使用的移動向量的情形,此亦可將要參照之移動向量予以 常數倍g十算。在此說明,使用於常數倍之常數在以多數區 塊單位或多數圖像單位編碼或解碼的情形下亦可變更。 20 又’於式7(a)或式9(b)計算移動向量MV—REF之際 ’ §十算式7(a)或式9(b)之右邊後,亦可弄在預定之移動向 量精確度內。至於移動向量之精確度乃有1/2、1/3像素 、1/4像素精確度。且此移動向量的精確度例如決定於區 塊單位、圖像單位、順序單位。又,於式8(a)、式8(b)、 33 1258991 9(a)計算移動向量MV43 '移動向量MV44、移動向量 MV46’之際亦可於計算式8(a)、式8(b)、或9(a)之右邊後 弄成預定之移動向量精確度。 (實施樣態3) 5 以弟11圖之所不之方塊圖來說明本發明之實施樣態3 之動態圖像編碼方法。惟係輸入以實施樣態1之動態圖像 編碼方法產生的碼列者。 首先’藉著碼列解析器601而從已輸入之碼列抽出預 測模式、移動向量資訊及預測殘差編碼資料等各種資訊。 10 對預測模式/移動向量解碼部608輸出預測模式或移 動向量資訊,對預測殘差解碼部602輸出預測殘差編碼資 料。在預測模式/移動向量解碼部608進行預測模式之解 碼與該預測模式使用之移動向量的解碼。移動向量之解碼 之際利用記憶在移動向量記憶部605之解碼完的移動向量 15 。對移動向補償解碼部6〇4輸出經解碼之預測模式及移動 向量。又,爲使經解碼之移動向量利用於之後之區塊的移 動向量的解碼而記憶於移動向量記憶部605。在移動向補 償解碼部604將儲存於框記憶體603之解碼完之圖像的解 碼圖像當作參照圖像並依據已輸入之預測模式或移動向量 2〇資訊而產生預測圖像。如此產生之預測圖像輸入加法計運 算部606而藉著進行與於預測殘差解碼部602產生之預測 殘差圖像的加算而產生解碼圖像。以上實施樣態係對於進 行圖像間預測編碼之碼列的動作,惟可藉著開關607而進 行與對於在圖像內預測編碼之碼列之解碼處理的切換。 34 1258991 玖、—— 以上表示解碼之流程的槪要,而於以下說明移動向補 償解碼部604之處理的詳細。 移動向量資訊附加於每個區塊或每個分割區塊的領域 。對於當作解碼對象之圖像以顯示時間順序在前方或在後 5 方位置之解碼完的圖像當作參照圖像而藉著經解碼的移動 向量而從該圖像內產作成用以進行移動向補償的預測圖像 〇 參照以顯示時間順序在前方及後方之各一幀的圖像而 作爲進行圖像間預測編碼之二個方向預測之一個乃有直接 10 模式。在直接模式之解碼對象的區塊直接輸入非具有移動 向量之碼列,因此藉著參照以顯示時間順序在近旁之解碼 完圖像內相同位置之區塊的移動向量,而算出用以實際進 行移動補償之二個移動向量而作成預測圖像。 第7圖係說明於直接模式中用以決定移動向量而參照 15 之移動向量之區塊具有參照以顯示時間順序在前方之二幀 圖像之二個移動向量之情形下之動作者。圖像P23爲係作 爲現在編碼對象的圖像,而將圖像P22及圖像P24作爲參 照圖像而進行二個方向預測者。一旦將要進行編碼之區塊 設爲區塊MB21時,則此時被視爲必要之二個移動向量係 20 使用位於編碼完之後方參照圖像(以第2參照索引指定之 第2參照圖像)之圖像P24相同位置之區塊MB22所具有之 移動向量而決定。此區塊MB22在作爲移動向量上乃具有 移動向量MV21及移動向量MV22等二個,因此,無法藉 著應用與式1同樣直接定標而算出要求之出之二個移動向 35 1258991 —一—— — — " ~ 量MV23及移動向量MV24。因此如式2在作爲應用定標 之移動向量上’乃從區塊MB22所具有之二個移動向量之 平均値算出移動向量MV—REF ’同樣地從平均値算出此時 ’ 的時間間隔TR—REF。依據式3而對於移動向量MV_ ‘ 5 REF及時間間隔TR—REF以應用定標而算出移動向量 MV23及移動向量MV24。此時之時間間隔TR21表示從圖 ’ 像P24至圖像P21,亦即表示至移動向量MV21所參照之 圖像爲止之時間間隔’時間間隔TR22表示至移動向量 · MV22所參照之圖像爲止的時間間隔。又,時間間隔TR23 10 表示至移動向量MV23所參照之圖像爲止的時間間隔,時 - 間間隔TR24表示至移動向量MVM所參照之圖像爲止的 時間間隔。此等圖像間之時間間隔能依據例如附於各圖像 之表示顯示時間或顯示順序的資訊,或是依據其資訊差而 決定。又,在第7圖例子之作爲編碼對象的圖像係參照相 15鄰的圖像,惟即使參照非相鄰的圖像時亦能進行同樣的處 理。 · 如上所述,上述實施型態表示於直接模式中,參照移 動向量之區塊具有參照以顯示時間順序在前方之圖像之多 y 數移動向量的情形下,使用前述多數移動向量而產生一個 3 20移動向量’藉著應用定標而決定用以實際使用於移動向補 償的二個移動向量,即使於直接模式中參照移動向量之區 塊屬於B圖像的情形下亦能無矛盾地使用直接模式進行圖 — 像間預測編碼的編碼方法。 又’要求出第7圖中的二個移動向量MV23及移動向 36 1258991 量MV2之際,用以算出成爲進行定對標之對象的移動向量 MV_REF及時間間隔TR_REF,而在取得移動向量 MV21與移動向量MV22與之平均値及時間間隔TR21與時 間間隔TR22之平均値的方法上,乃可取代式2而使用式4 5 。首先,如第4圖(a)所示對於移動向量MV21時間間隔與 移動向量MV22相同地進行定標並算出移動向量MV21’。 藉取得移動向量MV21’與移動向量MV22的平均而決定移 動向量MV_REF。此時時間間隔TR—REF乃原原本本地 使用時間間隔TR22。又,取代對於移動向量MV21施予定 10 標而設成移動向量MV21’的情形而對於移動向量MV22施 予定標而設成移動向量MV22’的情形亦能同樣地進行。 又,於算出第7圖之二個移動向量MV23及移動向量 MV24之際,作爲要施予定標之對象之移動向量MV_REF 及時間間隔TR_REF乃可取代式2之使用二個移動向量的 15 平均値,而可直接使用式5之參照對於參照移動向量之圖 像P24之時間間隔短的圖像P22的移動向量MV22及時間 間隔TR22。同樣地可將參照時間間隔長的圖像P21的移動 向量MV21及時間間隔TR21作爲移動向量MV—REF及時 間間隔TR_REF而直接使用。藉此方法,屬於要參照移動 20 向量之圖像P24之各區塊能以僅記憶二個移動向量之中的 單方的狀態而實現移動補償,因此能將解碼裝置之移動向 量記憶部的谷量抑制得小。As described above, the above embodiment is shown in the direct mode, in the case where the block of the reference motion vector has a reference to display a majority of the motion vector of the image in front of the time sequence, a majority of the motion vector is used to generate a gravity direction. 4 'Determining the two motion vectors actually used for the motion-to-compensation 20 by applying the calibration, even in the case of referring to the region b image of the motion vector in the direct mode, the direct mode can be used without contradiction. The coding method of inter-picture predictive coding. In addition, when the two motion vectors MV23 in FIG. 7 and the movement to the stomach MV24 are requested, the motion vector 25 1258991 翻, —-MV-REF, and time interval TR_REF for calculating the target to be benchmarked are calculated. On the method of obtaining the average 値 of the motion vector MV21 and the motion vector MV22 and the average 时间 of the time interval TR21 and the time interval TR22, Equation 4 can be used instead of Equation 2. First, as shown in Fig. 4 (4), the motion vector MV21 time interval is scaled in the same manner as the 5 motion vector MV22, and the motion vector MV21 is calculated. The motion vector MV_REF is determined by taking the average of the motion vector MV21' and the motion vector MV22. At this time, the time interval TR_REF is the original local use time interval TR22. Further, the case where the motion vector MV21 is set as the motion vector MV21' and the motion vector MV22 is scaled to the motion vector MV22' can be similarly performed. MV21, = MV21/TR21 X TR22 · · · · Equation 4 (4) MV_REF=(MV21' + MV22)/2 · · · · Equation 4 (b) 15 TR_REF=TR22 · · •• Equation 4 (c) Again, When calculating the two motion vectors MV23 and the motion vector MV24 in FIG. 7, the motion vector MV_REF and the time interval TR_REF, which are objects to be scaled, can replace the 20 average 使用 of the two motion vectors of Equation 2, but The reference of Equation 5 is directly used for the motion vector MV22 and the time interval TR22 of the image P22 having a short time interval with reference to the image P24 of the motion vector. Similarly, the motion vector MV21 and the time interval TR21 of the image P21 having a long reference time interval can be directly used as the motion vector MV_REF time interval TR_REF. By this method, each block belonging to the image P24 to which the mobile 26 1258991 vector is to be referred to can perform motion compensation by memorizing only one of the two motion vectors, and thus the capacity of the motion vector memory portion of the encoding device can be realized. The suppression is small. MV_ REF 2: MV22 • · •• 式 5 5 (a) TR _REF 2 TR22 • · · · Equation 5 (b) MV. A REF 2: MV21 • · · · Equation 6 (a) 10 TR _REF = TR21 • · · • Equation 6 (b) In addition, when calculating the two motion vectors MV23 and MV24 of Fig. 7, as the motion vector MV_REF and time interval TR to be subjected to scaling A REF can be used instead of the 15 値 of the two motion vectors of Equation 2, and the motion vector of the previous image with reference to the sequence to be encoded is directly used. Fig. 8(a) is a reference relationship showing an arrangement pattern of images to be displayed as moving images in Fig. 7, and Fig. 8(b) shows the order in which the frame memory 101 in Fig. 6 is to be encoded. An example of a replacement arrangement. Further, the image P23 indicates an image encoded by the direct mode, and the image 24 indicates an image with reference to the motion vector at 20 o'clock. When the arrangement is replaced as in the case of FIG. 8(b), since the motion vector of the previous image to be encoded is directly used, as shown in Equation 5, the motion vector MV22 and the time interval TR22 can be directly applied as The motion vector MV_REF and the time interval TR_REF. Similarly, the motion vector 27 1258991 of the image following the order to be encoded can also be used directly. In this case, as shown in Equation 6, the motion vector MV21 and the time interval TR21 can be directly applied as the motion vector MV_REF and the time interval TR_REF. By this method, each block belonging to the image p24 to be referred to the motion vector can realize the shifting motion compensation by memorizing only the state of one of the two motion vectors. Therefore, the capacity of the motion vector memory portion of the encoding device can be realized. The suppression is small. In the present embodiment, the calibration is performed for the distance of the moving vector to be referenced, and the motion vector used in the direct mode is calculated. This can also be referred to the moving vector to be referred to. Usually 1 计算 multiple times calculation. Here, the constant used for the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. In addition, when calculating the motion vector MV_REF in Equation 2(a) or Equation 4(b), after calculating the right side of Equation 2(a) or Equation 4(b), it is also possible to obtain a predetermined motion vector accuracy (for example, 1). The movement vector of /2 pixel accuracy is 〇.5 like 15 units. As for the accuracy of the motion vector, it is not limited to 1/2 pixel accuracy. And the accuracy of this motion vector is determined, for example, by a block unit, an image unit, and a sequence unit. Further, when the motion vector MV23, the motion vector MV24, and the motion vector MV21 are calculated in Equation 3(a), Equation 3(b), or 4(a), the hn equations 3(a) and 3(b) may be used. Or the right side of 4(a) to make a predetermined 20 motion vector accuracy. (Implementation 2) The outline of the encoding process according to Fig. 6 is exactly the same as that of the embodiment 1. Here, the action predicted for the two directions of the direct mode will be described in detail using FIG. 28 1258991 SH, SHMT — — — Figure 9 illustrates the action in the direct mode to determine the motion vector and the referenced block has a reference to display the two motion vectors in the chronological order. The image P43 is an image to be encoded now, and the image P42 and the image P44 are used as reference images to perform two-direction prediction. When the block to be coded is set to block MB41, the two motion vectors that are deemed necessary at this time are used in the encoded back reference image (the second reference image specified by the second reference index). The image P44 is determined by the motion vector of the block MB42 at the same position. Since the block MB42 has two motion vectors such as the motion vector MV45 and the motion vector MV46, it is not possible to directly apply scaling to calculate the two required motion vectors MV43 and motion vectors MV44 in the same manner as in Equation 1. As shown in Fig. 7, the motion vector MV_REF is determined from the average 値 of the two motion vectors of the block MB42 on the motion vector as the application calibration, and the time interval TR at this time is determined by the average 値. REF. The motion vector MV43 and the motion vector MV44 are calculated by applying scaling to the motion vector MV 15 —REF and the time interval TR_REF according to Equation 8. At this time, the time interval TR45 indicates the interval from the image P44 to the image P45, that is, the time until the image referred to by the motion vector MV45, and the time interval TR46 indicates the time until the image referenced by the motion vector MV46. interval. Further, the time interval 20 TR43 represents the interval from the time until the image referred to by the motion vector MV43. The time interval TR44 indicates the interval to the time until the image referenced by the motion vector MV44. The time interval between the images is the same as that described in the embodiment 1, and is determined, for example, based on information indicating the display time or display order of each image, or information difference thereof. Further, in the example of Fig. 9, the image to be encoded is referred to as an adjacent image, and can be similarly processed when referring to a non-adjacent image. MV_REF= (MV45 + MV46)/2 (a) • · · · Equation 7 5 TR—REF = (TR45 + TR46)/ 2 (b) • · •• Equation 7 MV43= -MV_REF/TR_REF x TR43 (a) • 式8 MV44=MV_REF/TR_REF x TR44 • • • • Equation 8 10 (b) As described above, an encoding method is disclosed in which the block of the direct mode reference motion vector has a reference. In the case where the chronological order is in the majority of the motion vectors of the rear image, a motion vector is generated using the aforementioned majority motion vectors, and the two motion vectors used for the motion compensation are actually determined by applying the scaling. The direct mode can achieve the encoding method using the inter-picture predictive coding of the direct mode without contradiction even in the case where the block of the reference motion vector belongs to the B picture. When the motion vector MV43 and the motion vector MV44 in the ninth figure are requested, in order to calculate the motion vector MV 20 — REF and the time interval TR — REF of the target to be scaled, the motion vector MV 45 and the motion are acquired. For the method of averaging the vector MV46 and the average 値 of the time interval TR45 and the time interval TR46, Equation 9 can be used instead of Equation 7. First, the motion vector MV46 is calculated by scaling the motion vector MV46 as shown in Fig. 9(a) so that the time interval is the same as the motion vector MV45. The motion vector MV_REF is determined by averaging the motion vector MV46' and the motion vector MV45. At this time, the time interval TR_REF is the original local use time interval TR41. Further, the case where the motion vector MV46 is scaled as the motion vector MV46' and the motion vector MV45 is scaled as the 5 motion vector MV45' can be handled in the same manner. MV46,-MV46/TR46 x TR45 · · · · Equation 9 (a) MV_REF=(MV46' + MV45)/2 · · · • Equation 9 (b) 10 TR_REF-TR45 · · · · Equation 9 (c) When calculating the two motion vectors MV43 and the motion vector MV44 in FIG. 9, the motion vector MV_REF and the time interval TR_REF, which are the target of the scaling, can be used instead of Equation 7. The average 値 of the amount of 15 is used, and the motion vector MV45 and the time interval TR45 of the image P45 having the short reference time interval are directly used for the image P44 of the motion vector to be referred to. Similarly, the motion vector MV46 and the time interval TR46 of the image P46 separated by the time interval to be referred to in Equation 11 can be directly used as the motion vector MV_REF and the time interval TR_REF. By this method, each block belonging to the image P44 to be referred to the motion vector can realize motion compensation by memorizing only one of the two motion vectors, so that the capacity of the motion vector memory portion of the encoding device can be suppressed. Get small. MV_REF = MV45 · · · · Equation 10 1258991 玖, — TR REF=TR45 • · · · Equation 10 (b) MV_ _REF=MV46 • · •• Equation 11 (4) TR One REF=TR46 • · · · 11 (b) In addition, when calculating the two motion vectors MV43 and the motion vector MV44 in Fig. 9, the motion vector MV_REF and the time interval TR_REF which are the target of the scaling are used instead of the equation 7. The two move to an average of 10 quantities, and directly use the motion vector of the image with the first order to be encoded. Fig. 10(a) shows the reference relationship of the arrangement of the images in the order of the moving image display as shown in Fig. 9, and Fig. 10(b) shows the frame memory 101 in Fig. 6 in the order of encoding. Replace one of the examples. Further, the image P43 indicates an image encoded by the direct mode, and the image 15 P44 indicates an image with reference to the motion vector at this time. When the arrangement is replaced by FIG. 10(b), the motion vector MV46 and the time interval TR46 can be directly used as the motion vector MV_REF by directly using the motion vector of the image whose order is to be encoded first. Time interval TR_REF. It is also possible to directly use the motion vector of the image whose reference encoding order is followed. In this case, as shown in Equation 10, the motion vector MV45 and the time interval TR# can be directly applied as the motion vector MV_REF and the time interval TR_REF. According to this method, each block belonging to the image P44 to be referred to the motion vector can realize motion compensation by memorizing only one of the two motion vectors, so that the capacity of the motion vector memory unit of the encoding device can be suppressed. small. 32 1258991 莰,—————— Also, when the direct mode is used to determine the motion vector and the reference image is referenced to display the two motion vectors of the second frame image in the chronological order, the request may also be obtained. The two motion vectors MV43 and the motion vector MV44 are set to "〇" to perform motion compensation. By this method, each block belonging to the 5 image P44 to which the motion vector is to be referred to can eliminate the _3 memory vector, so that the capacity of the motion vector memory unit of the encoding device can be suppressed small, and the calculation can be omitted. The processing of moving vectors. Further, in the case where the image referred to in the direct mode for determining the motion vector has the reference to display the two motion vectors of the two frames of the rear two images, the reference motion vector may be prohibited from being applied only to the direct mode. Predictive coding. In the case where the image P44 of FIG. 9 refers to the two frames of images in the rear in order of display time, it is known that the possibility of being associated with the image in front in the display time order is low, so that the direct mode is prohibited. Other prediction methods can produce more accurate predicted images. Further, in the present embodiment, the case where the distance between the images is used for the motion vector to be referred to is scaled, thereby calculating the motion vector used in the direct mode, which may also be referred to. The vector is given a constant multiple of ten. Here, the constant used in the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. 20 'In the case of Equation 7(a) or Equation 9(b), when the motion vector MV_REF is calculated, the right side of Equation 7(a) or Equation 9(b) can also be used to accurately determine the motion vector. Within. As for the accuracy of the motion vector, there are 1/2, 1/3 pixel, and 1/4 pixel precision. And the accuracy of this motion vector is determined, for example, by a block unit, an image unit, and a sequence unit. Further, when the motion vector MV43 'moving vector MV44 and the motion vector MV46' are calculated in Equation 8(a), Equation 8(b), and 33 1258991 9(a), Equation 8(a) and Equation 8(b) can also be calculated. ), or the right side of 9(a) to make a predetermined motion vector accuracy. (Implementation 3) 5 A moving picture coding method according to Embodiment 3 of the present invention will be described with reference to the block diagram of FIG. However, the code train generated by the dynamic image coding method of the mode 1 is input. First, various information such as prediction mode, motion vector information, and prediction residual coded data are extracted from the input code sequence by the code column parser 601. The prediction mode/moving vector decoding unit 608 outputs the prediction mode or the motion vector information, and outputs the prediction residual coding unit 602 to the prediction residual decoding unit 602. The prediction mode/moving vector decoding unit 608 performs decoding of the prediction mode and decoding of the motion vector used in the prediction mode. When the motion vector is decoded, the decoded motion vector 15 stored in the motion vector memory unit 605 is used. The decoded prediction mode and the motion vector are output to the motion compensation decoding unit 6〇4. Further, the motion vector storage unit 605 is stored in order to cause the decoded motion vector to be used for decoding the motion vector of the subsequent block. The motion-to-compensation decoding unit 604 uses the decoded image of the decoded image stored in the frame memory 603 as a reference image, and generates a predicted image based on the input prediction mode or motion vector information. The predicted image input addition unit calculation unit 606 thus generated generates a decoded image by performing addition of the prediction residual image generated by the prediction residual decoding unit 602. The above embodiment is for the operation of the code sequence for inter-picture predictive coding, but the switching of the decoding process for the code sequence for intra-picture predictive coding can be performed by the switch 607. 34 1258991 玖, - The above shows a summary of the flow of decoding, and the details of the processing of the move-to-compensation decoding unit 604 will be described below. The motion vector information is appended to each block or to the area of each partition. The decoded image of the image to be decoded in the front or the last 5 positions in the display time order is used as a reference image and is generated from the image by the decoded motion vector. Moving to the compensated predicted image 〇 refers to displaying the image of each frame in the front and rear in the chronological order as one of the two direction predictions for inter-picture predictive coding. Directly inputting a code sequence having no motion vector in the block of the decoding target in the direct mode, and thus calculating the actual operation by referring to the motion vector of the block at the same position in the decoded image in the chronological order. The two motion vectors of the motion compensation are used to create a predicted image. Fig. 7 is a diagram showing the actor in the case where the block for moving the vector in the direct mode and the motion vector of the reference 15 has a reference to display two motion vectors of the two frames in front of the chronological order. The image P23 is an image to be encoded now, and the image P22 and the image P24 are used as reference images to perform two-direction prediction. When the block to be coded is set to block MB21, the two motion vector systems 20 deemed necessary at this time use the second reference image specified by the second reference index after the encoding is completed. The image P24 is determined by the motion vector of the block MB22 at the same position. The block MB22 has two movement vectors MV21 and a motion vector MV22 as the motion vector. Therefore, it is not possible to directly calculate the required movement by applying the same direct scaling as Equation 1 to 35 1258991—one— — — — " ~ MV23 and motion vector MV24. Therefore, as in Equation 2, on the motion vector to be applied to the calibration, the motion vector MV_REF' is calculated from the average of the two motion vectors of the block MB22, and the time interval TR at this time is calculated from the average —. REF. The motion vector MV23 and the motion vector MV24 are calculated for the motion vector MV_'5 REF and the time interval TR_REF by applying scaling according to Equation 3. At this time, the time interval TR21 indicates the time interval from the picture 'P24 to the picture P21, that is, the time to the image referred to by the motion vector MV21'. The time interval TR22 indicates the image to be referred to by the motion vector·MV22. time interval. Further, the time interval TR23 10 represents the time interval until the image referred to by the motion vector MV23, and the time interval TR24 represents the time interval until the image referred to by the motion vector MVM. The time interval between the images can be determined based on, for example, information indicating the display time or display order of each image, or based on the information difference. Further, in the image to be encoded in the example of Fig. 7, the image adjacent to the phase 15 is referred to, but the same processing can be performed even when referring to a non-adjacent image. · As described above, the above embodiment is shown in the direct mode, in the case where the block of the reference motion vector has a reference to display a multi-y-number motion vector of the image in front in chronological order, a majority of the motion vector is used to generate one 3 20 The motion vector 'determines the two motion vectors actually used for the motion direction compensation by applying the calibration, even if the block in the direct mode referring to the motion vector belongs to the B picture, the direct use can be used without contradiction. Pattern-based graphing—the encoding method for inter-picture predictive coding. In addition, when the two motion vectors MV23 in FIG. 7 are moved and the MV2 is shifted to 36 1258991, the motion vector MV_REF and the time interval TR_REF which are the targets of the fixed target are calculated, and the motion vector MV21 is obtained. In the method of moving the vector MV22 and the average 値 and the average 値 of the time interval TR21 and the time interval TR22, Equation 4 5 can be used instead of Equation 2. First, as shown in Fig. 4(a), the motion vector MV21 time interval is scaled in the same manner as the motion vector MV22, and the motion vector MV21' is calculated. The motion vector MV_REF is determined by taking the average of the motion vector MV21' and the motion vector MV22. At this time, the time interval TR_REF is the original local use time interval TR22. Further, the case where the motion vector MV22 is set as the motion vector MV21' instead of the motion vector MV21 and the motion vector MV22 is scaled to the motion vector MV22' can be similarly performed. Further, when calculating the two motion vectors MV23 and the motion vector MV24 of FIG. 7, the motion vector MV_REF and the time interval TR_REF which are the targets to be subjected to the scaling are the 15 averaging 使用 using the two motion vectors instead of Equation 2. On the other hand, the reference vector 5 can be directly used for the motion vector MV22 and the time interval TR22 of the image P22 having a short time interval with reference to the image P24 of the motion vector. Similarly, the motion vector MV21 and the time interval TR21 of the image P21 having a long reference time interval can be directly used as the motion vector MV_REF time interval TR_REF. By this method, each block belonging to the image P24 to be referred to the moving 20 vector can realize motion compensation by memorizing only one of the two motion vectors, and thus the amount of the moving vector memory of the decoding device can be realized. The suppression is small.
又,於算出第7圖之二個移動向量MV23及移動向量 MV24之際’作爲要施予定標之對象之移動向量MV REF 37 1258991 玖、發麵, 及時間間隔TR一REF乃可取代式2之使用二個移動向量的 平均値,而直接使用參照要解碼之順序在先之圖像的移動 向量。第8圖(a)是表示與第7圖以作爲動態圖像顯示之圖 像的排列方式的參照關係者,在第8圖(b)表示經輸入之碼 5列的順序、亦即要解碼之順序的一例。又,圖像P23表示 藉著直接模式而進行解碼的圖像,圖像24表示其時參照移 動向量的圖像。考慮第8圖(b)那般排列順序時,由於直接 使用參照要解碼之順序在先之圖像的移動向量,故如式5 所示,能直接應用移動向量MV22及時間間隔TR22以作 10 爲移動向量MV—REF及時間間隔TR—REF。同樣地,亦 可直接使用參照要解碼之順序在後之圖像的移動向量。此 情形下,如式6所示,能直接應用移動向量MV21及時間 間隔TR21以作爲移動向量MV—REF及時間間隔TR— REF。藉此方法,屬於要參照移動向量之圖像P24之各區 15塊能以僅記憶二個移動向量之中的單方的狀態而實現移動 補償,因此能將解碼裝置之移動向量記憶部的容量抑制得 小。 又,於本實施樣態說明了對於要參照之移動向量使用 圖像間之時間上的距離而進行定標,而計算於直接模式使 20用之移動向量的情形,此亦可將要參照之移動向量予以常 數倍計算。在此說明,使用於常數倍之常數在以多數區塊 單位或多數圖像單位編碼或解碼的情形下亦可變更。 (實施樣龍4) 依據第11圖之編碼處理的槪要乃與實施樣態3完全相 38 1258991 玖、發明說明 同。於此使用第9圖來詳細說明對於直接模式之二個方向 預測的動作。但是,設成輸入以實施樣態2之動態圖像編 碼方法產生的碼列者。 第9圖係說明於直接模式中用以決定移動向量而參照 5 之區塊具有參照以顯示時間順序後方之二幀圖像之二個移 動向量之情形下的動作。圖像P43係現在解碼對象的圖像 ,將圖像P42及圖像P44當作參照圖像而進行二個方向預 測者。一旦將要進行解碼之區塊設成區塊MB41,則此時 視爲必要之二個移動向量乃使用位於解碼完後方參照圖像( 1〇第2參照索引所指定之第2參照圖像)之圖像P44相同位置 之區塊MB42所具有的移動向量而決定。此區塊MB42具 有移動向量MV45及移動向量MV46等二個移動向量,因 此無法與式1同樣地直接應用定標來算出所要求出的二個 移動向量MV43及移動向量MV44。如第7圖所示,在作 15爲應用定標之移動向量上乃從區塊MB42具有之二個移動 向量的平均値來決定移動向量MV一REF,同樣地由平均値 來決定此時之時間間隔TR一REF。依據式8而對於移動向 量MV—REF及時間間隔TR_REF藉著應用定標算出移動 向量MVU及移動向量MV44。此時時間間隔TR45表示從 20圖像P44至圖像P45,亦即表示至移動向量MV45所參照 之圖像爲止之時間的間隔,時間間隔TR46表示至移動向 量MV46所參照之圖像爲止之時間的間隔,時間間隔TR43 表示至移動向量MV43所參照之圖像爲止之時間的間隔。 日寸間間隔TR44表不至移動向量MV44所參照之圖像爲止 39 1258991 玖、發明說明 之時間的間隔。又,第9圖之例子之作爲解碼對象的圖像 係參照相鄰的圖像,惟參照非相鄰之圖像時亦能同樣地處 理。 如上所述上述實施樣態,揭示了一種解碼方法,係於 5 直接模式參照移動向量之區塊具有參照以顯示時間順序在 後方之圖像的多數移動向量的情形下,使用前述多數移動 向量而產生一個移動向量,藉著應用定標而決定用以實際 使用於移動補償之二個移動向量,而於直接模式即使參照 移動向量之區塊屬於B圖像的情形下亦能無矛盾地達到使 10 用直接模式之圖像間預測解碼的解碼方法。 又,要求得第9圖中之二個移動向量MV43及移動向 量MV44之際,爲了算出施予定標之對象的移動向量MV —REF及時間間隔TR_REF,在作爲取得移動向量MV45 與移動向量MV46之平均値及時間間隔TR45與時間間隔 15 TR46之平均値的方法上,可取代式7而使用式9。首先, 如第9圖(a)對移動向量MV46施予定標以使時間間隔與移 動向量MV45相同那般地算出移動向量MV46’。以取得移 動向量MV46’與移動向量MV45之平均而決定移動向量 MV—REF。此時時間間隔TR—REF則原原本本地使用時 2〇間間隔TIU5。又,取代對移動向量MV46施予定標而作爲 移動向量MV46’而改以對移動向量MV45施予定標而作爲 移動向量MV45’的情形亦能同樣地處理。Moreover, when calculating the two motion vectors MV23 and the motion vector MV24 of FIG. 7, the motion vector MV REF 37 1258991, which is the object to be scaled, and the time interval TR REF can be substituted for Equation 2 The average 値 of the two motion vectors is used, and the motion vector of the previous image in the order of decoding is directly used. Fig. 8(a) is a reference relationship showing an arrangement pattern of images to be displayed as moving images in Fig. 7, and Fig. 8(b) shows the order of 5 columns of input codes, i.e., to be decoded. An example of the order. Further, the image P23 indicates an image decoded by the direct mode, and the image 24 indicates an image with reference to the motion vector. When considering the order of arrangement in Fig. 8(b), since the motion vector of the previous image in the order of decoding is directly used, as shown in Equation 5, the motion vector MV22 and the time interval TR22 can be directly applied as 10 It is the motion vector MV_REF and the time interval TR_REF. Similarly, the motion vector of the image following the order to be decoded can also be used directly. In this case, as shown in Equation 6, the motion vector MV21 and the time interval TR21 can be directly applied as the motion vector MV_REF and the time interval TR_REF. According to this method, the block 15 of each region belonging to the image P24 to be referred to the motion vector can realize the motion compensation by memorizing only one of the two motion vectors, so that the capacity of the motion vector memory portion of the decoding device can be suppressed. Get small. Moreover, in the present embodiment, the case where the distance between the images is used for the motion vector to be referred to is scaled, and the motion vector for the direct mode 20 is calculated, which may also be referred to. The vector is calculated as a constant multiple. Here, the constant used for the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. (Implementation of the sample dragon 4) The summary of the code processing according to Fig. 11 is the same as the implementation mode 3 38 1258991 玖, the invention description. Here, the action predicted for the two directions of the direct mode will be described in detail using FIG. However, it is assumed that the code sequence generated by the moving picture coding method of the mode 2 is input. Fig. 9 is a view for explaining the operation in the case where the block for reference is used in the direct mode and the block of the reference 5 has two moving vectors which are referenced to display two frames of images behind the time sequence. The image P43 is an image to be decoded now, and the image P42 and the image P44 are used as reference images to perform prediction in two directions. Once the block to be decoded is set to block MB41, the two motion vectors that are deemed necessary at this time are used in the decoded back reference picture (the second reference picture specified by the second reference index). The image P44 is determined by the motion vector of the block MB42 at the same position. This block MB42 has two motion vectors such as a motion vector MV45 and a motion vector MV46. Therefore, it is not possible to directly apply scaling to calculate the required two motion vectors MV43 and motion vectors MV44 in the same manner as in Equation 1. As shown in Fig. 7, the motion vector MV_REF is determined from the average 値 of the two motion vectors of the block MB42 in the motion vector for which 15 is applied for scaling, and the average 値 is used to determine the current 値. Time interval TR - REF. The motion vector MVU and the motion vector MV44 are calculated by applying scaling for the motion vector MV_REF and the time interval TR_REF according to Equation 8. At this time, the time interval TR45 indicates the interval from the 20 image P44 to the image P45, that is, the time until the image referred to by the motion vector MV45, and the time interval TR46 indicates the time until the image to which the motion vector MV46 refers. The interval, time interval TR43, represents the interval to the time until the image referenced by the motion vector MV43. The inter-day interval TR44 is not as long as the image referenced by the motion vector MV44. 39 1258991 The interval between the time of the invention and the description. Further, the image to be decoded in the example of Fig. 9 refers to an adjacent image, and can be handled similarly when referring to a non-adjacent image. As described above, a decoding method is disclosed in which the block of the direct mode reference motion vector has a reference to display a plurality of motion vectors of the image in the chronological order, using the plurality of motion vectors. A motion vector is generated, and two motion vectors for actually using motion compensation are determined by applying scaling, and in the direct mode, even if the block referring to the motion vector belongs to the B image, the collision can be achieved without contradiction. A decoding method using inter-picture prediction decoding in direct mode. When the motion vector MV43 and the motion vector MV44 in the ninth figure are required, the motion vector MV_REF and the time interval TR_REF of the target to be scaled are calculated as the motion vector MV45 and the motion vector MV46. In the method of averaging 时间 and the time interval TR45 and the average 値 of the time interval 15 TR46, Equation 9 can be used instead of Equation 7. First, the motion vector MV46' is calculated by scaling the motion vector MV46 as shown in Fig. 9(a) so that the time interval is the same as the motion vector MV45. The motion vector MV_REF is determined by taking the average of the motion vector MV46' and the motion vector MV45. At this time, the time interval TR_REF is originally used when the local interval is 2 U〇5. Further, instead of scaling the motion vector MV46 as the motion vector MV46' and scaling the motion vector MV45 as the motion vector MV45', the same can be applied.
又’於算出弟9圖之二個移動向量MV43及移動向量 MV44之際,在作爲施予定標對象之移動向量MV—REF 40 1258991 莰、------------------------------- 及時間間隔TR一REF上,乃可取代式7之使用二個移動向 量的平均値,而如式10對於要參照之移動向量之圖像P44 直接使用參照時間間隔短的圖像P45的移動向量MV45及 時間間隔TR45。同樣地,亦可如式11將要參照之時間間 5 隔長的圖像P46之移動向量MV46及時間間隔TR46作爲 移動向量MV一REF及時間間隔TR_REF而直接使用。藉 此方法,屬於要參照移動向量之圖像P44之各區塊能以僅 記憶二個移動向量之中的單方的狀態而實現移動補償,因 此能將解碼裝置之移動向量記憶部的容量抑制得小。 10 又,於算出第9圖之二個移動向量MV43及移動向量 MV44之際,在作爲施予定標對象之移動向量MV—REF 及時間間隔TR一REF上,乃可取代式7之使用二個移動向 量的平均値,而直接使用參照要編碼之順序爲先之圖像的 移動向量。第10圖(a)表示如同第9圖作爲動態圖像顯示 15之順序之圖像的排列方式的參照關係者,第10圖(b)表示 經輸入之碼列的順序,亦即要解碼之順序的一例。又,圖 像P43表示藉直接模式而進行編碼的圖像,圖像P44表示 於此時參照移動向量的圖像。考慮如第1〇圖(b)之排列順 序時’藉著直接使用參照要解碼之順序爲先之圖像的移動 20 向量’而能如式11直接使用移動向量MV46及時間間隔 TR46以作爲移動向量MV—REF及時間間隔tr—REF。同 樣亦能直接使用參照解碼順序爲後之圖像的移動向量。此 情形下’如式10可直接應用移動向量MV45及時間間隔 TR45以作爲移動向量MV_REF及時間間隔tr_rEF。藉 41 1258991 玖、發明說明 ———— 此方法’屬於要參照移動向量之圖像P44之各區塊能以僅 記憶二個移動向量之中的單方的狀態而實現移動補償,因 此能將解碼裝置之移動向量記憶部的容量抑制得小。 又’於直接模式用以決定移動向量而參照之圖像係參 5 照以顯示時間順序在後之二幀圖像的二個移動向量時,亦 可將要求得之二個移動向量MV43及移動向量MV44設爲 「〇」而進行移動補償。藉此方法,屬於要參照移動向量之 圖像P44之各區塊能不必要先記憶移動向量,因此能將解 碼裝置之移動向量記憶部的容量抑制得小,且能省略用以 10 算出移動向量的處理。 又,於本實施樣態說明了對於要參照之移動向量使用 圖像間之時間上的距離而予以定標,藉此計算於直接模式 使用的移動向量的情形,此亦可將要參照之移動向量予以 常數倍計算。在此說明,使用於常數倍之常數在以多數區 15 塊單位或多數圖像單位編碼或解碼的情形下亦可變更。 (實施樣態5) 本發明不僅限於上述實施樣態1至實施樣態4所示之 編碼方法或解碼方法,乃能使用以下所示之移動向量計算 方法而實現編碼方法或解碼方法。 20 第12圖係用以說明於直接模式中用以計算移動向量而 參照之編碼完的區塊或解碼完的區塊,具有參照以顯示時 間順序在前方之二幀圖像之二個移動向量之情形下之動作 的圖式。圖像P23當作現在編碼或解碼之對象的圖像。將 要進行編碼或解碼的區塊設爲區塊MB1的話,則此時被視 42 1258991In addition, when calculating the two motion vectors MV43 and the motion vector MV44 of the brother 9 diagram, the motion vector MV_REF 40 1258991, which is the target of the calibration, -,------------ ----------------- and the time interval TR REF, instead of the average 値 of the two moving vectors using Equation 7, and the moving vector to be referred to as Equation 10 The image P44 directly uses the motion vector MV45 and the time interval TR45 of the image P45 having a short reference time interval. Similarly, the motion vector MV46 and the time interval TR46 of the image P46 separated by the time interval 5 to be referred to as Equation 11 can be directly used as the motion vector MV_REF and the time interval TR_REF. According to this method, each block belonging to the image P44 to be referred to the motion vector can realize motion compensation by memorizing only one of the two motion vectors, so that the capacity of the motion vector memory unit of the decoding device can be suppressed. small. 10, when calculating the two motion vectors MV43 and the motion vector MV44 in FIG. 9, the motion vector MV_REF and the time interval TR_REF as the target of the scaling are used instead of the equation 7. The average of the moving vectors is used, and the moving vector of the image with the first order to be encoded is directly used. Fig. 10(a) shows the reference relationship of the arrangement of the images in the order of the moving image display 15 as shown in Fig. 9, and Fig. 10(b) shows the order of the input code columns, i.e., to be decoded. An example of the order. Further, the image P43 indicates an image encoded by the direct mode, and the image P44 indicates an image with reference to the motion vector at this time. Considering the arrangement order of the first diagram (b), the motion vector MV46 and the time interval TR46 can be directly used as the motion by directly using the motion 20 vector of the image in which the order of decoding is to be directly used. Vector MV - REF and time interval tr - REF. It is also possible to directly use the motion vector of the image whose reference decoding order is followed. In this case, the motion vector MV45 and the time interval TR45 can be directly applied as the motion vector MV_REF and the time interval tr_rEF as in Equation 10. By 41 1258991 发明, invention description ———— This method's blocks belonging to the image P44 with reference to the motion vector can realize motion compensation by memorizing only the state of one of the two motion vectors, and thus can decode The capacity of the motion vector memory of the device is suppressed to be small. In addition, when the direct mode is used to determine the motion vector and the reference image system 5 is used to display the two motion vectors of the second frame image in the chronological order, the two motion vectors MV43 and the movement may be requested. The vector MV44 is set to "〇" to perform motion compensation. By this method, each block belonging to the image P44 to be referred to the motion vector can not first memorize the motion vector, so that the capacity of the motion vector memory portion of the decoding device can be suppressed small, and the motion vector can be omitted for 10 Processing. Moreover, in the present embodiment, the case where the distance between the images is used for the motion vector to be referred to is scaled, thereby calculating the motion vector used in the direct mode, which may also refer to the motion vector to be referred to. Calculate by constant multiple. Here, the constant used for the constant multiple may be changed in the case of encoding or decoding in a plurality of blocks of 15 blocks or a plurality of image units. (Embodiment 5) The present invention is not limited to the encoding method or the decoding method shown in the above-described Embodiments 1 to 4, and the encoding method or the decoding method can be realized using the motion vector calculating method shown below. 20 Figure 12 is a diagram illustrating the coded block or decoded block referenced in the direct mode for calculating the motion vector, with two motion vectors referenced to display the two frames in front of the time sequence. The schema of the action in the case. The image P23 is taken as an image of the object currently encoded or decoded. If the block to be encoded or decoded is set to block MB1, then it will be viewed 42 1258991
玖:—SMI 爲必要之二個移動向量係使用位於與編碼完或解碼完之後 方參照圖像(以第2參照索引指定之第2參照圖像)之圖像 P24相同位置之區塊MB2所具有之移動向量而決定。又, 於第12圖中區塊MB1爲處理對象區塊,區塊MB1與區塊 5 MB2在圖像上係位於相互同位置的區塊,移動向量MV21 與移動向量MV22係將區塊MB2予以編碼或解碼時使用之 移動向量,分別參照圖像P21、圖像P22。又,圖像P21、 圖像P22,圖像P24係編碼完或解碼完的圖像。又,時間 間隔TR21表示圖像P21與圖像P24之間的時間間隔,時 10 間間隔TR22表示圖像P22與圖像P24之間的時間間隔, 時間間隔TR21’表示圖像P21與圖像P23之間的時間間隔 ,時間間隔TR24’表示圖像P23與圖像P24之間的時間間 隔。 移動向量計算方法乃如第12圖所示僅使用在參照圖像 15 P24之區塊MB2之移動向量之中先編碼或解碼之前方移動 向量(第1移動向量)MV21,至於區塊MB1之移動向量 MV21’、移動向量MV24’則以下列式來計算。 MV2r = MV21 X TR21’/TR21 MV24,= — MV21 X TR24,/TR21 20 使用移動向量MV21’、移動向量MV24’而從圖像P21 、圖像P24進行二個方向預測。又,亦可取代僅使用移動 向量MV21而計算移動向量MV21’與移動向量MV24,而改 以僅使用參照圖像P24之區塊MB2之移動向量之中在後經 編碼或解碼之移動向量(第2移動向量)MV22而計算區塊 43 1258991 玖、發明說明 MB1的移動向量。又,亦可如實施樣態1至實施樣態4所 示使用移動向量MV21與移動向量MV22兩者而決定區塊 MB1之移動向量。選擇任何移動向量MV21與移動向量 〜 MV22之其中任何一方的情形下,可選擇其中任何之一的 . 5 情形係選擇在時間上先經編碼或解碼之區塊的移動向量, ~ 以編碼裝置、解碼裝置選擇任何其中之一乃可預先任意設 ^ 定。又,圖像P21在短期記憶體(Short Term Buffer)或是在 長期記憶體(Long Term Buffer)、在任何處均能進行移動補 φ 償。有關於短期記憶體、長期記憶體將於後述之。 10 第13圖係用以說明於直接模式中計算移動向量而參照 之編碼完之區塊或解碼完之區塊,具有參照以顯示時間順 序在後方之二幀圖像之二個移動向量之情形下之動作的圖 式者。圖像Ρ22當作現在編碼或解碼之對象的圖像。將要 進行編碼或解碼的區塊設爲區塊ΜΒ1的話,則此時被視爲 15 必要之二個移動向量係使用位於與編碼完或解碼完之後方 參照圖像(以第2參照索引指定之第2參照圖像)之圖像 鲁 相同位置之區塊ΜΒ2所具有之移動向量而決定。又, 於弟13圖中區塊MB 1爲處理對象區塊,區塊MB 1與區塊 ’ MB2在圖像上係位於相互同位置的區塊,移動向量mV24 · 20與移動向量MVM係將區塊MB2予以編碼或解碼時使用之 移動向量,分別參照圖像P24、圖像P25。又,圖像P21、 ^ 圖像P23、圖像P24、圖像P25係編碼完或解碼完的圖像 — 。又,時間間隔TR24表示圖像P23與圖像P24之間的時 間間隔,時間間隔TR25表示圖像P23與圖像p25之間的 44 1258991 3¾^ 時間間隔,時間間隔TR24’表示圖像P22與圖像P24之間 的時間間隔,時間間隔TR21’表示圖像P21與圖像P22之 間的時間間隔。 移動向量計算方法乃如第13圖所示僅使用在參照圖像 5 P23之區塊MB2之要輸入圖像P24的移動向量MV24,至 於區塊MB1之移動向量MV21’、移動向量MV24’則以下 列式來計算。 MV215 = -MV24 X TR2T/TR24 MV24,= — MV24 X TR24,/TR24 10 使用移動向量MV21’、移動向量MV24’而從圖像P21 、圖像P24進行二個方向預測。 又,如第14圖所示僅使用輸入參照圖像P23之區塊 MB2之圖像P25的移動向量MV25的情形下,區塊MB1 之移動向量MV21’、移動向量MV25’依據以下式而計算。 15 又,時間間隔TR24表示圖像P23與圖像P24之間的時間 間隔,時間間隔TR25表示圖像P23與圖像P25之間的時 間間隔,時間間隔TR25’表示圖像P22與圖像P25之間的 時間間隔,時間間隔TR21’表示圖像P21與圖像P22之間 的時間間隔。 20 MV215 = -MV25 x TR2T/TR25 MV25’ = MV25 X TR257TR25 使用移動向量MV21’、移動向量MV25’而從圖像P21 、圖像P24進行二個方向預測。 第15圖係用以說明於直接模式中計算移動向量而參照 45 1258991 之編碼完之區塊或解碼完之區塊,具有參照以顯币日寸間順 序在前方之一幀圖像之二個移動向量之情形下之動作的圖 式者。圖像P23當作現在編碼或解碼之對象的圖像。將要 , 進行編碼或解碼的區塊設爲區塊MB1的話,則此時被視爲 - 5 必要之二個移動向量係使用位於與編碼完或解碼完之後方 參照圖像(以第2參照索引指定之第2參照圖像)之圖像 P24相同位置之區塊MB2所具有之移動向量而決定。又, 於第15圖中區塊MB1爲處理對象區塊,區塊MB1與區塊 · MB2在圖像上係位於相互同位置的區塊,移動向量 10 MV21A與移動向量MV21B係將區塊MB2予以編碼或解 碼時使用之前方向移動向量,均參照圖像P21。又,圖像 P21、圖像P23、圖像P24係編碼完或解碼完的圖像。又, 時間間隔TR21A、時間間隔TR21B表示圖像P21與圖像 P24之間的時間間隔,時間間隔TR21’表示圖像P21與圖 15 像P23之間的時間間隔,時間間隔TR24’表示圖像P23與 圖像P24之間的時間間隔。 · 移動向量計算方法乃如第15圖所示僅使用在參照圖像 P24之區塊MB2之要輸入圖像P21的前方移動向量 ’ MV21A,至於區塊MB1之移動向量MV21A’、移動向量 · 20 MV24’則以下列式來計算。玖: The two motion vectors necessary for the SMI use the block MB2 located at the same position as the image P24 after the encoded or decoded reference image (the second reference image specified by the second reference index). It is determined by the motion vector. Moreover, in the 12th picture, the block MB1 is the processing target block, and the block MB1 and the block 5 MB2 are located at the same position on the image, and the motion vector MV21 and the motion vector MV22 are used to block the block MB2. The motion vectors used in encoding or decoding are referred to the image P21 and the image P22, respectively. Further, the image P21, the image P22, and the image P24 are encoded or decoded images. Further, the time interval TR21 indicates the time interval between the image P21 and the image P24, and the time interval 1022 indicates the time interval between the image P22 and the image P24, and the time interval TR21' indicates the image P21 and the image P23. The time interval between the time intervals TR24' represents the time interval between the image P23 and the image P24. The motion vector calculation method first encodes or decodes the previous motion vector (first motion vector) MV21 among the motion vectors of the block MB2 of the reference image 15 P24 as shown in Fig. 12, as for the movement of the block MB1. The vector MV21' and the motion vector MV24' are calculated by the following equation. MV2r = MV21 X TR21'/TR21 MV24, = - MV21 X TR24, /TR21 20 Two directions prediction is performed from the image P21 and the image P24 using the motion vector MV21' and the motion vector MV24'. Alternatively, instead of using only the motion vector MV21, the motion vector MV21' and the motion vector MV24 may be calculated, and instead, only the motion vector encoded or decoded in the motion vector of the block MB2 of the reference image P24 may be used. 2 moving vector) MV22 and calculating block 43 1258991 发明, invention describes the motion vector of MB1. Further, the motion vector of the block MB1 can be determined using both the motion vector MV21 and the motion vector MV22 as shown in the embodiment 1 to the embodiment 4. In the case of selecting any of the motion vector MV21 and the motion vector ~ MV22, any one of them can be selected. The 5 situation is to select the motion vector of the block that is encoded or decoded in time, ~ by the encoding device, Any one of the decoding means can be arbitrarily set in advance. Moreover, the image P21 can be compensated for movement in the short term Buffer or in the Long Term Buffer. The short-term memory and long-term memory will be described later. 10 Fig. 13 is a diagram for explaining the case where the calculated motion vector is calculated in the direct mode and the decoded block or the decoded block has a reference to the two motion vectors of the two frames in the rear in the display time sequence. The schema of the action below. The image 22 is taken as an image of the object currently encoded or decoded. If the block to be encoded or decoded is set to block ΜΒ1, then the two necessary motion vectors that are considered to be 15 are used after the encoding or decoding is completed (as specified by the second reference index). The image of the second reference image is determined by the motion vector of the block ΜΒ2 at the same position. Moreover, in the picture of Yudi 13, the block MB1 is the processing target block, and the block MB1 and the block 'MB2 are located at the same position on the image, and the motion vector mV24·20 and the motion vector MVM system will The motion vector used when the block MB2 is encoded or decoded is referred to the image P24 and the image P25, respectively. Further, the image P21, the ^ image P23, the image P24, and the image P25 are encoded or decoded images. Further, the time interval TR24 represents the time interval between the image P23 and the image P24, the time interval TR25 represents the time interval 44 1258991 33⁄4^ between the image P23 and the image p25, and the time interval TR24' represents the image P22 and the figure Like the time interval between P24, the time interval TR21' represents the time interval between the image P21 and the image P22. The motion vector calculation method uses only the motion vector MV24 of the input image P24 of the block MB2 of the reference image 5 P23 as shown in FIG. 13, and the motion vector MV21' and the motion vector MV24' of the block MB1 are as follows. Formulated to calculate. MV215 = -MV24 X TR2T/TR24 MV24, = - MV24 X TR24, /TR24 10 Two directions prediction is performed from the image P21 and the image P24 using the motion vector MV21' and the motion vector MV24'. Further, in the case where only the motion vector MV25 of the image P25 of the block MB2 of the input reference image P23 is used as shown in Fig. 14, the motion vector MV21' and the motion vector MV25' of the block MB1 are calculated according to the following equation. Further, the time interval TR24 represents the time interval between the image P23 and the image P24, the time interval TR25 represents the time interval between the image P23 and the image P25, and the time interval TR25' represents the image P22 and the image P25. The time interval between the time intervals TR21' represents the time interval between the image P21 and the image P22. 20 MV215 = -MV25 x TR2T/TR25 MV25' = MV25 X TR257TR25 Two directions prediction is performed from the image P21 and the image P24 using the motion vector MV21' and the motion vector MV25'. Figure 15 is a diagram for explaining the calculation of the motion vector in the direct mode and referring to the coded block or the decoded block of 45 1258991, with the reference to the image of one of the frames in front of the order of the coins. The schema of the action in the case of a motion vector. The image P23 is taken as an image of the object currently encoded or decoded. If the block to be encoded or decoded is set to block MB1, then it is considered as -5. The two necessary motion vectors are used after the coded or decoded image (after the second reference index). The image P24 of the designated second reference image is determined by the motion vector of the block MB2 at the same position. Further, in Fig. 15, the block MB1 is the processing target block, and the block MB1 and the block MB2 are located at the same position on the image, and the motion vector 10 MV21A and the motion vector MV21B are the block MB2. The forward direction motion vector is used for encoding or decoding, and the image P21 is referred to. Further, the image P21, the image P23, and the image P24 are images that have been encoded or decoded. Further, the time interval TR21A, the time interval TR21B represents the time interval between the image P21 and the image P24, the time interval TR21' represents the time interval between the image P21 and the image P23 of Fig. 15, and the time interval TR24' represents the image P23 Time interval from image P24. The motion vector calculation method uses only the forward motion vector 'MV21A of the input image P21 to be input to the block MB2 of the reference image P24 as shown in Fig. 15, as for the motion vector MV21A' of the block MB1, the motion vector·20 MV24' is calculated by the following formula.
MV21A’= 一 MV21A X TR21,/TR21A MV24,二—MV21A X TR24,/TR21A * 使用移動向量MV21A’、移動向量MV24’而從圖像P21 、圖像P24進行二個方向預測。 46 1258991MV21A' = one MV21A X TR21, /TR21A MV24, two-MV21A X TR24, /TR21A * Two directions prediction is performed from the image P21 and the image P24 using the motion vector MV21A' and the motion vector MV24'. 46 1258991
玖、WMMM 又,亦可僅使用輸入參照圖像P24之區塊MB2之圖像 P21的前方移動向量MV21B而計算區塊MB1之移動向量 。又,亦可如實施樣態1至實施樣態4所示使用移動向量 MV21A與移動向量MV21B兩者而決定對於區塊MB1之 5 移動向量。選擇任何前方移動向量MV21A與前方移動向 量MV21B之其中任何一方的情形下,可選擇其中任何之 一的情形係選擇在時間上先經編碼或解碼(碼列中先前記述 )的移動向量,能以編碼裝置、解碼裝置任意設定。於此說 明所謂在時間上已先編碼或解碼之移動向量乃意味著第1 10 移動向量者。又,圖像P21在短期記憶體(Short Term Buffer)或是在長期記憶體(Long Term Buffer)、在任何處均 能進行移動補償。有關於短期記憶體、長期記憶體將於後 述之。 又,於本實施樣態說明了對於要參照之移動向量使用 15 圖像間之時間上的距離而予以定標,藉此計算於直接模式 使用的移動向量的情形’此亦可將要參照之移動向量予以 常數倍計算。在此說明’使用於常數倍之常數在以多數區 塊單位或多數圖像單位編碼或解碼的情形下亦可變更。 又,於上述移動向量MV21’、移動向量MV24’、移 20 動向量MV25’、移動向量MV21A’之計算式,計算各計算 式之右邊後,亦可弄在預定之移動向量精確度內。至於移 動向量之精確度乃有丨/2像素、丨/3像素、1/4像素精 確度。且此移動向量的精確度例如決定於區塊單位、圖像 單位、順序單位。 47 1258991 現:發明言®^ —— (實施樣態6) 本實施樣態6使用第16圖至第18圖來說明移動向量 計算方法,用以於直接模式中決定移動向量而使用之參照 圖像具有參照以顯示時間順序在前方之二幀圖像之二個前 5方移動向量之情形下,能僅將二個前方移動向量之中一方 予以定標而計算對象移動向量的方法。又,區塊MB1爲處 理對象區塊,區塊MB1與區塊MB2係位於相互同位置的 區塊,移動向量MV21與移動向量MV22係將區塊MB2予 以編碼或解碼時使用之移動向量,並分別參照圖像P21、 10 圖像P22。又,圖像P21、圖像P22、圖像P24係編碼完或 解碼完的圖像。又,時間間隔TR21表示圖像P21與圖像 P24之間的時間間隔,時間間隔TR22表示圖像P22與圖 像P24之間的時間間隔,時間間隔TR21’表示圖像P21與 圖像P23之間的時間間隔,時間間隔TR22’表示圖像P22 15 與圖像P23之間的時間間隔。 在第1方法上,如第16圖所示參照圖像P24之區塊 MB2具有要輸入圖像P21之前方移動向量MV21、及要輸 入圖像P22之前方移動向量MV22的二個前方向移動向量 時,於對象圖像P23僅使用要輸入以顯示時間順序接近之 20 圖像P22的移動向量MV22,至於區塊MB1之移動向量 MV22’則以下列式來計算。 MV22,二 MV22 X TR22,/TR22 使用移動向量MV22’而從圖像P22進行移動補償。 在第2方法上,如第17圖所示參照圖像P24之區塊 1258991 ———-------------------------------------------- MB2具有要輸入圖像P21之前方移動向量MV21、及要輸 入圖像P22之前方移動向量MV22的二個前方向移動向量 ‘ 時,於對象圖像P23僅使用要輸入以顯示時間順序較遠之 , 圖像P21的移動向量MV21,至於區塊MB1之移動向量 * 5 MV21’則以下列式來計算。 〜 MV21,= MV21 X TR21,/TR21 ' 使用移動向量MV21’而從圖像P21進行移動補償。 藉此等第1、第2方法,屬於要參照之移動向量之參 · 照圖像P24的區塊MB2,能以先記憶二個移動向量之中之 10 單方的狀態實現移動補償,因此能將移動向量記憶部的容 量抑制得小。 又,亦能一邊使用前方向移動向量MV21而一邊與實 施樣態1同樣地從以顯示時間順序爲近旁之圖像的圖像 P23進行移動補償。此時所使用之移動向量MVN(圖式未 15 顯示)依據以下式來計算。 MVN=MV21 X TR22VTR21 · 又,第3方法上,如第18圖所示使用上述求得之移動 向量MV21,與移動向量MV22,而分別從圖像P21與圖像 P22取得移動補償區塊,並將該平均圖像當作移動補償中 〜 20 的插値圖像。 雖然藉此第3方法會增加計算量,然而會提昇移動補 償的精確度。 再者,亦可使用上述移動向量MVN與移動向量 MV22,而從圖像P22取得移動補償區塊,並將其平均圖像 49 1258991 玖、發明說明 作爲移動補償中的插値圖像。 又,於本實施樣態說明了對於要參照之移動向量使用 圖像間之時間上的距離而予以定標,藉此計算於直接模式 使用的移動向量的情形,此亦可將要參照之移動向量予以 5 常數倍計算。在此說明,使用於常數倍之常數在以多數區 塊單位或多數圖像單位編碼或解碼的情形下亦可變更。 又,於上述移動向量MV21’、移動向量MV22’、移 動向量MVN之計算式,計算各式之右邊後,亦可弄在預 定之移動向量精確度內。至於移動向量之精確度乃有1/2 10 像素、1/3像素、1/4像素精確度。且此移動向量的精確 度例如決定於區塊單位、圖像單位、順序單位。 上述實施樣態6說明用以直接模式中決定編碼或解碼 對象區塊之移動向量而使用之參照圖像,具有參照以顯示 時間順序在前方之二幀圖像之二個前方移動向量的情形, !5 惟參照以顯示時間順序在後方之二幀圖像之二個後方移動 向量(以第2參照索引指定參照圖像的第2移動向量)的情 形亦相同,能僅將二個後方移動向量之中一方予以定標而 計算對象移動向量。以下以第19圖至第22圖來說明,區 塊MB1爲處理對象區塊,區塊MB1與區塊MB2係位於相 2〇 互同位置的區塊,移動向量MV24與移動向量MV25係將 區塊MB2予以編碼或解碼時使用之移動向量(以第2參照 索引指定參照圖像的第2移動向量)。又,圖像P21、圖像 P23、圖像P24及圖像P25係編碼完或解碼完的圖像。又 ,時間間隔TR24表示圖像P23與圖像P24之間的時間間 50 1258991 -------------------------------------------- 隔,時間間隔TRM表示圖像P23與圖像P25之間的時間 間隔,時間間隔TR24’表示圖像P22與圖像P24之間的時 間間隔,時間間隔TR25’表示圖像P22與圖像P25之間的 時間間隔。 5 作爲第1方法上,如第19圖所示參照圖像P23之區塊 MB2具有要輸入圖像P24之後方移動向量MV24、及要輸 入圖像P25之後方移動向量MV25的二個後方向移動向量 時,於對象圖像P22僅使用要輸入以顯示時間順序接近之 圖像P24的移動向量MV24,至於區塊MB1之移動向量 10 MV24’則以下列式來計算。 MV24,= MV24 X TR24,/TR24 使用移動向量MV24’而從圖像P24進行移動補償。 又,亦能一邊使用前方向移動向量MV24而一邊與實 施樣態1同樣地從以顯示時間順序爲近旁之圖像的圖像 15 P23進行移動補償。此時所使用之移動向量MVN1(圖式未 顯示)依據以下式來計算。 MVN1-MV24 X TRN1/TR24 在第2方法上,如第20圖所示參照圖像PM之區塊 MB2具有要輸入圖像P24之後方移動向量MV24、及要輸 20 入圖像P25之後方移動向量MV25的二個後方向移動向量 時,於對象圖像僅使用要輸入以顯示時間順序較遠之 圖像P25的後方向移動向量MV25,至於區塊MB1之移動 向量MV25’則以下列式來計算。 MV25’二MV25 X TR25’/TR2 1258991 疚y發明說明 使用移動向量MV25’而從圖像Ρ25進行移動補償。 藉此等第1、第2方法,屬於要參照之移動向量之參 照圖像Ρ23的區塊ΜΒ2,能以先記憶二個移動向量之中之 單方的狀態實現移動補償,因此能將移動向量記憶部的容 5 量抑制得小。 又,亦能一邊使用後方向移動向量MV25而一邊與實 施樣態1同樣地從以顯示時間順序爲近旁之圖像的圖f象 P23進行移動補償。此時所使用之移動向量MVN2(圖式未 顯示)依據以下式來計算。 10 MVN2-MV25 x TRN1/TR25 又,作爲第3方法上,如第21圖所示使用上述求得之 移動向量MV24’與移動向量MV25’而分別從圖像P24與圖 像P25取得移動補償區塊,並將該平均圖像當作移動補償 中的插値圖像。 15 雖然藉此第3方法會增加計算量,然而會提昇對象圖 像P22的精確度。 再者,亦可使用上述移動向量MVN1與移動向量 MVN2而從圖像P24取得移動補償區塊,並將其平均圖像 作爲移動補償中的插値圖像。 20 又,如第22圖所示,於直接模式中決定移動向量而使 用之參照圖像具有參照以顯示時間順序在後方之一幀圖像 之一個後方移動向量之情形下,例如可依以下式來計算移 動向量MV24’。 使用移動向量MV24’而從圖像P24進行移動補償。 52 1258991 wvwmmm 又,亦能一邊使用後方向移動向量MV25而一邊與實 施樣態1同樣地從以顯示時間順序爲近旁之圖像的圖像 - P23進行移動補償。此時所使用之移動向量MVN3(圖式未 ' 顯示)依據以下式來計算。 辠 5 MVN3-MV24 x TRN1/TR24 - 又,於本實施樣態使用第19圖至第22圖說明了具有 、 參照以顯示時間順序在後方之二幀圖像之二個後方向移動 向量之情形下,以及具有參照以顯示時間順序在後方之一 φ 幀圖像之二個後方向移動向量之情形下,將該後方向移動 10 向量予以定標而計算對象移動向量的情形,然而此亦可不 使用後方移動向量而參照相同圖像內之周邊區塊的移動向 量來計算對象移動向量,進行圖像內編碼的情形亦可參照 相同圖像內之周邊區塊的移動向量來計算對象移動向量。 首先,說明第1計算方法。第23圖表示此時要參照之移動 15 向量與對象區塊的位置關係者。區塊MB1爲對象區塊,爲 參照包含在A、B、C位置關係之三個像素之區塊的移動向 · 量。但是,像素C之位置在畫面外或是在編碼/解碼未完 成的狀態下而呈不能參照的情形下,則取代包含像素C之 , 區塊而使用包含像素D之區塊的移動向量。以取得包含成 · 2〇 爲參照對象的A、B、C像素之三個區塊所具有之移動向量 的中央値的狀態而設成實際在直接模式使用的移動向量。 。以取得三個區塊所具有之移動向量的中央値的狀態,則 ~ 不必要將到底選擇了三個移動向量之中爲何移動向量之附 加資訊記述於碼列中,且能獲得顯現接近區塊MB1之實際 53 1258991 玖T發明說明 移動之移動的移動向量。此情形下,可使用已決定之移動 向量而僅以前方參照(對第1參照圖像的參照)進行移動補 償,亦可使用該已決定之移動向量與平行的移動向量而以 二個方向參照(對第1參照圖像及第2參照圖像的參照)進 5 行移動補償。 其次說明第2計算方法。 第2計算方法並非如第1計算方法取得中央値,而從 包含成爲參照對象之A、Β、C像素之三個區塊所具有之移 動向量中取得編碼效率最高的移動向量,藉此設成於實際 10 直接模式使用的移動向量。此情形下,可使用已決定之移 動向量而僅以前方參照(對第1參照圖像的參照)進行移動 補償,亦可使用該已決定之移動向量與平行的移動向量而 以二個方向參照(對第1參照圖像及第2參照圖像的參照) 進行移動補償。表示編碼效率最高之移動向量的資訊例如 15 第24圖(a)所示,表示從模式選擇部107輸出之直接模式 的資訊,且附加於碼列產生部103所產生之碼列中之區塊 的的前頭領域。又,亦可如第24圖(b)將表示編碼效率最 高之向量的資訊附加於巨集區塊的前頭領域。又,表示編 碼效率最高之向量的資訊例如要識別包含成爲參照對象之 2〇像素之區塊的號碼,而附與於每個區塊的識別號碼。又, 以識別號碼識別區塊時,附與每個區塊之識別號碼可僅使 用一個,亦可僅使用將對應該一個識別號碼之區塊已編碼 時使用之移動向量之中的一方而表示編碼效率最高的移動 向量,亦可於移動向量爲多數時使用多數移動向量而表示 54 1258991 玖— -------------------------— 編碼效率最高之移動向量◦或是使用二個方向參照(對第1 參照圖像及第2參照圖像的參照)之每個各別的移動向量附 與每個區塊的識別號碼而表示編碼效率最高的移動向量。 藉著使用如此移動向量的選擇方法一定能取得編碼效率最 5高的移動向量。但是因必須將表示選擇了何移動向量之附 加資訊記述於碼列中,故有必要另用以進行上述的碼量。 又,說明第3計算方法。 第3計算方法係將參照移動向量之參照圖像之參照索 引値爲最小的移動向量設成於直接模式使用的移動向量。 10所謂參照索引最小,一般乃指參照以顯示時間順序接近的 圖像。或編碼效率最高的移動向量。因此,藉著使用如此 移動向量選擇方法,以顯示時間順序最接近,或是使用參 照編碼效率最高之圖像的移動向量而產生在直接模式使用 的移動向量,而能達到提昇編碼效率。 15 又,三條移動向量之中參照三條均相同之參照圖像的 情形下,以取得三條移動向量之中央値即可。三條移動向 量之中參照其參照索引値最小之參照圖像的移動向量爲二 條的情形下,例如二條移動向量之中設成將固定地選擇其 中任何一方即可。以使用第23圖作爲例子的話,在包含像 20 素A、像素B、像素C之三個區塊所具有之移動向量中, 包含像素A及像素B之二個區塊之參照索引値最小且參照 相同參照圖像的情形下,設成取得包含像素A之區塊具有 之移動向量即可。但是包含各個像素A、像素B、像素C 之三個區塊所具有之移動向量中,包含像素A及像素C之 1258991 ——— --------------------------------------------------- 二個區塊之參照索引値最小且參照相同參照圖像的情形下 ,設成取得包含對於區塊BL1位置關係最近之像素A之區 塊具有之移動向量即可。 又’上述中央値可設成各別對於水平方向成分與垂直 5方向成分取得中央値即可,對於各移動向量之大小(絕對値 )設成取得中央値即可。 又,移動向量之中央値如第25圖所示的情形下,於後 方之參照圖像在與區塊BL1同位置之區塊,及分別包含像 素A、像素B、像素C之區塊,以及包含如第25圖所示之 10 像素D之區塊,以設成取得此等5個區塊具有之移動向量 的中央値即可。如此使用接近編碼對象像素周圍且於後方 之參照圖像位於與區塊BL1相同位置之區塊時,由於將區 塊數設成奇數一旦使用包含像素D之區塊,則簡單地作成 算出移動向量中央値的處理。又,於後方的參照圖像在與 15 區塊BL1相同位置之領域涵蓋多數區塊的情形下,可使用 此多數區塊之中與區塊BL1重疊的領域最大之區塊中的移 動向量而進行區塊BL1之移動補償,或是可將區塊BL1對 應後方之參照圖像中的多數區塊領域而區分,並於已區分 之每個區塊將區塊BL1予以移動補償。 20 又,以具體的例子來說明。 如第26圖或第27圖所示’包含像素A、像素B、像 素C之全部區塊於參照比編碼對象圖像更前方之圖像的移 動向量時’可使用上述第1 i十算方法至弟3 g十算方法之其 中任何一方法。 1258991 -----------------------------------------------— 同樣地’包含像素A、像素B、像素C之全部區塊於 參照比編碼對象圖像更後方之圖像的移動向量時,可使用 上述第1計算方法至第3計算方法之其中任何一方法。 - 其次e兌明第3〇圖所示的樣態。第3〇圖表示包含各個 · 5像素A、像素B、像素C之全部區塊各具有一條參照比編 碼對象圖像更前方與更後方之圖像的移動向量的情形。 依據上述第1計算方法,藉著移動向量MVAf、移動 向量MVBf、移動向量MVCf之中央値而選擇使用於區塊 肇 BL1之移動補償之前方的移動向量,藉著移動向量MVAb 10 、移動向量MVBb、移動向量MVCb之中央値而選擇使用 _ 於區塊BL1之移動補償之後方的移動向量。又,移動向量 MVAf係包含像素a之區塊的前方移動向量,移動向量 MVAb係包含像素A之區塊的後方移動向量,移動向量 MVBf係包含像素B之區塊的前方移動向量,移動向量 15 MVBb係包含像素B之區塊的後方移動向量,移動向量 MVCf係包含像素C之區塊的前方移動向量,移動向量 · MVCb係包含像素C之區塊的後方移動向量。又,移動向 量MVAf等不僅限於參照圖式所示之圖像。此一情形於以 < 下的說明中亦相同。 * 20 依據上述第2計算方法,藉從移動向量MVAf、移動 向量MVBf、移動向量MVCf之前方參照之移動向量的中 取得編碼效率最高的移動向量,與從移動向量MVAb、移 動向量MVBb、移動向量MVCb之後方參照之移動向量的 中取得編碼效率最高的移動向量而作成實際於直接模式使 57 1258991 玖=發明說明_ 用之移動向量。此情形下,亦可使用從移動向量MVAf、 移動向量MVBf、移動向量MVCf之前方參照之移動向量 的中取得編碼效率最高的移動向量而僅以前方參照進行移 動補償,亦可使用該已決定之移動向量與平行的移動向量 5 而以二方向參照進行移動補償。亦可用以使編碼效率爲最 高而不分別選擇前方參照與後方參照之移動向量,以選擇 一個區塊而使用該區塊具有之前方參照與後方參照之移動 向量進行移動補償。此時,比較於表示選擇具有其具備使 編碼效率最高地之前方參照之移動向量之像素的區塊,與 10 選擇具有其具備使編碼效率最高地之後方參照之移動向量 之像素的區塊的情形,由於表示選擇之資訊以少者即可, 因此能提昇編碼效率。又,選擇此一個區塊可採用(1)設成 包含具有前方參照之移動向量所參照之圖像之參照索引値 爲最小之移動向量之像素的區塊、(2)設成各像素所具有之 15 區塊之前方參照之移動向量所參照之圖像的參照索引値, 加算後方參照之移動向量所參照之圖像的參照索引値而所 加算之値呈最小的區塊、(3)取得前方參照之移動向量所參 照之圖像的參照索引之中央値,而設成包含具有其備有中 央値之前方參照之移動向量之像素的區塊’而後方參照之 20移動向量設成此區塊所具有之後方參照的移動向量、(4) 取得後方參照之移動向量所參照之圖像的參照索引之中央 値,而設成包含具有其備有中央値之後方參照之移動向量 之像素的區塊,而前方參照之移動向量設成此區塊所具有 之前方參照的移動向量等以上之任何的方法即可。又,後 1258991Further, the WMMM may calculate the motion vector of the block MB1 using only the forward motion vector MV21B of the image P21 of the block MB2 of the reference image P24. Further, it is also possible to determine the motion vector for the block MB1 using both the motion vector MV21A and the motion vector MV21B as shown in the embodiment 1 to the embodiment 4. In the case where any of the forward motion vector MV21A and the forward motion vector MV21B are selected, any one of the cases can be selected to select a motion vector that is encoded or decoded in time (previously described in the code column). The coding device and the decoding device are arbitrarily set. Here, the so-called motion vector that has been encoded or decoded in time means the 1st 10th motion vector. Further, the image P21 can be compensated for movement in a short term Buffer or a Long Term Buffer at any place. The short-term memory and long-term memory will be described later. Further, in the present embodiment, the case where the distance between the 15 images is used for the motion vector to be referred to is scaled, thereby calculating the motion vector used in the direct mode is described. The vector is calculated as a constant multiple. Here, the constant used in the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. Further, after calculating the right side of each calculation formula in the calculation formulas of the above-described motion vector MV21', motion vector MV24', shifting motion vector MV25', and motion vector MV21A', it is also possible to obtain the predetermined motion vector accuracy. As for the accuracy of the motion vector, there are 丨/2 pixels, 丨/3 pixels, and 1/4 pixel precision. And the accuracy of this motion vector is determined, for example, by a block unit, an image unit, and a sequence unit. 47 1258991 Now: Inventions®^—— (Implementation 6) This embodiment 6 uses the 16th to 18th drawings to illustrate the motion vector calculation method, which is used to determine the motion vector in the direct mode. In the case of having two first five-square motion vectors with reference to the two-frame image in front of the chronological order, a method of calculating the target motion vector by only one of the two forward motion vectors can be scaled. Further, the block MB1 is a processing target block, the block MB1 and the block MB2 are located at the same position, and the motion vector MV21 and the motion vector MV22 are motion vectors used when the block MB2 is encoded or decoded, and The image P21, 10 image P22 is referred to, respectively. Further, the image P21, the image P22, and the image P24 are images that have been encoded or decoded. Further, the time interval TR21 represents the time interval between the image P21 and the image P24, the time interval TR22 represents the time interval between the image P22 and the image P24, and the time interval TR21' represents between the image P21 and the image P23. The time interval TR22' represents the time interval between the image P22 15 and the image P23. In the first method, the block MB2 of the reference image P24 as shown in Fig. 16 has two forward direction motion vectors of the front side motion vector MV21 to be input image P21 and the front side motion vector MV22 to be input image P22. At the time of the object image P23, only the motion vector MV22 to which the 20 image P22 is displayed in order of display time is input is used, and the motion vector MV22' of the block MB1 is calculated by the following equation. MV22, two MV22 X TR22, /TR22 perform motion compensation from image P22 using motion vector MV22'. In the second method, as shown in Fig. 17, the block 1258901 of the image P24 is displayed ———--------------------------- ----------------- MB2 has the front side motion vector MV21 of the input image P21 and the two front direction motion vectors ' of the forward motion vector MV22 of the image P22 to be input. In the object image P23, only the motion vector MV21 of the image P21 to be input in order to display the time sequence is used, and the motion vector * 5 MV21' of the block MB1 is calculated by the following equation. ~ MV21, = MV21 X TR21, /TR21 ' Motion compensation is performed from the image P21 using the motion vector MV21'. By the first and second methods, the block MB2 belonging to the reference image P24 of the motion vector to be referred to can realize the motion compensation by first memorizing the state of 10 out of the two motion vectors. The capacity of the motion vector memory unit is suppressed to be small. Further, it is possible to perform motion compensation from the image P23 of the image in the vicinity of the display time sequence, similarly to the embodiment 1, by using the forward direction motion vector MV21. The motion vector MVN (not shown in Fig. 15) used at this time is calculated according to the following equation. MVN=MV21 X TR22VTR21 Further, in the third method, as shown in FIG. 18, the motion vector block MV21 and the motion vector MV22 are used, and the motion compensation block is obtained from the image P21 and the image P22, respectively. The average image is taken as a cropped image of ~20 in motion compensation. Although the third method increases the amount of calculation, it improves the accuracy of the movement compensation. Further, the motion vector MVN and the motion vector MV22 may be used, and the motion compensation block may be obtained from the image P22, and the average image 49 1258991 发明 and the invention description may be used as the interpolation image in the motion compensation. Moreover, in the present embodiment, the case where the distance between the images is used for the motion vector to be referred to is scaled, thereby calculating the motion vector used in the direct mode, which may also refer to the motion vector to be referred to. Calculate by 5 constant times. Here, the constant used in the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. Further, after calculating the equations of the motion vector MV21', the motion vector MV22', and the motion vector MVN, the right side of each equation can be calculated within the predetermined motion vector accuracy. As for the accuracy of the motion vector, there are 1/2 10 pixels, 1/3 pixels, and 1/4 pixel precision. And the accuracy of this motion vector is determined, for example, by a block unit, an image unit, and a sequence unit. The above embodiment 6 illustrates a reference image used for determining a motion vector for encoding or decoding a target block in a direct mode, and has a reference to two forward motion vectors of two frames of images in front of the display time sequence, !5, the same applies to the two rearward movement vectors (the second motion vector of the reference image specified by the second reference index) in the rear display of two frames of images, and only two rear motion vectors can be moved. One of them is scaled to calculate the object motion vector. The following is a description of FIG. 19 to FIG. 22, the block MB1 is a processing target block, the block MB1 and the block MB2 are located at the same position of the phase 2, and the motion vector MV24 and the motion vector MV25 are the area. The motion vector used when the block MB2 is encoded or decoded (the second motion vector of the reference image is specified by the second reference index). Further, the image P21, the image P23, the image P24, and the image P25 are images that have been encoded or decoded. Also, the time interval TR24 represents the time between the image P23 and the image P24 50 1258991 ------------------------------ -------------- Interval, time interval TRM represents the time interval between image P23 and image P25, time interval TR24' represents the time interval between image P22 and image P24 The time interval TR25' represents the time interval between the image P22 and the image P25. 5 As the first method, the block MB2 of the reference image P23 as shown in Fig. 19 has two rearward direction movements of the motion vector MV24 after the input image P24 and the motion vector MV25 after the input image P25. In the case of the vector, the motion vector MV24 of the image P24 to be input in order of display time is used only for the object image P22, and the motion vector 10 MV24' of the block MB1 is calculated by the following equation. MV24, = MV24 X TR24, /TR24 Motion compensation from image P24 using motion vector MV24'. Further, it is also possible to perform motion compensation from the image 15 P23 of the image in the vicinity of the display time sequence, similarly to the embodiment 1, using the forward direction motion vector MV24. The motion vector MVN1 (not shown) used at this time is calculated according to the following equation. MVN1-MV24 X TRN1/TR24 In the second method, the block MB2 of the reference image PM as shown in Fig. 20 has a moving vector MV24 to be input after the image P24, and a moving image 205 after being input into the image P25. When the vector MV25 moves the vector in the two backward directions, the object image is only used to move the vector MV25 in the backward direction of the image P25 to be displayed in the chronological order, and the motion vector MV25' of the block MB1 is expressed as follows. Calculation. MV25'2 MV25 X TR25'/TR2 1258991 发明y Description of the Invention Motion compensation is performed from the image Ρ25 using the motion vector MV25'. By the first and second methods, the block ΜΒ2 belonging to the reference image Ρ23 of the motion vector to be referred to can perform motion compensation by first memorizing the state of one of the two motion vectors, so that the motion vector can be memorized. The volume of the part is suppressed to a small extent. Further, it is also possible to perform motion compensation from the image f image P23 of the image in the vicinity of the display time sequence, similarly to the embodiment 1, using the backward direction motion vector MV25. The motion vector MVN2 (not shown) used at this time is calculated according to the following equation. 10 MVN2-MV25 x TRN1/TR25 Further, as the third method, as shown in FIG. 21, the motion compensation area is obtained from the image P24 and the image P25 using the motion vector MV24' and the motion vector MV25' obtained as described above. The block is treated as a patch image in motion compensation. 15 Although the third method increases the amount of calculation, it improves the accuracy of the object image P22. Furthermore, the motion compensation block can also be obtained from the image P24 using the above-described motion vector MVN1 and motion vector MVN2, and the average image thereof can be used as the interpolation image in the motion compensation. Further, as shown in FIG. 22, in the case where the reference image used for determining the motion vector in the direct mode has a reference to display the time sequence to move the vector behind one of the rear frame images, for example, To calculate the motion vector MV24'. Motion compensation is performed from the image P24 using the motion vector MV 24'. 52 1258991 wvwmmm Further, it is possible to perform motion compensation from the image - P23 of the image in the vicinity of the display time sequence, similarly to the implementation of the state 1, by using the backward direction vector MV25. The motion vector MVN3 (the pattern is not 'displayed) used at this time is calculated according to the following equation.辠5 MVN3-MV24 x TRN1/TR24 - Further, in the present embodiment, the use of the 19th to 22nd drawings illustrates the case where the vector has two reference directions in the rear direction of the two frames in the display time sequence. In the case where there is a reference shifting vector in the rear direction of one of the φ frame images in the display chronological order, the rear direction is shifted by 10 vectors to be scaled to calculate the object motion vector, but this may not The object motion vector is calculated by referring to the motion vector of the peripheral block in the same image by using the rear motion vector, and the image motion vector can also be calculated by referring to the motion vector of the peripheral block in the same image. First, the first calculation method will be described. Fig. 23 shows the positional relationship between the moving 15 vector and the target block to be referred to at this time. The block MB1 is a target block, and is a moving direction of a block which refers to three pixels included in the positional relationship of A, B, and C. However, in the case where the position of the pixel C is out of the picture or in a state where the encoding/decoding is not completed, the motion vector including the block of the pixel D is used instead of the block including the pixel C. The motion vector actually used in the direct mode is set to obtain the state of the center 移动 of the motion vector included in the three blocks of the A, B, and C pixels to which the reference is made. . In order to obtain the state of the center 移动 of the motion vector of the three blocks, it is not necessary to describe in the code column why the additional information of the motion vector is selected among the three motion vectors, and the neighboring block can be obtained. The actual 53 1258991 MBT invention of MB1 describes the movement vector of the moving movement. In this case, only the forward reference (reference to the first reference image) can be used for motion compensation using the determined motion vector, and the determined motion vector and the parallel motion vector can be used to refer to the two directions. (Reference to the first reference image and the second reference image) Five lines of motion compensation are performed. Next, the second calculation method will be described. The second calculation method does not acquire the center 値 as in the first calculation method, and obtains the motion vector having the highest coding efficiency from the motion vectors included in the three blocks including the A, Β, and C pixels to be referred to. The motion vector used in the actual 10 direct mode. In this case, only the forward reference (reference to the first reference image) can be used for motion compensation using the determined motion vector, and the determined motion vector and the parallel motion vector can be used to refer to the two directions. (Reference to the first reference image and the second reference image) Motion compensation is performed. The information indicating the motion vector having the highest coding efficiency is, for example, shown in Fig. 24(a), and shows the information of the direct mode output from the mode selection unit 107, and is added to the block in the code sequence generated by the code sequence generation unit 103. The front field. Further, as shown in Fig. 24(b), information indicating the vector with the highest coding efficiency can be added to the front field of the macroblock. Further, the information indicating the vector having the highest coding efficiency is, for example, a number identifying a block including 2 pixels to be referred to, and an identification number attached to each block. Further, when the block is identified by the identification number, only one of the identification numbers attached to each block may be used, or only one of the motion vectors used when the block corresponding to one identification number is encoded may be used. The most efficient coding vector can also be represented by the majority of the motion vector when the motion vector is a majority. 54 1258991 玖— ------------------------- – the motion vector with the highest coding efficiency or each of the two motion vectors (references to the first reference picture and the second reference picture) is attached to the identification number of each block. The most efficient moving vector. By using such a moving vector selection method, it is possible to obtain a motion vector with the highest coding efficiency. However, since it is necessary to describe the additional information indicating which motion vector is selected in the code sequence, it is necessary to additionally use the above code amount. Further, the third calculation method will be described. The third calculation method sets the motion vector with the reference index 参照 of the reference image of the reference vector as the motion vector used in the direct mode. The so-called reference index is the smallest, generally referring to an image that is close in order of display time. Or the most efficient moving vector. Therefore, by using such a moving vector selection method, the moving vector used in the direct mode is generated in the display chronological order, or the motion vector of the image with the highest encoding efficiency is used, and the encoding efficiency can be improved. 15 In the case where three reference vectors are identical among the three motion vectors, the center of the three motion vectors can be obtained. In the case where the movement vectors of the reference images whose reference index 値 is the smallest among the three movement vectors are two, for example, one of the two movement vectors is set to be fixedly selected. In the case of using the 23rd picture as an example, in the motion vector including the three blocks of 20 A, B, and C, the reference index of the two blocks including Pixel A and P1 is the smallest and In the case of referring to the same reference image, it is only necessary to obtain the motion vector of the block including the pixel A. However, in the motion vector of each of the three blocks including the pixel A, the pixel B, and the pixel C, the pixel A and the pixel C are included in the 1258999 ——— ---------- ----------------------------------- The reference index of the two blocks is the smallest and refers to the same reference image. In this case, it is preferable to obtain a motion vector including a block of the pixel A having the closest positional relationship to the block BL1. Further, the center ridge may be provided so that the center 値 is obtained for each of the horizontal direction component and the vertical direction component, and the size (absolute 値) of each motion vector is set to obtain the center 値. Further, in the case where the center of the motion vector is as shown in FIG. 25, the reference image at the rear is at the same position as the block BL1, and the block including the pixel A, the pixel B, and the pixel C, respectively, and The block of 10 pixels D as shown in Fig. 25 is included to be set to obtain the center 値 of the motion vectors of the five blocks. When the reference image near the encoding target pixel is used and the reference image at the rear is located at the same position as the block BL1, since the number of blocks is set to an odd number, once the block including the pixel D is used, the calculation of the motion vector is simply made. Central 値 processing. Further, in the case where the rear reference picture covers a plurality of blocks in the same area as the 15 block BL1, the motion vector in the block of the largest area overlapping the block BL1 among the plurality of blocks can be used. The motion compensation of the block BL1 is performed, or the majority of the block areas in the reference image corresponding to the block BL1 can be distinguished, and the block BL1 is moved and compensated for each of the divided blocks. 20 Also, explain with a specific example. As shown in FIG. 26 or FIG. 27, when all the blocks including the pixel A, the pixel B, and the pixel C are referred to the motion vector of the image that is further ahead than the image to be encoded, the above-described first calculation method can be used. To any of the methods of the 3 g method. 1258991 ----------------------------------------------- - the same When all the blocks including the pixel A, the pixel B, and the pixel C are referred to the motion vector of the image further than the encoding target image, any one of the above-described first to third calculation methods can be used. - The second is to show the pattern shown in Figure 3. The third diagram shows a case where all of the blocks including each of the five pixels A, B, and C have a motion vector that refers to an image that is more forward and rearward than the image to be encoded. According to the first calculation method described above, the motion vector used before the motion compensation of the block 肇BL1 is selected by the motion vector MVAf, the motion vector MVBf, and the motion vector MVCf, by the motion vector MVAb 10 and the motion vector MVBb. The center of the motion vector MVCb is selected to use the motion vector after the motion compensation of the block BL1. Moreover, the motion vector MVAf is a forward motion vector of a block including the pixel a, the motion vector MVAb is a rear motion vector of the block including the pixel A, and the motion vector MVBf is a forward motion vector of the block including the pixel B, and the motion vector 15 MVBb is the rear motion vector of the block containing pixel B, the motion vector MVCf is the forward motion vector of the block containing pixel C, and the motion vector MVCb is the rear motion vector of the block containing pixel C. Further, the moving vector MVAf or the like is not limited to the image shown in the drawings. This case is also the same in the description of <. * 20 According to the second calculation method described above, the motion vector with the highest coding efficiency is obtained from the motion vector referenced by the motion vector MVAf, the motion vector MVBf, and the motion vector MVCf, and the motion vector MVAb, the motion vector MVBb, and the motion vector are obtained. The moving vector with the highest coding efficiency is obtained from the motion vector referenced by the MVCb, and the motion vector is actually used in the direct mode to make 57 1258991 玖 = invention description. In this case, the motion vector with the highest coding efficiency may be obtained from the motion vector referenced by the motion vector MVAf, the motion vector MVBf, and the motion vector MVCf, and the motion compensation may be performed only by the forward reference, and the determined motion may be used. The motion vector and the parallel motion vector 5 are motion compensated in a two-way reference. It is also possible to maximize the coding efficiency without separately selecting the motion vectors of the forward reference and the backward reference to select a block and use the block to perform motion compensation with the motion vectors of the previous reference and the backward reference. In this case, it is compared with a block indicating that a pixel having a motion vector with the highest coding efficiency is selected, and a block having a pixel having a motion vector with the highest coding efficiency as the back is selected. In the case, since the information indicating the selection is small, the coding efficiency can be improved. Further, selecting one of the blocks may be (1) a block including pixels having a reference index 値 having a reference index 图像 of an image to which the forward referenced motion vector is the smallest, and (2) having each pixel having The reference index of the image referenced by the motion vector referenced by the block before the 15th block is added to the reference index of the image to which the motion vector referenced by the back reference is added, and the block which is added to the minimum is obtained, and (3) is obtained. The center of the reference index of the image referenced by the motion vector referred to in the forward direction is set to include the block having the pixel of the motion vector with the center 値 referenced before, and the 20-movement vector of the rear reference is set to this area. The block has a motion vector to be referred to by the latter, and (4) obtains a center 値 of the reference index of the image referred to by the motion vector referred to later, and is provided to include a pixel having a motion vector with a reference to the center 値. The block, and the moving vector of the front reference may be set to any of the above methods, such as the moving vector referred to by the previous block. Again, after 1258991
玖、SWJ 方參照之移動向量參照全部相同之圖像時,可應用上述(1) 與(3)之區塊的選擇方法。 上述第3計算方法係將移動向量MVAf、移動向量 MVBf、移動向量MVCf之前方參照之移動向量所參照之參 5 照圖像之參照索引値呈最小之移動向量設成於直接模式使 用之前方參照(第1參照)的移動向量。或是將移動向量 MVAb、移動向量MVBb、移動向量MVCb之後方參照之 移動向量所參照之參照圖像之參照索引値呈最小之移動向 量設成於直接模式使用之前方參照(第2參照)的移動向量 10 。又,第3計算方法雖然將參照圖像之參照索引値呈最小 之前方參照之移動向量設爲區塊BL1之前方參照的移動向 量,而將參照圖像之參照索引値呈最小之後方參照之移動 向量設爲區塊BL1之後方參照的移動向量,然而,亦可使 用參照圖像之參照索引値呈最小之前方或後方之其中任何 15 之一而導出區塊BL1之二個移動向量,並使用經導出之移 動向量而將區塊BL1予以移動補償。 其次說明第31圖所示之情形。第31圖表示像素A具 有各一條參照前方與後方之圖像的移動向量,像素B僅具 有參照前方之圖像的移動向量,像素C僅具有參照後方之 20 圖像的移動向量。 如此具有包含僅具有參照一方圖像之移動向量之像素 的區塊時,參照此區塊之另一方之圖像之移動向量設爲0 而使用上述第30圖之計算方法用以進行移動補償即可。具 體而言,使用第30圖之第1計算方法或第3計算方法,設 1258991 玖、葰明說明— 爲MVCf=MVBb=0計算即可。即,第1計算方法於計算 區塊BL1之前方移動向量時,將像素C參照前方圖像之移 動向量MVCf設爲MVCf=0,而計算移動向量MVAf、移 動向量MVBf及移動向量MVCf之中央値。又,於計算區 5 塊BL1之後方移動向量時,將像素B參照前方圖像之移動 向量MVBb設爲MVBb=0,而計算移動向量MVAb、移動 向量MVBb及移動向量MVCb之中央値。 第3計算方法係像素C參照前方圖像之移動向量 MVCf與像素B參照後方圖像之移動向量MVBb設爲 10 MVCf=MVBb=0,而計算區塊BL1之移動向量所參照之 參照圖像之參照索引値爲最小的移動向量。例如包含像素 A參照第1參照索引「0」的圖像,包含像素B參照第1 參照索引「1」的圖像的情形下,最小的第1參照索引之僅 爲「〇」。由於僅參照包含像素B之區塊前方之圖像的移動 15 向量MVBf參照具有最小之第1參照索引的圖像,因此將 移動向量MVBf設成區塊BL1的前方移動向量。又,例如 像素A、像素C之其中任何之一參照該第2參照索引爲最 小的情形,例如參照第2參照索引爲「0」之後方圖像的情 形下,將像素B參照後方之圖像之移動向量MVBb設爲 20 MVBb=0而計算移動向量MVAb、移動向量MVBb及移動 向量MVCb的中央値。將計算之結果獲得之移動向量設爲 區塊BL1之後方移動向量。 其次說明第32圖所示之情形。第32圖表示像素A具 有各一條參照前方與後方之圖像的移動向量,像素B僅具 60 1258991 玖、發明說明 有參照前方之圖像的移動向量,像素C不具有移動向量而 進行畫面內編碼的情形。 如上所述,包含參照對象之像素C的區塊被畫面內編 碼時,將參照此區塊之前方與後方之圖像的移動向量均設 5 爲「〇」並用以進行移動補償而使用上述第30圖之計算方 法即可。具體而言,設爲MVCf、MVCb=0來計算即可。 又,第30圖的情形係MVBb=0。 最後說明第33圖所示的情形。第33圖表示像素C以 直接模式而編碼的情形。 10 如此在參照對象之像素具有以直接模式而編碼的區塊 時,使用以直接模式編碼之區塊被編碼時使用之移動向量 且以使用第30圖之計算方法進行區塊BL1之移動補償即 可。 又,移動向量究竟爲前方參照與後方參照之何者,乃 15 依據要參照之圖像與編碼之圖像各別之圖像所具有之時間 資訊而決定。因此,在區別前方參照與後方參照的情形, 導出移動向量的情形係各別的區塊所具有之移動向量依據 各別的圖像所具有之時間資訊而判斷究竟爲前方參照與後 方參照之何者。 20 又說明組合上述說明之計算方法的例子。第34圖表示 決定於直接模式使用之移動向量的順序。第34圖係使用參 照索引而決定移動向量之方法的一例。又,第34圖所示之 RidxO、Ridxl係上述說明之參照索引。第34圖(a)表示依 第1參照索引RidxO而決定移動向量的順序,第34圖(b) 1258991 m 一 — — 表示依第2參照索引Ridxl而決定移動向量的順序。首先 說明第34圖⑷。 於步驟S37〇l計算在包含像素A之區塊、包含像素b 之區塊及包含像素C之區塊之中,使用第1參照索引 5 RidxO而計算參照圖像的區塊數。 於步驟S3701計算之區塊數爲「〇」的話,更於步驟 S37〇2使用第2參照索引Ridxl而計算參照圖像的區塊數 。於步驟S3702計算之區塊數爲「1」的話,於步驟S3703 將編碼對象區塊之移動向量設成「0」而以二個方向將編碼 10 對象區塊予以移動補償。另一方面,於步驟S3704計算之 區塊數爲「1」以上的話,於S3704藉第2參照索引Ridxl 存在之區塊數而決定編碼對象區塊的移動向量。例如使用 藉第2參照索引Ridxl存在之區塊數而決定的移動向量而 進行編碼對象區塊的移動補償。 15 於步驟S3701計算之區塊數爲「丨」的話,於步驟 S37〇5使用第1參照索引RidxO所存在之區塊的移動向量 〇 於步驟S3701計算之區塊數爲「2」的話,於步驟 S37〇6對於不存在第1參照索引Ridx0之區塊暫時設成在 20第1參照索引Ridx0具有〇之移動向量而使用相當於 三條移動向量之中央値的移動向量。 於步驟S3701計算之區塊數爲「3」的話,於步驟 S3707使用相當於三條移動向量之中央値的移動向量。又 ,亦可於步驟S3704之移動補償使用一條移動向量而設成 1258991 — — 二個方向的移動向量。在此之二個方向的移動補償亦可以 一條移動向量與相同方向之移動向量與反對方向之移動向 量,例如將此一條移動向量予以定標而求得的情形下進行 ,或是可使用與一條移動向量相同之一個方向之移動向量 5 與使用移動向量爲「〇」之移動向量來進行。其次說明第 34 圖(b)。 於步驟S3711計算存在第2參照索引Ridxl之區塊數 〇 於步驟S3701計算之區塊數爲「3」的話,更於步驟 10 S3712計算存在第1參照索引RidxO之區塊數。於步驟 S3712計算之區塊數爲「0」的話,於步驟S3713將編碼對 象區塊之移動向量設成「0」而以二個方向將編碼對象區塊 予以移動補償。另一方面,於步驟S3712計算之區塊數爲 「1」以上的話,於S3714藉第1參照索引RidxO存在之區 15 塊數而決定編碼對象區塊的移動向量。例如使用藉第1參 照索引RidxO存在之區塊數而決定的移動向量而進行編碼 對象區塊的移動補償。 於步驟S3711計算之區塊數爲「1」的話,於步驟 S37l5使用第2參照索引Ridxl所存在之區塊的移動向量 20 〇 於步驟S3711 g十算之區塊數爲「2」的話,於步驟 S3716對於不存在第2參照索引Ridxl之區塊暫時設成在 第2參照索引Ridxl具有之移動向量而使用相當於 三條移動向量之中央値的移動向量。 63 1258991 疚'—發職丽 ——— 於步驟S3711計算之區塊數爲「3」的話,於步驟 S3717使用相當於三條移動向量之中央値的移動向量。又 ,亦可於步驟S3714之移動補償使用一條移動向量而設成 二個方向的移動向量。在此之二個方向的移動補償亦可以 5 一條移動向量與相同方向之移動向量與反對方向之移動向 量,例如將此一條移動向量予以定標而求得的情形下進行 ,或是可使用與一條移動向量相同之一個方向之移動向量 與使用移動向量爲「〇」之移動向量來進行。 又,以上分別說明了第34圖(a)與第34圖(b),惟可使 10用雙方的處理,亦可僅使用一方的處理。然而,使用一方 之處理的情形下,例如進行從第34圖(a)所示之步驟S3701 開始之處理的情形下,進而至步驟S3704之處理的情形下 可進行第34圖(b)所示之S3711的處理以下。又,如此至 S3704之處理的情形在步驟S3711以下之處理之中無進行 15 步驟S3712以下的處理,因此可一意地決定移動向量。又 ,使用第34圖(a)與第34圖(b)之雙方處理的情形下,可先 進行任何一方的處理,亦可合倂進行。又,亦可在編碼對 象區塊周圍之區塊藉著直接模式而爲被編碼之區塊時,將 藉著直接模式而編碼之區塊被編碼時使用之移動向量所參 2〇 照之圖像的參照索引,設爲藉著直接模式而編碼之區塊且 係在編碼對象區塊周圍之區塊所具有的者。 以下以具體的性之區塊的例子來說明移動向量的決定 方法。第35圖表示編碼對象區塊BL1所參照之區塊分別 具有之移動向量的種類。第35圖(a)之具有像素之區塊爲 64 1258991 ------------------------------------------------ 畫面內編碼的區塊,具有像素B之區塊具有一條移動向量 ’係以此一條移動向量進行移動補償的區塊,具有像素c 之區塊具有二條移動向量而以二個方向進行移動補償的區 ’ 塊。又’具有像素B之區塊具有第2參照索引Ridxl所示 4 5之移動向量。具有像素A之區塊爲畫面內編碼的區塊,故 · 不具有移動向量,即,也不具有參照索引。 · 於步驟S3701計算存在第1參照索引Ridx〇的區塊數 。如第35圖所示存在第丨參照索引Ridx〇的區塊數爲二條 春 ’因此於步驟S3706對於不存在第i參照索引Ridx〇的區 10塊暫時於第1參照索引RidxO設爲具有MV=0的移動向量 — 者,而使用相當於三條移動向量之中央値的移動向量。可 僅使用此移動向量而將編碼對象區塊予以二個方向的移動 補償’或是使用以下所示之第2參照索引Ridxl而使用其 他的移動向量以進行二個方向的移動補償。 15 於步驟S7311計算存在第2參照索引Ridxl的區塊數 。如第35圖所示存在第2參照索引Ridxl的區塊數爲i條 修 ,因此於步驟S3?l5使用存在第2參照索引Ridxl之區塊 的移動向量。 ' 又,說明組合上述說明之計算方法之其他例子。第36 ‘ 2〇圖表示依據分別具有像素A、B、C之區塊所具有之移動向 量所參照之圖像的參照索引値,而決定編碼對象區塊之移 動向量的順序。第36圖(a)、(b)表示以第1參照索引 RidxO爲基準而決定移動向量的順序,第36圖(c)、(幻表 示以第2參照索引Ridxl爲基準而決定移動向量的順序。 65 1258991 ------------------------ 又,第36圖(a)表示以第1參照索引Ridx()爲基準的順序 的情形下第36圖(c)表示以第2參照索引Ridxl爲基準的 順序,第36圖(b)表示以第1參照索引Ridx〇爲基準的順 序的情形下第36圖(d)表示以第2參照索引Ridxl爲基準 5的順序,因此,以下的說明僅就第36圖(a)與第36圖(b)來 說明。首先就第36圖(a)來說明。 於步驟S3801判斷在有效的第1參照索引Ridx0之中 是否可選擇一個最小的第1參照索引RidxO。 於步驟S3801判斷在有效的第1參照索引Ridx0之中 10 可選擇一個最小的第1參照索引RidxO的情形下,於步驟 S3802使用經選擇之移動向量。 於步驟S3801在有效的第1參照索引Ridx0之中最小 的第1參照索引RidxO爲多數的情形下,於步驟S38〇3使 用依據優先順位所選擇之區塊所具有之移動向量。在此說 !5 明,所謂優先順序係以具有像素A之區塊、具有像素B之 區塊、具有像素C之區塊的順序決定使用於編碼對象區塊 之移動補償的移動向量。 於步驟S3801無有效之第1參照索引RidxO的情形下 ,於步驟S3804進行與S3802或S3803不同的處理。例如 2〇 進行以第34圖(b)說明之步驟S3711以下的處理即可。其 次就第36圖(b)來說明。第36圖(b)與第36圖(a)之不同點 係在於以第36圖(a)中的步驟S38〇3與步驟S3804中的處 理設爲第36圖(b)所示之步驟S3813之點。 於步驟S3811判斷是否可在有效的第1參照索引 66 1258991When the moving vector referenced by the SWJ side refers to all the same images, the selection method of the blocks of the above (1) and (3) can be applied. In the third calculation method, the motion vector MVAf, the motion vector MVBf, and the motion vector referenced by the motion vector referenced by the motion vector referenced by the motion vector MVCf are set to be the minimum motion vector before the direct mode is used. (first reference) motion vector. Or the motion vector MVAb, the motion vector MVBb, and the motion vector referenced by the motion vector referenced by the motion vector after the motion vector MVCb are set to the minimum motion vector, which is set to be used in the direct mode (second reference). Move the vector 10 . Further, in the third calculation method, the motion vector referred to before the reference index of the reference image is minimized is the motion vector referred to by the block BL1, and the reference index of the reference image is minimized. The motion vector is set to the motion vector referenced after the block BL1, however, the motion vector of the reference image 値 may be used to derive the two motion vectors of the block BL1 using any one of the first or the least of the reference index ,, and Block BL1 is motion compensated using the derived motion vector. Next, the situation shown in Fig. 31 will be explained. Fig. 31 shows that the pixel A has a motion vector for each of the front and rear images, and the pixel B has only the motion vector of the image with reference to the front, and the pixel C has only the motion vector with reference to the rear 20 images. When there is a block including a pixel having only a motion vector of a reference image, the motion vector of the other image of the reference block is set to 0, and the calculation method of the above FIG. 30 is used for motion compensation. can. Specifically, using the first calculation method or the third calculation method in Fig. 30, it is assumed that 1258991 玖, 葰明明—for MVCf=MVBb=0. That is, when the first calculation method calculates the motion vector before the block BL1, the pixel C refers to the motion vector MVCf of the front image as MVCf=0, and calculates the center of the motion vector MVAf, the motion vector MVBf, and the motion vector MVCf. . Further, when the vector is moved after the block BL1 in the calculation area, the pixel B refers to the motion vector MVBb of the front picture as MVBb = 0, and the center 値 of the motion vector MVAb, the motion vector MVBb, and the motion vector MVCb is calculated. In the third calculation method, the pixel C refers to the motion vector MVCf of the front image and the motion vector MVBb of the pixel B with reference to the rear image is set to 10 MVCf=MVBb=0, and the reference image to which the motion vector of the block BL1 refers is calculated. The reference index 値 is the smallest motion vector. For example, when the image including the pixel A referring to the first reference index "0" includes the image in which the pixel B refers to the first reference index "1", the smallest first reference index is only "〇". Since the image having the smallest first reference index is referred to only by the movement 15 vector MVBf of the image in front of the block including the pixel B, the motion vector MVBf is set as the forward motion vector of the block BL1. Further, for example, when any one of the pixel A and the pixel C refers to the second reference index, for example, when the second reference index is a "0" image, the pixel B is referred to the rear image. The motion vector MVBb is set to 20 MVBb=0 to calculate the center 値 of the motion vector MVAb, the motion vector MVBb, and the motion vector MVCb. The motion vector obtained as a result of the calculation is set as the square motion vector after the block BL1. Next, the situation shown in Fig. 32 will be explained. Figure 32 shows that the pixel A has a motion vector for each of the front and rear images. The pixel B has only 60 1258991 玖. The invention describes a motion vector with reference to the image in front. The pixel C does not have a motion vector and is displayed in the screen. The case of coding. As described above, when the block including the pixel C of the reference object is intra-coded, the motion vector of the image before and after the reference block is set to 5 and is used for motion compensation. The calculation method of the 30 figure can be used. Specifically, it can be calculated by setting MVCf and MVCb=0. Further, the case of Fig. 30 is MVBb = 0. Finally, the situation shown in Fig. 33 will be explained. Fig. 33 shows a case where the pixel C is encoded in the direct mode. 10 When the pixel of the reference object has a block coded in the direct mode, the motion vector used when the block coded by the direct mode is encoded is used, and the motion compensation of the block BL1 is performed by using the calculation method of FIG. can. Further, whether the motion vector is the front reference or the backward reference is determined based on the time information of the image to be referred to and the image of the coded image. Therefore, in the case of distinguishing between the front reference and the backward reference, the case where the motion vector is derived is determined by the motion vector of each block based on the time information of each image to determine which of the forward reference and the backward reference. . 20 Also an example of a combination of the above-described calculation methods will be described. Figure 34 shows the order of the motion vectors determined by the direct mode. Fig. 34 is an example of a method of determining a motion vector using a reference index. Further, RidxO and Ridx1 shown in Fig. 34 are the reference indexes described above. Fig. 34(a) shows the procedure for determining the motion vector based on the first reference index RidxO, and Fig. 34(b) 1258991 m-- indicates the order in which the motion vector is determined by the second reference index Ridx1. First, explain Figure 34 (4). In step S37〇1, the number of blocks in which the reference image is calculated using the first reference index 5 RidxO among the block including the pixel A, the block including the pixel b, and the block including the pixel C is calculated. When the number of blocks calculated in step S3701 is "〇", the number of blocks of the reference image is calculated using the second reference index Rixx1 in step S37〇2. When the number of blocks calculated in step S3702 is "1", the motion vector of the coding target block is set to "0" in step S3703, and the coded 10 object block is motion-compensated in two directions. On the other hand, if the number of blocks calculated in step S3704 is "1" or more, the motion vector of the coding target block is determined by the number of blocks in which the second reference index Ridx1 exists in S3704. For example, the motion compensation of the coding target block is performed using the motion vector determined by the number of blocks in which the second reference index Ridx1 exists. When the number of blocks calculated in step S3701 is "丨", the movement vector of the block in which the first reference index RidxO exists is used in step S37〇5, and the number of blocks calculated in step S3701 is "2". In step S37〇6, the block in which the first reference index Ridx0 does not exist is temporarily set to have a motion vector of 〇 in the 20th first reference index Ridx0, and a motion vector corresponding to the center 三 of the three motion vectors is used. When the number of blocks calculated in step S3701 is "3", a motion vector corresponding to the center 三 of the three motion vectors is used in step S3707. Alternatively, the motion compensation in step S3704 may be set to 1258991 - a motion vector in two directions using a motion vector. The motion compensation in the two directions may also be performed by a motion vector and a motion vector of the same direction and a motion vector of the opposite direction, for example, when the motion vector is scaled, or may be used. The motion vector 5 in one direction in which the motion vector is the same is performed using the motion vector in which the motion vector is "〇". Next, explain Figure 34 (b). In step S3711, the number of blocks in which the second reference index Ridx1 exists is calculated. If the number of blocks calculated in step S3701 is "3", the number of blocks in which the first reference index RidxO exists is calculated in step S3712. When the number of blocks calculated in step S3712 is "0", the motion vector of the coded object block is set to "0" in step S3713, and the coding target block is motion-compensated in two directions. On the other hand, if the number of blocks calculated in step S3712 is "1" or more, the motion vector of the coding target block is determined in S3714 by the number of blocks of the first reference index RidxO. For example, the motion compensation of the coding target block is performed using the motion vector determined by the number of blocks in which the first reference index RidxO exists. When the number of blocks calculated in step S3711 is "1", the motion vector 20 of the block in which the second reference index Ridx1 exists in step S3715 is "2" in the case where the number of blocks in the step S3711 is "2". In step S3716, the block in which the second reference index Ridx1 is not present is temporarily set as the motion vector included in the second reference index Ridx1, and the motion vector corresponding to the center 三 of the three motion vectors is used. 63 1258991 疚 '— 任 丽 — If the number of blocks calculated in step S3711 is "3", a motion vector corresponding to the center 三 of the three motion vectors is used in step S3717. Further, the motion compensation in step S3714 may be set to a motion vector in two directions using a motion vector. The motion compensation in the two directions can also be performed by a motion vector and a motion vector in the same direction and a motion vector in the opposite direction, for example, when the motion vector is scaled, or can be used. A motion vector in the same direction as a motion vector is performed using a motion vector in which the motion vector is "〇". Further, although the above description of Fig. 34 (a) and Fig. 34 (b) has been described above, it is possible to use 10 for both the processing and only one of the processing. However, in the case of using one of the processes, for example, when the process from step S3701 shown in (a) of FIG. 34 is performed, and the process of step S3704 is further performed, the case shown in FIG. 34(b) can be performed. The processing of S3711 is as follows. Further, in the case of the processing of S3704, the processing below step S3712 is not performed in the processing below step S3711, so that the motion vector can be determined intentionally. Further, in the case of using both of the processing of Fig. 34 (a) and Fig. 34 (b), either one of the processes may be performed first, or may be carried out in combination. In addition, when the block around the coding target block is the coded block by the direct mode, the image of the motion vector used when the block coded by the direct mode is encoded is used. The reference index is set to the block coded by the direct mode and is the one of the blocks around the coding target block. The method of determining the motion vector will be described below by taking an example of a specific block of sex. Fig. 35 shows the type of the motion vector which each block of the coding target block BL1 has. Figure 35 (a) has a pixel block of 64 1258991 ----------------------------------- ------------- Intra-coded block, block with pixel B has a motion vector' is a block that is motion compensated with one motion vector, block with pixel c A block' block with two motion vectors and motion compensation in two directions. Further, the block having the pixel B has a motion vector indicated by the second reference index Ridx1. The block having the pixel A is a block coded in the picture, so that it does not have a motion vector, that is, does not have a reference index. The number of blocks in which the first reference index Ridx is present is calculated in step S3701. As shown in FIG. 35, the number of blocks in which the second reference index Ridx is present is two springs. Therefore, in step S3706, the block 10 in which the i-th reference index Ridx is not present is temporarily set to have the MV= in the first reference index RidxO. A motion vector of 0 is used, and a motion vector equivalent to the center 三 of the three motion vectors is used. It is possible to use the motion vector to compensate the motion of the coding target block in two directions or to use the second reference index Ridx1 shown below to use other motion vectors for motion compensation in two directions. 15 The number of blocks in which the second reference index Ridx1 exists is calculated in step S7311. As shown in Fig. 35, the number of blocks in which the second reference index Ridx1 exists is i-corrected. Therefore, the motion vector of the block in which the second reference index Ridx1 exists is used in steps S3 to l5. 'Another example of combining the above-described calculation methods will be described. The 36th '2' diagram shows the order of the motion vectors of the coding target block based on the reference index 图像 of the image to which the motion vectors of the blocks A, B, and C respectively have reference. (a) and (b) of FIG. 36 show the order in which the motion vector is determined based on the first reference index RidxO, and FIG. 36(c) shows that the order of the motion vector is determined based on the second reference index Ridx1. 65 1258991 ------------------------ Also, Fig. 36 (a) shows the case of the order based on the first reference index Ridx(). 36(c) shows the order based on the second reference index Ridx1, and FIG. 36(b) shows the order based on the first reference index Ridx〇. FIG. 36(d) shows the second Since the reference index Ridx1 is in the order of the reference 5, the following description will be described only with reference to Fig. 36 (a) and Fig. 36 (b). First, the figure is shown in Fig. 36 (a). It is judged that it is valid in step S3801. Whether or not a minimum first reference index Ridx0 can be selected among the first reference index Ridx0. In step S3801, it is determined that 10 of the valid first reference index Ridx0 can select a minimum first reference index RidxO, in the step S3802 uses the selected motion vector. In step S3801, in the case where the smallest first reference index RidxO among the valid first reference index Ridx0 is a majority In step S38〇3, the motion vector of the block selected according to the priority order is used. Here, the priority order is the block having the pixel A, the block having the pixel B, and the pixel C. The order of the blocks determines the motion vector used for the motion compensation of the coding target block. In the case where there is no valid first reference index RidxO in step S3801, a process different from S3802 or S3803 is performed in step S3804. Fig. 34(b) shows the processing of step S3711 and below. Next, it is explained in Fig. 36(b). The difference between Fig. 36(b) and Fig. 36(a) is based on Fig. 36 ( The processing in step S38〇3 and step S3804 in a) is set to the point of step S3813 shown in Fig. 36(b). In step S3811, it is judged whether or not the first reference index 66 is valid.
RidxO之中可選擇一個最小的第1參照索引Ridx0。 於步驟S38ll在有效的第1參照索引RidxO之中能選 擇一個最小的第1參照索引Ridx0的情形下,於步驟 S3812使用經選擇的移動向量。 5 於步驟S3811無有效之第1參照索引RidxO的情形下 ,於步驟S3813進行與S3812不同的處理。例如以第34 圖(b)說明之步驟S3711進行以下的處理即可。 又,上述所示之有效的第1參照索引Ridx〇乃指第35 圖(b)記爲「〇」之第1參照索引RidxO,且爲具有移動向 10 量所表示之參照索引。又,第35圖(b)中記爲「X」的地 方表示未分配參照索引者。又,第36圖(c)中的步驟S38M 、第36圖(d)中的步驟S3833係進行第34圖(a)說明之步驟 S3701以下的處理即可。 以下使用具體的之區塊的例子以第35圖來詳細說明移 15 動向量的決定方法。 於步驟S3801判斷是否可在有效的第1參照索引 RidxO之中可選擇一個最小的第1參照索引RidxO。 第35圖所示之情形,其有效的第1參照索引RidxO爲 二個,於步驟S3801判斷在有效的第1參照索引RidxO之 20中可選擇一個最小的第1參照索引RidxO的情形下,於步 驟S38〇2使用經選擇之移動向量。 於步驟S3801在有效的第1參照索引RidxO之中最小 的第1參照索引RidxO爲多數的情形下,於步驟S3803使 用依據優先順位所選擇之區塊所具有之移動向量。在此說 67 1258991 明,所謂優先順序係以具有像素A之區塊、具有像素B之 區塊、具有像素C之區塊的順序決定使用於編碼對象區塊 之移動補償的移動向量。在具有像素B之區塊與具有像素 C之區塊具有相同之第1參照索引RidxO的情形下,依據 5 優先順位採用具有像素B之區塊中的第1參照索引RidxO ,並使用對應此具有像素B之區塊中的第1參照索引 RidxO的移動向量而進行編碼對象區塊BL1之移動補償。 此時,可僅使用經決定之移動向量而在二個方向將編碼對 象區塊BL1予以移動補償,而如以下所述使用第2參照索 10 引Ridxl並使用其他移動向量而進行二個方向的移動補償 〇 於步驟S3821判斷是否可在有效的第2參照索引 Ridxl之中可選擇一個最小的第2參照索引Ridxl。 第35圖所示之情形,由於有效的第2參照索引RidxO 15 爲一個,因此於步驟S3822使用對應具有像素C之區塊中 的第2參照索引Ridxl的移動向量。 又,就上述不具有參照索引之區塊,係設爲具有移動 向量之大小爲「〇」之移動向量者’有關取得合計Η個移動 向量之中央値之點,係設爲具有移動向量之大小爲「0」之 20 移動向量者,亦可設成取得合計三個移動向量之中央値, 亦可設成取得具有參照索引之區塊所具有之移動向量的平 均値。 又,亦可將上述說明之優先順位設成例如具有像素Β 之區塊、具有像素Α之區塊、具有像素C之區塊的順序而 68 1258991 疚—、WMW——— . 設成決定使用於編碼對象區塊之移動補償的移動向量。 如此一來,以使用參照索引而決定於將編碼對象區塊 予以移動補償時使用之移動向量,藉此能一意地決定移動 - 向量。又,依據上述例子則能提昇編碼效率。又,由於無 - 5 使用時刻資訊而判斷移動向量爲前方參照或是後方參照的 必要,因此能簡略用以決定移動向量之處理。又,若是考 慮每個區塊的預測模式、移動補償所使用之移動向量等, 雖存在有多數的圖案,惟可藉著上述一連串的流程而處理 · 因此有益。 10 又,於本實施樣態說明藉著對於參照移動向量使用圖 - 像間之時間上的距離而定標,而計算於直接模式使用之移 動向量的情形,此亦可將要參照之移動向量予以常數倍計 算。在此說明,使用於常數倍之常數在以多數區塊單位或 多數圖像單位編碼或解碼的情形下亦可變更。 15 又,使用參照索引Ridx〇、Ridxl之移動向量的計算方 法不僅是使用中央値的計算方法,亦可與其他計算方法組 鲁 合。例如於前述第3計算方法,分別包含像素A、像素B 、像素C之區塊中,參照相同於參照索引最小之圖像的移 , 動向量爲多數的情形下,不_定必要計算此等區塊之移動 · 2〇向重的中央値,亦可計算此等的中央値而將所獲得之移動 · 向墓g受爲區塊BL1之直接模式使用之移動向量。或是從參 照索引呈最小之多數移動向量之中例如選擇一個編碼效率 最高之移動向量。 又’可將區塊BL1之前方向移動向量與後方向移動向 69 1258991 量分別獨立計算,亦可關聯計算。例如可從相同移動向量 計算前方向移動向量與後方向移動向量。 又,可將計算之結果所獲得之前方向移動向量與後方 向移動向量之其中任何一方設爲區塊BL1之移動向量。 5 (實施樣態8) 本實施樣態之參照圖像之參照區塊MB具有將保存於 長期記憶體之參照圖像設爲第1參照圖像而參照的前方向( 第1)移動向量,及將保存於短期記憶體之參照圖像設爲第 2參照圖像而參照的前方向(第2)移動向量。 10 第37圖表示於長期記憶體僅保存一個參照圖像之情形 下之直接模式中的二個方向預測。 實施樣態8與至此之多數實施樣態的不同點係參照圖 像1之區塊MB2之前方向(第1)移動向量MV21參照著保 存於長期記憶體之參照圖像。 15 短期記憶體係用以暫時保存參照圖像的記憶體’例如 以圖像保存在記憶體之順序(即’編碼或解碼的順序)保存 _像。將圖像新保存於短時期記憶體之際記憶體容量不足 日寺,則從最早保存於記憶體之圖像的順序予以刪除。 長期記憶體並不一定限定如短期間記憶體那般以時刻 的順序保存圖像。例如在保存圖像之順序上可對應圖像之 時刻的順序,亦可對應保存圖像之記憶體之位址的順序。 因此,無法將參照保存於長期記憶體之圖像的移動向量 M21依據時間間隔而定標。 長期記憶體並非如短期記憶體那般用以暫時地保存參 70 1258991 __________________________________________________________________—---------------------—...........—......—---------------------------------------------------------------------------------- 玖、發明說明 照圖像者,而係持續地保存參照圖像者。爰此,對應保存 於長期記憶體之移動向量的時間間隔比對應保存於短期記 憶體之移動向量的時間間隔大許多。 於第37圖,長期記憶體與短期記憶體之界限如圖所示 5 以縱的點線表不,藉此,有關左邊圖像之資訊保存於長期 記憶體,藉此,對於右邊圖像之資訊保存於短期記憶體。 而圖像P23之區塊MB1爲對象區塊。又,區塊MB2係於 參照圖像P24內與區塊MB1相同位置的參照圖像。參照圖 像P24之區塊MB2之移動向量之中,前方向(第1)移動向 10 量MV21係將保存於長期記憶體之圖像P21當作第1參照 圖像而參照的第1移動向量,後方向(第2)移動向量MV25 係將保存於短期記憶體之圖像P25當作第2參照圖像而參 照的第2移動向量。 如前如所,圖像P21與圖像P24之時間間隔TR21對 15 應參照保存於長期記憶體之圖像的移動向量MV21,圖像 P24與圖像P25之時間間隔TR2對應參照保存於短期記憶 體之圖像的移動向量MV25,而有圖像P21與圖像P24之 時間間隔TR21比圖像P24與圖像P25之時間間隔TR2大 許多或呈不定的情形。 20 爰此,本實施樣態並非如至此之實施樣態那般將參照 圖像P24之區塊MB2的移動向量予以定標而求得對象圖像 P23之區塊MB1的移動向量者,而是依以下的方法來計算 對象圖像P23之區塊MB1的移動向量。 MV21 = MV21, 71 1258991 §兌 MV24,= 0 以上式表示在參照圖像P24之區塊MB2的移動向量之 中,將保存於長期記憶體之第1移動向量MV21原原本本 地當作對象圖像之第1移動向量MV21’者。 5 以下式表示要保存於保存在短期記憶體之圖像P24之 對象圖像P23之區塊MB1之第2移動向量MV24’比第1 移動向量MV21’小許多,故可不必重視者。第2移動向量 MV24’被當作“0”處理。 如上所述,參照區塊MB具有將保存於長期記憶體之 10 參照圖像作爲第1參照圖像而參照之一個移動向量,與將 保存於短期記憶體之參照圖像作爲第2參照圖像而參照之 一個移動向量的情形下,在參照圖像之區塊之移動向量之 中,原原本本地使用已保存於長期記憶體之移動向量而作 爲對象圖像之區塊的移動向量並進行二個方向預測。 15 又,保存在長期記憶體之參照圖像可爲第1參照圖像 或第2參照圖像之其中任何圖像者,參照保存在長期記憶 體之參照圖像的移動向量MV21可爲後方向移動向量。又 ,第2參照圖像保存於長期記憶體,第1參照圖像保存於 短期記憶體的情形下,將定標應用於參照第1參照圖像之 20 移動向量而計算對象圖像的移動向量。 如此一來,能不使用長期記憶體之相當大或呈不定的 時間而進行二個方向預測的處理。 又,並非原原本本地使用要參照的移動向量,而可將 該移動向量予以常數倍而進行二個方向預測。 72 1258991 P:7發明說明 又,使用於常數倍之常數在以多數區塊單位或多數圖 像單位編碼或解碼的情形下亦可變更。 (實施樣態9) 本實施樣態表示參照圖像之參照區塊MB具有參照保 5 存於長期記憶體之參照圖像之二個前方移動向量的情形下 之直接模式中的二個方向預測。 第38圖係表示參照區塊MB具有參照保存於長期記憶 體之參照圖像之二個前方移動向量的情形下之直接模式中 的二個方向預測。 1〇 實施樣態9與實施樣態8之不同點在於參照圖像之區 塊MB2之移動向量MV21與移動向量MV22雙方,參照保 存於長期記憶體之圖像者。 於第38圖中,長期記憶體與短期記憶體之界限如圖所 示以縱的點線表示,藉此,有關左邊圖像之資訊保存於長 15 期記憶體,藉此,對於右邊圖像之資訊保存於短期記憶體 。而圖像P24之區塊MB2之移動向量MV21及移動向量 MV22二者均參照保存於長期記憶體之圖像。移動向量 MV21對應參照圖像P21,移動向量MV22對應參照圖像 P22。 2〇 對應參照保存於長期記憶體之圖像P22之移動向量 MV22而圖像P22與圖像P24之時間間隔TR22乃有比保 存於短期記憶體之圖像P24與圖像P25之時間間隔TR25 大許多,或呈不定的情形。 於第38圖以對應移動向量MV22之圖像P22、對應移 73 1258991 動向量MV21之圖像P21的順序分配順序,圖像P21、圖 像P22保存於長期記憶體。於第38圖如以下所述計算對象 圖像之區塊MB1的移動向量。 MV22,= MV22 5 MV24,= 0 以上式表示在參照圖像P24之區塊MB2的移動向量之 中將,將參照分配順序最小之圖像P21的移動向量MV22 原原本本地當作對象圖像P23之區塊Mbl之移動向量 MV22,者。 10 以下式表示保存於短期記憶體之對象圖像P23之區塊 MB1之後方向移動向量MV24’比第1移動向量MV21’小許 多,故可不必重視者。後方移動向量MV24’被當作“0” 處理。 如上所述,將參照保存於長期記憶體之參照圖像之區 15 塊之移動向量之中分配順序最小的圖像之移動向量原原本 本地使用,而作爲對象圖像之區塊的移動向量,因此,能 不使用長期記憶體之相當大、或呈不定之時間而可進行二 個方向預測的處理。 又,亦可不原原本本地使用要參照的移動向量而而可 20 將該移動向量予以常數倍而進行二個方向預測。 又,使用於常數倍之常數在以多數區塊單位或多數圖 像單位編碼或解碼的情形下亦可變更。 又,參照圖像之區塊MB2之移動向量MV21與移動向 量MV22之雙方參照保存於長期記憶體之圖像的情形下, 74 1258991 玖、發明說W— 亦可設成選擇參照第1參照圖像之移動向量。例如MV21 係參照第1參照圖像之移動向量,MV22爲參照第2參照 圖像之移動向量的情形下,區塊MB1之移動向量使用對於 圖像P21之移動向量MV21與對於圖像P24之移動向量“ 5 0,,° (實施樣態10) 本實施樣態就實施樣態5至實施樣態9記載之直接模 式中的移動向量計算方法進行說明。此移動向量計算方法 於圖像之編碼或解碼之際均可應用。在此說明編碼或解碼 10 之對象區塊稱爲對象區塊。又,於對象區塊MB之參照圖 像中將與對象區塊相同位置的區塊稱爲參照區塊。 第39圖表示本實施樣態之移動向量計算方法之處理的 流程。 首先,判斷對象區塊MB之後方之參照圖像中的參照 15 區塊MB是否具有移動向量(步驟S1)。參照區塊MB不具 有移動向量的話(步驟SI ; No),移動向量設爲“0”而進 行二個方向預測(步驟S2)並結束計算移動向量的處理。 參照區塊MB具有移動向量的話(步驟SI ; Yes),判定 參照區塊MB是否具有前方向移動向量(步驟S3)。 20 參照區塊MB不具有前方向移動向量(步驟S3 ; No), 由於參照區塊MB僅具有後方向移動向量,因此判定其後 方向移動向量之數(步驟S14)。參照區塊MB之後方向移動 向量之數爲“2”的情形下,依據第19圖、第20圖、第 21圖及第22圖所記載之其中任何計算方法並使用經定標 1258991 疚、發明說明 之二個後方向移動向量而進行二個方向預測(步驟S15)。 另一方面,參照區塊MB之後方向移動向量之數爲“1 ”的情形下,將參照區塊MB具有之唯一後方向移動向量 予以定標並使用經定標之後方向移動向量而進行移動補償( 5 步驟S16)。一旦結束步驟S15或S16之二個方向預測,則 結束移動向量之計算方法的處理。 參照區塊MB具有前方移動向量的話(步驟S3 ; Yes), 判定參照區塊MB之前方移動向量之數(步驟S4)。 參照區塊MB之前方向移動向量之數爲“Γ的情形下 10 ,判定對應參照區塊mb之前方移動向量的參照圖像是否 保存於長期記憶體或短期記憶體(步驟S5)。 對應參照區塊MB之前方移動向量的參照圖像保存於 短期記憶體的情形下,將參照區塊MB之前方移動向量予 以定標並使用經定標之前方向移動向量而進行二個方向預 15 測(步驟S6)。 對應參照區塊MB之前方移動向量的參照圖像保存於 長期記憶體的情形下,依第37圖所示之移動向量計算方法 ,參照區塊MB之前方移動向量不被定標而原原本本地被 使用並設爲後方向移動向量零而進行二個方向預測(步驟 20 S7)。當步驟S6或步驟S7之二個方向預測結束時,則結束 移動向量之計算方法的處理。 參照區塊MB之後方向移動向量之數爲“2”的情形下 ,判定參照區塊MB之前方向移動向量內對應保存於長期 記憶體之參照圖像之前方向移動向量數(步驟S8)。 76 1258991 玖—、—發 對應保存於長期記憶體之參照圖像之前方向移動向羹 數於步驟S8爲“〇”的情形下,依據第I6圖所示之移動向 量計算方法對於對象區塊MB所屬之對象圖像將以顯承時 間順序接近之移動向量予以定標並使用經定標之移動向毚 5 而進行二個方向預測(步驟S9)。 對應保存於長期記憶體之參照圖像之前方向移動向毚 數於步驟S8爲“Γ的情形下,將保存於短期記憶體之陶 像之移動向量予以定標並使用經定標之移動向量而進行= 個方向預測(步驟S10)。 10 對應保存於長期記憶體之參照圖像之前方向移動向籩 數於步驟S8爲“2”的情形下,藉二個前方向移動向麾雙 方而判定是否參照長期記憶體內之相同圖像(步驟SU)。藉 二個前方向移動向量雙方而參照長期記憶體內之相同陶像( 步驟Sll ; Yes)的情形下,依第I5圖記載之移動向量胃十尊 15 方法並使用在參照長期記憶體內之二個前方向移動向籩之 圖像內先經編碼或解碼之移動向量而進行二個方向預铷(歩 驟 S12)。 不藉著二個前方向移動向量雙方而參照長期記憶體內 之相同圖像的情形下(步驟Sll ; No),依據第38圖記載之 20移動向量計算方法,使用對應保存於長期記憶體分配之順 序小之圖像之前方向移動向量而進行二個方向預測(步驟 S13)。長期記憶體乃與實際之圖像之時刻無關而保存著參 照圖像,故依據於各參照圖像分配的順序而選擇應使用於 二個方向預測之前方向移動向量。又,保存於長期記憶體 77 1258991 玖、# 之參照圖像的順序亦有與圖像之時刻一致的情形,然而亦 可僅與記憶體之位址的順序一致。亦即,亦可使保存於長 期記憶體之圖像的順序不一定與圖像之時刻一致。當結束 步驟S12、S13之二個方向預測時,則結束移動向量之計 5 算方法的處理。 (實施樣態11) 以下即以圖式來詳細說明本發明之實施樣態U。 第40圖表示本發明之實施樣態π之動態圖像編碼裝 置1100之構成的方塊圖。動態圖像編碼裝置u〇〇係混合 1〇存在以場構造經編碼之區塊與以框構造經編碼之區塊的情 形下亦可應用直接模式之空間性的預測方法而進行動態圖 像編碼的動態圖像編碼裝置,且具有框記憶體11〇1、差分 運算部1102預測誤差編碼部1103、碼列產生部1104、預 測誤差解碼部1105、加法運算部1106、框記憶體1107、 15 移動向量檢測部1108、模式選擇部1109、編碼控制部 H10、開關1111、開關1112、開關1113、開關1114、開 關1115及移動向量記憶體m6。 框記憶體1101係以圖像單位保持輸入圖像之圖像記憶 體。差分運算部1102求出從框記憶體1101來的輸入圖像 20 與依據移動向量而從解碼圖像求得之參照圖像之差分的預 測誤差並予以輸出。預測誤差編碼部1103對於在差分運算 部11〇2求得之預測誤差施予頻率變換而予以量子化並輸出 。碼列產生部1104將從預測誤差編碼部1103來的編碼結 果予以可變長度編碼後,變換成輸出用編碼位元流之格式 78 1258991 玖—、發明說明—-—----------------------------- ----------------------------------------- , 而附與已記述經編碼之預測誤差之關聯資訊的前頭資訊等 、 附加資訊並產生碼列。預測誤差解碼部1105將從預測誤差 編碼部1103來的編碼結果予以可變長度解碼並進行反量子 ’ 化後,施予IDCT變換等反頻率變換而解碼成預測誤差。 *Among the RidxO, a minimum first reference index Ridx0 can be selected. In the case where a minimum first reference index Rixx0 can be selected among the valid first reference indices Ridx0 in step S3811, the selected motion vector is used in step S3812. When there is no valid first reference index RidxO in step S3811, a process different from S3812 is performed in step S3813. For example, the following processing may be performed in step S3711 described in Fig. 34 (b). Further, the first reference index Ridx which is valid as described above refers to the first reference index Ridx0 which is denoted as "〇" in Fig. 35(b), and is a reference index indicated by the movement amount. Further, the place marked as "X" in Fig. 35(b) indicates that the reference index is not assigned. Further, in step S38M in Fig. 36 (c) and step S3833 in Fig. 36 (d), the processing in step S3701 described in Fig. 34 (a) may be performed. The method of determining the motion vector will be described in detail below using the example of the specific block in Fig. 35. It is determined in step S3801 whether or not a minimum first reference index RidxO can be selected among the valid first reference indices RidxO. In the case shown in Fig. 35, the number of valid first reference indices RidxO is two, and in step S3801, it is determined that one of the valid first reference indices Ridx0 can select one of the smallest first reference indices RidxO. Step S38〇2 uses the selected motion vector. In the case where the smallest first reference index Ridx0 among the valid first reference indices RidxO is a large number in step S3801, the motion vector of the block selected by the priority order is used in step S3803. Here, the reference priority is to determine the motion vector used for the motion compensation of the coding target block in the order of the block having the pixel A, the block having the pixel B, and the block having the pixel C. In the case where the block having the pixel B has the same first reference index Ridx0 as the block having the pixel C, the first reference index Ridx0 in the block having the pixel B is used according to the 5 priority order, and the corresponding reference has The motion vector of the coding target block BL1 is performed by the motion vector of the first reference index Ridx0 in the block of the pixel B. At this time, the coding target block BL1 can be motion-compensated in only two directions using the determined motion vector, and the second reference cable 10 is used to refer to Ridx1 and the other motion vectors are used to perform the two directions as described below. The motion compensation 判断 determines in step S3821 whether a minimum second reference index Rixx1 can be selected among the valid second reference indices Ridx1. In the case shown in Fig. 35, since the effective second reference index RidxO 15 is one, the motion vector corresponding to the second reference index Rixx1 in the block having the pixel C is used in step S3822. Further, in the case where the block having no reference index is used, it is assumed that the motion vector having the magnitude of the motion vector is "〇", and the point of obtaining the total center of the motion vectors is set to have the size of the motion vector. The motion vector of "0" of 20 may be set to obtain the central 値 of the total of three motion vectors, or may be set to obtain the average 値 of the motion vectors of the block having the reference index. Moreover, the priority order of the above description may be set to, for example, a block having a pixel 、, a block having a pixel 、, and a block having a pixel C, and the order is 68 125899 疚 —, WMW — — The motion vector of the motion compensation for the coding object block. In this way, the motion vector used when the coding target block is motion-compensated is determined by using the reference index, whereby the motion-vector can be determined intentionally. Moreover, according to the above example, the coding efficiency can be improved. Further, since it is necessary to determine whether the motion vector is forward reference or backward reference without using the time information, the processing for determining the motion vector can be simplified. Further, considering the prediction mode of each block, the motion vector used for the motion compensation, and the like, although there are many patterns, it can be handled by the above-described series of processes. 10 In the present embodiment, the case where the motion vector used in the direct mode is calculated by using the distance between the image and the image for the reference motion vector is used, and the motion vector to be referred to can also be referred to. Constant multiple calculation. Here, the constant used for the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. 15 Also, the calculation method of the motion vector using the reference index Ridx〇 and Ridxl is not only the calculation method using the central unit but also the other calculation method groups. For example, in the third calculation method described above, in the block including the pixel A, the pixel B, and the pixel C, when the movement of the image having the smallest reference index is referred to and the motion vector is a majority, the calculation is not necessary. The movement of the block and the center of the heavy weight can also calculate the central 値 and the obtained movement and the tomb g are subjected to the motion vector used as the direct mode of the block BL1. Or, for example, select one of the most efficient moving vectors from among the smallest moving vectors whose index is the smallest. In addition, the direction vector of the block BL1 can be independently calculated from the movement direction of the backward direction and the amount of the movement of the block BL1 to 69 1258991. For example, the front direction motion vector and the backward direction motion vector can be calculated from the same motion vector. Further, any one of the forward direction motion vector and the backward motion vector obtained as a result of the calculation can be set as the motion vector of the block BL1. 5 (Embodiment 8) The reference block MB of the reference image of the present embodiment has a front direction (1st) motion vector which is referred to as a reference image stored in the long-term memory and is referred to as a first reference image. And a forward direction (second) motion vector that is referred to as a second reference image in which the reference image stored in the short-term memory is referred to. 10 Figure 37 shows the prediction of two directions in the direct mode in the case where only one reference image is stored in the long-term memory. The difference between the embodiment 8 and most of the embodiments described above is referred to the block MB2 front direction (1st) motion vector MV21 of the image 1 with reference to the reference image stored in the long-term memory. 15 The short-term memory system is used to temporarily store the memory of the reference image. For example, the image is stored in the order in which the image is stored in the memory (i.e., the order of encoding or decoding). When the image is newly stored in the short-term memory, the memory capacity is insufficient. The Japanese temple is deleted from the order of the image stored in the memory. Long-term memory does not necessarily limit the preservation of images in the order of time as in short-term memory. For example, the order in which the images are saved may correspond to the order of the images, or the order in which the addresses of the memory of the images are stored. Therefore, the motion vector M21 referring to the image stored in the long-term memory cannot be scaled according to the time interval. Long-term memory is not used for temporary storage as a short-term memory. 70 1258991 __________________________________________________________________-----------------------........ ...—......—--------------------------------------- ------------------------------------------- 玖, invention instructions photo And the person who continuously saves the reference image. Thus, the time interval corresponding to the motion vector stored in the long-term memory is much larger than the time interval corresponding to the motion vector stored in the short-term memory. In Figure 37, the boundary between long-term memory and short-term memory is shown in Figure 5 as a vertical dotted line. By this, information about the left image is stored in long-term memory, thereby Information is stored in short-term memory. The block MB1 of the image P23 is an object block. Further, the block MB2 is a reference image at the same position as the block MB1 in the reference image P24. Among the motion vectors of the block MB2 of the reference image P24, the first direction (first) movement to the tenth amount MV21 is the first motion vector referred to as the first reference image in the image P21 stored in the long-term memory. The rear direction (second) motion vector MV25 is a second motion vector that is referred to as the second reference image by the image P25 stored in the short-term memory. As before, the time interval TR21 of the image P21 and the image P24 should refer to the motion vector MV21 of the image stored in the long-term memory, and the time interval TR2 of the image P24 and the image P25 should be stored in the short-term memory. The motion vector MV25 of the image of the volume has a time interval TR21 of the image P21 and the image P24 which is much larger or indefinite than the time interval TR2 of the image P24 and the image P25. In this case, the present embodiment does not scale the motion vector of the block MB2 of the reference image P24 to determine the motion vector of the block MB1 of the object image P23, as in the embodiment described so far. The motion vector of the block MB1 of the object image P23 is calculated in the following manner. MV21 = MV21, 71 1258991 § MV24, = 0 The above expression indicates that the first motion vector MV21 stored in the long-term memory is originally regarded as the target image among the motion vectors of the block MB2 of the reference image P24. The first motion vector MV21'. The following equation indicates that the second motion vector MV24' to be stored in the block MB1 of the target image P23 stored in the short-term memory image P24 is much smaller than the first motion vector MV21', so that it is not necessary to pay attention. The second motion vector MV24' is treated as "0". As described above, the reference block MB has one motion vector referred to as the first reference image stored in the reference image of the long-term memory, and the reference image stored in the short-term memory as the second reference image. In the case of referring to one of the motion vectors, among the motion vectors of the block of the reference image, the motion vector stored in the long-term memory is used locally as the motion vector of the block of the target image and two are performed. Direction prediction. Further, if the reference image stored in the long-term memory is any of the first reference image or the second reference image, the motion vector MV21 of the reference image stored in the long-term memory may be referred to as the rear direction. Move the vector. Further, the second reference image is stored in the long-term memory, and when the first reference image is stored in the short-term memory, the scaling is applied to the motion vector of the reference image by referring to the 20 motion vector of the first reference image. . In this way, the processing of the two directions can be performed without using a relatively large or indefinite time of the long-term memory. Further, instead of using the motion vector to be referred to locally, the motion vector can be multiplied by two times. 72 1258991 P: 7 Description of the Invention Further, the constant used for the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. (Implementation 9) This embodiment shows that the reference block MB of the reference image has two directions prediction in the direct mode in the case of referring to the two forward motion vectors of the reference image stored in the long-term memory. . Fig. 38 is a view showing the two-direction prediction in the direct mode in the case where the reference block MB has two reference forward motion vectors stored in the reference image of the long-term memory. The difference between the implementation mode 9 and the implementation mode 8 is that both the motion vector MV21 and the motion vector MV22 of the block MB2 of the reference image refer to the image stored in the long-term memory. In Figure 38, the boundaries between long-term memory and short-term memory are shown as vertical dotted lines, whereby information about the left image is stored in long-term memory, whereby the image on the right The information is stored in short-term memory. The motion vector MV21 and the motion vector MV22 of the block MB2 of the image P24 refer to the image stored in the long-term memory. The motion vector MV21 corresponds to the reference picture P21, and the motion vector MV22 corresponds to the reference picture P22. 2〇 corresponds to the motion vector MV22 stored in the image P22 of the long-term memory, and the time interval TR22 between the image P22 and the image P24 is larger than the time interval TR25 of the image P24 and the image P25 stored in the short-term memory. Many, or uncertain situations. In Fig. 38, the image P22 corresponding to the motion vector MV22 and the image P21 corresponding to the motion shift vector MV21 are sequentially assigned, and the image P21 and the image P22 are stored in the long-term memory. The motion vector of the block MB1 of the object image is calculated as shown in Fig. 38 as follows. MV22, = MV22 5 MV24, = 0 The above expression indicates that among the motion vectors of the block MB2 of the reference image P24, the motion vector MV22 of the image P21 with the smallest reference allocation order is originally regarded as the object image P23. The movement vector MV22 of the block Mbl. The following equation indicates that the direction motion vector MV24' is smaller than the first motion vector MV21' after the block MB1 stored in the object image P23 of the short-term memory, so that it is not necessary to pay attention. The rear movement vector MV24' is treated as "0". As described above, the motion vector of the image having the smallest allocation order among the motion vectors stored in the block 15 of the reference image stored in the long-term memory is originally used locally, and is used as the motion vector of the block of the target image. It is possible to perform processing in two directions without using a relatively large amount of long-term memory or an indefinite time. Alternatively, the motion vector to be referred to may be used locally, and the motion vector may be multiplied by two times to perform prediction in two directions. Further, the constant used for the constant multiple may be changed in the case of encoding or decoding in a plurality of block units or a plurality of image units. Further, in the case where both the motion vector MV21 and the motion vector MV22 of the reference image block MB2 are referred to the image stored in the long-term memory, 74 1258991 发明, the invention says W- can also be selected to refer to the first reference map. Like moving the vector. For example, in the case where the MV 21 refers to the motion vector of the first reference picture and the MV 22 refers to the motion vector of the second reference picture, the motion vector of the block MB1 uses the motion vector MV21 for the picture P21 and the movement for the picture P24. Vector "5 0,, ° (Implementation Mode 10) This embodiment describes a motion vector calculation method in the direct mode described in Embodiment 5 to Embodiment 9. This motion vector calculation method is applied to image coding. It can be applied at the time of decoding. Here, the object block of the encoding or decoding 10 is referred to as an object block. Further, the block at the same position as the object block is referred to as a reference in the reference image of the object block MB. Fig. 39 shows the flow of processing of the motion vector calculation method of the present embodiment. First, it is judged whether or not the reference 15 block MB in the reference image following the target block MB has a motion vector (step S1). When the reference block MB does not have a motion vector (step S1; No), the motion vector is set to "0" to perform two-direction prediction (step S2) and the process of calculating the motion vector is ended. The reference block MB has a motion vector (Step SI; Yes), it is determined whether or not the reference block MB has a forward direction motion vector (step S3). 20 The reference block MB does not have a forward direction motion vector (step S3; No), since the reference block MB has only the rear direction The vector is moved, so the number of movement vectors in the subsequent direction is determined (step S14). In the case where the number of direction movement vectors after the reference block MB is "2", according to Fig. 19, Fig. 20, Fig. 21, and 22 In any of the calculation methods described in the figure, two direction predictions are performed using the two rear direction motion vectors which are scaled to 1,258,991, and the invention description (step S15). On the other hand, the number of vectors in the direction after the reference block MB is moved. In the case of "1", the unique back-direction direction motion vector of the reference block MB is scaled and the motion compensation is performed using the post-scaling direction motion vector (5 step S16). Once the step S15 or S16 is ended When the direction prediction is performed, the processing of the calculation method of the motion vector is ended. When the reference block MB has the forward motion vector (step S3; Yes), the number of motion vectors before the reference block MB is determined (step S4). Before the block MB is the number of vectors in the direction of movement of the "case Γ 10, it is determined with reference to the corresponding block before the party mobile mb whether the reference picture stored in the vector memory long-term or short-term memory (Step S5). In the case where the reference image corresponding to the previous motion vector of the reference block MB is stored in the short-term memory, the motion vector before the reference block MB is scaled and the direction is moved in the direction before the calibration is performed. Test (step S6). In the case where the reference image corresponding to the previous square motion vector of the reference block MB is stored in the long-term memory, according to the motion vector calculation method shown in FIG. 37, the motion vector before the reference block MB is not scaled and is originally localized. The two directions are predicted using the motion vector zero set in the backward direction (step 20 S7). When the prediction in the two directions of step S6 or step S7 is ended, the processing of the calculation method of the motion vector is ended. When the number of direction movement vectors after the reference block MB is "2", it is determined that the number of direction movement vectors before the reference image stored in the long-term memory in the forward direction movement vector of the reference block MB is determined (step S8). 76 1258991 玖 、 、 对应 对应 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 The belonging object image is scaled by the motion vector close to the chronological order and the two directions are predicted using the scaled movement to 毚5 (step S9). Corresponding to the reference image stored in the long-term memory, the direction moves to the number of turns in step S8, and the motion vector stored in the short-term memory is scaled and the scaled motion vector is used. The direction prediction is performed (step S10). 10 In the case where the direction is shifted to "2" in step S8 before the reference image stored in the long-term memory, the two directions are moved to the two sides to determine whether or not Referring to the same image in the long-term memory (step SU). In the case of referring to the same ceramic image in the long-term memory by moving the vector in the two front directions (step S11; Yes), the mobile vector stomach ten according to the first FIG. The Respect 15 method uses two motion vectors that are encoded or decoded in the image in the forward direction of the reference long-term memory to perform two directions (step S12). When both sides of the motion vector are referred to the same image in the long-term memory (step S11; No), according to the 20-movement vector calculation method described in FIG. 38, the corresponding storage in the long-term memory allocation is used. The two-direction prediction is performed by shifting the vector in the direction of the small image (step S13). The long-term memory stores the reference image regardless of the time of the actual image, so that the order of each reference image is allocated. The selection should be used to predict the direction of the moving direction in the two directions. Also, the order of the reference images stored in the long-term memory 77 1258991 玖, # may also coincide with the time of the image, but may be only with the memory. The order of the addresses is the same. That is, the order of the images stored in the long-term memory may not necessarily coincide with the time of the image. When the two directions of steps S12 and S13 are ended, the motion vector is ended. (Processing Method 11) Hereinafter, the embodiment U of the present invention will be described in detail with reference to the drawings. Fig. 40 is a block diagram showing the configuration of the moving image encoding device 1100 of the embodiment of the present invention. The moving picture coding apparatus may perform a spatial prediction method in which a direct mode is applied in the case where a coded block is constructed by a field and a coded block is constructed by a frame. A moving picture coding apparatus that performs motion picture coding includes a frame memory 11〇1, a difference calculation unit 1102, a prediction error coding unit 1103, a code sequence generation unit 1104, a prediction error decoding unit 1105, an addition unit 1106, and a frame memory. The body 1107, the motion vector detecting unit 1108, the mode selecting unit 1109, the encoding control unit H10, the switch 1111, the switch 1112, the switch 1113, the switch 1114, the switch 1115, and the motion vector memory m6. The frame memory 1101 is in image units. The image memory of the input image is held, and the difference calculation unit 1102 obtains and outputs a prediction error of the difference between the input image 20 from the frame memory 1101 and the reference image obtained from the decoded image based on the motion vector. . The prediction error coding unit 1103 quantizes and outputs the prediction error obtained by the difference calculation unit 11〇2, and outputs it. The code sequence generating unit 1104 performs variable length encoding on the encoding result from the prediction error encoding unit 1103, and converts it into a format of the output encoded bit stream. 78 1258991 、—, invention description—-------- ---------------------- ---------------------------- -------------, with the addition of information such as the front information, etc., which have been associated with the encoded prediction error, and the generation of the code sequence. The prediction error decoding unit 1105 performs variable length decoding on the coding result from the prediction error coding unit 1103, performs inverse quantization, and performs inverse frequency transformation such as IDCT conversion to decode the prediction error. *
5 加法運算部1106將前述參照圖像加算於解碼結果的預測誤 差而以經編碼及解碼之圖像資料輸出表示輸入圖像與相同 一幀之圖像的參照圖像。框記憶體1107係以圖像單位保持 參照圖像之圖像記憶體。 H 移動向量檢測部1108對每個編碼對象框之編碼單位檢 1〇 測移動向量。模式選擇部1109選擇以直接模式計算移動向 - 量或以其他模式來計算。編碼控制部1110以編碼順序改換 以輸入框記憶體1101之時間順序儲存之輸入圖像的圖像。 且編碼控制部1110對於每個編碼對象框之預定大小的單位 判定是以場構造進行編碼或是以框構造進行編碼。在此說 15 明預定大小之單位係設成將巨集區塊(例如水平16像素、 垂直16像素)在縱方向連結二個者(以下稱巨集區塊對)。若 ® 是以場構造編碼的話,則從框記憶體1101對應於交錯而每 隔1水平掃描線讀出像素値,若是以框構造編碼的話,則 ^ 從框記憶體1101順序地讀出輸入圖像的各圖像値,經讀出 ~ 20 之各像素値以構成對應場構造或框構造之編碼對象巨集區 胃 塊對而配置於記憶體上。移動向量記憶體1116保持編碼完 巨集區塊之移動向量與該移動向量要參照之框的參照索引 。有關參照索引乃保持編碼完之巨集區塊對中之各個巨集 區塊。 79 1258991 玖、發明說明————— --------------------------------------------------------- 其次說明上述構成之動態圖像編碼裝置n〇〇的動作。 · 輸入圖像於時間順序以圖像單位輸入框記憶體1101。第41 · 圖⑷表不於時間順序以圖像單位輸入動態圖像編碼裝置 , 1100的順序。第41圖(b)係表示將第w圖(&)所示之框的 · 5排列依編碼順序替換排列情形的順序。於第W圖0)之縱 - 線表不圖像,各圖像之右下方所示之記號之第i字的字母 _ 表示圖像型態(I、p或B),第2字以後的數字表示時間順 序的圖像號碼。又,第42圖表示用以說明實施樣態U之 · 参照框列表300的構造。經輸入框記憶體11〇1之各圖像依 1〇編碼控制部1110而替換排列成編碼順序。替換排列成編碼 順序係依據圖像間預測編碼的參照關係而進行,替換排列 以使作爲參照圖像被使用之圖像比作爲參照圖像使用的圖 像先編碼。 例如’ P圖像係以顯示時間順序在前方近旁之I或P 15圖像二幀之中一幀作爲參照圖像而使用。又,B圖像係以 顯示時間順序在前方近旁之〗或p圖像三幀之中一幀與以 鲁 顯不時間順序在後方近旁之〗或p圖像之中一幀作爲參照 圖像而使用。具體而言,在第41圖(&)輸入圖像B5及圖像 _ B6之後方的圖像P因圖像B5及圖像B6而參照,故替換 · 2〇排列於圖像B5及圖像B6之前。同樣地,輸入圖像B8及 圖像B9之後方的圖像P10替換排列於圖像B8及圖像B9 · 之則’輸入圖像B11及圖像B12之後方的圖像P13替換排 — 列於圖像B11及圖像Bl2之前。藉此,替換排列第41圖 (a)之圖像的結果如第q圖⑺)所示。 80 1258991 疚— 一 以框記憶體1101進行替換排列之各圖像乃設成以將巨 集區塊向垂直方向連結之巨集區塊對的單位讀出,各巨集 區塊設成水平16像素X垂直16像素大小。因此,巨集區 塊對構成水平16像素X垂直32像素大小。以下說明圖像 5 B11之編碼處理,即,參照框列表的管理係於編碼控制部 1110進行。 圖像B11爲B圖像,因此進行使用二個方向參照之圖 像間預測編碼。圖像B11係將以顯示時間順序在前方之圖 像P10、P7、P4與以顯示時間順序在後方之圖像P13之中 10 的二個圖像作爲參照圖像而使用。且設成能以巨集區塊單 位指定此等四個圖像之中要選擇其中任何二個圖像。又, 在此說明參照索引乃以初期狀態方法來分配。即,圖像 B11之編碼時之參照框列表300如第42圖所示。此情形之 參照圖像係第1參照圖像藉第42圖之第1參照索引而指定 15 ,第2參照圖像藉第42圖之第2參照索引而指定。 於圖像B11之處理上,編碼控制部1110係將開關 1113設成開啓(ON)、開關1114與開關1115設成關閉 (OFF)那般地控制各開關。爰此,從框記憶體1101讀出之 圖像B11之巨集區塊對被輸入移動向量檢測部1108、模式 20 選擇部1109及差分運算部1102。在移動向量檢測部1108 藉著將儲存於框記憶體1107之圖像10、圖像P7、圖像P4 及圖像P13之解碼圖像資料作爲參照圖像使用,而進行檢 測包含在巨集區塊對之各巨集區塊之第1移動向量與第2 移動向量。在模式選擇部1109使用在移動向量檢測部 1258991 玫、發明說明— — 1108檢測之移動向量而決定巨集區塊對的編碼模式。在此 說明B圖像之編碼模式例如可設成由從圖像內編碼、使用 一個方向移動向量之圖像間預測編碼、使用二個方向移動 向量之圖像間預測編碼及直接模式中選擇者。又,選擇直 5 接模式以外之編碼模式的情形下,乃一倂決定是否以框構 造將巨集區塊對予以編碼,或是以場構造進行編碼。 於此說明使用直接模式之空間性的預測方法而計算移 動向量的方法。第43圖(a)係表示使用混合存在以場構造 編碼之巨集區塊配對與以框構造編碼之巨集區塊之情形的 10 直接模式空間上之預測方法之移動向量計算順序之一例的 流程圖。第43圖(b)係表示編碼對象巨集區塊配對以框構 造編碼之情形下,本發明所應用之周邊巨集區塊配對之配 置的一例。第43圖(c)係表示編碼對象巨集區塊配對以場 構造編碼之情形下,本發明所應用之周邊巨集區塊配對之 15 配置的一例。於第43圖(b)及第43圖(c)中以斜線表示之巨 集區塊對爲編碼對象巨集區塊對。 編碼對象巨集區塊對使用直接模式之空間性的預測而 編碼的情形下,可選擇該編碼對象巨集區塊對之周邊三個 編碼完巨集區塊對。此情形下,編碼對象巨集區塊對能以 20 場構造或框構造之其中任何之一編碼。因此編碼控制部 1110首先決定是否以場構造或是以框構造來進行編碼對象 巨集區塊對。例如在周邊巨集區塊對之中以場構造編碼者 多的情形下,以場構造將編碼對象巨集區塊對予以編碼, 而在以框構造編碼者多的情形下,以框構造進行編碼。如 82 !25899i 此一來,藉著使用周邊區塊之資訊而決定是否以框構造將 編碼對象巨集區塊對予以編碼,或是以場構造編碼,而變 得無必要將表示以何種構造將編碼對象巨集區塊對予以編 碼之資訊記述於碼列,且係從具圍的巨集區塊對預測構造 5 ’故能選擇適當的構造。 其次,移動向量檢測部1108依據編碼控制部1110的 決定而計算編碼對象巨集區塊對之移動向量。首先,移動 向量檢測部1108檢測是否已決定以場構造進行編碼(S301) ,或是已決定以框構造編碼,若是決定以框構造編碼的情 10 形下,則以框構造檢測編碼對象巨集區塊對之移動向量 (S302),若是決定以場構造編碼的惰情形下,以場構造檢 測編碼對象巨集區塊對之移動向量(S303)。 第44圖係表示以框構造編碼情形下之巨集區塊配對的 資料構成與以場構造編碼情形下之巨集區塊的資料構成。 15 於該圖中,白圓圈表示奇數水平掃描線上的像素,以斜線 插繪之黑圓圈表示偶數水平掃描線上的像素。從表示輸入 圖像之各框切出巨集區塊對的情形下,如第44圖中央所示 奇數水平掃描線上的像素與偶數水平掃描線上的像素於垂 直方向交互配置。以框構造將如此的巨集區塊對予以編碼 20 的情形下,該巨集區塊對於每二個巨集區塊MB1及巨集區 塊MB2被處理,而分別對於構成巨集區塊對之二個巨集區 塊MB1與巨集區塊MB2求得移動向量。又,以場構造編 碼的情形下,該巨集區塊對區分爲表示在水平掃描線方向 交錯時之頂場的巨集區塊TF與表示底場之巨集區塊BF, 83 1258991 疚、發明說明 其移動向量係分別在構成巨集區塊對之二個場垣域求得一 個。 以如此的巨集區塊對爲前提而如第43圖(b)所示,說 明以框構造將編碼對象巨集區塊予以編碼的情形。第45圖 5 表示第43圖所示之步驟S302之更詳細的處理順序。又, 於該圖中以MBP表示巨集區塊對,以MB表示巨集區塊。 模式選擇部1109首先使對於構成編碼對象巨集區塊對 之一個巨集區塊MB1(上部的巨集區塊)使用直接模式之空 間性的預測而計算一個移動向量。首先,模式選擇部1109 10 分別對第1移動向量與第2移動向量之索引求得參照周邊 巨集區塊對之圖像之索引之中的最小値(S501)。但是此情 形下,周邊巨集區塊對以框構造編碼時,僅使用鄰接編碼 對象巨集區塊之巨集區塊而決定。其次檢測周邊巨集區塊 對是否以場構造而編碼(SS02),於以場構造編碼的情形下 15 則進一步從第42圖之參照框列表檢測在以構成該周邊巨集 區塊對之二個巨集區塊而參照之場之中,有多少個場爲附 加最小索引之場(S503)。 於步驟S503檢測結果依二個巨集區塊參照之場均爲附 加最小之索引(即相同索引)的場時,求得二個巨集區塊之 2〇 移動向量的平均値而設成該周邊巨集區塊對之移動向量 (S5〇4)。此乃因以交錯構造考量的情形下,在框構造之編 碼對象巨集區塊鄰接場構造之周邊巨集區塊對之二個巨集 區塊之故。 於步驟S503檢測的結果係僅藉一個巨集區塊而參照之 84 1258991 玖、發---------------------------------------------------------------------------------------------------- 場附加最小索引的情形下,將該一個巨集區塊之移動向量 設爲該周邊巨集區塊對之移動向量(S504A)。若是所參照之 場均係未附加最小索引之場的情形下,則將該周邊巨集區 塊對之移動向量設爲「〇」(S505)。 5 於上述周邊巨集區塊之移動向量中,藉著所參照之場 僅使用附加最小索引之場的移動向量而能選擇編碼效率更 高的移動向量。S505之處理表示判斷無應用於預測之移動 向量的情形。 於步驟S502檢測的結果係該周邊巨集區塊對以框構造 1〇編碼的情形,在該周邊巨集區塊對之中,將鄰接編碼對象 巨集區塊之巨集區塊之移動向量設爲該周邊巨集區塊對的 移動向量(S506)。 模式選擇部1109對於經選擇之二個周邊巨集區塊對重 複從上述步驟S501至步驟S506的處理。其結果對於編碼 15 對象巨集區塊對內之一個巨集區塊,例如三個周邊巨集區 塊對之移動向量分別對於巨集區塊MB1求得一個。 其次,模式選擇部1109檢測在三個周邊巨集區塊之中 參照索引最小之框或其框內之場是否爲一個(S507) 此情形下,模式選擇部1109將三個周邊巨集區塊對之 2〇 參照索引統一爲參照框索引或參照場索引並予以比較。於 第42圖所示之參照框列表,在每個框僅附加參照索引而已 ,然而此參照框索引與在每個框僅附加索引之參照框索引 具有一定的關係,因此可藉著從參照框列表或參照場列表 之一方予以計算而能變換成另一方的參照索引。 85 1258991 玖、_爾萌 第46圖表示參照場索引與參照框索引之關係的關係顯 不圖。 如此第46圖所示,於參照場列表以第1場Π及第2 場f2所示之框沿著時系列而存在多少,於各框以包含編碼 5 對象區塊之框(在第46圖中所示之框)爲基準而分配成0、1 、2、· · ·之參照框索引。又,於各框之第1場fl及第 2場f2以包含編碼對象區塊之框的第1場fl爲基準(第1 場爲編碼對象場的情形),分配成〇、1、2、· · ·之參照 場索引。又,此參照場索引從接近編碼對象場1之框的第 10 1場fl及第2場f2,若是編碼對象區塊爲第1場fl的話, 使第1場fl優先分配,若是編碼對象區塊爲第1場fl的 話,使第1場Π優先分配。 例如以框構造編碼之周邊巨集區塊參照其參照框索引 「1」之框,而以場構造編碼之周邊巨集區塊參照其參照框 15 索引「2」之第1場fl時,上述周邊巨集區塊均參照相同 圖像來處理。即,以一個周邊巨集區塊而參照之框的參照 框索引滿足待於被分配爲另一周邊巨集區塊之參照場之參 照場索引之二分之一(小數點以下捨去)的前提要件時,其 周邊巨集區塊參照相同的圖像來處理。 20 例如包含於第46圖中以△表示之第1場fl之編碼對 象區塊參照其參照場索引「2」之第1場fl,而框構造之 周邊巨集區塊參照其參照框索引「1」之框時,爲了滿足上 述條件,上述周邊巨集區塊參照相同的圖像來處理。另一 方面,某周邊巨集區塊參照其參照框索引「2」之第1場 86 1258991 fl,另一周邊巨集區塊參照其參照框索引「3」之框時,爲 了滿足上述條件,該周邊巨集區塊參照相同的圖像來處理 〇 如上所述,於步驟S5〇7檢測之結果,若爲一個的話, 5則將參照索引最小之框或其框內的場之周邊巨集區塊的移 動向量設成編碼對象區塊之移動向量(S508)。若是在步驟 S507檢測之結果非一個的話,進而檢測在三個周邊巨集區 塊對之中,參照索引最小之框或其框內的場之周邊巨集區 塊對是否爲二個以上(S509),若爲二個以上的話,在其中 1〇 更具有未參照索引最小之框或其框內的場之周邊巨集區塊 的話,則將其移動向量設爲「0」以上(S510),而將周邊巨 集區塊對之三個移動向量之中央値設爲編碼對象區塊的移 動向量(S511)。又,在步驟S509檢測之結果未滿二個的話 ,參照索引最小之框或其框內的場之周邊巨集區塊對的數 15 量爲「0」的話,將編碼對象區塊之移動向量設爲「0」 (S512)。 以上處理的結果,構成編碼對象巨集區塊對之一個巨 集區塊,例如獲得一個移動向量MV對於MB1作爲計算結 果。模式選擇部1109亦對具有第2參照索引之移動向量進 20 行上述處理並使用所獲得之二個移動向量而藉二個方向預 測以進行移動補償。但是在周邊巨集區塊之中,不存在第 1或第2移動向量之周邊巨集區塊的情形下,不使用該方 向的移動向量而僅藉一個方向的移動向量進行移動補償。 又,對於編碼對象巨集區塊對內的另一個巨集區塊,例如 87 1258991 玖 ------------------------------------------------------------------------- 對巨集區塊MB2亦反覆進行相同處理。其結果對於一個編 碼對象巨集區塊對之二個各巨集區塊進行以直接模式所構 成的移動補償。 其次如第43圖(c)所示,說明以場構造將編碼對象巨 5 集區塊對予以編碼。第47圖表示第43圖所示之步驟S303 之更詳細之處理順序的流程圖。模式選擇部1109對於構成 編碼對象巨集區塊對之一個巨集區塊,例如對於對應該編 碼對象巨集區塊對之頂場之巨集區塊TF,使用直接模式之 空間性的預測而計算一個移動向量MVt。首先,模式選擇 10 部1109求出編碼對象巨集區塊對所參照之圖像的索引之中 最小(S601)。但是以場構造處理周邊巨集區塊對的情形下 ,僅考量與編碼對象巨集區塊相同場(頂場或底場)之巨集 區塊。其次檢測是否以框構造將編碼對象巨集區塊對予以 編碼(S6〇2),若是以框構造編碼的情形,則進一步依據以 15參照框列表300所授與各框之索引値,而判斷依該周邊巨 集區塊對內之二個巨集區塊所參照之框是否均附予最小索 引之框(S603)。 於步驟S603檢測之結果,以二個巨集區塊所參照之框 均爲最小的索引時,求得二個巨集區塊之移動向量的平均 20値而設成該編碼對象巨集區塊對的移動向量(S604)。於步 驟S603檢測之結果若是一方或雙方均爲係已參照的框不具 有最小索引之框的情形,則進一步檢測依任何的巨集區塊 而參照之框是否不具有最小索引(S605),檢測之結果爲任 何一方的巨集區塊所參照1之框附予著最小索引的情形下 88 1258991 κι^Wmm ’則將該巨集區塊之移動向量作爲該周邊巨集區塊對的移 動向量(S606),在步驟S605檢測之結果,任何巨集區塊亦 — 於所參照之框附予最小索引的情形下,將該周邊巨集區塊 · 對之移動向量設爲「0」(S607)。於上述周邊巨集區塊之移 5動向量之中,要參照之框僅使用附予最小索引之框的移動 、 向量,藉此能選擇更高編碼效率的移動向量。S607之處理 ” 表示判斷無應用於預測之移動向量的情形。 又,於步驟S602檢測之結果,該周邊巨集區塊對係以 φ 場構造編碼的情形下,則於該周邊巨集區塊對將該周邊巨 10集區塊對整體的移動向量作爲對應編碼對象巨集區塊對內 之對象巨集區塊之巨集區塊的移動向量(S608)。模式選擇 邰1109對於經選擇之三個周邊巨集區塊對重複從步驟 S601至步驟S608的處理。其結果,三個周邊巨集區塊對 之移動向量分別對於編碼對象巨集區塊對內之一個巨集區 15塊’例如分別對於巨集區塊TF各求得一個。接著,移動 向量檢測部ιι〇8檢測在三個周邊巨集區塊對之中,參照索 引爲最小之框的巨集區塊對是否爲一個(S609),若爲一個 ’則將參照索引爲最小之框的周邊g集區塊對的移動向量 · 設爲編碼對象巨集區塊對之移動向裊(S610)。在步驟S609 4 20檢測之結果非一個的話,進一步在3個周邊巨集區塊對之 中參照索引爲最小之框的周邊巨集區塊對是否爲二個以上 (5611) ,若爲二個以上的話,則在其中進一步將未參照索 引爲最小之框的周邊巨集區塊對的移動向量設爲「〇」 (5612) ,並將周邊巨集區塊對之三個移動向量的中央値作 89 1258991 玖、發明說明 爲編碼對象巨集區塊的移動向量(S613)。又’在步驟S611 檢測之結果爲未滿二個的話,由於參照索引爲最小之框的 周邊巨集區塊對之數爲「0」,因此將編碼對象巨集區塊之 移動向量設爲「〇」(S614)。 5 以上處理的結果,構成編碼對象巨集區塊對之一個巨 集區塊例如對於對應頂場之巨集區塊TF獲得一個移動向 量MVt作爲計算結果。模式選擇部1109對於第2移動向 量(第2參照索引)亦重複上述處理。如此一來’對巨集區 塊TF獲得二個移動向量而使用此等移動向量進行以二個 10方向所構成的移動補償。但是在周邊巨集區塊對之中,不 存在具有第1或第2移動向量之周邊巨集區塊的情形下, 不使用該方向的移動向量而僅藉一個方向的移動向量進行 移動補償。此乃由於周邊巨集區塊對僅參照一個方向的情 形對於編碼對象巨集區塊亦僅參照一個方向的情形,可得 15 知可提高編碼效率之故。 又,編碼對象巨集區塊對內之另一個巨集區塊,例如 對於對應底場之巨集區塊BF重複同樣處理。其結果對於 一個編碼對象巨集區塊對中的二個各巨集區塊,例如對於 巨集區塊TF與巨集區塊BF進行直接模式所構成的處理。 20 又,編碼對象巨集區塊對之編碼構造與周邊巨集區塊 對之編碼構造不同的情形下,進行求出周邊巨集區塊對內 之二個巨集區塊之移動向量之平均値的處理而加以計算, 然而本發明並不限於此,例如編碼對象巨集區塊對與周邊 巨集區塊對僅在編碼構造相同的情形下,可使用其周邊巨 90 1258991 玖、發明說明 集區塊對的移動向量,而編碼對象巨集區塊對與周邊巨集 區塊對構造不同的情形下,可不使用編碼構造不同之周邊 巨集區塊對的移動向量。更具體而言,首先,①編碼對象 巨集區塊對以框構造編碼的情形下,僅使用以框構造編碼 5 之周邊巨集區塊對的移動向量。此時在以框構造編碼之周 邊巨集區塊對之移動向量之中,無參照索引爲最小之移動 向量的情形下,將編碼對象巨集區塊對之移動向量設爲「0 」。又,周邊巨集區塊對以場構造編碼的情形下,將其周邊 巨集區塊對之移動向量設爲「0」。其次②編碼對象巨集區 10 塊對以場構造編碼的情形下,僅使用以場構造編碼之周邊 巨集區塊對的移動向量。此時在以場構造編碼之周邊巨集 區塊對之移動向量之中,無參照索引爲最小之移動向量的 情形下,將編碼對象巨集區塊對之移動向量設爲「0」。又 ,周邊巨集區塊對以框構造編碼的情形下,將其周邊巨集 15區塊對之移動向量設爲「〇」。如此進行而計算各周邊巨集 區塊對之後,③在此等移動向量之中,參照具有最小索引 之框或其場而獲得之移動向量僅一個的情形下,將其移動 向量設爲直接模式中的編碼對象巨集區塊對的移動向量, 若非如此的情形下,將三個移動向量之中央値設成直接模 20 式中的編碼對象巨集區塊對的移動向量。 又,上述說明係以編碼完之周邊巨集區塊對之編碼構 造的多數決而決定是否以場構造將編碼對象巨集區塊對予 以編碼,或是以框構造將編碼對象巨集區塊對予以編碼, 惟本發明並不僅限於此,例如亦可在直接模式一定以框構 91 1258991 1、發萌騎萌 μ來編碼’或是一定以場構造來編碼那般先固定性的決定 起來。此情形下,例如於每個成爲編碼對象切換以框構造 來編碼,或是以場構造來編碼的情形下,記述於碼列整體 - 之則頭或每個框的框前頭。切換的單位例如可爲順序、 · 5 G〇P、圖像、區段等,此情形下,分別先記述於碼列中所 ’ 對應之前頭即可。如此情形下當然僅在以編碼對象巨集區 - 鬼對/、问邊巨集區塊對編碼構造相同時,以使用其周邊巨 集區塊對之移動向量的方法而能計算直接模式中之編碼對 馨 象巨集區塊對的移動向量。而且,以封包等傳送時可將前 1〇頭部與資料部予以分離而個別傳送。此情形並非前頭部與 資料部構成一個位元流。然而於封包的情形下,傳送的順 序多少有前後的情形亦僅是對應於要對應之資料部的前頭 部以其他的封包傳送而已,即使非構成一個位元流亦相同 。如此一來,藉固定性地決定使用框構造或是使用場構造 15的情形,以減少使用周邊區塊資訊而決定構造的處理而能 達到處理的簡略化。 · 又,於直接模式中,亦可以框構造與場構造之兩者來 處理編碼對象巨集區塊對而使用選擇高編碼效率之構造的 ’ 方法。如此一來,僅在編碼對象巨集區塊對與周邊巨集區 . 2〇 塊對相同編碼構造的情形下,以使用其周邊巨集區塊對之 移動向量的方法而當然能計算直接模式中的編碼對象巨集 ^ 區塊對的移動向量。藉使用此方法,雖然表示已選擇框構 _ 造與場構造之其中之一的資訊有必要於碼列中,惟能更削 減移動補償的殘差信號而能達到提高編碼效率。 92 1258991 玖、翻麵 又,於上述說明中說明了周邊巨集區塊對以巨集區塊 之大小爲單位而移動補償的情形,惟此亦可以不同大小爲 單位移動補償。此情形下,如第48圖(a)、(b)所示,對於 編碼對象巨集區塊對之各個巨集區塊,將包含位於a、b、 5 c位置之像素之區塊的移動向量設爲周邊巨集區塊對的移 動向量。在此說明第48圖(a)表示處理下部之巨集區塊的 情形。編碼對象巨集區塊對與周邊巨集區塊對之框/場構 造不同的情形下,使用包含如第49圖(a)、(b)所示之a、b 、c位置之像素之區塊與位置a’、b’、c’之像素的區塊而進 10 行處理。位置a’、b’、c’係包含於對應像素位置a、b、c 之位置的相同巨集區塊內之另一方的巨集區塊的區塊。例 如第49圖(a),編碼對象巨集區塊對與周邊巨集區塊對之 框/場構造不同的情形下,上部編碼對象巨集區塊之左側 之區塊的移動向量乃使用BL1與BL2之移動向量而決定。 15 又,例如第49圖(b),編碼對象巨集區塊對與周邊巨集區 塊對之框/場構造不同的情形下,上部編碼對象巨集區塊 之左側之區塊的移動向量乃使用BL3與BL4之移動向量而 決定。以如此的處理方法,於以周邊巨集區塊對與巨集區 塊之大小不同的單位進行移動補償的情形亦能進行考量到 20 框·場之差之直接模式的處理。又,周邊巨集區塊對以與 巨集區塊之大小不同的尺寸爲單位進行移動補償的情形下 ,亦可以求得包含於巨集區塊之區塊的移動向量的平均値 而作爲該巨集區塊之移動向量。於以周邊巨集區塊對與巨 集區塊之大小不同的單位進行移動補償的情形亦能進行考 93 1258991 wmrnm 量到框·場之差之直接模式的處理。 如上所述,檢測移動向量並依據經檢測之移動向量而 進行圖像間預測編碼的結果,依藉移動向量檢測部1108所 檢測之移動向量、經編碼之預測誤差圖像於每各巨集區塊 5被儲存於碼列中。但是對於以直接模式編碼之巨集區塊的 移動向量乃僅記述以直接模式編碼的情形,而移動向量及 參照索引不記述於碼列。第50圖表不以碼列產生部11〇4 產生的碼列7〇0的資料構成的一例。如該圖所示,於以碼 列產生部11〇4產生的碼列700,在每個圖像Picture設置 10 有前頭Header。於此前頭Header設置有表示參照框列表 10之變更的項目RPSL及表示該圖像之圖像型態之未以圖 示顯示的項目,項目RPSL從初期設定變更於參照框列表 10之第1參照索引12及第2參照索引13之値的分配方式 的情形下,會記述變更後的分配方式。 15 另一方面,經編碼之預測誤差會記錄於每個巨集區塊 。例如某巨集區塊使用直接模式之空間性的預測而編碼的 情形下,於記述對應該巨集區塊之預測誤差之項目Blockl 不記述該巨集區塊之移動向量,而記述於表示該巨集區塊 之編碼模式的項目PredType編碼模式爲直接模式的資訊。 20 又,從前述之編碼效率觀點選擇該巨集區塊是否以框構造 或場構造之其中之一編碼的情形下,記述表示是否選擇了 以框構造或場構造之其中之一的資訊。接著’經編碼之預 測誤差被記述於項目CodedRes。又,其他巨集區塊係以圖 像間預測編碼模式編碼的巨集區塊時,於表示記述對應該 1258991 【、發萌酬 巨集區塊之預測誤差的項目Bl〇ck2之中的編碼模式的項目 PredType記述該巨集區塊之編碼模式記述爲圖像間預測編 碼模式。此情形下,在編碼模式之外,該巨集區塊之第1 參照索引12寫入項目RidxO,第2參照索引13寫入項目 5 Ridxl。區塊中的參照索引以可變長度碼字顯現而値愈小的 分配愈短之碼長度的碼。又,接著該巨集區塊之前方框參 照時之移動向量記述項目MV0,後方框參照時之移動向量 記述項目MV1。接著,經編碼之預測誤差記述爲項目The addition unit 1106 adds the reference image to the prediction error of the decoding result, and outputs a reference image indicating the input image and the image of the same frame as the encoded and decoded image data. The frame memory 1107 holds the image memory of the reference image in image units. The H motion vector detecting unit 1108 detects the motion vector for the coding unit of each coding target frame. The mode selection portion 1109 selects to calculate the movement direction amount in the direct mode or in other modes. The encoding control unit 1110 changes the image of the input image stored in the chronological order of the input frame memory 1101 in the encoding order. Further, the encoding control unit 1110 determines whether the unit of the predetermined size of each encoding target frame is encoded by the field structure or by the frame structure. Here, the unit of the predetermined size is set such that a macro block (for example, horizontal 16 pixels and vertical 16 pixels) is connected in the longitudinal direction (hereinafter referred to as a macro block pair). If the code is coded in the field structure, the frame memory 1101 reads the pixel 每隔 every other horizontal scanning line corresponding to the interlace, and if it is encoded by the frame structure, the input image is sequentially read from the frame memory 1101. Each of the image images of the image is placed on the memory by reading the pixel pairs of the coding target macro region corresponding to the field structure or the frame structure. The motion vector memory 1116 maintains a reference index of the motion vector of the macroblock and the frame to which the motion vector is to be referenced. The reference index is to keep the macroblocks in the encoded macroblock pair. 79 1258991 玖, invention description ————— --------------------------------------- ------------------ Next, the operation of the moving picture coding apparatus n〇〇 configured as described above will be described. • The input image is input to the frame memory 1101 in chronological order in image units. Fig. 41 (4) shows the order in which the moving image encoding device 1100 is input in chronological order in image units. Fig. 41(b) shows the order in which the arrangement of the 5th arrangement of the frame shown by the wth picture (&) is replaced by the coding order. In the vertical line of Fig. 0), there is no image, and the letter _ of the i-th word of the symbol shown at the lower right of each image indicates the image type (I, p or B), after the second word The numbers represent chronological image numbers. Further, Fig. 42 shows a configuration for explaining the reference frame list 300 of the embodiment U. The respective images of the input frame memory 11〇1 are alternately arranged in the encoding order in accordance with the encoding control unit 1110. The replacement order is performed in accordance with the reference relationship of inter-picture predictive coding, and the arrangement is replaced so that the picture used as the reference picture is encoded earlier than the picture used as the reference picture. For example, the 'P image is used as a reference image in one frame of the I or P 15 image two frames in the vicinity of the front in the display time order. In addition, the B image is displayed in chronological order in the vicinity of the front or one of the three frames of the p image and one frame in the vicinity of the rear or the p image in the chronological order. use. Specifically, the image P after the input image B5 and the image_B6 in FIG. 41 is referred to by the image B5 and the image B6, so that the image is replaced by the image B5 and the image. Like before B6. Similarly, the image P10 after the input image B8 and the image B9 is replaced by the image P8 and the image B9, and the image P13 after the input image B11 and the image B12 is replaced by the row. Before image B11 and image Bl2. Thereby, the result of replacing the image of Fig. 41 (a) is shown in Fig. 7 (7). 80 1258991 疚 - Each image that is alternately arranged by the frame memory 1101 is set to read out the unit of the macro block pair connecting the macro blocks in the vertical direction, and each macro block is set to the level 16 Pixel X is vertical 16 pixels in size. Therefore, the macro block pair constitutes a horizontal 16 pixel X vertical 32 pixel size. The encoding processing of the image 5 B11 will be described below, that is, the management of the reference frame list is performed by the encoding control unit 1110. Since the image B11 is a B image, inter-picture predictive coding using two directions is performed. The image B11 is used as a reference image in which two images of the images P10, P7, and P4 on the front side and the image P13 on the rear side in the display time order are displayed in the display time order. And it is set to specify any two of the four images among the four images in the macro block unit. Here, it is explained that the reference index is allocated in the initial state method. That is, the reference frame list 300 at the time of encoding of the image B11 is as shown in Fig. 42. In this case, the reference image is designated by the first reference index of Fig. 42 and the second reference image is designated by the second reference index of Fig. 42. In the processing of the image B11, the encoding control unit 1110 controls the switches so that the switch 1113 is turned "ON", and the switch 1114 and the switch 1115 are turned "OFF". Thus, the macroblock pair of the image B11 read from the frame memory 1101 is input to the motion vector detecting unit 1108, the mode 20 selecting unit 1109, and the difference calculating unit 1102. The motion vector detecting unit 1108 uses the decoded image data of the image 10, the image P7, the image P4, and the image P13 stored in the frame memory 1107 as a reference image, and detects the inclusion in the macro region. The first motion vector and the second motion vector of each macroblock of the block pair. The mode selection unit 1109 determines the coding mode of the macroblock pair using the motion vector detected by the motion vector detecting unit 1258991 and the invention description 1108. Here, the coding mode of the B picture can be set, for example, to be selected from intra-picture coding, inter-picture predictive coding using one direction motion vector, inter-picture predictive coding using two-direction motion vectors, and direct mode selection. . Further, in the case of selecting an encoding mode other than the direct mode, it is determined whether or not the macro block pair is encoded by the frame structure or encoded by the field structure. Here, a method of calculating a motion vector using a spatial prediction method of a direct mode will be described. Fig. 43(a) is a diagram showing an example of a motion vector calculation sequence using a prediction method in a 10 direct mode space in which a macroblock block paired with a field structure code and a macroblock block coded by a frame structure are mixed. flow chart. Fig. 43(b) is a diagram showing an example of the configuration of the peripheral macroblock pairing to which the present invention is applied in the case where the encoding target macroblock pairing is frame-coded. Fig. 43(c) shows an example of the configuration of the peripheral macroblock pairing applied in the present invention in the case where the coding target macroblock pairing is encoded by the field structure. The macro block pairs indicated by oblique lines in Fig. 43 (b) and Fig. 43 (c) are coded object macro block pairs. In the case where the coding object macroblock is coded using the spatial prediction of the direct mode, the three encoded macroblock pairs around the coding object macroblock pair may be selected. In this case, the encoding object macroblock pair can be encoded in any of the 20 field constructs or the box construct. Therefore, the encoding control unit 1110 first decides whether or not to perform the encoding target macroblock pair in the field structure or in the frame structure. For example, in the case where there are many field structure coders among the neighboring macroblock pairs, the coding object macroblock pair is encoded by the field structure, and in the case where there are many coders in the frame structure, the frame structure is performed. coding. For example, 82!25899i, by using the information of the surrounding blocks, it is decided whether to encode the encoding object macroblock pair in a frame structure, or to encode the field structure, and it is unnecessary to represent The information for encoding the coding target macroblock pair is described in the code sequence, and the appropriate structure can be selected from the bound macroblock pair prediction structure 5'. Next, the motion vector detecting unit 1108 calculates the motion vector of the encoding target macroblock pair in accordance with the determination by the encoding control unit 1110. First, the motion vector detecting unit 1108 detects whether or not encoding has been determined by the field structure (S301), or has determined that the encoding is performed in the frame structure, and if it is determined to be encoded in the frame structure, the encoding object macro is detected in the frame structure. The block pair motion vector (S302) detects the motion vector of the coding target macroblock pair in the field structure if it is determined to be in the idle state of the field structure coding (S303). Fig. 44 is a diagram showing the data composition of the macroblock pairing in the case of the frame structure coding and the data composition of the macroblock in the case of the field structure coding. 15 In the figure, white circles represent pixels on odd horizontal scan lines, and black circles with oblique lines indicate pixels on even horizontal scan lines. In the case where a macroblock pair is cut out from each frame representing the input image, pixels on the odd horizontal scanning line and pixels on the even horizontal scanning line are alternately arranged in the vertical direction as shown in the center of Fig. 44. In the case where such a macroblock pair is coded 20 in a frame structure, the macroblock is processed for every two macroblocks MB1 and macroblocks MB2, and respectively for the pair of macroblocks The two macroblocks MB1 and the macroblock MB2 obtain a motion vector. Further, in the case of the field structure coding, the macro block pair is divided into a macro block TF indicating a top field when the horizontal scanning line direction is staggered, and a macro block BF, 83 1258991 indicating the bottom field, The invention discloses that the motion vector system obtains one of the two field fields constituting the pair of macroblocks, respectively. On the premise of such a macroblock pair, as shown in Fig. 43(b), a case where the coding target macroblock is encoded in a frame structure will be described. Fig. 45 shows a more detailed processing sequence of step S302 shown in Fig. 43. Further, in the figure, a macroblock pair is indicated by MBP, and a macroblock is represented by MB. The mode selecting unit 1109 first calculates a motion vector by using the prediction of the spatiality of the direct mode for one macroblock MB1 (the upper macroblock) constituting the encoding target macroblock pair. First, the mode selection unit 1109 10 obtains the minimum value among the indices of the images of the neighboring macroblock pairs for the indices of the first motion vector and the second motion vector (S501). However, in this case, when the surrounding macroblocks are coded in a frame structure, only the macroblocks of the macroblocks of the adjacent coding objects are used. Secondly, it is detected whether the surrounding macroblock is encoded by the field structure (SS02), and in the case of the field structure coding, 15 is further detected from the reference frame list of FIG. 42 to form the peripheral macroblock. Among the fields in which the macroblocks are referenced, how many fields are the fields of the additional minimum index (S503). When the result of the detection in step S503 is that the field referenced by the two macroblocks is the field with the smallest index (ie, the same index), the average of the two motion vectors of the two macroblocks is obtained and is set to The surrounding macroblock moves the vector (S5〇4). This is due to the fact that in the case of the interlaced structure, the macroblocks in the frame structure are adjacent to the two macroblocks of the macroblocks adjacent to the field structure. The result detected in step S503 is only borrowed from a macroblock and referenced to 84 1258991 发, hair---------------------------- -------------------------------------------------- ---------------------- In the case where the field is attached with the smallest index, the motion vector of the one macro block is set as the peripheral macro block. Move vector (S504A). If the field to be referred to is a field in which the minimum index is not attached, the moving vector of the peripheral macro block is set to "〇" (S505). 5 In the motion vector of the surrounding macroblock, the motion vector with higher coding efficiency can be selected by using only the motion vector of the field with the smallest index added. The processing of S505 represents a case where it is judged that there is no motion vector applied to the prediction. The result detected in step S502 is a case where the peripheral macroblock pair is encoded by the frame structure, and among the peripheral macroblock pairs, the motion vector of the macroblock adjacent to the coding target macroblock is adjacent. The motion vector of the neighboring macroblock pair is set (S506). The mode selection unit 1109 repeats the processing from the above-described step S501 to step S506 with respect to the selected two neighboring macroblock pairs. The result is obtained for a macroblock in the pair of object macroblocks, for example, the motion vectors of the three surrounding macroblocks are respectively obtained for the macroblock MB1. Next, the mode selection unit 1109 detects whether the frame having the smallest reference index among the three surrounding macroblocks or the field in the frame is one (S507). In this case, the mode selection unit 1109 sets three peripheral macroblocks. The reference index is unified into a reference frame index or a reference field index and compared. In the reference frame list shown in FIG. 42, only the reference index is attached to each frame. However, the reference frame index has a certain relationship with the reference frame index in which only the index is attached in each frame, so that the reference frame can be borrowed from the reference frame. The list or the reference field list is calculated to be converted into the other reference index. 85 1258991 玖,_尔萌 Figure 46 shows the relationship between the reference field index and the reference frame index. As shown in Fig. 46, in the reference field list, the number of frames indicated by the first field and the second field f2 is along the time series, and each frame includes a frame of the coded 5 object block (in Fig. 46). The frame shown in the figure) is assigned a reference frame index of 0, 1, 2, . In addition, the first field fl and the second field f2 of each frame are allocated to 第, 1, 2 based on the first field fl including the frame of the encoding target block (the first field is the encoding target field). · · · Reference field index. Further, the reference field index is from the 10th field fl and the second field f2 of the frame close to the coding target field 1, and if the coding target block is the first field fl, the first field fl is preferentially allocated, and if it is the coding target area When the block is the first field fl, the first field is preferentially assigned. For example, when the surrounding macroblock of the frame structure code refers to the frame of the reference frame index "1", and the surrounding macroblock of the field structure code refers to the first field fl of the index "2" of the reference frame 15, the above The surrounding macroblocks are all processed with reference to the same image. That is, the reference frame index of the frame referenced by one peripheral macroblock satisfies one-half of the reference field index of the reference field to be allocated as another peripheral macroblock (rounded down to the decimal point) When the prerequisites are met, the surrounding macroblocks are processed with reference to the same image. For example, the coding target block of the first field fl indicated by Δ in Fig. 46 refers to the first field fl of the reference field index "2", and the surrounding macroblock of the frame structure refers to the reference frame index. In the case of the 1" frame, in order to satisfy the above conditions, the peripheral macroblocks are processed by referring to the same image. On the other hand, when a certain surrounding macroblock refers to the first field 86 1258991 fl of the reference frame index "2", and another surrounding macroblock refers to the frame of the reference frame index "3", in order to satisfy the above conditions, The peripheral macroblock is processed with reference to the same image. As described above, the result of the detection in step S5〇7, if one, 5 will refer to the frame with the smallest index or the surrounding macro of the field in the frame. The motion vector of the block is set as the motion vector of the coding target block (S508). If the result of the detection in step S507 is not one, it is further detected whether the frame with the smallest index among the three neighboring macroblock pairs or the macroblock block of the field in the frame is two or more (S509) If there are two or more, if one of the frames has the smallest reference frame or the surrounding macroblock of the field in the frame, the motion vector is set to "0" or more (S510). The center of the three motion vectors of the neighboring macroblocks is set as the motion vector of the encoding target block (S511). Further, if the result of the detection in step S509 is less than two, the movement vector of the coding target block is set when the reference index is the smallest frame or the number 15 of the peripheral macroblock pairs of the field in the frame is "0". Set to "0" (S512). As a result of the above processing, a macroblock of the encoding object macroblock pair is formed, for example, a motion vector MV is obtained for MB1 as a calculation result. The mode selection unit 1109 also performs the above-described processing on the motion vector having the second reference index and uses two obtained motion vectors to predict motion compensation in two directions. However, in the case where there is no peripheral macroblock of the first or second motion vector among the peripheral macroblocks, the motion vector of the direction is not used, and only the motion vector of one direction is used for motion compensation. Also, for another macroblock within the encoding object macroblock pair, for example 87 1258991 玖--------------------------- ---------------------------------------------- For the giant area Block MB2 also repeats the same processing. As a result, motion compensation is performed in a direct mode for two macroblocks of a coded object macroblock pair. Next, as shown in Fig. 43(c), it is explained that the coding object has a large set of block pairs encoded by the field structure. Fig. 47 is a flow chart showing the processing sequence of the more detailed step S303 shown in Fig. 43. The mode selection unit 1109 uses the spatial prediction of the direct mode for one macroblock constituting the coding target macroblock pair, for example, for the macroblock TF corresponding to the top field of the coding target macroblock pair. Calculate a motion vector MVt. First, the mode selection 10 unit 1109 finds the smallest among the indexes of the image to be referred to by the encoding target macroblock (S601). However, in the case where the field structure is used to process the neighboring macroblock pair, only the macroblock of the same field (top field or bottom field) as the encoding object macroblock is considered. Secondly, it is detected whether the encoding object macroblock pair is encoded in a frame structure (S6〇2), and if it is encoded in a frame structure, it is further determined according to the index of each frame given by the 15 reference frame list 300. Whether the frame referenced by the two macroblocks in the pair of surrounding macroblocks is attached to the frame of the minimum index (S603). As a result of the detection in step S603, when the frames referenced by the two macroblocks are the smallest index, the average of the motion vectors of the two macroblocks is determined to be 20値, and the coding object macroblock is set. The moving vector of the pair (S604). If the result of the detection in step S603 is that one or both of the frames that have been referenced do not have a frame with a minimum index, it is further detected whether the frame referenced by any macroblock does not have a minimum index (S605), and the detection is performed. The result is that in the case where the frame of reference 1 of any one of the macroblocks is attached to the minimum index, 88 1258991 κι^Wmm 'the motion vector of the macroblock is used as the motion vector of the pair of peripheral macroblocks. (S606), in the case of the detection in step S605, any macroblock is also set to the minimum index in the frame to be referenced, and the peripheral macroblock is set to "0" (S607). ). Among the moving motion vectors of the above-mentioned peripheral macroblocks, the frame to be referenced only uses the motion and vector of the frame attached to the minimum index, whereby a motion vector with higher coding efficiency can be selected. The processing of S607 represents the case where it is judged that there is no motion vector applied to the prediction. Further, in the case of the result of the detection in step S602, if the peripheral macroblock pair is encoded by the φ field structure, then the peripheral macroblock is The motion vector of the surrounding giant 10-set block pair is used as the motion vector of the macroblock corresponding to the target macroblock in the encoding target macroblock pair (S608). The mode selection 邰1109 is selected. The three peripheral macroblock pairs repeat the processing from step S601 to step S608. As a result, the motion vectors of the three surrounding macroblocks are respectively 15 blocks of a macroblock in the encoding object macroblock pair. For example, one for each of the macroblocks TF is obtained. Next, the motion vector detecting unit ιι 8 detects whether the macroblock pair of the frame with the smallest index among the three neighboring macroblock pairs is one. (S609), if it is one, the motion vector of the neighboring g set block pair of the frame whose reference index is the smallest is set to the moving direction of the encoding target macroblock pair (S610). The detection is performed in step S609 4 The result is not one Further, among the three neighboring macroblock pairs, whether the neighboring macroblock pair with the smallest index is two or more (5611), and if there are two or more, the unreferenced index is further The moving vector of the neighboring macroblock pair of the smallest frame is set to "〇" (5612), and the center of the three moving vectors of the surrounding macroblock is made to 89 1258991. The invention is described as the encoding object macro. The movement vector of the block (S613). Further, if the result of the detection in step S611 is less than two, since the number of the surrounding macroblocks of the frame whose reference index is the smallest is "0", the motion vector of the coding target macroblock is set to " 〇" (S614). 5 As a result of the above processing, a macroblock constituting a pair of coding target macroblocks obtains a moving vector MVt as a calculation result, for example, for the macroblock TF corresponding to the top field. The mode selection unit 1109 repeats the above processing for the second movement vector (second reference index). In this way, the motion vector formed by the two directions is used to obtain two motion vectors for the macroblock TF. However, in the case where there is no peripheral macroblock having the first or second motion vector among the peripheral macroblock pairs, the motion vector in the direction is not used, and only the motion vector in one direction is used for motion compensation. This is because the situation of the surrounding macroblocks referring to only one direction is only referring to one direction for the coding target macroblock, and the knowledge can be improved. Further, another macroblock in the pair of the coding target macroblock, for example, repeats the same processing for the macroblock BF corresponding to the bottom field. The result is a process consisting of two macroblocks in a pair of coding object macroblocks, for example, a macroblock TF and a macroblock BF. 20, in the case where the coding structure of the coding target macroblock pair is different from the coding structure of the surrounding macroblock pair, the average of the motion vectors of the two macroblocks in the pair of surrounding macroblocks is obtained. However, the present invention is not limited thereto. For example, the encoding object macroblock pair and the surrounding macroblock pair may be used only in the case of the same encoding structure, and the surrounding giant 90 908991 玖 may be used. The motion vector of the block pair is used, and in the case where the coding object macroblock pair is different from the neighboring macroblock pair structure, the motion vector of the neighboring macroblock pair having different coding structures may not be used. More specifically, first, in the case where 1 encoding object macroblock pair is encoded in a frame structure, only the motion vector of the peripheral macroblock pair of the frame structure code 5 is used. At this time, in the case where the motion vector of the peripheral macroblock pair coded by the frame structure has no reference index as the smallest motion vector, the motion vector of the coding target macroblock is set to "0". Further, when the surrounding macroblock encodes the field structure, the motion vector of the surrounding macroblock is set to "0". Next, in the case where the coding object macroblock is encoded in the field structure, only the motion vector of the peripheral macroblock pair encoded by the field structure is used. At this time, in the case where the motion vector of the surrounding macroblock of the field structure coding has no moving index with the smallest reference index, the motion vector of the coding target macroblock is set to "0". Further, in the case where the surrounding macroblock is coded in the frame structure, the moving vector of the surrounding macroblock 15 is set to "〇". After performing the calculation of each of the peripheral macroblock pairs in this way, 3, in the case of the motion vectors, referring to the frame having the smallest index or the field thereof, the motion vector is set to the direct mode. In the case of the motion vector of the coding object macroblock pair, if not, the center of the three motion vectors is set to the motion vector of the coding object macroblock pair in the direct mode. Moreover, the above description determines whether to encode the coding target macroblock pair by the field structure based on the majority of the encoded surrounding macroblock coding structure, or to block the coding object macroblock by the frame structure. It is coded, but the invention is not limited to this. For example, in the direct mode, the frame must be 91 1258991, the code must be encoded by the squirrel, or the field structure must be coded to determine the first fixedness. . In this case, for example, in the case where each encoding target is encoded in a frame structure or encoded in a field structure, it is described in the header of the entire code column or the front of each frame. The unit of switching may be, for example, a sequence, a 5 G 〇 P, an image, a segment, etc., and in this case, it may be described before the corresponding head in the code column. In this case, of course, only in the case where the coding object macro-region, the ghost pair, and the question-edge macroblock have the same coding structure, the direct mode can be calculated by using the method of moving the vector of the surrounding macroblock. A motion vector that encodes pairs of masculine macroblocks. Further, when transmitting in a package or the like, the front head portion and the data portion can be separated and individually transmitted. In this case, the front head and the data unit form a bit stream. However, in the case of a packet, the order of transmission is only before and after the other part of the data part corresponding to the corresponding data part is transmitted, even if it does not constitute a bit stream. In this way, by the case where the frame structure is used or the field structure 15 is used in a fixed manner, the process of determining the structure using the surrounding block information can be reduced, and the simplification of the process can be achieved. Further, in the direct mode, it is also possible to use both the frame structure and the field structure to process the coding target macroblock pair and use the 'method of selecting a structure with high coding efficiency. In this way, only in the case where the coding object macroblock pair and the surrounding macroblock are the same coding structure, the direct mode can be calculated by using the method of moving the vector of the surrounding macroblock. The vector of the encoded object macro ^ block pair. By using this method, although it is indicated that the information of one of the frame structure and the field structure is selected in the code column, the residual signal of the motion compensation can be further reduced to improve the coding efficiency. 92 1258991 玖, 翻面 Further, in the above description, the situation in which the peripheral macroblock is moved and compensated by the size of the macroblock is described. However, the motion compensation can be performed in different sizes. In this case, as shown in Fig. 48 (a) and (b), for each macroblock of the encoding target macroblock pair, the movement of the block including the pixels at the positions a, b, and 5 c will be moved. The vector is set to the motion vector of the neighboring macroblock pair. Here, Fig. 48(a) shows a case where the lower macroblock is processed. In the case where the coding object macroblock is different from the frame/field structure of the surrounding macroblock, the area including the pixels at the positions a, b, and c shown in (a) and (b) of Fig. 49 is used. The block is processed in 10 rows with the blocks of the positions a', b', c'. The positions a', b', and c' are blocks of the other macroblock included in the same macroblock corresponding to the positions of the pixel positions a, b, and c. For example, in Fig. 49(a), in the case where the coding target macroblock pair is different from the frame/field structure of the surrounding macroblock pair, the motion vector of the block on the left side of the upper coding target macroblock is BL1. Determined by the motion vector of BL2. 15 Further, for example, in FIG. 49(b), in the case where the coding target macroblock pair is different from the frame/field structure of the surrounding macroblock pair, the motion vector of the block on the left side of the upper coding target macroblock is It is determined by using the motion vectors of BL3 and BL4. With such a processing method, it is possible to perform a direct mode processing in which the difference between the 20 frames and the field is considered in the case where the peripheral macroblock is subjected to motion compensation in units different from the size of the macroblock. Further, in the case where the peripheral macroblock performs motion compensation in units of a size different from the size of the macroblock, the average value of the motion vector of the block included in the macroblock can also be obtained as the The motion vector of the macro block. In the case where the peripheral macroblock is used for motion compensation in units different from the size of the macroblock, the direct mode processing of the difference between the frame and the field can be performed. As described above, the result of detecting the motion vector and performing inter-picture predictive coding according to the detected motion vector is based on the motion vector detected by the motion vector detecting unit 1108 and the encoded prediction error image in each macro region. Block 5 is stored in the code train. However, for the motion vector of the macroblock coded in the direct mode, only the case of encoding in the direct mode is described, and the motion vector and the reference index are not described in the code sequence. The 50th graph is not an example of the data structure of the code sequence 7〇0 generated by the code sequence generating unit 11〇4. As shown in the figure, in the code sequence 700 generated by the code generating portion 11〇4, a head leader is provided for each image Picture. In the previous Header, an item RPSL indicating a change of the reference frame list 10 and an item not shown in the figure indicating the image type of the image are provided, and the item RPSL is changed from the initial setting to the first reference of the reference frame list 10. In the case of the allocation method between the index 12 and the second reference index 13, the changed allocation method will be described. On the other hand, the encoded prediction error is recorded in each macroblock. For example, in the case where a certain macroblock is coded using the spatial prediction of the direct mode, the item Block1 describing the prediction error corresponding to the macroblock does not describe the motion vector of the macroblock, and is described in the representation. The PredType encoding mode of the encoding mode of the macroblock is the information of the direct mode. Further, in the case where it is selected from the viewpoint of coding efficiency as described above whether or not the macroblock is encoded in one of a frame structure or a field structure, information indicating whether one of a frame structure or a field structure is selected is described. The 'coded prediction error' is then described in the project CodedRes. In addition, when the other macroblocks are macroblocks coded by the inter-picture predictive coding mode, the code is described in the item B1〇ck2 corresponding to the prediction error of the 1258991 [the budding macroblock] The pattern of the pattern PredType describes that the coding mode of the macroblock is described as an inter-picture prediction coding mode. In this case, in addition to the coding mode, the first reference index 12 of the macroblock is written to the item Ridx0, and the second reference index 13 is written to the item 5 Ridxl. The reference index in the block appears as a variable length codeword and is smaller and smaller the code length of the code. Further, the moving vector description item MV0 is displayed next to the block before the macro block, and the moving vector is described in the rear block reference item MV1. Then, the encoded prediction error is described as an item.
CodedRes 〇 10 第51圖表示將第50圖所示之碼列700予以解碼之動 態圖像解碼裝置800之構成的方塊圖。動態圖像解碼裝置 8〇〇係將記述著包含以直接模式編碼之巨集區塊之預測誤 差的碼列700予以解碼的動態圖像解碼裝置,具有碼列解 析部701、預測誤差解碼部702、模式解碼部703、移動補 15 償解碼部7〇5、移動向量記憶部7〇6、框記憶體7〇7、加法 運算部708、開關709及開關710、移動向量解碼部711。 碼列解析部701從輸入之碼列700抽出各種資料。在此所 述之各種資料係編碼模式之資訊及有關移動向量的資訊。 經抽出之編碼模式的資訊輸出至模式解碼部703。又,經 2〇 抽出之移動向量的資訊輸出至移動向量解碼部711。而且 ,經抽出之預測誤差編碼資料係對預測誤差解碼部702輸 出。預測誤差解碼部702進行經輸入之經預測誤差編碼資 料的解碼而產生預測誤差圖像。經產生之預測誤差圖係像 對開關709輸出。例如開關7〇9連接於端子b時,預測誤 1258991 玖、發萌麵 差圖像係對加法器708輸出。 模式解碼部703參照從碼列抽出之編碼模式資訊而進 行開關7〇9與開關710的控制。編碼模式爲圖像內編碼的 情形下,控制成將開關709連接於端子a而將開關701連 5 接於端子c。 編碼模式爲圖像間編碼的情形下,控制成將開關709 連接於端子b而將開關701連接於端子d。又,於模式解 碼部703亦將編碼模式之資訊對於移動補償解碼部705與 移動向量解碼部711輸出。移動向量解碼部711對於從碼 10 列解碼部7 01輸入之經編碼的移動向量進行解碼處理。經 解碼之參照圖像號碼與移動向量保持於移動向量記憶部 706之同時對移動補償解碼部705輸出。 編碼模式爲直接模式的情形下,模式解碼部703控制 成將開關709連接於端子b而將開關701連接於端子d。 15又,於模式解碼部7〇3亦將編碼模式之資訊對於移動補償 解碼部705與移動向量解碼部711輸出。移動向量解碼部 711於編碼模式爲直接模式的情形下,使用記憶於移動向 量記憶部706之周邊巨集區塊對的移動向量與參照圖像號 碼而決定在直接模式使用的移動向量。此移動向量的決定 20方法與第40圖之模式選擇部1〇9的動作所說明的內容相同 ,故省略其說明。 移動補償解碼部705依據經解碼之參照圖像號碼與移 動向量而從框記憶體707於每個巨集區塊取得移動補償。 經取得之移動補償圖像輸出至加法運算部708。框記憶體 96 1258991 玖—、翻翻 — 707係將解碼圖像保持於每個框的記憶體。加法運算部708 進行加算經輸入的預測誤差圖像與移動補償圖像而產生解 碼圖像。所產生之解碼圖像對於框記憶體707輸出。 如上所述,依據本實施樣態的話,在直接模式之空間 5 性的預測方法上,於編碼對象巨集區塊對之編碼完周邊巨 集區塊對混合存在以框構造而編碼的移動向量與以場構造 而編碼之移動向量的情形下亦能容易地度求得移動向量。CodedRes 〇 10 Fig. 51 is a block diagram showing the configuration of the dynamic image decoding apparatus 800 for decoding the code sequence 700 shown in Fig. 50. The moving picture decoding device 8 includes a moving picture decoding device that decodes the code sequence 700 including the prediction error of the macroblock coded in the direct mode, and has a code sequence analysis unit 701 and a prediction error decoding unit 702. The mode decoding unit 703, the motion compensation decoding unit 〇5, the motion vector storage unit 〇6, the frame memory 〇7, the addition unit 708, the switch 709 and the switch 710, and the motion vector decoding unit 711. The code string analysis unit 701 extracts various materials from the input code sequence 700. The various data described herein are information on the coding mode and information about the motion vector. The information of the extracted coding mode is output to the mode decoding unit 703. Further, the information of the motion vector extracted by 2〇 is output to the motion vector decoding unit 711. Further, the extracted prediction error coded data is output to the prediction error decoding unit 702. The prediction error decoding unit 702 performs decoding of the input prediction error coding material to generate a prediction error image. The resulting predicted error map is output to switch 709. For example, when the switch 7〇9 is connected to the terminal b, the prediction error 1258991 玖 and the fading image are output to the adder 708. The mode decoding unit 703 performs control of the switch 7〇9 and the switch 710 with reference to the coding mode information extracted from the code sequence. In the case where the encoding mode is intra-picture encoding, it is controlled to connect the switch 709 to the terminal a and connect the switch 701 to the terminal c. In the case where the encoding mode is inter-picture encoding, it is controlled to connect the switch 709 to the terminal b and the switch 701 to the terminal d. Further, the mode decoding unit 703 also outputs the information of the coding mode to the motion compensation decoding unit 705 and the motion vector decoding unit 711. The motion vector decoding unit 711 performs decoding processing on the encoded motion vector input from the code 10 column decoding unit 610. The decoded reference picture number and the motion vector are held in the motion vector memory unit 706 and output to the motion compensation decoding unit 705. When the encoding mode is the direct mode, the mode decoding unit 703 controls the switch 709 to be connected to the terminal b to connect the switch 701 to the terminal d. Further, the mode decoding unit 〇3 also outputs the information of the coding mode to the motion compensation decoding unit 705 and the motion vector decoding unit 711. When the encoding mode is the direct mode, the motion vector decoding unit 711 determines the motion vector used in the direct mode using the motion vector and the reference image number stored in the peripheral macroblock pair of the mobile vector memory unit 706. The determination of the motion vector 20 is the same as that described in the operation of the mode selection unit 1〇9 of Fig. 40, and therefore the description thereof will be omitted. The motion compensation decoding unit 705 acquires motion compensation from the frame memory 707 for each macroblock based on the decoded reference picture number and the motion vector. The obtained motion compensation image is output to the addition unit 708. Frame Memory 96 1258991 玖—, Flip — The 707 system holds the decoded image in the memory of each frame. The addition unit 708 adds the input prediction error image and the motion compensation image to generate a decoded image. The generated decoded image is output to the frame memory 707. As described above, according to the embodiment, in the spatial mode prediction method of the direct mode, the coding macroblock block is encoded in the surrounding macroblock, and the motion vector coded in the frame structure is mixed. The motion vector can also be easily obtained in the case of a motion vector encoded in the field structure.
又,於上述的實施樣態,說明了各圖像以將巨集區塊 二個連結於垂直方向的巨集區塊對的單位並使用框構造或 10 場構造之其中任何之一而進行處理的情形,然而,亦能以 不同單位,例如以巨集區塊單位進行切換框構造或是場構 造。Further, in the above-described embodiment, each image is processed by using any one of a frame structure or a 10-field structure in which two macroblocks are connected to a unit of a macroblock pair in the vertical direction. In the case, however, the switching frame configuration or the field configuration can also be performed in different units, for example, in macroblock units.
又,於上述的實施樣態,說明了以直接模式處理B圖 像中的巨集區塊的情形,然而對於P圖像亦能進行同樣的 15 處理。於P圖像之編碼·解碼時,各區塊僅從一個圖像進 行移動補償,又,參照框列表僅一個。因此,對於p圖像 亦進行同樣處理的情形下,則於本實施樣態將求得編碼· 解碼對象區塊之二個移動向量(第1參照框列表與第2參照 框列表)的處理設成要求得一個移動向量的處理即可。 20 又,於上述實施樣態,說明使用三個周邊巨集區塊對 的移動向量而將直接模式使用之移動向量予以預測產生的 情形,然而所使用之周邊巨集區塊對的數量亦可爲不同値 。例如,可考慮僅使用左鄰之周邊巨集區塊對的移動向量 的情形。 97 1258991 玖、發明說明 (實施樣態I2) 藉著將用以實現以上述各實施樣態所示之圖像編碼方 法及圖像解碼方法之構成的程式記錄於可撓性碟片等記憶 媒體而能將上述各實施樣態所示之處理於獨立的電腦系統 5 簡單地實施。 第52圖係有關儲存用以藉著電腦系統而實現從上述實 施樣態至實施樣態11之圖像編碼方法及圖像解碼方法的程 式的記憶媒體的說明圖。 第52圖(b)表示從可撓性碟片之正面來看之外觀、斷 10 面構造、以及可撓性碟片,第52圖(a)表示記錄媒體本體 之可撓性碟片之物理格式的例子。可撓性碟片FD內藏於 卡匣F內,該碟片之表面形成同心圓狀地從外周朝向內周 的多數磁軌,各磁軌於各角度方向分割成16個扇區Se。 因此,儲存有上述程式之可撓性碟片在上述可撓性碟片FD 15 上分配的領域記錄著作爲上述程式之圖像編碼方法及圖像 解碼方法。 又,第52圖(c)表示於可撓性碟片FD進行上述程式之 記錄再生的構成。將上述程式記錄於可撓性碟片FD的情 形,係藉由可撓性碟片驅動器從電腦系統Cs將作爲上述程 20 式之圖像編碼方法及圖像解碼方法予以寫入。又,藉著可 撓性碟片內的程式而將上述圖像編碼方法及圖像解碼方法 構築於電腦系統中的情形,係藉可撓性碟片驅動器而從可 撓性碟片將程式予以讀出並傳送至電腦系統。 又,上述說明係說明使用可撓性碟片作爲記錄媒體, 1258991 ......................................................—.......................................................................... ........... 玖、發明說明 然而使用光碟亦能同樣地進行。又,記錄媒體並不限於此 ,CD-ROM、記憶卡、ROM卡匣等能記錄程式之構件的話 可同樣地實施。 而且,說明上述實施樣態所示之圖像編碼方法及圖像 5 解碼方法之應用例與使用此等方法的系統。 第53圖表示實現內容配信服務之內容供給系統exl〇〇 之整體構成的方塊圖。將通信服務的提供區域分割成所希 望的大小而於各晶胞內分別設置固定無線台的基地台 exl07〜exl10。 10 此內容供給系統exioo例如於網際網路exlOl藉由網 際網路服務供給器102及電話網exl04、以及基地台exl〇7 〜exllO 而連接電腦 exlll、PDA(personal digital assistant)exll2、照相機exll3、行動電話exll4、附有照 相機的行動電話exll5等各機器。 但是內容供給系統exlOO不僅限於第53圖的組合,亦 可組合其中任何而連接。又,各機器亦可不藉由固定無線 台的基地台exl07〜exllO而直接連接電話網exl04。 照相機exll3係數位攝影機等可變化動態圖像的機器 。又,行動電話爲 PDC(Personal Digital Communications) 2〇 方式、CDMA(Code Division Multiple Access)方式、W — CDMA(Wideband-Code Division Multiple Access)方式、或 是 GSM(Global System for Mobile Communications)方式的 ί了動電話、或 PHS(Personal Handyphone System)等,可爲 任何方式。 99 1258991 疚、發明說明 又’訊流伺服器103從照相機exl 13透過基地台 exl〇9、電話網exi〇4而連接,並使用照相機exll3而依據 使用者發送之經編碼處理的資料而能進行配送訊息。經攝 影之資料的編碼處理可藉照相機exll3進行,亦可藉進行 5資料之發訊處理的伺服器等而進行。又,以照相機exll6 攝影之動態圖像資料亦可藉由電腦exlll而發訊至訊流伺 服器103。照相機exll6係數位相機等可攝影靜止畫面、 動態圖像的機器。此情形下,動態圖像資料的編碼能以照 相機exll6亦能以電腦exlll之任何之一來進行。又,編 10碼處理係於具有電腦exlll或照相機exll6之LSIexll7處 理。又’亦可圖像編碼·解碼用軟體組裝於電腦exiil等 可讀取之記錄媒體之任何儲存媒體(CD- ROM、可撓性碟 片、硬碟等)。亦能以附有照相機之行動電話exll5發送動 態圖像資料。此時之動態圖像資料係以行動電話eX115所 15 具有之L SI編碼處理的資料。 此內容供給系統exlOO,將使用者以照相機exll3、照 相機exll6所攝影之內容(例如攝影音樂實況的影像等)與 上述實施樣態同樣地編碼處理而發送至訊流伺服器ex 1〇3 ,同時訊流伺服器exl03對於有要求之要求者配訊上述內 2〇 容資料。要求者具有可將上述經編碼處理之資料予以解碼 的電腦exlll、PDAexll2、照相機exll3、行動電話exii4 等。以如此的條件能使內容供給系統exl 1〇將經|扁碼2;^ 料於要求者接收並再生,且藉再生而能實現個人播放的系 統。 100 1258991 1 . 1 ,,s,.^ . r , ,, 玖、發明說明 構成此系統之各機器的編碼·解碼上乃以使用上述各 實施樣態所示之圖像編碼裝置或圖像解碼裝置即可。 以行動電話爲其一例來說明。 第54圖表示使用上述實施樣態所說明之圖像編碼方法 5 與圖像解碼方法的行動電話exll5。行動電話115具有用 以與基地台exllO之間發收信電波的天線ex2〇l ; CCD照 相機等可拍攝影像、靜止畫面的照相機部eX203 ;表示經 照相機部ex203攝影之影像而以天線ex201接收到的影像 等經解碼的資料的液晶顯示器等的顯示部ex202 ;由操作 10鍵ex204群所構成之本體部、用以輸出聲音的擴音器等聲 音輸出部ex208 ;用以輸入聲音的播音器等聲音輸入部 ex205 ;用以保存經攝影的動態圖像或靜止畫面資料、經接 收之郵件資料、動態圖像資料或靜止圖像資料等、經編碼 之資料或經解碼之資料的記錄媒體ex207;用以能將記錄 I5 媒體ex2〇7裝設於行動電話exll5的插孔部ex206。記錄 媒體ex207係於SD卡等塑膠殻內儲存有可電性地改寫或 消除的非依電記憶體的EEPROM(Electrically Erasable and Programmable Read Only Memory)之一種快閃記憶體的記錄 媒體。 20 又,以第55圖說明行動電話exll5。行動電話exll5 係相對於將具有顯示部ex202及操作鍵ex204之本體部的 各部予以統括性地控制而構成的主控制部ex311,藉由同 步匯流排ex313而相互連接著電源電路部ex310、操作輸 入控制部ex304、圖像編碼部ex312、照相機介面部ex303 101 1258991 玖、發明說明 、LCD(Liquid Crystal Display)控制部 ex302、圖像解碼部 ex3〇9、多路分離部ex308、記錄再生部ex3〇7、變調解調 電路部ex306及聲音處理部ex305。 電源電路部ex310經使用者的操作而呈結束對話及電 5 源鍵爲開啓(ON)的狀態時,從電池盒對於各部供給電力而 使附有照相機之數位行動電話exll5起動在可作動的狀態 行動電話exll5依據CPU、ROM及RAM等主控制部 ex311的控制而藉著聲音處理部ex305將聲音通話模式時 10 以聲音輸入部ex205集音的聲音信號變換成數位聲音資料 ,並以變調解調電路部ex306將此數位聲音資料予以頻譜 擴散處理,並在發收信電路部ex301進行數位對比變換處 理及頻率變換處理後,藉由天線ex201而發送。又,行動 電話exll5於聲音通話模式時將天線ex201所接收到的接 15 收資料予以放大而進行頻率變換處理及數位對比變換處理 ,以變調解調電路部ex306進行頻譜反擴散處理,以聲音 處理部ex305變換成對比聲音後,藉由聲音輸出部ex208 而輸出此對比聲音。 再者,於資料通信模式時發送電子郵件的情形下,藉 2〇 本體部的操作鍵ex204的操作而輸入的電子郵件的本文資 料(text data)藉由操作輸入控制部ex304而送出至主控制部 ex311。主控制部ex311以變調解調電路部ex306將本文資 料進行頻譜擴散處理,並灰發收信電路部ex301進行數位 對比變換處理及頻率變換處理後,藉由天線ex201而發送 102 1258991 玖、發明說明 至基地台exllO。 於資料通信模式時發送圖像資料的情形下,藉由照相 ’ 機介面部ex303而將照相機部ex203所拍攝之圖像資料供 · 給至圖像編碼部ex312。又,不發送圖像資料的情形下, 5亦可藉由照相機介面部ex303及LCD控制部ex3〇2而將照 ^ 相機部ex203所拍攝之圖像資料予以直接顯示。 · 圖像編碼部ex312係具有本發明所說明之圖像編碼裝 置的構成,藉使用於上述實施樣態所示之圖像編碼裝置的 φ 編碼方法而將照相機部ex203所供給之圖像資料予以壓縮 1〇 編碼,藉此變換成編碼圖像資料,且將此編碼圖像資料送 _ 出至多路分離部ex308。又,於此時同時行動電話exll5 藉由聲音處理部ex305而將照相機部ex2〇3於攝影中以聲 音輸入部ex205集音的聲音作爲數位聲音資料而送出至多 路分離部ex308。 15 多路分離部ex308以預定的方式將從圖像編碼部 ex312供給之編碼圖像資料與從聲音處理部ex305供給之 · 聲音資料予以多路化,其結果所獲得之多路化資料以變調 解調電路部ex306進行頻譜擴散處理,於發收信電路部 ’ ex301進行數位對比變換處理及頻率變換處理後,藉由天 · 20 線ex201而發送。 於資料通信模式時接收鏈結於首頁(home Page)之動態 圖像檔資料的情形下,藉由天線ex201而以變調解調電路 部ex306將從基地台ex110所接收的接收資料予以頻譜反 擴散處理,並將其結果所獲得之多路化資料送出至多路分 103 1258991 玖、發明說明 離部ex308。 又,有關將藉由天線ex2〇l而接收的多路化資料予以 解碼,多路分離部ex3〇8藉分離多路化資料而區分爲圖像 資料的位元流與聲音資料的位元流’藉由同步匯流排 5 ex313而將該編碼圖像資料供給至圖像解碼部ex309之同 時將該聲音資料供給至聲音處理部ex305 ° 其次,圖像解碼部ex309係具有本發明所說明之圖像 解碼裝置的構成,圖像資料之位元流以對應上述實施樣態 所示之編碼方法的解碼方法而解碼’藉此產生再生動態圖 10 像資料,並藉由LCD控制部ex302而將此再生動態圖像資 料供給至顯示部ex202,如此一來,可顯示例如包含於鏈 接於首頁之再生動態圖像檔的再生動態圖像資料。在此同 時聲音處理部ex305將聲音資料變換成對比聲音資料後, 將此對比聲音資料供給至聲音輸出部ex208,藉此,可再 15 生例如包含於鏈接於首頁之再生動態圖像檔的聲音資料。 又,不僅限於上述系統的例子,近來以衛星、地面波 所構成之廣播成爲話題,如第56圖所示在數位廣播用系統 上亦可組裝上述實施樣態之至少圖像編碼裝置或圖像解碼 裝置之其中任何之一。具體而言,廣播電台ex409之影像 2〇 資訊的位元流藉由電波而傳送至通信衛星或廣播衛星 ex410。接收到此位元流之廣播衛星ex410會發送廣播用的 電波而以具有衛星廣播接收設備之家庭的天線ex406接收 此電波,並藉電視(接收器)ex4〇l或隨選視訊盒(STB)ex407 寺裝置而將位兀流予以解碼並予以再生。又,亦可讀取已 104 1258991 玖、發明說明 記錄於記錄媒體之CD或DVD等儲存媒體ex4〇2的位元流 而將上述實施樣態所示之圖像解碼裝置安裝於要解碼之再 生裝置ex4〇3。此情形下所再生之影像信號會顯示於監視 器ex404。又,亦可於連接有線電視用之纜線ex4〇5或衛 5 星/地面波廣播的天線ex4〇6的隨選視訊盒ex4〇7內安裝 圖像解碼裝置,並構成以電視之螢幕ex408再生的情形。 此時亦可非將圖像解碼裝置組裝於隨選視訊盒,而係將圖 像解碼裝置組裝於電視內。又,具有天線 ex411之車輛 ex412接收從衛星ex41()來的信號或是從基地台exl〇7來 10的信5虎’而能於車輛ex412具有的車上衛星導航裝置 ex413等的顯示裝置再生動態圖像。 又’亦能以上述實施樣態所示之圖像編碼裝置將圖像 信號予以編碼而記錄於記錄媒體。具體例子如將圖像信號 記錄於DVD碟片ex421的DVD記錄器,或是記錄於硬碟 15之碟片記錄器等記錄器ex420。而且能記錄於SD卡ex422 。記錄器ex420具有上述實施樣態所示之圖像解碼裝置的 話,能將記錄於DVD碟片ex421或SD卡ex422的圖像信 號予以再生而以螢幕ex408顯示。 又,車上衛星導航ex413的構成係可得知例如於第55 20 圖所示之構成中除外照相機部ex203與照相機介面部 ex303、圖像編碼部ex312的構成,同樣的情形亦可得知電 腦exlll或電視(接收器)ex4〇l等。 又,上述行動電話exll4等之終端,除了具有編碼器 •解碼器雙方的發訊收訊型的終端之外’可得知亦有僅編 105 1258991 玖、發明說明 碼器之發訊終端、僅解碼器之收訊終端等三種安裝形式。 如上所述,可將上述實施樣態所示之動態圖像編碼方 法或動態圖像解碼方法使用於上述任何機器、系統,如此 一來能獲得上述實施樣態所說明的效果。 5 又’本發明不僅限於上述實施樣態,只要不脫離本發 明之範圍的情形下,可作各種各樣的型態變化。 產業上的利用性: 本發明之圖像編碼裝置係可利用於具有通信功能之個 人電腦、PDA、數位廣播之廣播電台及行動電話等的圖像 10 編碼裝置。 又’本發明之圖像解碼裝置係可利用於具有通信功能 之個人電腦、PDA、接收數位廣播之STB及行動電話等的 圖像解碼裝置。 【圖式簡單說明】 15 第1圖係用以說明習知例之圖像之參照關係的模式圖 〇 第2圖係用以說明習知例之直接模式之動作的模式圖 〇 第3圖(a)係表示使用習知直接模式之空間性的預測方 20 法,而於B圖像參照時間上之前方圖像情形下之移動向量 預測方法的一例。 第3圖(b)係表示作成各編碼對象圖像之參照圖像列表 的一例。 第4圖(A)、(B)係圖像號碼與參照索引的說明圖。 106 1258991 玖、發明說明 第5圖係表示習知圖像編碼裝置所構成之圖像編碼信 號格式的槪念圖。 第6圖係用以說明本發明之實施樣態1及實施樣態2 所構成之編碼動作的方塊圖。 第7圖係用以說明於直接模式中參照移動向量之區塊 具有以參照以顯示時間順序前方之二個移動向量之情形下 之動作的模式圖。 第8圖(a.)、(b)係用以比較顯示順序及編碼順序之圖像 參照關係的模式圖。 第9圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在後方之二個移動向量之情形下 之動作的模式圖。 第10圖(a)、(b)係用以比較顯示順序及編碼順序之圖 像參照關係的彳吴式圖。 第11圖係用以說明本發明之實施樣態5及實施樣態6 所構成之解碼動作的方塊圖。 第12圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在前方之二個移動向量之情形下 之動作的模式圖。 第I3圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在後方之二個移動向量之情形下 之動作的模式圖。 第Η圖係用以說明於直接模式中參照移動向量之區塊 具有參照以顯示時間順序在後方之二個移動向量之情形下Further, in the above-described embodiment, the case where the macroblock in the B image is processed in the direct mode has been described, but the same 15 processing can be performed on the P image. In the encoding and decoding of the P picture, each block is only motion compensated from one picture, and only one reference frame list is used. Therefore, in the case where the same processing is performed on the p-picture, the processing of the two motion vectors (the first reference frame list and the second reference frame list) of the encoding/decoding block is obtained in the present embodiment. It is required to process a moving vector. 20 In the above embodiment, a case is described in which the motion vector used in the direct mode is predicted by using the motion vectors of the three neighboring macroblock pairs, but the number of neighboring macroblock pairs used may also be used. For different embarrassment. For example, consider the case of using only the motion vector of the neighboring macroblock pair of the left neighbor. 97 1258991 发明, invention description (implementation mode I2) A memory medium such as a flexible disk is recorded by a program for realizing the image coding method and the image decoding method shown in each of the above embodiments. The processing shown in each of the above embodiments can be simply implemented in an independent computer system 5. Fig. 52 is an explanatory diagram of a memory medium for storing a program for realizing an image encoding method and an image decoding method from the above-described embodiment to the embodiment 11 by a computer system. Fig. 52(b) shows the appearance, the broken 10-sided structure, and the flexible disk as seen from the front side of the flexible disk, and Fig. 52(a) shows the physical state of the flexible disk of the recording medium body. An example of the format. The flexible disk FD is housed in the cassette F, and the surface of the disk forms a plurality of tracks which are concentrically oriented from the outer circumference toward the inner circumference, and the magnetic tracks are divided into 16 sectors Se in each angular direction. Therefore, the field in which the flexible disk storing the above-described program is distributed on the flexible disk FD 15 is recorded as the image encoding method and the image decoding method of the above program. Further, Fig. 52(c) shows a configuration in which the flexible disk FD performs recording and reproduction of the above-described program. In the case where the above-described program is recorded on the flexible disk FD, the image encoding method and the image decoding method described above are written from the computer system Cs by the flexible disk drive. Moreover, when the image encoding method and the image decoding method are constructed in a computer system by a program in a flexible disc, the flexible disc drive is used to transfer the program from the flexible disc. Read and transfer to the computer system. Moreover, the above description explains the use of a flexible disc as a recording medium, 1258991 ........................... .....................-............................ .............................................. ....... 发明, invention instructions, however, the use of optical discs can be carried out in the same way. Further, the recording medium is not limited thereto, and the components of the recordable program such as a CD-ROM, a memory card, and a ROM cassette can be similarly implemented. Further, an application example of the image coding method and the image 5 decoding method shown in the above embodiment and a system using the same will be described. Fig. 53 is a block diagram showing the overall configuration of the content supply system exl〇〇 which realizes the content distribution service. The base station exl07 to exl10 of the fixed wireless station are separately provided in each unit cell by dividing the supply area of the communication service into a desired size. 10 The content supply system exioo is connected to a computer exlll, a PDA (personal digital assistant) exll2, a camera exll3, for example, via the Internet service provider 102 and the telephone network exl04, and the base stations exl〇7 to exllO. Mobile phone exll4, mobile phone with camera, exll5 and other machines. However, the content supply system ex100 is not limited to the combination of Fig. 53, and any of them may be combined and connected. Further, each device may directly connect to the telephone network ex104 without the base station ex107 to exllO of the fixed wireless station. Camera exll3 coefficient camera, etc. Machine that can change dynamic images. Further, the mobile phone is a PDC (Personal Digital Communications) 2 MIMO system, a CDMA (Code Division Multiple Access) system, a W-CDMA (Wideband-Code Division Multiple Access) system, or a GSM (Global System for Mobile Communications) system. A mobile phone, or a PHS (Personal Handyphone System) can be used in any way. 99 1258991 发明Inventive Description Further, the 'streaming server 103' is connected from the camera exl 13 through the base station exl〇9 and the telephone network exi〇4, and can be performed by using the camera exll3 according to the encoded data transmitted by the user. Delivery message. The encoding processing of the captured data can be performed by the camera exll3, or by a server that performs the processing of the data. Further, the moving image data photographed by the camera exll6 can also be transmitted to the streaming server 103 by the computer exlll. A camera that can capture still images and moving images, such as a camera exll6 coefficient camera. In this case, the encoding of the moving image data can be performed by any of the computer exlls in the camera exll6. Further, the 10-code processing is performed by LSI exll7 having a computer exlll or a camera exll6. Further, the image encoding/decoding software may be incorporated in any storage medium (CD-ROM, flexible disk, hard disk, etc.) of a readable recording medium such as a computer exiil. It is also possible to transmit dynamic image data on the mobile phone exll5 with a camera. The moving image data at this time is the data processed by the L SI encoding of the mobile phone eX115. The content supply system ex100 displays the content captured by the user with the camera exll3 and the camera exll6 (for example, a video of live music, etc.) in the same manner as in the above-described embodiment, and transmits the content to the streaming server ex 1〇3 at the same time. The traffic server exl03 allocates the above two contents to the requester. The requester has a computer exlll, a PDAexll2, a camera exll3, a mobile phone exii4, etc., which can decode the above-mentioned encoded data. Under such conditions, the content supply system exl 1 can receive and reproduce the flat code 2; and the system for personal playback can be realized by the reproduction. 100 1258991 1 . 1 , , s,.^ . r , ,, 发明, invention Description The encoding and decoding of each machine constituting the system is performed by using the image encoding device or image decoding shown in each of the above embodiments. The device is OK. Take a mobile phone as an example. Fig. 54 shows a mobile phone exll5 using the image coding method 5 and the image decoding method explained in the above embodiment. The mobile phone 115 has an antenna ex2〇1 for transmitting a reception wave with the base station exllO, a camera unit eX203 capable of capturing a video or a still picture such as a CCD camera, and an image captured by the camera unit ex203 and received by the antenna ex201. a display unit ex202 such as a liquid crystal display such as a video or the like, and a sound output unit ex208 such as a main unit configured to operate a 10-key ex204 group, a speaker for outputting sound, or the like, a sounder for inputting sound, or the like. a sound input unit ex205; a recording medium ex207 for storing the captured moving image or still picture material, the received mail material, the moving image data or the still image data, the encoded data or the decoded data; The recording unit I5 media ex2〇7 can be installed in the jack portion ex206 of the mobile phone exll5. The recording medium ex207 is a type of flash memory recording medium in which an EEPROM (Electrically Erasable and Programmable Read Only Memory) that can be electrically rewritten or erased is stored in a plastic case such as an SD card. 20 Further, the mobile phone exll5 will be described with reference to FIG. The mobile phone exll5 is connected to the power supply circuit unit ex310 and the operation input via the synchronous bus bar ex313 by the main control unit ex311 configured to integrally control the respective units including the display unit ex202 and the operation key ex204. Control unit ex304, image coding unit ex312, camera interface ex303 101 1258991, invention description, LCD (Liquid Crystal Display) control unit ex302, image decoding unit ex3〇9, demultiplexing unit ex308, and recording/reproduction unit ex3〇 7. The modulation and demodulation circuit unit ex306 and the audio processing unit ex305. When the power supply circuit unit ex310 is in a state in which the end dialogue and the power source key are turned ON by the user's operation, the battery pack is supplied with power from the battery pack, and the camera-equipped digital mobile phone exll5 is activated. The mobile phone exll5 converts the voice signal collected by the voice input unit ex205 into the digital voice data by the voice processing unit ex305 under the control of the main control unit ex311 such as the CPU, the ROM, and the RAM, and demodulates it by the variable tone. The circuit unit ex306 performs spectral diffusion processing on the digital audio data, performs digital contrast conversion processing and frequency conversion processing on the transmission/reception circuit unit ex301, and transmits the data by the antenna ex201. Further, the mobile phone exll5 amplifies the data received by the antenna ex201 in the voice call mode, performs frequency conversion processing and digital contrast conversion processing, and performs spectral inverse diffusion processing on the variable-modulation demodulation circuit unit ex306 to perform sound processing. After the part ex305 is converted into a contrast sound, the contrast sound is output by the sound output unit ex208. Furthermore, in the case of transmitting an e-mail in the data communication mode, the text data of the e-mail input by the operation of the operation key ex204 of the main body unit is sent to the main control by the operation input control unit ex304. Department ex311. The main control unit ex311 performs spectral diffusion processing on the data in the variable-modulation circuit unit ex306, and the gray-scale receiving circuit unit ex301 performs digital contrast conversion processing and frequency conversion processing, and then transmits 102 1258991 by the antenna ex201. To the base station exllO. When the image data is transmitted in the material communication mode, the image data captured by the camera unit ex203 is supplied to the image encoding unit ex312 by the camera interface ex303. Further, when the image data is not transmitted, the image data captured by the camera unit ex203 can be directly displayed by the camera interface ex303 and the LCD control unit ex3〇2. The image encoding unit ex312 has the configuration of the image encoding device described in the present invention, and the image data supplied from the camera unit ex203 is given by the φ encoding method of the image encoding device described in the above embodiment. The encoded code is converted into a coded image data, and the coded image data is sent to the demultiplexing unit ex308. At this time, the mobile phone exll5 transmits the sound collected by the camera unit ex2〇3 to the sound input unit ex205 during the shooting by the sound processing unit ex305 as digital sound data to the demultiplexing unit ex308. The demultiplexing unit ex308 multiplexes the encoded image data supplied from the image encoding unit ex312 and the sound data supplied from the audio processing unit ex305 in a predetermined manner, and the multiplexed data obtained as a result is changed. The demodulation circuit unit ex306 performs spectrum diffusion processing, performs digital-contrast conversion processing and frequency conversion processing on the transmission/reception circuit unit 'ex301, and transmits it by the day 20 line ex201. In the case of receiving the dynamic image file linked to the home page in the data communication mode, the received data received from the base station ex110 is spectrally de-diffused by the variable-modulation demodulating circuit unit ex306 by the antenna ex201. Processing, and the multiplexed data obtained by the result is sent to the multi-channel 103 1258991 发明, the invention description is ex308. Further, the multiplexed data received by the antenna ex2〇1 is decoded, and the demultiplexing unit ex3 〇8 separates the bit stream of the image data into the bit stream of the sound data by separating the multiplexed data. By supplying the coded image data to the image decoding unit ex309 and supplying the audio data to the audio processing unit ex305° by the synchronization bus 5 ex313, the image decoding unit ex309 has the map described in the present invention. In the configuration of the decoding device, the bit stream of the image data is decoded by the decoding method corresponding to the encoding method shown in the above embodiment, thereby generating the reproduced dynamic image 10 image data, and the LCD control unit ex302 The reproduced moving image data is supplied to the display unit ex202, and thus, for example, the reproduced moving image data included in the reproduced moving image file linked to the top page can be displayed. At the same time, the sound processing unit ex305 converts the sound data into the contrast sound data, and then supplies the contrast sound data to the sound output unit ex208, whereby the sound included in the reproduced moving image file linked to the top page can be reproduced. data. Further, the present invention is not limited to the above-described system example, and a broadcast composed of a satellite or a ground wave has recently become a topic. As shown in FIG. 56, at least an image coding apparatus or an image of the above-described embodiment can be incorporated in a digital broadcasting system. Any one of the decoding devices. Specifically, the image stream of the broadcast station ex409 transmits the bit stream of the information to the communication satellite or the broadcast satellite ex410 by radio waves. The broadcast satellite ex410 that receives this bit stream transmits a radio wave for broadcasting and receives the radio wave with an antenna ex406 of a home having a satellite broadcast receiving device, and borrows a television (receiver) ex4〇1 or a video cassette (STB). The ex407 temple device decodes the bit stream and regenerates it. Moreover, it is also possible to read the bit stream of the storage medium ex4〇2 such as the CD or DVD recorded on the recording medium, and to install the image decoding apparatus shown in the above embodiment on the reproduction to be decoded. Device ex4〇3. The image signal reproduced in this case is displayed on the monitor ex404. In addition, an image decoding device can be installed in the video cassette ex4〇7 of the cable ex4〇5 connected to the cable for cable television or the antenna ex4〇6 of the satellite 5/ground wave broadcast, and is configured to be a screen of the television ex408. The situation of regeneration. In this case, it is also possible to assemble the image decoding device in the television without assembling the image decoding device in the video-on-demand box. Further, the vehicle ex412 having the antenna ex411 receives the signal from the satellite ex41() or the signal from the base station exl77, and can reproduce the display device such as the onboard satellite navigation device ex413 of the vehicle ex412. Dynamic image. Further, the image coding apparatus shown in the above embodiment can encode the image signal and record it on the recording medium. A specific example is a recording of an image signal on a DVD recorder of a DVD disc ex421 or a recorder ex420 recorded on a disc recorder of the hard disk 15. And can be recorded on the SD card ex422. When the recorder ex420 has the image decoding apparatus shown in the above embodiment, the image signal recorded on the DVD disc ex421 or the SD card ex422 can be reproduced and displayed on the screen ex408. In addition, the configuration of the in-vehicle satellite navigation ex413 is such that, for example, the configuration of the camera unit ex203, the camera interface ex303, and the image encoding unit ex312 is excluded in the configuration shown in FIG. 5520, and the computer can be known in the same manner. Exlll or TV (receiver) ex4〇l and so on. In addition, the terminal of the mobile phone exll4 or the like has a transmitting and receiving terminal of both the encoder and the decoder, and it is known that only the terminal is 105 1258991, and the transmitting terminal of the invention code is only There are three installation forms of the decoder's receiving terminal. As described above, the moving picture coding method or the moving picture decoding method shown in the above embodiment can be used in any of the above-described apparatuses and systems, so that the effects described in the above embodiment can be obtained. Further, the present invention is not limited to the above-described embodiment, and various types of changes can be made without departing from the scope of the invention. Industrial Applicability: The image coding apparatus of the present invention is applicable to an image 10 coding apparatus such as a personal computer having a communication function, a PDA, a digital broadcasting station, and a mobile phone. Further, the image decoding apparatus of the present invention can be used for an image decoding apparatus such as a personal computer having a communication function, a PDA, an STB that receives digital broadcasting, and a mobile phone. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram for explaining a reference relationship of an image of a conventional example. FIG. 2 is a schematic diagram for explaining an operation of a direct mode of a conventional example (FIG. 3) a) is an example of a motion vector prediction method in the case of a front image in the B image reference time using the spatial prediction method 20 of the conventional direct mode. Fig. 3(b) shows an example of a reference image list in which each encoding target image is created. Fig. 4 (A) and (B) are explanatory diagrams of an image number and a reference index. 106 1258991 BRIEF DESCRIPTION OF THE DRAWINGS Fig. 5 is a view showing a format of an image coded signal format constituted by a conventional image coding apparatus. Fig. 6 is a block diagram for explaining the coding operation of the embodiment 1 and the embodiment 2 of the present invention. Fig. 7 is a schematic diagram for explaining the operation in the case where the block referring to the motion vector in the direct mode has a reference to display two motion vectors ahead in the chronological order. Fig. 8 (a.) and (b) are pattern diagrams for comparing the image reference relationship between the display order and the encoding order. Fig. 9 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. Fig. 10 (a) and (b) are diagrams for comparing the image display relationship of the display order and the coding order. Figure 11 is a block diagram for explaining the decoding operation of the embodiment 5 and the embodiment 6 of the present invention. Fig. 12 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. Fig. I3 is a schematic diagram for explaining the operation of referring to the motion vector in the direct mode with reference to the case of displaying two motion vectors in the chronological order. The second diagram is used to illustrate the block in the direct mode with reference to the motion vector. With the reference to display the two motion vectors in the rear in chronological order.
Claims (1)
Applications Claiming Priority (11)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002118598 | 2002-04-19 | ||
JP2002121053 | 2002-04-23 | ||
US37864302P | 2002-05-09 | 2002-05-09 | |
US37895402P | 2002-05-10 | 2002-05-10 | |
JP2002156266 | 2002-05-29 | ||
JP2002177889 | 2002-06-19 | ||
JP2002193027 | 2002-07-02 | ||
JP2002204713 | 2002-07-12 | ||
JP2002262151 | 2002-09-06 | ||
JP2002290542 | 2002-10-02 | ||
JP2002323096 | 2002-11-06 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW200307467A TW200307467A (en) | 2003-12-01 |
TWI258991B true TWI258991B (en) | 2006-07-21 |
Family
ID=37765457
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW92109088A TWI259726B (en) | 2002-04-19 | 2003-04-18 | Motion vector derivation method |
TW92109090A TWI258991B (en) | 2002-04-19 | 2003-04-18 | Motion vector derivation method |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW92109088A TWI259726B (en) | 2002-04-19 | 2003-04-18 | Motion vector derivation method |
Country Status (1)
Country | Link |
---|---|
TW (2) | TWI259726B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120163457A1 (en) * | 2010-12-28 | 2012-06-28 | Viktor Wahadaniah | Moving picture decoding method, moving picture coding method, moving picture decoding apparatus, moving picture coding apparatus, and moving picture coding and decoding apparatus |
PL3136727T3 (en) | 2011-04-12 | 2018-11-30 | Sun Patent Trust | Motion-video coding method and motion-video coding apparatus |
CA2833893C (en) | 2011-05-24 | 2024-02-27 | Panasonic Corporation | Image coding method, image coding apparatus, image decoding method, image decoding apparatus, and image coding and decoding apparatus |
US9485518B2 (en) | 2011-05-27 | 2016-11-01 | Sun Patent Trust | Decoding method and apparatus with candidate motion vectors |
EP3410718B8 (en) | 2011-05-27 | 2020-04-01 | Sun Patent Trust | Image coding method and image coding apparatus, |
US8989271B2 (en) | 2011-05-31 | 2015-03-24 | Panasonic Intellectual Property Corporation Of America | Decoding method and apparatus with candidate motion vectors |
SG194746A1 (en) | 2011-05-31 | 2013-12-30 | Kaba Gmbh | Image encoding method, image encoding device, image decoding method, image decoding device, and image encoding/decoding device |
KR101900986B1 (en) | 2011-06-30 | 2018-09-20 | 선 페이턴트 트러스트 | Image decoding method, image encoding method, image decoding device, image encoding device, and image encoding/decoding device |
CN103718558B (en) | 2011-08-03 | 2017-04-19 | 太阳专利托管公司 | Video encoding method and apparatus, video decoding method and apparatus, and video encoding/decoding apparatus |
MY180182A (en) | 2011-10-19 | 2020-11-24 | Sun Patent Trust | Picture coding method,picture coding apparatus,picture decoding method,and picture decoding apparatus |
-
2003
- 2003-04-18 TW TW92109088A patent/TWI259726B/en not_active IP Right Cessation
- 2003-04-18 TW TW92109090A patent/TWI258991B/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
TW200307467A (en) | 2003-12-01 |
TWI259726B (en) | 2006-08-01 |
TW200307466A (en) | 2003-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2004208259A (en) | Motion vector calculating method | |
KR101031423B1 (en) | Motion vector calculating method | |
KR101011849B1 (en) | Motion vector calculating method | |
TWI280781B (en) | Moving picture coding method and moving picture decoding method | |
TWI317107B (en) | Filtering strength determination method , moving picture coding method and moving picture decoding method | |
TWI331877B (en) | Picture coding method and picture coding device | |
KR100948714B1 (en) | Method for encoding and decoding of moving picture | |
JP2004208258A (en) | Motion vector calculating method | |
JP4130783B2 (en) | Motion vector encoding method and motion vector decoding method | |
TWI258991B (en) | Motion vector derivation method | |
JP2004215229A (en) | Motion picture encoding method and motion picture decoding method | |
JP2004048632A (en) | Method for encoding and decoding motion picture | |
JP2006304350A (en) | Moving picture decoding method and system | |
BRPI0304534B1 (en) | method and apparatus for determining motion vector |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Annulment or lapse of patent due to non-payment of fees |