JP2004088135A - Image encoder and image decoder - Google Patents

Image encoder and image decoder Download PDF

Info

Publication number
JP2004088135A
JP2004088135A JP2002204716A JP2002204716A JP2004088135A JP 2004088135 A JP2004088135 A JP 2004088135A JP 2002204716 A JP2002204716 A JP 2002204716A JP 2002204716 A JP2002204716 A JP 2002204716A JP 2004088135 A JP2004088135 A JP 2004088135A
Authority
JP
Japan
Prior art keywords
memory
storage area
image
storage
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002204716A
Other languages
Japanese (ja)
Inventor
Shinya Sumino
角野 眞也
Toshiyuki Kondo
近藤 敏志
Makoto Hagai
羽飼 誠
Seishi Abe
安倍 清史
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002204716A priority Critical patent/JP2004088135A/en
Publication of JP2004088135A publication Critical patent/JP2004088135A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image encoder and an image decoder wherein dissidence between encoding processing and decoding processing of an image associated with an area reallocation (reallocation of a storage capacity of storage areas of a long time memory and a short time memory) is avoided. <P>SOLUTION: The image encoder is provided with: a frame memory for storing frames to two kinds of memories, that is, the short time memory adopting the first-in first-out system and the long time memory adopting the random access system; and a missing short time memory detection section 150 that decides a memory area in which the frame is stored at the oldest time in the short time memory and makes the memory area available for the long time memory through a long time memory deallocating section 133. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、動画像信号を画面間の相関を利用して効率良く符号化する画像符号化方法と画像符号化装置、および符号化されたものを復号化する画像復号化方法と画像復号化装置、並びにそれをソフトウェアで実施するためのプログラムが記録された記録媒体に関する。
【0002】
【従来の技術】
近年、音声,画像,その他の画素値を統合的に扱うマルチメディア時代を迎え、従来からの情報メディア,つまり新聞,雑誌,テレビ,ラジオ,電話等の情報を人に伝達する手段がマルチメディアの対象として取り上げられるようになってきた。一般に、マルチメディアとは、文字だけでなく、図形、音声、特に画像等を同時に関連づけて表すことをいうが、上記従来の情報メディアをマルチメディアの対象とするには、その情報をディジタル形式にして表すことが必須条件となる。
【0003】
ところが、上記各情報メディアの持つ情報量をディジタル情報量として見積もってみると、文字の場合1文字当たりの情報量は1〜2バイトであるのに対し、音声の場合1秒当たり64kbits(電話品質)、さらに動画については1秒当たり100Mbits(現行テレビ受信品質)以上の情報量が必要となり、上記情報メディアでその膨大な情報をディジタル形式でそのまま扱うことは現実的では無い。例えば、テレビ電話は、64kbps〜1.5Mbpsの伝送速度を持つサービス総合ディジタル網(ISDN:Integrated Services Digital Network)によってすでに実用化されているが、テレビ・カメラの映像をそのままISDNで送ることは不可能である。
【0004】
そこで、必要となってくるのが情報の圧縮技術であり、例えば、テレビ電話の場合、ITU(国際電気通信連合 電気通信標準化部門)で国際標準化されたH.261やH.263規格の動画圧縮技術が用いられている。また、MPEG−1規格の情報圧縮技術によると、通常の音楽用CD(コンパクト・ディスク)に音声情報とともに画像情報を入れることも可能となる。
【0005】
ここで、MPEG(Moving Picture Experts Group)とは、動画面信号のデジタル圧縮の国際規格であり、MPEG−1は、動画面信号を1.5Mbpsまで、つまりテレビ信号の情報を約100分の1にまで圧縮する規格である。また、MPEG−1規格を対象とする伝送速度が主として約1.5Mbpsに制限されていることから、さらなる高画質化の要求をみたすべく規格化されたMPEG−2では、動画像信号が2〜15Mbpsに圧縮される。
【0006】
さらに現状では、MPEG−1,MPEG−2と標準化を進めてきた作業グループ(ISO/IEC JTC1/SC29/WG11) によって、より圧縮率が高いMPEG−4が規格化された。MPEG−4では、当初、低ビットレートで効率の高い符号化が可能になるだけでなく、伝送路誤りが発生しても主観的な画質劣化を小さくできる強力な誤り耐性技術も導入されている。また、ISO/IECとITUの共同で次世代画面符号化方式として、JVT(Joint Video Team)の標準化活動が進んでおり、現時点ではジョイント・モデル1(JM1)と呼ばれるものが最新である。
【0007】
図16は従来の画像符号化方法および上記JM1において検討されているメモリの管理方法から想定される画像符号化装置のブロック図である。この画像符号化装置は、動き検出部101、フレームメモリ102、動き補償部103、減算部104、直交変換部105、量子化部106、逆量子化部107、逆直交変換部108、加算部109、可変長符号化部110、長時間メモリサイズ保持部130、メモリサイズ比較部131、消失長時間メモリ検出部132、長時間メモリ開放部133、短時間メモリ開放部134、長時間メモリ移動部135、管理情報符号化部136から構成される。
【0008】
まず、画像を符号化する動作を説明する。動き検出部101は入力画像Vinとフレームメモリ102の参照画像M1を比較し、最も両者の差分値が小さくなる参照画像を示す参照画像番号Idxを特定するとともに、その画素の動き量である動きベクトルMVを算出し、フレームメモリ102と、可変長符号化部110に出力する。
【0009】
動き補償部103は、フレームメモリ102から参照画像番号Idxと動きベクトルMVで示された領域の画素を動き補償参照画像M2として読み出し、所定の演算を行って動き補償画像M3を生成し、加算部109に出力する。
【0010】
減算部104は、入力画像Vinと動き補償画像M3の差分値である残差画像M4を計算して直交変換部105に出力し、直交変換部105は残差画像M4を周波数領域に変換した周波数成分M5を量子化部106に出力する。また量子化部106は周波数成分M5を量子化し、動き補償誤差の量子化値M6を逆量子化部107と可変長符号化部110に出力する。
【0011】
さらに逆量子化部107は量子化値M6を逆量子化して逆直交変換部108に復号周波数成分M7を出力し、逆直交変換部108は復号周波数成分M7の周波数領域から画素の差分値である復号残差画像M8を算出して加算部109に出力する。
【0012】
加算部109は、復号残差画像M8と動き補償画像M3を加算して復号画像信号M9を算出し、その復号画像信号M9をフレームメモリ102に格納する。
一方、可変長符号化部110は、動きベクトルMV、参照画像番号Idx、量子化値M6、および後述する管理情報符号化部136からの管理情報MMCOを符号化し、符号化信号strを外部に出力する。
【0013】
図17(a)および(b)は画像管理方法の説明図であり、それぞれ短時間メモリと長時間メモリを参照画像用メモリであるフレームメモリ102に確保した状態を示している。短時間メモリと長時間メモリを合わせたメモリ領域の数は決まっており、そこに格納される総使用可能画像(フレーム)数は決まっている。
【0014】
従って、長時間メモリのメモリ領域数LTsizeを符号化することで、
短時間メモリのメモリ領域数STsize=総メモリ領域数−長時間メモリのメモリ領域数LTsize
として短時間メモリのメモリ領域数STsizeが得られる。参照画像が記憶されている各領域には参照画像番号Idxが割り当てられている。そして、この参照画像番号Idxによって参照画像が識別される。また、短時間メモリと長時間メモリには画像がまだ記憶されていない領域(unused)があるが、この領域には、参照画像番号Idxが割り当てられない。
【0015】
画像を参照して符号化・復号化を行う場合は、前方画像として参照する画像を参照画像番号Idxで表現する。
動画像符号化は、前方参照画像として複数の画像(フレーム)から任意の画像(フレーム)を参照画像として選択可能である。図18は短時間メモリを用いた画像符号化の説明図である。短時間メモリは直前に復号化した数画像を記憶するものであり、いわゆるMPEG−1やMPEG−2のPピクチャ(前方予測符号化ピクチャ)およびBピクチャ(双方向予測符号化ピクチャ)の参照画像に相当する。
【0016】
図18(a)はPピクチャの予測例である。Pピクチャでは、IピクチャもしくはPピクチャのみを参照することが可能である。Frame 3はFrame 0を参照し、Frame 6はFrame 0またはFrame 3を参照し、Frame 9はFrame 0、Frame 3またはFrame 6を参照して符号化・復号化が行える。
【0017】
図18(b)はBピクチャの予測例である。Bピクチャでは、Iピクチャ、Pピクチャを前方画像として参照することが可能である。後方画像はIピクチャまたはPピクチャで時間的に最も近い画面を1つ参照可能である。Frame 1およびFrame 2はFrame 0を前方参照し、Frame 4およびFrame 5はFrame 0またはFrame 3を参照し、Frame 7およびFrame 8はFrame 0、Frame 3またはFrame 6を参照して符号化・復号化が行える。
なお、Bピクチャの予測では、Iピクチャ、Pピクチャに加え、Bピクチャを前方画像として参照することも導入されているものもある。
【0018】
図19は長時間メモリを用いた画像符号化の説明図である。短時間メモリは時間的に前に(符号化および)復号化した数画像を記憶するものであったが、長時間メモリは時間経過とは無関係に、明示的に画像の記憶および記憶内容の破棄を行うものである。例えば、監視カメラで複数のカメラを切り替えて撮影する際に、各カメラ毎の最終復号画像を長時間メモリに格納しておけば、再度同じカメラで撮影する際に前回同じカメラで撮影し長時間メモリに格納した画像との差分値を符号化すれば、画像間の相関が高く圧縮率が向上できる。
【0019】
図19で対象画像CurFrameの参照画像として、図18で示した短時間メモリよりも古い時刻の画面であるLTFrame 0、LTFrame 1、LTFrame 2、LTFrame 3を参照していることがわかる。このLTFrame 0、LTFrame 1、LTFrame 2、LTFrame 3が長時間メモリに格納される。
【0020】
次に、フレームメモリ102に確保されているメモリの管理の動作を説明する。
長時間メモリサイズ変更信号LTSが外部より入力されると、長時間メモリサイズ変更信号LTSによる長時間メモリの新規のサイズが長時間メモリサイズ保持部130に保持される。そして、すでに長時間メモリサイズ保持部130に保持されている現在のメモリサイズと、長時間メモリサイズ変更信号LTSによる新規のメモリサイズとがメモリサイズ比較部131により比較される。ここで、長時間メモリのメモリサイズはメモリ領域の数に対応する。
【0021】
次に、長時間メモリ開放部133は、メモリサイズ比較部131の比較結果により長時間メモリのメモリサイズが小さくなるときは、消失長時間メモリ検出部132により決定されるメモリ領域を開放して未使用状態にする。
このとき、長時間メモリのうち未使用状態にしたメモリ領域が短時間メモリのメモリ領域として使用できる。
【0022】
また、長時間メモリ開放部133は、外部信号である長時間メモリ開放信号LTDにより示されたメモリ領域を開放して未使用状態にする。そして、短時間メモリ開放部134は、外部から入力される短時間メモリ開放信号STDを受けてフレームメモリ102にある短時間メモリのメモリ領域を未使用状態にする。
【0023】
また、長時間メモリ移動部135は、外部から入力される長時間メモリ移動信号LTMを受けて、フレームメモリ102にある短時間メモリのメモリ領域に記憶されている内容を長時間メモリのメモリ領域に移動させる。
そしてまた、これらの長時間メモリサイズ変更信号LTS、長時間メモリ開放信号LTD、短時間メモリ開放信号STD、長時間メモリ移動信号LTMは、管理情報符号化部136により符号化されて、管理情報MMCOが可変長符号化部110に出力される。
【0024】
上述した図17(a)および(b)は、それぞれ長時間メモリおよび短時間メモリのメモリ領域を変更する前と変更した後の状態を示したものである。図17(a)では、短時間メモリのメモリサイズSTsizeは、画像参照番号Idxが0から5で示されるフレームの格納されている6つの各メモリ領域と、未使用状態の1つのメモリ領域で構成され、長時間メモリのメモリサイズLTsizeは、画像参照番号Idxが6から8で示されるフレームの格納されている3つの各メモリ領域と未使用状態の1つのメモリ領域で構成される。
【0025】
そして、斜線を設けたメモリ領域はフレームが記憶された使用状態であり、斜線のないメモリ領域が未使用状態である。
このとき未使用状態とは、例えば、そのメモリ領域は未使用であるとフラグなどで設定された状態である。
【0026】
この図17(b)では、長時間メモリのメモリサイズLTsizeは2つのメモリ領域で構成され、短時間メモリのメモリサイズSTsizeは9つのメモリ領域で構成されており、変更後は短時間メモリのメモリサイズSTsizeが増加し、長時間メモリのメモリサイズLTsizeが減少している。
一方、図20(a)および(b)は、短時間メモリと長時間メモリの各メモリ領域の変更前と変更後の状態を示しており、変更後で短時間メモリのメモリサイズSTsizeが減少している。
【0027】
図21は従来の画像復号化方法から想定される画像復号化装置のブロック図であり、図16に示された画像符号化装置で符号化された符号化信号strを復号化する。
図21において、図16に示された画像符号化装置のブロック図と同じ動作をするものには同じ番号を付し、その説明を省略する。
【0028】
可変長復号化部120は符号化信号strを復号化し、動きベクトルMV、参照画像番号Idxをフレームメモリ102に出力し、動き補償誤差の量子化値M6を逆量子化部107に出力し、さらに管理情報MMCOを管理情報復号化部236に出力する。
また、量子化値M6は逆量子化部107、逆直交変換部108を介して復号残差画像M8として加算部109に入力される。
【0029】
動き補償部103は、フレームメモリ102から参照画像番号Idx、動きベクトルMVで示された領域の画素を動き補償参照画像M2として読み出し、所定の演算を行って動き補償画像M3を算出し、加算部109へ出力する。
加算部109は、復号残差画像M8と動き補償画像M3を加算して復号画像Voutを出力するとともに、後続画像の復号化で参照するためにフレームメモリ102に出力する。
【0030】
また管理情報復号化部236は、可変長復号化部120から管理情報MMCOを取得して復号化し、長時間メモリサイズ変更信号LTSをフレームメモリ102、長時間メモリサイズ保持部130、メモリサイズ比較部131に出力し、長時間メモリ移動部135に長時間メモリ移動信号LTMを出力する。さらに、管理情報復号化部236は、長時間メモリ開放部133に長時間メモリ開放信号LTDを出力し、短時間メモリ開放部134に短時間メモリ開放信号STDを出力する。
尚、短時間メモリ、長時間メモリのメモリ領域を未使用状態にし、それぞれのメモリ領域を変更する動作は、図16の画像符号化装置と同じためその説明を省略する。
【0031】
以上の構成により、図16の画像符号化装置で符号化された符号化信号strを正しく復号化できる。
以上のようにして、フレームメモリを長時間メモリと短時間メモリに分割して参照画像を格納することで、圧縮の効率を図っている。
【0032】
【発明が解決しようとする課題】
しかしながら、上述した構成であると、メモリ領域の変更時(フレームメモリの領域再配分時)に、短時間メモリのメモリサイズが小さくなる場合は、短時間メモリ内のメモリ領域を未使用状態にするなどの必要があるが、何らかの手当てを施さなければ短時間メモリ内の最新のデータが消えてしまうなどの不都合が生じる。そのために、符号化処理と復号化処理で不一致が生じてしまう。
【0033】
そこで、本発明は上記の課題を解決するためになされたもので、フレームメモリの領域再配分(長時間メモリと短時間メモリの記憶領域の記憶容量の再配分)に伴う画像の符号化処理と復号化処理の不一致を回避した画像符号化装置および画像復号化装置を提供することにある。
【0034】
【課題を解決するための手段】
上記目的を達成するために、本発明に係る画像符号化装置は、入力された画像を参照画像と比較しながら符号化する装置であって、データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段と、前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする再配分手段とを備えることを特徴とする。
【0035】
また、入力された画像を参照画像と比較しながら復号化する装置であって、データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段と、前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする再配分手段とを備えることを特徴とする。
【0036】
また、データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段を用いた画像符号化方法であって、前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にすることを特徴とする。
【0037】
また、データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段を用いた画像復号化方法であって、前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にすることを特徴とする。
【0038】
【発明の実施の形態】
(実施の形態1)
以下、本発明の第1の実施の形態における画像符号化装置を図面を用いて説明する。
図1は、本発明の第1の実施の形態における画像符号化装置の構成を示すブロック図である。
画像符号化装置は、動き検出部101、フレームメモリ102、動き補償部103、減算部104、直交変換部105、量子化部106、逆量子化部107、逆直交変換部108、加算部109、長時間メモリサイズ保持部130、メモリサイズ比較部131、消失長時間メモリ検出部132、長時間メモリ開放部133、消失短時間メモリ検出部150、短時間メモリ開放部134、長時間メモリ移動部135、管理情報符号化部136により構成されている。
【0039】
図16の画像符号化装置のブロック図と同じ動作をする機器は同じ符号を付している。
動き検出部101、フレームメモリ102、動き補償部103、減算部104、直交変換部105、量子化部106、逆量子化部107、逆直交変換部108、加算部109、可変長符号化部110による符号化は図16の場合と同一であるため、その説明を省略する。
【0040】
まず、本画像符号化装置におけるフレームメモリ102の管理の構成を説明する。
長時間メモリサイズ保持部130は、外部より入力される長時間メモリサイズ変更信号LTSを受けて長時間メモリの新規のメモリサイズを順次保持する保持部である。そしてメモリサイズ比較部131は、長時間メモリサイズ保持部130に現在保持されているメモリサイズと、長時間メモリサイズ変更信号LTSにより設定される新規のメモリサイズとを比較し、その比較結果を消失長時間メモリ検出部132と消失短時間メモリ検出部150に出力する。
【0041】
消失長時間メモリ検出部132は、メモリサイズ比較部131の比較結果を受けて、長時間メモリのうち、記憶内容を未使用状態にするメモリ領域を決定して長時間メモリ開放部133にそのメモリ領域のアドレスを示した信号を出力する。
一方、消失短時間メモリ検出部150は、メモリサイズ比較部131の比較結果を受けて、短時間メモリのうち、記憶内容を未使用状態にするメモリ領域を決定して短時間メモリ開放部134にそのメモリ領域のアドレスを示した信号を出力する。
【0042】
長時間メモリ開放部133は、フレームメモリ102の長時間メモリのうち、消失長時間メモリ検出部132により示されたメモリ領域を未使用状態にするとともに、外部から入力される長時間メモリ開放信号LTDにより示されるメモリ領域を未使用状態とする。
ここで未使用状態とは、そのメモリ領域は未使用状態であるとフラグなどで設定された状態である。
【0043】
また、短時間メモリ開放部134は、フレームメモリ102の短時間メモリのうち、消失短時間メモリ検出部150により示されたメモリ領域を未使用状態にするとともに、外部から入力される短時間メモリ開放信号STDにより示されるメモリ領域を未使用状態とする。
【0044】
本願発明では、この消失短時間メモリ検出部150は、短時間メモリのうち古い時刻に記憶されたメモリ領域から順番に未使用状態にしている。
さらに、これらのメモリサイズ変更信号LTS、長時間メモリ開放信号LTD、短時間メモリ開放信号STD、長時間メモリ移動信号LTMは、管理情報符号化部136により符号化されて、管理情報MMCOが可変長符号化部110に出力される
【0045】
また、本実施形態において、フレームメモリ102に確保されている短時間メモリは、先入れ先出し方式(FIFO)のメモリであり、新規のものが記憶されると記憶した時刻が古い記憶内容が順に破棄され、常に最新の一定フレーム数の画像が保存される。不要な画像については、明示的に開放することも可能である。そして、時間が近接する画像のみ保存され、通常のMPEG1/2で使用される参照画像と同じ目的で使用される。
【0046】
一方、長時間メモリは、ランダムアクセス方式のメモリであり、任意の領域にフレームを格納したり、任意の領域に格納されたフレームを読み出したりできる構成を備える。この長時間メモリは、背景画像や、シーン挿入前の画像(1つのシーンに他のシーンを挿入した場合の挿入開始直前)など、長時間後に参照される画像を保存し、上記短時間メモリよりも長い時間分の参照画像を記憶する。
【0047】
また、長時間メモリに記憶する際は、短時間メモリに記憶されたものが長時間メモリに移動するという形式で行われ、長時間メモリ移動部135が長時間メモリ移動信号LTMを受けて、フレームメモリ102に記憶されているメモリのうち、短時間メモリのメモリ領域に記憶されている記憶内容を長時間メモリのメモリ領域に移動させる。
【0048】
このように構成された画像符号化装置において、長時間メモリサイズ変更信号LTSを受けたときの動作を4通りの場合について説明する。
【0049】
まず、図2のフローチャートと図3のメモリ領域の変化を表す図を用いて、第1番目の場合の動作を説明する。第1番目は、長時間メモリと短時間メモリの記憶容量を再配分するとき、長時間メモリのメモリ領域が減少する場合と増加する場合のいずれの場合においても、減少分のメモリ領域をまず未使用状態にしてから各メモリのメモリサイズを変更する例である。
【0050】
図3はフレームメモリ102のメモリのうち、長時間メモリと短時間メモリの各々の状態を示す図である。図3では、メモリ31に示すようにメモリ領域番号A0からA10までの11個のメモリ領域があり、斜線を引いたメモリ領域は使用されており、斜線のないメモリ領域は未使用状態である。
【0051】
そして、短時間メモリはメモリ領域番号A0からA6までの7つのメモリ領域があり、長時間メモリはメモリ領域番号A7からA10までの4つのメモリ領域があり、境界K1により短時間メモリ領域Sと長時間メモリ領域Lとに領域が分割されている。ここで短時間メモリ領域Sのメモリ領域の数が、短時間メモリのメモリサイズに対応し、長時間メモリ領域Lのメモリ領域の数が長時間メモリのメモリサイズに対応する。
【0052】
短時間メモリ領域Sは、メモリ領域番号A0からメモリ領域番号A6の順にメモリに記憶される時刻が古くなっており、メモリ領域番号A6のメモリは未使用状態である。
【0053】
まず、長時間メモリサイズ変更信号LTSが外部より入力されると、メモリサイズ比較部131は、すでに長時間メモリサイズ保持部130に保持されている現在のメモリサイズと、長時間メモリサイズ変更信号LTSによる新規のメモリサイズとを比較する。すなわち、メモリサイズを変更するか否かの判定処理が行われる(ステップS1)。
【0054】
メモリサイズ比較部131の比較結果で長時間メモリのメモリサイズの変更がないと判定された場合(ステップS1のN)は処理を終了するが、メモリサイズの変更があると判定された場合(ステップS1のY)、同じくメモリサイズ比較部131の比較結果より長時間メモリのメモリ領域を減少させるか否かの判定処理が行われる(ステップS2)。
【0055】
そして、長時間メモリのメモリ領域を減少させる(例えば2つのメモリ領域を減少)と判定されたとき(ステップS2のY)、長時間メモリ開放部133は、長時間メモリのうちのメモリで、消失長時間メモリ検出部132により決定されたメモリ領域を未使用状態にする(ステップS3)。
すなわち、図3におけるメモリ32となり、メモリ領域番号A7、A8のメモリ領域が未使用状態となる。
【0056】
つづいて、消失長時間メモリ検出部132は、長時間メモリの未使用状態となったメモリ領域を短時間メモリに属するものとして短時間メモリに加えて記憶し、長時間メモリ領域Lと短時間メモリ領域Sのメモリサイズを変更する(ステップS4)。
【0057】
この状態が図3のメモリ33であり、長時間メモリ領域Lと短時間メモリ領域Sの境界がK1からK2に変更され、短時間メモリはメモリ領域番号A0からA8までの9つのメモリ領域となり、長時間メモリはメモリ領域番号A9、A10の2つのメモリ領域となるよう長時間メモリと短時間メモリの記憶容量が再配分される。
ここでは、長時間メモリのメモリ領域を短時間メモリとして使用可能な状態とするために、その一例として未使用状態としている。
【0058】
一方、上述した長時間メモリのメモリ領域を減少させるか否かの判定処理(ステップS2)において、メモリサイズ比較部131が長時間メモリのメモリ領域を減少させないと判定したとき(ステップS2のN)、短時間メモリのメモリ領域を減少させる(例えば3つのメモリ領域を減少させる)として、短時間メモリ開放部134は短時間メモリのメモリ領域のうち、フレームが記憶された時刻が古いメモリ領域から順に未使用状態にする(ステップS5)。このとき、消失短時間メモリ検出部150により未使用状態にするメモリ領域が決定される。
【0059】
この状態を示すのが、図3のメモリ34であり、短時間メモリ領域Sの古い時刻に記憶されたものから3つのメモリ領域(メモリ領域番号A6、A5、A4)が未使用状態になる。この場合、メモリ領域番号A6のメモリ領域は初めから未使用状態のため、短時間メモリ開放部134は、メモリ領域番号A5、A4のメモリ領域を未使用状態にする。
【0060】
そして、短時間メモリ検出部150は、短時間メモリの未使用状態となったメモリ領域を長時間メモリに属するものとして長時間メモリに加えて記憶し、長時間メモリ領域Lと短時間メモリ領域Sのメモリサイズを変更する。
【0061】
この状態が図3のメモリ35であり、短時間メモリ領域Sと長時間メモリ領域Lの境界がK1からK3に変更され、短時間メモリ領域Sはメモリ領域番号A0からA3までの4つのメモリ領域となり、長時間メモリ領域Lはメモリ領域番号A4からA10までの7つのメモリ領域となるよう長時間メモリと短時間メモリの記憶容量が再配分される(ステップS4)。
【0062】
このような処理は、各メモリ領域に対して、そのメモリ領域が短時間メモリに属するのか、あるいは長時間メモリに属するのかを記憶するテーブルや、そのメモリ領域が使用されているのか、未使用であるのかを記憶するテーブルを設けることで簡単に行うことができる。
【0063】
次に、第2番目の場合の動作を図4のフローチャートと図5の状態の変化を表す図を用いて説明する。第2番目は、長時間メモリと短時間メモリの記憶容量を再配分するとき、長時間メモリのメモリ領域が減少する場合と増加する場合のいずれの場合においても、最初に長時間メモリと短時間メモリの各メモリのメモリサイズを変更して、次に各メモリのうち、一方の減少するメモリ領域を未使用状態にして他方のメモリに移す例である
【0064】
図5のメモリ51は、図3のメモリ31と同様の構成である。
まず、図4のフローチャートで図2と異なる点、すなわち、メモリサイズを変更するか否かの判定処理(ステップS1)で、メモリサイズ比較部131が変更すると判定したとき(ステップS1でY)の処理を説明する。メモリサイズ比較部131がメモリサイズを変更すると判定すると、メモリサイズ比較部131の比較結果に応じて、消失長時間メモリ検出部132あるいは消失短時間メモリ検出部150が長時間メモリ領域Lと短時間メモリ領域Sの境界を変更する。
【0065】
この場合、長時間メモリ領域Lのメモリサイズが小さくなる場合は図5のメモリ52に示すように、長時間メモリ領域Lと短時間メモリ領域Sの境界がK1からK2に変更し、短時間メモリ領域Sのメモリサイズが小さくなる場合は、図5のメモリ54に示すように、境界がK1からK3に変更する。(ステップS11)。
つづいて、メモリサイズ比較部131による長時間メモリのメモリ領域を減少させるか否かを判定する処理(ステップS12)がおこなわれる。
【0066】
このとき、長時間メモリのメモリ領域を減少させると判定されたとき(ステップS12のY)は、図5のメモリ52に示されるように、短時間メモリ領域Sと長時間メモリ領域Lとの境界がK1からK2に変更された(ステップS11において)ということであり、長時間メモリ開放部133は、図5のメモリ53に示すように、消失長時間メモリ検出部132により決定されたメモリ領域(メモリ領域番号A7,A8)を未使用状態にする。そして、消失長時間メモリ検出部132は、未使用状態にしたメモリ領域を短時間メモリ領域Sに移して(ステップS13)、処理を終了する。これにより、メモリ領域が短時間メモリ領域Sと長時間メモリ領域Lに再配分される。
【0067】
一方、メモリサイズ比較部131が、長時間メモリのメモリサイズを減少させないと判定したとき(ステップS12のN)は、図5のメモリ54で示されるように、短時間メモリ領域Sと長時間メモリ領域Lとの境界がK1からK3に変更された(ステップS11において)ということである。
【0068】
つづいて短時間メモリ開放部134は、図5のメモリ55で示すように、短時間メモリのメモリ領域のうちフレームの記憶された時刻が古い順(メモリ領域番号A6、A5,A4の順)に未使用状態にする。この未使用状態にされるメモリ領域は、消失短時間メモリ検出部150により決定される。
【0069】
そして、消失短時間メモリ検出部150は、未使用状態のメモリ領域を長時間メモリ領域Lに移し、ステップS14)、処理を終了する。これにより、メモリ領域が短時間メモリ領域Sと長時間メモリ領域Lに再配分される。
【0070】
上記処理はすなわち、メモリサイズを変更した時点(ステップS11)では、境界K2、あるいはK3により短時間メモリと長時間メモリの領域(短時間メモリ領域Sと長時間メモリ領域L)が決定されたのであって、長時間メモリ、短時間メモリのうちのどのメモリ領域が他方のメモリに移るかは決定していない状態である。
【0071】
つづいて、第3番目の場合の動作を図6のフローチャートと図7の状態の変化を表す図を用いて説明する。第3番目は、長時間メモリと短時間メモリの記憶容量を再配分するとき、長時間メモリのメモリ領域が減少する場合は、減少するメモリ領域を未使用状態にして、各メモリのメモリサイズを変更し、一方長時間メモリのメモリ領域が増加する場合は、まず各メモリのメモリサイズを変更して、次に減少するメモリ領域を未使用状態にし他方のメモリに移す例である。
【0072】
図7のメモリ71の状態は、図3のメモリ31の状態と同様である。
まず、図6のフローチャートで図2と異なる点、すなわち、長時間メモリのメモリ領域を減少させるか否かの判定処理(ステップS2)以降の処理について説明する。
【0073】
メモリサイズ比較部131が、長時間メモリのメモリ領域を減少させると判定したとき(ステップS2でY)、長時間メモリ開放部133は、長時間メモリのうち、消失長時間メモリ検出部132により決定されたメモリ領域を未使用状態にする(ステップS21)。
すなわち、図7におけるメモリ72の状態となり、メモリ領域番号A7、A8のメモリ領域が未使用状態となる。
【0074】
つづいて、消失長時間メモリ検出部132は、図7のメモリ73に示すように、短時間メモリ領域Sと長時間メモリ領域Lの境界をK1からK2に変更し、長時間メモリの未使用状態となったメモリ領域を短時間メモリ領域Sに移し(ステップS22)、処理を終了する。すなわち、長時間メモリと短時間メモリの記憶容量が再配分される。
【0075】
一方、メモリサイズ比較部131が、長時間メモリのメモリ領域を減少させないと判定したとき(ステップS2でN)、消失短時間メモリ検出部150が短時間メモリのメモリ領域の数を減少させるようメモリサイズを変更する(ステップS23)。図7のメモリ74に示す状態がサイズを変更された状態であり、短時間メモリ領域Sと長時間メモリ領域Lの境界がK1からK3に変更されている。
【0076】
つづいて短時間メモリ開放部134は、図7のメモリ75で示すように、短時間メモリのメモリ領域のうちフレームの記憶された時刻が古い順(メモリ領域番号A6、A5,A4の順)に未使用状態にする。この未使用状態にされるメモリ領域は、消失短時間メモリ検出部150により決定される。そして、消失短時間メモリ検出部150は、短時間メモリ領域Sで未使用状態になったメモリ領域を、長時間メモリ領域Lに移し(ステップS24)、処理を終了する。
【0077】
上記処理においても、メモリサイズを変更した時点(ステップS23)では、境界K3により短時間メモリと長時間メモリの領域が決定されただけであって、どの短時間メモリ領域Sのどのメモリ領域が長時間メモリ領域Lに移るかは決定していない状態である。つまり、メモリサイズを変更した時点では、メモリ領域番号A4、A5、A6のメモリ領域は短時間メモリに属している。
【0078】
さらに、第4番目の場合の動作を図8のフローチャートと図9の状態の変化を表す図を用いて説明する。第4番目は、長時間メモリと短時間メモリの記憶容量を再配分するとき、長時間メモリのメモリ領域が減少する場合は、まず各メモリのメモリサイズを変更して、次に減少するメモリ領域を未使用状態にし他方のメモリに移し、一方長時間メモリのメモリ領域が増加する場合は、まず減少するメモリ領域を未使用状態にして、次に各メモリのメモリサイズを変更する例である。
【0079】
図9のメモリ91は、図3のメモリ31と同様の状態である。
まず、図8のフローチャートで図2と異なる点、すなわち、長時間メモリのメモリ領域を減少させるか否かの判定処理(ステップS2)以降の処理について説明する。
【0080】
メモリサイズ比較部131が、長時間メモリのメモリ領域を減少させると判定したとき(ステップS2でY)、消失長時間メモリ検出部132が長時間メモリのメモリ領域数を減少させるようメモリサイズを変更する(ステップS31)。
図9のメモリ92に示す状態がサイズを変更された状態であり、短時間メモリ領域Sと長時間メモリ領域Lの境界がK1からK2に変更されている。
【0081】
つづいて長時間メモリ開放部133は、図9のメモリ93で示すように、消失長時間メモリ検出部132により決定される長時間メモリのメモリ領域(メモリ領域番号A7,A8)を未使用状態にする。そして、消失長時間メモリ検出部132は、未使用状態になったメモリ領域を短時間メモリ領域Sに移し(ステップS32)、処理を終了する。
【0082】
上記処理は、メモリサイズを変更した時点(ステップS31)では、境界K2により短時間メモリと長時間メモリの領域が決定されたのであり、長時間メモリ領域Sのうちのどのメモリ領域が短時間メモリ領域Lに移るかは決定していない状態である。つまり、メモリサイズを変更した時点では、メモリ領域番号A7、A8のメモリは長時間メモリである。
【0083】
一方、メモリサイズ比較部131が、長時間メモリのメモリ領域を減少させないと判定したとき(ステップS2でN)、短時間メモリ開放部134は、消失短時間メモリ検出部150により決定されたメモリ領域を未使用状態にする(ステップS33)。このとき、図9のメモリ94に示すように、短時間メモリのメモリ領域のうち、記憶された時刻が古い順(メモリ領域番号A6、A5、A4の順番)で3つのメモリ領域が未使用状態となる。
【0084】
つづいて、消失短時間メモリ検出部150は、短時間メモリの未使用状態となったメモリ領域を長時間メモリとするようにメモリサイズを変更して(ステップS34)、処理を終了する。このメモリのサイズを変更した状態が図9のメモリ95の状態であり、長時間メモリ領域Lと短時間メモリ領域Sの境界がK1からK3に変更される。
【0085】
尚、図3、図5、図7、図9で説明したメモリは、論理的に短時間メモリ領域と長時間メモリ領域との比率が変わることを示しており、物理的なメモリ領域の配置は、物理的に連続する配置である必要はない。
以上のようにして、画像符号化装置が実現できる。
【0086】
このように本実施の形態によれば、短時間メモリのメモリ領域を未使用状態にして、他方の長時間メモリのメモリ領域に変更させるときに、短時間メモリの古い時刻に記憶されたメモリ領域より未使用状態にしていくため、入力画像をフレームと比較しながら符号化する装置において、入力された画像をより参照になりうる可能性の高い新しいフレームと比較しながら符号化を行うことができ、符号化処理と復号化処理の不一致を回避できる。
【0087】
(実施形態2)
図10は本発明の画像復号化装置のブロック図であり、図1で示した画像符号化装置で符号化された符号化信号strを復号化する。
図10において、図1および図12で示した画像復号化装置と同じものには同じ符号を付しその説明を説明する。
【0088】
図10において、画像復号化装置は可変長復号化部120と、フレームメモリ102と、動き補償部103と、逆量子化部107と、逆直交変換部108と、加算部109と、管理情報復号化部236と、長時間メモリサイズ保持部130と、メモリサイズ比較部131と、消失長時間メモリ検出部132と、長時間メモリ開放部133と、消失短時間メモリ検出部150と、短時間メモリ開放部134と、長時間メモリ移動部135とにより構成されており、入力した符号化信号strを復号化して復号画像Voutを出力する。
【0089】
図21で説明したように、可変長復号化部120は符号化信号strを復号化し、動きベクトルMV、参照画像番号Idxをフレームメモリ102に出力し、量子化値M6を逆量子化部107に出力し、さらに管理情報MMCOを管理情報復号化部236に出力する。
また、量子化値M6は逆量子化部107、逆直交変換部108を介して復号残差画像M8として加算部109に入力される。
【0090】
動き補償部103は、フレームメモリ102から参照画像番号Idx、動きベクトルMVで示された領域の画素を動き補償参照画像M2として読み出し、所定の演算を行って動き補償画像M3を算出し、加算部109へ出力する。
加算部109は、復号残差画像M8と動き補償画像M3を加算して復号画像Voutを出力するとともに、後続画像の復号化で参照するためにフレームメモリ102に出力する。
【0091】
また管理情報復号化部236は、可変長復号化部120から管理情報MMCOを取得して復号化し、長時間メモリサイズ変更信号LTSをフレームメモリ102、長時間メモリサイズ保持部130、メモリサイズ比較部131に出力し、長時間メモリ移動部135に長時間メモリ移動信号LTMを出力する。さらに、管理情報復号化部236は、長時間メモリ開放部133に長時間メモリ開放信号LTDを出力し、短時間メモリ開放部134に短時間メモリ開放信号STDを出力する。
【0092】
短時間メモリ、長時間メモリのメモリ領域を未使用状態にし、それぞれのメモリ領域を変更する動作は、図1の画像符号化装置と同じためその説明を省略する。
以上の構成により、図10の画像符号化装置の符号化された符号化信号strを正しく復号化できる。
【0093】
以上のように本実施の形態によれば、短時間メモリのメモリ領域を未使用状態にして、他方の長時間メモリのメモリ領域に変更させるときに、短時間メモリの古い時刻に記憶されたメモリ領域より未使用状態にしていくため、入力画像をフレームと比較しながら復号化する装置において、入力された画像をより参照になりうる可能性の高い新しいフレームと比較しながら復号化を行うことができ、符号化処理と復号化処理の不一致を回避できる。
尚、上記各実施の形態で「メモリ領域を開放する」とした処理は、メモリ領域の内容を削除する処理を伴ってもよい。
【0094】
また、上記実施の形態で示した画像符号化装置および画像復号化装置は、LSI等の専用ハードウェアで実現することができるだけでなく、パーソナルコンピュータ等の汎用のコンピュータに実行させるプログラムとして実現することもできる。
そして、そのようなプログラムは、CD−ROMなどの記録媒体やインターネットなどの伝送媒体を介して流通させることができる。
【0095】
図11は、上記実施の形態の画像符号化装置に用いた画像符号化方法および画像復号化装置に用いた画像復号化方法をフレキシブルディスクに格納させたプログラムを用いて、コンピュータシステムにより実施する場合の説明図である。
【0096】
図11(b)は、フレキシブルディスクの正面からみた外観、断面構造、及びフレキシブルディスクを示し、図11(a)は、記録媒体本体であるフレキシブルディスクの物理フォーマットの例を示している。フレキシブルディスクFDはケースF内に内蔵され、該ディスクの表面には、同心円状に外周からは内周に向かって複数のトラックTrが形成され、各トラックは角度方向に16のセクタSeに分割されている。従って、上記プログラムを格納したフレキシブルディスクでは、上記フレキシブルディスクFD上に割り当てられた領域に、上記プログラムとしての画像符号化方法および画像復号化方法が記録されている。
【0097】
また、図11(c)は、フレキシブルディスクFDに上記プログラムの記録再生を行うための構成を示す。上記プログラムをフレキシブルディスクFDに記録する場合は、コンピュータシステムCsから上記プログラムとしての画像符号化方法および画像復号化方法をフレキシブルディスクドライブFDDを介して書き込む。また、フレキシブルディスク内のプログラムにより上記画像符号化方法および画像復号化方法をコンピュータシステム中に構築する場合は、フレキシブルディスクドライブによりプログラムをフレキシブルディスクから読み出し、コンピュータシステムに転送する。
【0098】
なお、上記説明では、記録媒体としてフレキシブルディスクを用いて説明を行ったが、光ディスクを用いても同様に行うことができる。また、記録媒体はこれに限らず、CD−ROM、メモリカード、ROMカセット等、プログラムを記録できるものであれば同様に実施することができる。
【0099】
以上のように、本実施の形態では、長時間メモリに関しては、メモリ領域のうちどの部分を長時間メモリに割り当てるかを予め決め、それぞれのメモリを一意に指定することができるインデックスを決める。また、長時間メモリの増加、減少の大きさが明示的に変更される場合は、以下のような処理が行われる。
長時間メモリが減少するときには、長時間メモリのうち例えば、インデックスの大きい領域から順番に短時間メモリに割り当てられる。なお、インデックスの小さい領域から順番に短時間メモリに割り当ててもよい。
一方、短時間メモリに関しては、通常はFIFOによってメモリ領域の使用の有無が決定されており、長時間メモリが増加する場合は、まず、短時間メモリのうち、使用されていないメモリから長時間メモリに割り当てるようにする。
【0100】
さらにここで、上記実施の形態で示した画像符号化装置または画像復号化装置の応用例とそれを用いたシステムを説明する。
図12は、コンテンツ配信サービスを実現するコンテンツ供給システムex100の全体構成を示すブロック図である。通信サービスの提供エリアを所望の大きさに分割し、各セル内にそれぞれ固定無線局である基地局ex107〜ex110が設置されている。
【0101】
このコンテンツ供給システムex100は、例えば、インターネットex101にインターネットサービスプロバイダex102および電話網ex104、および基地局ex107〜ex110を介して、コンピュータex111、PDA(personaldigital assistant)ex112、カメラex113、携帯電話ex114、カメラ付きの携帯電話ex115などの各機器が接続される。
【0102】
しかし、コンテンツ供給システムex100は図1のような組合せに限定されず、いずれかを組み合わせて接続するようにしてもよい。また、固定無線局である基地局ex107〜ex110を介さずに、各機器が電話網ex104に直接接続されてもよい。
【0103】
カメラex113はデジタルビデオカメラ等の動画撮影が可能な機器である。また、携帯電話は、PDC(Personal Digital Communications)方式、CDMA(Code Division Multiple Access)方式、W−CDMA(Wideband−Code Division Multiple Access)方式、若しくはGSM(Global System for Mobile Communications)方式の携帯電話機、またはPHS(Personal Handyphone System)等であり、いずれでも構わない。
【0104】
また、ストリーミングサーバex103は、カメラex113から基地局ex109、電話網ex104を通じて接続されており、カメラex113を用いてユーザが送信する符号化処理されたデータに基づいたライブ配信等が可能になる。撮影したデータの符号化処理はカメラex113で行っても、データの送信処理をするサーバ等で行ってもよい。
【0105】
また、カメラ116で撮影した動画データはコンピュータex111を介してストリーミングサーバex103に送信されてもよい。カメラex116はデジタルカメラ等の静止画、動画が撮影可能な機器である。この場合、動画データの符号化はカメラex116で行ってもコンピュータex111で行ってもどちらでもよい。また、符号化処理はコンピュータex111やカメラex116が有するLSIex117において処理することになる。
【0106】
なお、画像符号化・復号化用のソフトウェアをコンピュータex111等で読み取り可能な記録媒体である何らかの蓄積メディア(CD−ROM、フレキシブルディスク、ハードディスクなど)に組み込んでもよい。さらに、カメラ付きの携帯電話ex115で動画データを送信してもよい。このときの動画データは携帯電話ex115が有するLSIで符号化処理されたデータである。
【0107】
このコンテンツ供給システムex100では、ユーザがカメラex113、カメラex116等で撮影しているコンテンツ(例えば、音楽ライブを撮影した映像等)を上記実施の形態同様に符号化処理してストリーミングサーバex103に送信する一方で、ストリーミングサーバex103は要求のあったクライアントに対して上記コンテンツデータをストリーム配信する。
【0108】
クライアントとしては、上記符号化処理されたデータを復号化することが可能な、コンピュータex111、PDAex112、カメラex113、携帯電話ex114等がある。このようにすることでコンテンツ供給システムex100は、符号化されたデータをクライアントにおいて受信して再生することができ、さらにクライアントにおいてリアルタイムで受信して復号化し、再生することにより、個人放送をも実現可能になるシステムである。
【0109】
このシステムを構成する各機器の符号化、復号化には上記各実施の形態で示した画像符号化装置あるいは画像復号化装置を用いるようにすればよい。
その一例として携帯電話について説明する。
【0110】
図13は、上記実施の形態で説明した画像符号化装置および画像復号化装置を用いた携帯電話ex115を示す図である。携帯電話ex115は、基地局ex110との間で電波を送受信するためのアンテナex201、CCDカメラ等の映像、静止画を撮ることが可能なカメラ部ex203、カメラ部ex203で撮影した映像、アンテナex201で受信した映像等が復号化されたデータを表示する液晶ディスプレイ等の表示部ex202、操作キーex204群から構成される本体部、音声出力をするためのスピーカ等の音声出力部ex208、音声入力をするためのマイク等の音声入力部ex205、撮影した動画もしくは静止画のデータ、受信したメールのデータ、動画のデータもしくは静止画のデータ等、符号化されたデータまたは復号化されたデータを保存するための記憶メディアex207、携帯電話ex115に記憶メディアex207を装着可能とするためのスロット部ex206を有している。記憶メディアex207はSDカード等のプラスチックケース内に電気的に書換えや消去が可能な不揮発性メモリであるEEPROM(Electrically Erasable and Programmable Read Only Memory)の一種であるフラッシュメモリ素子を格納したものである。
【0111】
さらに、携帯電話ex115について図14を用いて説明する。携帯電話ex115は表示部ex202及び操作キーex204を備えた本体部の各部を統括的に制御するようになされた主制御部ex311に対して、電源回路部ex310、操作入力制御部ex304、画像符号化部ex312、カメラインターフェース部ex303、LCD(Liquid Crystal Display)制御部ex302、画像復号化部ex309、多重分離部ex308、記録再生部ex307、変復調回路部ex306及び音声処理部ex305が同期バスex313を介して互いに接続されている。
【0112】
電源回路部ex310は、ユーザの操作により終話及び電源キーがオン状態にされると、バッテリパックから各部に対して電力を供給することによりカメラ付ディジタル携帯電話ex115を動作可能な状態に起動する。
【0113】
携帯電話ex115は、CPU、ROM及びRAM等でなる主制御部ex311の制御に基づいて、音声通話モード時に音声入力部ex205で集音した音声信号を音声処理部ex305によってディジタル音声データに変換し、これを変復調回路部ex306でスペクトラム拡散処理し、送受信回路部ex301でディジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex201を介して送信する。
【0114】
また携帯電話機ex115は、音声通話モード時にアンテナex201で受信した受信信号を増幅して周波数変換処理及びアナログディジタル変換処理を施し、変復調回路部ex306でスペクトラム逆拡散処理し、音声処理部ex305によってアナログ音声信号に変換した後、これを音声出力部ex208を介して出力する。
【0115】
さらに、データ通信モード時に電子メールを送信する場合、本体部の操作キーex204の操作によって入力された電子メールのテキストデータは操作入力制御部ex304を介して主制御部ex311に送出される。主制御部ex311は、テキストデータを変復調回路部ex306でスペクトラム拡散処理し、送受信回路部ex301でディジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex201を介して基地局ex110へ送信する。
【0116】
データ通信モード時に画像データを送信する場合、カメラ部ex203で撮像された画像データをカメラインターフェース部ex303を介して画像符号化部ex312に供給する。また、画像データを送信しない場合には、カメラ部ex203で撮像した画像データをカメラインターフェース部ex303及びLCD制御部ex302を介して表示部ex202に直接表示することも可能である。
【0117】
画像符号化部ex312は、図1で説明した画像符号化装置を備えた構成であり、カメラ部ex203から供給された画像データを上記実施の形態で示した画像符号化装置に用いた符号化方法によって圧縮符号化することにより符号化画像データに変換し、これを多重分離部ex308に送出する。また、このとき同時に携帯電話機ex115は、カメラ部ex203で撮像中に音声入力部ex205で集音した音声を音声処理部ex305を介してディジタルの音声データとして多重分離部ex308に送出する。
【0118】
多重分離部ex308は、画像符号化部ex312から供給された符号化画像データと音声処理部ex305から供給された音声データとを所定の方式で多重化し、その結果得られる多重化データを変復調回路部ex306でスペクトラム拡散処理し、送受信回路部ex301でディジタルアナログ変換処理及び周波数変換処理を施した後にアンテナex201を介して送信する。
【0119】
データ通信モード時にホームページ等にリンクされた動画像ファイルのデータを受信する場合、アンテナex201を介して基地局ex110から受信した受信信号を変復調回路部ex306でスペクトラム逆拡散処理し、その結果得られる多重化データを多重分離部ex308に送出する。
【0120】
また、アンテナex201を介して受信された多重化データを復号化するには、多重分離部ex308は、多重化データを分離することにより符号化画像データと音声データとに分け、同期バスex313を介して当該符号化画像データを画像復号化部ex309に供給すると共に当該音声データを音声処理部ex305に供給する。
【0121】
次に、画像復号化部ex309は、図10で説明した画像復号化装置を備えた構成であり、符号化画像データを上記実施の形態で示した符号化方法に対応した復号化方法で復号することにより再生動画像データを生成し、これをLCD制御部ex302を介して表示部ex202に供給し、これにより、例えばホームページにリンクされた動画像ファイルに含まれる動画データが表示される。このとき同時に音声処理部ex305は、音声データをアナログ音声信号に変換した後、これを音声出力部ex208に供給し、これにより、例えばホームページにリンクされた動画像ファイルに含まる音声データが再生される。
【0122】
なお、上記システムの例に限られず、最近は衛星、地上波によるディジタル放送が話題となっており、図15に示すようにディジタル放送用システムにも上記実施の形態の少なくとも画像符号化装置または画像復号化装置のいずれかを組み込むことができる。
【0123】
具体的には、放送局ex409では映像情報の符号化ビットストリームが電波を介して通信または放送衛星ex410に伝送される。これを受けた放送衛星ex410は、放送用の電波を発信し、この電波を衛星放送受信設備をもつ家庭のアンテナex406で受信し、テレビ(受信機)ex401またはセットトップボックス(STB)ex407などの装置により符号化ビットストリームを復号化してこれを再生する。また、記録媒体である蓄積メディアex402に記録した符号化ビットストリームを読み取り、復号化する再生装置ex403にも上記実施の形態で示した画像復号化装置を実装することが可能である。
【0124】
この場合、再生された映像信号はモニタex404に表示される。また、ケーブルテレビ用のケーブルex405または衛星/地上波放送のアンテナex406に接続されたセットトップボックスex407内に画像復号化装置を実装し、これをテレビのモニタex408で再生する構成も考えられる。
【0125】
このときセットトップボックスではなく、テレビ内に画像符号化装置を組み込んでも良い。また、アンテナex411を有する車ex412で衛星ex410からまたは基地局ex107等から信号を受信し、車ex412が有するカーナビゲーションex413等の表示装置に動画を再生することも可能である。
【0126】
なお、カーナビゲーションex413の構成は例えば図14に示す構成のうち、カメラ部ex203とカメラインターフェース部ex303を除いた構成が考えられ、同様なことがコンピュータex111やテレビ(受信機)ex401等でも考えられる。また、上記携帯電話ex114等の端末は、符号化器・復号化器を両方持つ送受信型の端末の他に、符号化器のみの送信端末、復号化器のみの受信端末の3通りの実装形式が考えられる。
【0127】
このように、図1、図10の実施の形態で示した画像符号化装置、画像復号化装置を上述したいずれの機器・システムに用いることは可能であり、そうすることで、図1、図10で説明した効果を得ることができる。
【0128】
【発明の効果】
以上の説明から明らかなように、本発明に係る画像符号化装置は、入力された画像を参照画像と比較しながら符号化する装置であって、データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段と、前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする再配分手段とを備えることを特徴とする。
【0129】
これによって、第1の記憶領域の記憶容量が小さくなるとき、古い時刻に記憶された参照画像から消失されるため、入力された画像をより参照になりうる可能性の高い新しい参照画像と比較しながら符号化を行うことができ、符号化処理と復号化処理の不一致を回避できる。
【0130】
また、入力された画像を参照画像と比較しながら復号化する装置であって、データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段と、前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする再配分手段とを備えるようにしてもよい。
【0131】
これによって、第1の記憶領域の記憶容量が小さくなるとき、古い時刻に記憶された参照画像から消失されるため、入力された画像をより参照になりうる可能性の高い新しい参照画像と比較しながら復号化を行うことができ、符号化処理と復号化処理の不一致を回避できる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態における画像符号化装置の構成を示すブロック図である。
【図2】同上の画像符号化装置の動作を示すフローチャートである。
【図3】同上の画像符号化装置におけるメモリの状態を示す図である。
【図4】同上の画像符号化装置の他の動作を示すフローチャートである。
【図5】同上の画像符号化装置におけるメモリの他の状態を示す図である。
【図6】同上の画像符号化装置の更に他の動作を示すフローチャートである。
【図7】同上の画像符号化装置におけるメモリの更に他の状態を示す図である。
【図8】同上の画像符号化装置のまた更に他の動作を示すフローチャートである。
【図9】同上の画像符号化装置におけるメモリのまた更に他の状態を示す図である。
【図10】本発明の第2の実施の形態における画像復号化装置の構成を示すブロック図である。
【図11】(a)(b)(c)はいずれも、本発明における画像符号化方法および画像復号化方法を格納したフレキシブルディスクを用いて、コンピュータシステムにより実施する場合の説明図である。
【図12】本発明における画像符号化装置および画像復号化装置を用いたコンテンツ供給システムの全体構成を示す構成図である。
【図13】本発明における画像符号化装置および画像復号化装置を用いた携帯電話の構成を示す外観図である。
【図14】同上の携帯電話の構成を示すブロック図である。
【図15】本発明における画像符号化装置および画像復号化装置を用いたディジタル放送システムの全体構成を示す構成図である。
【図16】従来の画像符号化方法などから想定される画像符号化装置の構成を示すブロック図である。
【図17】(a)(b)はいずれも画像管理方法の説明図である。
【図18】(a)(b)はいずれも短時間メモリを用いた画像符号化の説明図である。
【図19】長時間メモリを用いた画像符号化の説明図である。
【図20】(a)(b)はいずれも画像管理方法の説明図である。
【図21】従来の画像復号化方法から想定される画像復号化装置の構成を示すブロック図である。
【符号の説明】
101  動き検出部
102  フレームメモリ
103  動き補償部
104  減算部
105  直交変換部
106  量子化部
107  逆量子化部
108  逆直交変換部
109  加算部
110  可変長符号化部
130  長時間メモリサイズ保持部
131  メモリサイズ比較部
132  消失長時間メモリ検出部
133  長時間メモリ開放部
134  短時間メモリ開放部
135  長時間メモリ移動部
136  管理情報符号化部
150  消失短時間メモリ検出部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image encoding method and an image encoding device for efficiently encoding a moving image signal using correlation between screens, and an image decoding method and an image decoding device for decoding an encoded signal. And a recording medium on which a program for executing the same by software is recorded.
[0002]
[Prior art]
In recent years, the multimedia era, in which voices, images, and other pixel values are integrated, has been approached, and the traditional information media, that is, means for transmitting information such as newspapers, magazines, televisions, radios, and telephones, to humans has been developed. It has been taken up as an object. Generally, multimedia means not only characters, but also figures, sounds, and especially images, etc., that are simultaneously associated with each other. Is an essential condition.
[0003]
However, when the amount of information of each of the above information media is estimated as a digital information amount, the amount of information per character is 1 to 2 bytes in the case of characters, while 64 kbits per second in the case of voice (telephone quality). In addition, for a moving image, an information amount of 100 Mbits per second (current television reception quality) or more is required, and it is not realistic to handle the vast amount of information in the above-mentioned information medium in a digital form. For example, a videophone has already been put into practical use by an Integrated Services Digital Network (ISDN) having a transmission rate of 64 kbps to 1.5 Mbps, but it is impossible to send a video of a video camera directly through the ISDN. It is possible.
[0004]
Therefore, what is needed is an information compression technology. For example, in the case of a videophone, H.264 standardized internationally by ITU (International Telecommunication Union Telecommunication Standardization Sector). 261 and H.E. H.263 video compression technology is used. In addition, according to the information compression technology of the MPEG-1 standard, it is possible to store image information together with audio information in a normal music CD (compact disc).
[0005]
Here, MPEG (Moving Picture Experts Group) is an international standard for digital compression of moving picture plane signals, and MPEG-1 converts moving picture plane signals up to 1.5 Mbps, that is, information of television signals by about 1/100. It is a standard that compresses up to. In addition, since the transmission rate for the MPEG-1 standard is mainly limited to about 1.5 Mbps, the moving picture signal is 2 to 2 in MPEG-2, which is standardized to meet the demand for higher image quality. It is compressed to 15 Mbps.
[0006]
Further, at present, MPEG-4, which has a higher compression ratio, has been standardized by a working group (ISO / IEC JTC1 / SC29 / WG11), which has been standardizing MPEG-1 and MPEG-2. MPEG-4 initially introduced not only high-efficiency coding at low bit rates, but also a strong error resilience technique that can reduce subjective image quality degradation even if a transmission path error occurs. . In addition, ISO / IEC and ITU have been jointly working on the standardization of JVT (Joint Video Team) as a next-generation screen coding system, and the one called Joint Model 1 (JM1) is the latest at the present time.
[0007]
FIG. 16 is a block diagram of an image encoding device assumed from the conventional image encoding method and the memory management method studied in JM1. This image coding apparatus includes a motion detection unit 101, a frame memory 102, a motion compensation unit 103, a subtraction unit 104, an orthogonal transformation unit 105, a quantization unit 106, an inverse quantization unit 107, an inverse orthogonal transformation unit 108, and an addition unit 109. Variable length encoding section 110, long time memory size holding section 130, memory size comparing section 131, lost long time memory detecting section 132, long time memory opening section 133, short time memory opening section 134, long time memory moving section 135 , And a management information encoding unit 136.
[0008]
First, the operation of encoding an image will be described. The motion detection unit 101 compares the input image Vin with the reference image M1 in the frame memory 102, specifies the reference image number Idx indicating the reference image having the smallest difference between the input image Vin and the motion vector that is the motion amount of the pixel. The MV is calculated and output to the frame memory 102 and the variable length coding unit 110.
[0009]
The motion compensation unit 103 reads out the pixels of the area indicated by the reference image number Idx and the motion vector MV from the frame memory 102 as a motion compensation reference image M2, performs a predetermined operation, generates a motion compensation image M3, and Output to 109.
[0010]
The subtraction unit 104 calculates a residual image M4, which is a difference value between the input image Vin and the motion compensation image M3, and outputs the result to the orthogonal transformation unit 105. The orthogonal transformation unit 105 converts the frequency of the residual image M4 into the frequency domain. The component M5 is output to the quantization unit 106. Further, the quantization unit 106 quantizes the frequency component M5, and outputs a quantization value M6 of the motion compensation error to the inverse quantization unit 107 and the variable length coding unit 110.
[0011]
Further, the inverse quantization unit 107 inversely quantizes the quantized value M6 and outputs a decoded frequency component M7 to the inverse orthogonal transform unit 108. The inverse orthogonal transform unit 108 is a pixel difference value from the frequency domain of the decoded frequency component M7. The decoding residual image M8 is calculated and output to the adding unit 109.
[0012]
The adding unit 109 calculates the decoded image signal M9 by adding the decoded residual image M8 and the motion compensation image M3, and stores the decoded image signal M9 in the frame memory 102.
On the other hand, the variable length coding unit 110 codes the motion vector MV, the reference image number Idx, the quantization value M6, and the management information MMCO from the management information coding unit 136 described later, and outputs a coded signal str to the outside. I do.
[0013]
FIGS. 17A and 17B are explanatory diagrams of the image management method, and show a state in which a short-term memory and a long-term memory are respectively secured in the frame memory 102 serving as a reference image memory. The number of memory areas including the short-term memory and the long-term memory is determined, and the total number of usable images (frames) stored therein is determined.
[0014]
Therefore, by encoding the number of memory areas LTsize of the long-term memory,
Number of memory areas of short-time memory STsize = total number of memory areas−number of memory areas of long-time memory LTsize
As a result, the memory area number STsize of the short-time memory is obtained. A reference image number Idx is assigned to each area where the reference image is stored. Then, the reference image is identified by the reference image number Idx. In the short-term memory and the long-term memory, there is an area (unused) in which an image is not yet stored, but the reference image number Idx is not assigned to this area.
[0015]
When encoding / decoding is performed with reference to an image, an image to be referred to as a forward image is represented by a reference image number Idx.
In video coding, an arbitrary image (frame) can be selected as a reference image from a plurality of images (frames) as a forward reference image. FIG. 18 is an explanatory diagram of image encoding using a short-time memory. The short-time memory stores several pictures decoded immediately before, and is a reference picture of a so-called MPEG-1 or MPEG-2 P picture (forward predictive coded picture) and B picture (bidirectional predictive coded picture). Is equivalent to
[0016]
FIG. 18A is a prediction example of a P picture. In a P picture, only an I picture or a P picture can be referred to. Frame 3 refers to Frame 0, Frame 6 refers to Frame 0 or Frame 3, and Frame 9 refers to Frame 0, Frame 3, or Frame 6 for encoding / decoding.
[0017]
FIG. 18B is a prediction example of a B picture. In a B picture, an I picture and a P picture can be referred to as forward images. The back image can refer to one temporally closest picture in the I picture or the P picture. Frame 1 and Frame 2 refer to Frame 0 forward, Frame 4 and Frame 5 refer to Frame 0 or Frame 3, and Frame 7 and Frame 8 refer to Frame 0, Frame 3 or Frame 6 for encoding / decoding. Can be done.
In the prediction of a B picture, in some cases, a B picture is referred to as a forward picture in addition to an I picture and a P picture.
[0018]
FIG. 19 is an explanatory diagram of image encoding using a long-term memory. The short-term memory stores several images that were temporally (encoded and) decoded, whereas the long-term memory explicitly stores images and discards the stored contents regardless of the passage of time. Is what you do. For example, if a surveillance camera switches between multiple cameras and shoots, if the final decoded image for each camera is stored in the long-term memory, the last time the same camera is used to shoot the same If the difference value between the image and the image stored in the memory is encoded, the correlation between the images is high and the compression ratio can be improved.
[0019]
It can be seen from FIG. 19 that LTFrame0, LTFrame1, LTFrame2, and LTFrame3 which are screens at times older than the short-time memory shown in FIG. 18 are referenced as reference images of the target image CurFrame. The LTFrame 0, LTFrame 1, LTFrame 2, and LTFrame 3 are stored in the memory for a long time.
[0020]
Next, the operation of managing the memory secured in the frame memory 102 will be described.
When the long-time memory size change signal LTS is input from the outside, the new size of the long-time memory by the long-time memory size change signal LTS is held in the long-time memory size holding unit 130. Then, the memory size comparing unit 131 compares the current memory size already held in the long-time memory size holding unit 130 with a new memory size based on the long-time memory size change signal LTS. Here, the memory size of the long-time memory corresponds to the number of memory areas.
[0021]
Next, when the memory size of the long-term memory is reduced according to the comparison result of the memory size comparing unit 131, the long-term memory releasing unit 133 releases the memory area determined by the lost long-term memory detecting unit 132, and Put it in use.
At this time, the unused memory area of the long time memory can be used as the memory area of the short time memory.
[0022]
Further, the long-time memory release unit 133 releases the memory area indicated by the long-time memory release signal LTD, which is an external signal, to make it unused. Then, the short-time memory release unit 134 receives the short-time memory release signal STD input from the outside, and sets the memory area of the short-time memory in the frame memory 102 to an unused state.
[0023]
Further, the long-time memory moving unit 135 receives the long-time memory moving signal LTM input from the outside, and transfers the contents stored in the short-time memory memory area in the frame memory 102 to the long-time memory memory area. Move.
The long-time memory size change signal LTS, the long-time memory release signal LTD, the short-time memory release signal STD, and the long-time memory movement signal LTM are encoded by the management information encoding unit 136, and the management information MMCO Is output to the variable length coding unit 110.
[0024]
FIGS. 17A and 17B show states before and after changing the memory areas of the long-term memory and the short-term memory, respectively. In FIG. 17A, the memory size STsize of the short-time memory is composed of six memory areas each storing a frame whose image reference number Idx is indicated by 0 to 5, and one memory area in an unused state. The memory size LTsize of the long-time memory includes three memory areas each storing a frame whose image reference number Idx is indicated by 6 to 8, and one unused memory area.
[0025]
The hatched memory area is a used state in which a frame is stored, and the non-hatched memory area is an unused state.
At this time, the unused state is, for example, a state in which the memory area is set to be unused by a flag or the like.
[0026]
In FIG. 17B, the memory size LTsize of the long-term memory is composed of two memory areas, and the memory size STsize of the short-term memory is composed of nine memory areas. The size STsize increases, and the memory size LTsize of the long-term memory decreases.
On the other hand, FIGS. 20A and 20B show the state before and after the change of each memory area of the short-term memory and the long-term memory, and the memory size STsize of the short-term memory decreases after the change. ing.
[0027]
FIG. 21 is a block diagram of an image decoding device assumed from the conventional image decoding method, and decodes an encoded signal str encoded by the image encoding device shown in FIG.
In FIG. 21, the same operations as those in the block diagram of the image encoding device shown in FIG. 16 are denoted by the same reference numerals, and description thereof will be omitted.
[0028]
The variable length decoding unit 120 decodes the encoded signal str, outputs the motion vector MV and the reference image number Idx to the frame memory 102, outputs the motion compensation error quantization value M6 to the inverse quantization unit 107, The management information MMCO is output to the management information decoding unit 236.
Further, the quantized value M6 is input to the adding unit 109 as a decoded residual image M8 via the inverse quantization unit 107 and the inverse orthogonal transform unit 108.
[0029]
The motion compensation unit 103 reads out the pixels in the area indicated by the reference image number Idx and the motion vector MV from the frame memory 102 as the motion compensation reference image M2, performs a predetermined operation, calculates the motion compensation image M3, and Output to 109.
The addition unit 109 outputs the decoded image Vout by adding the decoded residual image M8 and the motion compensation image M3, and outputs the decoded image Vout to the frame memory 102 for reference in decoding a subsequent image.
[0030]
Further, the management information decoding unit 236 acquires and decodes the management information MMCO from the variable length decoding unit 120, and transmits the long-term memory size change signal LTS to the frame memory 102, the long-term memory size holding unit 130, the memory size comparing unit 131, and outputs a long-term memory movement signal LTM to the long-time memory movement unit 135. Further, the management information decoding unit 236 outputs the long-time memory release signal LTD to the long-time memory release unit 133 and outputs the short-time memory release signal STD to the short-time memory release unit 134.
The operation of setting the memory areas of the short-term memory and the long-term memory to the unused state and changing the respective memory areas is the same as that of the image encoding apparatus of FIG.
[0031]
With the above configuration, the encoded signal str encoded by the image encoding device in FIG. 16 can be correctly decoded.
As described above, the frame memory is divided into the long-term memory and the short-term memory to store the reference image, thereby achieving the compression efficiency.
[0032]
[Problems to be solved by the invention]
However, with the above-described configuration, when the memory size of the short-time memory is reduced when the memory area is changed (when the area of the frame memory is redistributed), the memory area in the short-time memory is set to the unused state. However, if some care is not taken, the inconvenience that the latest data in the memory is erased for a short time occurs. Therefore, a mismatch occurs between the encoding process and the decoding process.
[0033]
The present invention has been made in order to solve the above-described problem, and has been made in consideration of an image encoding process associated with an area reallocation of a frame memory (a reallocation of a storage capacity of a storage area of a long-time memory and a short-time memory). An object of the present invention is to provide an image encoding device and an image decoding device that avoid mismatching of decoding processing.
[0034]
[Means for Solving the Problems]
In order to achieve the above object, an image encoding apparatus according to the present invention is an apparatus for encoding while comparing an input image with a reference image, wherein the first storage area and the second storage area have different data read / write methods. Storage means for dividing the reference image into two storage areas and storing the reference image, and the oldest first storage area having a smaller storage capacity when the storage capacity of the first and second storage areas is redistributed. A redistribution unit is provided for setting a storage area in which a reference image is stored at a time to a state where the storage area can be used as a second storage area having a large storage capacity.
[0035]
A decoding unit that decodes the input image while comparing the input image with the reference image, the storage unit configured to store the reference image by dividing the image into a first storage area and a second storage area having different data read / write schemes; When redistributing the storage capacity of the first and second storage areas, the storage area in which the reference image is stored at the earliest time in the first storage area having the smaller storage capacity is increased. And a redistribution unit for making the storage area usable as a second storage area.
[0036]
An image encoding method using a storage unit that stores a reference image by dividing into a first storage area and a second storage area having different data read / write methods, wherein the first and second storage areas When the reallocation of the storage capacity is performed, the storage area in which the reference image is stored at the oldest time in the first storage area where the storage capacity becomes small can be used as the second storage area where the storage capacity becomes large. It is characterized by being in a state.
[0037]
An image decoding method using storage means for storing a reference image by dividing into a first storage area and a second storage area having different data read / write methods, wherein the first and second storage areas are provided. When the reallocation of the storage capacity is performed, the storage area in which the reference image is stored at the oldest time in the first storage area where the storage capacity becomes small can be used as the second storage area where the storage capacity becomes large. It is characterized by being in a state.
[0038]
BEST MODE FOR CARRYING OUT THE INVENTION
(Embodiment 1)
Hereinafter, an image encoding device according to the first embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a configuration of an image encoding device according to the first embodiment of the present invention.
The image encoding apparatus includes a motion detection unit 101, a frame memory 102, a motion compensation unit 103, a subtraction unit 104, an orthogonal transformation unit 105, a quantization unit 106, an inverse quantization unit 107, an inverse orthogonal transformation unit 108, an addition unit 109, Long-term memory size holding unit 130, memory size comparing unit 131, lost long-term memory detecting unit 132, long-term memory releasing unit 133, lost short-term memory detecting unit 150, short-time memory releasing unit 134, long-term memory moving unit 135 , And a management information encoding unit 136.
[0039]
Devices that perform the same operations as in the block diagram of the image encoding device in FIG. 16 are denoted by the same reference numerals.
Motion detection section 101, frame memory 102, motion compensation section 103, subtraction section 104, orthogonal transformation section 105, quantization section 106, inverse quantization section 107, inverse orthogonal transformation section 108, addition section 109, variable length encoding section 110 Is the same as in FIG. 16, and a description thereof will be omitted.
[0040]
First, the configuration of management of the frame memory 102 in the present image encoding device will be described.
The long-time memory size holding unit 130 is a holding unit that receives a long-term memory size change signal LTS input from the outside and sequentially holds a new memory size of the long-term memory. Then, the memory size comparing unit 131 compares the memory size currently held in the long time memory size holding unit 130 with the new memory size set by the long time memory size change signal LTS, and loses the comparison result. It outputs to the long-term memory detection unit 132 and the lost short-time memory detection unit 150.
[0041]
The lost long-term memory detection unit 132 receives the comparison result of the memory size comparison unit 131, determines a memory area of the long-term memory in which the stored contents are to be unused, and sends the memory area to the long-term memory release unit 133. A signal indicating the address of the area is output.
On the other hand, based on the comparison result of the memory size comparing unit 131, the lost short-time memory detecting unit 150 determines a memory area of the short-time memory in which the stored content is to be in an unused state, and sends the memory area to the short-time memory releasing unit 134. A signal indicating the address of the memory area is output.
[0042]
The long-time memory release unit 133 sets the memory area indicated by the lost long-time memory detection unit 132 in the long-term memory of the frame memory 102 to an unused state, and inputs a long-term memory release signal LTD input from the outside. The memory area indicated by is set to an unused state.
Here, the unused state is a state in which the memory area is set as an unused state by a flag or the like.
[0043]
The short-time memory release unit 134 sets the memory area indicated by the lost short-time memory detection unit 150 in the short-time memory of the frame memory 102 to an unused state, and releases the short-time memory input from the outside. The memory area indicated by the signal STD is set to an unused state.
[0044]
In the present invention, the lost short-time memory detection unit 150 puts the short-time memory in the unused state sequentially from the memory area stored at the oldest time.
Further, the memory size change signal LTS, the long-time memory release signal LTD, the short-time memory release signal STD, and the long-time memory movement signal LTM are encoded by the management information encoding unit 136, so that the management information MMCO has a variable length. Output to encoding section 110
[0045]
In the present embodiment, the short-term memory secured in the frame memory 102 is a first-in first-out (FIFO) memory. When a new memory is stored, the stored contents having the oldest stored time are discarded in order. An image of the latest fixed number of frames is always stored. Unnecessary images can be explicitly opened. Then, only the image whose time is close is stored, and is used for the same purpose as the reference image used in normal MPEG1 / 2.
[0046]
On the other hand, the long-time memory is a memory of a random access system, and has a configuration in which a frame can be stored in an arbitrary area and a frame stored in an arbitrary area can be read. The long-time memory stores images referred to after a long time, such as a background image and an image before scene insertion (immediately before the start of insertion when another scene is inserted into one scene). Also stores a reference image for a long time.
[0047]
When storing in the long-term memory, the data stored in the short-term memory is moved to the long-term memory, and the long-term memory moving unit 135 receives the long-term memory move signal LTM, and Of the memories stored in the memory 102, the storage contents stored in the memory area of the short-time memory are moved to the memory area of the long-time memory.
[0048]
The operation of the image encoding apparatus having the above configuration when receiving the memory size change signal LTS for a long time in four cases will be described.
[0049]
First, the operation in the first case will be described with reference to the flowchart in FIG. 2 and the diagram showing changes in the memory area in FIG. First, when the storage capacity of the long-term memory and the short-term memory is redistributed, the reduced memory area is first unallocated when the memory area of the long-term memory decreases or increases. This is an example in which the memory size of each memory is changed after the state of use is changed.
[0050]
FIG. 3 is a diagram showing the states of the long-term memory and the short-term memory among the memories of the frame memory 102. In FIG. 3, there are eleven memory areas from memory area numbers A0 to A10 as shown in the memory 31, the memory areas with diagonal lines are used, and the memory areas without diagonal lines are unused.
[0051]
The short-term memory has seven memory areas from memory area numbers A0 to A6, and the long-term memory has four memory areas from memory area numbers A7 to A10. The area is divided into a time memory area L. Here, the number of memory areas in the short-time memory area S corresponds to the memory size of the short-time memory, and the number of memory areas in the long-time memory area L corresponds to the memory size of the long-time memory.
[0052]
In the short-term memory area S, the time at which the memory is stored in the memory in the order of the memory area number A0 to the memory area number A6 becomes old, and the memory of the memory area number A6 is unused.
[0053]
First, when the long-time memory size change signal LTS is input from the outside, the memory size comparison unit 131 compares the current memory size already held in the long-time memory size holding unit 130 with the long-time memory size change signal LTS. Compare with the new memory size. That is, a process of determining whether to change the memory size is performed (step S1).
[0054]
If it is determined in the comparison result of the memory size comparing unit 131 that there is no change in the memory size of the long-time memory (N in step S1), the process ends, but it is determined that there is a change in the memory size (step S1). In step S2, a determination process is performed to determine whether or not to reduce the memory area of the long-term memory based on the comparison result of the memory size comparison unit 131 (step S2).
[0055]
Then, when it is determined that the memory area of the long-term memory is to be reduced (for example, the two memory areas are reduced) (Y in step S2), the long-term memory releasing unit 133 The memory area determined by the long-time memory detection unit 132 is set in an unused state (step S3).
That is, it becomes the memory 32 in FIG. 3, and the memory areas of the memory area numbers A7 and A8 are in an unused state.
[0056]
Subsequently, the lost long-term memory detection unit 132 stores the unused memory area of the long-term memory in addition to the short-term memory as belonging to the short-term memory, and stores the long-term memory area L and the short-term memory The memory size of the area S is changed (Step S4).
[0057]
This state is the memory 33 in FIG. 3, the boundary between the long-term memory area L and the short-term memory area S is changed from K1 to K2, and the short-term memories are nine memory areas from memory area numbers A0 to A8. The storage capacities of the long-term memory and the short-term memory are redistributed so that the long-term memory becomes two memory areas of memory area numbers A9 and A10.
Here, in order to make the memory area of the long-term memory usable as a short-term memory, the memory area is set to an unused state as an example.
[0058]
On the other hand, when the memory size comparison unit 131 determines that the memory area of the long-term memory is not to be reduced (N in step S2) in the above-described determination process (step S2) of determining whether to reduce the memory area of the long-term memory. Assuming that the memory area of the short-time memory is reduced (for example, the three memory areas are reduced), the short-time memory release unit 134 sets the memory area of the short-time memory in order from the memory area in which the time at which the frame is stored is oldest. An unused state is set (step S5). At this time, the memory area to be unused is determined by the short-time memory detector 150.
[0059]
This state is indicated by the memory 34 in FIG. 3, and three memory areas (memory area numbers A6, A5, and A4) stored in the short time memory area S at the oldest time become unused. In this case, since the memory area of the memory area number A6 is unused from the beginning, the short-time memory release unit 134 sets the memory areas of the memory area numbers A5 and A4 to the unused state.
[0060]
Then, the short-time memory detection unit 150 stores the unused memory area of the short-time memory in addition to the long-time memory as belonging to the long-time memory, and stores the long-time memory area L and the short-time memory area S Change the memory size of
[0061]
This state is the memory 35 in FIG. 3, the boundary between the short-term memory area S and the long-term memory area L is changed from K1 to K3, and the short-term memory area S is divided into four memory areas A0 to A3. Then, the storage capacities of the long-term memory and the short-term memory are redistributed so that the long-term memory area L becomes seven memory areas from memory area numbers A4 to A10 (step S4).
[0062]
Such processing is performed for each memory area by a table storing whether the memory area belongs to the short-time memory or the long-time memory, whether the memory area is used, or whether the memory area is used. This can be easily performed by providing a table for storing the presence or absence.
[0063]
Next, the operation in the second case will be described with reference to the flowchart in FIG. 4 and the diagram showing the change in the state in FIG. Second, when redistributing the storage capacities of the long-term memory and the short-term memory, in both cases where the memory area of the long-term memory decreases and increases, This is an example in which the memory size of each memory of the memory is changed, and then one of the memories is moved to the other memory with one decreasing memory area being unused.
[0064]
The memory 51 in FIG. 5 has the same configuration as the memory 31 in FIG.
First, the flowchart of FIG. 4 differs from that of FIG. 2, that is, when the memory size comparison unit 131 determines that the memory size is to be changed (Y in step S1) in the process of determining whether to change the memory size (step S1). The processing will be described. When the memory size comparing unit 131 determines that the memory size is changed, the lost long-term memory detection unit 132 or the short-term lost memory detection unit 150 sets the long-term memory area L and the short-term memory area L in accordance with the comparison result of the memory size comparison unit 131. Change the boundary of the memory area S.
[0065]
In this case, when the memory size of the long-term memory area L becomes smaller, the boundary between the long-term memory area L and the short-term memory area S changes from K1 to K2 as shown in the memory 52 of FIG. When the memory size of the area S becomes smaller, the boundary is changed from K1 to K3 as shown in the memory 54 of FIG. (Step S11).
Subsequently, a process (step S12) of determining whether to reduce the memory area of the long-term memory by the memory size comparing unit 131 is performed.
[0066]
At this time, when it is determined that the memory area of the long-term memory is to be reduced (Y in step S12), the boundary between the short-term memory area S and the long-term memory area L is determined as shown in the memory 52 of FIG. Has been changed from K1 to K2 (in step S11), and the long-term memory release unit 133, as shown in the memory 53 of FIG. 5, determines the memory area ( The memory area numbers A7, A8) are set in an unused state. Then, the lost long-time memory detection unit 132 moves the unused memory area to the short-time memory area S (Step S13), and ends the processing. Thereby, the memory area is redistributed into the short-time memory area S and the long-time memory area L.
[0067]
On the other hand, when the memory size comparing unit 131 determines that the memory size of the long-term memory is not reduced (N in step S12), as shown in the memory 54 of FIG. This means that the boundary with the region L has been changed from K1 to K3 (in step S11).
[0068]
Subsequently, as shown by the memory 55 in FIG. 5, the short-time memory release unit 134 sets the time at which the frame was stored in the memory area of the short-time memory in the chronological order (the memory area numbers A6, A5, and A4). Leave unused. This unused memory area is determined by the disappearance short-time memory detection unit 150.
[0069]
Then, the lost short-time memory detection unit 150 moves the unused memory area to the long-time memory area L, and ends the process (step S14). Thereby, the memory area is redistributed into the short-time memory area S and the long-time memory area L.
[0070]
In the above processing, the area of the short-term memory and the long-term memory (the short-term memory area S and the long-term memory area L) are determined by the boundary K2 or K3 when the memory size is changed (step S11). Thus, it is not determined which of the long-term memory and the short-term memory is to be transferred to the other memory.
[0071]
Next, the operation in the third case will be described with reference to the flowchart in FIG. 6 and the state change diagram in FIG. Third, when the storage capacity of the long-term memory and the short-term memory is redistributed, if the memory area of the long-term memory decreases, the reduced memory area is placed in an unused state, and the memory size of each memory is reduced. In the case where the memory area is changed and the memory area of the long-time memory increases, the memory size of each memory is first changed, and then the memory area to be reduced is set to an unused state and transferred to the other memory.
[0072]
The state of the memory 71 in FIG. 7 is the same as the state of the memory 31 in FIG.
First, the flow chart of FIG. 6 is different from that of FIG. 2, that is, the processing after the determination processing (step S2) of whether to reduce the memory area of the long-time memory will be described.
[0073]
When the memory size comparison unit 131 determines that the memory area of the long-term memory is to be reduced (Y in step S2), the long-term memory release unit 133 determines the long-term memory by the lost long-term memory detection unit 132 The used memory area is set in an unused state (step S21).
That is, the state of the memory 72 in FIG. 7 is set, and the memory areas of the memory area numbers A7 and A8 are unused.
[0074]
Subsequently, the lost long-term memory detection unit 132 changes the boundary between the short-term memory area S and the long-term memory area L from K1 to K2 as shown in the memory 73 in FIG. Is moved to the short-term memory area S (step S22), and the process is terminated. That is, the storage capacities of the long-term memory and the short-term memory are redistributed.
[0075]
On the other hand, when the memory size comparison unit 131 determines that the memory area of the long-term memory is not reduced (N in step S2), the lost short-time memory detection unit 150 reduces the number of memory areas of the short-term memory. The size is changed (step S23). The state shown in the memory 74 of FIG. 7 is a state in which the size has been changed, and the boundary between the short-term memory area S and the long-term memory area L has been changed from K1 to K3.
[0076]
Next, as shown by the memory 75 in FIG. 7, the short-time memory release unit 134 sets the time at which the frame was stored in the memory area of the short-time memory in the chronological order (the memory area numbers A6, A5, and A4). Leave unused. This unused memory area is determined by the disappearance short-time memory detection unit 150. Then, the lost short-time memory detection unit 150 moves the unused memory area in the short-time memory area S to the long-time memory area L (Step S24), and ends the processing.
[0077]
Also in the above processing, at the time when the memory size is changed (step S23), only the short-time memory and the long-time memory are determined by the boundary K3. It is in a state where it is not determined whether to move to the time memory area L. That is, when the memory size is changed, the memory areas of the memory area numbers A4, A5, and A6 belong to the short-time memory.
[0078]
Further, the operation in the fourth case will be described with reference to the flowchart in FIG. 8 and the diagram showing the state change in FIG. Fourth, when redistributing the storage capacities of the long-term memory and the short-term memory, if the memory area of the long-term memory decreases, first change the memory size of each memory, and then reduce the memory area. When the memory area of the memory is increased for a long time while the memory area of the memory is increased for a long time, the memory area of the decreasing memory area is changed to the unused state, and then the memory size of each memory is changed.
[0079]
The memory 91 in FIG. 9 is in the same state as the memory 31 in FIG.
First, the flow chart of FIG. 8 is different from that of FIG. 2, that is, the processing after the determination processing (step S2) of whether to reduce the memory area of the long-time memory will be described.
[0080]
When the memory size comparison unit 131 determines that the memory area of the long-term memory is to be reduced (Y in step S2), the lost long-term memory detection unit 132 changes the memory size so as to reduce the number of memory areas of the long-term memory. (Step S31).
The state shown in the memory 92 of FIG. 9 is a state in which the size has been changed, and the boundary between the short-term memory area S and the long-term memory area L has been changed from K1 to K2.
[0081]
Subsequently, the long-time memory release unit 133 sets the memory areas (memory area numbers A7 and A8) of the long-term memory determined by the lost long-term memory detection unit 132 to an unused state, as indicated by the memory 93 in FIG. I do. Then, the lost long-time memory detection unit 132 moves the unused memory area to the short-time memory area S (Step S32), and ends the processing.
[0082]
In the above processing, when the memory size is changed (step S31), the area of the short-time memory and the long-time memory is determined by the boundary K2. Whether to move to the area L is not determined. That is, when the memory size is changed, the memories of the memory area numbers A7 and A8 are long-time memories.
[0083]
On the other hand, when the memory size comparison unit 131 determines that the memory area of the long-term memory is not reduced (N in step S2), the short-time memory release unit 134 determines the memory area determined by the lost short-time memory detection unit 150. Is set to an unused state (step S33). At this time, as shown in the memory 94 of FIG. 9, three memory areas in the short-time memory area are unused in the order of older stored times (the order of the memory area numbers A6, A5, and A4). It becomes.
[0084]
Subsequently, the lost short-time memory detecting unit 150 changes the memory size so that the unused memory area of the short-time memory is used as the long-time memory (step S34), and ends the process. The state in which the size of the memory is changed is the state of the memory 95 in FIG. 9, and the boundary between the long-term memory area L and the short-term memory area S is changed from K1 to K3.
[0085]
Note that the memories described with reference to FIGS. 3, 5, 7, and 9 logically show that the ratio between the short-term memory area and the long-term memory area changes. It need not be physically contiguous.
As described above, an image encoding device can be realized.
[0086]
As described above, according to the present embodiment, when the memory area of the short-term memory is changed to the memory area of the other long-term memory, the memory area stored at the old time of the short-term memory is changed. In an apparatus that encodes an input image while comparing it with a frame to make it more unused, encoding can be performed while comparing the input image with a new frame that is more likely to be a reference. In addition, it is possible to avoid a mismatch between the encoding process and the decoding process.
[0087]
(Embodiment 2)
FIG. 10 is a block diagram of an image decoding apparatus according to the present invention, and decodes an encoded signal str encoded by the image encoding apparatus shown in FIG.
10, the same components as those of the image decoding device shown in FIGS. 1 and 12 are denoted by the same reference numerals, and the description thereof will be described.
[0088]
10, the image decoding apparatus includes a variable length decoding unit 120, a frame memory 102, a motion compensation unit 103, an inverse quantization unit 107, an inverse orthogonal transform unit 108, an addition unit 109, and a management information decoding unit. Conversion unit 236, long-time memory size holding unit 130, memory size comparison unit 131, lost long-term memory detection unit 132, long-time memory release unit 133, lost short-time memory detection unit 150, short-time memory It is composed of an opening unit 134 and a long-time memory moving unit 135, and decodes the input encoded signal str to output a decoded image Vout.
[0089]
As described with reference to FIG. 21, the variable length decoding unit 120 decodes the encoded signal str, outputs the motion vector MV and the reference image number Idx to the frame memory 102, and outputs the quantization value M6 to the inverse quantization unit 107. And outputs the management information MMCO to the management information decoding unit 236.
Further, the quantized value M6 is input to the adding unit 109 as a decoded residual image M8 via the inverse quantization unit 107 and the inverse orthogonal transform unit 108.
[0090]
The motion compensation unit 103 reads out the pixels in the area indicated by the reference image number Idx and the motion vector MV from the frame memory 102 as the motion compensation reference image M2, performs a predetermined operation, calculates the motion compensation image M3, and Output to 109.
The addition unit 109 outputs the decoded image Vout by adding the decoded residual image M8 and the motion compensation image M3, and outputs the decoded image Vout to the frame memory 102 for reference in decoding a subsequent image.
[0091]
Further, the management information decoding unit 236 acquires and decodes the management information MMCO from the variable length decoding unit 120, and transmits the long-term memory size change signal LTS to the frame memory 102, the long-term memory size holding unit 130, the memory size comparing unit 131, and outputs a long-term memory movement signal LTM to the long-time memory movement unit 135. Further, the management information decoding unit 236 outputs the long-time memory release signal LTD to the long-time memory release unit 133 and outputs the short-time memory release signal STD to the short-time memory release unit 134.
[0092]
The operation of setting the memory areas of the short-term memory and the long-term memory to the unused state and changing the respective memory areas is the same as that of the image encoding apparatus of FIG.
With the above configuration, the encoded signal str encoded by the image encoding device in FIG. 10 can be correctly decoded.
[0093]
As described above, according to the present embodiment, when the memory area of the short-time memory is changed to the memory area of the other long-time memory when the memory area of the In an apparatus that decodes an input image while comparing it with a frame in order to make it unused from the area, it is possible to perform decoding while comparing the input image with a new frame that is more likely to be a reference It is possible to avoid a mismatch between the encoding process and the decoding process.
Note that, in each of the above-described embodiments, the process of “releasing the memory area” may be accompanied by a process of deleting the contents of the memory area.
[0094]
Further, the image encoding device and the image decoding device described in the above embodiments can be realized not only by dedicated hardware such as an LSI, but also as a program to be executed by a general-purpose computer such as a personal computer. You can also.
Such a program can be distributed via a recording medium such as a CD-ROM or a transmission medium such as the Internet.
[0095]
FIG. 11 illustrates a case where the image encoding method used in the image encoding device according to the above embodiment and the image decoding method used in the image decoding device are implemented by a computer system using a program stored in a flexible disk. FIG.
[0096]
FIG. 11B shows the appearance, cross-sectional structure, and flexible disk of the flexible disk as viewed from the front, and FIG. 11A shows an example of the physical format of the flexible disk which is a recording medium body. The flexible disk FD is built in the case F, and a plurality of tracks Tr are formed concentrically from the outer circumference toward the inner circumference on the surface of the disk, and each track is divided into 16 sectors Se in an angular direction. ing. Therefore, in the flexible disk storing the program, an image encoding method and an image decoding method as the program are recorded in an area allocated on the flexible disk FD.
[0097]
FIG. 11C shows a configuration for recording and reproducing the program on the flexible disk FD. When the above program is recorded on the flexible disk FD, the image encoding method and the image decoding method as the above program are written from the computer system Cs via the flexible disk drive FDD. When the image encoding method and the image decoding method are constructed in a computer system using a program in a flexible disk, the program is read from the flexible disk by a flexible disk drive and transferred to the computer system.
[0098]
In the above description, the description has been made using a flexible disk as a recording medium. However, the same description can be made using an optical disk. Further, the recording medium is not limited to this, and can be similarly implemented as long as the program can be recorded, such as a CD-ROM, a memory card, a ROM cassette, and the like.
[0099]
As described above, in the present embodiment, with regard to the long-term memory, which part of the memory area is allocated to the long-term memory is determined in advance, and an index that can uniquely designate each memory is determined. When the size of the increase or decrease of the long-term memory is explicitly changed, the following processing is performed.
When the long-term memory decreases, for example, the long-term memory is allocated to the short-term memory in order from a region having a larger index. Note that the regions may be allocated to the memory for a short time in order from the region with the smallest index.
On the other hand, for the short-term memory, the use of the memory area is usually determined by the FIFO. When the long-term memory increases, first, the unused memory among the short-term memory is first used. To be assigned to
[0100]
Further, here, an application example of the image encoding device or the image decoding device described in the above embodiment and a system using the same will be described.
FIG. 12 is a block diagram illustrating an overall configuration of a content supply system ex100 that realizes a content distribution service. A communication service providing area is divided into desired sizes, and base stations ex107 to ex110, which are fixed wireless stations, are installed in each cell.
[0101]
The content supply system ex100 includes, for example, a computer ex111, a PDA (personal digital assistant) ex112, a camera ex113, a mobile phone ex114, and a camera on the Internet ex101 via an Internet service provider ex102 and a telephone network ex104, and base stations ex107 to ex110. Each device such as the mobile phone ex115 is connected.
[0102]
However, the content supply system ex100 is not limited to the combination as shown in FIG. 1, and may be connected by combining any of them. Further, each device may be directly connected to the telephone network ex104 without going through the base stations ex107 to ex110 which are fixed wireless stations.
[0103]
The camera ex113 is a device such as a digital video camera capable of shooting moving images. In addition, a mobile phone can be a PDC (Personal Digital Communications) system, a CDMA (Code Division Multiple Access) system, a W-CDMA (Wideband-Code Division Multiple Access mobile phone system, or a GSM gigabit mobile access system). Or PHS (Personal Handyphone System) or the like.
[0104]
The streaming server ex103 is connected from the camera ex113 to the base station ex109 and the telephone network ex104, and enables live distribution and the like based on encoded data transmitted by the user using the camera ex113. The encoding process of the photographed data may be performed by the camera ex113, or may be performed by a server or the like that performs the data transmission process.
[0105]
Also, moving image data captured by the camera 116 may be transmitted to the streaming server ex103 via the computer ex111. The camera ex116 is a device such as a digital camera that can shoot still images and moving images. In this case, encoding of the moving image data may be performed by the camera ex116 or the computer ex111. The encoding process is performed by the LSI ex117 of the computer ex111 and the camera ex116.
[0106]
The image encoding / decoding software may be incorporated in any storage medium (CD-ROM, flexible disk, hard disk, or the like) that is a recording medium readable by the computer ex111 or the like. Further, the moving image data may be transmitted by the mobile phone with camera ex115. The moving image data at this time is data encoded by the LSI included in the mobile phone ex115.
[0107]
In the content supply system ex100, the content (for example, a video image of a live music) captured by the user with the camera ex113, the camera ex116, or the like is encoded and transmitted to the streaming server ex103 as in the above-described embodiment. On the other hand, the streaming server ex103 stream-distributes the content data to the requesting client.
[0108]
Examples of the client include a computer ex111, a PDA ex112, a camera ex113, a mobile phone ex114, and the like that can decode the encoded data. In this way, the content supply system ex100 can receive and reproduce the encoded data at the client, and further, realizes personal broadcast by receiving, decoding, and reproducing the data in real time at the client. It is a system that becomes possible.
[0109]
The encoding and decoding of each device constituting this system may be performed using the image encoding device or the image decoding device described in each of the above embodiments.
A mobile phone will be described as an example.
[0110]
FIG. 13 is a diagram illustrating a mobile phone ex115 that uses the image encoding device and the image decoding device described in the above embodiment. The mobile phone ex115 includes an antenna ex201 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex203 capable of taking a picture such as a CCD camera, a still image, a picture taken by the camera unit ex203, and an antenna ex201. A display unit ex202 such as a liquid crystal display for displaying data obtained by decoding a received video or the like, a main unit including a group of operation keys ex204, an audio output unit ex208 such as a speaker for outputting audio, and audio input. Input unit ex205 such as a microphone for storing encoded or decoded data, such as data of captured moving images or still images, received mail data, moving image data or still image data, etc. Storage media ex207, attached storage media ex207 to mobile phone ex115 And a slot portion ex206 to ability. The storage medium ex207 stores a flash memory element, which is a kind of an electrically erasable and programmable read only memory (EEPROM), which is a nonvolatile memory that can be electrically rewritten and erased, in a plastic case such as an SD card.
[0111]
Further, the mobile phone ex115 will be described with reference to FIG. The mobile phone ex115 is provided with a power supply circuit unit ex310, an operation input control unit ex304, an image encoding unit, and a main control unit ex311 which controls the respective units of a main body unit including a display unit ex202 and operation keys ex204. Unit ex312, camera interface unit ex303, LCD (Liquid Crystal Display) control unit ex302, image decoding unit ex309, demultiplexing unit ex308, recording / reproducing unit ex307, modulation / demodulation circuit unit ex306, and audio processing unit ex305 via the synchronous bus ex313. Connected to each other.
[0112]
When the end of the call and the power key are turned on by a user operation, the power supply circuit unit ex310 supplies power to each unit from the battery pack to activate the digital cellular phone with camera ex115 in an operable state. .
[0113]
The mobile phone ex115 converts a sound signal collected by the sound input unit ex205 into digital sound data by the sound processing unit ex305 in the voice call mode based on the control of the main control unit ex311 including a CPU, a ROM, a RAM, and the like. This is spread-spectrum-processed by a modulation / demodulation circuit unit ex306, subjected to digital-analog conversion processing and frequency conversion processing by a transmission / reception circuit unit ex301, and then transmitted via an antenna ex201.
[0114]
Also, the mobile phone ex115 amplifies the received signal received by the antenna ex201 in the voice communication mode, performs frequency conversion processing and analog-to-digital conversion processing, performs spectrum despreading processing in the modulation / demodulation circuit unit ex306, and performs analog voice After being converted into a signal, the signal is output via the audio output unit ex208.
[0115]
Further, when an e-mail is transmitted in the data communication mode, text data of the e-mail input by operating the operation key ex204 of the main body is sent to the main control unit ex311 via the operation input control unit ex304. The main control unit ex311 performs spread spectrum processing on the text data in the modulation / demodulation circuit unit ex306, performs digital / analog conversion processing and frequency conversion processing in the transmission / reception circuit unit ex301, and transmits the data to the base station ex110 via the antenna ex201.
[0116]
When transmitting image data in the data communication mode, the image data captured by the camera unit ex203 is supplied to the image encoding unit ex312 via the camera interface unit ex303. When image data is not transmitted, image data captured by the camera unit ex203 can be directly displayed on the display unit ex202 via the camera interface unit ex303 and the LCD control unit ex302.
[0117]
The image encoding unit ex312 includes the image encoding device described with reference to FIG. 1, and uses the image data supplied from the camera unit ex203 in the encoding method used in the image encoding device described in the above embodiment. The image data is converted into encoded image data by compression encoding, and is transmitted to the demultiplexing unit ex308. At this time, the mobile phone ex115 simultaneously transmits the audio collected by the audio input unit ex205 during imaging by the camera unit ex203 to the demultiplexing unit ex308 as digital audio data via the audio processing unit ex305.
[0118]
The demultiplexing unit ex308 multiplexes the encoded image data supplied from the image encoding unit ex312 and the audio data supplied from the audio processing unit ex305 by a predetermined method, and multiplexes the resulting multiplexed data into a modulation / demodulation circuit unit. The signal is subjected to spread spectrum processing in ex306 and subjected to digital-analog conversion processing and frequency conversion processing in the transmission / reception circuit unit ex301, and then transmitted via the antenna ex201.
[0119]
When receiving data of a moving image file linked to a homepage or the like in the data communication mode, the modulation and demodulation circuit unit ex306 performs spectrum despread processing on a received signal received from the base station ex110 via the antenna ex201, and obtains the resulting multiplexed signal. The demultiplexed data is sent to the demultiplexing unit ex308.
[0120]
To decode the multiplexed data received via the antenna ex201, the demultiplexing unit ex308 separates the multiplexed data into coded image data and audio data by separating the multiplexed data, and transmits the multiplexed data via the synchronization bus ex313. And supplies the encoded image data to the image decoding unit ex309 and the audio data to the audio processing unit ex305.
[0121]
Next, the image decoding unit ex309 is configured to include the image decoding device described with reference to FIG. 10 and decodes the encoded image data using a decoding method corresponding to the encoding method described in the above embodiment. Thereby, reproduced moving image data is generated and supplied to the display unit ex202 via the LCD control unit ex302, whereby, for example, moving image data included in a moving image file linked to a homepage is displayed. At this time, the audio processing unit ex305 simultaneously converts the audio data into an analog audio signal, and supplies the analog audio signal to the audio output unit ex208. Thereby, the audio data included in the moving image file linked to the homepage is reproduced, for example. You.
[0122]
It should be noted that the present invention is not limited to the example of the system described above, and digital broadcasting using satellites and terrestrial waves has recently become a hot topic. As shown in FIG. Any of the decoding devices can be incorporated.
[0123]
Specifically, at the broadcasting station ex409, an encoded bit stream of video information is transmitted to a communication or broadcasting satellite ex410 via radio waves. The broadcasting satellite ex410 receiving this transmits a radio wave for broadcasting, receives this radio wave with a home antenna ex406 having a satellite broadcasting receiving facility, and transmits the radio wave to a television (receiver) ex401 or a set-top box (STB) ex407 or the like. The device decodes the encoded bit stream and reproduces it. Further, the image decoding device described in the above embodiment can also be mounted on a playback device ex403 that reads and decodes an encoded bit stream recorded on a storage medium ex402 that is a recording medium.
[0124]
In this case, the reproduced video signal is displayed on the monitor ex404. A configuration is also conceivable in which an image decoding device is mounted in a set-top box ex407 connected to a cable ex405 for cable television or an antenna ex406 for satellite / terrestrial broadcasting, and this is reproduced on a monitor ex408 of the television.
[0125]
At this time, the image encoding device may be incorporated in the television instead of the set-top box. Further, it is also possible to receive a signal from the satellite ex410 or the base station ex107 or the like with the car ex412 having the antenna ex411 and reproduce the moving image on a display device such as the car navigation ex413 or the like included in the car ex412.
[0126]
The configuration of the car navigation system ex413 may be, for example, a configuration excluding the camera unit ex203 and the camera interface unit ex303 in the configuration illustrated in FIG. 14. . In addition, terminals such as the mobile phone ex114 and the like have three mounting formats, in addition to a transmitting / receiving terminal having both an encoder and a decoder, a transmitting terminal having only an encoder and a receiving terminal having only a decoder. Can be considered.
[0127]
As described above, it is possible to use the image encoding device and the image decoding device shown in the embodiment of FIGS. 1 and 10 in any of the devices and systems described above. The effect described in 10 can be obtained.
[0128]
【The invention's effect】
As is apparent from the above description, the image encoding apparatus according to the present invention is an apparatus that performs encoding while comparing an input image with a reference image, and has a first storage area and a data storage method that are different from each other. A storage unit that stores the reference image by dividing it into a second storage area; and a storage unit that reduces the storage capacity when the storage capacity of the first and second storage areas is redistributed. A redistribution unit is provided for setting a storage area in which a reference image is stored at an old time as a second storage area having a larger storage capacity.
[0129]
With this, when the storage capacity of the first storage area is reduced, the reference image stored at the old time is lost, so that the input image is compared with a new reference image that is more likely to be referred to. It is possible to perform encoding while avoiding mismatch between the encoding process and the decoding process.
[0130]
A decoding unit that decodes the input image while comparing the input image with the reference image, the storage unit configured to store the reference image by dividing the image into a first storage area and a second storage area having different data read / write schemes; When redistributing the storage capacity of the first and second storage areas, the storage area in which the reference image is stored at the earliest time in the first storage area having the smaller storage capacity is increased. And a redistribution unit for making the storage area usable as a second storage area.
[0131]
With this, when the storage capacity of the first storage area is reduced, the reference image stored at the old time is lost, so that the input image is compared with a new reference image that is more likely to be referred to. Decoding can be performed while avoiding mismatch between the encoding process and the decoding process.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image encoding device according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing an operation of the image coding apparatus according to the first embodiment;
FIG. 3 is a diagram showing a state of a memory in the image encoding device according to the first embodiment;
FIG. 4 is a flowchart showing another operation of the image coding apparatus according to the first embodiment;
FIG. 5 is a diagram showing another state of the memory in the image encoding device of the above.
FIG. 6 is a flowchart showing still another operation of the image encoding apparatus.
FIG. 7 is a diagram showing still another state of the memory in the image encoding device of the above.
FIG. 8 is a flowchart showing yet another operation of the above image encoding device.
FIG. 9 is a diagram showing still another state of the memory in the image encoding device of the above.
FIG. 10 is a block diagram illustrating a configuration of an image decoding device according to a second embodiment of the present invention.
FIGS. 11A, 11B, and 11C are explanatory diagrams of a case where the present invention is implemented by a computer system using a flexible disk storing an image encoding method and an image decoding method according to the present invention.
FIG. 12 is a configuration diagram showing an overall configuration of a content supply system using an image encoding device and an image decoding device according to the present invention.
FIG. 13 is an external view showing a configuration of a mobile phone using the image encoding device and the image decoding device according to the present invention.
FIG. 14 is a block diagram showing a configuration of the mobile phone of the above.
FIG. 15 is a configuration diagram illustrating an overall configuration of a digital broadcasting system using the image encoding device and the image decoding device according to the present invention.
FIG. 16 is a block diagram illustrating a configuration of an image encoding device assumed from a conventional image encoding method and the like.
17A and 17B are explanatory diagrams of an image management method.
FIGS. 18A and 18B are explanatory diagrams of image encoding using a short-time memory.
FIG. 19 is an explanatory diagram of image encoding using a long-term memory.
FIGS. 20A and 20B are explanatory diagrams of an image management method.
FIG. 21 is a block diagram illustrating a configuration of an image decoding device assumed from a conventional image decoding method.
[Explanation of symbols]
101 Motion detector
102 frame memory
103 Motion compensation unit
104 Subtraction unit
105 orthogonal transform unit
106 Quantization unit
107 Inverse quantization unit
108 Inverse orthogonal transform unit
109 Adder
110 variable length coding unit
130 Long-time memory size holding unit
131 Memory size comparison unit
132 Lost long time memory detector
133 Long-time memory release section
134 Short-time memory release section
135 Long-term memory moving unit
136 management information encoding unit
150 erasure short-time memory detector

