JP2004007475A - Image compression encoding device and method, and program - Google Patents

Image compression encoding device and method, and program Download PDF

Info

Publication number
JP2004007475A
JP2004007475A JP2003070729A JP2003070729A JP2004007475A JP 2004007475 A JP2004007475 A JP 2004007475A JP 2003070729 A JP2003070729 A JP 2003070729A JP 2003070729 A JP2003070729 A JP 2003070729A JP 2004007475 A JP2004007475 A JP 2004007475A
Authority
JP
Japan
Prior art keywords
code amount
compression
total
unit
compression method
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.)
Granted
Application number
JP2003070729A
Other languages
Japanese (ja)
Other versions
JP4042597B2 (en
JP2004007475A5 (en
Inventor
Takuya Kitamura
北村 卓也
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2003070729A priority Critical patent/JP4042597B2/en
Publication of JP2004007475A publication Critical patent/JP2004007475A/en
Publication of JP2004007475A5 publication Critical patent/JP2004007475A5/en
Application granted granted Critical
Publication of JP4042597B2 publication Critical patent/JP4042597B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To control the total code amount of the whole frame while satisfying a target code amount by efficiently selecting the code amount from a DCT(Discrete Cosine Transform) path or a DPCM(Differential Pulse Code Modulation) path. <P>SOLUTION: Either one of a 1st compression system for quantizing an input picture signal by respectively different quantization steps and a 2nd compression system having a compression ratio lower than that of the 1st compression system and reduced at its loss is selected in each block, a selection signal of the selected compression system is generated, a code amount based on the 1st compression system or the 2nd compression system is entered in accordance with the generated selection signal, and code amounts inputted through a switching means are added in each block to compute the total code amount of each equal length unit. The total code amount calculated in each quantization step is linearly interpolated to control the total code amount so as to approximate to the target code amount. The 1st compression system or the 2nd compression system is selected in each block in accordance with the controlled total code amount to perform encoding. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、例えばMPEG(Moving Picture image coding ExpertsGroup)等に適用され、例えばDCT(Discrete Cosine Transform)や、例えばDPCM(Differential Pulse Code Modulation)を用いた符号化による発生情報量を制御可能な画像圧縮符号化装置及び方法に関する。
【0002】
【従来の技術】
例えば、テレビ会議システム、テレビ電話システムなどのように、動画像信号を遠隔地に伝送するシステムにおいて、動画像信号をそのままディジタル化すると情報量が極めて多くなる。しかし、映像信号のライン相関やフレーム間相関を利用して、画像信号を圧縮符号化することによって情報量を減らすことができ、一度に多くの動画像を伝送することが可能となり、ひいては、記録媒体に対して長時間の動画像を記録することが可能となる。動画像の高能率符号化方式として代表的なものとしてMPEG方式がある。このMPEG方式では、伝送路に送出されるビットストリームが所望のレートになるように、符号量制御を行う。
【0003】
図10は、MPEG方式に代表される従来の画像圧縮符号化装置7の構成を示している。この従来の画像圧縮符号化装置7は、入力された画像信号をDCT変換した上で量子化するDCT符号化方式に基づき、非可逆的な画像圧縮を実現する。この画像圧縮符号化装置7は、端子71と、ブロック分割部72と、DCT部73と、量子化部74と、可変長符号化部75と、バッファ79とを備える。
【0004】
この図10において、端子71には、輝度信号Y、色差信号Pb,Prからなる画像信号が入力される。
【0005】
ブロック分割部72は、入力された1フレームの画像信号を例えば8×8のブロックに分割し、DCT部73へ出力する。
【0006】
DCT部73は、8×8のブロック毎にDCTを施すことによりDCT係数を生成し、量子化部74へ出力する。量子化部74は、DCT部73から入力されたDCT係数を、ブロック単位で決められた量子化ステップにより量子化する。量子化部74は、この量子化されたデータ(以下、量子化レベルと称する)を可変長符号化部75へ供給する。可変長符号化部75は、量子化部74から供給された量子化レベルを、例えば2次元ハフマン符号化や、算術符号化等の方法により可変長符号化する。
【0007】
ちなみに、この画像圧縮符号化装置7における符号量制御は、量子化ステップを制御することにより行なう。この符号量制御は、例えば仮想バッファの残量と、以前エンコーダした際の量子化ステップと発生符号量の関係を用いてフィードバック制御することにより行なう場合もある。
【0008】
なお、この画像圧縮符号化装置7では、1フレーム(等長化単位)において発生する総符号量が、常に設定された目標符号量を越えないように符号量制御を行なう必要がある。しかしながら、目標符号量を満たすために、総符号量を多量に残してしまうと、却って画像品質の悪化を招くことになる。このため、従来において、目標符号量を満たしつつ総符号量を使い切るための符号量制御方法が提案されている。この符号量制御方法では、等長化単位において発生する符号量を、複数の量子化ステップについて予め計算し、発生符号量が目標符号量を越えない範囲で適切な量子化ステップを決定するものであり、例えばフィードフォワード方式として提案されている(例えば、特許文献1参照。)。
【0009】
この従来のフィードフォワード方式等の符号量制御方法において、量子化ステップを大きくすると量子化が粗くなり総符号量が小さくなり、一方量子化ステップを小さくすると、量子化は細かくなり総符号量も多くなる。また量子化では離散値のみ取得することしかできないため、総符号量も離散的になる。すなわち、この量子化ステップをブロック単位で制御することにより、総符号量を制御することが可能となる。目標符号量を満たしつつ総符号量を使い切るためには、目標符号量以下であり、かつ一番小さな量子化ステップをブロック毎に選択する必要がある。
【0010】
ちなみにこのDCT係数を、ブロック単位で決められた量子化ステップにより量子化するフィードフォワード方式は、画像の圧縮・伸張の過程において何らかの歪みが付加されるため、完全にもとの画像品質を保つことはできない。このため、理想的には、例えばDPCMのように、圧縮・伸張の過程を経てもとの情報を保存可能な可逆符号化(Lossless)方式を採用することにより、画質の劣化を防止する必要があった。
【0011】
【特許文献1】
国際公開公報WO96/28937
【0012】
【発明が解決しようとする課題】
ところで、上述した可逆符号化方式を採用した場合に、設定された目標符号量を越えないような符号量制御を実現することができない場合があるため、フィードフォワード方式と可逆符号化方式を組み合わせ、目標符号量を越えないようにフレーム総符号量を使い切る必要がある。
【0013】
しかしながら、ブロック毎に各方式を効率良く選択することができず、目標符号量を参照しつつ、フレーム全体の総符号量を制御することができないという問題点があった。
【0014】
そこで本発明は上述した実情に鑑みて提案されたものであり、各ブロック毎にフィードフォワード方式、或いは可逆符号化方式を効率よく選択することにより、フレーム全体の総符号量を効率良く制御可能な画像圧縮符号化装置及び方法、プログラムを提案することを目的とする。
【0015】
【課題を解決するための手段】
本発明を適用した画像圧縮符号化装置は、上述した問題点を解決するために、入力画像信号を夫々異なる量子化ステップにより量子化する第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を等長化単位の総符号量に応じて上記符号化方式選択単位で選択し、これを符号化する画像圧縮符号化装置において、上記第1の圧縮方式又は上記第2の圧縮方式のうちいずれか一方を符号化方式選択単位毎に選択し、当該選択した圧縮方式についてセレクト信号を発信する選択手段と、上記発信されたセレクト信号に応じて、上記第1の圧縮方式による符号量、或いは上記第2の圧縮方式による符号量を取り込む切替手段と、上記切替手段を介して取り込まれた符号量を符号化方式選択単位毎に加算することにより符号化方式選択単位の総符号量を演算する演算手段と、上記量子化ステップ毎に演算された総符号量を、等長化単位の目標符号量に近づくように制御する制御手段とを備える。
【0016】
また、本発明を適用した画像圧縮符号化方法は、上述した問題点を解決するために、入力画像信号を夫々異なる量子化ステップにより量子化する第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を等長化単位の総符号量に応じて符号化方式選択単位で選択し、これを符号化する画像圧縮符号化方法において、上記第1の圧縮方式又は上記第2の圧縮方式のうちいずれか一方を符号化方式選択単位毎に選択し、当該選択した圧縮についてセレクト信号を発信し、上記発信されたセレクト信号に応じて、上記第1の圧縮方式による符号量、或いは上記第2の圧縮方式による符号量を取り込み、上記切替手段を介して取り込まれた符号量を符号化方式選択単位毎に加算することにより等長化単位の総符号量を演算し、上記量子化ステップ毎に演算された総符号量を、等長化単位の目標符号量に近づくように制御する。
【0017】
また、本発明を適用したプログラムは、上述した問題点を解決するために、入力画像信号を夫々異なる量子化ステップにより量子化する第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を等長化単位の総符号量に応じて符号化方式選択単位で選択し、これを符号化することをコンピュータに実行させるためのプログラムにおいて、上記第1の圧縮方式又は上記第2の圧縮方式のうちいずれか一方を符号化方式選択単位毎に選択し、当該選択した圧縮についてセレクト信号を発信し、上記発信されたセレクト信号に応じて、上記第1の圧縮方式による符号量、或いは上記第2の圧縮方式による符号量を取り込み、上記切替手段を介して取り込まれた符号量を符号化方式選択単位毎に加算することにより等長化単位の総符号量を演算し、上記量子化ステップ毎に演算された総符号量を、等長化単位の目標符号量に近づくように制御することをコンピュータに実行させる。
【0018】
【発明の実施の形態】
以下、本発明の実施の形態について説明する。
【0019】
本実施の形態に係る画像圧縮符号化装置は、入力された画像信号を、例えばDCT(Discrete Cosine Transform)変換した上で量子化することにより非可逆的な画像圧縮を実現し、或いは入力された画像信号を、例えばDPCM(Differential Pulse Code Modulation)等に基づき可逆的な符号化を実現する。
【0020】
画像圧縮符号化装置1には、図1に示すように端子11を介して輝度信号Y、色差信号Pb,Prからなる画像信号が入力される。ブロック分割部12は、入力された1フレームの画像信号を、符号化方式選択単位で選択し、本線系2及び予測系4へ送信する。この符号化方式選択単位とは、例えば8×8のブロック単位、16×16のマクロブロック単位、スライス単位、又は複数の画素からなる画像領域に分割する場合を示すが、以下では、8×8のブロック単位で分割した場合を例にとり説明する。
【0021】
本線系2は、FIFO(First In First Out)メモリ21,DCT部22,FIFOメモリ23,二分探索部24,量子化部25,第1の可変長符号化部26からなるDCTパスと、FIFOメモリ27,DPCM部28,第2の可変長符号化部29からなるDPCMパスと、セレクタ30と、バッファ31とを備える。
【0022】
先ずDCTパスについて説明する。本線系2に供給されたデータは、予測系4から後述するセレクト信号と符号量が供給されるまでのインターバルを調整するためにFIFOメモリ21に一時格納される。このFIFOメモリ21に格納されたデータは、DCT部22及びFIFOメモリ27へ供給される。
【0023】
DCT部22は、8×8のブロック毎にDCTを施すことによりDCT係数を生成し、FIFOメモリ23及び二分探索部24へ送信する。FIFOメモリ23に一時格納されたDCT係数は量子化部25へ出力される。量子化部25は、DCT部22から入力されたDCT係数を、ブロック単位で二分探索部24により決められた量子化ステップにより量子化する。量子化部25は、この量子化されたデータ(以下、量子化レベルと称する)を第1の可変長符号化部26へ供給する。第1の可変長符号化部26は、量子化部25から供給された量子化レベルを、例えば2次元ハフマン符号化や、算術符号化等の方法により可変長符号化する。ちなみに本実施の形態に係る画像圧縮符号化装置1では、この第1の可変長符号化部26を省略した構成を適用してもよい。
【0024】
すなわち、このDCTパスを経ることにより、二分探索部24を介して各ブロック毎に供給される量子化ステップに基づき、画像信号を符号化することができるため、1フレームの総符号量が目標符号量を越えないように制御することが可能となる。この二分探索部24を用いる方法は、一例に過ぎず、他の方式を用いてもよい。
【0025】
次にDPCMパスについて説明をする。DPCM部28は、上述したDCTパスにおける遅延素子的な役割を担うFIFOメモリ27上に格納されたデータが供給され、当該データに対してブロック毎にDPCMを施して第2の可変長符号化部29へ供給する。第2の可変長符号化部29は、DPCMが施されたデータに対して、例えば2次元ハフマン符号化や、算術符号化等の方法により可変長符号化する。なお、この第2の可変長符号化部29における可変長符号化の方法は、上述の第1の可変長符号化部26における方法と同様である必要はない。また、本実施の形態に係る画像圧縮符号化装置1では、この第2の可変長符号化部29を省略した構成を適用してもよい。
【0026】
セレクタ30は、第1の可変長符号化部26、又は第2の可変長符号化部29により可変長符号化された各種データを適宜切り替え、当該切替情報とともにバッファ31へ出力する。ちなみに、このセレクタ30は、予測系4から供給されるセレクト信号に基づき切り替えられる。
【0027】
すなわち、このDPCMパスを経ることにより、何らかの歪みが付加されることなく、完全にもとの画像品質を保つことができるように可逆符号化することができる。
【0028】
予測系4は、DCT部41,n個の量子化器42−1〜42−n,n個の符号量変換器43−1〜43−nからなるDCTパスと、DPCM部45,符号量変換器46からなるDPCMパスと、演算部44とを備える。この予測系4は、等長化単位で発生する総符号量を計算し、本線系2が目標符号量を越えない範囲で適切なDCTパス或いはDPCMパスを選択できるように設けられたものである。この等長化単位とは、本実施の形態では1フレームを意味するが、係る場合に限定されるものではなく、例えば8×8のブロック、16×16のマクロブロック、それらの組み合わせたスライス単位としてもよい。またこの等長化単位は、複数の画素からなるいかなる画像領域であってもよく、さらにフレームを組み合わせたGOP単位としてもよい。
【0029】
先ずDCTパスについて説明をする。このDCTパスは、例えば入力された画像信号をDCT変換した上で量子化するDCT符号化方式に基づき、非可逆的な画像圧縮を実現するものであり、DPCMパスと比較して高圧縮率でロスが大きい。またこのDCTパスにおける変換符号化は、DCTに限定されるものではなく、他の変換符号化方式を用いてもよい。またこのDCTパスでは、8×8のブロック単位で変換符号化を行うが、かかる場合に限定されるものではなく、上述のマクロブロック単位でもよいし、また複数の画素からなる画像領域を一単位とするものであってもよい。
【0030】
DCT部41は、DCT部22と同様に、8×8のブロック毎にDCTを施すことによりDCT係数を生成し、各量子化器42−1〜42−nへ送信する。量子化器42−1〜42−nは、DCT部41から供給されたDCT係数を夫々異なる量子化ステップで量子化する。これにより、生成したDCT係数をn個の量子化ステップにより試すことが可能となる。また、各量子化器42−1〜42−nは、生成した量子化レベルを夫々符号量変換器43−1〜43−nへ供給する。符号量変換器43−1〜43−nは、供給される量子化レベルを夫々ブロック毎の符号量に変換し、演算部44へ送信する。即ち、この符号量変換器43−1〜43−nにおける符号量の変換では、量子化器42−1〜42−nにより生成された量子化レベルを可変長符号化して、その符号長を出力するようにしてもよい。
【0031】
次にDPCMパスについて説明をする。このDPCMパスは、例えばDPCMのように、圧縮、伸張の過程を経てもとの情報を保存可能な可逆符号化(Lossless)方式に基づき、可逆的な画像圧縮を実現するものであり、DCTパスと比較して低圧縮率でロスが小さい。またこのDPCMパスでは、8×8のブロック単位で変換符号化を行うが、かかる場合に限定されるものではなく、上述のマクロブロック単位でもよいし、また複数の画素からなる画像領域を一単位とするものであってもよい。
【0032】
DPCM部45は、ブロック分割部12からデータを受給し、これらについてブロック毎にDPCMを施し、符号量変換器46へ送信する。符号量変換器46は、これらDPCM化された信号についてブロック毎に符号化して演算部44へ送信する。即ち、この符号量変換器46においても、DPCM化された信号を可変長符号化して、その符号長を出力するようにしてもよい。
【0033】
演算部44には、符号量変換器43−1〜43−nから異なる量子化ステップで処理された符号量が入力され、また符号量変換器46からDPCM処理された符号量が入力される。演算部44は、入力される各ブロック毎の符号量に基づき、各ブロック毎の割当符号量とセレクト信号とを求めて本線系2へ出力する。ちなみにこの演算部44において等長化単位の総符号量を求める場合には、ブロック毎の符号量の累積値を求める必要があるため、1フレーム分の計算時間を要することになる。
【0034】
次に、この演算部44による割当符号量の算出について説明をする。図2は、演算部44の構成例を示している。演算部44は、n個の比較部101−1〜101−nと、n個のセレクタ102−1〜102−nと、n個のメモリ103−1〜103−nと、n個の加算器104−1〜104−nと、n個の累積回路105−1〜105−nと、演算処理部106とを備える。
【0035】
比較部101−1〜101−nは、k番目のブロックに関して、DCTパスを介して符号量変換器43−1〜43−nから異なる量子化ステップで処理された符号量length(1,k)〜length(n,k)が入力され、またDPCMパスを介して符号量変換器46からDPCM処理された符号量dpcm(k)が入力される。例えば、比較部101−1には、符号量変換部43−1からの符号量length(1,k)と、DPCM処理された符号量dpcm(k)が入力される。この比較部101−1〜101−nは、DCTパスを介して入力された符号量length(1,k)〜length(n,k)、とDPCMパスを介して入力された符号量dpcm(k)との間で、それぞれ小さい方を選択する。そして、この比較部101−1〜101−nは、DCTパスを介して入力された符号量length(1,k)〜length(n,k)、及びDPCMパスを介して入力された符号量dpcm(k)のうち、いずれを選択したかを示すセレクト信号を出力する。
【0036】
セレクタ102−1〜102−nは、比較部101−1〜101−nから供給されるセレクト信号に応じて、DCTパスから供給される符号量或いはDPCMパスから供給される符号量を夫々選択する。例えば、DCTパスを選択した旨の情報がセレクト信号に含まれていた場合には、セレクタ102−1〜102−nは、DCT側にONされることとなる。このセレクタ102−1〜102−nにより選択された符号量は、そのままメモリ103−1〜103−n、加算器104−1〜104−nへ供給される。
【0037】
メモリ103−1〜103−nは、各ブロック毎に、何れの符号量を選択したかを識別するためのセレクト信号と、セレクタ102−1〜102−nにおいて選択された符号量を格納する。すなわち等長化単位、例えば1フレーム分の処理が終了した段階で、各メモリ103−1〜103−nには、ブロック単位で選択した符号量とセレクト信号が、1フレーム分格納されている状態となっている。換言すれば、各メモリ103−1〜103−nには、ブロック単位で選択した符号量として、DCTパスを介して入力された符号量length(1,k)〜length(n,k)、又はDPCMパスを介して入力された符号量dpcm(k)のうち、いずれかが格納されている状態となる。従って、各メモリ103−1〜103−nを合わせると、ブロック単位で選択した符号量とセレクト信号が、量子化ステップ数であるn個分格納されている状態となっている。
【0038】
加算器104−1〜104−n及び累積回路105−1〜105−nは、セレクタ102−1〜102−nにより選択された符号量を1フレーム分、順次累積加算する。この1フレーム分加算した符号量を夫々総符号量total(1)〜total(n)とする。累積回路105−1〜105−nは、得られた総符号量total(1)〜total(n)を順次演算処理部106へ送信する。
【0039】
演算処理部106は、各累積回路105−1〜105−nから夫々総符号量total(1)〜total(n)を受信した場合に、以下の図3に示す手順を実行する。先ずステップS1において、演算処理部106は、等長化単位の目標符号量とこれらの総符号量total(1)〜total(n)を比較する。そして、この演算処理部106は、目標符号量を超える総符号量のうち、目標符号量に最も近い総符号量total(j−1)を特定する。即ち、この総符号量total(j−1)は、目標符号量の直上の符号量であり、換言すれば、目標符号量を超える総符号量のうち最小の符号量からなる。また、この演算処理部106は、目標符号量以下の総符号量のうち、目標符号量に最も近い総符号量total(j)を特定する。即ち、この総符号量total(j−1)は、目標符号量の直下の符号量であり、換言すれば、目標符号量以下の総符号量のうち最大の符号量からなる。
【0040】
次にステップS2へ移行し、演算処理部106は、この識別したtotal(j−1)と、total(j)に基づき、メモリ103−j−1、メモリ103−jに格納されている各ブロック毎の符号量とセレクト信号を読み出す。なお、メモリ103−j−1には、k番目のブロックの符号量として、DCTパスを介して入力された符号量length(j−1,k)、又はDPCMパスを介して入力された符号量dpcm(k)が格納されている。このため、このステップS2において、メモリ103−j−1から読み出される符号量は、length(j−1,k)又はdpcm(k)となる。またメモリ103−jには、k番目のブロックの符号量として、DCTパスを介して入力された符号量length(j,k)、又はDPCMパスを介して入力された符号量dpcm(k)が格納されている。このため、このステップS2におてメモリ103−jから読み出される符号量は、length(j,k)又はdpcm(k)となる。ちなみに、以後のステップでは、メモリ103−j−1、メモリ103−jから読み出した各ブロック毎の符号量とセレクト信号を用いる。
【0041】
次にステップS3へ移行し、この演算処理部106は、線形補間を用いることにより、各ブロックに対する割当符号量assign(k)を算出する。
【0042】
ここで、等長化単位の目標符号量をMとし、またメモリ103−j−1から読み出された符号量がlength(j−1,k)であり、メモリ103−jから読み出された符号量がlength(j,k)である場合において、割当符号量assign(k)は、以下の式(1)により求められる。
assign(k)={(total(j−1)−M)*length(j,k)+(M−total(j))*length(j−1,k)}/{total(j−1)−total(j)}・・・・・・(1)
またメモリ103−j−1から読み出された符号量がdpcm(k)であり、メモリ103−jから読み出された符号量がlength(j,k)である場合において、割当符号量assign(k)は、以下の式(2)により求められる。
assign(k)={(total(j−1)−M)*length(j,k)+(M−total(j))*dpcm(k)}/{total(j−1)−total(j)}・・・・・・・・・(2)
またメモリ103−j−1から読み出された符号量がdpcm(k)であり、メモリ103−jから読み出された符号量がdpcm(k)である場合において、割当符号量assign(k)は、以下の式(3)により求められる。
assign(k)={(total(j−1)−M)*dpcm(k)+(M−total(j))*dpcm(k)}/{total(j−1)−total(j)}・・・・・・・・・・・(3)
上述のように各ブロック毎に割り当てる割当符号量assign(k)を求めることにより目標符号量に対して符号量のロスが少ない、高効率の符号量制御を実現することができる。
【0043】
次にステップS4へ移行し、演算処理部106は、各ブロック毎に求めたassign(k)を、最後に各ブロック毎のdpcm(k)と比較する。その結果、assign(k)がdpcm(k)以上であれば、ステップS5へ移行し、またassign(k)がdpcm(k)を下回る場合には、ステップS6へ移行する。
【0044】
ステップS5へ移行した場合には、ステップ当該ブロックkについて、画像品質の高いDPCMパスを介して符号化しても、総符号量を目標符号量以下に抑えることができることを意味する。かかる場合において、演算処理部106は、セレクト信号をDPCM側に切り替え、assign(k)をdpcm(k)に置き換えて出力する。
【0045】
ステップS6へ移行した場合には、当該ブロックkについては上述の如くassign(k)を求めることにより見積もった符号量よりも、DPCMパスによる符号量の方が多いため、DCT側を選択した方が、総符号量を目標符号量に対して低く抑えることができる。このため演算処理部106は、セレクト信号をDCT側にして、求めたassign(k)をそのまま出力する。
【0046】
この演算処理部106において、このassign(k)と、dpcm(k)を、DCTパス又はDPCMパスの何れを選択するかについての優先度と考えることができる。この優先度に基づいて、DCTパス或いはDPCMパスの何れかを選択するものであれば、いかなる選択方法を適用してもよい。例えば、この優先度が等しい場合には、DCTパス或いはDPCMパスの何れかを選択するようにしてもよいし、DPCMパスを選択するようにしてもよい。
【0047】
またステップS4における優先度は、assign(k)、dpcm(k)に基づく場合に限定されるものではない。即ち、ステップS4における比較において、所定の優先度に基づくものであれば、例えば、assign(k)がdpcm(k)以上であっても、ステップS6へ移行する場合もある。
【0048】
予測系4からは、この演算処理部から出力される割当符号量assign(k)と、セレクト信号が出力される。この出力された割当符号量assign(k)は、二分探索部24へ供給される。
【0049】
二分探索部24は、セレクト信号がDCT側になっている場合において、ブロックの発生符号量が目標符号量に収まるように量子化ステップを決定する。二分探索部24は、この量子化ステップを決定する際に、特願平4−110858号公報に提案した方法を採用しても良い。発生符号量が量子化ステップの増大に対して単調減少することを利用して二分探索法によって量子化ステップを決定する。この決定された量子化ステップにより、量子化器25により量子化される。なお二分探索法は一例に過ぎず、ブロックの発生符号量が目標符号量に収まるように量子化ステップが決定されるのであればどのような方式であってもよい。
【0050】
一方、セレクト信号がDPCM側に切り替わっている場合には、セレクタ30がDPCMパスに切り替えられ、当該ブロックについては、DPCMを介した符号化が行なわれることになる。
【0051】
なお、演算処理部106は、それぞれ目標符号量の直上、直下にあるtotal(j−1)と、total(j)を識別することができない場合には、total(j−1)と、total(j)の間に目標符号量を挟み込むいわゆる内挿により割当符号量assign(k)を求めることができない。かかる場合には、目標符号量を挟まず、かつ目標符号量に最も近い、二つのtotal(j−1)とtotal(j)を用いるいわゆる外挿により、assign(k)を求める。かかる外挿においても、割当符号量assign(k)は、上式(1)〜(3)を用いて計算する。しかしながら、この場合においてDPCMパスの符号量が小さいという理由で、DPCMパスを介して符号化しても、却って符号量が余る場合がある。かかる場合には、図4に示すフローチャートの如くassign(k)と総符号量total_tmp(assign(k)の1フレーム分の総数)を、total(j−1)及びtotal(j)の2つのうち、目標符号量からより遠い方と置き換えてassign(k)を計算するようにしてもよい。
【0052】
この図4に示すフローチャートにおいて、先ずステップS11で処理ループllを初期値に設定し、ステップS12へ移行する。ステップS12では、目標符号量に最も近いtotal(j−1)とtotal(j)を用いてassign(k)を上式により計算し、ステップS13へ移行する。ステップS13において全てのブロックにつきassign(k)を求めることにより、1フレーム分の総符号量total_tmpを求めることができたか判定する。総符号量total_tmpを求められている場合のみステップS14へ移行し、それ以外はステップS12の処理を繰り返す。
【0053】
次にステップS14へ移行し、現在のループllが処理ループの総数に達したか判断する。ここで現在のループllが処理ループの総数に達した場合は、繰り返し処理の末、所望のassign(k)が求められたことが示され、ループから抜ける。一方、現在のループllが処理ループの総数に達していない場合には、ステップS15へ移行する。なお、この処理ループの総数は、例えば5回等任意に設定することができる。
【0054】
ステップS15において、抽出したtotal(j−1)とtotal(j)において、いずれが目標符号量に近いかを判定する。具体的には、abs(M−total(j))とabs(M−total(j−1))とを比較し、いずれが大きいか判定する。その結果、abs(M−total(j))>abs(M−total(j−1))の場合には、変数jjをjに置き換える。一方、abs(M−total(j))≦abs(M−total(j−1))の場合には、変数jjをj−1に置き換える(なおこのabs()は絶対値を意味する)。すなわち、抽出したtotal(j−1)とtotal(j)のうち、総符号量Mと遠い方の値が選択され、変数jjにそれぞれ代入されることとなる。
【0055】
次にステップS16において、1フレーム分の総符号量total_tmpを、total(jj)とする。これにより、1フレーム分の総符号量total_tmpを、総符号量Mと遠い方のtotal(j−1)或いはtotal(j)に置き換えることができる。
【0056】
次に、ステップS17へ移行し、各ブロックについて求めたassign(k)を、各ブロック毎にlength(jj,k)へ割り振る。これにより、次のループllへ移行して再度assign(k)を求める場合には、値の割り振られたlength(jj,k)を参酌することが可能となる。
【0057】
以上詳細に説明したように、本実施の形態に係る画像符号化圧縮装置1は、ブロック毎に、DCTパス或いはDPCMパスからの符号量を効率良く、目標符号量を満たすように選択することができる。また、DPCMパスからの符号量を優先的に選択することにより、画像品質の劣化を防止することができる。これによりVTR等のような記録メディアの容量をオーバーすることなく、効率的な符号量制御を実現でき、更には画像の圧縮過程における歪みを低減させることが可能となる。また、二分探索法を用いて量子化ステップを決定することができるため、予測部4における量子化ステップの数を抑えることができ、回路構成を簡単にできる分においてハード的に有利となる。
【0058】
なお、本実施の形態は、上記記載に限定されるものではない。例えば図5に示す画像圧縮符号化装置5のように、二分探索部等の探索部を用いない構成にも適用可能である。以下、画像圧縮符号化装置5の詳細を説明する。なお、上述した画像圧縮符号化装置1と同一の回路構成要素は、画像圧縮符号化装置1の説明を引用し、説明を省略する。
【0059】
この画像圧縮符号化装置5は、端子11を介して輝度信号Y、色差信号Pb,Prからなる画像信号が入力される。ブロック分割部12は、入力された1フレームの画像信号を例えば8×8のブロックに分割し、本線系2及び予測系4へ送信する。
【0060】
本線系2は、FIFO(First In First Out)メモリ21,DCT部,量子化部35,第1の可変長符号化部26からなるDCTパスと、DPCM部28,第2の可変長符号化部29からなるDPCMパスと、セレクタ30と、バッファ31とを備える。
【0061】
量子化部35は、DCT部22から入力されたDCT係数を、ブロック単位で決定された量子化ステップに基づき量子化する。この量子化部35は、この量子化されたデータ(以下、量子化レベルと称する)を可変長符号化部26へ供給する。
【0062】
セレクタ30は、第1の可変長符号化部26、及び/又は第2の可変長符号化部29により可変長符号化された各種データを適宜切り替え、当該切替情報とともにバッファ31へ出力する。ちなみに、このセレクタ30は、予測系4から供給されるセレクト信号に基づき切り替えられる場合もある。
【0063】
予測系4は、DCT部41,n個の量子化器42−1〜42−n,n個の符号量変換器43−1〜43−nからなるDCTパスと、DPCM部45,符号量変換器46からなるDPCMパスと、演算部48とを備える。ちなみに、この予測系4におけるDCTパスの処理段数nは、量子化ステップの総数に相当する。これは二分探索法を採用する画像圧縮符号化装置1と比較して多くの量子化ステップにより予測を試みることができるため、精度の高い量子化コントロールを実現するためである。
【0064】
演算部48は、符号量変換器43−1〜43−nから異なる量子化ステップで処理された符号量が入力され、また符号量変換器46からDPCM処理された符号量が入力される。演算部48は、これらの入力される各ブロック毎の符号量に基づき、各ブロック毎の割当符号量とセレクト信号とを求めて、本線系2へ出力する。本線系2に出力された割当符号量は量子化部35へ送られ、またセレクト信号はセレクタ30へ送られる。ちなみにこの演算部48において、例えば1フレーム分の総符号量を求める場合にブロック毎の符号量の累積値を求める必要があるため、1フレーム分の計算時間を要することになる。
【0065】
次に、この演算部48による割当符号量の算出について説明をする。図6は、演算部48の構成例を示している。演算部48は、n個の比較部201−1〜201−nと、n個のセレクタ202−1〜202−nと、n個のメモリ203−1〜203−nと、n個の加算器204−1〜204−nと、n個の累積回路205−1〜205−nと、演算処理部206とを備える。
【0066】
比較部201−1〜201−nは、DCTパスを介して符号量変換器43−1〜43−nから異なる量子化ステップで処理された符号量length(1,k)〜length(n,k)が入力され、またDPCMパスを介して符号量変換器46からDPCM処理された符号量dpcm(k)が入力される。例えば、比較部201−1には、符号量変換部43−1からの符号量length(1,k)と、DPCM処理された符号量dpcm(k)が入力される。この比較部201−1〜201−nは、DCTパスを介して入力された符号量length(1,k)〜length(n,k)、及びDPCMパスを介して入力された符号量dpcm(k)について小さい方を選択し、選択した情報を含むセレクト信号を出力する。
【0067】
セレクタ202−1〜202−nは、比較部201−1〜201−nから供給されるセレクト信号に応じて、DCTパスから供給される符号量或いはDPCMパスから供給される符号量を夫々選択する。例えば、DCTパスを選択した旨の情報がセレクト信号に含まれていた場合には、セレクタ202−1〜202−nは、DCT側にONされることとなる。このセレクタ202−1〜202−nにより選択された符号量は、そのままメモリ203−1〜203−n、加算器204−1〜204−nへ供給される。
【0068】
メモリ203−1〜203−nは、各ブロック毎に、セレクト信号と符号量を格納する。すなわち1フレーム分の処理が終了した段階で、このメモリ203−1〜203−nには、ブロック単位で選択した符号量とセレクト信号が、量子化ステップ数であるn個分格納されている状態となっている。
【0069】
加算器204−1〜204−n及び累積回路205−1〜205−nは、セレクタ202−1〜202−nにより選択された符号量を1フレーム分、順次累積加算する。この1フレーム分加算した符号量を夫々総符号量total(1)〜total(n)とする。累積回路205−1〜205−nは、得られた総符号量total(1)〜total(n)を順次演算処理部206へ送信する。
【0070】
演算処理部206は、各累積回路205−1〜205−nから夫々総符号量total(1)〜total(n)を受信する。この演算処理部206は、1フレーム分の目標符号量とこれらの総符号量total(1)〜total(n)を比較し、目標符号量以上である総符号量total(j−1)と、目標符号量以下である総符号量total(j)とを特定する。すなわち、このtotal(j−1)とtotal(j)は、目標符号量を挟むように存在するものを指し、jは、total(j−1)>目標符号量を満たすjのうち、最大のものを示す。
【0071】
演算処理部206は、演算した総符号量に基づき、n個の量子化ステップを参照しつつ、ブロック毎に最適な符号量を見積もる。そして当該ブロック毎に見積もった符号量に基づき、assign(k)を決定して上述した量子化部35へ送信する。
【0072】
以上詳細に説明したように、本実施の形態に係る画像符号化圧縮装置5は、ブロック毎に、複数の量子化ステップにより量子化されたDCTパス或いはDPCMパスからの符号量を効率良くまた目標符号量を満たすように選択することができる。また、この演算処理部106において、assign(k)、dpcm(k)をいわゆる優先度とし、この優先度が同レベルの場合には、DPCMパスを優先的に選択することにより、画像品質の劣化を防止することができる。これによりVTR等のような記録メディアの容量をオーバーすることなく、効率的な符号量制御を実現でき、画像の圧縮過程における歪みを低減させることが可能となり、更にDCTパスにより符号化する際に、精度の良い量子化コントロールを期待することができる。なお、本実施の形態では、優先度に基づいて選択する場合に限定されるものではない。
【0073】
なお、本実施の形態は、更に図7に示す画像圧縮符号化装置6のように、DPCMについて量子化を伴う構成にも適用可能である。以下、画像圧縮符号化装置6の詳細を説明する。なお、上述した画像圧縮符号化装置1と同一の回路構成要素は、画像圧縮符号化装置1の説明を引用し、説明を省略する。
【0074】
この画像圧縮符号化装置6は、端子11を介して輝度信号Y、色差信号Pb,Prからなる画像信号が入力される。ブロック分割部12は、入力された1フレームの画像信号を例えば8×8のブロックに分割し、本線系2及び予測系4へ送信する。
【0075】
本線系2は、FIFO(First In First Out)メモリ21,DCT部22,FIFOメモリ23,二分探索部24,量子化部25,第1の可変長符号化部26からなるDCTパスと、FIFOメモリ27,量子化部35,DPCM部28,第2の可変長符号化部29,二分探索部36からなるDPCMパスと、セレクタ30と、バッファ31とを備える。
【0076】
量子化部35は、FIFOメモリ27に格納されたデータを受給し、ブロック単位で二分探索部36により決められた量子化ステップにより量子化する。量子化部35は、この量子化されたデータをDPCM部28へ供給する。
【0077】
すなわち、この量子化を伴うDPCMパスを経ることにより、画像の圧縮の過程において何らかの歪みが付加されることになる。このためDCTパスとDPCMパスのいずれかを選択する場合には、画像圧縮符号化装置1と同様に、符号量の小さい方を優先することに加え、圧縮の過程における歪みが小さい方をも優先的に選択する必要がある。具体的には、圧縮による歪みは、量子化により左右されるものであり、DCTとDPCMそれぞれに対して量子化ステップに応じて生じる。このため予測系4は、量子化を伴うDCTパスからの符号量と、同じく量子化を伴うDPCMパスからの符号量に加え、画像の歪みを比較して、本線系2にセレクト信号を送る必要がある。
【0078】
かかる予測系4の実現例について以下説明する。この予測系4は、図7に示すように、DCT部41,n個の量子化器42−1〜42−n,n個の符号量変換器43−1〜43−nからなるDCTパスと、m個の量子化器51−1〜51−m,m個のDPCM部52−1〜52−m,m個の符号量変換部53−1〜53−mからなるDPCMパスと、演算部54とを備える。
【0079】
m個の量子化器51−1〜51−mは、ブロック単位で画像信号を受給し、夫々異なる量子化ステップで量子化する。すなわち、DPCMパスにおいてもm個の量子化ステップによりサンプリングすることが可能となる。
【0080】
DPCM部52−1〜52−mは、量子化された画像信号についてブロック毎にDPCMを施し、符号量変換部53−1〜53−mへ供給する。符号量変換部53−1〜53−mは、これらのDPCM化された信号についてブロック毎に符号化して演算部54へ出力する。
【0081】
演算部54は、DCTパス側からは、符号量変換器43−1〜43−nから異なる量子化ステップで処理された符号量等が入力され、DPCMパス側からは、異なる量子化ステップにより量子化されDPCM処理された符号量等が入力される。演算部54は、これらの入力される各ブロック毎の符号量や画像の歪みを比較して、各ブロック毎の割当符号量とセレクト信号とを求め、本線系2へ出力する。なお、この予測系4においてDPCM部52−1〜52−mと、量子化器51−1〜51−mとを入れ換えて構成してもよい。これにより、先ずDPCM部52−1〜52−mにおいて、DPCM化された信号を夫々異なる量子化ステップで量子化することができる。
【0082】
次に、この演算部54による割当符号量の算出について説明をする。図8は、演算部54の構成例を示している。演算部54は、n個の比較部301−1〜301−nと、n個のセレクタ302−1〜302−nと、n個のメモリ303−1〜303−nと、n個の加算器304−1〜304−nと、n個の累積回路305−1〜305−nと、演算処理部306とを備える。
【0083】
比較部301−1〜301−nは、DCTパスを介して符号量変換器43−1〜43−nから異なる量子化ステップで処理された符号量length(1,k)〜length(n,k)が入力され、またDPCMパスを介して符号量変換器53−1〜53−mからDPCM処理された符号量dpcm(1,k)〜dpcm(m,k)が入力される。なお、この比較部301−1〜301−nは、DCTパスにおける符号量と、当該DCTパスにおける符号量よりも歪みが小さくなるDPCMパスにおける符号量とを比較するようにする。ちなみに図8に示す例において、比較部301−1や比較部301−2に入力されるdpcm(1,k)は、length(1,k)やlength(2,k)よりも歪みが小さく、また比較部301−3に入力されるdpcm(3,k)は、length(3,k)よりも歪みが小さい。
【0084】
比較部301−1〜301−nは、この入力されたDCTパスからの符号量と、DPCMパスからの符号量について小さい方を選択し、選択した情報を含むセレクト信号を出力する。これにより、画像の圧縮による歪みを抑えつつ、目標符号量を満たすように、セレクト信号を出力することが可能となる。
【0085】
セレクタ302−1〜302−nは、比較部301−1〜301−nから供給されるセレクト信号に応じて、DCTパスから供給される符号量或いはDPCMパスから供給される符号量を夫々選択する。例えば、DCTパスを選択した旨の情報がセレクト信号に含まれていた場合には、セレクタ302−1〜302−nは、DCT側にONされることとなる。このセレクタ302−1〜302−nにより選択された符号量は、そのままメモリ303−1〜303−n、加算器304−1〜304−nへ供給される。
【0086】
メモリ303−1〜303−nは、各ブロック毎に、セレクト信号と符号量を格納する。すなわち1フレーム分の処理が終了した段階で、このメモリ303−1〜303−nには、ブロック単位で選択した符号量とセレクト信号が、量子化ステップ数であるn個分格納されている状態となっている。
【0087】
加算器304−1〜304−n及び累積回路305−1〜305−nは、セレクタ302−1〜302−nにより選択された符号量を1フレーム分、順次累積加算する。この1フレーム分加算した符号量を夫々総符号量total(1)〜total(n)とする。累積回路305−1〜305−nは、得られた総符号量total(1)〜total(n)を順次演算処理部306へ送信する。
【0088】
演算処理部306は、各累積回路305−1〜305−nから夫々総符号量total(1)〜total(n)を受信する。この演算処理部306は、1フレーム分の目標符号量とこれらの総符号量total(1)〜total(n)を比較し、目標符号量以上である総符号量total(j−1)と、目標符号量以下である総符号量total(j)とを特定する。これらの特定した符号量に基づく割当符号量assign(k)の計算については、画像圧縮符号化装置1における演算部44の説明を引用し、説明を省略する。
【0089】
このようにして予測系4からは、この演算処理部から出力される割当符号量assign(k)と、セレクト信号が出力される。この出力された割当符号量assign(k)は、二分探索部24,36へ供給される。
【0090】
二分探索部24,36は、セレクト信号がDCT側になっている場合において、ブロックの発生符号量が目標符号量に収まるように量子化ステップを決定する。決定された量子化ステップに基づき、本線系2における量子化部25,35はブロック単位で量子化を施す。
【0091】
なおこの画像圧縮符号化装置6は、図7に示す構成に限定されるものではなく、例えば図9に示すように、二分探索法を用いない構成にも適用可能である。
【0092】
この図9に示す画像圧縮符号化装置6の例では、量子化部35は、DCT部22から入力されたDCT係数を、ブロック単位で決定された量子化ステップに基づき量子化する。この量子化部35は、この量子化されたデータを可変長符号化部26へ供給する。
【0093】
演算処理部306は、演算した総符号量に基づき、n個の量子化ステップを参照しつつ、ブロック毎に最適な符号量を見積もる。そして当該ブロック毎に見積もった符号量に基づき、量子化ステップを決定して上述した量子化部35へ送信する。これにより、二分探索法を採用する図7に示す画像圧縮符号化装置6と比較して多くの量子化ステップにより予測を試みることができるため、精度の高い量子化コントロールを実現することが可能となる。
【0094】
以上詳細に説明したように、本実施の形態に係る画像符号化圧縮装置6は、ブロック毎に、複数の量子化ステップにより量子化されたDCTパス或いはDPCMパスからの符号量を効率良くまた目標符号量を満たすように選択することができる。また、DPCMパスからの符号量を優先的に選択した場合には、画像品質の劣化を防止することができる。これによりVTR等のような記録メディアの容量をオーバーすることなく、効率的な符号量制御を実現でき、画像の圧縮過程における歪みを低減させることが可能となる。
【0095】
なお、本実施の形態は、画像圧縮符号化装置1,5,6に適用される場合に限定されるものではない。例えば、この画像圧縮符号化装置1,5,6の各構成要素を伝送路上に配設することにより、伝送路上においても、効率的な符号量制御を実現でき、画像の圧縮過程における歪みを低減させることが可能となる。
【0096】
なお、本実施の形態ではブロック毎にDCTを施すことによりDCT係数を生成することにより可逆的な画像圧縮を行うが、かかる場合に限定されるものではない。また、非可逆的な画像圧縮方式についてもDPCMに限定されるものではない。即ち、第1の圧縮方式と、第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式を用いるものであればよい。
【0097】
またこの第1の圧縮方式と第2の圧縮方式とを切り替えることができる画像圧縮符号化装置及び方法、プログラムに対しても適用可能である。
【0098】
この画像圧縮符号化装置は、第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を符号化方式選択単位で選択して画像信号を圧縮符号化する画像圧縮符号化装置において、上記第1の圧縮方式により得られる符号量、又は上記第2の圧縮方式により得られる符号量のいずれかを符号化方式選択単位毎に加算することにより、上記符号化方式選択単位の総符号量を演算する演算手段と、上記演算手段により演算された総符号量と、等長化単位における目標符号量とに基づき、上記第1の圧縮方式、或いは上記第2の圧縮方式を符号化方式選択単位毎に選択する選択手段と、上記選択手段によって選択された圧縮方式を用いて上記各符号化方式選択単位の画像信号を圧縮符号化する圧縮符号化手段とを備える。
【0099】
このような画像圧縮符号化装置において、上記第1の圧縮方式及び/又は上記第2の圧縮方式は、上記画像信号を夫々複数の異なる量子化ステップにより量子化する方式としてもよい。また、上記演算手段により演算された総符号量と、上記等長化単位における目標符号量とを比較し、当該比較結果に応じて上記第1の圧縮方式における量子化ステップを決定する決定手段をさらに備え、上記選択手段は、上記決定手段により決定された量子化ステップにより上記量子化する第1の圧縮方式、或いは上記第2の圧縮方式の一方を符号化方式選択単位毎に選択するようにしてもよい。上記選択手段は、上記第1の圧縮方式、或いは上記第2の圧縮方式を所定の優先度に基づいて選択するようにしてもよい。また上記選択手段は、上記第1の圧縮方式、或いは上記第2の圧縮方式の優先度が等しい場合には、上記第1の圧縮方式、或いは上記第2の圧縮方式のうちいずれか一方を選択するようにしてもよい。また、上記選択手段は、上記第2の圧縮方式を優先的に選択するようにしてもよい。また、上記第1の圧縮方式は、上記画像信号をDCT(Discrete Cosine Transform)変換し、上記DCT変換された画像信号を量子化する方式としてもよい。また上記第2の圧縮方式は、可逆符号化(Lossless)方式としてもよい。また、上記第2の圧縮方式は、上記画像信号をDPCM(Differential Pulse Code Modulation)によって符号化する方式としてもよい。また、上記演算手段は、上記第1の圧縮方式により得られる符号量、又は上記第2の圧縮方式により得られる符号量のうち小さい方の符号量を上記符号化方式選択単位毎に加算することにより、等長化単位の総符号量を演算してもよい。
【0100】
この画像圧縮符号化方法は、第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を上記符号化方式選択単位で選択して画像信号を圧縮符号化する画像圧縮符号化方法において、上記第1の圧縮方式により得られる符号量、又は上記第2の圧縮方式により得られる符号量のいずれかを上記符号化方式選択単位毎に加算することにより、上記符号化方式選択単位の総符号量を演算する演算工程と、上記演算工程において演算された総符号量と、上記等長化単位における目標符号量とに基づき、上記第1の圧縮方式、或いは上記第2の圧縮方式を符号化方式選択単位毎に選択する選択工程と、上記選択工程において選択された圧縮方式を用いて上記各符号化方式選択単位の画像信号を圧縮符号化する圧縮符号化工程とを有する。
【0101】
このような画像圧縮符号化方法において、上記第1の圧縮方式及び/又は上記第2の圧縮方式は、上記画像信号を夫々複数の異なる量子化ステップにより量子化する方式であり、上記演算した総符号量と、上記等長化単位における目標符号量とを比較し、当該比較結果に応じて上記第1の圧縮方式における量子化ステップを決定する決定工程をさらに備え、上記選択工程では、上記決定工程で決定された量子化ステップにより上記第1の圧縮方式、或いは上記第2の圧縮方式が、上記符号化方式選択単位毎に選択されるようにしてもよい。また、上記選択工程では、上記第1の圧縮方式、或いは上記第2の圧縮方式が所定の優先度に基づいて選択されるようにしてもよい。また、上記選択工程では、上記第1の圧縮方式、或いは上記第2の圧縮方式の優先度が等しい場合には、第1の圧縮方式或いは上記第2の圧縮方式のうちいずれか一方が選択されるようにしてもよい。また上記選択工程では、上記第2の圧縮方式が優先的に選択されるようにしてもよい。また、上記第1の圧縮方式は、上記画像信号をDCT(Discrete Cosine Transform)変換し、上記DCT変換された画像信号を量子化する方式としてもよい。また上記第2の圧縮方式は、可逆符号化(Lossless)方式により符号化する方式としてもよい。また、上記第2の圧縮方式は、入力画像信号をDPCM(Differential Pulse Code Modulation)によって符号化する方式としてもよい。また、上記演算工程では、上記第1の圧縮方式により得られる符号量、又は上記第2の圧縮方式により得られる符号量のうち小さい方の符号量が上記符号化方式選択単位毎に加算されることにより、等長化単位の総符号量が演算されるようにしてもよい。
【0102】
また、このプログラムでは、第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を上記符号化方式選択単位単位で選択して画像信号を圧縮符号化することをコンピュータに実行させるプログラムにおいて、上記第1の圧縮方式により得られる符号量、又は上記第2の圧縮方式により得られる符号量のいずれかを上記符号化方式選択単位毎に加算することにより、上記符号化方式選択単位の総符号量を演算し、演算した総符号量と、上記等長化単位における目標符号量とに基づき、上記第1の圧縮方式、或いは上記第2の圧縮方式を符号化方式選択単位毎に選択し、上記選択した圧縮方式を用いて上記各符号化方式選択単位の画像信号を圧縮符号化することをコンピュータに実行させる。
【0103】
このような構成からなる画像圧縮符号化装置及び方法、プログラムでは、ブロック毎に、複数の量子化ステップにより量子化された第1の圧縮方式、或いは第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式からの符号量を効率よく、また目標符号量を満たすように選択することができる。また、第2の圧縮方式からの符号量を優先的に選択することにより、画像品質の劣化を防止することができる。これによりVTR等のような記録メディアの容量をオーバーすることなく、効率的な符号量制御を実現でき、画像の圧縮過程における歪みを低減させることが可能となる。
【0104】
【発明の効果】
以上詳細に説明したように、本発明に係る画像圧縮符号化装置及び方法は、ブロック毎に、多くの量子化ステップにより量子化されたDCTパス或いはDPCMパスからの符号量を効率良く、また目標符号量を満たすように選択することができる。これによりVTR等のような記録メディアの容量をオーバーすることなく、効率的な符号量制御を実現でき、画像の圧縮過程における歪みを低減させることが可能となる。
【図面の簡単な説明】
【図1】本発明を適用した画像圧縮符号化装置の内部構成例を示した図である。
【図2】演算部の内部構成について説明するための図である。
【図3】演算処理部の処理手順を示すフローチャートである。
【図4】total(j−1)及びtotal(j)のうち、目標符号量から離れたものと置き換えてassign(k)を計算する場合について説明するためのフローチャートである。
【図5】二分探索法を用いない画像圧縮符号化装置の構成を示した図である。
【図6】二分探索法を用いない画像圧縮符号化装置における演算部について説明するための図である。
【図7】DPCMについて量子化を伴う画像圧縮符号化装置の構成について示した図である。
【図8】DPCMについて量子化を伴う画像圧縮符号化装置における演算部について説明するための図である。
【図9】DPCMについて量子化を伴う画像圧縮符号化装置において、二分探索法を用いない場合について説明するための図である。
【図10】MPEG方式を利用した従来の画像圧縮符号化装置の構成を示した図である。
【符号の説明】
1,5,6 画像圧縮符号化装置、2 本線系、4 予測系、11 端子、12ブロック分割部、21,23,27 FIFOメモリ、22 DCT部、24 二分探索部、25 量子化部、26 第1の可変長符号化部、28 DPCM部、29 第2の可変長符号化部、30 セレクタ、31 バッファ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention is applied to, for example, Moving Picture Image Coding Experts Group (MPEG) and the like. For example, DCT (Discrete Cosine Transform) or, for example, DPCM (Differential Pulse Code Modulation), which is an encoding method using a code capable of generating an amount of information that can be compressed by information controllable by compression. The present invention relates to an encoding device and an encoding method.
[0002]
[Prior art]
For example, in a system for transmitting a moving image signal to a remote place, such as a video conference system and a video telephone system, if the moving image signal is digitized as it is, the amount of information becomes extremely large. However, the amount of information can be reduced by compressing and encoding the image signal by using the line correlation and the inter-frame correlation of the video signal, so that it is possible to transmit many moving images at one time, and, consequently, to record. A long-time moving image can be recorded on a medium. As a typical high-efficiency encoding method for moving images, there is an MPEG method. In the MPEG system, the code amount is controlled so that the bit stream transmitted to the transmission path has a desired rate.
[0003]
FIG. 10 shows a configuration of a conventional image compression encoding apparatus 7 represented by the MPEG system. The conventional image compression encoding apparatus 7 realizes irreversible image compression based on a DCT encoding method in which an input image signal is DCT-transformed and then quantized. The image compression encoding device 7 includes a terminal 71, a block division unit 72, a DCT unit 73, a quantization unit 74, a variable length encoding unit 75, and a buffer 79.
[0004]
10, an image signal including a luminance signal Y and color difference signals Pb and Pr is input to a terminal 71.
[0005]
The block dividing unit 72 divides the input image signal of one frame into, for example, 8 × 8 blocks, and outputs the divided blocks to the DCT unit 73.
[0006]
The DCT unit 73 generates a DCT coefficient by performing DCT for each 8 × 8 block, and outputs the generated DCT coefficient to the quantization unit 74. The quantization unit 74 quantizes the DCT coefficient input from the DCT unit 73 by a quantization step determined for each block. The quantization unit 74 supplies the quantized data (hereinafter, referred to as a quantization level) to the variable length encoding unit 75. The variable-length coding unit 75 performs variable-length coding on the quantization level supplied from the quantization unit 74 by, for example, a method such as two-dimensional Huffman coding or arithmetic coding.
[0007]
Incidentally, the code amount control in the image compression coding apparatus 7 is performed by controlling a quantization step. This code amount control may be performed by feedback control using, for example, the remaining amount of the virtual buffer and the relationship between the quantization step and the generated code amount at the time of previous encoding.
[0008]
In the image compression encoding device 7, it is necessary to control the code amount so that the total code amount generated in one frame (equal length unit) does not always exceed the set target code amount. However, if a large total code amount is left in order to satisfy the target code amount, the image quality is rather deteriorated. For this reason, conventionally, a code amount control method for using up the total code amount while satisfying the target code amount has been proposed. In this code amount control method, a code amount generated in an equal length unit is calculated in advance for a plurality of quantization steps, and an appropriate quantization step is determined within a range where the generated code amount does not exceed a target code amount. There is, for example, proposed as a feedforward method (for example, see Patent Document 1).
[0009]
In this conventional code amount control method such as the feedforward method, when the quantization step is increased, the quantization is coarsened and the total code amount is reduced. On the other hand, when the quantization step is reduced, the quantization is fine and the total code amount is large. Become. Also, since only discrete values can be obtained by quantization, the total code amount is also discrete. That is, by controlling the quantization step on a block basis, the total code amount can be controlled. In order to use up the total code amount while satisfying the target code amount, it is necessary to select a quantization step smaller than the target code amount and the smallest quantization step for each block.
[0010]
By the way, the feed-forward method in which the DCT coefficient is quantized by a quantization step determined for each block adds some distortion in the process of image compression / decompression, so that the original image quality is completely maintained. Can not. Therefore, ideally, it is necessary to prevent the image quality from deteriorating by adopting a reversible encoding (Lossless) method capable of storing the original information through a compression / expansion process, such as DPCM. there were.
[0011]
[Patent Document 1]
International Publication WO96 / 28937
[0012]
[Problems to be solved by the invention]
By the way, when the above-described lossless encoding method is adopted, it may not be possible to realize a code amount control that does not exceed the set target code amount, so that the feedforward method and the lossless encoding method are combined, It is necessary to use up the frame total code amount so as not to exceed the target code amount.
[0013]
However, there is a problem that it is not possible to efficiently select each method for each block, and it is not possible to control the total code amount of the entire frame while referring to the target code amount.
[0014]
Therefore, the present invention has been proposed in view of the above-described situation, and the total code amount of the entire frame can be efficiently controlled by efficiently selecting the feedforward method or the lossless encoding method for each block. It is an object of the present invention to propose an image compression encoding apparatus, method, and program.
[0015]
[Means for Solving the Problems]
In order to solve the above-described problems, the image compression encoding apparatus to which the present invention is applied has a first compression method for quantizing an input image signal by different quantization steps, or a lower compression method than the first compression method. In the image compression encoding apparatus for selecting a second compression method having a compression ratio and a small loss in the above-mentioned encoding method selection unit according to the total code amount of the equal length unit, and encoding the same, the first compression method Selecting means for selecting one of the compression method or the second compression method for each coding method selection unit, and transmitting a select signal for the selected compression method; and selecting the compression method according to the transmitted select signal. Switching means for taking in the code amount by the first compression method or the code amount by the second compression method, and adding the code amount taken in via the switching means for each coding method selection unit. And a control means for controlling the total code amount calculated for each quantization step so as to approach the target code amount of the equal length unit. .
[0016]
Further, in order to solve the above-mentioned problems, the image compression encoding method to which the present invention is applied is a first compression method for quantizing an input image signal by different quantization steps, or the first compression method. In the image compression encoding method for selecting a second compression method having a lower compression rate and a small loss in an encoding method selection unit according to the total code amount of the equal length unit, and encoding the selected second compression method, One of the first compression method and the second compression method is selected for each encoding method selection unit, a select signal is transmitted for the selected compression, and the second signal is transmitted in response to the transmitted select signal. The code amount obtained by the first compression method or the code amount obtained by the second compression method is fetched, and the code amount fetched via the switching means is added for each coding method selection unit, thereby obtaining the total length of the equal length units. Mark Calculates the amount, the total code amount calculated for each of the quantization step is controlled so as to approach the target code amount of equal length units.
[0017]
Further, in order to solve the above-mentioned problems, the program to which the present invention is applied may be a first compression method for quantizing an input image signal by different quantization steps, or a compression ratio lower than the first compression method. In the program for causing a computer to select a second compression method having a small loss and a coding method selection unit according to the total code amount of the equal length unit, and to execute the encoding, One of the first compression method and the second compression method is selected for each encoding method selection unit, a select signal is transmitted for the selected compression, and the second signal is transmitted in response to the transmitted select signal. Fetching the code amount by the first compression method or the code amount by the second compression method, and adding the code amount fetched through the switching means for each coding method selection unit. It calculates the total code amount of such length reduction units Ri, the total code amount calculated for each of the quantization step, to be executed by a computer to control so as to approach the target code amount of equal length units.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described.
[0019]
The image compression encoding apparatus according to the present embodiment realizes irreversible image compression by quantizing an input image signal after performing, for example, DCT (Discrete Cosine Transform) or inputting an image signal. The image signal is reversibly encoded based on, for example, DPCM (Differential Pulse Code Modulation).
[0020]
As shown in FIG. 1, an image signal composed of a luminance signal Y and color difference signals Pb and Pr is input to the image compression encoding apparatus 1 via a terminal 11 as shown in FIG. The block division unit 12 selects the input image signal of one frame in units of coding scheme selection, and transmits the selected signal to the main system 2 and the prediction system 4. The coding system selection unit refers to, for example, an 8 × 8 block unit, a 16 × 16 macro block unit, a slice unit, or a case where the image is divided into image regions including a plurality of pixels. A description will be given by taking as an example a case where the data is divided in units of blocks.
[0021]
The main line system 2 includes a DCT path including a FIFO (First In First Out) memory 21, a DCT unit 22, a FIFO memory 23, a binary search unit 24, a quantization unit 25, and a first variable length encoding unit 26, and a FIFO memory 27, a DPCM path including a DPCM unit 28 and a second variable length encoding unit 29, a selector 30, and a buffer 31.
[0022]
First, the DCT path will be described. The data supplied to the main line system 2 is temporarily stored in the FIFO memory 21 in order to adjust an interval until a select signal and a code amount described later are supplied from the prediction system 4. The data stored in the FIFO memory 21 is supplied to the DCT unit 22 and the FIFO memory 27.
[0023]
The DCT unit 22 generates a DCT coefficient by performing DCT for each 8 × 8 block, and transmits the DCT coefficient to the FIFO memory 23 and the binary search unit 24. The DCT coefficients temporarily stored in the FIFO memory 23 are output to the quantization unit 25. The quantization unit 25 quantizes the DCT coefficient input from the DCT unit 22 by a quantization step determined by the binary search unit 24 in block units. The quantization unit 25 supplies the quantized data (hereinafter, referred to as a quantization level) to the first variable length encoding unit 26. The first variable length coding unit 26 performs variable length coding on the quantization level supplied from the quantization unit 25, for example, by a method such as two-dimensional Huffman coding or arithmetic coding. Incidentally, in the image compression encoding apparatus 1 according to the present embodiment, a configuration in which the first variable length encoding unit 26 is omitted may be applied.
[0024]
That is, by passing through the DCT path, the image signal can be encoded based on the quantization step supplied for each block via the binary search unit 24, so that the total code amount of one frame becomes equal to the target code amount. It is possible to control so as not to exceed the amount. The method using the binary search unit 24 is merely an example, and another method may be used.
[0025]
Next, the DPCM path will be described. The DPCM unit 28 is supplied with data stored on the FIFO memory 27 which plays a role of a delay element in the above-described DCT path, performs DPCM on the data for each block, and performs a second variable length coding unit. 29. The second variable length coding unit 29 performs variable length coding on the data on which DPCM has been performed, for example, by a method such as two-dimensional Huffman coding or arithmetic coding. Note that the method of variable-length coding in the second variable-length coding unit 29 does not need to be the same as the method in the first variable-length coding unit 26 described above. Further, in the image compression encoding device 1 according to the present embodiment, a configuration in which the second variable length encoding unit 29 is omitted may be applied.
[0026]
The selector 30 appropriately switches various data that has been subjected to variable-length encoding by the first variable-length encoding unit 26 or the second variable-length encoding unit 29, and outputs the data together with the switching information to the buffer 31. Incidentally, the selector 30 is switched based on a select signal supplied from the prediction system 4.
[0027]
That is, by passing through the DPCM pass, lossless encoding can be performed so that the original image quality can be completely maintained without adding any distortion.
[0028]
The prediction system 4 includes a DCT unit 41, a DCT path including n quantizers 42-1 to 42-n, and n code amount converters 43-1 to 43-n, a DPCM unit 45, and a code amount converter. A DPCM path including a device 46 and an operation unit 44 are provided. The prediction system 4 is provided so as to calculate the total code amount generated in units of equal length and to select an appropriate DCT path or DPCM path within a range where the main line system 2 does not exceed the target code amount. . The equal length unit means one frame in the present embodiment, but is not limited to such a case. For example, an 8 × 8 block, a 16 × 16 macro block, or a slice unit obtained by combining them It may be. Further, the isometric unit may be any image area including a plurality of pixels, and may be a GOP unit obtained by combining frames.
[0029]
First, the DCT path will be described. This DCT path implements irreversible image compression based on, for example, a DCT coding method in which an input image signal is subjected to DCT and then quantized, and has a higher compression ratio than the DPCM path. Loss is large. The transform coding in the DCT path is not limited to DCT, and another transform coding method may be used. In this DCT pass, transform coding is performed in units of 8 × 8 blocks. However, the present invention is not limited to such a case, and may be performed in macroblock units as described above, or an image region including a plurality of pixels may be defined as one unit May be used.
[0030]
Like the DCT unit 22, the DCT unit 41 generates DCT coefficients by performing DCT on each 8 × 8 block, and transmits the generated DCT coefficients to the quantizers 42-1 to 42-n. The quantizers 42-1 to 42-n quantize the DCT coefficients supplied from the DCT unit 41 at different quantization steps. This makes it possible to test the generated DCT coefficients by n quantization steps. Also, the quantizers 42-1 to 42-n supply the generated quantization levels to the code amount converters 43-1 to 43-n, respectively. Each of the code amount converters 43-1 to 43-n converts the supplied quantization level into a code amount for each block, and transmits the code amount to the arithmetic unit 44. That is, in the conversion of the code amount in the code amount converters 43-1 to 43-n, the quantization levels generated by the quantizers 42-1 to 42-n are variable-length coded and the code lengths are output. You may make it.
[0031]
Next, the DPCM path will be described. This DPCM pass realizes reversible image compression based on a lossless encoding method (Lossless) which can store original information through a process of compression and decompression like a DPCM, for example. Low loss at low compression ratio compared to. In this DPCM pass, transform coding is performed in units of 8 × 8 blocks. However, the present invention is not limited to such a case, and may be performed in macroblock units as described above. May be used.
[0032]
The DPCM unit 45 receives the data from the block division unit 12, performs DPCM on these for each block, and transmits the data to the code amount converter 46. The code amount converter 46 encodes these DPCM-converted signals for each block and transmits the signals to the arithmetic unit 44. That is, the code amount converter 46 may also perform variable length coding on the DPCM-converted signal and output the code length.
[0033]
The arithmetic unit 44 receives as input the code amounts processed in different quantization steps from the code amount converters 43-1 to 43-n, and receives the DPCM-processed code amounts from the code amount converter 46. The arithmetic unit 44 obtains an assigned code amount for each block and a select signal based on the input code amount for each block, and outputs them to the main system 2. By the way, when calculating the total code amount of the equal length unit in the arithmetic unit 44, it is necessary to obtain the accumulated value of the code amount for each block, so that a calculation time for one frame is required.
[0034]
Next, the calculation of the allocated code amount by the calculation unit 44 will be described. FIG. 2 illustrates a configuration example of the calculation unit 44. The operation unit 44 includes n comparison units 101-1 to 101-n, n selectors 102-1 to 102-n, n memories 103-1 to 103-n, and n adders. 104-1 to 104-n, n accumulation circuits 105-1 to 105-n, and an arithmetic processing unit 106.
[0035]
The comparison units 101-1 to 101-n perform code amount length (1, k) on the k-th block from the code amount converters 43-1 to 43-n in different quantization steps via the DCT path. ~ Length (n, k) is input, and the code amount dpcm (k) subjected to DPCM processing is input from the code amount converter 46 via the DPCM path. For example, the code amount length (1, k) from the code amount conversion unit 43-1 and the code amount dpcm (k) subjected to DPCM processing are input to the comparison unit 101-1. The comparison units 101-1 to 101-n respectively determine the code amounts length (1, k) to length (n, k) input via the DCT path and the code amount dpcm (k) input via the DPCM path. ) And select the smaller one. Then, the comparing units 101-1 to 101-n determine the code amounts length (1, k) to length (n, k) input via the DCT path and the code amount dpcm input via the DPCM path. A select signal indicating which of (k) is selected is output.
[0036]
The selectors 102-1 to 102-n respectively select the code amount supplied from the DCT path or the code amount supplied from the DPCM path according to the select signal supplied from the comparison units 101-1 to 101-n. . For example, when the information indicating that the DCT path has been selected is included in the select signal, the selectors 102-1 to 102-n are turned on to the DCT side. The code amount selected by the selectors 102-1 to 102-n is directly supplied to the memories 103-1 to 103-n and the adders 104-1 to 104-n.
[0037]
The memories 103-1 to 103-n store, for each block, a select signal for identifying which code amount is selected, and the code amounts selected by the selectors 102-1 to 102-n. That is, at the stage when the processing for equal length units, for example, one frame is completed, the code amount and the select signal selected for each block are stored for one frame in each of the memories 103-1 to 103-n. It has become. In other words, in each of the memories 103-1 to 103-n, the code amount length (1, k) to length (n, k) input via the DCT path is set as the code amount selected in block units, or One of the code amounts dpcm (k) input via the DPCM path is stored. Therefore, when the memories 103-1 to 103-n are combined, the code amount and the select signal selected for each block are stored for n quantization steps.
[0038]
The adders 104-1 to 104-n and the accumulation circuits 105-1 to 105-n sequentially accumulate and add the code amount selected by the selectors 102-1 to 102-n for one frame. The code amounts added for one frame are referred to as total code amounts total (1) to total (n). The accumulation circuits 105-1 to 105-n sequentially transmit the obtained total code amounts total (1) to total (n) to the arithmetic processing unit 106.
[0039]
The arithmetic processing unit 106 executes the following procedure shown in FIG. 3 when receiving the total code amounts total (1) to total (n) from the respective accumulating circuits 105-1 to 105-n. First, in step S1, the arithmetic processing unit 106 compares the target code amounts of equal length units with the total code amounts total (1) to total (n). Then, the arithmetic processing unit 106 specifies the total code amount total (j−1) closest to the target code amount among the total code amounts exceeding the target code amount. That is, the total code amount total (j-1) is the code amount immediately above the target code amount, in other words, the total code amount is the minimum code amount among the total code amounts exceeding the target code amount. The arithmetic processing unit 106 specifies the total code amount total (j) closest to the target code amount among the total code amounts equal to or smaller than the target code amount. That is, the total code amount total (j-1) is the code amount immediately below the target code amount, in other words, the total code amount is the maximum code amount among the total code amounts equal to or smaller than the target code amount.
[0040]
Next, the process proceeds to step S2, where the arithmetic processing unit 106 determines each block stored in the memory 103-j-1 and the memory 103-j based on the total (j-1) and the total (j) thus identified. Read the code amount and select signal for each. In the memory 103-j-1, the code amount length (j-1, k) input via the DCT path or the code amount input via the DPCM path is used as the code amount of the k-th block. dpcm (k) is stored. Therefore, in step S2, the code amount read from the memory 103-j-1 is length (j-1, k) or dpcm (k). In the memory 103-j, the code amount length (j, k) input via the DCT path or the code amount dpcm (k) input via the DPCM path is used as the code amount of the k-th block. Is stored. Therefore, the code amount read from the memory 103-j in step S2 is length (j, k) or dpcm (k). Incidentally, in the subsequent steps, the code amount and the select signal for each block read from the memories 103-j-1 and 103-j are used.
[0041]
Next, the process proceeds to step S3, and the arithmetic processing unit 106 calculates an assigned code amount assign (k) for each block by using linear interpolation.
[0042]
Here, the target code amount of the equal length unit is M, and the code amount read from the memory 103-j-1 is length (j-1, k), which is read from the memory 103-j. When the code amount is length (j, k), the assigned code amount assign (k) is obtained by the following equation (1).
assign (k) = {(total (j-1) -M) * length (j, k) + (M-total (j)) * length (j-1, k)} / {total (j-1) -Total (j)} ... (1)
When the code amount read from the memory 103-j-1 is dpcm (k) and the code amount read from the memory 103-j is length (j, k), the assigned code amount assign ( k) is obtained by the following equation (2).
assign (k) = {(total (j-1) -M) * length (j, k) + (M-total (j)) * dpcm (k)} / {total (j-1) -total (j) )} ・ ・ ・ ・ ・ ・ ・ ・ ・ (2)
When the code amount read from the memory 103-j-1 is dpcm (k) and the code amount read from the memory 103-j is dpcm (k), the allocated code amount assign (k) Is obtained by the following equation (3).
assign (k) = {(total (j-1) -M) * dpcm (k) + (M-total (j)) * dpcm (k)} / {total (j-1) -total (j)}・ ・ ・ (3)
As described above, by determining the assigned code amount assign (k) to be assigned to each block, it is possible to realize highly efficient code amount control with a small loss of the code amount relative to the target code amount.
[0043]
Next, the process proceeds to step S4, and the arithmetic processing unit 106 finally compares assign (k) obtained for each block with dpcm (k) for each block. As a result, if assign (k) is equal to or greater than dpcm (k), the process proceeds to step S5. If assign (k) is less than dpcm (k), the process proceeds to step S6.
[0044]
When the process proceeds to step S5, it means that the total code amount can be suppressed to be equal to or less than the target code amount even if the block k is encoded through a DPCM path with high image quality. In such a case, the arithmetic processing unit 106 switches the select signal to the DPCM side, replaces assign (k) with dpcm (k), and outputs the result.
[0045]
When the process proceeds to step S6, since the code amount of the block k is larger by the DPCM path than the code amount estimated by obtaining the assign (k) as described above, it is better to select the DCT side. , The total code amount can be suppressed lower than the target code amount. Therefore, the arithmetic processing unit 106 sets the select signal to the DCT side and outputs the obtained assign (k) as it is.
[0046]
In the arithmetic processing unit 106, the assign (k) and dpcm (k) can be considered as priorities for selecting either the DCT path or the DPCM path. Any selection method may be applied as long as it selects either the DCT path or the DPCM path based on this priority. For example, when the priorities are equal, either the DCT path or the DPCM path may be selected, or the DPCM path may be selected.
[0047]
Also, the priority in step S4 is not limited to the case based on assign (k) and dpcm (k). That is, if the comparison in step S4 is based on a predetermined priority, for example, even if assign (k) is equal to or greater than dpcm (k), the process may proceed to step S6.
[0048]
The prediction system 4 outputs an assigned code amount assign (k) output from the arithmetic processing unit and a select signal. The output assigned code amount assign (k) is supplied to the binary search unit 24.
[0049]
When the select signal is on the DCT side, the binary search unit 24 determines the quantization step so that the generated code amount of the block falls within the target code amount. When determining the quantization step, the binary search unit 24 may adopt the method proposed in Japanese Patent Application No. 4-110858. The quantization step is determined by a binary search method using the fact that the generated code amount monotonously decreases with the increase of the quantization step. The quantization is performed by the quantizer 25 according to the determined quantization step. Note that the binary search method is merely an example, and any method may be used as long as the quantization step is determined so that the generated code amount of the block falls within the target code amount.
[0050]
On the other hand, when the select signal is switched to the DPCM side, the selector 30 is switched to the DPCM path, and the block is subjected to encoding via the DPCM.
[0051]
Note that if it is not possible to identify total (j-1) immediately above and below the target code amount and total (j), respectively, the arithmetic processing unit 106 calculates total (j-1) and total (j-1). The assigned code amount assign (k) cannot be obtained by so-called interpolation in which the target code amount is inserted between j). In such a case, assign (k) is obtained by so-called extrapolation using two total (j−1) and total (j) that do not sandwich the target code amount and are closest to the target code amount. Also in such extrapolation, the assigned code amount assign (k) is calculated using the above equations (1) to (3). However, in this case, there is a case where the code amount is surplus even if encoding is performed via the DPCM pass because the code amount of the DPCM pass is small. In this case, as shown in the flowchart of FIG. 4, assign (k) and the total code amount total_tmp (total number of one frame of assign (k)) are determined as two of total (j-1) and total (j). , May be replaced with the one farther from the target code amount to calculate assign (k).
[0052]
In the flowchart shown in FIG. 4, first, in step S11, the processing loop 11 is set to an initial value, and the process proceeds to step S12. In step S12, assign (k) is calculated by the above equation using total (j-1) and total (j) closest to the target code amount, and the process proceeds to step S13. In step S13, it is determined whether or not the total code amount total_tmp for one frame has been obtained by obtaining assign (k) for all the blocks. The process proceeds to step S14 only when the total code amount total_tmp is obtained, and otherwise, the process of step S12 is repeated.
[0053]
Next, the process proceeds to step S14, and it is determined whether the current loop 11 has reached the total number of processing loops. If the current loop 11 has reached the total number of processing loops, it indicates that the desired assign (k) has been obtained after the repetitive processing, and the process exits the loop. On the other hand, if the current loop 11 has not reached the total number of processing loops, the process proceeds to step S15. The total number of processing loops can be set arbitrarily, for example, five times.
[0054]
In step S15, it is determined which of the extracted total (j-1) and total (j) is closer to the target code amount. Specifically, abs (M-total (j)) and abs (M-total (j-1)) are compared to determine which is larger. As a result, when abs (M-total (j))> abs (M-total (j-1)), the variable jj is replaced with j. On the other hand, if abs (M-total (j)) ≦ abs (M-total (j−1)), the variable jj is replaced with j−1 (this abs () means an absolute value). That is, of the extracted total (j-1) and total (j), the value farthest from the total code amount M is selected and assigned to the variable jj.
[0055]
Next, in step S16, the total code amount total_tmp for one frame is set to total (jj). Thus, the total code amount total_tmp for one frame can be replaced with total (j−1) or total (j) that is farther from the total code amount M.
[0056]
Next, the process proceeds to step S17, and assign (k) obtained for each block is assigned to length (jj, k) for each block. This makes it possible to refer to the length (jj, k) to which the value is assigned when the process proceeds to the next loop 11 and obtains the assignment (k) again.
[0057]
As described in detail above, the image coding and compressing apparatus 1 according to the present embodiment can efficiently select the code amount from the DCT path or the DPCM path so as to satisfy the target code amount for each block. it can. Also, by preferentially selecting the code amount from the DPCM pass, it is possible to prevent the image quality from deteriorating. As a result, efficient code amount control can be realized without exceeding the capacity of a recording medium such as a VTR, and distortion in the image compression process can be reduced. Further, since the quantization step can be determined by using the binary search method, the number of quantization steps in the prediction unit 4 can be suppressed, which is advantageous in terms of hardware because the circuit configuration can be simplified.
[0058]
Note that the present embodiment is not limited to the above description. For example, the present invention can be applied to a configuration that does not use a search unit such as a binary search unit as in the image compression encoding device 5 shown in FIG. Hereinafter, the image compression encoding device 5 will be described in detail. Note that the same circuit components as those of the above-described image compression / encoding device 1 will be referred to the description of the image compression / encoding device 1, and description thereof will be omitted.
[0059]
The image compression / encoding device 5 receives an image signal including a luminance signal Y and color difference signals Pb and Pr via a terminal 11. The block dividing unit 12 divides an input image signal of one frame into, for example, 8 × 8 blocks, and transmits the blocks to the main system 2 and the prediction system 4.
[0060]
The main line system 2 includes a DCT path including a FIFO (First In First Out) memory 21, a DCT unit, a quantization unit 35, and a first variable length coding unit 26, a DPCM unit 28, and a second variable length coding unit. 29, a DPCM path comprising 29, a selector 30, and a buffer 31.
[0061]
The quantization unit 35 quantizes the DCT coefficient input from the DCT unit 22 based on a quantization step determined for each block. The quantization unit 35 supplies the quantized data (hereinafter, referred to as a quantization level) to the variable length encoding unit 26.
[0062]
The selector 30 appropriately switches various types of data that have been variable-length coded by the first variable-length coding unit 26 and / or the second variable-length coding unit 29, and outputs the data together with the switching information to the buffer 31. Incidentally, the selector 30 may be switched based on a select signal supplied from the prediction system 4 in some cases.
[0063]
The prediction system 4 includes a DCT unit 41, a DCT path including n quantizers 42-1 to 42-n, and n code amount converters 43-1 to 43-n, a DPCM unit 45, and a code amount converter. A DPCM path including a device 46 and an operation unit 48 are provided. Incidentally, the number n of processing stages of the DCT path in the prediction system 4 corresponds to the total number of quantization steps. This is because the prediction can be attempted in a larger number of quantization steps than in the image compression encoding apparatus 1 that employs the binary search method, so that a highly accurate quantization control is realized.
[0064]
The arithmetic unit 48 receives the code amounts processed in the different quantization steps from the code amount converters 43-1 to 43-n, and receives the DPCM-processed code amounts from the code amount converter 46. The operation unit 48 obtains an assigned code amount for each block and a select signal based on the input code amounts for each block, and outputs them to the main system 2. The allocated code amount output to the main line 2 is sent to the quantization unit 35, and the select signal is sent to the selector 30. By the way, when calculating the total code amount for one frame, for example, in this arithmetic unit 48, it is necessary to obtain the accumulated value of the code amount for each block, so that the calculation time for one frame is required.
[0065]
Next, the calculation of the allocated code amount by the calculation unit 48 will be described. FIG. 6 shows a configuration example of the calculation unit 48. The operation unit 48 includes n comparison units 201-1 to 201-n, n selectors 202-1 to 202-n, n memories 203-1 to 203-n, and n adders 204-1 to 204-n, n accumulation circuits 205-1 to 205-n, and an arithmetic processing unit 206.
[0066]
The comparison units 201-1 to 201-n respectively perform code lengths (1, k) to length (n, k) that have been processed in different quantization steps from the code amount converters 43-1 to 43-n via the DCT path. ) Is input, and the DPCM-processed code amount dpcm (k) is input from the code amount converter 46 via the DPCM path. For example, the code amount length (1, k) from the code amount conversion unit 43-1 and the code amount dpcm (k) subjected to the DPCM process are input to the comparison unit 201-1. The comparing units 201-1 to 201 -n are configured to input the code lengths length (1, k) to length (n, k) input via the DCT path and the code amount dpcm (k) input via the DPCM pass. ) Is selected, and a select signal including the selected information is output.
[0067]
The selectors 202-1 to 202-n select the code amount supplied from the DCT path or the code amount supplied from the DPCM path, respectively, according to the select signals supplied from the comparison units 201-1 to 201-n. . For example, when the information indicating that the DCT path has been selected is included in the select signal, the selectors 202-1 to 202-n are turned ON on the DCT side. The code amounts selected by the selectors 202-1 to 202-n are directly supplied to the memories 203-1 to 203-n and the adders 204-1 to 204-n.
[0068]
The memories 203-1 to 203-n store a select signal and a code amount for each block. That is, when the processing for one frame is completed, the memories 203-1 to 203-n store the code amount and the select signal selected in block units for n number of quantization steps. It has become.
[0069]
The adders 204-1 to 204-n and the accumulating circuits 205-1 to 205-n sequentially accumulate and add the code amount selected by the selectors 202-1 to 202-n for one frame. The code amounts added for one frame are referred to as total code amounts total (1) to total (n). The accumulation circuits 205-1 to 205-n sequentially transmit the obtained total code amounts total (1) to total (n) to the arithmetic processing unit 206.
[0070]
The arithmetic processing unit 206 receives the total code amounts total (1) to total (n) from the accumulation circuits 205-1 to 205-n, respectively. The arithmetic processing unit 206 compares the target code amount for one frame with the total code amounts total (1) to total (n), and calculates the total code amount total (j−1) that is equal to or larger than the target code amount. The total code amount total (j) that is equal to or smaller than the target code amount is specified. That is, the total (j-1) and the total (j) refer to those existing so as to sandwich the target code amount, and j is the largest of j satisfying total (j-1)> target code amount. Show things.
[0071]
The arithmetic processing unit 206 estimates the optimal code amount for each block based on the calculated total code amount while referring to the n quantization steps. Then, based on the code amount estimated for each block, assign (k) is determined and transmitted to the quantization unit 35 described above.
[0072]
As described in detail above, the image coding and compressing apparatus 5 according to the present embodiment efficiently and efficiently sets the code amount from the DCT path or DPCM path quantized by a plurality of quantization steps for each block. It can be selected to satisfy the code amount. Also, in the arithmetic processing unit 106, assign (k) and dpcm (k) are set as so-called priorities, and when these priorities are at the same level, the DPCM path is preferentially selected, thereby deteriorating the image quality. Can be prevented. As a result, efficient code amount control can be realized without exceeding the capacity of a recording medium such as a VTR, and distortion in the image compression process can be reduced. , It is possible to expect accurate quantization control. The present embodiment is not limited to the case where the selection is made based on the priority.
[0073]
Note that the present embodiment is also applicable to a configuration involving quantization of DPCM, such as the image compression encoding device 6 shown in FIG. Hereinafter, the image compression encoding device 6 will be described in detail. Note that the same circuit components as those of the above-described image compression / encoding device 1 will be referred to the description of the image compression / encoding device 1, and description thereof will be omitted.
[0074]
The image compression encoding device 6 receives an image signal including a luminance signal Y and color difference signals Pb and Pr via a terminal 11. The block dividing unit 12 divides an input image signal of one frame into, for example, 8 × 8 blocks, and transmits the blocks to the main system 2 and the prediction system 4.
[0075]
The main line system 2 includes a DCT path including a FIFO (First In First Out) memory 21, a DCT unit 22, a FIFO memory 23, a binary search unit 24, a quantization unit 25, and a first variable length encoding unit 26, and a FIFO memory 27, a DPCM path including a quantization unit 35, a DPCM unit 28, a second variable length coding unit 29, and a binary search unit 36, a selector 30, and a buffer 31.
[0076]
The quantization unit 35 receives the data stored in the FIFO memory 27 and quantizes the data in units of blocks according to the quantization step determined by the binary search unit 36. The quantization unit 35 supplies the quantized data to the DPCM unit 28.
[0077]
That is, through the DPCM pass with quantization, some distortion is added in the process of compressing the image. For this reason, when selecting either the DCT path or the DPCM path, similarly to the image compression encoding apparatus 1, in addition to giving priority to a smaller code amount, a smaller distortion in the compression process is given priority. Need to be selected. Specifically, the distortion due to compression depends on the quantization, and occurs in each of the DCT and the DPCM according to the quantization step. For this reason, the prediction system 4 needs to send a select signal to the main line system 2 by comparing the amount of code from the DCT path with quantization and the amount of code from the DPCM path with quantization as well as image distortion. There is.
[0078]
An implementation example of the prediction system 4 will be described below. As shown in FIG. 7, the prediction system 4 includes a DCT section 41, a DCT path including an n number of quantizers 42-1 to 42-n, and an n number of code amount converters 43-1 to 43-n. , A DPCM path including m quantizers 51-1 to 51-m, m DPCM units 52-1 to 52-m, and m code amount conversion units 53-1 to 53-m, and an operation unit 54.
[0079]
Each of the m quantizers 51-1 to 51-m receives an image signal in block units and quantizes the image signal in a different quantization step. That is, sampling can be performed by m quantization steps even in the DPCM pass.
[0080]
The DPCM units 52-1 to 52-m perform DPCM on the quantized image signal for each block, and supply the result to the code amount conversion units 53-1 to 53-m. The code amount conversion units 53-1 to 53-m encode these DPCM-converted signals on a block-by-block basis and output them to the calculation unit 54.
[0081]
The arithmetic unit 54 receives code amounts and the like processed in different quantization steps from the code amount converters 43-1 to 43-n from the DCT path side, and performs quantization by the different quantization steps from the DPCM path side. The code amount and the like that have been converted and DPCM processed are input. The arithmetic unit 54 compares the input code amount for each block and the distortion of the image, obtains the allocated code amount and the select signal for each block, and outputs them to the main line system 2. In the prediction system 4, the DPCM units 52-1 to 52-m and the quantizers 51-1 to 51-m may be exchanged. Thus, the DPCM units 52-1 to 52-m can quantize the DPCM-converted signals at different quantization steps.
[0082]
Next, the calculation of the allocated code amount by the calculation unit 54 will be described. FIG. 8 illustrates a configuration example of the calculation unit 54. The operation unit 54 includes n comparison units 301-1 to 301-n, n selectors 302-1 to 302-n, n memories 303-1 to 303-n, and n adders. 304-1 to 304-n, n accumulation circuits 305-1 to 305-n, and an arithmetic processing unit 306.
[0083]
The comparison units 301-1 to 301-n respectively perform code lengths (1, k) to length (n, k) processed by the code amount converters 43-1 to 43-n in different quantization steps via the DCT path. ) Is input, and the DPCM-processed code amounts dpcm (1, k) to dpcm (m, k) are input from the code amount converters 53-1 to 53-m via the DPCM path. The comparing units 301-1 to 301-n compare the code amount in the DCT path with the code amount in the DPCM path in which distortion is smaller than the code amount in the DCT path. By the way, in the example shown in FIG. 8, dpcm (1, k) inputted to the comparison unit 301-1 and the comparison unit 301-2 has less distortion than length (1, k) and length (2, k). The distortion of dpcm (3, k) input to the comparison unit 301-3 is smaller than that of length (3, k).
[0084]
The comparison units 301-1 to 301-n select the smaller of the input code amount from the DCT path and the input code amount from the DPCM path, and output a select signal including the selected information. This makes it possible to output the select signal so as to satisfy the target code amount while suppressing distortion due to image compression.
[0085]
The selectors 302-1 to 302-n respectively select the code amount supplied from the DCT path or the code amount supplied from the DPCM path according to the select signals supplied from the comparison units 301-1 to 301-n. . For example, when the information indicating that the DCT path has been selected is included in the select signal, the selectors 302-1 to 302-n are turned ON on the DCT side. The code amount selected by the selectors 302-1 to 302-n is directly supplied to the memories 303-1 to 303-n and the adders 304-1 to 304-n.
[0086]
The memories 303-1 to 303-n store a select signal and a code amount for each block. That is, when the processing for one frame is completed, the memories 303-1 to 303-n store the code amount and the select signal selected in block units for n number of quantization steps. It has become.
[0087]
The adders 304-1 to 304-n and the accumulating circuits 305-1 to 305-n sequentially accumulate the code amounts selected by the selectors 302-1 to 302-n for one frame. The code amounts added for one frame are referred to as total code amounts total (1) to total (n). The accumulation circuits 305-1 to 305-n sequentially transmit the obtained total code amounts total (1) to total (n) to the arithmetic processing unit 306.
[0088]
The arithmetic processing unit 306 receives the total code amounts total (1) to total (n) from the respective accumulating circuits 305-1 to 305-n. The arithmetic processing unit 306 compares the target code amount for one frame with the total code amounts total (1) to total (n), and calculates the total code amount total (j−1) that is equal to or larger than the target code amount. The total code amount total (j) that is equal to or smaller than the target code amount is specified. Regarding the calculation of the assigned code amount assign (k) based on these specified code amounts, the description of the calculation unit 44 in the image compression encoding device 1 is cited, and the description is omitted.
[0089]
In this manner, the prediction system 4 outputs the assigned code amount assign (k) output from the arithmetic processing unit and the select signal. The outputted assigned code amount assign (k) is supplied to the binary search units 24 and 36.
[0090]
When the select signal is on the DCT side, the binary search units 24 and 36 determine the quantization step so that the generated code amount of the block falls within the target code amount. Based on the determined quantization step, the quantization units 25 and 35 in the main line system 2 perform quantization in block units.
[0091]
Note that the image compression encoding apparatus 6 is not limited to the configuration shown in FIG. 7, but can be applied to a configuration that does not use the binary search method, for example, as shown in FIG.
[0092]
In the example of the image compression encoding device 6 illustrated in FIG. 9, the quantization unit 35 quantizes the DCT coefficient input from the DCT unit 22 based on a quantization step determined for each block. The quantization unit 35 supplies the quantized data to the variable length coding unit 26.
[0093]
The arithmetic processing unit 306 estimates the optimal code amount for each block based on the calculated total code amount while referring to the n quantization steps. Then, based on the code amount estimated for each block, a quantization step is determined and transmitted to the quantization unit 35 described above. As a result, prediction can be attempted with more quantization steps as compared with the image compression encoding apparatus 6 shown in FIG. 7 that employs the binary search method, so that highly accurate quantization control can be realized. Become.
[0094]
As described in detail above, the image coding / compression device 6 according to the present embodiment efficiently and efficiently sets the code amount from the DCT path or DPCM path quantized by a plurality of quantization steps for each block. It can be selected to satisfy the code amount. Further, when the code amount from the DPCM path is preferentially selected, deterioration of image quality can be prevented. As a result, efficient code amount control can be achieved without exceeding the capacity of a recording medium such as a VTR, and distortion in the image compression process can be reduced.
[0095]
The present embodiment is not limited to the case where the present invention is applied to the image compression encoding devices 1, 5, and 6. For example, by arranging the components of the image compression / encoding devices 1, 5, and 6 on a transmission line, efficient code amount control can be realized on the transmission line, and distortion in the image compression process is reduced. It is possible to do.
[0096]
In the present embodiment, reversible image compression is performed by generating a DCT coefficient by performing DCT for each block, but the present invention is not limited to such a case. Further, the irreversible image compression method is not limited to DPCM. That is, any method may be used as long as it uses the first compression method and the second compression method having a lower compression ratio and a smaller loss than the first compression method.
[0097]
The present invention is also applicable to an image compression encoding apparatus, method, and program that can switch between the first compression method and the second compression method.
[0098]
This image compression encoding apparatus compresses an image signal by selecting a first compression scheme or a second compression scheme having a lower compression rate and a smaller loss than the first compression scheme in a unit of encoding scheme selection. In the image compression encoding apparatus for encoding, by adding either the code amount obtained by the first compression method or the code amount obtained by the second compression method for each coding method selection unit, Calculating means for calculating the total code amount of the coding method selection unit, the first compression method, or the first compression method based on the total code amount calculated by the calculation means and the target code amount in the equal length unit. Selecting means for selecting the second compression method for each coding method selection unit, and compression coding means for compressing and coding the image signal of each of the coding method selection units using the compression method selected by the selection means And Obtain.
[0099]
In such an image compression encoding device, the first compression method and / or the second compression method may be a method in which the image signal is quantized by a plurality of different quantization steps. The determining means for comparing the total code amount calculated by the calculating means with the target code amount in the equal length unit and determining a quantization step in the first compression method according to the comparison result. Furthermore, the selection means selects one of the first compression method and the second compression method to be quantized by the quantization step determined by the determination means for each coding method selection unit. You may. The selection means may select the first compression method or the second compression method based on a predetermined priority. Further, when the priority of the first compression method or the second compression method is the same, the selection means selects one of the first compression method and the second compression method. You may make it. Further, the selection means may preferentially select the second compression method. In addition, the first compression method may be a method in which the image signal is subjected to DCT (Discrete Cosine Transform) and the DCT-converted image signal is quantized. Further, the second compression method may be a lossless encoding method. In addition, the second compression method may be a method of encoding the image signal by DPCM (Differential Pulse Code Modulation). The calculating means may add a smaller code amount of the code amount obtained by the first compression method or the code amount obtained by the second compression method for each coding method selection unit. , The total code amount of the equal length unit may be calculated.
[0100]
This image compression encoding method selects a first compression method or a second compression method having a lower compression ratio and a smaller loss than the first compression method in the above-mentioned encoding method selection unit to convert an image signal. In the image compression coding method for performing compression coding, either the code amount obtained by the first compression method or the code amount obtained by the second compression method is added for each of the coding method selection units. A calculating step of calculating the total code amount of the coding method selection unit, the first compression method based on the total code amount calculated in the calculating step, and the target code amount of the equal length unit. Alternatively, a selection step of selecting the second compression scheme for each coding scheme selection unit, and compression for compressing and encoding the image signal of each coding scheme selection unit using the compression scheme selected in the selection step. And a No. step.
[0101]
In such an image compression encoding method, the first compression method and / or the second compression method is a method in which the image signal is quantized by a plurality of different quantization steps, respectively. A determining step of comparing the code amount with a target code amount in the equal length unit, and determining a quantization step in the first compression scheme according to a result of the comparison; The first compression method or the second compression method may be selected for each of the coding method selection units by the quantization step determined in the process. In the selection step, the first compression method or the second compression method may be selected based on a predetermined priority. In the selection step, when the priority of the first compression method or the second compression method is equal, one of the first compression method and the second compression method is selected. You may make it so. In the selection step, the second compression method may be preferentially selected. In addition, the first compression method may be a method in which the image signal is subjected to DCT (Discrete Cosine Transform) and the DCT-converted image signal is quantized. Further, the second compression method may be a method of performing encoding by a lossless encoding method. Further, the second compression method may be a method of encoding an input image signal by DPCM (Differential Pulse Code Modulation). Further, in the calculation step, a smaller code amount of the code amount obtained by the first compression method or the code amount obtained by the second compression method is added for each of the coding method selection units. Thus, the total code amount of the equal length unit may be calculated.
[0102]
Further, in this program, the image signal is compressed by selecting the first compression method or the second compression method having a lower compression ratio and a smaller loss than the first compression method in units of the above-mentioned encoding method selection unit. In a program for causing a computer to execute encoding, either the code amount obtained by the first compression method or the code amount obtained by the second compression method is added for each coding method selection unit. Thereby, the total code amount of the coding method selection unit is calculated, and the first compression method or the second compression method is calculated based on the calculated total code amount and the target code amount in the equal length unit. A method is selected for each coding method selection unit, and the computer is caused to execute compression coding of the image signal of each coding method selection unit using the selected compression method.
[0103]
In the image compression encoding apparatus, method, and program having such a configuration, the first compression scheme quantized by a plurality of quantization steps for each block, or a compression rate lower than the first compression scheme and a loss Can be selected so that the code amount from the second compression method with a small value of E is efficiently and satisfies the target code amount. Further, by preferentially selecting the code amount from the second compression method, it is possible to prevent image quality from deteriorating. As a result, efficient code amount control can be achieved without exceeding the capacity of a recording medium such as a VTR, and distortion in the image compression process can be reduced.
[0104]
【The invention's effect】
As described above in detail, the image compression encoding apparatus and method according to the present invention efficiently and efficiently achieves a code amount from a DCT path or a DPCM path quantized by a number of quantization steps for each block. It can be selected to satisfy the code amount. As a result, efficient code amount control can be achieved without exceeding the capacity of a recording medium such as a VTR, and distortion in the image compression process can be reduced.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of an internal configuration of an image compression encoding apparatus to which the present invention has been applied.
FIG. 2 is a diagram for describing an internal configuration of a calculation unit.
FIG. 3 is a flowchart illustrating a processing procedure of an arithmetic processing unit.
FIG. 4 is a flowchart for explaining a case in which assignment (k) is calculated by replacing total (j−1) and total (j) with those that are far from the target code amount.
FIG. 5 is a diagram showing a configuration of an image compression encoding apparatus that does not use a binary search method.
FIG. 6 is a diagram for describing an arithmetic unit in an image compression encoding apparatus that does not use a binary search method.
FIG. 7 is a diagram illustrating a configuration of an image compression encoding apparatus including quantization for DPCM.
FIG. 8 is a diagram for describing an operation unit in an image compression encoding apparatus that involves quantization for DPCM.
FIG. 9 is a diagram for explaining a case where a binary search method is not used in an image compression encoding apparatus that involves quantization for DPCM.
FIG. 10 is a diagram showing a configuration of a conventional image compression encoding apparatus using the MPEG system.
[Explanation of symbols]
1, 5, 6 image compression coding apparatus, 2 lines system, 4 prediction systems, 11 terminals, 12 block division unit, 21, 23, 27 FIFO memory, 22 DCT unit, 24 binary search unit, 25 quantization unit, 26 1st variable length coding section, 28 DPCM section, 29 2nd variable length coding section, 30 selector, 31 buffer

Claims (15)

入力画像信号を夫々異なる量子化ステップにより量子化する第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を等長化単位の総符号量に応じて上記符号化方式選択単位で選択し、これを符号化する画像圧縮符号化装置において、
上記第1の圧縮方式又は上記第2の圧縮方式のうちいずれか一方を符号化方式選択単位毎に選択し、当該選択した圧縮方式についてセレクト信号を発信する選択手段と、
上記発信されたセレクト信号に応じて、上記第1の圧縮方式による符号量、或いは上記第2の圧縮方式による符号量を取り込む切替手段と、
上記切替手段を介して取り込まれた符号量を符号化方式選択単位毎に加算することにより符号化方式選択単位の総符号量を演算する演算手段と、
上記量子化ステップ毎に演算された総符号量を、等長化単位の目標符号量に近づくように制御する制御手段とを備えること
を特徴とする画像圧縮符号化装置。
A first compression method for quantizing an input image signal by different quantization steps, or a second compression method with a lower compression rate and a smaller loss than the first compression method, is used to calculate the total code amount in equal length units. In the image compression encoding apparatus that selects in the encoding method selection unit according to the above, and encodes this,
Selecting means for selecting one of the first compression method and the second compression method for each encoding method selection unit and transmitting a select signal for the selected compression method;
Switching means for taking in the code amount by the first compression method or the code amount by the second compression method according to the transmitted select signal;
Calculating means for calculating the total code amount of the coding system selection unit by adding the code amount captured via the switching unit for each coding system selection unit;
An image compression encoding apparatus comprising: control means for controlling the total code amount calculated for each of the quantization steps so as to approach a target code amount of an equal length unit.
上記制御手段は、上記量子化ステップ毎に演算された総符号量を線形補間することにより、等長化単位の目標符号量に近づくように制御すること
を特徴とする請求項1記載の画像圧縮符号化装置。
2. The image compression apparatus according to claim 1, wherein the control means performs linear interpolation on the total code amount calculated for each quantization step so as to approach the target code amount of the equal length unit. Encoding device.
上記選択手段は、上記第1の圧縮方式又は上記第2の圧縮方式のうち、符号量の小さい方を選択すること
を特徴とする請求項1記載の画像圧縮符号化装置。
2. The image compression encoding apparatus according to claim 1, wherein the selection unit selects a code having a smaller code amount from the first compression method or the second compression method.
上記第1の圧縮方式は、入力画像信号をDCT(Discrete Cosine Transform)変換し、上記DCT変換された画像信号を量子化すること
を特徴とする請求項1記載の画像圧縮符号化装置。
2. The image compression encoding apparatus according to claim 1, wherein the first compression method performs DCT (Discrete Cosine Transform) on an input image signal and quantizes the DCT-transformed image signal.
上記第2の圧縮方式は、可逆符号化(Lossless)方式により符号化すること
を特徴とする請求項1記載の画像圧縮符号化装置。
2. The image compression encoding apparatus according to claim 1, wherein the second compression scheme performs encoding by a lossless encoding scheme.
上記第2の圧縮方式は、入力画像信号をDPCM(Differential Pulse Code Modulation)によって符号化すること
を特徴とする請求項5記載の画像圧縮符号化装置。
6. The image compression encoding apparatus according to claim 5, wherein the second compression method encodes an input image signal by DPCM (Differential Pulse Code Modulation).
上記制御手段は、上記総符号量につき、上記目標符号量を越えないように制御すること
を特徴とする請求項1記載の画像圧縮符号化装置。
2. The apparatus according to claim 1, wherein said control means controls the total code amount so as not to exceed the target code amount.
入力画像信号を夫々異なる量子化ステップにより量子化する第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を等長化単位の総符号量に応じて符号化方式選択単位で選択し、これを符号化する画像圧縮符号化方法において、
上記第1の圧縮方式又は上記第2の圧縮方式のうちいずれか一方を符号化方式選択単位毎に選択し、当該選択した圧縮についてセレクト信号を発信し、
上記発信されたセレクト信号に応じて、上記第1の圧縮方式による符号量、或いは上記第2の圧縮方式による符号量を取り込み、
上記切替手段を介して取り込まれた符号量を符号化方式選択単位毎に加算することにより等長化単位の総符号量を演算し、
上記量子化ステップ毎に演算された総符号量を、等長化単位の目標符号量に近づくように制御すること
を特徴とする画像圧縮符号化方法。
A first compression method for quantizing an input image signal by different quantization steps, or a second compression method with a lower compression rate and a smaller loss than the first compression method, is used to calculate the total code amount in equal length units. In the image compression encoding method of selecting the encoding method selection unit according to the, and encoding this,
Selecting one of the first compression method or the second compression method for each coding method selection unit, transmitting a select signal for the selected compression,
According to the transmitted select signal, the code amount according to the first compression method or the code amount according to the second compression method is captured,
Calculate the total code amount of the equal length unit by adding the code amount fetched via the switching means for each coding system selection unit,
An image compression encoding method, characterized in that the total code amount calculated for each quantization step is controlled so as to approach a target code amount of an equal length unit.
上記量子化ステップ毎に演算された総符号量を線形補間することにより、等長化単位の目標符号量に近づくように制御すること
を特徴とする請求項8記載の画像圧縮符号化方法。
9. The image compression encoding method according to claim 8, wherein the total code amount calculated for each quantization step is linearly interpolated so as to approach the target code amount of the equal length unit.
上記選択において、上記第1の圧縮方式又は上記第2の圧縮方式のうち、符号量の小さい方を選択すること
を特徴とする請求項8記載の画像圧縮符号化方法。
9. The image compression encoding method according to claim 8, wherein, in the selection, one of the first compression method and the second compression method having a smaller code amount is selected.
上記第1の圧縮方式は、入力画像信号をDCT(Discrete Cosine Transform)変換し、上記DCT変換された画像信号を量子化すること
を特徴とする請求項8記載の画像圧縮符号化方法。
9. The image compression encoding method according to claim 8, wherein in the first compression method, an input image signal is subjected to DCT (Discrete Cosine Transform) and the DCT-transformed image signal is quantized.
上記第2の圧縮方式は、可逆符号化(Lossless)方式により符号化すること
を特徴とする請求項8記載の画像圧縮符号化方法。
9. The image compression encoding method according to claim 8, wherein the second compression method performs encoding by a lossless encoding method.
上記第2の圧縮方式は、入力画像信号をDPCM(Differential Pulse Code Modulation)によって符号化すること
を特徴とする請求項12記載の画像圧縮符号化方法。
13. The image compression encoding method according to claim 12, wherein in the second compression method, the input image signal is encoded by DPCM (Differential Pulse Code Modulation).
上記総符号量につき、上記目標符号量を越えないように制御すること
を特徴とする請求項8記載の画像圧縮符号化方法。
9. The image compression encoding method according to claim 8, wherein the total code amount is controlled so as not to exceed the target code amount.
入力画像信号を夫々異なる量子化ステップにより量子化する第1の圧縮方式、或いは上記第1の圧縮方式より低圧縮率でありロスの小さい第2の圧縮方式、を等長化単位の総符号量に応じて符号化方式選択単位で選択し、これを符号化することをコンピュータに実行させるためのプログラムにおいて、
上記第1の圧縮方式又は上記第2の圧縮方式のうちいずれか一方を符号化方式選択単位毎に選択し、当該選択した圧縮についてセレクト信号を発信し、
上記発信されたセレクト信号に応じて、上記第1の圧縮方式による符号量、或いは上記第2の圧縮方式による符号量を取り込み、
上記切替手段を介して取り込まれた符号量を符号化方式選択単位毎に加算することにより等長化単位の総符号量を演算し、
上記量子化ステップ毎に演算された総符号量を、等長化単位の目標符号量に近づくように制御すること
をコンピュータに実行させるためのプログラム。
A first compression method for quantizing an input image signal by different quantization steps, or a second compression method with a lower compression rate and a smaller loss than the first compression method, is used to calculate the total code amount in equal length units. In the program for causing the computer to execute the encoding method selection unit according to the selected in the encoding system selection unit,
Selecting one of the first compression method or the second compression method for each coding method selection unit, transmitting a select signal for the selected compression,
According to the transmitted select signal, the code amount according to the first compression method or the code amount according to the second compression method is captured,
Calculate the total code amount of the equal length unit by adding the code amount fetched via the switching means for each coding system selection unit,
A program for causing a computer to perform control so that the total code amount calculated for each quantization step approaches a target code amount of an equal length unit.
JP2003070729A 2002-03-28 2003-03-14 Image encoding apparatus and method, program, and recording medium Expired - Fee Related JP4042597B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003070729A JP4042597B2 (en) 2002-03-28 2003-03-14 Image encoding apparatus and method, program, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002092885 2002-03-28
JP2003070729A JP4042597B2 (en) 2002-03-28 2003-03-14 Image encoding apparatus and method, program, and recording medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007242128A Division JP4089753B2 (en) 2002-03-28 2007-09-19 Image compression encoding apparatus and method, program, and recording medium

Publications (3)

Publication Number Publication Date
JP2004007475A true JP2004007475A (en) 2004-01-08
JP2004007475A5 JP2004007475A5 (en) 2005-04-07
JP4042597B2 JP4042597B2 (en) 2008-02-06

Family

ID=30446284

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003070729A Expired - Fee Related JP4042597B2 (en) 2002-03-28 2003-03-14 Image encoding apparatus and method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4042597B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007043609A1 (en) * 2005-10-14 2007-04-19 Nec Corporation Image encoding method, device using the same, and computer program
JP2007181101A (en) * 2005-12-28 2007-07-12 Matsushita Electric Ind Co Ltd Image encoder, and image encoding method
WO2009157581A1 (en) * 2008-06-27 2009-12-30 ソニー株式会社 Image processing device and image processing method
JP2011130410A (en) * 2009-12-21 2011-06-30 Mtekvision Co Ltd Encoding method, decoding method and apparatus thereof
JP2011238086A (en) * 2010-05-12 2011-11-24 Fujifilm Corp Document distribution device and system
US8229235B2 (en) 2005-10-06 2012-07-24 Samsung Electronics Co., Ltd. Hybrid image data processing system and method
US8270744B2 (en) 2008-06-27 2012-09-18 Sony Corporation Image processing apparatus and image processing method
US8270745B2 (en) 2008-06-27 2012-09-18 Sony Corporation Image processing device and image processing method
RU2471306C2 (en) * 2008-06-27 2012-12-27 Сони Корпорейшн Device of image processing and method of image processing
US8509556B2 (en) 2007-09-12 2013-08-13 Sony Corporation Image coding apparatus and image coding method to generate a targeted amount of code
JP2016213528A (en) * 2015-04-28 2016-12-15 キヤノン株式会社 Image encoder, image processing apparatus, image coding method
JP2017055267A (en) * 2015-09-09 2017-03-16 キヤノン株式会社 Image encoding device, image processing apparatus, and image encoding method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8229235B2 (en) 2005-10-06 2012-07-24 Samsung Electronics Co., Ltd. Hybrid image data processing system and method
WO2007043609A1 (en) * 2005-10-14 2007-04-19 Nec Corporation Image encoding method, device using the same, and computer program
US8416850B2 (en) 2005-10-14 2013-04-09 Nec Corporation Image encoding method, device using the same, and computer program
JP4973871B2 (en) * 2005-10-14 2012-07-11 日本電気株式会社 Image encoding method, and apparatus and computer program using the same
JP2007181101A (en) * 2005-12-28 2007-07-12 Matsushita Electric Ind Co Ltd Image encoder, and image encoding method
US8509556B2 (en) 2007-09-12 2013-08-13 Sony Corporation Image coding apparatus and image coding method to generate a targeted amount of code
RU2479935C2 (en) * 2008-06-27 2013-04-20 Сони Корпорейшн Image processing device and image processing method
US8270744B2 (en) 2008-06-27 2012-09-18 Sony Corporation Image processing apparatus and image processing method
US8270745B2 (en) 2008-06-27 2012-09-18 Sony Corporation Image processing device and image processing method
RU2471306C2 (en) * 2008-06-27 2012-12-27 Сони Корпорейшн Device of image processing and method of image processing
US8374451B2 (en) 2008-06-27 2013-02-12 Sony Corporation Image processing device and image processing method for reducing the circuit scale
WO2009157581A1 (en) * 2008-06-27 2009-12-30 ソニー株式会社 Image processing device and image processing method
US8731052B2 (en) 2008-06-27 2014-05-20 Sony Corporation Image processing device and image processing method with feedback control
JP2011130410A (en) * 2009-12-21 2011-06-30 Mtekvision Co Ltd Encoding method, decoding method and apparatus thereof
JP2011238086A (en) * 2010-05-12 2011-11-24 Fujifilm Corp Document distribution device and system
JP2016213528A (en) * 2015-04-28 2016-12-15 キヤノン株式会社 Image encoder, image processing apparatus, image coding method
JP2017055267A (en) * 2015-09-09 2017-03-16 キヤノン株式会社 Image encoding device, image processing apparatus, and image encoding method

Also Published As

Publication number Publication date
JP4042597B2 (en) 2008-02-06

Similar Documents

Publication Publication Date Title
US8345744B2 (en) Image compression system with coding quantity control
AU2006320064B2 (en) Image encoding/image decoding method and image encoding/image decoding apparatus
RU2414093C2 (en) Method and apparatus, and video coding/decoding programme
EP1497990B1 (en) Method and device for indicating quantizer parameters in a video coding system
KR100596706B1 (en) Method for scalable video coding and decoding, and apparatus for the same
US5805222A (en) Video coding apparatus
RU2471306C2 (en) Device of image processing and method of image processing
KR101263813B1 (en) Method and apparatus for selection of scanning mode in dual pass encoding
US20060140267A1 (en) Method and apparatus for providing intra coding frame bit budget
EP1833256B1 (en) Selection of encoded data, setting of encoded data, creation of recoded data, and recoding method and device
KR20080031344A (en) Method, module, device and system for rate control provision for video encoders capable of variable bit rate encoding
JPWO2009157577A1 (en) Image processing apparatus and image processing method
US20050013360A1 (en) Image encoding and decoding apparatus and method
US8681864B2 (en) Video coding apparatus and video coding control method
US8948242B2 (en) Encoding device and method and multimedia apparatus including the encoding device
JP4042597B2 (en) Image encoding apparatus and method, program, and recording medium
US7428339B2 (en) Pseudo-frames for MPEG-2 encoding
JP4089753B2 (en) Image compression encoding apparatus and method, program, and recording medium
JP2009081830A (en) Encoding processing method and device in moving image compression encoding
JP5136470B2 (en) Moving picture coding apparatus and moving picture coding method
US20090290636A1 (en) Video encoding apparatuses and methods with decoupled data dependency
JP2008271213A (en) Image encoding device
JP2009200871A (en) Encoding apparatus
JP4281667B2 (en) Image encoding device
WO2007125574A1 (en) Video transferring apparatus

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040427

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040427

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061031

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070313

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070919

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: 20071023

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071105

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101122

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101122

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121122

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121122

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131122

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees