200529673 (1) 九、發明說明 【發明所屬之技術領域】 本發明係有關畫像編碼裝置、畫像編碼方法、畫像編 碼程式、畫像解碼裝置、畫像解碼方法及畫像解碼程式。 【先前技術】 近年來,由於網際網路普及,而經由網路傳送接收畫 像資料,或儲存畫像資料逐漸廣泛。一般而言,畫像資料 編碼係採用可有效減少畫像資料容量之正向編碼方式。作 爲此正向編碼方式之其中一例,有ITU— T揭示之國際標 準規格H.264動畫編碼方式(例如參考ITU-T VCEG ( Q.6 /16) ,“H. 26L Test Model Long Term Number 8 ( TML- 8 ) draftO”)。 於H.264之網際網路編碼圖框(I圖框)中,藉由 採用畫面內預測之圖框內編碼而壓縮動畫。又,Η· 264之 內部圖框編碼中,編碼對象圖框分割成16x16畫像大小 之微區塊,並於各微區塊進行編碼處理。微區塊進一步分 割成16x8畫素或8x8畫素等尺寸之區塊,於已分割之 各區塊進行動作補償預測。藉此減少動畫之時間方向之冗 長度。 ^ 【發明內容】 然而,對於上述動畫編碼化或靜態畫像編碼等畫像編 碼,將取得更有效率之編碼技術。 200529673 (2) 因此,本發明其目的係提供可有效率編碼畫像之畫像 編碼裝置、畫像編碼方法、及畫像編碼程式,並且提供藉^ 由本發明之畫像編碼裝置所產生之位元可恢復畫像之畫像 解碼裝置、畫像解碼方法、畫像解碼程式。 本發明之其中一側面相關之畫像編碼裝置係具備:( a)將編碼對象之輸入畫像分割成特定尺寸所形成之複數 之各部分領域,決定有關藉由必須以預測補助資訊產生預 測畫像之第1畫像預測處理或第2畫像預測處理之何者, 產生預測畫像之編碼模式,且.產生用來限定該編碼模式之 編碼模式資訊之決定手段、(b )執行對於前述複數之部 分領域中,從前述編碼模式資訊,限定藉由第1畫像預測 處理應產生預測畫像之領域之部分領域,抽出從其他部分 領域之已產生之播放畫像產生該部分領域之預測畫像之預 測補助資訊,並基於該預測補助資訊產生該預測畫像之前 述第1畫像預測處理之第1畫像預測手段、(c )記憶基 於前述畫像之播放畫像之記憶手段及(d )產生包含已編 碼編碼模式資訊與預測補助資訊之資料之位元流之編碼手 段。 本發明另一面相關之畫像編碼方法,其中,決定手段 包含:(a)對於將編碼對象之輸入畫像分割成特定尺寸 所形成之複數各部分領域,決定有關藉由必須以預測補:助 資訊產生預測畫像之第1畫像預測處理或第2畫像預測處 理之何者,產生預測畫像之編碼模式,且產生用來限定該 編碼模式之編碼模式資訊之決定步驟、(b )第1…畫像預 -6- 200529673 (3) 測手段,前述複數之部分領域中,從前述編碼模式資訊, 限定藉由第1畫像預測處理應產生預測畫像之領域之部分 領域,抽出從其他部分領域之已產生之播放畫像,產生該 部分領域之預測畫像之預測補助資訊,並基於該預測補助 資訊產生該預測畫像之上述第1畫像預測處理之第1畫像 預測步驟、(C )記憶手段記憶基於前述畫像之播放畫像 之記憶步驟、(d )編碼手段產生包含已編碼編碼模式資 訊與預測補助資訊之資料之位元流之編碼步驟。 又,本發明另一面相關之畫像編碼程式,將電腦功能 化作爲:(a)對於將編碼對象之輸入畫像分割成特定尺 寸所形成之複數之各部分領域,決定有關藉由必須以預測 補助資訊產生預測畫像之第1畫像預測處理,或第2畫像 預測處理之何者產生預測畫像之編碼模式,且產生用來限 定該編碼模式之編碼模式資訊之決定手段、(b)複數之 部分領域中,從前述編碼模式資訊,限定藉由第1畫像預 測處理應產生預測畫像之領域之部分領域,抽出從其他部 分領域已產生之播放畫像,產生該部分領域之預測畫像之 預測補助資訊,並基於該預測補助資訊產生該預測畫像之 上述第1畫像預測處理之第1畫像預測手段、(c )記憶 基於前述畫像之播放畫像之記憶手段、(d)產生包含已 編碼前述編碼模式資訊與前述預測補助資訊之資料之位元 流之編碼手段之程式。.另外,上述畫像編碼程式及以下說 明之本發明之畫像編碼程式將可以電腦可讀取之記錄媒體 、重疊於載波之電腦資料信號或程式製品等之型態加以提 200529673 (4) 供。 上述第2畫像預測處理,係將未產生預測信號之畫素 設爲其中一部分之領域爲模板,已產生之播放畫像爲參考 領域,並選擇該參考領域中,與模板相關最高之領域爲複 製參考領域,於前述模板內未產生預測信號之畫素,給予 複製參考領域內之對應畫素之畫素値,藉此產生預測畫像 之處理。悪 本發明之另一面相關一種畫像解碼裝置,具備:(a )對於將解碼對象之畫像分割成特定尺寸所形成之複數之 各部分領域,從包含編碼限定採用於產生預測畫像之第1 畫像預測處理或第2畫像預測處理之編碼模式資訊,與基 於該第1畫像預測處理產生預測畫像之預測補助資訊之位 元流,解碼該編碼模式資訊與該預測補助資訊之解碼手段 、(b)複數之部分領域中,從解碼模式資訊,限定藉由 第1畫像預測處理應產生預測畫像之領域之部分領域之預 測畫像,從已產生之播放畫像,藉由採用預測補助資訊之 該第1畫像預測處理而產生之第1畫像預測手段、(c ) 複數之部分領域中,從解碼模式資訊,限定藉由第2畫像 預測處理應產生預測畫像之領域之部分領域之預測畫像, 藉由該第2畫像預測處理而產生之第2畫像預測手段、( d )記憶基於預測畫像之播放畫像之記憶手段;(e )第2 畫像預測處理中,未產生預測信號之畫素爲其中一部分之 領域設爲模板,記憶於記憶手段之播放畫像設爲參考領域 ’並選擇該參考領域中與模板相關最高之領域爲複製參考 200529673 (5) 領域,於模板內未產生預測信號之畫素上,施予複製參考 領域內之對應畫素之畫素値,藉此產生預測畫像。 本發明之另一面相關之畫像解碼方法係具備:(a ) 對於將解碼對象之畫像分割成特定尺寸所形成之複數之各 部分領域,從包含編碼限定採用於產生預測畫像之第1畫 像預測處理或第2畫像預測處理之解碼模式資訊,和藉由 該第1畫像預測處理產生預測畫像之預測補助資訊之位元 流,解碼手段解碼該編碼模式資訊與該預測補助資訊之解 碼步驟、(b )和第1畫像預測手段,前述複數之部分領 域中,從前述解碼模式資訊,限定藉由前述第1畫像預測 處理應產生預測畫像之領域之部分領域之預測畫像,藉由 採用前述預測補助資訊之該第1畫像預測處理而產生之第 1畫像預測步驟、(c )第2畫像預測手段,複數之部分 領域中,從前述解碼模式資訊,限定藉由第2畫像預測處 理應產生預測畫像之領域之部分領域之預測畫像,採用該 第2畫像預測處理而產生之第2畫像預測步驟、(d )和 記憶手段記憶基於預測畫像之播放畫像之記憶步驟;(e )第2畫像預測處理中,未產生預測信號之畫素爲其中一 部分之領域設爲模板,記憶於記憶手段之播放畫像設爲參 考領域,並選擇該.參考領域中與模板相關最高之領域爲複 製參考領域,於前述模板內未產生預測信號之畫素上,施 予前述複製參考領域內之對應畫素之畫素値’藉此產生預 測畫像。 本發明另一面相關之畫像解碼程式係將電腦功能化作 -9 - 200529673 (6) 爲:(a )對於將解碼對象之畫像分割成特定尺寸所形成 之複數之各部分領域’從包含編碼限定採用於產生預測畫 像之第1畫像預測處理’或第2畫像預測處理之解碼模式 資訊,和藉由該第1畫像預測處理產生預測畫像之預測補 助資訊之位元流,解碼該編碼模式資訊與該預測補助資訊 之解碼手段、(b)前述複數之部分領域中’從解碼模式 資訊,限定藉由第1畫像預測處理應產生預測畫像之領域 之部分領域之預測畫像,藉由採用預測補助資訊之該第1 畫像預測處理而產生之第1畫像預測手段、(e )複數之 部分領域中,從解碼模式資訊,限定藉由第2畫像預測處 理應產生預測畫像之領域之部分領域之預測畫像,藉由該 第2畫像預測處理而產生之第2畫像預測手段、(d )記 憶基於預測畫像之播放畫像之記憶手段之程式。此程式( e )於第2畫像預測處理中,未產生預測信號之畫素爲其 中一部分之領域設爲模板,記憶於記憶手段之播放畫像設 爲參考領域,並選擇該參考領域中與前述模板相關最高之 領域爲複製參考領域,於模板內未產生前述預測信號之畫 素上,施予前述複製參考領域內之對應畫素之畫素値,藉 此產生預測畫像,而使電腦功能化。另外,上述畫像解碼 程式及以下說明之本發明之畫像解碼程式將可以電腦可讀 取之記錄媒體、重疊於載波之電腦資料信號或程式製品等 之型態加以提供。 若藉由上述本發明,第2畫像預測處理,已產生之播 放畫像設爲參考領域,於模.板內未產生預測信號之畫素上 -10- 200529673 (7) ,複製從參考領域選擇之複製參考領域之對應之畫素。從 參考領域中選擇對於模板相關較高之領域作爲複製參考領 域。例如選擇相關値亦最高之領域、或相關値相較於特定 基準値起初最高之領域等。因此,解碼端中,對於限定爲 藉由第2畫像預測處理應產生預測畫像之領域之部分領域 ,可不採用來自編碼端之預測補助資訊而主動地產生預測 畫像。故於編碼端可達到高效率編碼。 畫像編碼相關之本發明中,決定手段,最好將複數之 部分領域之播放畫像,經由第1畫像預測處·理,依照特定 掃瞄順序加以產生後,依照與該特定掃瞄順序相反之順序 選擇處理對象之部分領域,相較於該處理對象之部分領域 ,掃瞄順序中位於前方之部分領域之畫像、相較於該處理 對像之部分領域,掃瞄順序中位於後方之部分領域中,藉 由第1畫像預測處理應產生之預測畫像之領域之決定編碼 模式之該部分領域之播放畫像設爲參考領域,經由第2畫 像預測處理產生該處理對象之部分領域之播放畫像,基於 比較該第2畫像預測處理所產生之處理對象之部分領域之 播放畫像,與第1畫像預測處理所產生之處理對象之部分 領域之播放畫像,而決定該處理對象之部分領域之編碼模 式。 此際,畫像解碼相關之本發明中,對於從解碼模式資 訊限定藉由第1畫像預溉處理應產生預測畫像之領域之部 分領域,依照特定掃瞄順序藉由第1畫像預測處理產生預 測畫像,將基於該預測畫像產生之播放畫像記憶於前述記 -11 - 200529673 (8) 億手段之後,第2畫像預測手段,對於從解碼模式資訊限 定藉由第2畫像預測處理應產生預測畫像之領域之部分領 域,依照特定掃瞄順序藉由第2畫像預測處理產生預測畫 像。 若藉由本發明,第1畫像預測處理先產生播放畫像後 ,已產生之播放畫像設爲第2畫像預測處理之參考領域。 因此特定掃瞄順序中位於$方之播放畫像,亦可採用於第 2畫像預測處理,故更可有效削減空間方向之冗長度。 畫像編碼相關之本發明中,決定手段,演算各自採用 經過第2畫像預測處理而產生處理對象之部分領域之播放 畫像,和經過第1畫像預測處理而產生之處理對象之部分 領域之播放畫像時之編碼偏斜或/及編碼資料量所衍生之 成本函數之成本値,基於該成本値決定該處理對象之部分 領域之前述編碼模式亦可。 畫像編碼相關之本發明中,更具備複數之部分領域中 ,從前述編碼模式資訊,限定藉由第2畫像預測處理應產 生預測畫像之領域之部分領域之預測畫像,藉由該第2畫 像預測處理而產生之第2畫像預測手段;第2畫像預測手 段將藉由第2畫像預測處理所產生之預測畫像,設爲播放· 畫像。此際,畫像解碼相關之本發明中,第2畫像預測手 段將藉由第2畫像預測處理所產生之預測畫像,設爲播放 晝像。亦即,藉由第2畫像預測手段所產生之預測畫像, 依舊採用作爲播放畫像。因此,藉由第2畫像预測處理所 產生之播放畫像,亦可採用於其次處理之部分領域之預測 -12- 200529673 (9) ,故更可削減冗長度。又,由於輸入畫像與第2畫像預測 處理所產生之預測畫像之差量相關資訊,不必包含於位元 流,故更可達到有效編碼。 於本發明中,編碼對象之輸入畫像亦可爲動畫之圖框 。此際,於第2畫像預測處理中,將編碼對象圖框之播放 畫像,及相較於該編碼對象圖框優先處理之圖框之播放畫 像之至少一者,設爲參考領域。又,此際,畫像解碼相關 之本發明中’解碼對象之畫像爲動畫圖框;第2畫像預測 手段,記憶於前述記憶手段之播放畫像中,前述解碼對象 圖框之該播放畫像,及相較於該解碼對象圖框優先處理之 圖框之播放畫像至少其中一者,設爲前述參考領域。 若藉由本發明,於第2畫像預測處理中,編碼對象圖 框之播放畫像及與編碼對象圖框相異之已處理圖框之播放 畫像兩者設爲參考領域,故更可削減時間方向及空間方向 之冗長度。 畫像編碼相關之本發明中,第1畫像預測處理亦可爲 動作補償預測處理。此際,預測補助資訊包含藉由第1畫 像預測處理所抽出之移動向量。又,此際,畫像解碼相關 之本發明中,預測補助資訊亦包含採用於第1畫像預測處 理之移動向量。 於本發明中,第1畫像預測處理亦可爲採用輿處理對 象之部分領域同一空間內之播放畫像於預測,而產生預測 畫像之處理。亦即,第1畫像預測處理亦可爲採用於靜態 畫像之編碼及解碼之預測處理,或係採用於動畫之編碼及 -13- 200529673 (10) 解碼之圖框內預測處理。第1畫像預測處理中,從編碼模 式,處理對象之部分領域連接之連接部分領域,限定爲藉 由第2畫像預測處理應產生預測畫像之部分領域之情況, 基於未與該處理對象之部分領域連接之非連接部分領域之 播放畫像,而產生該處理對象之部分領域之預測畫像。 若藉由本發明,處理對象之部分領域爲藉由第1畫像 預測處理應產生預測畫像之領域,連接該處理對象之部分 領域之連接部分領域爲藉由第2畫像預測處理應產生預測 畫像之領域時,亦可採用未與處理對象之部分領域連接之 非連接部分領域之播放畫像資料,產生預測畫像。藉此, 不僅連接處理對象之部分領域之連接部分領域之播放畫像 ,亦可採用未與處理對象之部分領域連接之非連接部分領 域之播放畫像,產生預測畫像。因此,將擴大產生預測畫 像資料時之參考範圍,並削減空間之冗長度,故更可提高 編碼效率。 又,此際,畫像編碼相關之本發明中,第1畫像預測 處理中,從複數相異之預測規則相關之複數預測模式中, 決定採用於產生處理對象之部分領域之預測畫像之預測模 式,並產生限定該預測模式之預測模式資訊,編碼手段可 將已編碼預測模式資訊之資料包含於位元流。此際,畫像 解碼相關之本發明中,於位元流藉由第1畫像預測處理產 生預測畫像之情況,包含編碼複數相異之預測規則相關之 複數預測模式中,限定採用於第1畫像預測處理之預測模 式之預測模式資訊之資料;解碼手段從位元流解碼預測模 -14- 200529673 (11) 式資訊,於第1畫像預測處理中,基於預測模式資訊產生 預測畫像。 本發明中,第1畫像預測處理中,從編碼模式,連接 處理對象之部分領域之連接部分領域,限定爲藉由第2畫 像預測處理應產生御賜畫像之部分領域時,位於預測方向 之直線上並存在於預測起始端方向之非連接部分領域之播 放畫像中,最好基於最靠近處理對象之部分領域之畫素之 畫素値,產生預測畫像。藉此,從非連接區塊,選擇對應 各預測畫像產生圖案之最佳播放畫像資料。 畫像編碼相關之本發明中,預測殘留畫像產生手段, 藉由執行第1畫像預測手段所產生之預測畫像,與編碼對 象之輸入畫像之差演算,而產生預測殘留畫像;編碼手段 將編碼基於預測殘留畫像所產生之信號之資料,包含於位 元流亦可。 此際,畫像解碼相關之本發明中,位元流包含編碼基 於藉由第1畫像預測處理所產生之部分領域之預測畫像, 與該部分領域之畫像之差演算所產生之預測殘留畫像之信 號而產生之資料;解碼手段,包含於位元流之資料中,從 編碼基於預測殘留畫像所產生之信號所形成之該資料,解 碼該信號;播放畫像產生手段藉由加法基於以解碼手段解 碼之信號之回復預測殘留畫像與預測畫像,.產生播放畫像 〇 畫像編碼相關之本發明中,預測殘留畫像產生手段藉 由執行第1畫像預測手段所產生之預測畫像,與編碼對象 -15- 200529673 (12) 之輸入畫像之差演算,而產生預測殘留畫像;轉換手段藉 由於預測殘留畫像施行轉換處理而產生轉換資訊;反轉換 手段藉由於轉換資訊上施行反轉換處理而產生回復預測殘 留畫像,播放畫像產生手段藉由加法回復預測殘留畫像與 預測畫像,產生播放畫像,編碼手段將編碼轉換資訊之資 料包含於位元流亦可。 此際,畫像解碼相關之本發明中,位元流包含編碼藉 由第1畫像預測處理所產生之部分領域之預測畫像,與該 部分領域之畫像(輸入畫像)之差演算所產生之預測殘留 畫像上施行轉換處理之轉換資訊而產生之資料;解碼手段 ,從位元流解碼轉換資訊;反轉換手段藉由於轉換資訊上 施行反轉換處理而產生回復預測殘留畫像,播放畫像產生 手段藉由加法回復預測殘留畫像與預測畫像,產生播放畫 像。 【實施方式】 以下,參考圖面針對本發明最佳實施型態詳細說明。 另外,於各圖面中,同一或相當之部分將標記相同符號。 〔第1實施形態〕 首先,針對本發明之第1實施型態加以說明。圖1爲 表示第1實施型態相關之畫像編碼裝置之構造圖。圖1所 示之畫像編碼裝置1,物理上可設爲例如具備CPU (中央 處理裝置)、記憶體等記憶裝置、顯示器等顯示裝置、通 -16- 200529673 (13) 信裝置之電腦。又’畫像編碼裝置1亦可爲攜帶電話等移 動通信終端、DVD機器。亦即,畫像編碼裝置1可廣泛 適用做資訊處理之裝置。 畫像編碼裝置1功能上具有畫像分割部(畫像分割手 段)1 1、編碼模式決定部(決定手段)1 2、預測畫像產生 部(第1畫像預測手段)1 3、減法部(預測殘留畫像產生 手段)14、轉換部(轉換手段)1 5、編碼部(編碼手段) 1 6、反轉換部(反轉換手段)1 7、加法部(播放畫像產生 手段)1 8及記憶部(記憶手段)1 9。 其次,針對圖1所示之各構造要素加以說明。畫像分 割部1 1係將輸入於圖框單位之輸入畫像,分割成特定大 小(例如4 X 4畫像)之區塊,亦即部分領域。又,畫像 分劄部U,係產生用來限定作爲編碼處理對象之處理對 象區塊之區塊位置資訊。作爲區塊位置資訊,例如爲將圖 框內各區塊依照光點掃猫(raster scanning)順序,〇、1 、2由大到小標上編號之區塊號碼,或包含各區塊之圖框 左上端爲基準之座標所示之區塊座標。 編碼模式決定部1 2係基於特定編碼模式決定規則而 決定有關各區塊之編碼模式,並產生用來限定該編碼模式 之編碼模式資訊。 .,. 於本實施型態中,編碼模式中,有採用處理對象區塊 之輸入畫像及對應該畫像之預測畫像’編碼該處理對象區 .塊之畫像模式之預測編碼處理模式(P模式)’和不採用 .處理對象區塊之輸入畫像及對應該畫像之預測畫像,編碼 -17- 200529673 (14) 該處理對象區塊之畫像模式之塡補編碼處理模式(C模式 )。亦即,編碼模式爲預測編碼處理模式之際,編碼處理 對象區塊之畫像相關資訊而加以輸出。另一方面,編碼模 式爲塡補編碼處理模式之際,不編碼處理對象區塊之畫像 相關資訊,亦不輸出。又編碼模式爲預測編碼處理模式之 際,藉由解碼端之預測畫像產生所需之預測補助資訊之第 1畫像預測處理,產生預測畫像,編碼模式爲塡補編碼處 理模式之際,藉由解碼端之預測畫像產生不需預測補助情 報之第2畫像預測處理(畫像塡補處理),產生預測畫像 〇 編碼模式決定規則,例如藉由後述之畫像塡補處理( 參考圖6,第2畫像預測處理),產生處理對象區塊之播 放畫像,預先設定處理對象區塊之輸入畫像與該播放畫像 之誤差之平方値之臨界値以下之情況,設爲塡補編碼模式 ,以外之情況設爲預測編碼處理模式亦可。另外,並非得 比較誤差平方値與臨界値,亦可比較誤差之絕對値與臨界 値。又,其他編碼模式決定規則,亦可爲例如事先將規定 以預測編碼處理模式編碼之區塊,和以塡補編碼模式編碼 之區塊之資訊,對應於區塊位置資訊並加以保持,於進行 處理之際,基於區塊位置資訊而取得對應處理對象區塊之 編碼模式。 預測畫像產生部1 3,於編碼模式爲預測編碼處理模 式之際,藉由第1畫像預測處理,而產生對應於處理對象 區塊之輸入畫像之預測畫像時所採用之圖框內預測畫像產 -18- (15) (15)200529673 生圖案,亦即預測模式,從後述之9種預測畫像產生圖案 加以選擇,輸出用來選定該預測模式之預測模式資訊。亦 即,此圖框內預測畫像產生圖案(預測模式),解碼側產 生預測畫像之際所需之預測補助資訊。 預測畫像產生部1 3,依照已決定之預測畫像產生圖 案,採用各區塊之畫像中完全編碼、播放並記憶於記憶部 19之播放畫像之其中一部分,產生對應於處理對象區塊 之輸入畫像之預測畫像。另外,有關產生預測畫像時之第 1畫像預測處理詳細內容,將於後敘述。 減法部14係從處理對象區塊之輸入畫像,將該處理 對象區塊之預測畫像,減法於畫素單位,而產生預測殘留 畫像。 轉換部1 5係採用特定轉換規則轉換預測殘留畫像, 並輸出藉由該轉換所取得之轉換係數(轉換資訊)。特定 之轉換規則爲例如4行4列之2維元DCT,及H. 264所 採用之4行4列之正交轉換及量子化。又,特定之轉換規 則例如爲Matching Pursuit、向量量子化及波率轉換等之 轉換操作·量子化亦可。 編碼部1 6係將轉換係數基於特定規則平均訊息量編 碼。又,編碼部16將編碼模式資訊及預測畫像產生圖案 (預測模式),基於特定規則平均訊息量編碼。平均訊息 量編碼例如採用算數編碼。 反轉換部1 7藉由轉換係數以特定反轉換規則反轉換 ,而產生回復預測殘留畫像。此特定之反轉換規則係對應 -19- 200529673 (16) 轉換部1 5所採用之特定轉換規則之反轉換規則。 加法部1 8係加法處理對象區塊之預測畫像與該預測 畫像所對應之回復預測殘留畫像而產生播放畫像。另外加 法部18於畫像之畫素値設定特定範圍之際,爲了將畫素 値限於特定範圍內而進行擷取處理(clipping)亦可。 記憶部1 9係使加法部1 8所產生之播放畫像記億於未 圖示之記億體。 其次,參考圖2及圖3說明有關產生預測畫像時之第 1畫像預測處理。另外,於本實施型態中,第1畫像預測 處理雖爲圖框內預測處理,但於第1畫像預測處理,可適 用例如動作補償預測處理等種種預測處理。 首先,如圖2所示,4x4畫素之處理對象區塊Y之 左斜上方相鄰之區塊設爲區塊X0,同樣地與上側相鄰之 區塊設爲區塊XI,與右斜上方相鄰之區塊設爲區塊X2, 與左側相鄰之區塊設爲區塊X3。又,與區塊X 1上側相鄰 之區塊設爲X4,與區塊X2上側相鄰之區塊設爲區塊X5 ,與區塊X3左側相鄰之區塊設爲區塊X6。又,區塊XI 最下行之播放畫素値,從左依序爲A、B、C、D ’區塊 X2之最下行之播放畫素値,從左依序爲E、F、G、H,區 塊X3最右列之播放畫素値,從上依序爲I、J、K、L。又 ,區塊X0右下角之播放畫素値設爲Μ。再者,將處理對. 象區塊Υ之預測畫像之畫素値,依照光點掃描順序,設 爲 a、b、c、d、e、f、g、h、i、j、k、1、m、η、ο、ρ〇 於此,將參考圖3針對4x4畫素區塊編碼模式之9 -20- 200529673 (17)200529673 (1) IX. Description of the invention [Technical field to which the invention belongs] The present invention relates to an image encoding device, an image encoding method, an image encoding program, an image decoding device, an image decoding method, and an image decoding program. [Prior art] In recent years, due to the popularity of the Internet, it is becoming more and more widespread to send or receive image data via the Internet, or to store image data. Generally speaking, the encoding of portrait data uses a forward encoding method which can effectively reduce the capacity of portrait data. As an example of this forward encoding method, there is an international standard specification H.264 animation encoding method disclosed by ITU-T (for example, refer to ITU-T VCEG (Q.6 / 16), "H. 26L Test Model Long Term Number 8 (TML- 8) draftO "). In the H.264 Internet coding frame (I frame), the animation is compressed by intra frame coding using intra prediction. In the internal frame coding of Η · 264, the frame to be coded is divided into 16x16 image-sized microblocks, and coding processing is performed in each microblock. The microblock is further divided into blocks of 16x8 pixels or 8x8 pixels, and motion compensation prediction is performed on each divided block. This reduces the length of time in the animation. ^ [Summary of the Invention] However, for the above-mentioned animation encoding such as animation encoding or still image encoding, a more efficient encoding technology will be obtained. 200529673 (2) Therefore, the object of the present invention is to provide an image encoding device, an image encoding method, and an image encoding program that can efficiently encode an image, and to provide an image that can be restored by using bits generated by the image encoding device of the present invention. Image decoding device, image decoding method, and image decoding program. One aspect of the present invention relates to an image encoding device including: (a) a plurality of partial fields formed by dividing an input image of an encoding object into a specific size, and determining the first Which of the 1 picture prediction process or the 2 picture prediction process generates a coding mode for predicting a picture, and a means for determining coding mode information for limiting the coding mode, and (b) executes a part of the aforementioned plural areas from The aforementioned encoding mode information is limited to a part of a field in which a predicted image should be generated by the first image prediction process, and the prediction subsidy information for generating the predicted image of the partial field from the already-played image in the other part field is extracted and based on the prediction. 1st image prediction means of the aforementioned first image prediction processing for generating the predicted image by the supplementary information, (c) a memory method of memorizing a playback image based on the foregoing image, and (d) generation of data including information on the encoding mode and the prediction assistance information The encoding method of the bit stream. The image encoding method related to the other aspect of the present invention, wherein the determining means includes: (a) For each of a plurality of partial fields formed by dividing the input image of the encoding object into a specific size, determining the relevant Which of the first image prediction process or the second image prediction process of the predicted image generates a coding mode of the predicted image, and generates a decision step for limiting coding mode information of the coding mode, (b) the first ... portrait pre-6 -200529673 (3) In the above-mentioned plural parts of the measuring means, from the aforementioned coding mode information, a part of the area where the predicted image should be generated by the first image prediction process is extracted, and the already-played image from the other part areas is extracted (1) The first image prediction step of the above-mentioned first image prediction process of generating the predicted portrait based on the predicted assistance information and the first portrait prediction step of the first portrait prediction process based on the prediction assistance information, (C) the memory means memorizing the playback portrait based on the foregoing portrait The memorizing step and (d) encoding means generate information including encoded encoding mode and prediction subsidy Encoding step of bit stream of information. In addition, the image encoding program related to the other side of the present invention uses a computer to function as: (a) For each of the plural fields formed by dividing the input image of the encoding object into a specific size, determine the relevant information through the need to predict the subsidy Which of the first image prediction process generating the predicted image or the second image prediction process generates the encoding mode of the prediction image, and the determination means for generating encoding mode information for limiting the encoding mode, (b) a plurality of partial fields, From the aforementioned coding mode information, a part of the field in which the predicted image should be generated by the first image prediction process is limited, and the playback image that has been generated from other parts of the field is extracted to generate prediction assistance information for the predicted image in that part of the field and based on the Prediction assistance information: The first portrait prediction method of the first portrait prediction process for generating the predicted portrait, (c) a memory method for memorizing a playback image based on the aforementioned portrait, and (d) generation of information including the encoded encoding mode information and the aforementioned prediction assistance. A program that encodes the bit stream of information. In addition, the above-mentioned image encoding program and the image encoding program of the present invention described below will be provided in the form of a computer-readable recording medium, a computer data signal or a program product superimposed on a carrier wave, etc. 200529673 (4). The above second image prediction processing is to set a part of the pixels where no prediction signal is generated as a template, and the generated playback image as a reference area, and select the reference area, and the area most relevant to the template is the copy reference. In the field, pixels that do not generate a prediction signal in the aforementioned template are given a pixel 値 of the corresponding pixels in the reference field, thereby generating a process of predicting an image.画像 Another aspect of the present invention relates to an image decoding device, which includes: (a) a first image prediction that is used to generate a predicted image from the inclusion of a coding area and a plurality of partial areas formed by dividing an image to be decoded into a specific size; Encoding mode information of the image processing or the second image prediction processing, and a bit stream of prediction assistance information that generates a prediction image based on the first image prediction processing, decoding means for decoding the encoding mode information and the prediction assistance information, (b) a complex number In some areas, from the decoding mode information, the prediction image in a certain area in which the prediction image should be generated by the first image prediction process is limited, and from the already played image, the first image is predicted by using the prediction assistance information. In the first image prediction means generated by the processing, (c) a plurality of partial fields, from the decoding mode information, the prediction image in a part of the area in which the predicted image should be generated by the second image prediction processing is limited, and by the second image prediction (D) The second image prediction means generated by the image prediction process, and (d) memorizing the playback image based on the predicted image Memory means; (e) In the second image prediction process, a field in which pixels that do not generate a prediction signal are a part is set as a template, and a playback image stored in the memory means is set as a reference field, and the reference field is selected to be related to the template. The highest field is the field of copy reference 200529673 (5). On the pixels that do not generate prediction signals in the template, the pixels of the corresponding pixels in the reference field are copied to generate the predicted image. A picture decoding method related to another aspect of the present invention includes: (a) a first picture prediction process for encoding a picture to be decoded for each of a plurality of partial fields formed by dividing a picture to be decoded into a specific size; Or decoding mode information of the second picture prediction process, and a bit stream of prediction assistance information of the predicted picture generated by the first picture prediction process, a decoding step to decode the encoding mode information and the prediction assistance information, (b ) And the first image prediction means, in the part of the plurality of fields, from the decoding mode information, the prediction image in a part of the field in which the prediction image should be generated by the first image prediction processing is limited, and the prediction assistance information is used The first image prediction step generated by the first image prediction process and (c) the second image prediction means are limited in a plurality of fields from the aforementioned decoding mode information to restrict the number of prediction images that should be generated by the second image prediction process. The predicted image of a part of the field is the second image generated by the second image prediction process The measurement step, (d) and the memorizing means memorize the memorizing step based on playing the predicted picture; (e) In the second picture prediction process, the area in which pixels that do not generate a prediction signal are part of is set as a template and memorized in the memorizing means The playback image is set as the reference area, and the selected area is the most relevant area of the template. The reference area is the copied reference area. On the pixels in the template that do not generate prediction signals, the corresponding pixels in the copied reference area are given. The picture element 値 'thus produces a predictive portrait. The image decoding program related to the other aspect of the present invention is a computerized function of -9-200529673 (6) as follows: (a) For each part of the complex number formed by dividing the image of the decoding object into a specific size, the limitation is from the included encoding The decoding mode information of the first picture prediction process' or the second picture prediction process for generating a predicted picture, and the bit stream of the prediction assistance information of the predicted picture generated by the first picture prediction process are used to decode the encoding mode information and Decoding means of the prediction assistance information, (b) Among the plurality of areas described above, from the decoding mode information, the prediction image in a certain area in which the prediction image should be generated by the first image prediction process is limited, and the prediction assistance information is used. In the first image prediction means generated by the first image prediction process, (e) a plurality of partial fields, from the decoding mode information, the prediction image in a part of the field in which the predicted image should be generated by the second image prediction process is limited (D) a second image prediction means generated by the second image prediction process, (d) memory based on the predicted image playback Procedures for the memorization of portraits. In this program (e), in the second image prediction process, a field in which pixels that do not generate a prediction signal are a part is set as a template, and a playback image stored in a memory means is set as a reference field, and the reference field and the aforementioned template are selected. The most relevant field is the copy reference field. On the pixels in the template where the aforementioned prediction signal is not generated, the pixels of the corresponding pixels in the aforementioned reference region are applied to generate the predicted image and the computer is functionalized. In addition, the image decoding program described above and the image decoding program of the present invention described below can be provided in the form of a computer-readable recording medium, a computer data signal superimposed on a carrier wave, or a program product. According to the present invention and the second image prediction processing, the generated playback image is set as the reference area, and the pixels on which no prediction signal is generated in the model -10- 200529673 (7) are copied from the reference area selected Copy the corresponding pixels in the reference area. From the reference fields, select the field that is more relevant to the template as the copy reference field. For example, choose the highest related field, or the highest related field compared to a specific benchmark. Therefore, in the decoding end, for some areas that are limited to the areas in which the predicted picture should be generated by the second picture prediction process, the predicted picture can be actively generated without using the prediction assistance information from the encoding side. Therefore, high-efficiency coding can be achieved at the coding end. In the present invention related to image coding, the determining means is preferably to generate a plurality of broadcast images in some fields through a first image prediction process and generate them according to a specific scanning order, and then follow the order opposite to the specific scanning order. Select a part of the processing object, compared to the part of the processing object, the image of the part in the front of the scanning order, compared to the part of the processing object, in the part of the scanning order. Based on the comparison of the predicted image field that should be generated by the first image prediction process, the playback image of that part of the coding mode is set as the reference field, and the second image prediction process is used to generate the playback image of the part of the processing object. Based on the comparison, The playback image of the partial area of the processing target generated by the second image prediction processing and the playback image of the partial area of the processing target generated by the first image prediction processing determine the encoding mode of the partial area of the processing target. In this case, in the present invention related to image decoding, the prediction image is generated by the first image prediction process in accordance with a specific scanning order for a part of the field that is limited from the decoding mode information to the prediction image that should be generated by the first image pre-processing. The second image prediction method is to limit the area where the predicted image should be generated by the second image prediction process from the decoding mode information, after the playback image generated based on the predicted image is stored in the aforementioned -11-200529673 (8) billion means. In some areas, a predicted image is generated by a second image prediction process in accordance with a specific scanning order. According to the present invention, after the first portrait prediction process generates a playback image, the generated playback image is set as a reference area for the second image prediction process. Therefore, the playback image located at $ in the specific scanning order can also be used in the second image prediction process, so the redundant length in the spatial direction can be effectively reduced. In the present invention related to image encoding, the determining means respectively calculates a playback image of a partial area of the processing target generated by the second image prediction processing and a playback image of a partial area of the processing target generated by the first image prediction processing. The cost of the cost function derived from the coding skew or / and the amount of coding data, based on the cost, determines the aforementioned coding mode in some areas of the processing object. In the present invention related to image coding, in a plurality of partial fields, from the aforementioned coding mode information, the predicted image in a certain area in which a predicted image should be generated by the second image prediction processing is limited, and the second image is used to predict The second image prediction means generated by the processing; the second image prediction means sets the predicted image generated by the second image prediction processing as a playback image. At this time, in the present invention related to image decoding, the second image prediction means sets the predicted image generated by the second image prediction processing to play a day image. That is, the predicted image generated by the second image prediction method is still adopted as the broadcast image. Therefore, the playback image generated by the second image prediction process can also be used for prediction in some areas of the next process -12- 200529673 (9), so the redundant length can be reduced. In addition, since the information related to the difference between the input image and the predicted image generated by the second image prediction process need not be included in the bit stream, more efficient encoding can be achieved. In the present invention, the input portrait of the encoding object may also be an animation frame. At this time, in the second image prediction processing, at least one of the playback image of the encoding target frame and the playback image of the frame prior to the encoding target frame is set as a reference area. In this case, in the present invention related to image decoding, the “picture to be decoded is an animated picture frame; the second picture prediction means is stored in the play picture of the aforementioned memory means, and the play picture of the aforementioned picture frame is decoded; and At least one of the playback images of the frame that has priority over the decoding target frame is set as the aforementioned reference area. According to the present invention, in the second portrait prediction processing, both the playback image of the encoding target frame and the playback image of the processed frame different from the encoding target frame are set as reference areas, so the time direction and The length in space. In the present invention related to image coding, the first image prediction process may be a motion compensation prediction process. In this case, the prediction assistance information includes a motion vector extracted by the first image prediction process. In this case, in the present invention related to picture decoding, the prediction assistance information also includes a motion vector used in the first picture prediction process. In the present invention, the first portrait prediction process may also be a process of generating a predicted image by playing an image in the prediction in the same space in a part of the domain of the processing object. That is, the first picture prediction process may be a prediction process used for encoding and decoding of a still picture, or an in-frame prediction process used for encoding and decoding of a movie -13- 200529673 (10). In the first image prediction process, the connected partial fields connected from the encoding mode to the partial fields of the processing target are limited to the case where the partial image of the predicted image should be generated by the second image prediction processing, based on the partial fields that are not related to the processing target. Played portraits of the connected non-connected partial areas produce predicted images of the processed partial area. According to the present invention, a part of the processing target area is a field where a predicted image should be generated by the first image prediction process, and a part of the field connected to the processing object is a field where a predicted image should be generated by the second image prediction process. At that time, it is also possible to use the broadcast image data of non-connected partial areas that are not connected to the partial area of the processing target to generate a predicted portrait. Thereby, not only the playback portraits of the connected partial areas connected to the processing target partial areas, but also the playback portraits of the non-connected partial areas not connected to the processing target partial areas can be used to generate the predicted portraits. Therefore, the reference range when generating predictive image data will be expanded, and the redundant length of space will be reduced, so the encoding efficiency can be further improved. In addition, in the present invention related to portrait coding, in the first portrait prediction process, a prediction mode for predicting a portrait in a part of a field to be processed is determined from a plurality of prediction modes related to a plurality of different prediction rules. It also generates prediction mode information that limits the prediction mode. The encoding means can include the data of the encoded prediction mode information in the bit stream. Here, in the present invention related to portrait decoding, in the case where a bitstream is used to generate a predicted portrait by the first portrait prediction process, the complex prediction mode related to prediction rules with different encoding complex numbers is limited to the first portrait prediction Data of prediction mode information of the processed prediction mode; decoding means decodes prediction mode -14-200529673 (11) type information from the bit stream. In the first portrait prediction process, a prediction portrait is generated based on the prediction mode information. In the present invention, in the first image prediction process, the part of the connection area connecting the processing target areas from the coding mode is limited to a part of the area where the Yuci image should be generated by the second image prediction processing, and the line is located in the prediction direction. It is best to generate the predicted portrait based on the pixel 値 of the pixels in the part of the area closest to the processing target in the playback portrait of the non-connected partial area in the direction of the prediction start. Thereby, from the non-connected blocks, the best playback image data corresponding to the pattern generated by each predicted image is selected. In the present invention related to image encoding, the prediction residual image generation means performs a calculation of the difference between the prediction image generated by the first image prediction method and the input image of the encoding target to generate a prediction residual image; the encoding means bases the encoding on the prediction The information of the signal generated by the residual image may be included in the bit stream. Here, in the present invention related to image decoding, the bit stream includes a signal that encodes a prediction residual image that is generated based on a prediction calculation of a partial image generated by the first image prediction process and a difference calculation between the partial image and the image in the partial field. The generated data; decoding means included in the bit stream data, decoding the signal from the data formed based on the signal generated based on the prediction of the residual image, and decoding the signal; the method of generating the image by addition is based on the decoding by the decoding method. Respond to the signal Predicted residual image and predicted image, to generate a playback image. In the present invention related to image coding, the predicted residual image generation means executes the predicted image generated by executing the first image prediction method, and the encoding target -15- 200529673 ( 12) Calculate the difference between the input images to generate the predicted residual image. The conversion means generates conversion information by performing the conversion process on the predicted residual image. The reverse conversion means generates the predicted residual image by performing the inverse conversion process on the conversion information. Image generation means predicts residual images and predictions by adding It is also possible to measure the image, generate the broadcast image, and the encoding means may include the data of the code conversion information in the bit stream. Here, in the present invention related to image decoding, the bit stream includes prediction residues generated by calculating the difference between the prediction image of the partial field generated by the first image prediction process and the portrait (input image) of the partial field. Data generated by performing conversion processing on the image. Decoding means decodes the conversion information from the bit stream. Inverse conversion means generates a residual prediction image by performing a reverse conversion process on the conversion information. Playing back the image generation means by addition The predicted residual image and the predicted image are returned to generate a playback image. [Embodiment] Hereinafter, the best implementation mode of the present invention will be described in detail with reference to the drawings. In addition, in each drawing, the same or equivalent part will be marked with the same symbol. [First Embodiment] First, a first embodiment of the present invention will be described. Fig. 1 is a block diagram showing a picture encoding device according to a first embodiment. The image encoding device 1 shown in FIG. 1 can be physically a computer provided with, for example, a CPU (Central Processing Unit), a memory device such as a memory, a display device such as a display, and a communication device. The image coding device 1 may be a mobile communication terminal such as a mobile phone or a DVD device. That is, the image encoding device 1 can be widely used as an information processing device. The image encoding device 1 is functionally provided with an image segmentation unit (image segmentation means) 1 1. An encoding mode determination unit (determination means) 1 2. A predicted image generation unit (first image prediction means) 1 3. A subtraction unit (predicted residual image generation) Means) 14. Conversion unit (conversion means) 1 5. Encoding unit (encoding means) 1 6. Anti-conversion unit (anti-conversion means) 1 7. Addition unit (playback image generation means) 1 8 and memory unit (memory means) 1 9. Next, each structural element shown in FIG. 1 is demonstrated. The image segmentation section 11 divides the input image input in the frame unit into blocks of a certain size (for example, 4 X 4 portraits), that is, some areas. In addition, the image segmentation unit U generates block position information for limiting a processing object block that is an object of encoding processing. As the block location information, for example, the blocks in the frame are in the order of raster scanning, and the block numbers of 0, 1, and 2 are numbered from large to small, or a map containing each block is included. The upper left of the box is the block coordinates shown by the coordinates of the datum. The coding mode decision unit 12 determines the coding mode of each block based on a specific coding mode decision rule, and generates coding mode information for limiting the coding mode. ... In this embodiment, in the encoding mode, there is a predictive encoding processing mode (P mode) for encoding the processing target area by using the input image of the processing target block and the predicted image corresponding to the image. 'Without adopting. The input image of the processing target block and the predicted image corresponding to the image, encoding-17- 200529673 (14) Complementary coding processing mode (C mode) of the portrait mode of the processing target block. That is, when the encoding mode is a predictive encoding processing mode, information related to the image of the encoding processing target block is output. On the other hand, when the coding mode is the complement coding processing mode, the image related information of the processing target block is not coded, nor is it output. When the encoding mode is the predictive encoding processing mode, the first portrait prediction processing for generating the prediction assistance information required by the prediction image on the decoding side generates the predicted image, and when the encoding mode is the complement coding processing mode, decoding is performed. 2nd image prediction processing (image complementation processing) without prediction assistance information to generate predicted images. The encoding mode decision rules are generated, for example, by the image complementation processing described later (refer to FIG. 6 and the second image prediction processing). Processing) to generate the playback image of the processing target block, and set the square of the error between the input image of the processing target block and the playback image. The encoding processing mode is also available. In addition, it is not necessary to compare the square of error 値 and critical 値, but also the absolute 値 and critical 値 of error. In addition, other coding mode determination rules may be, for example, that information of a block that is coded in a predictive coding processing mode and a block that is coded in a complement coding mode is preliminarily corresponded to and stored in the block position information. During processing, the coding mode corresponding to the processing target block is obtained based on the block position information. When the encoding mode is the predictive encoding processing mode, the predicted image generation unit 13 generates the predicted image in the frame used for generating the predicted image corresponding to the input image of the processing target block by the first image prediction processing. -18- (15) (15) 200529673 Generate patterns, that is, prediction modes, select patterns from the nine types of prediction portraits described below, and output prediction mode information used to select the prediction mode. That is, the prediction image generation pattern (prediction mode) in this frame, and the prediction assistance information required when the decoding side generates the prediction image. The predicted image generation unit 13 generates a pattern according to the determined predicted image, and uses a part of the playback image that is fully encoded, played, and stored in the memory 19 in the image of each block to generate an input image corresponding to the processing target block. Of predictive portraits. The details of the first image prediction process when a predicted image is generated will be described later. The subtraction unit 14 subtracts the predicted image of the processing target block from the input image of the processing target block by the pixel unit to generate a predicted residual image. The conversion unit 15 converts the predicted residual image using a specific conversion rule, and outputs a conversion coefficient (conversion information) obtained by the conversion. Specific conversion rules are, for example, 2-dimensional element DCT with 4 rows and 4 columns, and orthogonal conversion and quantization with 4 rows and 4 columns used by H.264. The specific conversion rule may be a conversion operation or quantization such as matching pursuit, vector quantization, and wave rate conversion. The encoding unit 16 encodes a conversion coefficient based on a specific rule average message amount. The encoding unit 16 encodes the encoding mode information and the predicted picture generation pattern (prediction mode) based on a specific rule to average the amount of information. The average information amount coding is, for example, arithmetic coding. The inverse conversion unit 17 inversely converts the conversion coefficient with a specific inverse conversion rule to generate a revertive prediction residual image. This specific anti-conversion rule corresponds to the anti-conversion rule of the specific conversion rule adopted by the conversion department 15 (19) 200529673. The adding unit 18 is to add a prediction image corresponding to the block to be processed and a predicted residual image corresponding to the predicted image to generate a playback image. When the adding unit 18 sets a specific range of the picture element 値, the addition unit 18 may perform clipping in order to limit the picture element 内 to a specific range. The memory unit 19 records the playback image generated by the addition unit 18 in billions of records (not shown). Next, the first picture prediction process when a predicted picture is generated will be described with reference to Figs. 2 and 3. In this embodiment, the first image prediction process is an in-frame prediction process, but in the first image prediction process, various prediction processes such as motion compensation prediction process can be applied. First, as shown in FIG. 2, the block adjacent to the upper left of the processing object block Y of 4x4 pixels is set to block X0, and the block adjacent to the upper side is set to block XI. The block adjacent to the top is set to block X2, and the block adjacent to the left is set to block X3. Further, a block adjacent to the upper side of the block X1 is referred to as X4, a block adjacent to the upper side of the block X2 is referred to as a block X5, and a block adjacent to a left side of the block X3 is referred to as a block X6. In addition, the bottommost playback pixel 値 of block XI is A, B, C, D from the left, and the bottommost playback pixel 値 of block X2 is E, F, G, H from the left. The playback pixels 最 in the rightmost column of block X3 are, from the top, I, J, K, and L. In addition, the playback pixel 値 in the lower right corner of block X0 is set to M. Furthermore, the processing of the pixel 値 of the predicted image of the image block Υ is set to a, b, c, d, e, f, g, h, i, j, k, 1 according to the scanning order of the light spots. , M, η, ο, ρ〇 Here, reference will be made to FIG. 3 for the 4x4 pixel block coding mode 9 -20- 200529673 (17)
種預測模式A 0〜A 8加以說明。圖3 ( a )所示之預測模式 A0係將與處理對象區塊上側相鄰之畫素値,於下方直線 延伸,藉此產生預測畫像之模式。於此預測模式A 0中, 基於以下式子產生預測畫像。 a=e=i二m=A b= f=j二 n = B c=g=k=o=C 圖3 ( b )所示之預測模式A1係藉由將相鄰於處理對 象區塊左側之畫素値,直線地延伸而產生預測畫像之模式 。於此預測模式A1中,基於以下式子產生預測畫像。The prediction modes A 0 to A 8 will be described. The prediction mode A0 shown in FIG. 3 (a) is a mode in which a pixel 値 adjacent to the upper side of the processing target block is extended straight below, thereby generating a predicted portrait. In this prediction mode A 0, a prediction portrait is generated based on the following expression. a = e = i = m = A b = f = j = n = B c = g = k = o = C The prediction mode A1 shown in Fig. 3 (b) is obtained by placing adjacent to the left side of the processing object The picture element 値 is a model that extends straight to produce a predicted picture. In this prediction mode A1, a prediction image is generated based on the following expression.
3. — b — c — d -- I e=f=g=h=J i= j = k= 1= K m=n=o=p::=L 圖3 ( c )所示之預測模式A2係採用周邊畫素之平均 値,僅預測處理對象區塊之DC成分之模式。此預測模式 A2中,基於以下規則而產生預測畫像。首先,A〜Μ爲所 有圖框內之播放畫素時,a〜ρ之所有數値設爲(A+B+C + D+ I+ J+ K+L+4) / 8。相對於此,A〜D不屬於圖 框內之播放區塊,而I〜L屬於圖框內之播放區塊之情況 ,a〜p之所有數値設爲(I+J+K+L+2) / 4。又,I〜 L不屬於圖框內之播放區塊,而A〜D屬於圖框內之播放 區塊之情況,a〜ρ之所有數値設爲(A+B+C+D+2) -21 - 200529673 (18) 放區塊之情 鄰於處理對 向直線地延 中,基於以 /4。又,A〜D及I〜L皆不屬於圖框內之播 況,a〜p之所有數値設爲128。 圖3 ( d )所示之預測模式A3係藉由將相 象區塊上側及右斜上方之畫素値,於左斜下方 伸而產生預測畫像之模式。於此預測模式A3 下式子產生預測畫像。 a= (A+2B+C+2) / 4 b 二 e= (B+2C+D+2)/4 c = f = i = (C+2D+E+2) /4 d = = m= (D+2E+F+2) / 4 h= k= n= (E+2F+G+2) / 4 l=o= (F+2G+H+ 2)/4 p = (G+3H+2)/4 鄰於處理對 斜下方直線 A4中,基 圖3 ( e )所示之預測模式A4係藉由將相 象區塊左側、左斜上方及上側之畫素値,於右 地延伸而產生預測畫像之模式。於此預測模式 於以下式子產生預測畫像。 m = (J+2K+L+2) / 4 i= n= (I+2J+K+2) / 4 e = j = o = (M+2I+J+2) / 4 a=f=k=p= (A+2M+I+2) / 4 b= g= 1= (M+2A+B+2) / 4 c= h= (A+2B+C+2)/4 d= (B+2C+D+2) / 4 -22· 200529673 (19) 圖3 ( f )所示之預測模式a5係藉由將相鄰於處理對 象區塊左側、左斜上方及上側之畫素値,於下方右側直線 地延伸而產生預測畫像之模式。於此預測模式A5中,基 於以下式子產生預測畫像。 b = k = c 二 1 = (M + A + 1 ) /2 (A+ B+ 1 ) / 2 (B+ C+ 1 ) /2 d = f = o = (C+ D+ 1 ) / 2 (M+2A+B+2) /4 g = P = (A+2B+C+2) / 4 h = i 二 m = (B+2C+D+2) / 4 (M+ 21+ J+ 2) / 4 (1+ 2J+ K+ 2 ) / 4 圖3 ( g )所示之預測模式A6係藉由將相鄰於處理對 象區塊左側、左斜上方及上側之畫素値,於右側下方直線 地延伸而產生預測畫像之模式。於此預測模式A6中,基 於以下式子產生預測畫像。 a = g = (M + I + 1 ) / 2 b = h = c = (I+2M+A+2) / 4 (M+ 2A+ B+ 2) / 4 d = (A+2B+C+2) / 4 e = k = f= 1 = i = o = (I + J + 1 ) / 2 (M+ 21+ J+ 2 ) / 4 (J + K + 1 ) / 2 -23- 200529673 (20) (I+2J+K+2)-/4 (K + L + 1 ) / 2 η- ( J + 2K + L + 2 ) / 4 圖3 ( h )所示之預測模式A7係藉由將相鄰於處理對 象區塊上側及右斜上方之畫素値,於下方左側直線地延伸 而產生預測畫像之模式。於此預測模式A7中,基於以下 式子產生預測畫像。 a= ( A + B + 1 ) /2 b= i= ( B + C+ 1 ) / 2 c = j- ( C + D+ 1)/2 d= k= ( D+ E+ 1 ) / 2 1 = ( E + F + 1 ) /2 e = (A+2B+C+2) / 4 f= m= ( B + 2C + D + 2 ) / 4 g=n= (C+2D+E+2) / 4 h- 〇= (D+2E+F+2) / 4 p = (E+2F+G+2) / 4 圖3 ( i )所示之預測模式A8係藉由將相鄰於處理對 象區塊左側之畫素値,於右方上側直線地延伸而產生預測 畫像之模式。於此預測模式A8中,基於以下式子產生預 測畫像。 (I+J+1) // 2 b = ( I + 2 J + K + 2 ) / 4 c = e = ( J + K + 1 ) /2 -24- 200529673 (21)3. — b — c — d-I e = f = g = h = J i = j = k = 1 = K m = n = o = p :: = L The prediction mode shown in Figure 3 (c) A2 is a model that uses the average value of surrounding pixels to predict only the DC component of the processing target block. In this prediction mode A2, a prediction image is generated based on the following rules. First, when A ~ M are the playback pixels in all the frames, all the numbers of a ~ ρ are set to (A + B + C + D + I + J + K + L + 4) / 8. In contrast, in the case where A ~ D does not belong to the playback block in the frame, and I ~ L belongs to the playback block in the frame, all the numbers of a ~ p are set to (I + J + K + L + twenty four. In addition, I ~ L does not belong to the playback block in the frame, and A ~ D belongs to the playback block in the frame. All numbers of a ~ ρ are set to (A + B + C + D + 2) -21-200529673 (18) The sentiment of the block is adjacent to the straight line of processing, based on the / 4. In addition, none of A to D and I to L belong to the broadcasting conditions in the frame, and all numbers of a to p are set to 128. The prediction mode A3 shown in Fig. 3 (d) is a mode for generating a predicted portrait by extending the pixels on the upper side of the similar block and the diagonally above the right to the diagonally below and to the left. In this prediction mode A3, a prediction image is generated as follows. a = (A + 2B + C + 2) / 4 b two e = (B + 2C + D + 2) / 4 c = f = i = (C + 2D + E + 2) / 4 d = = m = (D + 2E + F + 2) / 4 h = k = n = (E + 2F + G + 2) / 4 l = o = (F + 2G + H + 2) / 4 p = (G + 3H + 2 ) / 4 In the straight line A4 adjacent to the diagonally below the processing pair, the prediction mode A4 shown in Fig. 3 (e) is based on extending the pixels on the left, diagonally above and above the similar block to the right. A model for generating predictive portraits. In this prediction mode, a prediction image is generated in the following formula. m = (J + 2K + L + 2) / 4 i = n = (I + 2J + K + 2) / 4 e = j = o = (M + 2I + J + 2) / 4 a = f = k = p = (A + 2M + I + 2) / 4 b = g = 1 = (M + 2A + B + 2) / 4 c = h = (A + 2B + C + 2) / 4 d = (B + 2C + D + 2) / 4 -22 · 200529673 (19) The prediction mode a5 shown in Fig. 3 (f) is by arranging the pixels adjacent to the left side, the upper left side and the upper side of the processing target block. A model that stretches straight on the lower right side to produce a predicted image. In this prediction mode A5, a prediction image is generated based on the following formula. b = k = c 2 1 = (M + A + 1) / 2 (A + B + 1) / 2 (B + C + 1) / 2 d = f = o = (C + D + 1) / 2 (M + 2A + B +2) / 4 g = P = (A + 2B + C + 2) / 4 h = i two m = (B + 2C + D + 2) / 4 (M + 21+ J + 2) / 4 (1+ 2J + K + 2) / 4 The prediction mode A6 shown in Fig. 3 (g) is to produce a predictive portrait by extending the pixels adjacent to the left side, the upper left side and the upper side of the processing target block in a straight line to the lower right side. mode. In this prediction mode A6, a prediction image is generated based on the following formula. a = g = (M + I + 1) / 2 b = h = c = (I + 2M + A + 2) / 4 (M + 2A + B + 2) / 4 d = (A + 2B + C + 2) / 4 e = k = f = 1 = i = o = (I + J + 1) / 2 (M + 21+ J + 2) / 4 (J + K + 1) / 2 -23- 200529673 (20) (I + 2J + K + 2)-/ 4 (K + L + 1) / 2 η- (J + 2K + L + 2) / 4 The prediction mode A7 shown in Fig. 3 (h) is based on the The pixels 値 on the upper side of the object block and the upper right obliquely extend in a straight line on the lower left side to generate a model of predicted portraits. In this prediction mode A7, a prediction portrait is generated based on the following formula. a = (A + B + 1) / 2 b = i = (B + C + 1) / 2 c = j- (C + D + 1) / 2 d = k = (D + E + 1) / 2 1 = (E + F + 1) / 2 e = (A + 2B + C + 2) / 4 f = m = (B + 2C + D + 2) / 4 g = n = (C + 2D + E + 2) / 4 h- 〇 = (D + 2E + F + 2) / 4 p = (E + 2F + G + 2) / 4 The prediction mode A8 shown in Fig. 3 (i) is by placing adjacent to the processing target block The picture element on the left is a pattern that extends straight on the upper right side to produce a predicted picture. In this prediction mode A8, a prediction image is generated based on the following formula. (I + J + 1) // 2 b = (I + 2 J + K + 2) / 4 c = e = (J + K + 1) / 2 -24- 200529673 (21)
d = f = (J + 2K + L + 2 ) / 4 g = i = (K + L+ 1 )/2 (K + 3L + 2)/4 k = 1 = m =n = o -p- L 預測畫像產生部:1 3,於上述之各預測模式中,產生 預測畫像之際所採用之播放畫素値即使爲1,亦不選擇圖 框外之預測模式。 於此,於本實施型態中,包含A〜Μ之任一者之區塊 編碼模式爲塡補編碼模式之情況,由於未產生預測畫像, 此際無播放畫素値。因此,於其他區塊產生預測畫像之際 ,無法參考塡補編碼模式之區塊播放畫素値。 於本實施型態中,於此種情況下,預測模式之預測方 向(圖3所示之箭頭方向)之直線上與預測起始側(圖3 所示之箭頭起點側)之方向所存在之同一圖框內之播放畫 素値中,將最接近處理對象區塊之播放畫素値,作爲Α〜 Μ之代替畫素値而用來產生預測畫像。又,預測方向之直 線通過2個晝素中間之情況,該2個畫素之平均畫素値設 爲代替畫素値。 將參考圖4及圖5針對上述代替畫素値加以說明。首 先’圖4爲表示處理對區塊γ上側相鄰之區塊X 1爲塡補 編碼模式,且預灘模式爲Α0之際所決定之代替畫素値圖 。如圖4所示,選擇區塊Χ4最下行之播放畫素値Ν、〇 、Ρ、Q,作爲區塊XI之播放畫素値A、Β、C、D之代替 畫素値。亦即,對播放畫素値A、B、C、D,預測模式 -25- 200529673 (22) A0之預測方向之直線上,位於預測起始側之同一圖框內 之播放畫素値中,選擇最接近處理對象區塊Y之播放畫 素値之播放畫素値>^、0、?、(5。因此,產生圖4所示之 處理對象區塊Y預測畫像之際,將採用N、0、P、Q來 取代上述預測模式A0之式子中 A、B、C、D。另外,區 塊X4爲圖框外或塡補編碼模式之情況,A、B、C、D設 爲圖框外。亦即,預測模式將不選擇A0。 其次,圖5爲表示處理對區塊Y上側相鄰之區塊XI 爲塡補編碼模式,且預測模式爲A7之際所決定之代替畫 素値圖。如圖5所示,選擇區塊X4最下行之2個播放畫 素値N、Ο及區塊X2最左列之2個播放畫素値P、Q,作 爲區塊X1之播放畫素値A、B、C、D之代替畫素値候補 。而且,選擇N作爲A之代替値,選擇Ο作爲B之替代 値,選擇P作爲D之代替値,並採用Ο與P之平均値作 爲C之代替値。採用Ο與P之平均値作爲C之代替値, 係由於預測方向之直線通過2個畫素Ο與P中間(位於 區塊X5左下角之畫素上)。亦即,對播放畫素値A、B 、C、D,預測模式A7之預測方向之直線上,且位於預測 起始側方向之同一圖框內之播放畫素値中,選擇最接近處 理對象區塊Y之播放畫素値之播放畫素値N、Ο、( 〇+ p )/ 2、Q。因此,產生圖5所示之處理對象區塊γ之預 測畫像之際,將採用N、Ο、( 〇 + P ) / 2、Q來取代上 述預測模式A7之式子中A、B、C、D。另外,以2進制 演算2個畫素値之平均値之情況’加法2個畫素値,此加 -26- 200529673 (23) 法結果加上1之後,1位元往右移位亦可。 如此一來,藉由決定代替畫素値,可從非相鄰之區塊 中,選出對應各預測模式之最佳播放畫素。 其次,參考圖6,並針對上述編碼模式決定規則中所 進行之塡補畫像產生時之畫像塡補處理(第2之畫像預測 處理),加以說明。 本實施型態之畫像塡補處理中,如圖6所示,處理對 象區塊Y所包含之一畫素,設爲處理對象畫素P。將包含 處理對象畫素P,與位於處理對象畫素P附近之播放畫像 之畫素(播放畫素)之領域,設爲模板T( template )。 另外,於該處理對象區塊 Y上存在完成畫像塡補處理之 畫素(塡補畫素)之情況,可將該完成畫像塡補處理之畫 素包含於模板T。又,處理對象區塊Y及該處理對象區塊 Y之周圍領域設爲對象領域R。d = f = (J + 2K + L + 2) / 4 g = i = (K + L + 1) / 2 (K + 3L + 2) / 4 k = 1 = m = n = o -p- L prediction Image generation unit: 1 3. In each of the above prediction modes, even if the playback pixel 値 used when generating the prediction image is 1, the prediction mode outside the frame is not selected. Here, in this embodiment, if the block encoding mode of any of A to M is the complement coding mode, no predictive image is generated, and no pixels are played at this time. Therefore, when predictive portraits are generated in other blocks, it is not possible to refer to the block to play pixels in the complementary coding mode. In this embodiment, in this case, the line of the prediction direction of the prediction mode (the direction of the arrow shown in FIG. 3) and the direction of the prediction start side (the direction of the start of the arrow shown in FIG. 3) exist. Among the playback pixels in the same picture frame, the playback pixels that are closest to the processing target block are used as A to M instead of the pixel to generate a predicted image. When the straight line of the prediction direction passes between two day pixels, the average pixel 値 of the two pixels is set to replace the pixel 代替. The above-mentioned alternative pixel 値 will be described with reference to FIGS. 4 and 5. First, FIG. 4 is a diagram showing a process of replacing pixels determined when the block X 1 adjacent to the upper side of the block γ is a complement coding mode and the pre-tank mode is A0. As shown in FIG. 4, the playback pixels 播放 N, 0, P, and Q at the bottom of the block X4 are selected as the substitute pixels 値 of the playback pixels 値 A, B, C, and D of the block XI. That is, for the playback pixels 値 A, B, C, and D, on the straight line of the prediction direction of the prediction mode-25- 200529673 (22) A0, in the playback pixels 位于 located in the same frame as the prediction start side, Select the playback pixel 接近 that is closest to the processing target block Y > ^, 0,? , (5. Therefore, when the predicted image of the processing target block Y shown in FIG. 4 is generated, N, 0, P, and Q will be used to replace A, B, C, and D in the above-mentioned prediction mode A0. In addition, The block X4 is outside the frame or the complement coding mode, and A, B, C, and D are set outside the frame. That is, the prediction mode will not select A0. Second, Figure 5 shows the processing for block Y. The block XI adjacent to the upper side is a complement coding mode, and the prediction mode is A7 instead of the determined pixel 値 map. As shown in FIG. 5, the two bottom pixels 値 N, 〇 and the leftmost two playback pixels 区块 P, Q of block X2 are used as alternatives to the playback pixels 値 A, B, C, and D of block X1. Furthermore, N is selected instead of A値, choose 0 as a substitute for B, choose P as a substitute for D, and use the average Ο of P and P as a substitute for C. Use the average Ο of P and P as a substitute for C, because of the prediction direction. A straight line passes between the two pixels 0 and P (located on the pixel in the lower left corner of block X5). That is, the prediction method of the playback pixels 値 A, B, C, and D and the prediction mode A7 Among the playback pixels 直线 on the straight line and located in the same frame of the prediction start side, select the playback pixels 値 N, 〇, (〇 + p) that are closest to the playback pixels 値 of the processing target block Y. ) / 2, Q. Therefore, when the predicted portrait of the processing target block γ shown in FIG. 5 is generated, N, 0, (〇 + P) / 2, Q will be used to replace the above-mentioned prediction mode A7. A, B, C, D. In addition, when the average value of two pixel values is calculated in binary, 'add 2 pixel values, and then add -26- 200529673 (23) After adding 1 to the result of the method, 1 Bits can also be shifted to the right. In this way, by deciding to replace pixel 値, the best playback pixel corresponding to each prediction mode can be selected from non-adjacent blocks. Second, referring to FIG. 6, and A description will be given of the image complementation processing (second image prediction processing) performed when the supplementary portrait is generated in the above-mentioned coding mode determination rule. In the image complementation processing of this embodiment, as shown in FIG. One pixel contained in the target block Y is set as the processing target pixel P. The processing target pixel P and The area in which the picture pixels (playing pixels) of the picture are played near the object pixel P is set as a template T (template). In addition, there are picture pixels (pictures) in the picture Y which have been subjected to the picture complementing process. In the case of a picture element, the picture element that has been subjected to the image complementation process may be included in the template T. In addition, the process target block Y and the surrounding area of the process target block Y are set as the target area R.
首先,基於特定掃瞄規則掃瞄處理對象區塊 Y內, 藉此從包含於處理對象區塊Y之複數畫素,選定處理對 象畫素P。其次,基於選定之處理對象畫素P決定模板T 。接著’於對象領域P內,與模板T具有相同形狀之領域 中,選擇與從模板T去除處理對象畫素P部分之畫素相關 最大之相關領域S。其次,相關領域S中對應處理對象畫 素P之播放畫素Q之畫素値,設爲處理對象畫素P之塡 補畫素値。將與以上處理相同之處理,對包含於處理對象 區塊Y之各畫素,依掃瞄順序進行。藉此產生對應於處 理對象區塊Y之塡補畫像。於此,選擇上述相關領域S -27- 200529673 (24) 時之相關之演算方法,例如爲對應之各畫素値間之差量平 方爲最小者設爲相關最大之方法,或對應之各畫素値之差 量之絕對値總合爲最小,設爲最大相關之方法亦可,其他 任何方法皆可測量相關關係之方法亦可適用。另外,編碼 對象畫像爲動畫之情況,藉由採用已解碼之圖框之解碼畫 素及塡補畫像作爲對象領域R,而可更有效率進行塡補畫 其次,參考圖7,針對畫像編碼處理之畫像編碼裝置 1之動作加以說明。此畫像編碼處理,係從一圖框依照特 定之掃瞄順序(例如光點掃描),於所讀取之區塊單位進 行。 首先,畫像分割部11,將輸入於圖框單位之輸入畫 像分割成特定大小(例如4 X 4畫素)之區塊,並產生用 來限定各處理對象區塊之區塊位置資訊(步驟S1)。 其次,編碼模式決定部12,決定基於特定編碼模式 決定規則,編碼處理對象區塊之畫像時之編碼模式,爲預 測編碼處理模式(P模式)或塡補編碼模式(C模式)之 任一者,並輸出用來限定該編碼模式之編碼模式資訊(步 驟S2)。此區塊編碼模式資訊輸出於畫像分割部11、預 測畫像產生部1 3及編碼部1 6。 接著,預測畫像產生部1 3,係判斷藉由編碼模式決 定部12來決定之處理對象區塊之編碼模式,是否爲預測 編碼處理模式(步驟S3 ) 9若判斷爲否定之情況(步驟 S3 ; NO ),爲了進行其次之處理對象區塊之畫像編碼處 -28- 200529673 (25) •理,而處理移至步驟Sll。 另一方面,步驟S 3之判斷中,判斷處理對象區塊之 編碼模式爲預測編碼處理模式之情況(步驟S3 ; YES ), 預測畫像產生部1 3決定預測模式,並依照此決定之預測 模式,採用已編碼並記憶於記憶部1 9之播放畫像之其中 一部分,產生對應於處理對象區塊之畫像之預測畫像(步 驟S4 )。亦即,預測畫像產生部13藉由實施上述第1畫 像預測處理,並基於連接於處理對象區塊之連接區塊,及 未連接於處理對象區塊之非連接區塊之播放畫像,產生預 ••測畫像。此預測畫像係輸出於減法部1 4及加法部1 8。 其次,減法部14係從處理對象區塊之畫像(輸入畫 像),於畫素單位減法對應於該處理對象區塊之畫像之預 測畫像,產生預測殘留畫像(步驟S5 )。此預測殘留畫 像輸出於轉換部1 5 〇 再者,轉換部1 5係以特定之轉換規則,轉換減法部 1 4所產生之預測殘留畫像,算出藉由該轉換所取得之轉 換係數·(轉換資訊)(步驟S6 )。此轉換係數輸出於編 碼部1 6及反轉換部1 7。 ☆ 接著,編碼部16基於特定規則,平均訊息量編碼藉 由轉換部15所算出之轉換係數(步驟S7)。又,編碼部 1 6基於特定規則,平均訊息量編碼步驟S2中決定之編碼 模式資訊,同時,基於特定規則,平均訊息量編碼步驟 S4中所選擇之預測畫像產生圖案。平均訊息量編碼此等 之編碼資料,製成壓縮資料(位元流bit stream)而輸出 -29- 200529673 (26) 於位於外部之畫像解碼裝置。· 其次’反轉換部1 7,係採用對應於轉換部1 5所採用 之特定轉換規則之反轉換規則,反轉換轉換部1 5所算出 之轉換係數,產生回復預測殘留畫像(步驟S8 )。此回 復預測殘留畫像輸出於加法部1 8。 再者,加法部1 8加法預測畫像產生部1 3所產生之預 測畫像,和反轉換部1 7所產生之回復預測殘留畫像,而· 產生播放畫像(步驟S9 )。此播放畫像係藉由記憶部19 而收納於記憶體並儲存(步驟S 1 0 )。 接著,對所有區塊判斷處理是否結束(步驟S1 1 ), 所有區塊結束之情況下·(步、驟S 1 1 ; YES ),結束畫像編 碼處理。另一方面,所有區塊未結束之情況下(步驟S11 ;NO ),處理移至步驟S2。 其次,針對本發明相關之畫像編碼程式,及記錄該畫 像編碼程式之電腦可讀取之紀錄媒體(以下簡稱紀錄媒體 ),加以說明。於此·所述之紀錄媒體,係對於電腦之硬體 資源所具備之讀取裝置,因應於程式之記述內容,引起磁 氣、光、電氣等能源變化狀態,以對應此之信號形式,可 將程式之記述內容傳達於讀取裝置。作爲相關之紀錄媒體 ,例如爲磁片、光碟、CD - ROM及電腦內建之記億體等 〇 ’ 圖8爲表示第1實施型態相關之紀錄媒體之構造圖。 紀錄媒體1 〇〇如圖8所示,具備記錄程式之程式領域1 〇 1 。於此程式領域1 〇 1記錄畫像編碼程式1 02。 -30- 200529673 (27) 圖14爲表示用來執行記錄於紀錄媒體之程式之電腦 硬體構造圖,圖15爲用來執行記錄於紀錄媒體之程式之 電腦斜視圖。如圖1 5所示,電腦1 1 〇具備軟式磁碟驅動 裝置、CD-ROM驅動裝置及dvd驅動裝置等之讀取裝置 1 1 2,和通常存在作業系統之作業用記憶體(ram ) 1 1 4, 和記憶紀錄媒體1 〇 〇所記憶之程式之記憶體1 1 6,和顯示 器等之顯示裝置118,和輸入裝置之滑鼠120及鍵盤122 ,和進行接收與傳送資料等之通信裝置124,和控制執行 程式之CPU126。 紀錄媒體1〇〇若插入讀取裝置1 12,電腦1 10將可從 讀取裝置112存取存入紀錄媒體1〇〇之畫像編碼程式1〇2 ’並可藉由該畫像編碼程式102,設爲畫像編碼裝置1進 行動作。 如圖1 5’所示,畫像編碼程式1 〇 2亦可作爲重疊於載 波之電腦資料信號1 3 0,經由網路而提供。此際,電腦 11〇可將藉由通信裝置124所接收之畫像編碼程式1〇2存 入記憶體1 16,並執行畫像編碼程式102。 畫像編碼程式102係具備畫像分割模組l〇2a、編碼 模式決定模組102b、預測畫像產生模組l〇2c、減法糢組 102d、轉換模組l〇2e、編碼模組102f、反轉換模組i〇2g 、加法模組102h及記憶模組102i所構成。於此,藉由使 畫像分割模組1 02a、.編碼模式決定模組1 02b、預測畫像 產生模組102c、減法模組10別、轉換模組l〇2e、編碼模 組102f、反轉換模組102g、加法模組l〇2h及記憶模組 -31 - 200529673 (28) l〇2i各自動作所實現之功能’和上述畫像編碼裝置1之畫 像分割部1 1、編碼模式決定部1 2、預測畫像產生部1 3、 減法部14、轉換部15、編碼部16、反轉換部17、加法部 1 8及記憶部1 9各自具有之功能相同。 若藉由第1實施型態之畫像編碼裝置」,關於編碼模 式爲塡補編碼模式之領域,由於不必將基於預測補助資訊 所產生之資料,包含於位元流,故產生編碼效率高之位元 流。 又^預測畫像產生部13,與處理對象區塊連·接之連 接區塊之編碼模式爲塡補編碼模式時,可採用未與處理對 象區塊連接之非連接區塊之播放畫像,產生預測畫像。藉 此,由於不僅係與處理對象區塊連接之連接區塊之播放畫 像,亦可採用未與處理對象區塊連接之非連接區塊之播放 畫像產生畫像,故產生預測畫像時之參考範圍擴大,並可 減少空間上之冗長度,同時更可提商編碼效率。又,藉由 更有效地限定塡補編碼模式之畫像,而產生預測畫像時之 參考範圍將更效地擴大,並減少空間上之冗長度。< 〔第2實施型態〕 其次,針對本發明之第2實施型態加以說明。此畫像 解碼裝置係接收第1實施型態之畫像編碼裝置所輸出之壓 縮資料(包含編碼資料 >、亦即位元流,並將接收之位元 流加以解碼後產生播放畫像資料。 圖9爲表示第2實施型態相關之畫像解碼裝置之構造 -32- (29) (29)200529673 圖。圖9所示之畫像解碼裝置2,物理上可設爲例如具備 CPU (中央處理裝置)、記憶體等記憶裝置、顯示器等顯 示裝置、通信裝置之電腦。又,畫像解碼裝置2亦可爲攜 帶電話等移動通信終端、DVD機器。亦即,畫像解碼裝 置2可廣泛適用能做資訊處理之裝置。 圖9所示之畫像解碼裝置2具有解碼部(解碼手段) 2 1、編碼模式判斷部2 2 ·、預測畫像產生部(第1之畫像 預測手段)23、反轉換部(反轉換手段)24、加法部(播 放畫像產生手段)25、記憶部(記憶手段)26、切換開關 27及塡補畫像產生部(第2畫像預測手段)28。 其次,針對圖9所示之各構造要素加以說明。解碼部 21係接收分割成特定大小之區塊之解碼處理對象之輸入 畫像柑關之入畫像資訊(壓縮資料)。解碼部21係基於 特定規則平均訊息量解碼接收之輸入畫像資訊。藉由此平 均訊息量解碼,解碼轉換係數、編碼模式資訊及預測模式 資訊。此等轉換係數、編碼模式資訊及預測模式資訊,由 於和說明有關畫像編碼裝置1之差量畫像資料之轉換係數 、編碼模式資訊及預測模式資訊相同,故省略說明。 編碼判斷部22依照特定之掃瞄順序(例如光點掃瞄 順序),從所輸入之編碼模式資訊,判斷編碼模式爲預測 編碼處理模式或塡補編碼模式之任一者。 於此藉由編碼判斷部22之判斷結果所進行處理,係 因圖框內之掃瞄爲第1回或第2回而相異。具體而言,圖 框內之掃瞄爲第1回之際,判斷編碼模式爲預測編碼處理 -33- 200529673 (30) 模式之情況,對處理對象區塊進行包含上述第1畫像預測 處理之預測畫像解碼處理;判斷編碼模式爲塡補編碼模式 之情況,讀取下一個區塊。另一方面,圖框內之掃瞄爲第 2回之際,判斷編碼模式爲塡補編碼模式之情況,對處理 對象區塊進行包含上述畫像塡補處理之塡補畫像解碼處理 ;判斷編碼模式爲預測編碼處理模式之情況,讀取下一個 區塊。亦即,於第1回僅對預測編碼處理模式之處理對象 區塊,進行包含畫像預測處理之預測畫像解碼處理,於第 1回僅對塡補編碼處理模式之處理對象區塊,進行包含畫 像塡補處理之塡補畫像解碼處理。 預測畫像產生部23,依照以已解碼之預測模式資訊 所限定之預測模式,各區塊之畫像中完全解碼,採用記億 部26所記億之播放畫像其中一部分,產生解碼處理對象 之處理對象區塊之預測畫像。用來產生此預測畫像之畫像 預測處理,由於和上述第1畫像預測處理(參考圖2、圖 3 ),故省略說明。 反轉換部24對已解碼之轉換係數係採用對應於上述 轉換部1 5所採用之特定轉換規則之反轉換規則而加以反 轉換,並產生藉由該反轉換所取得之回復預測殘留畫像。 加法部25係加法預測畫像和對應該預測畫像之回復 預測殘留畫像,而產生播放畫像。另外,加法部25於畫 像之畫素値設定特定範圍之情況,亦可將畫素値限於特定 範圍內而進行擷取處理(clipping)。 記憶體26係將加法部25所產生之播放畫像記憶於未 -34- 200529673 (31) 圖示之記憶體。 切換開關27係因應於處理對象區塊之編碼模式,切 換記憶於記憶部26之播放畫像之傳送處。亦即,切換開 關2 7係於編碼模式爲預測編碼處理模式之情況,爲了可 將儲存於記憶部26之播放畫像傳送於預測畫像產生部23 ,而切換開關。另一方面,編碼模式爲塡補編碼處理模式 之情況,爲了可將儲存於記憶部26之播放畫像傳送於塡 補畫像產生部28,而切換開關。 .塡補畫像產生部28係採用處理對象區塊附近已解碼 •之播放畫像,產生塡補畫像。於此,產生塡補畫像時之畫 像塡補處理,由於和上述畫像塡補處理(參考圖6,第2 畫像預測處理)相同,故省略說明。 其次,參考圖10〜圖12,說明有關畫像解碼裝置2 之動作及畫像解碼處理。首先,參考圖1〇,針對畫像解 碼處理之動作槪略加以說明。如圖1 〇所示,畫像解碼處 理中,首先,藉由解碼部21,從第1實施型態之畫像編 碼裝置1接收之1圖框部分之輸入售像資訊”基於特定規 則平均訊息量解碼,產生轉換係數、編碼模式資訊及預測 模式資訊(步驟S20)。 其次,執行第1回之圖框內掃瞄中所進行之·預測畫像 解碼處理(步驟S30),接著,執行第2回之圖框內掃猫 中所進行之塡補畫像解碼處理(步驟S40 )。 以下,於各處理中詳細說明預測畫像解碼處理(步驟 S30 )及塡補畫像解碼處理(步驟S40 )之各動作。 -35- 200529673 (32) 首先,參考圖1 1,針對預測畫像解 作加以說明。首先,編碼判斷部22依照 例如光點掃瞄順序),判斷已輸入之編碼 碼模式,是否爲預測編碼處理模式(步驟 爲NO之情況(步驟S3 1 ; NO),處理移 〇 另一方面,步驟S3 1之判斷中,判斷 編碼處理模式之情況,(步驟31 ; YES ) 部23依照上述步驟S20 (參考圖10)中 資訊所限定之預測模式,採用各區塊之畫 記憶於記憶部26之播放畫像其中一部分 區塊之預測畫像(步驟S32 )。再者,產 方法係根據上述第1畫像預測處理。又, 於加法部25。 其次,反轉換部24係相對於上述步 10)中解碼之轉換係數,採用對應於上述 採用之特定轉換規則之反轉換規則,加以 藉由該反轉換所取得之回復預測殘留畫像 此回復預測殘留畫像係輸出於加法部25。 其次,加法部25係加法預測畫像產与 預測畫像,和反轉換24所反轉換之回復 而產生播放畫像。此播放畫像係藉由記憶 憶體並儲存(步驟S35 )。 接著,對所有區塊判斷處理是否結束 碼處理之詳細動 特定掃瞄順序(· 資訊所限定之編 S 3 1 )。此判斷 置後述步驟S 3 6 編碼模式爲預測 ,預測畫像產生 解碼之預測模式 像中完全解碼並 ,產生處理對象 生此預測畫像之 此預測畫像輸出: 驟 S20 (參考圖 轉換部1 5中所 反轉換,並產生 (步驟 S 3 3 )。 三部23所產生之 預測殘留畫像., 部2 6收納於記 (步驟S36), -36- 200529673 (33) 所有區塊結束之情況下(步驟S3 6 ; YES ),結束預測畫 像解碼處理。另一方面,所有區塊未結束之情況下(步驟 S36 ; NO ),處理移置上述步驟S31。 參考圖12,針對塡補畫像解碼處理(圖10之步驟 S40 )之詳細動作加以說明。首先,編碼判斷部22依照特 定掃猫順序(例如光點掃瞄順序),判斷已輸入之編碼資 訊所限定之編碼模式,是否爲塡補編碼模式(步驟S4 1 ) 。此判斷爲NO之情況(步驟S41 ; NO ),處理移至後述 步驟S44。 另一方面,步驟S41之判斷中,判斷編碼模式爲塡補 編碼模式之情況,(步驟41 ; YES ),塡補畫像產生部 28,於各包含於處理對象區塊之處理對象畫素,從位於各 處理對象畫素周圍之播放畫像,取得相關關係最大之播放 畫素値,演算塡補畫素値,藉此產生對應於處理對象區塊 之塡補畫像(步驟S42 )。再者,產生此塡補畫像之方法 係根據上述畫像塡補處理(第2畫像預測處理)。 其次,塡補畫像產生部2 8所產生之塡補畫像,作爲 播放畫像,並藉由記憶部26收納於記憶體並儲存(步驟 543 ) 〇 接著,對所有區塊判斷處理是否結束(步驟S44 ), 所有區塊結束之情況下(步驟S44 ; YES ),結束塡補畫 像解碼處理。另一方面,所有區塊未結束之情況下(步驟 544 ; NO),處理移至上述步驟S4 1。 圖13爲表示第2實施型態相關之紀錄媒體之構造圖 -37- 200529673 (34) 。紀錄媒體100如圖13所示,具備記錄程式之程式領域 201。於此程式領域201記錄畫像解碼程式202 ° 紀錄媒體100若插入讀取裝置112,電腦110 (參考 圖14及圖15)將可從讀取裝置112存取存入紀錄媒體 100之畫像解碼程式202,並可藉由該畫像解碼程式202 ,設爲畫像解碼裝置2進行動作。 如圖15所示,畫像解碼程式202亦可作爲重疊於載 波之電腦資料信號1 3 0,經由網路而提供。此際,電腦 110可將藉由通信裝置124所;接收之畫像解碼程式202存 入記憶體116,並執行畫像解碼程式202。 畫像解碼程式202係具備解碼模組202a、編碼模式 判斷模組202b、預測畫像產生模組202c、反轉換模組 202d、加法模組202e、記憶模組202f、切換開關模組 2〇2g及塡補畫像產生模組202h所構成。於此,藉由使解 碼模組202a、編碼模式判斷模組202b、預測畫像產生模 組202c、反轉換模組202d、加法模組202e、記憶模組 2〇2f、切換開關模組202g及塡補畫像產生模組202h各自 動作所實現之功能,和上述畫像解碼裝置2之解碼部2 1 、解碼模式判斷部22、預測畫像產生部23、反轉換部24 、加法部2 5、記憶部1 6、切換開關2 7、塡補畫像產生部 28各自具有之功能相同幻 若藉由第1實施型態之畫像解碼裝置2,可有效解碼 以畫像編碼裝置1有效編碼之畫像。亦即,預測畫像產生 部23,與處理對象區塊連接之連接區塊之編碼模式爲塡 -38- 200529673 (35) 補編碼模式時,可採用未與處理對象區塊連接之非連接區 塊之播放畫像,產生預測畫像。藉此,由於不僅係與處理 對象區塊連接之連接區塊之播放畫像,亦可採用未與處理 對象區塊連接之非連接區塊之播放畫像產生畫像,故產生 預測畫像時之參考範圍擴大,並可減少空間上之冗長。 又,判斷編碼模式爲塡補編碼模式之情況,可採用完 全解碼之播放畫像,使之產生塡補該播放畫像之塡補畫像 。因此,即使編碼之際不傳送塡補編碼模式之畫像,亦可 使之產生播放畫像。 另外,於上述各實施型態中,雖已說明有關採用圖框 內編碼處理,作爲預測畫像產生部1 3、23之畫像預測, 但並不侷限於此,例如亦可將動作補償預測包含於畫像預 測。此情況下,亦可平均訊息量編碼移動向量資訊。又, 作爲此動作補償予測,可採用與傳統以來所採用之 MPEG-4或H· 264之動作補償預測相同之手段。又,其他 適用各種動作補償預測手段亦可。 又,於上述各實施型態中,所採用H. 264中所使用 之空間領域之預測,作爲圖框內預測,但圖框內預測並不 限於此。例如亦可適用MPEG-4所進行之頻率領域之預測 〇 於此際,上面或左邊連接之區塊編碼或已解碼之情況 ,係採用連接之區塊轉換係數之全部或其中一部分,作爲 該編碼或解碼對象區塊之轉換係數預測値。上面及左邊連 接之區塊同時爲編碼或已解碼之情況,顯示採用上面及左 -39- 200529673 (36) 邊連接之區塊中,哪個區塊轉換係數之全部或其中一部分 作爲預測値之1位元資料,設爲預測模式資訊加以編碼。 又,上面或左邊連接之區塊中任一者爲編碼或已解碼之情 況,採用該編碼或已解碼區塊之正交轉換係數之全部或其 中一部分,作爲預測値。 另一方面,上面或左邊連接之區塊任一者編碼或解碼 未結束之情況,係採用位於最靠近該區塊上方或左方之距 離之編碼或已解碼之區塊之正交轉換係數全部或其中一部 分,、作爲預測値。然而,位於最靠近上方及左方距離之編 碼或已解碼之區塊,位於亦與上方及左方相同距離之情況 ,位於上方及左方之區塊中,顯示採用哪個區塊之轉換係 數全部或其中一部分作爲預測値之1位元資料,設爲預測 模式資訊加以編碼。又,位於編碼或解碼對象區塊之上方 及左方之所有區塊爲編碼或未完成解碼之情況,僅DC成 分設爲設定値(例如1 28 )進行預測。 又,於上述各實施型態中,亦可藉由圖框內預測將預 測値設爲0,不進行圖框內預測而使之動作。此情況下, 由於藉由導入畫像塡補模式而削減空間之冗長度,故亦可 提局編碼效率。 又,於上述各實施型態中,畫像塡補處理中雖採用處 理對象之圖框相同空間內之播放畫像,產生預測畫像,但 亦可於與該處理對象圖框相異之圖框中,採用結束產生播 放畫像之圖框之播放畫像於畫像塡補處理。 又,於上述第1實施型態中,畫像塡補處理所產生之 •40- 200529673 (37) 預測畫像依舊採用爲播放畫像,但於編碼方面,該預測畫 像與輸入畫像之預測殘留畫像,亦可進行上述之轉換處理 及平均訊息量編碼,並包含於位元流。此情況下,解碼方 面,藉由解碼及反轉換處理位元流之資料,而產生回復預 測殘留畫像,並藉由加法該回復預測殘留畫像,和畫像塡 補處理所產生之預測畫像,而產生播放畫像。 〔第3實施型態〕 以下,針對本發明之第3實施型態加以說明。圖16 •每表示本發明第3實施型態相關之動畫編碼裝置之構造圖 。圖1 6所示之動畫編碼裝置3 1 0,物理上可設爲例如具 備CPU (中央處理裝置)、記憶體等記憶裝置、顯示器等 顯示裝置、通信裝置之電腦。又,動畫編碼裝置310亦可 爲攜帶電話等移動通信終端、DVD裝置。亦即,畫像編 碼裝置310可廣泛適用能做資訊處理之裝置。 動畫編碼裝置310功能上具有領域分割部312、編碼 模式決定部(決定手段)3 1 4、畫像預測部3 1 6、減法部 318、轉換部(轉換手段)320、編碼部(編碼手段)322 、反轉換部(反轉換手段)3 24、加法部(播放畫像產生 手段)3 2 6及畫像記憶部(記憶手段)3 2 8。 領域分割部312係依序將輸入影像(動畫)之各圖框 ’設爲編碼對象圖框,將編碼對象圖框,分割成特定大小 之複數部分領域(以下稱爲微區塊)。特定大小可爲例如 1 6x 1 6畫素之大小,但不限於此,亦可爲其他大小。 -41 - (38) (38)200529673 領域分割部312又產生用來限定微區塊之微區塊位置 資訊。微區塊位置資訊例如可於圖框內之各微區塊採用依 照光點掃瞄順序,由大到小標記之整數號碼。 又,微區塊位置資訊可依光點掃瞄順序,採用位於微 區塊前端之畫素座標。 編碼模式決定部3 14係取得各微區塊之編碼模式,並 將限定該編碼模式之編碼模式資訊,輸出於畫像預測部 3 16及編碼部322。於本實施型態中,此編碼模式資訊係 用來限定藉由第1畫像預測處理或第2畫像預測處理,應 產生微區塊之預測畫像之資訊。以下,將第1畫像預測處 理設爲動作補償預測,說明本實施型態。又,以下於本說 明書中,應以第1畫像預測處理處理微區塊時之編碼模式 設爲P模式,應以第2畫像預測處理處理微區塊時之編碼 模式設爲C模式。另外,第1畫像預測處理例如可採用周 知之網際網路圖框預測等之處理。有關第1畫像預測處理 及第2畫像預測處理之詳情,將於後敘述。 畫像預測部3 1 6係基於編碼模式決定部3 1 4所輸出之 編碼模式資訊,採用第1畫像預測處理或第2畫像預測處 理之其中一方,而產生處理對象之微區塊之預測畫像。畫 像預測部3 1 6以第1畫像預測處理來處理微區塊之情況, 將預測補助資訊之移動向量輸出於編碼部322。有關畫像 預測部316之詳情將於後敘述。 丨 減法部3 1 8係進行畫像預測部3 1 6所產生之處理對象 之微區塊之預測畫像,和從領域分割部3 1 2輸出之處理對 -42- 200529673 (39) 象微區塊之輸入畫像之差演算,而產生預測殘留畫像。 轉換部320轉換預測殘留畫像而產生轉換資訊。此轉 換例如可採用 DCT ( Discrete Cosine Transform )等之轉 換處理與反量子化處理。此際,轉換資訊包含量子化係數 組。DCT可採用4行4列之2維元DCT,或8行8歹ij之2 維元DCT。另外,此轉換可採用H· 2 64所使用之4行4 列之整數直行轉換及量子化、MP法(Matiching Pursuit )、或者向量量子化及波率轉換(Wavelet Transform )等 任意轉換處理·量子化處理。 編碼部3 22係採甩平均訊息量編碼來自領域分割部 312之微區塊位置資訊,和來自編碼模式決定部314之編 碼模式資訊,和來自畫像預測部3 1 6之移動向量,及來自 轉換部320之轉換資訊等之編碼處理加以編碼,並將編碼 結果包含於位元流而輸出。 反轉換部324係藉由反轉換來自轉換部320之轉換資 訊,而產生回復預測殘留畫像之回復預測殘留畫像。轉換 資訊包含量子化係數組之情況,反轉換部3 24於量子係數 施行反量子化處理及反轉換處理,產生回復預測殘留畫像 之回復預測殘留畫像。 加法部3 2 6藉由加法來自反轉換部3 2 4之回復預測殘 留畫像和來自畫像預測部3 1 6之預測畫像,而產生播放畫 像,並將此組入播放圖框,使之記憶於畫像記憶部328。 另外,於畫像資料之畫素値設定範圍之情況,加法部326 亦可爲了收束於此範圍內而擷取加法結果之畫素値。 -43- 200529673 (40) 畫像記億部3 2 8記憶組入編碼對象圖框之微區塊完成 之播放畫像之播放圖框、參考圖框。此參考圖框爲與編碼 對象相異圖框之播放圖框,本實施型態中爲一圖框前之播 放圖框。 以下針對編碼模式決定部3 1 4加以說明。圖1 7爲用 來說明編碼模式決定部之處理之圖。關於圖17,四角形 之領域爲表示爲區塊,標記箭頭之實線及點線表示掃瞄順 序。 編碼模式決定部314如本圖( a)所示,首先,以特 定之掃瞄順序(例如光點掃瞄順序),經由產生第1畫像 預測處理(動作補償預測處理)之編碼對象圖框之所有微 區塊之預測畫像(亦即以P模式產生預測畫像),而產生 編碼對象圖框之所有微區塊之播放畫像所形成之播放圖框 〇 編碼模式決定部314如本圖(b)所示,以與上述相 反之掃瞄順序,經由產生第2畫像預測處理之編碼模式對 象圖框之所有微區塊之預领畫像’而產生編碼對象圖框之 所有微區塊之播放畫像。 1 編碼模式決定部3 1 4採用第2畫像預測處理產生預測 畫像之際,藉由處鋰對象之微區塊’採用以特定之掃瞄順 序位於前方之微區塊之播放畫像’和以特定之掃瞄順序位 於後方之微區塊中,編碼模式爲1>模式之微區塊之播放畫 像,和記億於畫像記憶部3 2 8之參考圖框。例如,如本圖 (c)所示,若將標記「A」之微區塊設爲處理對象之微區 -44- (41) (41)200529673 塊,將採用播放圖框之微區塊中,相較於爲區塊A前方 之微區塊之播放畫像、相較於A後方且編碼模式爲P模 式之微區塊之播放畫像(圖中標記爲「P」之微區塊)、 及記憶於畫像記憶部3 28之參考圖框,進行第2畫像預測 處理。與第2畫像預測處理相關之詳細內容將於後敘述。 編碼模式決定部3 1 4每次經過第2畫像預測處理產生 播放畫像時,藉由進行經由第畫像預測處理產生之播放 畫像及經由第2畫像預測處理產生之播放畫像各自相關之 成本計算,而決定編碼模式。 此成本例如處理對象之微區塊編碼所需之位元數R、 該微區塊之播放畫像之各畫素與該微區塊之輸入畫像之各 畫像之誤差之平方D、及事先設定之係數設爲λ之際,以 D+ λ、R加以計算。編碼模式決定部314係選擇Ρ模式 或C模式中,成本較小之模式設爲編碼模式。另外,成本 若可呈現編碼效率或/及畫像,亦可從各種函數加以演算 〇 . 以下針對畫像預測部316加以詳細說明。圖18爲表 示畫像預測部3 1 6構造之方塊圖。畫像預測部3 1 6具備模 式切換部3 3 0、第1畫像預測部(第1畫像預測手段) 3 32及第2畫像預測部(第2畫像預測手段)3 3 4。 模式切換部33 0接收來自編碼模式決定部314之編碼 模式資訊,依照該編碼模式資訊所限定之編碼模式,啓動 第1畫像預測部3 3 2或第2畫像預測部3 34模式切換部 3 3 0,於編碼模式爲P模式之情況,啓動第1晝像預測部 -45- 200529673 (42) 3 3 2,而於編碼模式爲C模式之情況,啓動第2畫像預測 部 3 3 4。 於動畫編碼裝置310中’模式切換部330最初藉由第 1畫像預測部3 3 2,產生於編碼對象圖框之所有微區塊中 ,編碼模式爲P模式之所有微區塊之預測畫像。其後,模 式切換部3 3 0,藉由第2畫像預測部3 3 4,產生於編碼對 象圖框之所有微區塊中,編碼模式爲C模式之所有微區塊 之預測畫像。 第1畫像預測部332,'如上述所示,藉由第1畫像預 測處理亦即動作補償預測處理而產生播放畫像。所謂動作 補償預測處理係進行處理對象之微區塊之輸入畫像與參考 圖框之任意領域之區塊匹配(block matching ),採用相 關最高之參考圖框領域之部分畫像,作爲播放畫像,並發 生往該領域之移動向量之處理。此相關係採用例如對象處 理之微區塊之輸入畫像與匹配對象之領域之播放畫像之差 量平方D、從處理對象之微區塊往該領域之移動向量編碼 所需之資料長R、及預定之係數λ,從D + λ R之參考函 數加以演算。另外,動作補償預測處理亦可採用提高取樣 (upsampling )參考圖框爲2倍或4倍之畫像加以進行。 又,於將微區塊分割成更小之各區塊上,亦可實施動作補 償預測處理。此際,將輸出表示各小區塊之移動向量與微 區塊分割種類之區塊分割模式。 第2畫像預測部3 3 4採用第2畫像預測處理,產生決 定編碼模式爲C模式之微區塊之預測畫像。圖1 9係用來 -46- 200529673 (43) 說明第2畫像預測處理之圖。於第2畫像預測處理中’選 擇未產生播放畫像之微區塊Y。此微區塊Y中,選擇未施 與播放畫像之畫素値(預測信號)之未處理之畫素’並設 定將該畫素包含於其中一部分之模板T。於本實施型態中 ,雖設定以上述未處理之畫素爲主之模板T,但若包含已 處理之畫素與未處理之畫素,模板T可爲任意尺寸及形狀 。又,對於微區塊γ,任意尺寸之參考領域R係相對於播 放圖框F1加以設定。又,對於記憶於畫像記憶部328之 參考.圖框F2,亦設定參考領域R。參考圖框F2之參考領 •.域R亦可設於相當於設於播放圖框F1之參考領域R位置 之參考圖框F2之位置。或者,參考圖框F2之參考領域R ,亦可設於偏離相當於微區塊Y周圍微區塊之移動向量 之中値(median )所產生之移動向量之位置。 於第2畫像預測處理中,演算位於參考領域R之任意 位置之已產生播放畫像之候補領域S與模板T之相關,相 關最高之候補領域選擇複製參考領域Sc。此相關例如模 .板T與候補領域S兩者之對應位置產生播放畫像畫素値之 畫素,設爲有效畫素,模板T與候補領域S之有效畫素之 畫素値之差量値之平方、亦即匹配誤差Μ,從以有效畫素 數U分割之値加以演算。另外,相關若可呈現模板Τ與 候補領域S之畫素相似度,亦可藉由各種演算方法加以演 算。 於第2畫像預測處理中,於模板Τ中未施予播放畫像 之畫素値之未處理畫素上,複製複製參考領域Sc之對應 -47- 200529673 (44) 畫素之畫素値,作爲塡補畫素値。圖19中僅於已產生模 板T之播放畫像之部分標記斜線。圖19中’於模板丁內 之未產生播放畫像之領域(模板丁內之下部)’呈現施予 複製參考領域S C之下部畫素値。於第2畫像預測處理中 ,有關各微區塊係至未施予播放畫像之畫素値之未處理畫 素爲止,反覆選擇畫素並產生播放畫像。 以下,針對動畫編碼裝置3 1 0之動作加以說明。並同 時針對本發明實施型態相關之動畫編碼方法加以說明。圖 2〇爲表示第3實施型態相關之動畫編碼方法之流程圖。 ’ 如圖20所示,動畫編碼裝置310之編碼過程中’藉 由領域分割部312,將編碼對象圖框分割成複數微區塊(· 步驟S301)。又,藉由領域分割部312產生上述微區塊 位置資訊。 接著,進行藉由編碼模式決定部314決定各微區塊編 碼模式之編碼模式決定處理(步驟S302)。圖21表示第 3實施型態相關之動畫編碼方法之編碼模式決定處理之流 程圖。如圖21所示,於編碼模式決定處理中,首先,依 照掃瞄順序(光點掃瞄順序),經由第1畫像預測處理( 動作補償預測處理),產生所有微區塊之播放畫像所形成 之播放圖框(步驟S302- 1 )。 接著,依照掃瞄順序選擇.最後微區塊作爲處理對象之 微區塊(步驟S3 02-2 ),執行上述第2畫像預測處理。 於第2畫像預測處理中.,如上述所示,採用經由歩驟 S3 02- 1所產生之播放圖框中,對處理對象之微區塊以掃. -48- 200529673 (45) 瞄順序位於前方之微區&之播放畫像,和處理對象之微區 塊以掃瞄順序位於後方之微區塊中,編碼模式爲P模式之 _微、區塊之播放畫像,及參考圖框,而產生播放畫像。 其次,步驟S3 02-3中所產生之處理對象之微區塊之 播放畫像,和步驟S3 02- 1中所產生之處理對象之微區塊 之播放畫像之成本,係採用上述成本函數而各自演算(步 驟S3 02-4 )。接著,第1畫像預測處理、亦即P模式, 或第2畫像預測處理、亦_ C模式中,選擇成本較低之模 , 式作爲編碼模式(步驟S302-5 )。 % 再者,測試所有微區塊之處理是否結束(步驟S302- 6)。所有微區塊處理結束之情況(Yes),結束編碼模式 決定處理。另一方面,所有微區塊處理未結束之情況( No ),依照反掃瞄順序,選擇未決定編碼模式之微區塊 (步驟 S302-7 ),並反覆進行從步驟 S302-3至步驟 S302-6之處理。 回到圖20,接著,於動畫編碼裝置310中,藉由編 碼部322編碼編碼模式資訊(步驟S303)。接著,藉由 模式切換部330,依照特定掃瞄順序(例如光點掃瞄順序 ),選擇微區塊作爲處理對象,並測試處理對象之微區塊 之編碼模式是否爲P模式(第1畫像預測處理)(步驟 S3 04 )。編碼模式非P模式之情況(No ),製程移至步 驟S3 12。另一方面,編碼模式爲P模式之情況(Yes), 模式切換部3 3 0啓動第1畫像預測部3 3 2,藉由第1畫像 預測處理產生處理對象之微區塊之預測畫像(步驟S3 05 -49- 200529673 (46) )° 再者,藉由減法部318,產生處理對象之微區塊之輸 入畫像與預測畫像之差所形成之預測殘留畫像(步驟 S3 06 )。接著,藉由轉換部3 20將此預測殘留畫像轉換成 轉換資訊(步驟S307)。然後,藉由編碼部322平均訊 息量編碼移動向量及轉換資訊(步驟S 3 0 8 )。 其次,藉由反轉換部324於轉換資訊施行反轉換,並 產生回復預測殘留畫像之回復預測殘留畫像(步驟S3 09 )。再者,藉由加法部326,加法此回復預測殘留畫像, 和來自畫像預測部3 1 6之預測畫像,藉此產生處理對象之 微區塊之播放畫像(步驟S3 1 0 )。此播放畫像組入播放 圖框,並記憶於畫像記憶部3 2 8 (步驟S 3 1 1 )。 再者,測試所有微區塊之處理是否結束(步驟S312 )。所有微區塊處理未結束之情況(No ),選擇未處理 之微區塊(步驟S302-7),並反覆進行從步驟S304至步 驟S312之處理。另一方面,所有微區塊處理結束之情況 (Yes),製程移至步驟S313。 於步驟S3 13中,藉由模式切換部3 3 0,依照特定掃 瞄順序(例如光點掃瞄順序),選擇微區塊作爲處理對象 ,並測試處理對象之微區塊之編碼模式是否爲C模式(第 2畫像預測處理)。編碼模式非C模式之情況(No ),處 理移至步驟S312。 另一方面,編碼模式爲C模式之情況(Yes ),模式 切換部3 3 0啓動第2畫像預測部3 34,藉由第2畫像預測 -50- 200529673 (47) 處理,產生處理對象之微區塊之預測畫像(步驟S3 1 4 ) 。圖22表示第3實施型態相關之動畫編碼方法之第2畫 像預測處理流程圖。 如圖22所示,第2畫像預測處理中,選擇未產生播 放畫像之區塊。於本實施型態中,編碼模式爲C模式之微 區塊設爲處理對象之微區塊,依特定之掃瞄順序加以選擇 (步驟 S3 14-1 )。 接著,如上述所示設定相對於處理對象之微區塊之參 考領域(步驟S314-2)。接著,選擇微區塊內未產生播 放畫像之畫素(步驟S314-3),並設定將該畫素包含於 其中一部分之模板(步驟S3 14-4 )。 如上述所示演算此模板與參考領域之候補領域之相關 (步驟S3 14-5 ),選擇相關最高之候補領域作爲複製參 考領域(步驟S314-6)。 其次,於未施予播放畫像之畫素値之模板內之未處理 畫素,複製複製參考領域之對應畫素之畫素値(步驟 S3 14-7 )。接者,測試處理對象之微區塊內,.是否有未施 予播放畫素之畫素値之未處理畫素(步驟S314-8)。存 在未處理畫素之情況(Yes),選擇此未處理之畫素(步 驟S314-9),並反覆進行步驟S314-4〜步驟S314-8之處 理。另一方面,處理對象之微區塊內無未處理畫素之情況 ,結束第2畫像預測處理(步驟S3 14)。 回到圖20,於動畫編碼裝置310中,藉由減法部318 ,產生處理對象之微區塊之輸入畫像’與第2畫像預測處 -51 - 200529673 (48) 理所產生之預測畫像之差所形成之預測殘留畫像(步驟 S315)。 〜 接著,藉由轉換部320將此預測殘留畫像轉換成轉換 資訊(步驟S3 16 )。然後,藉由編碼部322平均訊息量 編碼轉換資訊(步驟S3 17)。 藉由反轉換部324於轉換資訊施行反轉換,並產生回 復預測殘留畫像之回復預測殘留畫像(步驟S3 1 8 )。再 者,藉由加法部3 2 6,加法此回復預測殘留畫像,和來自 畫像預測部3 1 6之預測畫像,產生處理對象之微區塊之播 放畫像(步驟S3 1 9 > 。此播放畫像組入播放圖框,並記 憶於畫像記憶部3 2 8 (步驟S 3 2 0 )。 再者,測試所有微區塊之處理是否結束(步驟S3 1 2 )。所有微區塊處理未結束之情況(No ),選擇^未處理 之微區塊(步驟S3 02-7 ),並反覆進行從步驟S3 04至步 驟S312之處理。另一方面,所有微區塊處理結束之情況 (Yes),編碼製程將結束。 以下,針對將電腦設爲動畫編碼裝置3 1 0並使之動作 之動畫編碼程式加以說明。圖23爲第3實施型態相關之 動畫編碼程式之構造與紀錄媒體共同呈現之圖。圖23所 示之動畫編碼程式340,收納於紀錄媒體100提供使用。 紀錄媒體1 〇〇例如爲磁片、CD - ROM、DVD或ROM 等之紀錄媒體,或半導體記憶體等。 紀錄媒體1〇〇若插入讀取裝置112,電腦110(參考 圖14及圖15)將可從讀取裝置112存取存入紀錄媒體 -52- 200529673 (49) 100之動畫編碼程式340,並可藉由該動畫編碼程式340 ,作爲動畫編碼裝置310而進行動作。 如圖15所示,動畫編碼程式3 40亦可作爲重疊於載 波之電腦資料信號13 0,經由網路而提供。此際,電腦 1 10可將藉由通信裝置124所接收之動畫編碼程式3 40存 入記憶體116,並執行動畫編碼程式340。 如圖2 3所示,動畫編碼程式3 4 〇係具備總括處理之 主模組341、領域分割模組342、編碼模式決定模組344 、畫像預測模組346、減法模組348、轉換模組3 5 0、編 碼模組3 5 2、反轉換模組3 54、加法模組3 56及畫像記憶 模組3 5 8。畫像預測模組346具備模式切換模組3 60、第 1畫像預測模組3 62及第2畫像預測模組364。 、 領域分割模組342、編碼模式決定模組344、畫像預 測模組346、減法模組348、轉換模組3 50、編碼模組352 、反轉換模組3 5 4、加法模組3 5 6、畫像記憶模組3 5 8、 模式切換模組360、第1畫像預測模組362及第2畫像預 測模組3 64各自執行於電腦之功能,和上述領域分割部 3 1 2、編碼模式決定部3 1 4、畫像預測部3 1 6、減法部3 1 8 、轉換部320、編碼部322、反轉換部324、加法部326 及畫像記憶部3 2 8、模式切換部3 3 0、第1畫像預測部 3 32及第2畫像預測部334中,對應之部分相同。 以下,針對動畫編碼裝置3 1 0之作用及效果加以說明 。若藉由第3實施型態之畫像編碼裝置3 10,編碼模式爲 C模式之微區塊’亦即藉由第2畫像預測處理產生之預測 -53- 200529673 (50) 畫像之微區塊,由於不必將基於預測補助資訊所產生之資 料,包含於位元流,故產生編碼效率高之位元流。 於動畫編碼裝置310中,第2畫像預測部3 34採用參 考圖框及編碼對象僵框之播放圖框,而產生預測畫像。此 播放圖框包含經由第1畫像預測處理及第2畫像預測處理 而完全產生之播放畫像。亦即,第2畫像預測部334採用 與編碼對象圖框相異之圖框之播放畫像所形成之參考圖框 ,和編碼對象圖框之播放化項所形成之播放圖框,而產生 預測畫像。因此,產生可削減時間方向及空間方向之冗長 度之編碼資料。 丨 又,於第2畫像預測處理中,採用包含經由第1畫像 預測處理及第2畫像預測處理而完全產生之播放畫像之播 放圖框。因此,亦可採用因掃描順序而位於後方之播放畫 像於預測,故更可有效地削減空間方向之冗長度。 〔第4實施型態〕‘ 以下,針對本發明之第4實施型態之動畫解碼裝置加 以說明。圖24爲表示本發明第4實施型態相關之動畫解 碼裝置之構造圖。圖24所示之動畫解碼裝置3 70,物理 上可設爲例如具備CPU (中央處理裝置)、記憶體等記憶 裝置、顯示器等顯示裝置、通信裝置之電腦。又,動畫解 碼裝置3 70亦可爲攜帶電話等移動通信終端、DVD裝置 。亦即,動畫解碼裝置3 70可廣泛適用可資訊處理之裝置 -54- 200529673 (51) 如圖24所示,動畫解碼裝置3 70具有解 手段)372、反轉換部(反轉換手段)3 74、 3 76、加法部(播放畫像產生手段)3 78及畫 記憶手段)3 80。 - 解碼部3 72接收所輸入之位元流,並解碼 接收藉由動畫編碼裝置310而產生之位元流之 部372解碼該位元流,而產生微區塊位置資訊 資訊、移動向量及轉換資訊。 反轉換部3 74從解碼都3 72接收轉換資訊 對象之微區塊轉換資訊施行反轉換,藉此產生 微區塊之回復預測殘留畫像。反轉換部374將 殘留畫像輸出於加法部3 7 8。另外,反轉換部 之處理係和動畫編碼裝置310之反轉換部324 〇 畫像預測部376產生處理對象之微區塊之 並將該預測畫像輸出於加法部3 7 8。畫像預測i 模式切換部3 82、第1畫像預測部(第1畫像 3 8 4及第2畫像預測部(第2畫像預測手段) 切換部382係基於來自解碼部3 72之編碼模式 第1畫像預測部3 8 4或第2畫像預測部3 8 6。 測部3 84藉由第1畫像預測處理,產生處理對 之預測畫像;第2畫像預測部3 86藉由第2畫 ’產生處理封象之微區塊之預測畫像。包含於 3 76之此等要素所進行之處理,同於動畫編碼^ 碼部(解碼 畫像預測部 像記憶部( 該位元流。 情況,解碼 、編碼模式 • :;** ,並於處理 該處理對象 此回復預測 374所進行 相同之處理 預測畫像, 部3 76具備 預測手段) 3 86。模式 資訊,啓動 第1畫像預 象之微區塊 像預測處理 畫像預測部 装置3 1 0之 -55- 200529673 (52) 畫像預測部3 1 6之對應要素所進行之處理。 加法部3 7 8係加法來自畫像預測部3 76之預測畫像, 和來自反轉換部3 74之回復預測殘留畫像,產生處理對象 之微區塊之預測畫像,並使之記憶於畫像記憶部3 80。再 者,於畫像資料之畫素値設定特定範圍之際,加法部378 亦可將畫素値限於此範圍內而進行擷取處理。 畫像記憶部3 8 0記憶組入已產生之播放畫像之解碼對 象圖框之播放圖框,和參考圖框。參考圖框如上述所示, 係與解碼對象圖框相異圖框之播放圖框,本實施型態中, 爲解碼對象圖框之一圖框前之播放圖框。 以下,針對動畫解碼裝置370之動作加以說明。圖 25爲表示第4實施型態相關之動畫解碼方法之流程圖。 如圖25所示,動畫解碼裝置370之解碼過程中,首 先藉由解碼部3 72,解碼對象圖框之所有微區塊之編碼模 式資訊,從位元流加以解碼(步驟S331 )。 接著,藉由模式切換部382,依特定掃瞄順序(例如 光點掃描順序),選擇微區塊作爲處理對象,並測試處理 對象之微區塊之編碼模式是否爲P模式(第1畫像預測處 理)(步驟S 3 3 2 )。編碼模式非P模式之情況(No), 製程移至步驟S3 3 8。另一方面,編碼模式爲P模式之情 況(Yes),藉由解碼部3 72,從位元流平均訊息量解碼 處理對象之微區塊之轉換資訊及移動向量(步驟S3 3 3 ) 。再者,模式切換部3 82啓動第1畫像預測部3 84,並藉 由第1畫像預測處理產生處理對象之微區塊之預測畫像( -56- 200529673 (53) 步驟S 3 4 )。 其次,藉由反轉換部3 74,於轉換資訊施行反轉換, 產生回復預測殘留畫像(步驟S3 3 5 )。其次,藉由加法 部3 7 8,加法此回復預測殘留畫像與預測畫像,並產生播 放畫像(步驟S 3 3 6 )。此播放畫像組入播放圖框,並記 憶於畫像記憶部3 80 (步驟S3 3 7 )。 接著,測試所有微區塊之處理是否結束(步驟S3 3 8 )。所有區塊處理未結束之情況(No),選擇未處理之 微區塊.,並反覆從步驟S3 32至步驟S 3 3 8之處理。 • 另一方面,所有區塊處理結束之情況(Yes),製程 移至步驟S3 3 9。步驟S3 3 9中, 藉由模式切換部82,依照特定掃瞄順序(例如光點 掃瞄順序),選擇微區塊作爲處理對象,並測試處理對象 之微區塊之編碼模式是否爲C模式(第2畫像預測處理) (步驟S3 3 9 )。編碼模式非C模式之情況(No),製程 移至步驟S3 45。另一方面,編碼模式爲C模式之情況( Yes ),藉由解碼部3 72,從位元流平均訊息量解碼處理 對象之微區塊之轉換資訊(步驟S340 )。再者,模式切 換部3 82啓動第2畫像預測部3 86,並藉由第2畫像預測 處理產生處理對象之微區塊之預測畫像(步驟S341 )。 其次,藉由反轉換部374對轉換資訊施行反轉換,並 產生回復預測殘留畫像(步驟S342 )。再者,藉由加法 部3 78,加法此回復預測殘留畫像與預測畫像,產生播放 畫像(步驟S 3 43 )。此播放畫像組入播放圖框,並記憶 -57- 200529673 (54) 於畫像記憶部3 8 0 (步驟S344 )。 再者,測試所有微區塊之處理是否結束(步驟S3 45 )。所有微區塊處理未結束之情況(No) ’選擇未處理 之微區塊,並反覆進行從步驟S339至步驟S345之處理。 另一方面,所有微區塊處理結束之情況(Yes ),解碼製 程結束。 以下,針對將電腦設爲動畫解碼裝置3 70並使之動作 之動畫解碼程式加以說明。圖26爲第4實施型態相關之 動畫解碼程式之構造與紀錄媒體共同呈現之圖。圖26所 示之動畫解碼程式3 90 ’收納於紀錄媒體1 00提供使用。 紀錄媒體1〇〇例如爲磁片、CD — ROM、DVD或ROM等之 紀錄媒體,或半導體記憶體等。 紀錄媒體1〇〇若插入讀取裝置112,電腦110(參考 圖1^及圖15 )將可從讀取裝置1 12存取存入紀錄媒體 100之動畫解碼程式390,並可藉由該動畫解碼程式390 ,作爲動畫解碼裝置3 70而進行動作。 如圖15所示,動畫解碼程式3 90亦可作.爲重疊於載 波之電腦資料信號1 3 0,經由網路而提供。此際,電腦 1 10可將藉由通信裝置124所接收之動畫編碼程式340存 入記憶體116,並執行動畫解碼程式390。 如圖26所示,動畫解碼程式390係具備總括處理之 主模組39 1、解碼模組392、反轉換模組3 94、畫像預測 模組3 96、加法模組3 98及畫像記憶模組400。畫像預測 模組3 96具備模式切換模組402、第1畫像預測模組404 -58- 200529673 (55) 及第2畫像預測模組4 0 6。 解碼模組3 9 2、反轉換模組3 9 4、畫像預測模組3 9 6 、加法模組3 9 8及畫像記憶模組4 0 0、模式切換模組4 0 2 、第1畫像預測模組404及第2畫像預測模組406各自執 行於電腦之功能,和上述解碼部372、反轉換部3 74、畫 像預測部3 7 6、加法部3 7 8、畫像記憶部3 8 0、模式切換 部3 82、第1畫像預測部3 84及第2畫像預測部3 86中, 對應之要素功能相同。 如以上說明所示,動畫解碼裝置370,可基於動畫編 碼裝置3 1 0所產生之位元流,而回復動畫。又,動畫解碼 裝置370,對於編碼模式爲C模式之微區塊,亦即藉由第 2畫像預測處理產生預測畫像之微區塊,可不從編碼側取 得移動向量等之預測補助資訊,而產生預測畫像。 另外,本發明不限於上述第3及第4實施型態,可有 各種變化。例如,於第3實施型態,第2畫像預測處理中 ,參考編碼對象圖框之播放畫像所形成之播放圖框。亦可 取代於此播放圖框,而參考編碼對象圖框、亦即輸入畫,像 本體,亦可實現第2畫像預測處理。 又,亦可依舊採用第2畫像預測處理所產生之預測畫 像,作爲播放畫像V此際,有關第2畫像預測處理所產生 之預測畫像和輸入畫像之差所形成之預測殘留畫像之編碼 資料,不必包含於位元流,故更可產生編碼效率較高之位 元流。 又,關於動畫之特性,移動較多之部分與移動較少之 -59- 200529673 (56) 背景部分爲已知之情況,藉由參考預先設定各微區塊之編 碼模式之表格等’亦可節省決定編碼模式之處理。 以上’如說明本發明最佳實施型態所示,若藉由本發 明’可提供#有效編碼畫像之畫像編碼裝置、畫像編碼方 法、畫像編碼程式,和可從本發明之畫像編碼裝置所產生 之位元流回復畫像之畫像解碼裝置、畫像解碼方法及晝像 解碼程式。 【圖式簡單說明】 圖1爲表示第丨實施型態相關之畫像編碼裝置之構造 圖。 圖2爲表示用來說明畫像預測處理內容之圖。 圖3爲表示用來說明畫像預測處理內容之圖。 圖4爲表示說明代替畫素値之圖。 圖5爲表示說明代替畫素値之圖。 圖6爲表示說明畫像塡補處理內容之圖。 ® 7爲表示畫像編碼處理之畫像編碼裝置動作之流程 圖。 _ 8爲表示紀錄畫像編碼程式之紀錄媒體構造圖。 Η 9爲表示第2實施型態相關之畫像解碼裝置之構造 圖。 •. 圖1 〇爲表示畫像解碼處理之槪略動作之流程圖。 圖11爲表示預測畫像解碼處理動作之流程圖。 圖1 2爲表示塡補畫像解碼處理動作流程圖。 -60- 200529673 (57) 圖13表示紀錄畫像解碼程·式之紀錄媒體構造圖。 圖1 4爲表示用來執行記憶於紀錄媒體之程式之電腦 硬體構造之圖。 圖1 5爲表示用來執行記憶於紀錄媒體之程式之電腦 斜視圖。 .圖16爲表示第3實施型態相關之動畫編碼裝置之構 造圖。 圖17爲表示用來說明編碼模式決定部之處理之圖。 圖1 8爲表示畫像預測部之耩造之方塊圖。 圖1 9爲表示用來說明第2畫像預測畫像處理之圖。 圖20爲表示第3實施型態相關之動畫編碼方法之流 程圖。 圖21爲表示第3實施型態相關之動畫編碼方法之編 碼模式決定處理之流程圖。 圖22爲表示第2畫像預測處理之流程圖。 圖23爲第3賓施型態相關之動畫編碼程式之構造與 紀錄媒體共同呈現之圖。 圖24爲表示第4實施型態相關之動畫解碼裝置之構 造圖。 圖25爲表示第4實施型態相關之動畫解碼方法之流 程圖。 圖26爲表示第4實施型態相關之動畫解碼程式與紀 錄媒體共同呈現之圖。 -61 - 200529673 (58) 【主要元件符號說明】 1 畫 像 編 碼 裝 置 11 畫 像 分 割 部 1 2 編 碼 模 式 決 定 部 13 預 測 畫 像 產 生 部 14 減 法 部 15 轉 換 部 16 編 碼 部 17 反 轉 換 部 18 加 法 部 19 記 憶 部 T 模 板 P 處 理 對 象 畫 素 Q 播 放 畫 素 S 相 關 領 域 Y 處 理 對 象 區 塊 R 對 象 領 域 S 1 分 割 輸 入 畫 像 S2 決 定 編 碼 模 式 S3 預 測 編 碼 處 理 模 式 S4 產 生 預 測 畫 像 S5 產 生 預 測 殘 留 畫 像 S6 演 算 轉 換 係 數 S7 平 均 訊 息 量 編 碼 -62- 200529673 (59) S8 產 生 播 放 差 量 畫 像 S9 產 生 播 放 畫 像 S 1 0 儲 存 播 放 畫 像 S 1 1 所 有 區 塊 完 成 101 程 式 領 域 102a 畫 像 分 割 模 組 102b 編 碼 模 式 決 定 模 組 102c 預 測 畫 像 產 生 模 組 102d 減 法 模 組 1 02e 轉換 模 組 1 02f 編 碼 模 組 l〇2g 反 轉 換 模 組 1 02h 加 法 模 組 1 02i 記 憶 模 組 2 畫 像 解 碼 裝 置 2 1 解 碼 部 22 編 碼 模 式 判 斷 部 23 預 測 畫 像 產 生 部 24 反 轉 換 部 25 加 法 部 26 記 憶 部 27 切 換 開 關 28 塡 補 畫 像 產 生 部 S20 平 均 訊 息 量 解 碼 -63- 200529673 (60) S30 預 測 畫 像 編 碼 處 理 S40 塡 補 畫 像 編 碼 處 理 S3 1 預 測 編 碼 處 理 模 式 S32 產 生 預 測 畫 像 S33 產 生 預 測 殘 留 畫 像 S34 產 生 播 放 畫 像 S35 儲 存 播 放 畫 像 S36 所 有 塊 是 否 結 束 S41 塡 補 編 碼 處 理 模 式 S42 產 生 塡 補 畫 像 S43 儲 存 塡 補 畫 像 S44 所 有 塊 是 否 結 束 201 程 式 領 域 202 畫 像 解 碼 程 式 202a 解 碼 模 姐 202b 編 碼 模 式 判 斷 模 組 202c 預 測 畫 像 產 生 模 組 202d 反 轉 換 模 組 202e 加 法 模 組 202f .記 憶 模 組 202g 切 換 開 關 模 組 202h 塡 補 畫 像 產 生 模 組 110 電 腦 100 紀 錄 媒 體 -64 - 200529673 (61) 1 12 讀 取 裝 置 114 作 業 用 記 憶 體 116 記 憶 體 126 CPU 118 顯 示 器 120 滑 鼠 122 鍵 盤 124 通 信 裝 置 130 電 腦 資 料 信 〇t& 3 10 動 畫 像 編 碼 裝 置 3 12 領 域 分 剳 部 3 14 編 碼 模 式 決 定 部 3 16 畫 像 預 測 部 3 18 減 法 部 320 轉 換 部 322 編 碼 部 324 反 轉 換 部 326 加 法 部 328 畫 像 記 憶 部 330 模 式 切 換 部 332 第 1 畫 像 預 測 部 334 第 ' 2 畫 像 預 測 部 FI 播 放 圖 框 F2 參 考 圖 框 -65- 200529673 (62) S ( Sc ) 5301 5302 5303 5304 5305 5306 5307 5308 5309 S3 1 0 S3 1 1 S3 1 2 S3 1 3 S3 14 S3 1 5 S3 1 6 S3 1 7 S3 1 8 S3 1 9 5320 5321 START S302-1 複製參考領域 分割領域 決定編碼模式 編碼編碼模式資訊 第1畫像預測處理? 第1畫像預測處理 產生預測殘留畫像 轉換 平均訊息量編碼 反轉換 加法 記憶播放畫像 所有區塊是否結束? 第2畫像預測處理? 第2畫像預測處理 產生預測殘留畫像 轉換 平均訊息量編碼 反轉換 加法 記億播放畫像 所有區塊是否結束? 編碼模式決定處理 依掃描順序進行第1畫像預測處理 -66 - 200529673 (63) S302-2 選擇最後區塊 S3 02-3 第2畫像預測處理 S302-4 成本計算 S302-5 選擇編碼模式 S302-6 所有區塊是否結束? S3 02-7 以反掃描順序選擇其次區塊 START 第2畫像預測處理 S314-1 選擇未產生播放畫像之區塊 S3 14-2 設定參考領域 S314-3 選擇區塊內之未處理畫素 S3 14-4 設定獏板· S3 14-5 演算相關 S3 14-6 選擇複製領域 S3 14-7 於模板之未處理畫素複製複製領域之 對應畫素 S314-8 區塊內是否有未處理畫素? S314-9 選擇未處理畫素 340 動畫像編碼程式 341 主模組 342 領域分割模組 344 編碼模式決定模組 346 畫像預測模組 3 60 模式切換模組 3 62 第1畫像預測模組 -67- 200529673 (64) 364 第 348 減 350 轉 352 編 354 反 356 加 358 畫 370 動 372 解 374 反 376 畫 378 加 380 畫 382 模 S33 1 解 S332 第 S333 平 S334 第 S335 反 S3 3 6 加 S337 儲 S338 所 S339 第 S340 平 2畫像預測模組 法模組 換模組 碼模組 餺換模組 法模組 像記憶模組 畫像解碼裝置 碼部 轉換部 像預測部 法部 像記憶部 式切換部 碼編碼模式 1畫像預測處理? 均訊息量解碼 1畫像預測處理 轉換 法 存播放畫像 有區塊是否結束? 2畫像預測處理? 均訊息量解碼 -68 - 200529673 (65) S34 1 第 S3 42 反 S3 43 加 S344 記 S345 所 384 第 386 第 390 動 39 1 主 392 解 394 反 396 畫 398 加 400 畫 402 模 404 第 406 第 2畫像預測處理 轉換 法 憶播放圖框 有區塊是否結束? 1畫像預測部 2畫像預測部 畫像解碼程式 模組 碼模組-轉換模組 像預測模組 法模組 像記憶模組 式切換模組 1畫像預測模組 2畫像預測模組 -69-First, the processing target block Y is scanned based on a specific scanning rule, thereby selecting a processing target pixel P from a plurality of pixels included in the processing target block Y. Next, the template T is determined based on the selected processing pixel P. Next, among the target area P, among the areas having the same shape as the template T, a relevant area S having the greatest correlation with the removal of the pixel of the processing target pixel P from the template T is selected. Secondly, the pixel 値 of the playback pixel Q corresponding to the processing target pixel P in the related field S is set to 塡 complement pixel 値 of the processing target pixel P. The same processing as above is performed for each pixel included in the processing target block Y in the scanning order. As a result, a supplementary portrait corresponding to the processing target block Y is generated. Here, the correlation calculation method when selecting the relevant field S -27- 200529673 (24) is selected, for example, the method with the smallest squared difference between the corresponding pixels 値 is set to the maximum correlation method, or the corresponding images The absolute sum total of the difference between the primes is the smallest, and the method of setting the maximum correlation is also possible. Any other method that can measure the correlation is also applicable. In addition, in the case where the encoding target image is an animation, by using the decoded pixels of the decoded frame and the complementary image as the target area R, the complementary image can be more efficiently followed by referring to FIG. The operation of the image encoding device 1 will be described. This image encoding process is performed from a frame according to a specific scanning order (such as light spot scanning) in the unit of the read block. First, the image segmentation unit 11 divides the input image input in the frame unit into blocks of a specific size (for example, 4 X 4 pixels), and generates block position information for limiting each processing target block (step S1). ). Next, the encoding mode determination unit 12 determines whether the encoding mode for encoding the image of the processing target block based on the specific encoding mode decision rule is one of a predictive encoding processing mode (P mode) or a complement encoding mode (C mode). And output coding mode information for limiting the coding mode (step S2). This block encoding mode information is output to the image division section 11, the prediction image generation section 13 and the encoding section 16. Next, the predicted image generation unit 13 determines whether the encoding mode of the processing target block determined by the encoding mode determination unit 12 is a predictive encoding processing mode (step S3). 9 If it is judged as negative (step S3; NO), in order to perform the second image encoding of the processing target block -28- 200529673 (25) • processing, the process moves to step S11. On the other hand, in the judgment of step S3, it is determined that the encoding mode of the processing target block is a predictive encoding processing mode (step S3; YES), and the predictive image generation unit 13 determines a predictive mode, and follows the predictive mode determined according to this. A part of the playback image that has been encoded and stored in the memory 19 is used to generate a predicted image corresponding to the image of the processing target block (step S4). That is, the predicted image generation unit 13 performs the first image prediction process described above, and generates a preview image based on the connected image connected to the processing target block and the playback image of the non-connected block not connected to the processing target block. •• Take a picture. This predicted image is output to the subtracting section 14 and the adding section 18. Next, the subtracting unit 14 generates a predicted residual image by subtracting the predicted image corresponding to the image of the processing target block in pixel units from the image (input image) of the processing target block (step S5). This predicted residual image is output to the conversion unit 150. Furthermore, the conversion unit 15 converts the predicted residual image generated by the subtraction unit 14 using a specific conversion rule, and calculates a conversion coefficient obtained by the conversion. (Conversion Information) (step S6). This conversion coefficient is output to the encoding section 16 and the inverse conversion section 17. ☆ Next, the encoding unit 16 encodes the conversion coefficient calculated by the conversion unit 15 based on the specific rule (step S7). In addition, the encoding unit 16 encodes the coding mode information determined in step S2 on the basis of a specific rule, and, based on the specific rule, generates a pattern based on the prediction information selected in the average information amount encoding step S4. The average amount of information encodes these encoded data, produces compressed data (bit stream), and outputs -29- 200529673 (26) to an external image decoding device. · Secondly, the “inverse conversion unit 17” adopts the inverse conversion rule corresponding to the specific conversion rule adopted by the conversion unit 15 and the conversion coefficient calculated by the inverse conversion conversion unit 15 to generate a recovery prediction residual image (step S8). This reply prediction residual image is output to the adding unit 18. Furthermore, the adding unit 18 adds the predicted picture generated by the predicted picture generating unit 13 and the reply predicted residual picture generated by the inverse conversion unit 17 to generate a playback picture (step S9). The playback image is stored in the memory through the storage unit 19 and stored (step S 1 0). Next, it is judged whether or not the processing is completed for all the blocks (step S1 1). When all the blocks are completed (steps, steps S 1 1; YES), the image encoding processing is ended. On the other hand, if all the blocks have not been completed (step S11; NO), the process proceeds to step S2. Next, an image encoding program related to the present invention and a computer-readable recording medium (hereinafter referred to as a recording medium) recording the image encoding program will be described. The recording medium mentioned here refers to the reading device provided for the hardware resources of the computer. In response to the description content of the program, the state of changes in energy such as magnetism, light, electricity, etc. can be caused by the corresponding signal form. The description of the program is transmitted to the reading device. Relevant recording media include, for example, magnetic disks, optical discs, CD-ROMs, and megabytes built into the computer. 0 'FIG. 8 is a diagram showing the structure of a recording medium related to the first embodiment. As shown in FIG. 8, the recording medium 100 has a program area 101 of a recording program. In this program area 1 0 1 records an image coding program 10 2. -30- 200529673 (27) Fig. 14 is a diagram showing a hardware structure of a computer for executing a program recorded on a recording medium, and Fig. 15 is a perspective view of a computer for executing a program recorded on a recording medium. As shown in FIG. 15, the computer 1 10 includes a reading device 1 1 2 such as a floppy disk drive device, a CD-ROM drive device, and a dvd drive device, and a working memory (ram) 1 in which an operating system usually exists. 1 4 and memory 1 1 for programs stored in the recording medium 1 100, and display devices 118 such as displays, mouse 120 and keyboard 122 for input devices, and communication devices for receiving and transmitting data, etc. 124, and CPU 126 which controls the execution program. If the recording medium 100 is inserted into the reading device 112, the computer 1 10 will be able to access the image encoding program 102 stored in the recording medium 100 from the reading device 112, and the portrait encoding program 102 may be used. It is assumed that the image encoding device 1 operates. As shown in Fig. 15 ', the image encoding program 102 can also be provided as a computer data signal 130 which is superimposed on a carrier wave and is provided via a network. At this time, the computer 110 can store the image encoding program 102 received by the communication device 124 into the memory 116, and execute the image encoding program 102. The image encoding program 102 includes an image segmentation module 102a, an encoding mode determination module 102b, a predictive image generation module 102c, a subtraction module 102d, a conversion module 102e, an encoding module 102f, and an inverse conversion module. The group i02g, the addition module 102h, and the memory module 102i are configured. Here, the image segmentation module 102a, the encoding mode determination module 102b, the predictive image generation module 102c, the subtraction module 10, the conversion module 102e, the encoding module 102f, and the inverse conversion module are used. Group 102g, addition module 102h and memory module-31-200529673 (28) Function implemented by each operation of '102i' and the image division unit 1 of the image encoding device 1 described above 1, encoding mode determination unit 1 2, The predicted image generation unit 1 3, the subtraction unit 14, the conversion unit 15, the encoding unit 16, the inverse conversion unit 17, the addition unit 18, and the memory unit 19 each have the same function. If the image encoding device of the first implementation type is used, "for the field where the encoding mode is the complement coding mode, it is not necessary to include the data generated based on the prediction assistance information in the bit stream, so it has a high encoding efficiency. Yuan flow. Also, the predicted image generation unit 13 can generate a prediction by using a playback image of a non-connected block that is not connected to the processing target block when the coding mode of the connected block connected to the processing target block is the complement coding mode. portrait. As a result, because not only the playback portrait of the connected block connected to the processing target block, but also the playback portrait of the non-connected block that is not connected to the processing target block, the reference range when generating the predicted portrait is expanded. , And can reduce the redundant length in space, and at the same time can improve the efficiency of quotient coding. In addition, by more effectively restricting the picture of the complement coding mode, the reference range when generating the predicted picture will be more effectively expanded, and the redundant length in space will be reduced. < [Second Embodiment Mode] Next, a second embodiment mode of the present invention will be described. This portrait decoding device receives compressed data (including encoded data>), that is, a bit stream, output from the portrait encoding device of the first embodiment, and decodes the received bit stream to generate playback portrait data. Figure 9 shows Fig. 32 shows the structure of an image decoding device related to the second embodiment. (29) (29) 200529673. The image decoding device 2 shown in Fig. 9 can be physically equipped with, for example, a CPU (Central Processing Unit) and memory. Memory devices such as personal computers, display devices such as monitors, and computers for communication devices. The image decoding device 2 can also be a mobile communication terminal such as a mobile phone or a DVD device. That is, the image decoding device 2 can be widely applied to devices capable of information processing. The image decoding device 2 shown in FIG. 9 includes a decoding unit (decoding means) 2 1. An encoding mode determination unit 2 2. A predicted image generation unit (the first image prediction means) 23. An inverse conversion unit (inverse conversion means) 24. Adding section (playback image generation means) 25, memory section (memory means) 26, switch 27, and supplementary image generation section (second image prediction means) 28. Next, for Each of the structural elements shown in 9 will be described. The decoding unit 21 receives the input image information (compressed data) of the input image of the decoding processing object divided into blocks of a specific size. The decoding unit 21 averages the amount of information based on a specific rule. Decode the received input image information. Decode the conversion coefficient, encoding mode information, and prediction mode information by decoding the average information amount. These conversion coefficients, encoding mode information, and prediction mode information are different from the description about the image encoding device 1 The conversion coefficients, encoding mode information, and prediction mode information of the quantitative image data are the same, so description is omitted. The encoding judging unit 22 judges the encoding mode from the input encoding mode information according to a specific scanning order (such as a light spot scanning order). It is either a predictive coding processing mode or a complement coding mode. The processing performed by the coding judgment unit 22 here is different depending on whether the scan in the frame is the first round or the second round. Specifically, when the scan in the frame is the first round, it is judged that the encoding mode is predictive encoding processing-33- 200529673 (30) mode In the case of the formula, the predicted image decoding process including the first image prediction process described above is performed on the processing target block; when the encoding mode is determined to be a complement coding mode, the next block is read. On the other hand, the scan in the frame For the second round, determine whether the encoding mode is the complement coding mode, and perform the complement image decoding processing including the above-mentioned image complement processing on the processing target block; if the encoding mode is the predictive encoding processing mode, read Take the next block. That is, in the first round, only the prediction target decoding process including the predictive image decoding process is performed on the processing target block of the predictive encoding processing mode, and in the first round only the subtraction encoding processing mode is processed. The block performs the supplementary image decoding process including the supplementary image process. The prediction image generation unit 23 completely decodes the image of each block in accordance with the prediction mode limited by the decoded prediction mode information, and uses a part of the playback image recorded by the accounting unit 26 billion to generate a processing object to be decoded. Predicted portrait of a block. The image prediction process for generating this predicted image is the same as the first image prediction process described above (refer to FIG. 2 and FIG. 3), and therefore description is omitted. The inverse conversion section 24 inverse-transforms the decoded conversion coefficients using an inverse conversion rule corresponding to the specific conversion rules adopted by the above-mentioned conversion section 15 and generates a residual prediction residual image obtained by the inverse conversion. The adding unit 25 adds the predicted image and the response corresponding to the predicted image to predict the residual image to generate a broadcast image. In addition, when the addition unit 25 sets a specific range of the picture element 値 of the image, the picture element 値 may be limited to a certain range and subjected to clipping. The memory 26 stores the playback image generated by the addition unit 25 in the memory shown in the figure below -34- 200529673 (31). The changeover switch 27 switches the transfer position of the playback image stored in the storage unit 26 in accordance with the encoding mode of the processing target block. That is, the switching switch 2 7 is switched when the encoding mode is the predictive encoding processing mode, so that the playback image stored in the memory section 26 can be transmitted to the predictive image generating section 23. On the other hand, when the encoding mode is the subsequence coding processing mode, the switch is switched so that the playback image stored in the storage unit 26 can be transferred to the subscribing image generation unit 28. . The supplementary image generation unit 28 generates a supplementary image by playing the decoded image in the vicinity of the processing target block. Here, the image subtraction processing when generating a sub-image is the same as the above-described image sub-processing (refer to FIG. 6 and the second image prediction processing), so description thereof is omitted. Next, operations of the image decoding device 2 and image decoding processing will be described with reference to FIGS. 10 to 12. First, the operation of the image decoding process will be described with reference to FIG. 10. As shown in FIG. 10, in the image decoding process, first, the decoding unit 21 receives the input image sales information of the 1 frame portion from the image encoding device 1 of the first embodiment type to decode based on the average information amount of a specific rule To generate conversion coefficients, encoding mode information, and prediction mode information (step S20). Next, perform the prediction picture decoding process performed in the frame scan in the first round (step S30), and then perform the second round The supplementary image decoding process (step S40) performed by the cat in the frame. Hereinafter, each operation of the predictive image decoding process (step S30) and the supplementary image decoding process (step S40) will be described in detail in each process. 35- 200529673 (32) First, referring to Fig. 11, the explanation of the predicted portrait will be explained. First, the encoding judging unit 22 judges whether the input encoding code mode is the prediction encoding processing mode according to, for example, the scanning order of light spots. (If the step is NO (step S3 1; NO), the process is shifted. On the other hand, in the judgment of step S31, the case of the encoding processing mode is judged. (Step 31; YES)) The unit 23 follows the above. In the prediction mode defined by the information in step S20 (refer to FIG. 10), the pictures of each block are stored in a part of the play image of the play image in the memory section 26 (step S32). Furthermore, the production method is based on the above-mentioned 1 Image prediction processing. Also, in the addition section 25. Second, the inverse conversion section 24 uses the inverse conversion rule corresponding to the specific conversion rule adopted above with respect to the conversion coefficient decoded in step 10) above, and applies the inverse conversion rule. The converted predicted residual image obtained by the conversion This residual predicted residual image is output to the adding section 25. Next, the adding section 25 is the addition of the predicted image production and the predicted image, and the reverse conversion of the reverse conversion 24 to generate a playback image. The image is memorized and stored in memory (step S35). Next, it is judged whether the processing ends the detailed scanning sequence of the code processing for all the blocks (the information is limited to the compilation S 3 1). This judgment is set in the following steps S 3 6 The encoding mode is prediction. The prediction image is completely decoded in the prediction mode image generated by decoding. Output test illustration: step S20 (refer to FIG. 1 conversion unit 5 inverse transform, and generates (step S 3 3) 23 generates three portraits of the predicted residual. The unit 26 is stored in the record (step S36), -36- 200529673 (33) When all the blocks are completed (step S36; YES), the prediction image decoding process is ended. On the other hand, if all the blocks are not completed (step S36; NO), the process shifts to the above step S31. The detailed operation of the sub-picture decoding process (step S40 in FIG. 10) will be described with reference to FIG. First, the encoding judging section 22 determines whether the encoding mode defined by the inputted encoding information is a complement coding mode according to a specific scanning order (for example, a light spot scanning order) (step S4 1). When this determination is NO (step S41; NO), the processing moves to step S44 described later. On the other hand, in the judgment of step S41, it is judged that the encoding mode is the complement coding mode (step 41; YES). The complement image generating unit 28, for each of the processing target pixels included in the processing target block, starts from Playback images located around each processing target pixel, obtain the playback pixel 値 with the greatest correlation, calculate 塡 supplemental pixel 値, thereby generating a supplementary portrait corresponding to the processing target block (step S42). In addition, the method for generating this supplementary portrait is based on the aforementioned portrait supplementation processing (second portrait prediction processing). Next, the supplementary image generated by the supplementary image generation unit 28 is used as a playback image, and is stored in the memory by the storage unit 26 and stored (step 543). Next, it is determined whether the processing is completed for all the blocks (step S44). ), When all the blocks are finished (step S44; YES), the sub-picture decoding process is ended. On the other hand, if all the blocks are not completed (step 544; NO), the process proceeds to step S41 described above. Fig. 13 is a diagram showing the structure of a recording medium related to the second embodiment type -37- 200529673 (34). As shown in FIG. 13, the recording medium 100 includes a program field 201 for recording a program. In this program field 201, the image decoding program 202 is recorded. ° If the recording medium 100 is inserted into the reading device 112, the computer 110 (refer to FIGS. 14 and 15) can access the image decoding program 202 stored in the recording medium 100 from the reading device 112 The image decoding program 202 can be set to operate the image decoding device 2. As shown in FIG. 15, the image decoding program 202 can also be provided as a computer data signal 130 which is superimposed on a carrier wave and is provided via a network. At this time, the computer 110 may store the image decoding program 202 received by the communication device 124 into the memory 116 and execute the image decoding program 202. The image decoding program 202 includes a decoding module 202a, an encoding mode determination module 202b, a predictive image generation module 202c, an inverse conversion module 202d, an addition module 202e, a memory module 202f, a switch module 202b, and 塡Compensation image generation module 202h. Here, the decoding module 202a, the encoding mode determination module 202b, the predictive image generation module 202c, the inverse conversion module 202d, the addition module 202e, the memory module 202f, the switch module 202g, and 塡The functions implemented by the respective operations of the supplementary image generation module 202h are the same as those of the decoding unit 2 1, the decoding mode judgment unit 22, the predicted image generation unit 23, the inverse conversion unit 24, the addition unit 2 5, and the memory unit 1 of the aforementioned image decoding device 2. 6. Switch 2 7. Each of the supplementary image generating units 28 has the same function. If the image decoding device 2 of the first embodiment is used, it can effectively decode the image encoded by the image encoding device 1. That is, the prediction image generation unit 23 can use a non-connected block not connected to the processing target block when the coding mode of the connected block connected to the processing target block is 塡 -38- 200529673 (35). Play the portrait to generate a predicted portrait. As a result, because not only the playback portrait of the connected block connected to the processing target block, but also the playback portrait of the non-connected block that is not connected to the processing target block, the reference range when generating the predicted portrait is expanded. And reduce the length of space. In addition, when it is determined that the encoding mode is the subsequence coding mode, a fully decoded playback image may be used to generate a supplemental portrait that complements the playback image. Therefore, even if the image in the supplementary coding mode is not transmitted during encoding, it is possible to generate a playback image. In addition, in each of the above-mentioned embodiments, although the in-frame coding process has been described as the image prediction of the predicted image generating units 1 3 and 23, it is not limited to this. For example, motion compensation prediction may be included in Portrait prediction. In this case, it is also possible to encode the motion vector information with an average amount of information. In addition, as this motion compensation prediction, the same method as the motion compensation prediction of MPEG-4 or H.264 which has been used conventionally can be adopted. It is also possible to apply various motion compensation prediction methods. Also, in each of the above embodiments, H. is used. The prediction of the spatial domain used in 264 is used as the in-frame prediction, but the in-frame prediction is not limited to this. For example, the prediction in the frequency domain by MPEG-4 can also be applied. At this time, the above or left connected block encoding or decoded case uses all or part of the connected block conversion coefficients as the encoding. Or predict the conversion coefficient of the target block. If the upper and left connected blocks are both coded or decoded, it shows which of the blocks connected by the upper and left -39- 200529673 (36) edges. Bit data that is encoded as prediction mode information. In addition, in the case where any one of the blocks connected above or to the left is coded or decoded, all or a part of the orthogonal conversion coefficients of the coded or decoded block are used as the prediction frame. On the other hand, in the case where the encoding or decoding of any of the blocks connected above or to the left is not completed, the orthogonal conversion coefficients of all the encoded or decoded blocks located at the distance closest to or above the block are used. Or part of it, as a prediction. However, if the coded or decoded block located closest to the upper and left distance is located at the same distance as the upper and left, the upper and left block shows the conversion coefficient of which block is used. Or a part of it is used as 1-bit data of the prediction frame, and it is encoded as prediction mode information. In addition, if all the blocks above and to the left of the block to be coded or decoded are coded or decoded incompletely, only the DC component is set to 値 (e.g., 1 28) for prediction. In each of the above embodiments, the prediction frame can be set to 0 by in-frame prediction, and the operation can be performed without performing in-frame prediction. In this case, since the redundant length of the space is reduced by introducing the portrait complement mode, the encoding efficiency can also be improved. In each of the above-mentioned embodiments, although the portrait playback process uses a playback image in the same space as the processing target frame to generate a predicted image, it can also be used in a frame different from the processing target frame. The playback image of the frame that generates the playback image at the end is used for the image complementing process. Also, in the above first implementation type, • 40-200529673 (37) produced by the image correction process is still used as the playback image, but in terms of encoding, the predicted image and the predicted residual image of the input image are also The above conversion processing and average message encoding can be performed and included in the bit stream. In this case, in the decoding aspect, the decoded and inversely processed bit stream data is used to generate a restored predicted residual image, and the restored predicted residual image is added by adding the predicted residual image and the predicted image generated by the image complementation process to generate Play portrait. [Third Embodiment] Hereinafter, a third embodiment of the present invention will be described. Figure 16 • Each figure shows the structure of an animation encoding device related to the third embodiment of the present invention. The animation encoding device 3 10 shown in FIG. 16 can be physically configured as, for example, a computer having a CPU (Central Processing Unit), a memory device such as a memory, a display device such as a display, and a communication device. The moving picture encoding device 310 may be a mobile communication terminal such as a mobile phone or a DVD device. That is, the image encoding device 310 can be widely applied to devices capable of information processing. The moving picture encoding device 310 is functionally provided with a domain division unit 312, an encoding mode determination unit (determination means) 3 1 4, an image prediction unit 3 1 6, a subtraction unit 318, a conversion unit (conversion means) 320, and an encoding unit (encoding means) 322. 1. Inverse conversion unit (inverse conversion means) 3 24. Addition unit (playback image generation means) 3 2 6 and image memory unit (memory means) 3 2 8. The field segmentation section 312 sequentially sets each frame of the input image (animation) as a frame to be encoded, and divides the frame to be encoded into a plurality of partial regions (hereinafter referred to as microblocks) of a specific size. The specific size may be, for example, a size of 16 × 16 pixels, but is not limited thereto, and may be other sizes. -41-(38) (38) 200529673 The domain segmentation section 312 generates the microblock position information for limiting the microblock. For example, the location information of the microblocks can be an integer number marked from large to small according to the scanning order of the light spots in each microblock in the frame. In addition, the position information of the microblocks can use the pixel coordinates located at the front of the microblocks according to the scanning order of the light spots. The encoding mode determination unit 314 obtains the encoding mode of each microblock, and outputs the encoding mode information that restricts the encoding mode to the portrait prediction unit 316 and the encoding unit 322. In this implementation form, the coding mode information is used to limit the information that should be used to generate the predicted image of the microblock by the first image prediction process or the second image prediction process. In the following, the first image prediction process is set to motion compensation prediction, and this embodiment will be described. In the description below, the encoding mode when the micro-block is processed by the first image prediction process is set to the P mode, and the encoding mode when the micro-block is processed by the second image prediction process is set to the C mode. The first image prediction process may be, for example, a known Internet frame prediction process. Details of the first image prediction process and the second image prediction process will be described later. The image predicting unit 3 1 6 generates a predicted image of a microblock to be processed based on the encoding mode information output by the encoding mode determining unit 3 1 4 using either the first image predicting process or the second image predicting process. The image prediction unit 3 1 6 processes the microblocks in the first image prediction process, and outputs the motion vector of the prediction assistance information to the encoding unit 322. Details of the portrait prediction section 316 will be described later.丨 The subtraction unit 3 1 8 performs the prediction image of the processing target microblock generated by the image prediction unit 3 1 6 and the processing pair output from the domain segmentation unit 3 1 2 -42- 200529673 (39) Image microblock The difference between the input portraits is calculated to produce a predicted residual portrait. The conversion unit 320 converts the predicted residual image and generates conversion information. For this conversion, conversion processing and dequantization processing such as DCT (Discrete Cosine Transform) can be used. In this case, the conversion information includes a set of quantization coefficients. The DCT can be a 2-dimensional element DCT with 4 rows and 4 columns, or a 2-dimensional element DCT with 8 rows and 8 歹 ij. In addition, this conversion can use arbitrary conversion processing such as 4 rows and 4 columns of integer straight-line conversion and quantization, MP method (Matiching Pursuit), or vector quantization and wavelet transform (Quantum) used in H · 264.化 处理。 Processing. The encoding unit 3 22 encodes the microblock position information from the domain segmentation unit 312, the encoding mode information from the encoding mode determination unit 314, and the motion vector from the image prediction unit 3 1 6 and the conversion from the average information amount. The encoding processing such as conversion information of the unit 320 is encoded, and the encoding result is included in the bit stream and output. The anti-conversion section 324 generates a re-predicted residual image by re-converting the conversion information from the transform section 320 to return the predicted residual image. In the case where the conversion information includes the quantization coefficient set, the inverse conversion unit 324 performs an inverse quantization process and an inverse conversion process on the quantized coefficients, and generates a return prediction residual image. The adding section 3 2 6 generates a playback image by adding the predicted predicted residual image from the inverse conversion section 3 2 4 and the predicted image from the image prediction section 3 1 6 to the playback image frame, which is then stored in the playback frame. Portrait memory 328. In addition, in the case where the range of the picture element 画像 of the image data is set, the addition unit 326 may also capture the picture element 结果 of the addition result in order to condense within the range. -43- 200529673 (40) Recording 100 million copies of 3, 2 8 memories, complete the micro-blocks of the encoding target frame, and play the playback frame and reference frame of the portrait. This reference frame is a playback frame that is different from the encoding object. In this embodiment, it is a playback frame before a frame. The encoding mode determination unit 3 1 4 will be described below. Fig. 17 is a diagram for explaining the processing of the encoding mode determining section. Regarding Fig. 17, the area of the quadrangle is represented as a block, and the solid line and dotted line marked with arrows indicate the scanning order. As shown in (a) of this figure, the encoding mode determination unit 314 firstly generates a first image prediction process (motion compensation prediction process) in a specific scanning order (for example, a light spot scanning order) by encoding the target frame The predicted pictures of all the microblocks (that is, the predicted pictures are generated in the P mode), and the playback picture frame formed by the playback pictures of all the microblocks of the coding target frame are generated. The encoding mode decision unit 314 is as shown in this figure (b). As shown, in the scanning order opposite to the above, by generating a pre-drawn portrait of all the microblocks of the coding mode object frame of the second picture prediction process, a playback portrait of all the microblocks of the coding object frame is generated. 1 Encoding mode determination unit 3 1 4 When the second image prediction process is used to generate the predicted image, the micro-blocks of the lithium object are 'adopted to play the image in the micro-block located in a specific scanning order' The scanning order is located in the rear microblock, the playback image of the microblock with the encoding mode 1>, and the reference frame recorded in the image memory 328. For example, as shown in (c) of this figure, if the micro-block marked "A" is set as the micro-region of the processing object -44- (41) (41) 200529673, the micro-block of the playback frame will be used. , Compared to the playback portrait of the microblock in front of block A, compared to the playback portrait of the microblock behind A and the encoding mode is P mode (microblock labeled "P" in the figure), and The reference frame stored in the image storage section 3 28 performs the second image prediction process. The details related to the second image prediction process will be described later. Each time the encoding mode determination unit 3 1 4 generates a playback image after the second image prediction process, it calculates the costs associated with the playback image generated by the second image prediction process and the playback image generated by the second image prediction process. Decide the encoding mode. This cost is, for example, the number of bits R required for encoding the microblock of the processing target, the square D of the error between each pixel of the playback image of the microblock and each image of the input image of the microblock, and a preset value. When the coefficient is set to λ, D + λ and R are calculated. The encoding mode determination unit 314 selects the P mode or the C mode, and the mode with the lower cost is set to the encoding mode. In addition, the cost can be calculated from various functions if it can show coding efficiency or / and portraits. The image prediction unit 316 will be described in detail below. Fig. 18 is a block diagram showing the structure of the image predicting section 3 1 6. The image prediction unit 3 1 6 includes a mode switching unit 3 3 0, a first image prediction unit (first image prediction means) 3 32, and a second image prediction unit (second image prediction means) 3 3 4. The mode switching unit 330 receives the encoding mode information from the encoding mode determining unit 314, and activates the first image prediction unit 3 3 2 or the second image prediction unit 3 34 according to the encoding mode defined by the encoding mode information. 34 The mode switching unit 3 3 0, when the encoding mode is P mode, the first day image prediction unit -45- 200529673 (42) 3 3 2 is activated, and when the encoding mode is C mode, the second image prediction unit 3 3 4 is activated. In the animation encoding device 310, the 'mode switching unit 330' first generates the predicted portraits of all the micro-blocks in the encoding target frame by using the first image prediction unit 3 3 2 and the encoding mode is the P-mode. Thereafter, the mode switching unit 3 3 0 generates predicted pictures of all the micro-blocks in the coding object frame with the second picture prediction unit 3 3 4 in the coding mode of the C-mode. The first image prediction unit 332, 'as described above, generates a playback image by the first image prediction process, that is, the motion compensation prediction process. The so-called motion compensation prediction processing is to match the input image of the target microblock with the block matching in any area of the reference frame, and use the part of the image with the highest correlation in the reference frame area as the playback image. Processing of moving vectors to the field. This relationship uses, for example, the square D of the difference between the input image of the microblock processed by the object and the playback image of the matched object's field, the data length R required for encoding the motion vector from the processed microblock to the field, and The predetermined coefficient λ is calculated from a reference function of D + λ R. In addition, the motion compensation prediction process can also be performed by using an image with upsampling reference frames of 2 or 4 times. In addition, the motion compensation prediction process may be performed on a microblock divided into smaller blocks. At this time, a block partitioning pattern indicating the movement vector of each small block and the type of microblock partitioning will be output. The second image prediction unit 3 3 4 uses the second image prediction processing to generate a predicted image of a microblock whose encoding mode is C mode. Fig. 19 is a diagram for explaining the second image prediction processing -46- 200529673 (43). In the second image prediction process, 'the microblock Y where no image is played is selected. In this micro-block Y, an unprocessed pixel ′ of a picture element 预测 (prediction signal) to which an image is played is selected, and a template T is set in which this picture element is included. In this implementation form, although the template T mainly composed of the above-mentioned unprocessed pixels is set, if the processed and unprocessed pixels are included, the template T can be of any size and shape. For the microblock γ, a reference area R of an arbitrary size is set relative to the playback frame F1. Also, for the reference stored in the portrait memory 328. In frame F2, the reference area R is also set. Reference collar for frame F2 •. The field R may also be set at a position corresponding to the reference frame F2 set at the position of the reference field R of the playback frame F1. Alternatively, the reference area R of the reference frame F2 may also be set at a position deviated from the motion vector generated by median in the motion vector corresponding to the microblock around the microblock Y. In the second image prediction process, the candidate field S of the generated playback image located at an arbitrary position in the reference field R is calculated to correlate with the template T, and the candidate field with the highest correlation selects the copy reference field Sc. This correlation is for example modulo. The corresponding positions of the board T and the candidate field S generate pixels for playing the picture pixels ,, which are set as effective pixels. The square of the difference 値 between the template T and the pixels 有效 of the effective pixels in the candidate field S, that is, The matching error M is calculated from 値 divided by the effective pixel number U. In addition, if the correlation can present the pixel similarity of the template T and the candidate field S, it can also be calculated by various calculation methods. In the second image prediction process, on the unprocessed pixels in the template T that have not been played with the image, the corresponding reference field Sc is copied-47- 200529673 (44) The pixels of the pixel are used as塡 make up pixels 値. In FIG. 19, only the part where the playback image of the template T has been generated is marked with a diagonal line. In Fig. 19, "the area in which the playback image is not generated in the template D (the lower part of the template D)" is presented and copied to the lower reference pixel SC. In the second image prediction process, the relevant microblocks are repeatedly selected up to the unprocessed pixels of the picture element to which the picture is played, and the picture is repeatedly selected. The operation of the moving picture encoding device 3 10 will be described below. At the same time, an animation coding method related to the implementation form of the present invention will be described. FIG. 20 is a flowchart showing a method of animation coding related to the third embodiment. As shown in FIG. 20, in the encoding process of the animation encoding device 310, the encoding target frame is divided into a plurality of microblocks by the domain segmentation unit 312 (step S301). The domain segmentation unit 312 generates the above-mentioned microblock position information. Next, an encoding mode determination process for determining the encoding mode of each microblock by the encoding mode determination unit 314 is performed (step S302). Fig. 21 is a flowchart showing a coding mode decision process of the animation coding method according to the third embodiment. As shown in FIG. 21, in the encoding mode determination process, first, according to the scanning order (light spot scanning order), the first image prediction process (motion compensation prediction process) is used to generate the playback images of all microblocks. Play frame (step S302-1). Then, follow the scan order. The last microblock is the processing target microblock (step S3 02-2), and the second image prediction process described above is executed. In the second image prediction process. As shown above, the play block generated by step S3 02-1 is used to scan the microblock of the processing object. -48- 200529673 (45) The playback image of the micro area & the scan order is located in the front, and the micro block of the processing object is located in the micro block in the scan order. The encoding mode is P_micro, block The playback image and the reference frame to generate the playback image. Second, the cost of the playback image of the processing target microblock generated in step S3 02-3 and the processing of the playback image of the processing target microblock generated in step S3 02-1 are based on the cost function described above. Calculation (step S3 02-4). Next, in the first portrait prediction process, that is, the P mode, or the second portrait prediction process, that is, the C mode, a lower cost mode is selected as the encoding mode (step S302-5). % Furthermore, it is tested whether the processing of all microblocks is completed (step S302-6). When all microblock processing ends (Yes), the encoding mode is ended and the processing is determined. On the other hand, in the case that all microblock processing is not completed (No), in accordance with the reverse scanning order, a microblock with an undecided encoding mode is selected (step S302-7), and steps S302-3 to S302 are repeated. -6 processing. Returning to Fig. 20, in the animation encoding device 310, encoding mode information is encoded by the encoding unit 322 (step S303). Then, the mode switching unit 330 selects a microblock as a processing object according to a specific scanning order (for example, a light spot scanning order), and tests whether the coding mode of the processing microblock is P mode (first image (Prediction processing) (step S304). When the encoding mode is not P mode (No), the manufacturing process moves to step S312. On the other hand, when the encoding mode is P mode (Yes), the mode switching unit 3 3 0 activates the first image prediction unit 3 3 2 and generates a predicted image of the microblock to be processed by the first image prediction process (step S3 05 -49- 200529673 (46)) ° Furthermore, the subtraction unit 318 generates a predicted residual image formed by the difference between the input image and the predicted image of the processing target microblock (step S3 06). Next, the predicted residual image is converted into conversion information by the conversion unit 320 (step S307). Then, the motion vector and the conversion information are encoded by the encoding unit 322 with the average information amount (step S 3 0 8). Next, inverse conversion is performed on the conversion information by the inverse conversion section 324, and a return prediction residual image is generated to return the prediction residual image (step S3 09). Furthermore, the addition residual unit 326 adds the predicted residual image and the predicted image from the image prediction unit 3 16 to generate a playback image of the processing target microblock (step S3 1 0). The playback picture is grouped into a playback frame and stored in the picture memory 3 2 8 (step S 3 1 1). Furthermore, it is tested whether the processing of all the microblocks is completed (step S312). In the case where the processing of all the microblocks is not completed (No), the unprocessed microblock is selected (step S302-7), and the processing from step S304 to step S312 is repeatedly performed. On the other hand, if all microblock processing is completed (Yes), the process moves to step S313. In step S3 13, the mode switching unit 3 3 0 selects a microblock as a processing object according to a specific scanning order (for example, a light spot scanning order), and tests whether the coding mode of the processing microblock is C mode (second image prediction processing). When the coding mode is not the C mode (No), the process moves to step S312. On the other hand, when the encoding mode is C mode (Yes), the mode switching unit 3 3 0 activates the second image prediction unit 3 34 and processes the second image prediction -50- 200529673 (47) to generate a micro target. The predicted portrait of the block (step S3 1 4). Fig. 22 is a flowchart showing a second picture prediction process of the animation coding method according to the third embodiment. As shown in Fig. 22, in the second image prediction process, a block in which a playback image is not generated is selected. In this embodiment, the microblocks whose coding mode is C mode are set as the microblocks to be processed, and are selected according to a specific scanning order (step S3 14-1). Next, as described above, the reference area for the microblock to be processed is set (step S314-2). Next, select a pixel in which no playback image is generated in the microblock (step S314-3), and set a template that includes this pixel in a part of it (step S3 14-4). As shown above, the correlation between this template and the candidate fields of the reference field is calculated (step S3 14-5), and the candidate field with the highest correlation is selected as the copy reference field (step S314-6). Secondly, copy the unprocessed pixels in the template to which the picture element 値 of the image is not played, and copy the picture element 値 of the corresponding pixel in the reference area (step S3 14-7). Then, in the micro block of the test processing object, Are there any unprocessed pixels that have not been played back? (Step S314-8). If there is an unprocessed pixel (Yes), select the unprocessed pixel (step S314-9), and repeat steps S314-4 to S314-8. On the other hand, if there is no unprocessed pixel in the processing target microblock, the second image prediction process is terminated (step S314). Returning to FIG. 20, in the animation encoding device 310, the subtraction unit 318 generates a difference between the input image of the processing target microblock and the second image prediction section-51-200529673 (48). The predicted residual image formed (step S315). ~ Next, the predicted residual image is converted into conversion information by the conversion unit 320 (step S3 16). Then, the encoding unit 322 averages the amount of information to encode the conversion information (step S3 17). The inverse conversion section 324 performs inverse conversion on the conversion information, and generates a return prediction residual image that returns the predicted residual image (step S3 1 8). In addition, by adding an addition section 3 2 6, the restored prediction residual image and the predicted image from the image prediction section 3 1 6 are added to generate a playback image of the processing target microblock (step S3 1 9 >. Playback The portraits are grouped into the play frame and stored in the portrait memory 3 2 8 (step S 3 2 0). Furthermore, it is tested whether the processing of all micro-blocks is completed (step S 3 1 2). The processing of all micro-blocks is not completed. (No), select ^ unprocessed microblocks (step S3 02-7), and repeat the processing from step S3 04 to step S312. On the other hand, all microblock processing ends (Yes) The encoding process will be ended. In the following, the animation encoding program that sets the computer as an animation encoding device 3 10 will be described. Fig. 23 shows the structure of the animation encoding program related to the third embodiment and the recording media. The animation coding program 340 shown in FIG. 23 is stored in the recording medium 100 for use. The recording medium 100 is, for example, a recording medium such as a magnetic disk, CD-ROM, DVD, or ROM, or a semiconductor memory. Media 100 Into the reading device 112, the computer 110 (refer to FIG. 14 and FIG. 15) will be able to access the animation encoding program 340 stored in the recording medium-52-200529673 (49) 100 from the reading device 112, and may encode by the animation The program 340 operates as the animation encoding device 310. As shown in FIG. 15, the animation encoding program 3 40 can also be provided as a computer data signal 130 that is superimposed on a carrier wave, and provided through the network. At this time, the computer 1 10 can The animation encoding program 3 40 received by the communication device 124 is stored in the memory 116, and the animation encoding program 340 is executed. As shown in FIG. 23, the animation encoding program 3 4 〇 is provided with a main module 341 and a field with overall processing. Segmentation module 342, encoding mode determination module 344, portrait prediction module 346, subtraction module 348, conversion module 3 50, encoding module 3 5 2, inverse conversion module 3 54, addition module 3 56 and Image memory module 3 5 8. The image prediction module 346 includes a mode switching module 3 60, a first image prediction module 3 62, and a second image prediction module 364. A domain segmentation module 342 and a coding mode determination module 344, portrait prediction module 346, subtraction module 348, turn Module 3 50, encoding module 352, reverse conversion module 3 5 4, addition module 3 5 6, image memory module 3 5 8, mode switching module 360, first image prediction module 362 and second image The prediction modules 3 64 each execute the functions of a computer, and the above-mentioned domain division section 3 1 2, encoding mode determination section 3 1 4, image prediction section 3 1 6, subtraction section 3 1 8, conversion section 320, encoding section 322, The inverse conversion unit 324, the addition unit 326, and the portrait memory unit 328, the mode switching unit 330, the first image prediction unit 332, and the second image prediction unit 334 are the same. In the following, the functions and effects of the animation encoding device 3 10 will be described. If the image encoding device 3 10 of the third embodiment is used, the encoding mode is C-mode micro-blocks, that is, predictions generated by the second image prediction process-53- 200529673 (50) micro-blocks of images, Since it is not necessary to include the data generated based on the prediction assistance information in the bit stream, a bit stream with high coding efficiency is generated. In the moving picture encoding device 310, the second picture prediction unit 3 34 generates a predicted picture by using the reference picture frame and the playback picture frame of the encoding target zombie frame. This play frame includes a play image completely generated through the first picture prediction process and the second picture prediction process. That is, the second image prediction unit 334 generates a predicted image by using a reference frame formed by a playback image of a frame different from the encoding target frame and a playback frame formed by a playback item of the encoding target frame. . As a result, coded data can be produced which can reduce the verbosity of the time direction and the space direction.丨 In the second image prediction process, a play frame including a playback image completely generated through the first image prediction process and the second image prediction process is used. Therefore, it is also possible to use a playback image located behind due to the scanning order for prediction, so that the redundant length in the spatial direction can be effectively reduced. [Fourth embodiment] The following is a description of an animation decoding device according to a fourth embodiment of the present invention. Fig. 24 is a diagram showing the structure of an animation decoding device according to a fourth embodiment of the present invention. The animation decoding device 3 70 shown in FIG. 24 can be physically a computer equipped with a memory device such as a CPU (Central Processing Unit), a memory, a display device such as a display, and a communication device. The animation decoding device 3 70 may be a mobile communication terminal such as a mobile phone or a DVD device. That is, the animation decoding device 3 70 can be widely used as an information processing device-54- 200529673 (51) As shown in FIG. 24, the animation decoding device 3 70 has a solution means) 372 and an inverse conversion unit (inverse conversion means) 3 74 , 3 76, the addition department (playing portrait generation means) 3 78 and painting memory means) 3 80. -The decoding unit 3 72 receives the input bit stream and decodes the bit stream 372 which receives the bit stream generated by the animation encoding device 310 to decode the bit stream to generate microblock location information, motion vectors, and conversion. Information. The inverse conversion unit 3 74 receives the conversion information from the decoding unit 3 72 and performs inverse conversion on the micro-block conversion information of the object, thereby generating a micro-block response prediction residual image. The inverse conversion unit 374 outputs the residual image to the addition unit 3 7 8. In addition, the processing of the inverse conversion unit and the inverse conversion unit 324 of the moving picture encoding device 310 ○ The image prediction unit 376 generates a microblock to be processed and outputs the predicted image to the addition unit 3 7 8. Portrait prediction i mode switching section 3 82, first portrait prediction section (first portrait 3 8 4 and second portrait prediction section (second portrait prediction means) switching section 382 is the first portrait based on the encoding mode from the decoding section 3 72 The prediction section 3 8 4 or the second image prediction section 3 8 6. The measurement section 3 84 generates a prediction image for the processing by the first image prediction processing; the second image prediction section 3 86 generates the processing envelope by the second image. Predicted portraits of image microblocks. The processing performed by these elements included in 3 76 is the same as the animation encoding ^ code section (decoded image prediction section image memory section) (the bit stream. Situation, decoding, encoding mode • :; **, and in the process of processing the target object, this reply predicts the same processing of the predicted image as 374, and the department has the prediction method) 3 86. Mode information, start the microblock image prediction processing image of the first image pre-image Prediction section device 3 1 0-55- 200529673 (52) Processing performed by the corresponding elements of the portrait prediction section 3 1 6. The addition section 3 7 8 adds the predicted portrait from the portrait prediction section 3 76 and the inverse conversion section 3 Residual Predictions of 74 Image, to generate a predicted image of the microblock of the processing object, and store it in the image memory section 3 80. Furthermore, when the specific range of the image element 値 of the image data is set, the addition unit 378 may limit the pixel 値 to Capture processing is performed within this range. The image memory section 380 stores the playback frame and the reference frame of the decoded object frame that has been generated to play the image. The reference frame is shown above, which is related to the decoding object. The playback frame of the frame with a different frame is, in this embodiment, the playback frame before one of the frames of the decoding target frame. The operation of the animation decoding device 370 will be described below. FIG. 25 shows the fourth A flowchart of a method for implementing a type-dependent animation decoding method. As shown in FIG. 25, in the decoding process of the animation decoding device 370, first, the decoding section 3 72 decodes the encoding mode information of all the microblocks of the object frame, from The bit stream is decoded (step S331). Next, the mode switching unit 382 selects a microblock as a processing object according to a specific scanning order (such as a light spot scanning order), and tests the microblock of the processing object. Whether the encoding mode is the P mode (the first portrait prediction process) (step S 3 3 2). If the encoding mode is not the P mode (No), the process moves to step S 3 38. On the other hand, the encoding mode is the P mode In case (Yes), the decoding unit 3 72 decodes the conversion information and the motion vector of the processing target microblock from the bit stream average information amount (step S3 3 3). Furthermore, the mode switching unit 3 82 starts the first The image prediction unit 384 generates a predicted image of the microblock to be processed by the first image prediction process (-56- 200529673 (53) step S 3 4). Next, the inverse conversion unit 3 74 performs inverse conversion on the conversion information to generate a revertive prediction residual image (step S3 3 5). Next, the addition unit 3 7 8 adds this to the predicted residual image and the predicted image, and generates a playback image (step S 3 3 6). This playback picture is grouped into a playback frame and memorized in the picture memory section 3 80 (step S3 3 7). Next, it is tested whether the processing of all the microblocks is completed (step S3 38). If all block processing is not completed (No), select the unprocessed microblock. And repeat the processing from step S3 32 to step S 3 3 8. • On the other hand, if all block processing ends (Yes), the process moves to step S3 39. In step S3 39, the mode switching unit 82 selects a microblock as a processing object according to a specific scanning sequence (such as a light spot scanning sequence), and tests whether the coding mode of the processing microblock is C mode. (Second image prediction processing) (Step S3 3 9). When the encoding mode is not C mode (No), the process moves to step S3 45. On the other hand, when the encoding mode is the C mode (Yes), the decoding unit 3 72 decodes the conversion information of the microblock to be processed from the bit stream average information amount (step S340). Furthermore, the mode switching unit 3 82 activates the second image prediction unit 3 86 and generates a predicted image of the processing target microblock by the second image prediction processing (step S341). Next, the inverse conversion section 374 performs inverse conversion on the conversion information, and generates a return prediction residual image (step S342). Furthermore, the addition unit 3 78 adds this to the predicted residual image and the predicted image to generate a playback image (step S 3 43). This playback picture is grouped into the playback picture frame, and is stored in -57- 200529673 (54) in the portrait memory section 380 (step S344). Furthermore, it is tested whether the processing of all the microblocks is completed (step S3 45). In the case where all microblock processing is not completed (No) ', an unprocessed microblock is selected, and the processing from step S339 to step S345 is repeatedly performed. On the other hand, if all microblock processing ends (Yes), the decoding process ends. The following describes a video decoding program that operates a computer as the video decoding device 3 70. Fig. 26 is a diagram showing a structure of a video decoding program related to a fourth embodiment and a recording medium. The animation decoding program 3 90 ′ shown in FIG. 26 is stored in a recording medium 100 and provided for use. The recording medium 100 is, for example, a recording medium such as a magnetic disk, a CD-ROM, a DVD, or a ROM, or a semiconductor memory. If the recording medium 100 is inserted into the reading device 112, the computer 110 (refer to FIG. 1 and FIG. 15) can access the animation decoding program 390 stored in the recording medium 100 from the reading device 112, and can use the animation The decoding program 390 operates as a video decoding device 3 70. As shown in Figure 15, the animation decoding program 3 90 can also be made. It is a computer data signal 130 which is superimposed on the carrier wave and is provided via the network. At this time, the computer 110 can store the animation encoding program 340 received by the communication device 124 into the memory 116 and execute the animation decoding program 390. As shown in FIG. 26, the animation decoding program 390 is provided with a main module 39 for overall processing, a decoding module 392, an inverse conversion module 3 94, an image prediction module 3 96, an addition module 3 98, and an image memory module. 400. The portrait prediction module 3 96 includes a mode switching module 402, a first portrait prediction module 404-58-200529673 (55), and a second portrait prediction module 406. Decoding module 3 9 2, reverse conversion module 3 9 4, portrait prediction module 3 9 6, addition module 3 9 8 and portrait memory module 4 0 0, mode switching module 4 0 2, first portrait prediction The module 404 and the second image prediction module 406 each execute a function of a computer, and the above-mentioned decoding section 372, inverse conversion section 3 74, portrait prediction section 3 7 6, addition section 3 7 8, image storage section 3 8 0, In the mode switching section 38, the first image prediction section 384, and the second image prediction section 386, the corresponding element functions are the same. As described above, the animation decoding device 370 can restore the animation based on the bit stream generated by the animation encoding device 3 10. In addition, the animation decoding device 370 can generate micro-blocks whose coding mode is C mode, that is, micro-blocks that generate predicted pictures by the second picture prediction process, without generating prediction assistance information such as motion vectors from the encoding side. Forecast portrait. The present invention is not limited to the above-mentioned third and fourth embodiments, and can be variously modified. For example, in the third embodiment and the second portrait prediction process, a playback frame formed by referring to a playback image of a frame to be encoded is referred to. It is also possible to replace the playback picture frame here, and the second picture prediction process can also be realized by referring to the encoding object picture frame, that is, the input picture, image body. In addition, the predicted image generated by the second image prediction processing may still be used as the playback image V. At this time, the encoded residual data of the predicted residual image formed by the difference between the predicted image and the input image generated by the second image prediction processing, It does not need to be included in the bit stream, so a bit stream with higher coding efficiency can be generated. Regarding the characteristics of animation, the part that moves more and the part that moves less -59- 200529673 (56) The background part is known. You can also save by referring to the table of the encoding mode of each microblock in advance. Determine the processing of the encoding mode. The above 'as shown in the description of the best mode of implementation of the present invention, if the present invention is used,' an image encoding device for effectively encoding an image, an image encoding method, an image encoding program, and an image encoding device which can be generated from the image encoding device of the present invention can be provided. An image decoding device, an image decoding method, and a day image decoding program for the bit stream return image. [Brief Description of the Drawings] Fig. 1 is a structural diagram showing an image encoding device related to the first embodiment. FIG. 2 is a diagram illustrating the content of a portrait prediction process. FIG. 3 is a diagram illustrating the content of a portrait prediction process. FIG. 4 is a diagram showing a description of a replacement pixel. FIG. 5 is a diagram showing a description of a replacement pixel. FIG. 6 is a diagram illustrating the content of the image correction processing. ® 7 is a flowchart showing the operation of the image encoding device for image encoding processing. _ 8 is a diagram of the structure of a recording medium representing a recording image coding program. Fig. 9 is a block diagram showing a picture decoding apparatus according to the second embodiment. •. FIG. 10 is a flowchart showing a general operation of the image decoding process. FIG. 11 is a flowchart showing the operation of the prediction picture decoding process. FIG. 12 is a flow chart showing the operation of the pseudo-image decoding process. -60- 200529673 (57) Fig. 13 shows the structure of a recording medium for the recording image decoding process. Figure 14 is a diagram showing the hardware structure of a computer used to execute programs stored in a recording medium. Fig. 15 is a perspective view showing a computer for executing a program stored in a recording medium. . Fig. 16 is a block diagram showing a moving picture coding apparatus according to a third embodiment. FIG. 17 is a diagram illustrating processing by a coding mode determination unit. FIG. 18 is a block diagram showing the fabrication of the image prediction section. FIG. 19 is a diagram illustrating the second image prediction image processing. Fig. 20 is a flowchart showing a type-dependent animation coding method according to the third embodiment. Fig. 21 is a flowchart showing a coding mode determination process of a moving picture coding method according to the third embodiment. FIG. 22 is a flowchart showing a second image prediction process. FIG. 23 is a diagram showing the structure of the animation coding program related to the third Binsch type and the recording medium. Fig. 24 is a block diagram showing an animation decoding apparatus according to the fourth embodiment. Fig. 25 is a flowchart showing a mode-dependent animation decoding method according to the fourth embodiment. Fig. 26 is a diagram showing a common presentation of an animation decoding program and a recording medium related to the fourth embodiment. -61-200529673 (58) [Description of main component symbols] 1 Image encoding device 11 Image segmentation unit 1 2 Encoding mode determination unit 13 Predicted image generation unit 14 Subtraction unit 15 Conversion unit 16 Encoding unit 17 Inverse conversion unit 18 Addition unit 19 Memory Part T Template P Processing target pixel Q Playback pixel S Related field Y Processing target block R Object field S 1 Segmented input image S2 Determine encoding mode S3 Predictive encoding processing mode S4 Generate predicted image S5 Generate predicted residual image S6 Calculate conversion coefficient S7 Average Message Encoding-62- 200529673 (59) S8 Generate playback difference image S9 Generate playback image S 1 0 Store playback image S 1 1 Complete all blocks 101 Program area 102a Image division module 102b Encoding mode determination module 102c Prediction image generation module 102d Subtraction module 1 02e Conversion Group 1 02f encoding module 102g inverse conversion module 1 02h addition module 1 02i memory module 2 image decoding device 2 1 decoding section 22 encoding mode judgment section 23 predictive image generation section 24 reverse conversion section 25 addition section 26 memory Section 27 toggle switch 28 Complementary image generation section S20 Average information decoding-63- 200529673 (60) S30 Predictive image encoding processing S40 Complementary image encoding processing S3 1 Predictive encoding processing mode S32 Generate predictive portrait S33 Generate predictive residual image S34 Generate Play portrait S35 Store play portrait S36 Whether all blocks are finished S41 Subsequent coding processing mode S42 Generate subsequent portrait S43 Store subsequent portrait S44 Whether all blocks end 201 Program area 202 Portrait decoding program 202a Decoding model 202b Encoding mode determination module 202c Prediction image generation module 202d Conversion module group 202e Addition module group 202f. Memory module 202g switch module 202h 塡 supplemental image generation module 110 computer 100 recording media-64-200529673 (61) 1 12 reading device 114 working memory 116 memory 126 CPU 118 display 120 mouse 122 keyboard 124 Communication device 130 Computer data 0 & 3 10 Moving picture encoding device 3 12 Field segmentation unit 3 14 Encoding mode determination unit 3 16 Image prediction unit 3 18 Subtraction unit 320 Conversion unit 322 Encoding unit 324 Inverse conversion unit 326 Addition unit 328 Portrait memory section 330 Mode switching section 332 First portrait prediction section 334th '2 Portrait prediction section FI Play frame F2 Reference frame -65- 200529673 (62) S (Sc) 5301 5302 5303 5304 5305 5306 5307 5308 5309 S3 1 0 S3 1 1 S3 1 2 S3 1 3 S3 14 S3 1 5 S3 1 6 S3 1 7 S3 1 8 S3 1 9 5320 5321 START S302-1 Copy reference field segmentation field decision encoding mode encoding encoding mode information picture 1 Like predictive processing? The first image prediction processing produces a predicted residual image conversion average message encoding inverse conversion addition memory playback image Is all blocks finished? The second image prediction process? The second image prediction processing produces a predicted residual image conversion. Average message encoding Inverse conversion Addition. Playback of the image recorded in billions. Are all blocks completed? The encoding mode determination process performs the first portrait prediction process in the scan order-66-200529673 (63) S302-2 Selects the last block S3 02-3 The second portrait prediction process S302-4 Cost calculation S302-5 Selects the encoding mode S302-6 Do all blocks end? S3 02-7 Select the next block in the reverse scanning order. START 2nd image prediction processing S314-1 Select the block where no playback image is generated S3 14-2 Set the reference area S314-3 Select the unprocessed pixels in the block S3 14 -4 Setting panel · S3 14-5 Calculation related S3 14-6 Select the copy area S3 14-7 Copy the corresponding pixel in the template's unprocessed pixel copy area S314-8 Are there unprocessed pixels in the block? S314-9 Select unprocessed pixels 340 moving image encoding program 341 main module 342 domain segmentation module 344 encoding mode determination module 346 portrait prediction module 3 60 mode switching module 3 62 first portrait prediction module -67- 200529673 (64) 364 No. 348 minus 350 to 352 series 354 anti-356 plus 358 painting 370 action 372 solution 374 anti-376 painting 378 plus 380 painting 382 die S33 1 solution S332 No. S333 flat S334 No. S335 anti-S3 3 6 plus S337 save S338 S339 No. S340 Flat 2 Image Prediction Module Method Module Change Module Code Module Change Module Method Module Image Memory Module Image Decoding Device Code Section Conversion Section Image Prediction Section Law Section Image Memory Section Switching Section Code Coding Model 1 portrait prediction processing? Decoding of average message amount 1 Image prediction processing Conversion method Store and play image Are there any blocks? 2 Image prediction processing? Average Message Decoding -68-200529673 (65) S34 1 No. S3 42 No. S3 43 Plus S344 No. S345 No. 384 No. 386 No. 390 No. 39 1 Main 392 Solution No. 394 No. 396 No. 398 Picture No. 398 No. 400 No. 402 No. 404 No. 406 No. 2 Portrait prediction processing conversion method. Does the playback frame have blocks? 1Image prediction section 2Image prediction section Image decoding program module Code module-conversion module Image prediction module Method module Image memory module Switching module 1Image prediction module 2Image prediction module -69-