Claims (12)

入力された画像を参照画像と比較しながら符号化する装置であって、
データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段と、
前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする再配分手段と
を備えることを特徴とする画像符号化装置。
An apparatus for encoding while comparing an input image with a reference image,
Storage means for storing a reference image by dividing into a first storage area and a second storage area having different data read / write methods;
When the storage capacity of the first and second storage areas is redistributed, the storage area in which the reference image is stored at the oldest time in the first storage area having the smaller storage capacity has a larger storage capacity. An image encoding device, comprising: a reallocation unit that makes the image data usable as a second storage area.
前記再配分手段は、前記第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を未使用状態にし、未使用状態にした記憶領域を前記第2の記憶領域に加える
ことを特徴とする請求項1記載の画像符号化装置。
The redistribution unit sets a storage area in which a reference image is stored at the oldest time in the first storage area to an unused state, and adds the unused storage area to the second storage area. The image coding apparatus according to claim 1, wherein
前記第1の記憶領域は、先入れ先出し方式の記憶領域であり、
前記第2の記憶領域は、ランダムアクセス方式の記憶領域である
ことを特徴とする請求項1又は2記載の画像符号化装置。
The first storage area is a first-in first-out storage area,
The image encoding device according to claim 1, wherein the second storage area is a storage area of a random access method.
前記第1の記憶領域は、短時間記憶メモリであり、
前記第2の記憶領域は、前記第1の記憶領域よりも長い時間分の参照画像を記憶する長時間記憶メモリである
ことを特徴とする請求項1〜3のいずれか1項に記載の画像符号化装置。
The first storage area is a short-term storage memory,
The image according to any one of claims 1 to 3, wherein the second storage area is a long-term storage memory that stores a reference image for a longer time than the first storage area. Encoding device.
入力された画像を参照画像と比較しながら復号化する装置であって、
データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段と、
前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする再配分手段と
を備えることを特徴とする画像復号化装置。
An apparatus for decoding while comparing an input image with a reference image,
Storage means for storing a reference image by dividing into a first storage area and a second storage area having different data read / write methods;
When the storage capacity of the first and second storage areas is redistributed, the storage area in which the reference image is stored at the oldest time in the first storage area having the smaller storage capacity has a larger storage capacity. An image decoding device, comprising: a reallocation unit that sets a state in which the image data can be used as a second storage area.
前記再配分手段は、前記第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を未使用状態にし、未使用状態にした記憶領域を前記第2の記憶領域に加える
ことを特徴とする請求項5記載の画像復号化装置。
The redistribution unit sets a storage area in which a reference image is stored at the oldest time in the first storage area to an unused state, and adds the unused storage area to the second storage area. The image decoding apparatus according to claim 5, wherein
前記第1の記憶領域は、先入れ先出し方式の記憶領域であり、
前記第2の記憶領域は、ランダムアクセス方式の記憶領域である
ことを特徴とする請求項5又は6記載の画像復号化装置。
The first storage area is a first-in first-out storage area,
7. The image decoding apparatus according to claim 5, wherein the second storage area is a storage area of a random access method.
前記第1の記憶領域は、短時間記憶メモリであり、
前記第2の記憶領域は、前記第1の記憶領域よりも長い時間分の参照画像を記憶する長時間記憶メモリである
ことを特徴とする請求項5〜7のいずれか1項に記載の画像復号化装置。
The first storage area is a short-term storage memory,
The image according to any one of claims 5 to 7, wherein the second storage area is a long-term storage memory that stores a reference image for a longer time than the first storage area. Decryption device.
データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段を用いた画像符号化方法であって、
前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする
ことを特徴とする画像符号化方法。
An image encoding method using a storage unit that stores a reference image by dividing into a first storage area and a second storage area having different data read / write methods,
When the storage capacity of the first and second storage areas is redistributed, the storage area in which the reference image is stored at the oldest time in the first storage area having the smaller storage capacity has a larger storage capacity. An image coding method, wherein the image is set to be usable as a second storage area.
データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段を用いた画像復号化方法であって、
前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にする
ことを特徴とする画像復号化方法。
An image decoding method using a storage unit that stores a reference image by dividing into a first storage area and a second storage area having different data read / write methods,
When the storage capacity of the first and second storage areas is redistributed, the storage area in which the reference image is stored at the oldest time in the first storage area having the smaller storage capacity has a larger storage capacity. An image decoding method, wherein the image is set to be usable as a second storage area.
データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段を用いた画像符号化のためのプログラムであって、
前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にするステップをコンピュータに実行させる
ことを特徴とするプログラム。
A program for image encoding using a storage unit that stores a reference image by dividing into a first storage area and a second storage area having different data read / write methods,
When the storage capacity of the first and second storage areas is redistributed, the storage area in which the reference image is stored at the oldest time in the first storage area having the smaller storage capacity has a larger storage capacity. A program for causing a computer to execute a step of making the storage area usable as a second storage area.
データの読み書き方式が異なる第1の記憶領域及び第2の記憶領域に分割して参照画像を格納する記憶手段を用いた画像復号化のためのプログラムであって、
前記第1及び第2の記憶領域の記憶容量の再配分を行う場合に、記憶容量が小さくなる第1の記憶領域において最も古い時刻に参照画像が格納された記憶領域を、記憶容量が大きくなる第2の記憶領域として使用可能な状態にするステップをコンピュータに実行させる
ことを特徴とするプログラム。
A program for image decoding using a storage unit that stores a reference image by dividing into a first storage area and a second storage area having different data read / write methods,
When the storage capacity of the first and second storage areas is redistributed, the storage area in which the reference image is stored at the oldest time in the first storage area having the smaller storage capacity has a larger storage capacity. A program for causing a computer to execute a step of making the storage area usable as a second storage area.
JP2002204716A 2002-07-02 2002-07-12 Image encoder and image decoder Pending JP2004088135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002204716A JP2004088135A (en) 2002-07-02 2002-07-12 Image encoder and image decoder

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002194007 2002-07-02
JP2002204716A JP2004088135A (en) 2002-07-02 2002-07-12 Image encoder and image decoder

Publications (1)

Publication Number Publication Date
JP2004088135A true JP2004088135A (en) 2004-03-18

Family

ID=32071935

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002204716A Pending JP2004088135A (en) 2002-07-02 2002-07-12 Image encoder and image decoder

Country Status (1)

Country Link
JP (1) JP2004088135A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7889788B2 (en) 2004-04-28 2011-02-15 Panasonic Corporation Stream generation apparatus, stream generation method, coding apparatus, coding method, recording medium and program thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7889788B2 (en) 2004-04-28 2011-02-15 Panasonic Corporation Stream generation apparatus, stream generation method, coding apparatus, coding method, recording medium and program thereof
US7965766B2 (en) 2004-04-28 2011-06-21 Panasonic Corporation Stream generation apparatus, stream generation method, coding apparatus, coding method, recording medium and program thereof
US8442382B2 (en) 2004-04-28 2013-05-14 Panasonic Corporation Stream generation apparatus, stream generation method, coding apparatus, coding method, recording medium and program thereof

Similar Documents

Publication Publication Date Title
JP5355807B2 (en) Encoded data distribution method and distribution system
JP4355156B2 (en) Image decoding method and image decoding apparatus
JP4215197B2 (en) Image encoding method and image decoding method
JP5171662B2 (en) Image encoding method and image encoding apparatus
JP2004260236A (en) Encoding method and decoding method of moving picture
JP2004088135A (en) Image encoder and image decoder
JP4531846B2 (en) Encoding method and encoding apparatus