JP3893281B2 - Image encoding apparatus, image encoding method, program, and storage medium - Google Patents
Image encoding apparatus, image encoding method, program, and storage medium Download PDFInfo
- Publication number
- JP3893281B2 JP3893281B2 JP2001392642A JP2001392642A JP3893281B2 JP 3893281 B2 JP3893281 B2 JP 3893281B2 JP 2001392642 A JP2001392642 A JP 2001392642A JP 2001392642 A JP2001392642 A JP 2001392642A JP 3893281 B2 JP3893281 B2 JP 3893281B2
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- compression
- encoded data
- compression encoding
- encoded
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Television Signal Processing For Recording (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、画像を圧縮符号化する画像符号化装置、画像符号化方法、プログラム、並びに記憶媒体に関するものである。
【0002】
【従来の技術】
現在、静止画像に対する圧縮符号化処理機能は多くのデジタル・イメージング機器に搭載されている。これらデジタル・イメージング機器の代表的なものは所謂デジタル・カメラの類であるが、デジタル・カラー・コピー機も圧縮符号化処理機能を備えるデジタル・イメージング機器のひとつである。
【0003】
デジタル・カラー・コピー機では原稿読み取り部から印刷部に対して読み取られた原稿画像データを転送する際のデータ転送量を軽減する目的で、原稿読み取り部には読み取られた原稿画像データに対する圧縮符号化処理機能が、一方の印刷部には符号化された原稿画像データ列に対する伸張復号化処理機能がそれぞれ搭載されている。
【0004】
原稿読み取り部の後段に具備される圧縮符号化処理部によって生成される符号化された原稿画像データ列のデータ量は、圧縮符号化処理される前の原稿画像データ、すなわち読み取られた原稿画像データのデータ量に比べると数分の一から十数分の一程度に低減され得る。
【0005】
符号化された原稿画像データ列の圧縮符号化処理される前の原稿画像データに対するデータ量の低減度、すなわち圧縮率の上限値は、符号化歪みが伸張復号化処理によって得られる再構成画像データから容易に視認できない程度の値がその許容される上限値として設定される。
【0006】
一方、上記圧縮率の許容される下限値は、原稿読み取り部における単位時間あたりに読み込むことができる原稿画像データの最大データ量、および原稿読み取り部から印刷部に転送する際の圧縮符号化された原稿画像データ列の最大データ転送量、といったようなそのシステムにおける各種システム・パラメータによって一意に決定され得る。
【0007】
このように圧縮率の許容される上限値および下限値が設定されたとしても、供給されるすべての原稿画像データに対する圧縮率をその範囲内に収めるように圧縮符号化処理を行なうことは容易ではない。
【0008】
その理由は、量子化テーブルに代表される符号化パラメータとして同一のものを用いて圧縮符号化処理を行なっても、得られる符号化された原稿画像データ列のデータ量は原稿画像データ毎に不定であること、言い換えるならば、読み取られた原稿画像データ毎にその圧縮率は変わってしまうことに起因する。
【0009】
これは、読み取られた原稿画像データ毎にその画像データが有する情報の空間周波数から見た偏りおよびその度合いが異なり、そのような原稿画像データに対する圧縮符号化処理の中では、値が0である変換係数に対するランレングス符号化および可変長符号を用いたエントロピー符号化といったような被圧縮符号化画像データが持つ冗長性を限りなく除去するための様々な手法が採用されているためである。
【0010】
従って、すべての原稿画像データに対する圧縮率をその許容される上限値と下限値の間の範囲に収めるように圧縮符号化処理を施すためには、被圧縮符号化データすなわち供給される原稿画像データの各々に対して適用する符号化パラメータを適応的に変える必要がある。
【0011】
一般的に圧縮率が一定になるように圧縮符号化処理を行なうためには、所謂情報量制御あるいは符号量制御と称される符号化制御を実現しなければならない。
【0012】
上記情報量制御の具体的な実現手法としては、フィードフォワード手法とフィードバック手法の大きくふたつの手法が知られている。
【0013】
フィードフォワード手法は圧縮符号化処理を行なう前に被圧縮符号化データとして入力される原画像データから別途ダイナミック・レンジ、電力、各種統計情報を算出して、それらの算出値を基に最適な符号化パラメータを予測した後、その得られた符号化パラメータを用いて実際の圧縮符号化処理を行なうものである。
【0014】
これに対して、フィードバック手法は試行となる圧縮符号化処理を行なうことによって得られた符号化データ量の実測値から最適な符号化パラメータを予測した後、その得られた符号化パラメータを用いて最終的な圧縮符号化処理を行なうものである。
【0015】
圧縮符号化処理を試行することによって得られた符号化データ量の実測値から最適な符号化パラメータを予測するフィードバック手法のほうが、実際に得られた符号化データ量を直接的に予測値算出に用いているという点で、フィードフォワード手法に比べてより高い精度で目的とする符号化データ量を生成する符号化パラメータの予測値を得ることができる。しかし、このフィードバック手法は原理的に試行となる圧縮符号化処理のために費やされる時間的なオーバーヘッドが余計にかかってしまうという欠点がある。
【0016】
ひとつの原画像データに対して目標とする圧縮率の符号化データ列が得られるまで何回も圧縮符号化処理を繰り返してもその処理時間の増分が許容できるようなシステム、言わばリアルタイム性や性能が過度に要求されないシステムであれば、特公平8−32037号公報に開示されているような有限回繰り返し試行アルゴリズムが適用可能である。
【0017】
しかし、デジタル・カメラやデジタル・カラー・コピー機器のようなデジタル・イメージング機器では一般的にリアルタイム性および性能が要求される。したがって、最適な符号化パラメータを予測するための試行となる圧縮符号化処理に費やされる時間的なオーバーヘッドは限りなく小さく抑えることが課題とされ、さらにその予測精度として十分高いものが要求される。
【0018】
フィードバック手法を用いた情報量制御における最適な符号化パラメータの予測精度を高めるためには、互いに異なる数多くの符号化パラメータを用いて試行となる圧縮符号化処理を複数回行ない、それらの符号化パラメータと実際に得られた符号化データ量の実測値との組み合わせ数を増やすことが効果的であることは容易に考えられる。しかし、その時間的なオーバーヘッドを最小限に抑えるためには、試行となる圧縮符号化処理の際に用いられる符号化パラメータの数と同数の演算回路あるいは処理回路を具備し、それらの回路を並列に動作させて、試行となる圧縮符号化処理を高速に行なうような工夫が必要となる。従来からこの課題を解決するいくつかの公知技術が考案されている。
【0019】
このような言わば並列回路アーキテクチャの公知技術の一例である文献1”映像情報1992年1月号51−58ページ「60〜140Mbps対応のHDTVコーデック』”では、複数の符号化パラメータとしてN組の量子化テーブルを用いて、N個の量子化回路およびN個の発生符号量測定回路を具備する圧縮符号化装置から得られるN個の符号化データ量から曲線近似を行なうことによって最適な符号化パラメータ、すなわち最適な量子化テーブルを得ることが記載されている。
【0020】
同様な構成でありながら回路規模の増大を抑える工夫として、特登録第02523953号公報では3個の量子化回路を備えることによって試行となる圧縮符号化処理の際に5組の量子化テーブルを用いた量子化を並列に行ない、結果として5つの符号化データ量の値を算出することが記載されている。
【0021】
ひとつの画像データを圧縮復号化処理するにあたって、符号化パラメータ、より具体的には量子化テーブルに対するスケーリング値を適応的に変えながら順次圧縮符号化処理を進めることができる符号化方式を採用している動画像圧縮符号化では、特登録第02897563号公報に記載されるような符号化パラメータの逐次補正アルゴリズムが適用できる。
【0022】
この従来例では、試行となる圧縮符号化処理の際に特定の量子化スケーリング値を用いて量子化して得られるブロック単位の符号化データ列のデータ量を算出し、その算出されたデータ量を基にM個の量子化スケール値で得られることが期待されるM個の符号化データ列のデータ量を予測し、前記M個の予測値から算出した目標符号化データ量と、実際に出力されている符号化データ列の現在までのデータ量の累積加算値との差分、すなわち予測誤差から実際に使用している量子化スケーリング値を逐次補正しながら圧縮符号化処理を進めている。
【0023】
さらに、実際に生成された符号化データ量が予測に反して許容される上限値を超えることを回避する目的で特登録第03038022号では、試行となる圧縮符号化処理の際に得られた符号化データ量から導出した量子化ステップ値を用いて実際に量子化および可変長符号化して得られた符号化データ列のデータ量が、ブロック単位に割り当てたデータ量を超えてしまった場合には、そのブロックにおける可変長符号化を打ち切ること(有意の変換係数の情報を廃棄すること)が記載されている。
【0024】
【発明が解決しようとする課題】
前述したようなフィードバック手法を用いた情報量制御における従来例の思想は、試行として行なわれる圧縮符号化処理によって得られたひとつあるいは複数個の符号化データ量の実測値を基に最適な符号化パラメータ、およびその符号化パラメータによって生成される符号化データ量の予測値を導出するという点でいずれも共通している。
【0025】
また一般的な静止画像圧縮符号化方式として今日広く採用されているJPEG符号化方式においては、最も代表的な符号化パラメータのひとつである量子化ステップ値行列、すなわち量子化テーブルについては、そのただ一つのテーブルの組み合わせがひとつの被圧縮符号化データを構成するすべてのブロックに対して共通に適用される。従って、このような符号化パラメータの自由度に制限のある静止画像圧縮符号化方式を採用することが前提になっている場合、従来例のひとつとして前述した符号化パラメータの逐次補正アルゴリズムを適用することはできない。
【0026】
さらに、もうひとつの従来例として引用した特登録第03038022号に記載されているアルゴリズムでは、ブロック単位に割り当てたデータ量を超えてしまった時点でそのブロックに対する可変長符号化を打ち切ってしまうので、画像データを構成するすべてのブロックの圧縮符号化処理が終了した時点で得られた最終的な符号化データ列のデータ量が許容される上限値を超えない場合でも、本来廃棄する必要が無い有意の変換係数まで廃棄することになってしまい、伸張復号化処理によって得られる再構成画像において圧縮符号化歪みの局所的なばらつきが生じてしまう。したがってデジタル・イメージング機器への適用は好ましいとは言えない。
【0027】
デジタル・イメージング機器のようにリアルタイム性および性能が要求されるシステムにおいて、予測精度の高いフィードバック手法を用いた情報量制御を実現しつつ圧縮符号化処理を行なう場合、従来例として前述した並列回路アーキテクチャは確かに有効な実現形態ではあることには間違いがない。しかし、複数の符号化処理回路を実現するための回路規模および複数個の符号化データ列を一時的に格納するためのバッファの容量としていずれも莫大なものが必要とされ、コスト的な見地からすると余りに多くの並列化を実現することは困難である。
【0028】
これらのことから、デジタル・イメージング機器において、JPEG符号化方式のような符号化パラメータの自由度に制限のある静止画像圧縮符号化方式を採用する場合、許容範囲内の回路規模で並列化数を上げて、少しでも多くの互いに異なる符号化パラメータによって圧縮符号化処理を同時に行ない、得られた複数個の符号化データ列から、圧縮率の許容される範囲内で最も符号化歪みの小さい符号化データ列を出力とすることが最適な実現形態となる。
【0029】
しかし並列化数が有限である以上、複数の符号化パラメータをもって生成された符号化データ列がいずれも圧縮率の許容範囲内からはずれてしまう場合もあり得る。このような場合、新たな符号化パラメータを決定して、被符号化データの先頭から再び圧縮符号化処理をやり直す必要がある。しかしこのやり直し、言わば再符号化処理に費やされる時間はそのままシステムの性能低下に繋がる。
【0030】
本発明は以上の問題に鑑みてなされたものであり、予め定められたサイズに画像データを圧縮符号化すると共に、圧縮符号化された符号化データ列を伸張復号化処理した場合に得られる画像の圧縮符号化歪みを抑え、高品質な再構成画像を得ることを目的とする。
【0031】
【課題を解決するための手段および作用】
本発明の目的を達成するために、例えば本発明の画像符号化装置は以下の構成を備える。
【0032】
すなわち、画像データに対して圧縮符号化を行う画像符号化装置であって、
画像データに対して変更可能な第1の圧縮符号化パラメータを用いて圧縮符号化を行う第1の圧縮符号化手段と、
前記第1の圧縮符号化パラメータよりも高い圧縮率で圧縮可能であって、変更可能な第2の圧縮符号化パラメータを用いて前記画像データに対して圧縮符号化を行う第2の圧縮符号化手段と、
前記第1の圧縮符号化手段により圧縮符号化された符号化データ列のデータ量を計数すると共に、当該データ量が所定量以上であるか否かを判断する判断手段と、
前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断される度に、前記第1の圧縮符号化パラメータを前記第2の圧縮符号化パラメータで置き換え、前記第2の圧縮符号化パラメータを更に高い圧縮率を得るためのパラメータに変更する変更手段と、
前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化手段により従前に圧縮符号化された符号化データ列を、パラメータ変更後の前記第1の圧縮符号化手段により圧縮符号化されたものとして保存する保存手段と、
前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化手段で従前に圧縮符号化されたデータを、前記変更手段によって変更した前記第2の圧縮符号化手段用のパラメータに従い再度圧縮符号化する再圧縮符号化手段と、
前記再圧縮符号化手段による再圧縮符号化処理が完了するより前に、前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断された場合、あるいは所定量以上になると予想された場合、前記第1の圧縮符号化手段による圧縮符号化処理を中断するように制御する制御手段と
を備えることを特徴とする。
【0033】
本発明の目的を達成するために、例えば本発明の画像符号化方法は以下の構成を備える。
【0034】
すなわち、画像データに対して圧縮符号化を行う画像符号化方法であって、
画像データに対して変更可能な第1の圧縮符号化パラメータを用いて圧縮符号化を行う第1の圧縮符号化工程と、
前記第1の圧縮符号化パラメータよりも高い圧縮率で圧縮可能であって、変更可能な第2の圧縮符号化パラメータを用いて前記画像データに対して圧縮符号化を行う第2の圧縮符号化工程と、
前記第1の圧縮符号化工程で圧縮符号化された符号化データ列のデータ量を計数すると共に、当該データ量が所定量以上であるか否かを判断する判断工程と、
前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断される度に、前記第1の圧縮符号化パラメータを前記第2の圧縮符号化パラメータで置き換え、前記第2の圧縮符号化パラメータを更に高い圧縮率を得るためのパラメータに変更する変更工程と、
前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化工程で従前に圧縮符号化された符号化データ列を、パラメータ変更後の前記第1の圧縮符号化工程で圧縮符号化されたものとして保存する保存工程と、
前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化工程で従前に圧縮符号化されたデータを、前記変更工程で変更した前記第2の圧縮符号化工程用のパラメータに従い再度圧縮符号化する再圧縮符号化工程と、
前記再圧縮符号化工程での再圧縮符号化処理が完了するより前に、前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断された場合、あるいは所定量以上になると予想された場合、前記第1の圧縮符号化工程による圧縮符号化処理を中断するように制御する制御工程と
を備えることを特徴とする。
【0035】
【発明の実施の形態】
以下添付図面を参照して、本発明を好適な実施形態に従って詳細に説明する。
【0036】
[第1の実施形態]
図1は本実施形態における画像符号化装置の機能構成を示すブロック図である。各部における詳細は後述する。図2は図1に示した符号化部103の機能構成を示すブロック図である。各部における詳細については後述する。図3は図1に示した再符号化部106の機能構成を示すブロック図である。各部における詳細については後述する。
【0037】
図4は、図1に示した画像符号化装置に被符号化データとして入力される第1の原画像データを、同一の量子化テーブルと4種類の量子化スケーリング値×1、×2、×3、および×4とを用いてそれぞれ矩形領域単位で順次圧縮符号化処理を実行した場合に得られる符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の第1の原画像データにおける相対位置(横軸)との関係を表わすグラフである。同図に示したグラフの詳細については後述する。
【0038】
図5は、第1の原画像データを表わした図である。
【0039】
図6は、図1に示した画像符号化装置に被符号化データとして入力される第1の原画像データに対する一連の圧縮符号化処理の過程で第1の符号化データ列バッファ104および第2の符号化データ列バッファ107にそれぞれ格納される符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【0040】
さらに図10A,10Bは、図1に示した画像符号化装置の制御部101が行う処理のフローチャートである。以下、図10A,10Bに示したフローチャートに従って、上記図1乃至3に示した各部において行われる処理について説明する。またその際、図4,6に示したグラフ、図5に示した第1の原画像も参照する。
【0041】
まず、後述の圧縮符号化処理に先立って、本実施形態における画像符号化装置には予め格納されるべき情報がある。この情報について以下説明する。
【0042】
本実施形態における画像符号化装置の制御部101には図4に示す被符号化データとして入力される第1の原画像データの大きさを表わす情報、より具体的には、その原画像データを構成する矩形領域の総個数が予め格納される。ここで矩形領域の大きさは、16×16画素とするが、これに限定されるものではない。また、本実施形態における画像符号化装置の制御部101には最終的に画像符号化装置から出力される符号化データ列の累積加算されたデータ量の最大許容値(ビット数あるいはバイト数)が予め格納される。制御部101に格納された最大許容値(最大許容符号化データ量)は図4および図6に示すグラフの上部に水平の点直線として記されている。
【0043】
また、本実施形態における画像符号化装置の符号化部103内の量子化テーブル205には8行×8列の直交変換係数行列を構成するそれぞれの直交変換係数に対応づけられた8×8個の量子化ステップ値行列が予め格納されている。量子化ステップ値行列を構成する各要素の値は量子化ステップ信号224を介して量子化部202によって参照される。
【0044】
また、本実施形態における画像符号化装置の符号化部103内の第1の可変長符号テーブル206および第2の可変長符号テーブル210には被符号化データであるシンボルのそれぞれに対応づけられた可変長符号語集が格納されている。夫々の可変長符号語は第1の可変長符号語信号225を介して第1のエントロピー符号化部204によって、および第2の可変長符号語信号227を介して第2のエントロピー符号化部209によって、それぞれ参照される。
【0045】
また、本実施形態における画像符号化装置の再符号化部106内の(復号化用)可変長符号テーブル304および(符号化用)可変長符号テーブル305には符号化部103内の第1の可変長符号テーブル206および第2の可変長符号テーブル210に格納されたものと同一の可変長符号語集が格納されている。夫々の可変長符号語は(復号化用)可変長符号語信号313を介してエントロピー復号化部301によって、および(符号化用)可変長符号語信号314を介してエントロピー符号化部303によって、それぞれ参照される。
【0046】
上述の通り、後述の圧縮符号化処理に先立って、本実施形態における画像符号化装置に予め情報を格納する処理、すなわち、初期化処理を行う(ステップS10)。
【0047】
実際に図5に示した被符号化データである第1の原画像データに対する一連の圧縮符号化処理が本実施形態の画像符号化装置に入力されると、制御部101は後述の処理を開始する。
【0048】
まず、制御部101は符号化データ列バッファ104内を空にすべく符号化データ列バッファ104に対して初期化指示をバッファ制御信号133を介して行ない、同様に符号化データ列バッファ107内を空にすべく符号化データ列バッファ107に対して初期化指示をバッファ制御信号134を介して行う(ステップS20)。
【0049】
また、制御部101はその内部でそのデータ量を累積加算する第1の符号化データ列に対応する第1の累積値、および第2の符号化データ列に対応する第2の累積値、および第3の符号化データ列に対応する第3の累積値をいずれも0にリセットする(ステップS30)。
【0050】
さらに、制御部101は符号化パラメータ指示信号135上にスケーリングの初期値として値”×1”を、符号化パラメータ指示信号136上にスケーリングの初期値として値”×2”を、同様に再符号化パラメータ指示信号137上に再スケーリング値として値”×2”を、それぞれ出力する(ステップS40)。
【0051】
その後、制御部101は符号化部103に対して符号化処理の動作開始を符号化部動作制御信号131を介して指示する(ステップS50)。この指示を符号化部103が受けることで、本実施形態の画像符号化装置は実質的に第1の原画像データに対する1回目の”符号化動作”を実行することになる。
【0052】
図11に、符号化部103が行う符号化処理のフローチャートを示す。まず、読みとられた上記第1の原画像は原画像データ入力信号121を介して原画像データ入力部102に入力され、所定の大きさである矩形領域に等分割された後、その矩形領域単位で被符号化データ入力信号122上に順次出力される。その際、原画像データ入力部102は矩形領域位置情報信号151上に現在被符号化データ入力信号122上に出力している矩形領域の原画像データにおける位置情報、より具体的には既に出力された矩形領域の個数の累計値を順次出力する(ステップS1101)。
【0053】
原画像データ入力部102によって被符号化データ入力信号122を介して符号化部103に供給される矩形領域単位の原画像データは、符号化部103内の直交変換部201においてさらに複数個の8行×8列サンプルのブロックに等分割された後、そのブロック単位で直交変換演算が施され、その演算結果として得られた複数個の8行×8列の直交変換係数行列が変換係数行列信号221上に順次出力される(ステップS1102)。
【0054】
符号化部103内の量子化部202では、直交変換部201から変換係数行列信号221を介して供給される複数個の8行×8列の直交変換係数行列と、量子化テーブル205から量子化ステップ信号224を介して供給される8×8個の量子化ステップ値とを用いて量子化演算を行う。量子化演算結果として得られた複数個の8行×8列の量子化された直交変換係数行列は量子化された変換係数行列信号222上に順次出力される(ステップS1103)。
【0055】
符号化部103内の第1のスケーリング部203では、量子化部202から量子化された変換係数行列信号222を介して供給される複数個の8行×8列の量子化された直交変換係数行列に対して、別途符号化パラメータ指示信号135を介して制御部101から指示されるスケーリング値に基づいてスケーリング演算を行ない、その演算結果として得られた複数個の8行×8列のスケーリングされた直交変換係数行列が、スケーリングされた変換係数行列信号223上に順次出力される(ステップS1104)。
【0056】
さらに、符号化部103内の第2のスケーリング部208では、量子化部202から量子化された変換係数行列信号222を介して供給される複数個の8行×8列の量子化された直交変換係数行列に対して、別途符号化パラメータ指示信号136を介して制御部101から指示されるスケーリング値に基づいてスケーリング演算を行ない、その演算結果として得られた複数個の8行×8列のスケーリングされた直交変換係数行列が、スケーリングされた変換係数行列信号226上に順次出力される(ステップS1104)。
【0057】
上述した第1のスケーリング部203および第2のスケーリング部208で実行されるスケーリング演算はビットシフトを基本としている。本実施形態ではスケーリング値として”×1”、”×2”、”×4”、および”×8”の4つの値のうちのいずれかが選択可能であり、その値”×N”の意味するところは直交変換係数の交流成分に対応する量子化ステップ値をすべてN倍した量子化テーブルで量子化することによって得られる直交変換係数行列と同等のものであることを意味している。例えばスケーリング値が”×2”であれば入力される直交変換係数の交流成分に対して右に1ビット算術シフトした値を演算結果とし、スケーリング値が”×4”であれば右に2ビット算術シフトした値、スケーリング値が”×8”であれば右に3ビット算術シフトした値、をぞれぞれ演算結果とする。但しスケーリング値が”×1”である場合は、入力される直交変換係数のすべての成分がそのまま演算結果として出力される。またいずれのスケーリング値であっても直交変換係数の直流成分に対しては何ら演算を施さない。
【0058】
第1のスケーリング部203に対するスケーリング値の初期値としてはこの”×1”が設定されており、また、第2のスケーリング部208に対するスケーリング値の初期値としては”×2”が設定されている(ステップS40)。
第1のスケーリング部203及び第2のスケーリング部208で実行されるスケーリング演算における入力値(直交変換係数の交流成分)と演算結果(スケーリングされた変換係数)を表の形式でまとめたものを表1に示す。
【0059】
【表1】
【0060】
符号化部103内の第1のエントロピー符号化部204では、第1のスケーリング部203からスケーリングされた変換係数行列信号223を介して供給される複数個の8行×8列のスケーリングされた直交変換係数行列に対して、所定のスキャン順序による一次元化、および値が0である無意の変換係数に対するランレングス符号化、さらに第1の可変長符号語テーブル206を参照しながらの可変長符号化を順に施し、結果として得られた個々の矩形領域に対応する一連の符号化データ列が第1の符号化データ列出力信号123上に出力される(ステップS1105)。第1の符号化データ列出力信号123上に出力された個々の矩形領域に対応する第1の符号化データ列は、第1の符号化データ列バッファ104内に順次格納される。
【0061】
また、第1のエントロピー符号化部204から第1の符号化データ列信号123上に出力された第1の符号化データ列は、符号化部103内の第1の符号化データ量計数部207によって個々の矩形領域に対応する符号化データ列の単位でそのデータ長が計数され、結果として得られる第1の符号化データ列のデータ量が、第1の符号化付帯情報通知信号152上に出力される(ステップS1106)。
【0062】
図10Aに戻り、次の処理として、符号化部103から第1の符号化付帯情報通知信号152を介して制御部101に順次供給される個々の矩形領域に対応する第1の符号化データ列のデータ量は、制御部101の内部で第1の累積値として逐次累積加算される(ステップS60)。
【0063】
同様に、符号化部103内の第2のエントロピー符号化部209では、第2のスケーリング部208からスケーリングされた変換係数行列信号226を介して供給される複数個の8行×8列のスケーリングされた直交変換係数行列に対して、所定のスキャン順序による一次元化、および値が0である無意の変換係数に対するランレングス符号化、さらに第1の可変長符号語テーブル210を参照しながらの可変長符号化を順に施し、結果として得られた個々の矩形領域に対応する一連の符号化データ列が第2の符号化データ列出力信号124上に出力される(ステップS1105)。
【0064】
第2の符号化データ列出力信号124上に出力された個々の矩形領域に対応する第2の符号化データ列は、第2の符号化データ列バッファ107内に順次格納される。
【0065】
第2のエントロピー符号化部209から第2の符号化データ列信号124上に出力された第2の符号化データ列は、符号化部103内の第2の符号化データ量計数部211によって個々の矩形領域に対応する符号化データ列の単位でそのデータ量が計数され、結果として得られる第2の符号化データ列のデータ量が、第2の符号化付帯情報通知信号153上に出力される(ステップS1106)。
【0066】
符号化部103から第2の符号化付帯情報通知信号153を介して制御部101に順次供給される個々の矩形領域に対応する第2の符号化データ列のデータ量は、制御部101の内部で第2の累積値として逐次累積加算される(ステップS60)。
【0067】
被符号化データである図5に示した第1の原画像データに対して、4つのスケーリング値”×1”、”×2”、”×4”、および”×8”を用いた圧縮符号化処理を仮想的に実行した場合に得られる個々の矩形領域に対応する4個の符号化ストリームのデータ量の累積値の推移が図4に示すグラフ上で原点から始まる4本の直線で表わされている。実際の累積値はこのように直線的に増えることは無いが、ここでは説明を簡単にするために敢えて直線で表わしている。
【0068】
このグラフ上で、スケーリング値”×1”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は直線Q1(A)で表わされている。既に圧縮符号化された矩形領域の相対位置がp1の時点で、言いかえれば第1の原画像データ上の分割領域Aを構成するすべての矩形領域の圧縮符号化処理を終えた時点で、その累積値が最大許容符号化データ量Llimに達してしまうので、これ以降の矩形領域に対するスケーリング値”×1”を用いた圧縮符号化処理は必要とされないことになる。
【0069】
なお、この矩形領域の第1の原画像データにおける相対位置p1は、図5に描かれている第1の原画像データ上でその二次元的な位置が示されている。また分割領域Aは第1の原画像データ上で、最初に圧縮符号化処理された矩形領域(原画像データにおいて最も左上隅に位置する矩形領域)から相対位置p1に位置する矩形領域までのすべての矩形領域の集まりとして示されている。
【0070】
圧縮符号化処理の対象としている矩形領域の相対位置が第1の原画像データ上の分割領域Aの範囲にある期間に、残り3つのスケーリング値”×2”、”×4”、および”×8”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は、同グラフ上で直線Q2(A)、Q4(A)、およびQ8(A)、としてそれぞれ表わされている。そして、既に圧縮符号化がなされた矩形領域の相対位置がp1に達した時点におけるこれら3個の符号化データ列のデータ量の累積値はL2(A)、L4(A)、およびL8(A)にそれぞれ達することが示されている。
【0071】
従って、相対位置p1以降の矩形領域に対する仮想的な圧縮符号化処理は、残り3つのスケーリング値”×2”、”×4”、および”×8”に対応する3つの符号化データ列に対するもののみに対してその動作が継続される。
【0072】
続いて、圧縮符号化処理の対象としている矩形領域の相対位置が第1の原画像データ上の分割領域Bの範囲(p1からp2まで)にある期間に、残り3つのスケーリング値”×2”、”×4”、および”×8”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は、同グラフ上で直線Q2(B)、Q4(B)、およびQ8(B)としてそれぞれ表わされている。そして、既に圧縮符号化がなされた矩形領域の相対位置がp2に達した時点におけるこれら3個の符号化データ列のデータ量の累積値はLlim、L4(A+B)、およびL8(A+B)にそれぞれ達することが示されている。
【0073】
スケーリング値”×2”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量は、第1の原画像データ上の分割領域Aおよび分割領域Bを構成するすべての矩形領域の圧縮符号化処理を終えた時点で、その累積値が最大許容符号化データ量Llimに達してしまっているので、これ以降の矩形領域に対するスケーリング値”×2”を用いた圧縮符号化処理は必要とされないことになる。
【0074】
従って、相対位置p2以降の矩形領域に対する仮想的な圧縮符号化処理は、残り2つのスケーリング値”×4”、および”×8”に対応する2つの符号化データ列に対するもののみに対してその動作が継続される。
【0075】
図4に示した第1の原画像データに対する圧縮符号化処理おいては、圧縮符号化処理の対象としている矩形領域の相対位置が第1の原画像データ上の分割領域Cの範囲(p2から100%まで)にある期間に、残り2つのスケーリング値”×4”、および”×8”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は、同グラフ上で直線Q4(C)、およびQ8(C)としてそれぞれ表わされている。そして、既に圧縮符号化がなされた矩形領域の相対位置が100%に達した時点におけるこれら2個の符号化データ列のデータ量の累積値はL4(A+B+C)およびL8(A+B+C)にそれぞれ達することが示されている。
【0076】
このことから、図5に示した第1の原画像データを構成するすべての矩形領域に対する圧縮符号化処理を終えた時点で、2つのスケーリング値”×4”、および”×8”を用いた圧縮符号化処理によって得られる2つの符号化データ列のデータ量の最終的な累積値は、いずれも最大許容符号化データ量Llimを超えないことがわかる。
【0077】
結果としては、符号化歪みの観点からより圧縮率の低い符号化データ列であるスケーリング値”×4”を用いた圧縮符号化処理によって得られる符号化データ列が、この画像符号化装置の出力すべき最適な符号化データ列になる。
【0078】
実際には、このように結果として得られるスケーリング値”×4”が最適な符号化パラメータであることは、図5に示した第1の原画像データに対する一連の圧縮符号化処理を開始する時点では未知である。
【0079】
1回目の符号化動作の期間中に、言いかえれば圧縮符号化処理の対象としている矩形領域の相対位置が図5に示される第1の原画像データ上の分割領域Aの範囲にある期間中に、第1の符号化データ列バッファ104内に順次格納される第1の符号化データ列は、符号化部101においてスケーリング値”×1”(初期値)を用いた圧縮符号化処理によって第1の原画像データから生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は、図6のグラフ上で点直線Q1(A)として、およびその最終的な累積値がLlimとして示されるが、これは図4のグラフ上で既に示された直線Q1(A)に相当するものである。
【0080】
一方、同じ1回目の符号化動作の期間中に、第2の符号化データ列バッファ107内に順次格納される置換候補となる第2の符号化データ列は、符号化部103においてスケーリング値”×2”を用いた圧縮符号化処理によって生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は、図6のグラフ上で実直線Q2(A)として、およびその最終的な累積値がL2(A)として示されるが、これは図4のグラフ上で既に示された直線Q2(A)に相当するものである。
【0081】
制御部101では、第1の符号化データ列バッファ104内に格納された第1の原画像データ上の分割領域Aを構成するすべての矩形領域に対応する第1の符号化データ列のデータ量の累積値が、最大許容符号化データ量Llimに達したことが確認されたならば、実行中の1回目の符号化動作を終了すべきであると判断する(ステップS70)。
【0082】
このような判断がなされた場合、制御部101は直ちに、符号化部103に対してその符号化処理の動作中断を符号化部動作制御信号131を介して指示する(ステップS80)。
【0083】
次に、制御部101は1回目の符号化動作期間中に第1の符号化データ列バッファ104内に格納された符号化データ列を廃棄すべく、第1の符号化データ列バッファ104に対して初期化指示を第1のバッファ制御信号133を介して行う(ステップS100)。
【0084】
さらに、制御部101は、第1の符号化パラメータ指示信号135を介して第1のスケーリング部203に対してスケーリング値として値”×2”を出力し、さらに第2の符号化パラメータ指示信号136を介して第2のスケーリング部208に対してスケーリング値として値”×4”を出力する(ステップS110)。
【0085】
また、制御部101は、この時点での第2の累積値を第1の累積値として扱うべく、その内部で値の複写を行ない、第2の累積値を0にリセットする(ステップS120)。
【0086】
その後、符号化部103による2回目の符号化動作を開始するべく、符号化部103に対してその符号化処理の動作開始を符号化部動作制御信号131を介して指示する(ステップS130)。
【0087】
その後直ちに、1回目の転送動作および再符号化動作を起動すべく、制御部101は次のような制御を実行する。
【0088】
制御部101は再符号化パラメータ指示信号137上に再スケーリング値として値”×2”を出力し(ステップS140)、その後、再符号化部106に対してその再符号化処理の動作開始を再符号化部動作制御信号132を介して指示する(ステップS150)。
【0089】
その後、制御部101は先行する1回目の符号化動作の期間中に符号化部103によって生成され、さらに第2の符号化データ列バッファ107に格納された、そのデータ量の累積値がL2(A)である置換候補となる第2の符号化データ列を第1のデータ列バッファ104に転送すべく、第2の符号化データ列バッファ107に対して読み出し指示を第2のバッファ制御信号134を介して行ない、また同時に第1のデータ列バッファ104に対して書き込み指示を第1のバッファ制御信号133を介してそれぞれ行なう(ステップS160)。
【0090】
上記指示によって、本実施形態の画像符号化装置は実質的に1回目の転送動作および再符号化動作を開始することになる。
【0091】
この1回目の転送動作の期間中に、第1の符号化データ列バッファ104内に順次格納(転送)される第2の符号化データ列は、先行する1回目の符号化動作の期間中に符号化部103においてスケーリング値”×2”を用いた符号化処理によって生成されたものである。したがって、この1回目の転送動作の期間中に第1の符号化データ列バッファ104内に順次格納(転送)される符号化データ列の累積値の推移は、図6のグラフ上で点直線Q2(A)として、およびその最終的な累積値がL2(A)として示される。
【0092】
第2の符号化データ列バッファ出力信号128を介して第2の符号化データ列バッファ107から読み出された個々の矩形領域に対応する置換候補となる第2の符号化データ列は、第1の符号化データ列バッファ104内に順次格納(転送)されると同時に、再符号化部106にも順次供給される。
【0093】
第2の符号化データ列バッファ出力信号128を介して再符号化部106に供給される個々の矩形領域に対応する一連の符号化データ列は、再符号化部106内のエントロピー復号化部301に入力される。
【0094】
図12に再符号化部106が行う処理のフローチャートを示す。再符号化部106内のエントロピー復号化部301では、第2の符号化データ列バッファ出力信号128を介して供給される個々の矩形領域に対応する符号化データ列に対して、可変長復号語テーブル304を参照しながらの復号化、およびランレングス復号化、さらに所定のスキャン順序による二次元化を順に施し、結果として得られた複数個の8行×8列の復号化された直交変換係数行列が復号化された変換係数行列信号311上に順次出力される(ステップS1201)。
【0095】
再符号化部106内のスケーリング部302では、エントロピー復号化部301から復号化された変換係数行列信号311を介して供給される複数個の8行×8列の復号化された直交変換係数行列に対して、別途再符号化パラメータ指示信号137を介して制御部101から指示される再スケーリング値に基づいてスケーリング演算を行ない、その演算結果として得られた複数個の8行×8列の再スケーリングされた直交変換係数行列が、再スケーリングされた変換係数行列信号312上に順次出力される(ステップS1202)。
【0096】
このスケーリング部302で実行されるスケーリング演算は前記符号化部103内の第1のスケーリング部203および第2のスケーリング部208で実行されるスケーリング演算と同一の演算である。スケーリング部302に対するスケーリング値としては特別なケースを除けば、常に固定値”×2”が設定される。
【0097】
再符号化部106内のエントロピー符号化部303では、スケーリング部302から再スケーリングされた変換係数行列信号312を介して供給される複数個の8行×8列の再スケーリングされた直交変換係数行列に対して、所定のスキャン順序による一次元化、および値が0である無意の変換係数に対するランレングス符号化、さらに可変長符号語テーブル305を参照しながら可変長の符号化を順に施し、結果として得られた個々の矩形領域に対応する一連の符号化データ列が第3の符号化データ列出力信号127上に出力される(ステップS1203)。
【0098】
エントロピー符号化部303から第3の符号化データ列出力信号127上に出力された置換候補となる第3の符号化データ列は、再符号化部106内の符号化データ量計数部306によって個々の矩形領域に対応する符号化データ列の単位でそのデータ量が計数され、結果として得られる第3の符号化データ列のデータ量が、再符号化付帯情報通知信号154上に出力される(ステップS1204)。
【0099】
図10Bに戻って、再符号化部106から再符号化付帯情報通知信号154を介して同様に制御部101に順次供給される個々の矩形領域に対応する置換候補となる第3の符号化データ列のデータ量は、制御部101の内部で第3の累積値として逐次累積加算される(ステップS170)。
【0100】
以上、再符号化動作をまとめると、第2の符号化データ列バッファ出力信号128を介して再符号化部106に供給される個々の矩形領域に対応する一連の符号化データ列は、エントロピー復号化された複数個の8行×8列の復号化された直交変換係数行列に対してスケーリング値”×2”のスケーリング演算が再度行なわれ、さらにエントロピー符号化して得られた個々の矩形領域に対応する一連の符号化データ列が第3の符号化データ列信号127上に出力され、同時にそのデータ量が再符号化付帯情報通知信号154上に出力される。
【0101】
第3の符号化データ列出力信号127上に出力された個々の矩形領域に対応する”次の”置換候補となる第3の符号化データ列は第2の符号化データ列バッファ107内に再び順次格納される。
【0102】
この1回目の再符号化動作の期間中に、第2の符号化データ列バッファ107内に第3の符号化データ列出力信号127を介して順次格納される”次の”置換候補となる第3の符号化データ列は、先行する1回目の符号化動作の期間中に符号化部103においてスケーリング値”×2”を用いた符号化処理によって生成された第2の符号化データ列に対して、さらに再符号化部106においてスケーリング値”×2”を用いた再符号化処理によって生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は、図6のグラフ上で実直線Q2(A)→Q4(A)として、およびその最終的な累積値がL4(A)として示される。
【0103】
置換候補となる第2の符号化データ列がすべて第1の符号化データ列バッファ104内に格納(転送)され、さらに、再符号化部106によって生成された”次の”置換候補となる第3の符号化データ列がすべて第2の符号化データ列バッファ107に格納されたことが確認されたならば、実行中の1回目の転送動作および再符号化動作が終了する(ステップS180)。また、符号化部103から第1の符号化付帯情報通知信号152を介して制御部101に順次供給される個々の矩形領域に対応する第1の符号化データ列のデータ量は、制御部101の内部で第1の累積値として逐次累積加算されると共に、第2の符号化付帯情報通知信号153を介して制御部101に順次供給される個々の矩形領域に対応する第2の符号化データ列のデータ量は、制御部101の内部で第2の累積値として逐次累積加算される(ステップS190)。
【0104】
ステップS190における処理により、第1の累積値は第1の符号化データ列バッファ104に格納されているデータ量を表し、第2の累積値は第2の符号化データ列バッファ107に格納されているデータ量を表すことになる。
【0105】
1回目の転送動作および再符号化動作が終了した後、制御部101は直ちに、再符号化部106に対してその再符号化処理の動作中断を再符号化部動作制御信号132を介して指示する(ステップS210)。
【0106】
さらに、制御部101は第2の符号化データ列バッファ107に対する読み出しの終了指示を第2のバッファ制御信号134を介して行ない、また同時に第1のデータ列バッファ104に対して書き込みの終了指示を第1のバッファ制御信号133を介してそれぞれ行なう。
【0107】
一方、符号化部103による2回目の符号化動作は継続中であり、原画像データ入力部102は先行する1回目の符号化動作に後続する第1の原画像データにおける相対位置がp1の直後の矩形領域から逐次出力する。原画像データ入力部102によって分割および出力され、被符号化データ入力信号122を介して符号化部103に供給される矩形領域の原画像データは、先行する符号化動作の場合と同様に、その内部で直交変換および量子化演算によって得られた複数個の8行×8列の量子化された直交変換係数行列に対してスケーリング値”×2”のスケーリング演算が行なわれ、さらにエントロピー符号化して得られた個々の矩形領域に対応する一連の符号化データ列が第1の符号化データ列出力信号123上に出力される。また、一連の符号化データ列のデータ量が再符号化付帯情報通知信号152上に出力される。
【0108】
そして、符号化部103から第1の再符号化付帯情報通知信号152を介して制御部101に順次供給される個々の矩形領域に対応する第1の符号化データ列のデータ量は、制御部101の内部で第1の累積値として逐次累積加算される(ステップS220)。
【0109】
第1の符号化データ列出力信号123上に出力された個々の矩形領域に対応する第1の符号化データ列は、第1の符号化データ列バッファ104内に順次格納される。この際に、第1の符号化データ列バッファ104内では、第1の符号化データ列出力信号123を介して入力される第1の符号化データ列の格納と、第2の符号化データ列バッファ出力信号128より出力される上述した1回目の転送動作による第1の原画像データ上の分割領域Aに対応するスケーリング値”×2”の符号化データ列の格納(転送)とが同時に発生する。したがって、第1の符号化データ列バッファ104は、両者の符号化データを両者に対応する第1の原画像データ上の位置情報に基づいて並び替える必要がある。
【0110】
同時に、原画像データ入力部102によって分割および出力され、被符号化データ入力信号122を介して符号化部103に供給される矩形領域の原画像データは、その内部で直交変換および量子化演算によって得られた複数個の8行×8列の量子化された直交変換係数行列に対してスケーリング値”×4”のスケーリング演算が行なわれ、さらにエントロピー符号化して得られた個々の矩形領域に対応する一連の符号化データ列が第2の符号化データ列出力信号124上に出力され、同時にそのデータ量が再符号化付帯情報通知信号153上に出力される。
【0111】
そして、符号化部103から再符号化付帯情報通知信号153を介して制御部101に順次供給される個々の矩形領域に対応する第2の符号化データ列のデータ量は、制御部101の内部で第2の累積値として逐次累積加算される(ステップS220)。
【0112】
第2の符号化データ列出力信号124上に出力された個々の矩形領域に対応する置換候補となる第2の符号化データ列は、第2の符号化データ列バッファ107内に順次格納される。この際に、第2の符号化データ列バッファ107内では、第2の符号化データ列出力信号124を介して入力される第2の符号化データ列の格納と、第3の符号化データ列出力信号127を介して入力される上述した1回目の再符号化動作による第1の原画像データ上の分割領域Aに対応するスケーリング値”×4”の符号化データ列の格納とが同時に発生する。したがって、第2の符号化データ列バッファ107は、両者の符号化データを両者に対応する第1の原画像データ上の位置情報に基づいて並び替える必要がある。
【0113】
2回目の符号化動作の期間中に、言いかえれば圧縮符号化処理の対象としている矩形領域の相対位置が図5に示される第1の原画像データ上の分割領域Bの範囲にある期間中に、第1の符号化データ列バッファ104内に順次格納される第1の符号化データ列は、符号化部103においてスケーリング値”×2”を用いた圧縮符号化処理によって第1の原画像データから生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は、図6のグラフ上で点直線Q2(B)として、およびその最終的な累積値がLlimとして示されるが、これは図4のグラフ上で既に示された直線Q2(B)に相当するものである。
【0114】
一方、同じ2回目の符号化動作の期間中に、第2の符号化データ列バッファ107内に順次格納される置換候補となる第2の符号化データ列は、符号化部103においてスケーリング値”×4”を用いた圧縮符号化処理によって生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は図6のグラフ上で実直線Q4(B)として、およびその最終的な累積値がL4(A+B)として示されるが、これは図4のグラフ上で既に示された直線Q4(B)に相当するものである。
【0115】
制御部101では、第1の符号化データ列バッファ104内に格納された第1の原画像データ上の分割領域Aおよび分割領域Bを構成するすべての矩形領域に対応する第1の符号化データ列のデータ量の累積値が、最大許容符号化データ量Llimに達したことが確認されたならば、実行中の2回目の符号化動作を終了すべきであると判断する(ステップS230)。
【0116】
このような判断がなされた場合、制御部101は直ちに、符号化部103に対してその符号化処理の動作中断を符号化部動作制御信号131を介して指示する(ステップS240)。
【0117】
次に、第1の原画像の圧縮符号化処理は未だ終了していないので、処理をステップS100に戻し、制御部101は1回目の転送動作および2回目の符号化動作期間中に第1の符号化データ列バッファ104内に格納された符号化データ列を廃棄すべく、第1の符号化データ列バッファ104に対して初期化指示を第1のバッファ制御信号133を介して行なう(ステップS100)。
【0118】
さらに、制御部101は、第1の符号化パラメータ指示信号135を介して第1のスケーリング部203に対してスケーリング値として値”×4”を出力し、さらに第2の符号化パラメータ指示信号136を介して第2のスケーリング部208に対してスケーリング値として値”×8”を出力する(ステップS110)。
【0119】
また、制御部101は、この時点での第2の累積値を第1の累積値として扱うべく、その内部で値の複写を行ない、第2の累積値を0にリセットする(ステップS120)。その後、符号化部103による3回目の符号化動作を開始するべく、符号化部103に対してその符号化処理の動作開始を符号化部動作制御信号131を介して指示する(ステップS130)。その後直ちに、2回目の転送動作および再符号化動作を起動すべく、制御部101は次のような制御を実行する。
【0120】
まず、制御部101は再符号化パラメータ指示信号137上に再スケーリング値として値”×2”を出力し(ステップS140)、その後、再符号化部106に対してその再符号化処理の動作開始を再符号化部動作制御信号132を介して指示する(ステップS150)。その後、制御部101は先行する1回目の転送動作および2回目の符号化動作の期間中に再符号化部106および符号化部103によって生成され、さらに第2の符号化データ列バッファ107に格納された、そのデータ量の累積値がL4(A+B)である置換候補となる第2の符号化データ列を第1のデータ列バッファ104に転送すべく、第2の符号化データ列バッファ107に対して読み出し指示を第2のバッファ制御信号134を介して行ない、また同時に第1のデータ列バッファ104に対して書き込み指示を第1のバッファ制御信号133を介してそれぞれ行なう(ステップS160)。
【0121】
上記指示によって、実質的に2回目の転送動作および再符号化動作を開始することになる。
【0122】
この2回目の転送動作の期間中に、第1の符号化データ列バッファ104内に順次格納(転送)される符号化データ列は、先行する2回目の符号化動作の期間中に符号化部103においてスケーリング値”×4”を用いた符号化処理によって生成されたものと、先行する1回目の再符号化動作の期間中に再符号化部106においてスケーリング値”×2”を用いた再符号化処理によって生成されたものである。したがって、この2回目の転送動作の期間中に第1の符号化データ列バッファ104内に順次格納(転送)される符号化データ列の累積値の推移は、図6のグラフ上で点直線Q4(A+B)として、およびその最終的な累積値がL4(A+B)として示される。
【0123】
第2の符号化データ列バッファ出力信号128を介して第2の符号化データ列バッファ107から読み出された個々の矩形領域に対応する置換候補となる第2の符号化データ列は、第1の符号化データ列バッファ104内に順次格納(転送)されると同時に、再符号化部106にも順次供給される。
【0124】
そして再符号化部106は上記において説明したとおり再符号化処理を行う。つまり、第2の符号化データ列バッファ出力信号128を介して再符号化部106に供給される個々の矩形領域に対応する一連の符号化データ列は、エントロピー復号化された複数個の8行×8列の復号化された直交変換係数行列に対してスケーリング値”×2”のスケーリング演算が再度行なわれ、さらにエントロピー符号化して得られた個々の矩形領域に対応する一連の符号化データ列が第3の符号化データ列信号127上に出力され、同時にそのデータ量が再符号化付帯情報通知信号154上に出力される。
【0125】
そして、再符号化部106から再符号化付帯情報通知信号154を介して同様に制御部101に順次供給される個々の矩形領域に対応する置換候補となる第3の符号化データ列のデータ量は、制御部101の内部で第3の累積値として逐次累積加算される(ステップS170)。
【0126】
第3の符号化データ列出力信号127上に出力された個々の矩形領域に対応する”次の”置換候補となる第3の符号化データ列は第2の符号化データ列バッファ107内に再び順次格納される。
【0127】
この2回目の再符号化動作の期間中に、第2の符号化データ列バッファ107内に第3の符号化データ列出力信号127を介して順次格納される”次の”置換候補となる第3の符号化データ列は、先行する1回目の符号化動作の期間中に符号化部103においてスケーリング値”×2”を用いた符号化処理によって生成された第1の符号化データ列に対して、さらに再符号化部106においてスケーリング値”×2”を用いた再符号化処理によって生成された第1の符号化データ列に対して、さらに再符号化部106においてスケーリング値”×2”を用いた再符号化処理によって生成されたものと、先行する2回目の符号化動作の期間中に符号化部103においてスケーリング値”×4”を用いた符号化処理によって生成された第1の符号化データ列に対して、さらに再符号化部106においてスケーリング値”×2”を用いた再符号化処理によって生成されたものとから構成されている。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は、図6のグラフ上で実直線Q4(A+B)→Q8(A+B)として、およびその最終的な累積値がL8(A+B)として示される。
【0128】
置換候補となる第2の符号化データ列がすべて第1の符号化データ列バッファ104内に格納(転送)され、さらに、再符号化部106によって生成された”次の”置換候補となる第2の符号化データ列がすべて第2の符号化データ列バッファ107に格納されたことが確認されたならば、実行中の2回目の転送動作および再符号化動作を終了する(ステップS180)。また、符号化部103から第1の符号化付帯情報通知信号152を介して制御部101に順次供給される個々の矩形領域に対応する第1の符号化データ列のデータ量は、制御部101の内部で第1の累積値として逐次累積加算されると共に、第2の符号化付帯情報通知信号153を介して制御部101に順次供給される個々の矩形領域に対応する第2の符号化データ列のデータ量は、制御部101の内部で第2の累積値として逐次累積加算される(ステップS190)。
【0129】
ステップS190における処理により、第1の累積値は第1の符号化データ列バッファ104に格納されているデータ量を表し、第2の累積値は第2の符号化データ列バッファ107に格納されているデータ量を表すことになる。
【0130】
2回目の転送動作および再符号化動作が終了した後、制御部101は直ちに、再符号化部106に対してその再符号化処理の動作中断を再符号化部動作制御信号132を介して指示する(ステップS210)。さらに、制御部101は第2の符号化データ列バッファ107に対する読み出しの終了指示を第2のバッファ制御信号134を介して行ない、また同時に第1のデータ列バッファ104に対して書き込みの終了指示を第1のバッファ制御信号133を介してそれぞれ行なう。
【0131】
一方、符号化部103による3回目の符号化動作は継続中であり、原画像データ入力部102は先行する2回目の符号化動作に後続する第1の原画像データにおける相対位置がp2の直後の矩形領域から逐次出力する。原画像データ入力部102によって分割および出力され、被符号化データ入力信号122を介して符号化部103に供給される矩形領域の原画像データは、先行する符号化動作の場合と同様に、その内部で直交変換および量子化演算によって得られた複数個の8行×8列の量子化された直交変換係数行列に対してスケーリング値”×4”のスケーリング演算が行なわれ、さらにエントロピー符号化して得られた個々の矩形領域に対応する一連の符号化データ列が第1の符号化データ列信号123上に出力され、同時にそのデータ量が再符号化付帯情報通知信号152上に出力される。
【0132】
そして、符号化部103から再符号化付帯情報通知信号152を介して制御部101に順次供給される個々の矩形領域に対応する第1の符号化データ列のデータ量は、制御部101の内部で第1の累積値として逐次累積加算される(ステップS220)。
【0133】
第1の符号化データ列信号123上に出力された個々の矩形領域に対応する第1の符号化データ列は、第1の符号化データ列バッファ104内に順次格納される。この際に、第1の符号化データ列バッファ104内では、第1の符号化データ列出力信号123を介して入力される第1の符号化データ列の格納と、第2の符号化データ列バッファ出力信号128より出力される上述した2回目の転送動作による第1の原画像データ上の分割領域Aおよび分割領域Bに対応するスケーリング値”×4”の符号化データ列の格納(転送)とが同時に発生する。したがって、第1の符号化データ列バッファ104は、両者の符号化データを両者に対応する第1の原画像データ上の位置情報に基づいて並び替える必要がある。
【0134】
同時に、原画像データ入力部102によって分割および出力され、被符号化データ入力信号122を介して符号化部103に供給される矩形領域の原画像データは、その内部で直交変換および量子化演算によって得られた複数個の8行×8列の量子化された直交変換係数行列に対してスケーリング値”×8”のスケーリング演算が行なわれ、さらにエントロピー符号化して得られた個々の矩形領域に対応する一連の符号化データ列が第2の符号化データ列信号124上に出力され、同時にそのデータ量が再符号化付帯情報通知信号153上に出力される。
【0135】
そして、符号化部103から再符号化付帯情報通知信号153を介して制御部101に順次供給される個々の矩形領域に対応する第2の符号化データ列のデータ量は、制御部101の内部で第2の累積値として逐次累積加算される(ステップS220)。
【0136】
第2の符号化データ列出力信号124上に出力された個々の矩形領域に対応する置換候補となる第2の符号化データ列は、第2の符号化データ列バッファ107内に順次格納される。この際に、第2の符号化データ列バッファ107内では、第1の符号化データ列出力信号124を介して入力される第2の符号化データ列の格納と、第3の符号化データ列出力信号127を介して入力される上述した2回目の再符号化動作による第1の原画像データ上の分割領域Aおよび分割領域Bに対応するスケーリング値”×8”の符号化データ列の格納(転送)とが同時に発生する。したがって、第2の符号化データ列バッファ107は、両者の符号化データを両者に対応する第1の原画像データ上の位置情報に基づいて並び替える必要がある。
【0137】
3回目の符号化動作の期間中に、言いかえれば圧縮符号化処理の対象としている矩形領域の相対位置が図5に示される第1の原画像データ上の分割領域Cの範囲にある期間中に、第1の符号化データ列バッファ104内に順次格納される第1の符号化データ列は、符号化部103においてスケーリング値”×4”を用いた圧縮符号化処理によって第1の原画像データから生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は、図6のグラフ上で点直線Q4(C)として、およびその最終的な累積値がL4(A+B+C)として示されるが、これは図4のグラフ上で既に示された直線Q4(C)に相当するものである。
【0138】
一方、同じ3回目の符号化動作の期間中に、第2の符号化データ列バッファ107内に順次格納される置換候補となる第2の符号化データ列は、符号化部103においてスケーリング値”×8”を用いた圧縮符号化処理によって生成されたものである。したがって、制御部101内部で累積加算されているそのデータ量の累積値の推移は図6のグラフ上で実直線Q8(C)として、およびその最終的な累積値がL8(A+B+C)として示されるが、これは図4のグラフ上で既に示された直線Q8(C)に相当するものである。
【0139】
制御部101では、第1の符号化データ列バッファ104内に格納された第1の原画像データを構成するすべての矩形領域に対応する第1の符号化データ列のデータ量の累積値が、最大許容符号化データ量Llimを超えないことが確認されたならば、実行中の3回目の符号化動作を終了すべきであると判断する(ステップS230)。このような判断がなされた場合、制御部101は直ちに、符号化部103に対してその符号化処理の動作終了を符号化部動作制御信号131を介して指示する(ステップS240)。
【0140】
続いて、制御部101は先行する2回目の転送動作さらに3回目の符号化動作の期間中に第1の符号化データ列バッファ104に格納された、そのデータ量の累積値がL4(A+B+C)である符号化データ列を画像符号化装置から出力すべく、第1の符号化データ列バッファ104に対して読み出し指示を第1の符号化データ列バッファ・アクセス制御信号133を介して行なう(ステップS320)。
【0141】
第1の符号化データ列バッファ104から第1の符号化データ列バッファ出力信号125を介して読み出された個々の矩形領域に対応する符号化データ列は、符号化データ列出力部105によって第1の原画像データ全体に対する1つの符号化データ列としてまとめられ、その符号化データ列が画像符号化装置の圧縮符号化処理の結果として符号化データ列出力信号126上に出力される。
【0142】
本実施形態における画像符号化装置は、符号化データ列出力部105による符号化データ列の出力処理の終了をもって、第1の原画像データに対する一連の圧縮符号化処理を終了することになる。
【0143】
ここでもうひとつの原画像データである第2の原画像データを用いた場合の本実施形態における画像符号化装置における動作について説明する。
【0144】
図7は、図1に示した画像符号化装置に被符号化データとして入力される第2の原画像データを、同一の量子化テーブルと4種類の量子化スケーリング値×1、×2、×3、および×4を用いてそれぞれ矩形領域単位で順次圧縮符号化処理を実行した場合に得られる符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【0145】
図8は、第2の原画像データを表わした図である。
【0146】
図9は、図1に示した画像符号化装置に対して被符号化データとして入力される第2の原画像データに対する一連の圧縮符号化処理の過程で、第1の符号化データ列バッファ104および第2の符号化データ列バッファ107にそれぞれ格納される符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【0147】
本実施形態における画像符号化装置が第2の原画像データに対して行う一連の圧縮符号化処理について図1乃至3,7乃至10を用いて以下、説明する。
【0148】
図8に示した第2の原画像データに対して、4つのスケーリング値”×1”、”×2”、”×4”、および”×8”を用いた圧縮符号化処理を仮想的に実行した場合に得られる個々の矩形領域に対応する4個の符号化データ量の累積値の推移が図7に示すグラフ上で原点から始まる4本の直線で表わされている。
【0149】
このグラフ上で、圧縮符号化対象としている矩形領域の相対位置が第2の原画像データ上の分割領域Aの範囲にある期間に、4つのスケーリング値”×1”、”×2”、”×4”、および”×8”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は、同グラフ上で直線Q1(A)、Q2(A)、Q4(A)、およびQ8(A)、としてそれぞれ表わされている。そして、既に圧縮符号化がなされた矩形領域の相対位置がp1に達した時点におけるこれら4個の符号化データ列のデータ量の累積値はLlim、L2(A)、L4(A)、およびL8(A)にそれぞれ達することが示されている。
【0150】
スケーリング値”×1”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量は、第2の原画像データ上の分割領域Aを構成するすべての矩形領域の圧縮符号化処理を終えた時点で、その累積値が最大許容符号化データ量Llimに達してしまうので、これ以降の矩形領域に対するスケーリング値”×1”を用いた圧縮符号化処理は必要とされないことになる。
【0151】
従って、相対位置p1以降の矩形領域に対する仮想的な圧縮符号化処理は、残り3つのスケーリング値”×2”、”×4”、および”×8”のいずれかが用いられることになる。
【0152】
続いて、圧縮符号化処理の対象としている矩形領域の相対位置が第2の原画像データ上の分割領域Bの範囲(p1からp2まで)にある期間に、残り3つのスケーリング値”×2”、”×4”、および”×8”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は、同グラフ上で直線Q2(B)、Q4(B)、およびQ8(B)としてそれぞれ表わされている。そして、既に圧縮符号化がなされた矩形領域の相対位置がp2に達した時点におけるこれら3個の符号化データ列のデータ量の累積値はLlim、L4(A+B)、およびL8(A+B)にそれぞれ達することが示されている。
【0153】
図7の矩形領域の相対位置p1’において、直線Q2(B)、Q4(B)、およびQ8(B)の傾きが急激に増加していることから、第2の原画像データの相対位置p1’から100%へ向けて画像の持つ情報量が急激に増加していることが推測できる。
【0154】
スケーリング値”×2”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量は、第2の原画像データ上の分割領域Aおよび分割領域Bを構成するすべての矩形領域の圧縮符号化処理を終えた時点で、その累積値が最大許容符号化データ量Llimに達してしまうので、これ以降の矩形領域に対するスケーリング値”×2”を用いた圧縮符号化処理は必要とされないことになる。
【0155】
従って、相対位置p2以降の矩形領域に対する仮想的な圧縮符号化処理は、残り2つのスケーリング値”×4”、および”×8”のいずれかが用いられることになる。
【0156】
圧縮符号化処理の対象としている矩形領域の相対位置が第2の原画像データ上の分割領域Cの範囲(p2から100%まで)にある期間に、残り2つのスケーリング値”×4”、および”×8”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の累積値の推移は、同グラフ上で直線Q4(C)、およびQ8(C)として表わされている。そして、既に圧縮符号化がなされた矩形領域の相対位置が100%に達した時点におけるこれら2個の符号化データ列のデータ量の累積値はL4(A+B+C)およびL8(A+B+C)にそれぞれ達することが示されている。
【0157】
このことから、第2の原画像データを構成するすべての矩形領域に対する圧縮符号化処理を終えた時点で、スケーリング値”×4”を用いた圧縮符号化処理によって得られる符号化データ列のデータ量の最終的な累積値は、最大許容符号化データ量Llimを超えないことがわかる。結果としては、このスケーリング値”×4”を用いた圧縮符号化処理によって得られる符号化データ列が、この画像符号化装置の出力すべき最適な符号化データ列になる。
【0158】
この第2の原画像データに対して上述の一連の圧縮符号化処理を行なった場合、第1の符号化データ列バッファ104および第2の符号化データ列バッファ107にそれぞれ格納される符号化データ列のデータ量の累積値の遷移は図9に示すようになる。
【0159】
図9において、符号化部103により生成される分割領域Bに対する第1の符号化データ列のデータ量の累積値である点直線Q2(B)は、矩形領域の相対位置であるp1’からその傾きが増加して、最大許容符号化データ量Llimに急激に接近する。矩形領域の相対位置p2においては、点直線Q2(B)はLlimに至ってしまうが、この時点では実直線Q2(A)→Q4(A)で示されるところの、再符号化部106による先行する符号化動作で量子化スケーリング値”×2”を用いて生成された分割領域Aに対応する符号化データ列を再符号化する再符号化動作はまだ終了していない。再符号化部106において再符号化処理される分割領域Aに対応する符号化データ列は、第1の符号化データ列バッファ104へも転送されて格納されるが、再符号化動作と同様に、矩形領域の相対位置p2においてはその転送動作は終了していない。
【0160】
上述した矩形領域の相対位置p2において再符号化動作と、符号化データ列に対する転送動作が終了していないことから、制御部101は符号化部103に対してその符号化処理の動作中断を符号化部動作制御信号131を介して指示する(ステップS260)。
【0161】
この動作中断は、図9において分割領域Bと分割領域Cとの間に挿入された符号化動作停止期間(p2からp2’まで)に示されるように、処理が継続中の再符号化動作と転送動作が終了するまで持続される(ステップS290)。
【0162】
制御部101は、分割領域Bに対する再符号化動作および転送動作が終了した時点において(p2’)、再符号化部106に対してその再符号化処理の動作中断を再符号化部動作制御信号132を介して指示する(ステップS300)。
【0163】
さらに、制御部101は、第2の符号化データ列バッファ107に対する読み出しの終了指示を第2のバッファ制御信号134を介して行ない、また同時に第1のデータ列バッファ104に対して書き込みの終了指示を第1のバッファ制御信号133を介してそれぞれ行なう。
【0164】
その後、制御部101は直ちに分割領域Cに対する符号化処理を開始すべく、符号化部103に対して第1の符号化パラメータ指示信号135および第の符号化パラメータ指示信号136を介してそれぞれ新たなスケーリング値を指示した後(ステップS100,S110,S120)、その符号化処理の動作開始を符号化部動作制御信号131を介して指示する(ステップS130)。
【0165】
以上説明してきた本実施形態における画像符号化装置についての概要を以下に説明する。
【0166】
入力画像データに対する一連の圧縮符号化処理に伴う所謂情報量制御を実施するにあたって、あらかじめ設定された最大許容符号化データ量、現在までに既に符号化処理がなされた矩形領域の総計が原画像データに占める割合、さらに現在までに生成された符号化データ列の累計データ量等、を基に符号化パラメータの更新指示およびそれに伴う各種動作制御が制御手段によって逐次行なわれる。
【0167】
制御手段によって符号化パラメータの変更指示が発行されると、画像符号化装置は変更された符号化パラメータによる符号化動作を行なうのに加えて転送動作と再符号化動作を開始する。
【0168】
転送動作では、それまでの符号化動作期間中に既に生成および格納された符号化データ列が第1の符号化データ列バッファ上から廃棄あるいは無効化され、更新された後の符号化パラメータに対応する新たな符号化データ列がもうひとつの第2の符号化データ列バッファから転送され、前記第1の符号化データ列バッファ上に格納される。すなわちそれまで第1の符号化データ列バッファ上に格納されていた符号化データ列がこの新たな符号化データ列によって置換されることになる。
【0169】
また、再符号化動作では、それまでの符号化動作期間中に前記第2の符号化データ列バッファ上に格納された符号化データ列を、前記再符号化部へ入力し異なる符号化パラメータにより再符号化を行ない、再び前記第2の符号化データ列バッファ上に格納する。
【0170】
本実施形態における画像符号化装置においては、次に符号化パラメータの変更指示が発行される際の更新される符号化パラメータが既知であることが前提になっている。従って、前記更新された後の符号化パラメータに対応する新たな符号化データ列を生成する処理は、先行する符号化動作期間中に行なわれる矩形領域の各々に対する符号化処理と同時に実行することが可能である。
【0171】
先行する符号化動作期間中に生成されるもうひとつの符号化データ列は次の置換候補の符号化データ列として第2の符号化データ列バッファに順次格納される。
【0172】
前記次の置換候補の符号化データ列を生成する具体的な方法として、本実施形態ではふたつの方法を適用している。
【0173】
そのひとつは、既に符号化手段によって符号化済みの第1の符号化データ列を再符号化手段が受けて、そこで復号化処理工程を経て得られるシンボル情報に対して次に更新される符号化パラメータを用いた再符号化処理を行ない、結果として次の置換候補の符号化データ列を作成するといったものである。
【0174】
もうひとつは、符号化手段において第1の符号化データ列の符号化処理時と同時に、次に更新される符号化パラメータに対応する符号化データ列の符号化処理を同時行ない、結果として次の置換候補の符号化データ列を作成するといったものである。
【0175】
先行する符号化動作において前記いずれかの方法で生成され、第2の符号化データ列バッファに格納される次の置換候補の符号化データ列は、制御手段による適応的な判断によって符号化パラメータの更新指示が発行された際に、第1の符号化データ列バッファに転送され、その上でそれまで格納されていた符号化データ列と置換される。
【0176】
さらに、その後再び再度符号化パラメータが変更されることを想定して、さらにその次に置換され得る符号化データ列の生成処理が前記転送動作と並行して同時に行なわれる。
【0177】
この転送動作と同時に行なわれるさらにその次の置換候補の符号化データ列を生成する所謂再符号化動作は、転送中の符号化データ列を再符号化手段が受けて、そこで復号化処理工程を経て得られるシンボル情報に対してさらにその次に更新される符号化パラメータを用いた再符号化処理を行ない、結果としてさらにその次の置換候補の符号化データ列を生成するといったものである。
【0178】
また、さらにその次に更新される符号化パラメータを用いて生成される置換候補の符号化データ列は、符号化手段における符号化動作によっても並行して前記説明したような方法で生成される。
【0179】
生成されたさらにその次の置換候補の符号化データ列は、再符号化動作で生成および格納されたさらにその次の置換候補の符号化データ列に後続する符号化データ列として第2の符号化データ列バッファ上に順次格納される。
【0180】
前記説明したふたつのバッファメモリ間での符号化データ列の転送動作とそれと並行して行われるさらにその次の置換候補の符号化データ列の生成処理である再符号化が終了すると、画像符号化装置としての動作は指定された符号化パラメータと更新された符号化パラメータを用いた符号化動作のみになる。
【0181】
これまで説明したように符号化パラメータの更新指示を発行することによって実行される画像符号化装置の転送動作の処理と、再符号化動作においてさらにその次の置換候補の符号化データ列を生成する処理と、符号化動作において並行して実行されるさらにその次の置換候補の符号化データ列を生成する処理は、あくまでも符号化パラメータの更なる更新指示をこの後再び発行しなければならない事態に陥ることを想定して言わば保険の意味で行なうものである。
【0182】
この保険の意味で行われる処理の内、再符号化動作においてさらにその次の置換候補の符号化データ列を生成する処理は、その時点で指定されている符号化パラメータにより符号化手段が生成する符号化データ列の累積データ量が最大許容符号化データ量を超える前に完了することが望ましい。
【0183】
しかし、原画像データとして本実施形態における画像符号化装置へ入力される画像データの中には、再符号化動作においてさらにその次の置換候補の符号化データ列を生成する処理が完了する前に、その時点で指定されている符号化パラメータにより符号化手段が生成する符号化データ列の累積データ量が最大許容符号化データ量を超えてしまう状況を発生するような特性を有する画像が存在しえる。この場合、再符号化動作においてさらにその次の置換候補の符号化データ列を生成する処理が完了するまで、符号化手段はその時点で指定されている符号化パラメータで符号化動作を継続し、符号化データ列を第1の符号化データ列バッファへ出力し続ける。
【0184】
こういった状況へ備えるために、最大許容符号化データ量は第1の符号化データ列バッファの物理的な容量よりも小さく設定し、符号化手段が最大許容符号化データ量を超えて出力してくる符号化データ列を格納する領域を確保しておく必要がある。最大許容符号化データ量を第1の符号化データ列バッファの物理的な容量に比べてどの程度小さく設定するのかについては、様々な特性を有する画像を実際に処理した結果に基づいて決定していく方法が考えられる。この方法で最大許容符号化データ量を決定する場合は、網羅できていない特性を有する画像が本実施形態における画像符号化装置へ入力された状況を想定して、より小さめに最大許容符号化データ量を設定せざるをえない。
【0185】
しかしながら、第1の符号化データ列バッファの物理的な容量に比べて最大許容符号化データ量をより小さく設定していくことは、本実施形態における画像符号化装置において符号化パラメータを更新する回数を増加させることに繋がる。符号化パラメータの更新回数が1回でも増えると、本実施形態における画像符号化装置によって生成された符号化データ列を伸張復号化処理することにより得られる再構成画像において、圧縮符号化歪みが増加するという結果を招く。
【0186】
そこで、本実施形態における画像符号化装置における圧縮符号化処理の過程において、再符号化動作による”さらにその次”の置換候補の符号化データ列を生成する処理が完了する前であり、かつ、転送動作による”次の”置換候補を第1の符号化データ列バッファへ転送する処理が完了する前に、その時点で指定されている符号化パラメータにより符号化手段が生成する符号化データ列の累積データ量が最大許容符号化データ量を超える状況が発生したあるいは超えることが予想される場合においては、符号化手段による符号化動作を中断するように制御手段により制御する。
【0187】
この適応的な動作制御によって、最大許容符号化データ量を第1の符号化データ列バッファの物理的な容量よりも小さく設定する必要がなくなり、最大許容符号化データ量に第1の符号化データ列バッファの物理的な容量と同じ値を設定することができる。これにより、不要な符号化パラメータの更新を排除することができ、結果的に一つの原画像データに対する符号化パラメータの更新回数を減らすことができる。
【0188】
以上説明してきたように、本実施形態における画像符号化装置では、制御部101が一連の圧縮符号化処理の過程において3つの処理動作である符号化動作、再符号化動作、および転送動作に対する開始および終了を制御している。この3つの処理動作はすべて同時に実行されており、一般的に再符号化動作および転送動作は同時に実行されている符号化動作よりも先にその処理が終了することが想定されている。
【0189】
しかしながら、様々な特性を有した画像の中には、第2の原画像データのように画像の途中から急激に情報量が増加するものも存在し得る。そのような原画像データに対する一連の圧縮符号化処理においては、図9の分割領域Bにおける3つの処理動作に示されたように、符号化動作により生成される符号化データ列のデータ量の累積値が最大許容符号化データ量に達した時点においても、同時に実行されている再符号化動作および転送動作がその処理を終了していない状況が発生する。
【0190】
このような状況が発生した場合、本実施形態における画像符号化装置では、符号化動作により生成される符号化データ列のデータ量の累積値が最大許容符号化データ量に達した時点において符号化動作を停止し、同時に実行されている再符号化動作および転送動作が終了するまで符号化動作の停止状態を維持する。
【0191】
よって、本実施形態における画像符号化装置及び画像符号化方法によって、予め定められたサイズに画像データを圧縮符号化できると共に、圧縮符号化された符号化データ列を伸張復号化処理した場合に得られる画像の圧縮符号化歪みを抑えることができると共に、高品質な再構成画像を得ることができる。
【0192】
[他の実施形態]
本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0193】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0194】
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明した(図10A乃至12の一部もしくは全部の)フローチャートに対応するプログラムコードが格納されることになる。
【0195】
【発明の効果】
以上の説明により、本発明によって、予め定められたサイズに画像データを圧縮符号化できると共に、圧縮符号化された符号化データ列を伸張復号化処理した場合に得られる画像の圧縮符号化歪みを抑え、高品質な再構成画像を得ることができる。
【図面の簡単な説明】
【図1】本発明の実施形態における画像符号化装置の機能構成を示すブロック図である。
【図2】図1に示した符号化部103の機能構成を示すブロック図である。
【図3】図1に示した再符号化部106の機構構成を示すブロック図である。
【図4】図1に示した画像符号化装置に非符号化データとして入力される第1の原画像を、同一の量子化テーブルと4種類の量子化スケーリング値×1、×2、×3、および×4とを用いてそれぞれ矩形領域単位で順次圧縮符号化処理を実行した場合に得られる符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の第1の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【図5】図1に示す原画像データを表した図である。
【図6】図1に示した画像符号化装置に被符号化データとして入力される第1の原画像データに対する一連の圧縮符号化処理の過程で第1の符号化データ列バッファ104および第2の符号化データ列バッファ107にそれぞれ格納される符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【図7】図1に示した画像符号化装置に被符号化データとして入力される第2の原画像データを、同一の量子化テーブルと4種類の量子化スケーリング値×1、×2、×3、および×4を用いてそれぞれ矩形領域単位で順次圧縮符号化処理を実行した場合に得られる符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【図8】第2の原画像データを表した図である。
【図9】図1に示した画像符号化装置に対して被符号化データとして入力される第2の原画像データに対する一連の圧縮符号化処理の過程で、第1の符号化データ列バッファ104および第2の符号化データ列バッファ107にそれぞれ格納される符号化データ列のデータ量の累積値(縦軸)と、その時点で既に圧縮符号化処理が実行された矩形領域の原画像データにおける相対位置(横軸)との関係を表わすグラフである。
【図10A】図1に示した画像符号化装置の制御部101が行う処理のフローチャートの前半部分である。
【図10B】図1に示した画像符号化装置の制御部101が行う処理のフローチャートの後半部分である。
【図11】符号化部106が行う処理のフローチャートである。
【図12】再符号化部106が行う処理のフローチャートである。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding device, an image encoding method, a program, and a storage medium that compress and encode an image.
[0002]
[Prior art]
Currently, a compression encoding processing function for still images is installed in many digital imaging devices. A typical example of such a digital imaging device is a so-called digital camera, but a digital color copying machine is one of the digital imaging devices having a compression coding processing function.
[0003]
In a digital color copier, the original reading unit has a compression code for the read original image data in order to reduce the data transfer amount when transferring the original image data read from the original reading unit to the printing unit. One of the printing units is provided with a decompression processing function for the encoded document image data string.
[0004]
The data amount of the encoded document image data sequence generated by the compression encoding processing unit provided in the subsequent stage of the document reading unit is the document image data before the compression encoding process, that is, the read document image data Can be reduced to a fraction of a tenth to a tenth of the amount of data.
[0005]
The degree of reduction of the data amount with respect to the original image data before the compression encoding process of the encoded original image data string, that is, the upper limit value of the compression rate is the reconstructed image data in which the encoding distortion is obtained by the expansion decoding process Thus, a value that is not easily visible is set as the allowable upper limit value.
[0006]
On the other hand, the allowable lower limit of the compression rate is the maximum amount of document image data that can be read per unit time in the document reading unit, and the compression encoded when transferred from the document reading unit to the printing unit. It can be uniquely determined by various system parameters in the system such as the maximum data transfer amount of the document image data string.
[0007]
Even if the upper limit and lower limit of the allowable compression rate are set as described above, it is not easy to perform the compression encoding process so that the compression rate for all supplied document image data falls within the range. Absent.
[0008]
The reason for this is that even if compression encoding processing is performed using the same encoding parameters represented by the quantization table, the amount of data in the encoded original image data string obtained is indefinite for each original image data. In other words, this is because the compression ratio changes for each read document image data.
[0009]
This is because each read document image data has a different bias and degree of information as viewed from the spatial frequency of the information included in the image data, and the value is 0 in the compression encoding process for such document image data. This is because various methods are employed for removing the redundancy of the compression-encoded image data as much as possible, such as run-length coding for transform coefficients and entropy coding using variable-length codes.
[0010]
Therefore, in order to perform compression encoding processing so that the compression rate for all document image data falls within the range between the allowable upper limit value and the lower limit value, the encoded data to be compressed, that is, supplied document image data It is necessary to adaptively change the encoding parameter applied to each of the above.
[0011]
In general, in order to perform compression encoding processing so that the compression rate becomes constant, encoding control called so-called information amount control or code amount control must be realized.
[0012]
As specific implementation methods for the information amount control, two main methods are known: a feedforward method and a feedback method.
[0013]
The feed-forward method calculates the dynamic range, power, and various statistical information separately from the original image data that is input as the compression-encoded data before performing the compression-encoding process. After predicting the encoding parameters, actual compression encoding processing is performed using the obtained encoding parameters.
[0014]
On the other hand, the feedback method predicts the optimal encoding parameter from the actual measurement value of the encoded data amount obtained by performing the compression encoding process as a trial, and then uses the obtained encoding parameter. The final compression encoding process is performed.
[0015]
The feedback method that predicts the optimal encoding parameter from the actual measurement value of the encoded data amount obtained by trying the compression encoding process directly calculates the actual encoded data amount. In terms of use, it is possible to obtain a prediction value of an encoding parameter that generates a target encoded data amount with higher accuracy than the feedforward method. However, this feedback method has a drawback in that it takes extra time overhead in principle for compression encoding processing that is a trial.
[0016]
A system that allows an increase in processing time even if the compression encoding process is repeated many times until an encoded data string of the target compression rate is obtained for one original image data, in other words, real-time performance and performance If the system is not required excessively, a finite number of repeated trial algorithms as disclosed in Japanese Patent Publication No. 8-32037 can be applied.
[0017]
However, digital imaging devices such as digital cameras and digital color copying devices generally require real-time performance and performance. Therefore, it is a problem to keep the time overhead spent on the compression encoding process, which is a trial for predicting the optimal encoding parameter, as much as possible, and a sufficiently high prediction accuracy is required.
[0018]
In order to improve the prediction accuracy of the optimal coding parameters in the information amount control using the feedback method, a plurality of different compression parameters are used to perform a plurality of trial compression coding processes, and those coding parameters are It can be easily considered that it is effective to increase the number of combinations of the actually obtained encoded data amount and the actually measured value. However, in order to minimize the time overhead, it is provided with the same number of arithmetic circuits or processing circuits as the number of encoding parameters used in the trial compression encoding process, and these circuits are arranged in parallel. Therefore, it is necessary to devise such that the compression encoding process as a trial is performed at high speed. Conventionally, several known techniques for solving this problem have been devised.
[0019]
In this case, in Reference 1 “Video Information January 1992 issue 51-58“ HDTV codec corresponding to 60 to 140 Mbps ”” which is an example of a known technique of parallel circuit architecture, N sets of quantum parameters are used as a plurality of encoding parameters. Coding parameters can be obtained by performing curve approximation from N encoded data amounts obtained from a compression encoding apparatus having N quantization circuits and N generated code amount measuring circuits, using an encoding table. That is, obtaining an optimal quantization table is described.
[0020]
As a contrivance to suppress an increase in circuit scale while having a similar configuration, the Japanese Patent Registration No. 05233953 uses five quantization tables in a trial compression encoding process by providing three quantization circuits. It is described that the quantizing is performed in parallel, and as a result, five values of the encoded data amount are calculated.
[0021]
When compressing and decoding a single image data, an encoding method that can proceed with the compression encoding process while adaptively changing the encoding parameter, more specifically the scaling value for the quantization table, is adopted. In moving image compression coding, a sequential correction algorithm for coding parameters as described in Japanese Patent No. 0289563 can be applied.
[0022]
In this conventional example, the data amount of a block-unit encoded data string obtained by quantization using a specific quantization scaling value at the time of trial compression encoding processing is calculated, and the calculated data amount is calculated. Based on the prediction of the data amount of M encoded data sequences expected to be obtained with M quantization scale values based on the target encoded data amount calculated from the M predicted values and the actual output The compression encoding process is proceeding while successively correcting the difference from the accumulated addition value of the data amount of the encoded data string up to now, that is, the quantization scaling value actually used from the prediction error.
[0023]
Furthermore, for the purpose of avoiding that the actually generated encoded data amount exceeds the allowable upper limit value against prediction, Japanese Patent No. 030338022 uses a code obtained at the time of trial compression encoding processing. When the data amount of the encoded data sequence obtained by actually quantizing and variable-length encoding using the quantization step value derived from the encoded data amount exceeds the data amount allocated to the block unit , Discontinuing variable length coding in the block (discarding significant transform coefficient information).
[0024]
[Problems to be solved by the invention]
The idea of the conventional example in the information amount control using the feedback method as described above is based on the optimum encoding based on the actual measurement value of one or a plurality of encoded data obtained by the compression encoding process performed as a trial. Both are common in that a parameter and a predicted value of the amount of encoded data generated by the encoding parameter are derived.
[0025]
In the JPEG encoding method that is widely used today as a general still image compression encoding method, the quantization step value matrix, which is one of the most representative encoding parameters, that is, the quantization table is not limited. One table combination is commonly applied to all blocks constituting one compressed encoded data. Therefore, when it is assumed that a still image compression encoding method with a limited degree of freedom of encoding parameters is adopted, the above-described encoding parameter sequential correction algorithm is applied as one of the conventional examples. It is not possible.
[0026]
Furthermore, in the algorithm described in Japanese Patent No. 03038022 cited as another conventional example, when the data amount allocated to the block unit is exceeded, the variable length coding for the block is terminated. Significance that does not need to be discarded even if the data amount of the final encoded data sequence obtained at the time of completion of compression encoding processing of all the blocks constituting the image data does not exceed the allowable upper limit Conversion coefficients are discarded, and local variations in compression coding distortion occur in the reconstructed image obtained by the decompression decoding process. Therefore, it cannot be said that application to digital imaging equipment is preferable.
[0027]
In a system that requires real-time performance and performance, such as digital imaging equipment, when performing compression encoding processing while realizing information amount control using a feedback method with high prediction accuracy, the parallel circuit architecture described above as a conventional example There is no doubt that is an effective implementation. However, the circuit scale for realizing a plurality of encoding processing circuits and the capacity of a buffer for temporarily storing a plurality of encoded data strings are both enormous, and from a cost standpoint. Then, it is difficult to realize too much parallelization.
[0028]
Therefore, in digital imaging equipment, when adopting a still image compression coding method with a limited degree of freedom of coding parameters, such as the JPEG coding method, the number of parallelization can be set with a circuit scale within an allowable range. Then, compression encoding processing is performed at the same time using as many different encoding parameters as possible, and encoding with the smallest encoding distortion within the allowable range of the compression rate is performed from the obtained plurality of encoded data strings. The best implementation is to output a data string.
[0029]
However, as long as the number of parallelization is finite, all encoded data sequences generated with a plurality of encoding parameters may deviate from the allowable range of the compression rate. In such a case, it is necessary to determine a new encoding parameter and start the compression encoding process again from the beginning of the encoded data. However, this redoing process, that is, the time spent for the re-encoding process directly leads to a decrease in system performance.
[0030]
The present invention has been made in view of the above problems, and an image obtained when image data is compression-encoded to a predetermined size and an encoded data string that has been compression-encoded is subjected to decompression decoding processing. An object of the present invention is to obtain a high-quality reconstructed image by suppressing the compression encoding distortion of the image.
[0031]
[Means and Actions for Solving the Problems]
In order to achieve the object of the present invention, for example, an image encoding apparatus of the present invention comprises the following arrangement.
[0032]
That is, an image encoding apparatus that performs compression encoding on image data,
First compression encoding means for performing compression encoding using a first compression encoding parameter that can be changed with respect to image data;
Second compression coding that can be compressed at a higher compression rate than the first compression coding parameter and that performs compression coding on the image data using a second compression coding parameter that can be changed. Means,
Determining means for counting the data amount of the encoded data string compression-encoded by the first compression-encoding means and determining whether the data amount is a predetermined amount or more;
Each time the determination unit determines that the data amount of the encoded data string by the first compression encoding unit is greater than or equal to a predetermined amount, the first compression encoding parameter is changed to the second compression encoding parameter. And changing means for changing the second compression encoding parameter to a parameter for obtaining a higher compression rate,
When the determination unit determines that the data amount of the encoded data string by the first compression encoding unit is equal to or greater than a predetermined amount, the encoding previously compressed by the second compression encoding unit Storage means for storing the data string as being compressed and encoded by the first compression encoding means after the parameter change;
If it is determined by the determination means that the data amount of the encoded data string by the first compression encoding means is greater than or equal to a predetermined amount, the second compression encoding means previously uses the compression code Conversion Re-compression encoding means for compressing and encoding the data again according to the parameters for the second compression encoding means changed by the changing means;
When the determination unit determines that the data amount of the encoded data string by the first compression encoding unit is greater than or equal to a predetermined amount before the recompression encoding process by the recompression encoding unit is completed Or control means for controlling so as to interrupt the compression encoding process by the first compression encoding means when it is predicted that the predetermined amount will be exceeded.
It is characterized by providing.
[0033]
In order to achieve the object of the present invention, for example, an image encoding method of the present invention comprises the following arrangement.
[0034]
That is, an image encoding method for compressing and encoding image data,
A first compression encoding step of performing compression encoding using a first compression encoding parameter that can be changed with respect to image data;
Second compression coding that can be compressed at a higher compression rate than the first compression coding parameter and that performs compression coding on the image data using a second compression coding parameter that can be changed. Process,
A determination step of counting a data amount of the encoded data sequence compression-encoded in the first compression encoding step and determining whether the data amount is a predetermined amount or more;
Each time it is determined in the determination step that the data amount of the encoded data string in the first compression encoding step is equal to or greater than a predetermined amount, the first compression encoding parameter is changed to the second compression encoding parameter. And changing the second compression encoding parameter to a parameter for obtaining a higher compression rate, and
If it is determined in the determination step that the amount of data of the encoded data string in the first compression encoding step is equal to or greater than a predetermined amount, the encoding that has been previously compression encoded in the second compression encoding step A storage step of storing the data string as being compressed and encoded in the first compression encoding step after the parameter change;
If it is determined in the determination step that the data amount of the encoded data string in the first compression encoding step is equal to or greater than a predetermined amount, the compression code is previously used in the second compression encoding step. Conversion A recompression encoding step of compressing and encoding the data again according to the parameters for the second compression encoding step changed in the changing step;
Before the recompression encoding process in the recompression encoding process is completed, it is determined in the determination process that the amount of data in the encoded data string in the first compression encoding process is a predetermined amount or more. A control process for controlling to interrupt the compression encoding process of the first compression encoding process, or if it is expected to exceed a predetermined amount;
It is characterized by providing.
[0035]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail according to preferred embodiments with reference to the accompanying drawings.
[0036]
[First Embodiment]
FIG. 1 is a block diagram showing a functional configuration of an image encoding device according to this embodiment. Details of each part will be described later. FIG. 2 is a block diagram showing a functional configuration of the
[0037]
4 shows that the first original image data input as encoded data to the image encoding apparatus shown in FIG. 1 is converted into the same quantization table and four types of quantization scaling values × 1, × 2, × 3 and × 4, and the cumulative value (vertical axis) of the data amount of the encoded data sequence obtained when sequential compression encoding processing is executed sequentially in units of rectangular areas, and compression encoding processing already at that time 5 is a graph showing a relationship with a relative position (horizontal axis) in the first original image data of the rectangular area where the is executed. Details of the graph shown in FIG.
[0038]
FIG. 5 shows the first original image data.
[0039]
FIG. 6 shows the first encoded
[0040]
10A and 10B are flowcharts of processing performed by the
[0041]
First, prior to the compression encoding process described later, the image encoding apparatus according to the present embodiment has information to be stored in advance. This information will be described below.
[0042]
Information representing the size of the first original image data input as encoded data shown in FIG. 4, more specifically, the original image data, is input to the
[0043]
In addition, the quantization table 205 in the
[0044]
In addition, the first variable length code table 206 and the second variable length code table 210 in the
[0045]
In addition, the variable length code table 304 (for decoding) and the variable length code table 305 (for encoding) in the
[0046]
As described above, prior to the compression encoding process described later, a process for storing information in advance in the image encoding apparatus according to the present embodiment, that is, an initialization process is performed (step S10).
[0047]
When a series of compression encoding processes on the first original image data that is the encoded data shown in FIG. 5 is actually input to the image encoding apparatus of the present embodiment, the
[0048]
First, the
[0049]
Further, the
[0050]
Further, the
[0051]
Thereafter, the
[0052]
FIG. 11 shows a flowchart of the encoding process performed by the
[0053]
The original image data in units of rectangular areas supplied to the
[0054]
The
[0055]
In the
[0056]
Further, in the
[0057]
The scaling operation executed by the
[0058]
This “× 1” is set as the initial value of the scaling value for the
A table in which input values (AC components of orthogonal transform coefficients) and computation results (scaled transform coefficients) in a scaling operation executed by the
[0059]
[Table 1]
[0060]
In the first
[0061]
Also, the first encoded data sequence output from the first
[0062]
Returning to FIG. 10A, as the next processing, the first encoded data string corresponding to each rectangular area sequentially supplied from the
[0063]
Similarly, in the second
[0064]
The second encoded data sequence corresponding to each rectangular area output on the second encoded data
[0065]
The second encoded data sequence output from the second
[0066]
The amount of data of the second encoded data sequence corresponding to each rectangular area sequentially supplied from the
[0067]
Compression code using four scaling values “× 1”, “× 2”, “× 4”, and “× 8” for the first original image data shown in FIG. The transition of the accumulated value of the data amount of the four encoded streams corresponding to each rectangular area obtained when the conversion processing is virtually executed is represented by four straight lines starting from the origin on the graph shown in FIG. It has been. The actual cumulative value does not increase linearly in this way, but here it is expressed with a straight line for the sake of simplicity.
[0068]
On this graph, the transition of the accumulated value of the data amount of the encoded data string obtained by the compression encoding process using the scaling value “× 1” is represented by a straight line Q1 (A). When the relative position of the already compressed and encoded rectangular area is p1, in other words, when the compression encoding process of all the rectangular areas constituting the divided area A on the first original image data is finished, Since the accumulated value reaches the maximum allowable encoded data amount Llim, the subsequent compression encoding process using the scaling value “× 1” for the rectangular area is not required.
[0069]
Note that the relative position p1 in the first original image data of the rectangular area is a two-dimensional position on the first original image data depicted in FIG. Further, the divided area A is all the area from the first rectangular area (first rectangular area located in the upper left corner of the original image data) to the rectangular area located at the relative position p1 on the first original image data. It is shown as a collection of rectangular regions.
[0070]
The remaining three scaling values “× 2”, “× 4”, and “×” during the period in which the relative position of the rectangular region to be subjected to the compression encoding process is in the range of the divided region A on the first original image data. The transition of the cumulative value of the data amount of the encoded data sequence obtained by the compression encoding process using 8 ″ is represented as straight lines Q2 (A), Q4 (A), and Q8 (A) on the graph, respectively. It has been. The accumulated values of the data amounts of these three encoded data sequences at the time when the relative position of the rectangular region that has already been compression encoded reaches p1 are L2 (A), L4 (A), and L8 (A ) Respectively.
[0071]
Therefore, the virtual compression encoding process for the rectangular area after the relative position p1 is for the three encoded data strings corresponding to the remaining three scaling values “× 2”, “× 4”, and “× 8”. The operation is continued for only.
[0072]
Subsequently, the remaining three scaling values “× 2” in a period in which the relative position of the rectangular area to be subjected to compression encoding processing is in the range (from p1 to p2) of the divided area B on the first original image data. , “× 4”, and “× 8”, the transition of the accumulated value of the data amount of the encoded data sequence obtained by the compression encoding process is represented by straight lines Q2 (B), Q4 (B), And Q8 (B), respectively. Then, the accumulated values of the data amounts of these three encoded data sequences at the time when the relative position of the rectangular area that has already been compression-encoded reaches p2 are Llim, L4 (A + B), and L8 (A + B), respectively. It has been shown to reach.
[0073]
The data amount of the encoded data string obtained by the compression encoding process using the scaling value “× 2” is the compression code of all the rectangular areas constituting the divided area A and the divided area B on the first original image data. Since the accumulated value has reached the maximum allowable encoded data amount Llim when the encoding process is finished, the subsequent compression encoding process using the scaling value “× 2” for the rectangular area is not required. It will be.
[0074]
Therefore, the virtual compression encoding process for the rectangular area after the relative position p2 is performed only for the two encoded data strings corresponding to the remaining two scaling values “× 4” and “× 8”. Operation continues.
[0075]
In the compression encoding process for the first original image data shown in FIG. 4, the relative position of the rectangular area that is the target of the compression encoding process is determined based on the range (from p2) of the divided area C on the first original image data. The transition of the cumulative value of the data amount of the encoded data sequence obtained by the compression encoding process using the remaining two scaling values “× 4” and “× 8” during the period of up to 100%) is shown in the graph. Above, they are represented as straight lines Q4 (C) and Q8 (C), respectively. The accumulated values of the data amounts of these two encoded data strings at the time when the relative position of the rectangular area that has already been compression-encoded
[0076]
Therefore, when the compression encoding process for all the rectangular areas constituting the first original image data shown in FIG. 5 is finished, two scaling values “× 4” and “× 8” are used. It can be seen that the final accumulated value of the data amounts of the two encoded data strings obtained by the compression encoding process does not exceed the maximum allowable encoded data amount Llim.
[0077]
As a result, an encoded data sequence obtained by compression encoding processing using a scaling value “× 4” that is an encoded data sequence having a lower compression rate from the viewpoint of encoding distortion is output from the image encoding device. The optimum encoded data string to be obtained is obtained.
[0078]
In practice, the scaling value “× 4” obtained as a result of this is the optimum encoding parameter when starting a series of compression encoding processes for the first original image data shown in FIG. Then it is unknown.
[0079]
In the period of the first encoding operation, in other words, in the period in which the relative position of the rectangular area to be subjected to the compression encoding process is within the range of the divided area A on the first original image data shown in FIG. In addition, the first encoded data sequence sequentially stored in the first encoded
[0080]
On the other hand, during the same first encoding operation, the second encoded data sequence that becomes a replacement candidate sequentially stored in the second encoded
[0081]
In the
[0082]
When such a determination is made, the
[0083]
Next, the
[0084]
Further, the
[0085]
Further, the
[0086]
Thereafter, in order to start the second encoding operation by the
[0087]
Immediately thereafter, the
[0088]
The
[0089]
Thereafter, the
[0090]
According to the above instruction, the image encoding apparatus of the present embodiment substantially starts the first transfer operation and re-encoding operation.
[0091]
During the first transfer operation, the second encoded data sequence sequentially stored (transferred) in the first encoded
[0092]
The second encoded data sequence that is a replacement candidate corresponding to each rectangular area read from the second encoded
[0093]
A series of encoded data sequences corresponding to the individual rectangular areas supplied to the
[0094]
FIG. 12 shows a flowchart of processing performed by the
[0095]
The
[0096]
The scaling operation executed by the
[0097]
In the
[0098]
The third encoded data sequence that is a replacement candidate output from the
[0099]
Returning to FIG. 10B, the third encoded data that is a replacement candidate corresponding to each rectangular area sequentially supplied from the
[0100]
As described above, when the re-encoding operations are summarized, a series of encoded data sequences corresponding to individual rectangular areas supplied to the
[0101]
The third encoded data sequence that becomes the “next” replacement candidate corresponding to each rectangular area output on the third encoded data
[0102]
During the first re-encoding operation, the “next” replacement candidate is sequentially stored in the second encoded
[0103]
All the second encoded data sequences that are replacement candidates are stored (transferred) in the first encoded
[0104]
By the processing in step S190, the first accumulated value represents the amount of data stored in the first encoded
[0105]
After the first transfer operation and re-encoding operation are completed, the
[0106]
Further, the
[0107]
On the other hand, the second encoding operation by the
[0108]
The data amount of the first encoded data sequence corresponding to each rectangular area sequentially supplied from the
[0109]
The first encoded data sequence corresponding to each rectangular area output on the first encoded data
[0110]
At the same time, the original image data of the rectangular area divided and output by the original image
[0111]
The data amount of the second encoded data sequence corresponding to each rectangular area sequentially supplied from the
[0112]
The second encoded data sequence that is a replacement candidate corresponding to each rectangular area output on the second encoded data
[0113]
During the second encoding operation, in other words, during the period in which the relative position of the rectangular area to be subjected to the compression encoding process is within the range of the divided area B on the first original image data shown in FIG. In addition, the first encoded data sequence sequentially stored in the first encoded
[0114]
On the other hand, during the same second encoding operation period, the second encoded data sequence to be a replacement candidate sequentially stored in the second encoded
[0115]
In the
[0116]
When such a determination is made, the
[0117]
Next, since the compression encoding process of the first original image has not been completed yet, the process returns to step S100, and the
[0118]
Further, the
[0119]
Further, the
[0120]
First, the
[0121]
By the above instruction, the second transfer operation and re-encoding operation are substantially started.
[0122]
The encoded data sequence sequentially stored (transferred) in the first encoded
[0123]
The second encoded data sequence that is a replacement candidate corresponding to each rectangular area read from the second encoded
[0124]
The
[0125]
Then, the data amount of the third encoded data sequence that is a replacement candidate corresponding to each rectangular area sequentially supplied to the
[0126]
The third encoded data sequence that becomes the “next” replacement candidate corresponding to each rectangular area output on the third encoded data
[0127]
During the second re-encoding operation, the “next” replacement candidate that is sequentially stored in the second encoded
[0128]
All the second encoded data sequences that are replacement candidates are stored (transferred) in the first encoded
[0129]
By the processing in step S190, the first accumulated value represents the amount of data stored in the first encoded
[0130]
After the second transfer operation and the re-encoding operation are completed, the
[0131]
On the other hand, the third encoding operation by the
[0132]
Then, the data amount of the first encoded data string corresponding to each rectangular area sequentially supplied from the
[0133]
The first encoded data sequence corresponding to each rectangular area output on the first encoded
[0134]
At the same time, the original image data of the rectangular area divided and output by the original image
[0135]
The data amount of the second encoded data sequence corresponding to each rectangular area sequentially supplied from the
[0136]
The second encoded data sequence that is a replacement candidate corresponding to each rectangular area output on the second encoded data
[0137]
In the period of the third encoding operation, in other words, during the period in which the relative position of the rectangular area to be subjected to the compression encoding process is within the range of the divided area C on the first original image data shown in FIG. In addition, the first encoded data sequence sequentially stored in the first encoded
[0138]
On the other hand, during the same third encoding operation, the second encoded data sequence that is a replacement candidate that is sequentially stored in the second encoded
[0139]
In the
[0140]
Subsequently, the
[0141]
The encoded data sequence corresponding to each rectangular area read from the first encoded
[0142]
The image encoding apparatus according to the present embodiment ends a series of compression encoding processes for the first original image data upon completion of the output process of the encoded data string by the encoded data
[0143]
Here, the operation of the image coding apparatus according to the present embodiment when the second original image data, which is another original image data, is used will be described.
[0144]
7 shows that the second original image data input as encoded data to the image encoding apparatus shown in FIG. 1 is converted into the same quantization table and four types of quantization scaling values × 1, × 2, × The cumulative value (vertical axis) of the data amount of the encoded data sequence obtained when the compression encoding process is sequentially executed in units of rectangular areas using 3 and × 4, and the compression encoding process has already been performed at that time It is a graph showing the relationship with the relative position (horizontal axis) in the original image data of the executed rectangular area.
[0145]
FIG. 8 shows the second original image data.
[0146]
FIG. 9 shows the first encoded
[0147]
A series of compression encoding processes performed on the second original image data by the image encoding apparatus according to the present embodiment will be described below with reference to FIGS. 1 to 3 and 7 to 10.
[0148]
The second original image data shown in FIG. 8 is virtually compressed and encoded using four scaling values “× 1”, “× 2”, “× 4”, and “× 8”. The transition of the accumulated value of the four encoded data amounts corresponding to the individual rectangular areas obtained when executed is represented by four straight lines starting from the origin on the graph shown in FIG.
[0149]
On this graph, four scaling values “× 1”, “× 2”, “” are displayed in a period in which the relative position of the rectangular region to be compression-encoded is within the range of the divided region A on the second original image data. The transition of the cumulative value of the data amount of the encoded data sequence obtained by the compression encoding process using × 4 ”and“ × 8 ”is represented by straight lines Q1 (A), Q2 (A), Q4 ( A) and Q8 (A), respectively. The accumulated values of the data amounts of these four encoded data strings at the time when the relative position of the rectangular area that has already been compression encoded reaches p1 are Llim, L2 (A), L4 (A), and L8. Each of (A) is shown to be reached.
[0150]
The data amount of the encoded data sequence obtained by the compression encoding process using the scaling value “× 1” is the same as the compression encoding process for all the rectangular areas constituting the divided area A on the second original image data. Since the accumulated value reaches the maximum allowable encoded data amount Llim at this point, the compression encoding process using the scaling value “× 1” for the subsequent rectangular area is not required.
[0151]
Therefore, the virtual compression encoding process for the rectangular area after the relative position p1 uses any of the remaining three scaling values “× 2”, “× 4”, and “× 8”.
[0152]
Subsequently, the remaining three scaling values “× 2” in a period in which the relative position of the rectangular area to be subjected to compression encoding processing is in the range (from p1 to p2) of the divided area B on the second original image data. , “× 4”, and “× 8”, the transition of the accumulated value of the data amount of the encoded data sequence obtained by the compression encoding process is represented by straight lines Q2 (B), Q4 (B), And Q8 (B), respectively. Then, the accumulated values of the data amounts of these three encoded data sequences at the time when the relative position of the rectangular area that has already been compression-encoded reaches p2 are Llim, L4 (A + B), and L8 (A + B), respectively. It has been shown to reach.
[0153]
At the relative position p1 ′ of the rectangular area in FIG. 7, the slopes of the straight lines Q2 (B), Q4 (B), and Q8 (B) increase rapidly, so the relative position p1 of the second original image data It can be inferred that the amount of information held by the image is increasing rapidly from 'to 100%.
[0154]
The data amount of the encoded data string obtained by the compression encoding process using the scaling value “× 2” is the compression code of all the rectangular areas constituting the divided area A and the divided area B on the second original image data. Since the accumulated value reaches the maximum allowable encoded data amount Llim when the encoding process is finished, the subsequent compression encoding process using the scaling value “× 2” for the rectangular area is not required. Become.
[0155]
Accordingly, in the virtual compression encoding process for the rectangular area after the relative position p2, one of the remaining two scaling values “× 4” and “× 8” is used.
[0156]
The remaining two scaling values “× 4” in a period in which the relative position of the rectangular area to be subjected to the compression encoding process is in the range (from p2 to 100%) of the divided area C on the second original image data, and The transition of the cumulative value of the data amount of the encoded data string obtained by the compression encoding process using “× 8” is represented as straight lines Q4 (C) and Q8 (C) on the graph. The accumulated values of the data amounts of these two encoded data strings at the time when the relative position of the rectangular area that has already been compression-encoded
[0157]
Therefore, the encoded data string data obtained by the compression encoding process using the scaling value “× 4” when the compression encoding process for all the rectangular areas constituting the second original image data is completed. It can be seen that the final accumulated value of the amount does not exceed the maximum allowable encoded data amount Llim. As a result, the encoded data sequence obtained by the compression encoding process using the scaling value “× 4” becomes the optimal encoded data sequence to be output from the image encoding apparatus.
[0158]
When the above-described series of compression encoding processing is performed on the second original image data, the encoded data stored in the first encoded
[0159]
In FIG. 9, a dotted line Q2 (B), which is a cumulative value of the data amount of the first encoded data sequence for the divided area B generated by the
[0160]
Since the re-encoding operation and the transfer operation for the encoded data string have not been completed at the relative position p2 of the rectangular area described above, the
[0161]
This interruption of operation is the re-encoding operation in which the process is continued as shown in the encoding operation stop period (from p2 to p2 ′) inserted between the divided region B and the divided region C in FIG. This is continued until the transfer operation is completed (step S290).
[0162]
When the re-encoding operation and the transfer operation for the divided region B are completed (p2 ′), the
[0163]
Furthermore, the
[0164]
Thereafter, in order to immediately start the encoding process for the divided region C, the
[0165]
The outline of the image encoding apparatus in the present embodiment described above will be described below.
[0166]
When performing so-called information amount control associated with a series of compression encoding processes for input image data, the maximum allowable encoded data amount set in advance and the total of rectangular areas that have already been encoded so far are the original image data. Based on the ratio of the data, the accumulated data amount of the encoded data string generated so far, and the like, the updating instruction of the encoding parameter and the various operation control associated therewith are sequentially performed by the control means.
[0167]
When an instruction to change the encoding parameter is issued by the control means, the image encoding apparatus starts a transfer operation and a re-encoding operation in addition to performing an encoding operation with the changed encoding parameter.
[0168]
In the transfer operation, the encoded data sequence already generated and stored during the previous encoding operation period is discarded or invalidated from the first encoded data sequence buffer and corresponds to the updated encoding parameter. A new encoded data string to be transferred is transferred from another second encoded data string buffer and stored in the first encoded data string buffer. That is, the encoded data sequence stored on the first encoded data sequence buffer until then is replaced with the new encoded data sequence.
[0169]
Further, in the re-encoding operation, the encoded data sequence stored in the second encoded data sequence buffer during the previous encoding operation period is input to the re-encoding unit, and different encoding parameters are used. Re-encoding is performed and the data is stored again on the second encoded data string buffer.
[0170]
In the image encoding apparatus according to the present embodiment, it is assumed that an encoding parameter to be updated when an instruction to change an encoding parameter is issued next is already known. Therefore, the process of generating a new encoded data string corresponding to the updated encoding parameter can be executed simultaneously with the encoding process for each rectangular area performed during the preceding encoding operation period. Is possible.
[0171]
Another encoded data sequence generated during the preceding encoding operation period is sequentially stored in the second encoded data sequence buffer as the encoded data sequence of the next replacement candidate.
[0172]
In this embodiment, two methods are applied as specific methods for generating the encoded data string of the next replacement candidate.
[0173]
One is that the re-encoding means receives the first encoded data string that has already been encoded by the encoding means, and the next update is performed on the symbol information obtained through the decoding process. A re-encoding process using parameters is performed, and as a result, an encoded data string of the next replacement candidate is created.
[0174]
The other is that the encoding means simultaneously performs the encoding process of the encoded data string corresponding to the encoding parameter to be updated next at the same time as the encoding process of the first encoded data string. For example, an encoded data string of replacement candidates is created.
[0175]
The encoded data sequence of the next replacement candidate generated by any of the above methods in the preceding encoding operation and stored in the second encoded data sequence buffer is determined by the adaptive judgment by the control means. When an update instruction is issued, it is transferred to the first encoded data string buffer, and replaced with the encoded data string stored so far.
[0176]
Further, assuming that the encoding parameter is changed again after that, a process for generating an encoded data string that can be further replaced is performed simultaneously with the transfer operation.
[0177]
The so-called re-encoding operation for generating the encoded data sequence of the next replacement candidate that is performed simultaneously with the transfer operation is performed by the re-encoding means receiving the encoded data sequence being transferred, and the decoding process step is performed there. The re-encoding process using the encoding parameter updated next is further performed on the symbol information obtained through the process, and as a result, the encoded data string of the next replacement candidate is generated.
[0178]
Further, the replacement candidate encoded data string generated using the encoding parameter to be updated next is also generated in parallel by the above-described method by the encoding operation in the encoding means.
[0179]
The generated encoded data sequence of the further next replacement candidate is second encoded as an encoded data sequence subsequent to the encoded data sequence of the further subsequent replacement candidate generated and stored in the re-encoding operation. The data is sequentially stored on the data string buffer.
[0180]
When the encoded data sequence transfer operation between the two buffer memories described above and the re-encoding that is the generation process of the encoded data sequence of the next replacement candidate performed in parallel therewith are completed, the image encoding is performed. The operation as a device is only the encoding operation using the designated encoding parameter and the updated encoding parameter.
[0181]
As described above, the processing of the transfer operation of the image encoding device executed by issuing an instruction to update the encoding parameter and the encoded data sequence of the next replacement candidate are further generated in the re-encoding operation. In the situation where the process and the process of generating the encoded data string of the next replacement candidate that is executed in parallel in the encoding operation must be issued again after this, the encoding parameter further update instruction In the sense that it falls, it is done in the sense of insurance.
[0182]
Among the processes performed in the meaning of this insurance, the process for generating the encoded data string of the next replacement candidate in the re-encoding operation is generated by the encoding means according to the encoding parameter specified at that time. It is desirable to complete before the accumulated data amount of the encoded data string exceeds the maximum allowable encoded data amount.
[0183]
However, among the image data input to the image encoding apparatus according to the present embodiment as original image data, before the process of generating the encoded data sequence of the next replacement candidate is completed in the re-encoding operation. There is an image having such a characteristic that a situation occurs in which the accumulated data amount of the encoded data sequence generated by the encoding means exceeds the maximum allowable encoded data amount by the encoding parameter specified at that time. Yeah. In this case, the encoding unit continues the encoding operation with the encoding parameter specified at that time until the process of generating the encoded data string of the next replacement candidate is further completed in the re-encoding operation, The encoded data string is continuously output to the first encoded data string buffer.
[0184]
In order to prepare for such a situation, the maximum allowable encoded data amount is set to be smaller than the physical capacity of the first encoded data string buffer, and the encoding means outputs exceeding the maximum allowable encoded data amount. It is necessary to secure an area for storing the encoded data string to be received. How much the maximum allowable encoded data amount is set as compared with the physical capacity of the first encoded data string buffer is determined based on the result of actually processing an image having various characteristics. There is a way to go. When determining the maximum allowable encoded data amount by this method, assuming that an image having characteristics that cannot be covered is input to the image encoding apparatus in the present embodiment, the maximum allowable encoded data is set smaller. I have to set the amount.
[0185]
However, setting the maximum allowable encoded data amount smaller than the physical capacity of the first encoded data string buffer is the number of times that the encoding parameter is updated in the image encoding apparatus according to the present embodiment. Leads to an increase. If the number of update of the encoding parameter increases even once, the compression encoding distortion increases in the reconstructed image obtained by performing the decompression decoding process on the encoded data sequence generated by the image encoding apparatus in the present embodiment. Results in.
[0186]
Therefore, in the course of the compression encoding process in the image encoding apparatus according to the present embodiment, before the process of generating the encoded data string of the “subsequent” replacement candidate by the re-encoding operation is completed, and Before the process of transferring the “next” replacement candidate by the transfer operation to the first encoded data string buffer is completed, the encoded data string generated by the encoding means according to the encoding parameter specified at that time When the situation where the accumulated data amount exceeds or is expected to exceed the maximum allowable encoded data amount is controlled by the control unit so as to interrupt the encoding operation by the encoding unit.
[0187]
With this adaptive operation control, it is not necessary to set the maximum allowable encoded data amount smaller than the physical capacity of the first encoded data string buffer, and the first encoded data is set to the maximum allowable encoded data amount. The same value as the physical capacity of the column buffer can be set. Thereby, unnecessary updating of the encoding parameter can be eliminated, and as a result, the number of times of updating the encoding parameter for one original image data can be reduced.
[0188]
As described above, in the image encoding device according to the present embodiment, the
[0189]
However, among images having various characteristics, there may be an image whose information amount increases abruptly from the middle of the image, such as second original image data. In a series of compression encoding processes for such original image data, as shown in the three processing operations in the divided region B in FIG. 9, the accumulation of the data amount of the encoded data string generated by the encoding operation is performed. Even when the value reaches the maximum allowable encoded data amount, a situation occurs in which the re-encoding operation and the transfer operation being performed simultaneously do not finish the processing.
[0190]
When such a situation occurs, the image encoding apparatus according to the present embodiment performs encoding when the accumulated value of the data amount of the encoded data sequence generated by the encoding operation reaches the maximum allowable encoded data amount. The operation is stopped, and the stop state of the encoding operation is maintained until the re-encoding operation and the transfer operation being performed simultaneously are completed.
[0191]
Therefore, the image encoding apparatus and the image encoding method according to the present embodiment can compress and encode image data to a predetermined size, and can be obtained when decompressed decoding processing is performed on a compression-coded encoded data string. It is possible to suppress the compression encoding distortion of the obtained image, and to obtain a high-quality reconstructed image.
[0192]
[Other Embodiments]
An object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus. Needless to say, this can also be achieved by reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0193]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0194]
When the present invention is applied to the above-mentioned storage medium, the storage medium stores program codes corresponding to the flowcharts described above (part or all of FIGS. 10A to 12).
[0195]
【The invention's effect】
As described above, according to the present invention, the image data can be compression-encoded to a predetermined size, and the compression-encoding distortion of the image obtained when the encoded data sequence that has been compression-encoded is subjected to the expansion decoding process can be reduced. And a high-quality reconstructed image can be obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a functional configuration of an image encoding device according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a functional configuration of an
3 is a block diagram showing a mechanism configuration of a
4 shows a first original image input as non-encoded data to the image encoding apparatus shown in FIG. 1 with the same quantization table and four types of quantization scaling values × 1, × 2, × 3. , And × 4, and the cumulative value (vertical axis) of the data amount of the encoded data sequence obtained when the compression encoding process is sequentially executed in units of rectangular areas, and the compression encoding process has already been performed at that time. It is a graph showing the relationship with the relative position (horizontal axis) in the 1st original image data of the executed rectangular area.
FIG. 5 is a diagram showing the original image data shown in FIG.
6 shows the first encoded
7 shows that the second original image data input as encoded data to the image encoding device shown in FIG. 1 has the same quantization table and four types of quantization scaling values × 1, × 2, × The cumulative value (vertical axis) of the data amount of the encoded data sequence obtained when the compression encoding process is sequentially executed in units of rectangular areas using 3 and × 4, and the compression encoding process has already been performed at that time It is a graph showing the relationship with the relative position (horizontal axis) in the original image data of the executed rectangular area.
FIG. 8 is a diagram showing second original image data.
9 shows a first encoded
10A is the first half of a flowchart of processing performed by the
10B is the latter half of the flowchart of the process performed by the
11 is a flowchart of processing performed by an
12 is a flowchart of processing performed by a
Claims (8)
画像データに対して変更可能な第1の圧縮符号化パラメータを用いて圧縮符号化を行う第1の圧縮符号化手段と、
前記第1の圧縮符号化パラメータよりも高い圧縮率で圧縮可能であって、変更可能な第2の圧縮符号化パラメータを用いて前記画像データに対して圧縮符号化を行う第2の圧縮符号化手段と、
前記第1の圧縮符号化手段により圧縮符号化された符号化データ列のデータ量を計数すると共に、当該データ量が所定量以上であるか否かを判断する判断手段と、
前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断される度に、前記第1の圧縮符号化パラメータを前記第2の圧縮符号化パラメータで置き換え、前記第2の圧縮符号化パラメータを更に高い圧縮率を得るためのパラメータに変更する変更手段と、
前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化手段により従前に圧縮符号化された符号化データ列を、パラメータ変更後の前記第1の圧縮符号化手段により圧縮符号化されたものとして保存する保存手段と、
前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化手段で従前に圧縮符号化されたデータを、前記変更手段によって変更した前記第2の圧縮符号化手段用のパラメータに従い再度圧縮符号化する再圧縮符号化手段と、
前記再圧縮符号化手段による再圧縮符号化処理が完了するより前に、前記判断手段により前記第1の圧縮符号化手段による符号化データ列のデータ量が所定量以上であると判断された場合、あるいは所定量以上になると予想された場合、前記第1の圧縮符号化手段による圧縮符号化処理を中断するように制御する制御手段と
を備えることを特徴とする画像符号化装置。An image encoding device that performs compression encoding on image data,
First compression encoding means for performing compression encoding using a first compression encoding parameter that can be changed with respect to image data;
Second compression coding that can be compressed at a higher compression rate than the first compression coding parameter and that performs compression coding on the image data using a second compression coding parameter that can be changed. Means,
Determining means for counting the data amount of the encoded data string compression-encoded by the first compression-encoding means and determining whether the data amount is a predetermined amount or more;
Each time the determination unit determines that the data amount of the encoded data string by the first compression encoding unit is greater than or equal to a predetermined amount, the first compression encoding parameter is changed to the second compression encoding parameter. And changing means for changing the second compression encoding parameter to a parameter for obtaining a higher compression rate,
When the determination unit determines that the data amount of the encoded data string by the first compression encoding unit is equal to or greater than a predetermined amount, the encoding previously compressed by the second compression encoding unit Storage means for storing the data string as being compressed and encoded by the first compression encoding means after the parameter change;
If the data amount of the coded data string by the first compression encoding means is determined to be equal to or greater than the predetermined amount by the determining means, the compression encoded data previously in the second compression encoding means Re-compression encoding means for performing compression encoding again according to the parameters for the second compression encoding means changed by the changing means;
When the determination unit determines that the data amount of the encoded data string by the first compression encoding unit is greater than or equal to a predetermined amount before the recompression encoding process by the recompression encoding unit is completed Or an image encoding apparatus comprising: a control unit configured to control the compression encoding process by the first compression encoding unit to be interrupted when it is predicted to exceed a predetermined amount.
画像データに対して変更可能な第1の圧縮符号化パラメータを用いて圧縮符号化を行う第1の圧縮符号化工程と、
前記第1の圧縮符号化パラメータよりも高い圧縮率で圧縮可能であって、変更可能な第2の圧縮符号化パラメータを用いて前記画像データに対して圧縮符号化を行う第2の圧縮符号化工程と、
前記第1の圧縮符号化工程で圧縮符号化された符号化データ列のデータ量を計数すると共に、当該データ量が所定量以上であるか否かを判断する判断工程と、
前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断される度に、前記第1の圧縮符号化パラメータを前記第2の圧縮符号化パラメータで置き換え、前記第2の圧縮符号化パラメータを更に高い圧縮率を得るためのパラメータに変更する変更工程と、
前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化工程で従前に圧縮符号化された符号化データ列を、パラメータ変更後の前記第1の圧縮符号化工程で圧縮符号化されたものとして保存する保存工程と、
前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断された場合、前記第2の圧縮符号化工程で従前に圧縮符号化されたデータを、前記変更工程で変更した前記第2の圧縮符号化工程用のパラメータに従い再度圧縮符号化する再圧縮符号化工程と、
前記再圧縮符号化工程での再圧縮符号化処理が完了するより前に、前記判断工程で前記第1の圧縮符号化工程による符号化データ列のデータ量が所定量以上であると判断された場合、あるいは所定量以上になると予想された場合、前記第1の圧縮符号化工程による圧縮符号化処理を中断するように制御する制御工程と
を備えることを特徴とする画像符号化方法。An image encoding method for performing compression encoding on image data,
A first compression encoding step of performing compression encoding using a first compression encoding parameter that can be changed with respect to image data;
Second compression coding that can be compressed at a higher compression rate than the first compression coding parameter and that performs compression coding on the image data using a second compression coding parameter that can be changed. Process,
A determination step of counting a data amount of the encoded data sequence compression-encoded in the first compression encoding step and determining whether the data amount is a predetermined amount or more;
Each time it is determined in the determination step that the data amount of the encoded data string in the first compression encoding step is equal to or greater than a predetermined amount, the first compression encoding parameter is changed to the second compression encoding parameter. And changing the second compression encoding parameter to a parameter for obtaining a higher compression rate, and
If it is determined in the determination step that the amount of data of the encoded data string in the first compression encoding step is equal to or greater than a predetermined amount, the encoding that has been previously compression encoded in the second compression encoding step A storage step of storing the data string as being compressed and encoded in the first compression encoding step after the parameter change;
If the data amount of the coded data string by the first compression encoding step in said determining step is determined to be equal to or greater than the predetermined amount, the compressed data encoded previously in the second compression encoding step A recompression encoding step that performs compression encoding again according to the parameters for the second compression encoding step changed in the changing step;
Before the recompression encoding process in the recompression encoding process is completed, it is determined in the determination process that the amount of data in the encoded data string in the first compression encoding process is a predetermined amount or more. Or a control step of controlling the compression encoding process in the first compression encoding step to be interrupted when it is expected to exceed a predetermined amount.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001392642A JP3893281B2 (en) | 2001-12-25 | 2001-12-25 | Image encoding apparatus, image encoding method, program, and storage medium |
US10/298,657 US7106909B2 (en) | 2001-12-25 | 2002-11-19 | Method and apparatus for encoding image data in accordance with a target data size |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001392642A JP3893281B2 (en) | 2001-12-25 | 2001-12-25 | Image encoding apparatus, image encoding method, program, and storage medium |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2003199104A JP2003199104A (en) | 2003-07-11 |
JP2003199104A5 JP2003199104A5 (en) | 2006-12-21 |
JP3893281B2 true JP3893281B2 (en) | 2007-03-14 |
Family
ID=27599891
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001392642A Expired - Fee Related JP3893281B2 (en) | 2001-12-25 | 2001-12-25 | Image encoding apparatus, image encoding method, program, and storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3893281B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150078674A1 (en) * | 2012-02-20 | 2015-03-19 | Wenfei Jiang | Component sorting based encoding for 3d mesh compression |
CN115514375B (en) * | 2022-11-18 | 2023-03-24 | 江苏网进科技股份有限公司 | Cache data compression method |
-
2001
- 2001-12-25 JP JP2001392642A patent/JP3893281B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2003199104A (en) | 2003-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7106909B2 (en) | Method and apparatus for encoding image data in accordance with a target data size | |
JP4047183B2 (en) | Image compression encoding apparatus and control method thereof | |
US7136531B2 (en) | Image encoder, image encoding method, image encoding computer program, and storage medium | |
JP6727011B2 (en) | Image coding apparatus and control method thereof | |
JPH07107300A (en) | Picture encoding device | |
JP4671354B2 (en) | Image compression apparatus and image compression method | |
JP3893281B2 (en) | Image encoding apparatus, image encoding method, program, and storage medium | |
JP4105578B2 (en) | Image compression device | |
JP4064279B2 (en) | Image compression device | |
JP2768260B2 (en) | Image coding control method | |
JP7359653B2 (en) | Video encoding device | |
JPH0723385A (en) | Highly efficient encoding device | |
JP3902987B2 (en) | Image encoding apparatus, image encoding method, program, and storage medium | |
JP7451131B2 (en) | Image encoding device, image encoding method, and program | |
JP4510696B2 (en) | Image processing apparatus and image processing method | |
JP5200792B2 (en) | Image compression apparatus and method, and program | |
JP2003116006A (en) | Image coding method and equipment therefor | |
JP2004336247A (en) | Image coding method, image coder and computer program | |
JP2001238213A (en) | Image processing apparatus and its method | |
JP5244479B2 (en) | Image coding apparatus and image coding method | |
JP2003304401A (en) | Image encoder | |
JP3368186B2 (en) | Image processing apparatus and method | |
JP4035471B2 (en) | Image processing apparatus, control method therefor, computer program, and storage medium | |
JP4090978B2 (en) | Image processing device | |
JP2001298623A (en) | Encoder and encoding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041213 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061107 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20061114 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20061127 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061211 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091215 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101215 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111215 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121215 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131215 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |