Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3770466B2 - Image coding rate conversion apparatus and image coding rate conversion method - Google Patents
[go: Go Back, main page]

JP3770466B2 - Image coding rate conversion apparatus and image coding rate conversion method - Google Patents

Image coding rate conversion apparatus and image coding rate conversion method Download PDF

Info

Publication number
JP3770466B2
JP3770466B2 JP2001014249A JP2001014249A JP3770466B2 JP 3770466 B2 JP3770466 B2 JP 3770466B2 JP 2001014249 A JP2001014249 A JP 2001014249A JP 2001014249 A JP2001014249 A JP 2001014249A JP 3770466 B2 JP3770466 B2 JP 3770466B2
Authority
JP
Japan
Prior art keywords
data
image
encoded
dct coefficient
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2001014249A
Other languages
Japanese (ja)
Other versions
JP2002218471A (en
Inventor
一彦 森田
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2001014249A priority Critical patent/JP3770466B2/en
Publication of JP2002218471A publication Critical patent/JP2002218471A/en
Application granted granted Critical
Publication of JP3770466B2 publication Critical patent/JP3770466B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、所定の転送レートで符号化される画像符号化データのレート変換に係り、特に符号化された動画像を記録、伝送、または表示する装置におけるレート変換を簡単な構成により行うことの出来る画像符号化データのレート変換方法、及び画像符号化レート変換装置に関する。
【0002】
【従来の技術】
テレビジョン信号などの動画像信号を高能率符号化する技術として、国際標準としてMPEG−2(moving picture experts group -2)がISO/IEC(International Organization for Standardization / International Electrotechnical Commission)により規定されている。
【0003】
そのMPEG−2は、動画像を構成する「フレーム」画像を「マクロブロック」と呼ばれる16×16画素のブロックに分割し、各マクロブロック単位ごとに、時間的に未来または過去に所定の数フレーム離れた参照画像と被符号化画像との間で「動きベクトル」と呼ばれる動き量を求め、その動き量を基に参照画像から被符号化画像を符号化する「動き補償予測」技術と、その動き補償予測の誤差信号または被符号化画像そのものに対して、直交変換技術の一つであるDCT(Discrete Cosine Transform :離散コサイン変換)を用いて画像情報を周波数情報量に変換して後に視覚的に有意な情報のみを得るようにして圧縮符号化を行う「変換符号化」技術と、の2つの画像符号化の要素技術を基にして規定されている。
【0004】
そのようにして規定される技術により画像符号化された信号の転送速度の設定は、単位時間当りの伝送容量がほぼ一定にされて伝送される固定転送レートと、一定の範囲内で伝送容量が可変されて転送される可変転送レートとの2種類の設定方法が用いられている。
【0005】
そして、MPEG−2標準が用いられて符号化された信号はデジタル放送、DVDなどの記録メディア、及びATM(Asynchronous Transfer Mode:非同期伝送モード)等の通信路などに用いられ、それらの用途に合わせて単位時間当りのビットストリームの伝送容量を示すビットレートは一定の範囲内で自由に選択することが出来るようになされている。
【0006】
そのように、用途によって異なった転送レートの符号化信号が用いられているため、その異なる転送レートの符号化信号を、例えば7Mbps(Mビット/秒)のデジタル放送の信号を、例えば4Mbpsの記録レートに設定されているデジタルレコーダに記録することはできない。
【0007】
このときに、レコーダの記録容量をデジタル放送の信号レートに合わせて大きなビットレートに設定して記録する方法はあるが、その場合はレコーダの記録媒体の記録領域を大きく確保する必要があり、そのため記録時間が減少してしまうなどの問題が生じてしまい好ましくない。
【0008】
そこで、7Mbpsのビットレートの信号を4Mbpsの新たなビットレートの信号にレート変換して後にレコーダに記録するようにし、所定の記録時間を確保するようにする。
【0009】
そしてそのレート変換は、固定転送レートで放送されるビットストリームを、可変転送レートで記録したり、またその逆の可変転送レートで放送されたビットストリームを固定転送レートで記録するといった場合もあり、そのようなビットレートの固定、可変の設定方法を切替える際にもレート変換処理が必要となる。
【0010】
このようにレート変換を行って、ある転送レートのビットストリームから他の転送レートのビットストリームを生成する方法として、従来は供給されるビットストリームを復号器で画素レベルまで復号して復号画像を生成した後に、その生成された復号画像を符号化器に供給して再度符号化を行う、いわゆる「再符号化」の方法が用いられてきた。
【0011】
しかし再符号化は、復号器と符号化器の両者が必要であり、その他にも復号画像を一次記憶するための画像メモリが符号化のために必要とされ、回路規模が増大してしまう、また符号化及び再符号化の処理に遅延時間が生じてしまう等の課題があった。
【0012】
その課題を解決するレート変換方法として、入力ビットストリームを画素レベルまでの復号を行わずに、可変長復号(VLD;decoding of variable length coding)、及び逆量子化を行って得られるDCT係数に対し、異なった値の量子化スケールで再量子化を行い、所要のビットレートのビットストリームを得るレート変換方法が、特開平7−312756号公報「圧縮動画像符号信号の情報量変換回路、装置、及び方法」に開示されている。
【0013】
図16にそのようにしてなる従来例におけるレート変換装置の構成を示す。
同図において、供給された4Mbpsのビットストリームはデータ分離回路81により画像信号と他の信号部分とに分離され、画像信号は逆VLC(variable length coding)回路82によりVLCされた信号が復号され、復号して得られる信号は逆量子化器83で逆量子化が行われて後にビットレート制御回路84により制御される量子化器85により量子化が行われ、量子化して得られる信号がVLC回路86でVLCされ、VLCされて得られた信号はデータ分離回路81により分離された信号と結合回路87で結合され、結合されて得られる信号はバッファ回路88に一時記憶され、一時記憶された2Mbpsに転送レートの変換された信号は必要に応じてバッファ回路88より読み出されてレート変換装置よりの出力信号として供給されるようになっている。
【0014】
このようにして、逆量子化、及び再量子化によりレート変換を行った信号を得ることができるが、その他のレート変換方法として、レート変換後のビットレートが変換前より低くなるような場合には、入力ビットストリームの量子化後DCT係数の部分に相当する可変長符号を調整して、符号長を短縮し、所要のビットレートのビットストリームを得るレート変換方法が、特開平11−317942号公報「画像符号化装置」に開示されている。
【0015】
【発明が解決しようとする課題】
ところで、MPEG−2方式などで符号化して得られた信号には、その符号化パラメータに関する情報がヘッダ信号としてその符号化された信号に前置されてビットストリーム信号が構成される。
【0016】
従って、その符号化信号のレート変換処理により符号化パラメータに変更が生じたときは、そのヘッダ信号の内容を符号化信号の変更に応じて更新する必要がある。
【0017】
そして、そのヘッダ信号の更新は、前述の従来例におけるDCT係数部分の可変長符号を直接調整してレート変換を行うような方法では、例えば非イントラマクロブロックのDCT係数を調整する場合等で、レート変換によってDCT係数の個数が変更され、個数が0になされる場合などではそれに応じてCHP(Coded Block Pattern)などのヘッダ信号の更新が必要となる。
【0018】
しかし、そのヘッダ信号の更新は、そのヘッダ信号に関る全ての画像信号のレート変換処理がなされた後でないとヘッダ信号の確定がなされないため、その間変換処理中の画像信号を一時記憶しておく必要があり、そのために装置の構成が複雑になる、及びレート変換処理のために遅延時間が生じてしまうなどの課題があった。
【0019】
そして、そのような課題を生じなくするため、そのヘッダ信号に変更がなされない程度でレート変換を行うような方法が考えられるが、特に低いレートへの変換は困難であり、低レートのストリームを得るためにDCT係数を残すべきブロックの係数を粗いスケールで量子化する、あるいは係数を削減してしまうなどの処理がなされると画質劣化が大きくなるなど、それらのレート変換方法は有効に活用されるには至ってなかった。
【0020】
そこで本発明は、MPEG−2などの画像データをマクロブロックに分割して符号化を行うデータ構造の符号化方式に対して、そのデータ構造を同一に保ちつつ転送レートの変換を行なうようにする、即ち分割されたそれぞれのマクロブロックは変換前と同一のマクロブロックタイプ及びCBP(coded block pattern)の信号に変換するようにする。
【0021】
そのために変換前に符号化されたDCT係数が存在するブロックについては、変換後においても少なくとも1つの係数を残すこととし、又再量子化によってレート変換を行う場合は、変換前の量子化スケールの更新マクロブロック位置と同一の位置でのみ量子化スケールの更新を行うようにする。
【0022】
この様にして行うレート変換で、変換操作するデータは、DCT係数部分の可変長符号を操作するときはDCT係数部分のみを、又再量子化によりレート変換を行うときはDCT係数部分と量子化スケールコードのみとすることができるなどレート変換に伴う処理を簡素化することができる、画質劣化の少ない画像符号化レート変換装置及び画像符号化レート変換方法を提供しようとするものである。
【0023】
【課題を解決するための手段】
本発明は、上記課題を解決するために以下の1)及び2)の手段より成るものである。
すなわち、
【0024】
1) 単位ブロックをDCT変換して得られた複数の係数を第1の量子化ステップで量子化及び可変長符号化された第1の符号化量子化データを用いて得られた第1の画像符号化データを前記第1の量子化ステップよりも広いステップ幅の第2の量子化ステップで量子化及び可変長符号化された第2の符号化量子化データを用いて得られた第2の画像符号化データに変換る画像符号化レート変換装置であって、
前記第1の画像符号化データをヘッダデータ、前記第1の符号化量子化データ及び前記第1の符号化量子化データ以外のデータとに分離するヘッダ分離部と
前記ヘッダ分離部で分離された前記第1の符号化量子化データを可変長復号して第1の量子化データを出力する可変長復号部と、
前記第1、第2の画像符号化データの符号量情報に基づいて、前記第2の量子化ステップを出力する符号量制御部と、
前記第1の量子化データの逆量子化を行って第1のDCT係数データを得、前記第2の量子化ステップに基づいて、前記第1のDCT係数データを再量子化して第2のDCT係数データを生成する逆量子化・再量子化部と、
前記第2のDCT係数データの中に含まれる係数値が全て0であった場合には、前記第1のDCT係数データの係数を残す指示を前記逆量化・再量子化部に行って前記逆量子化・再量子化部から第3のDCT係数データを出力させる係数選択部と、
前記第3のDCT係数データを可変長符号化して前記第2の符号化DCT係数データを生成する可変長符号化部と、
前記第2の符号化DCT係数データと分離された前記ヘッダデータと前記第1の符号化量子化データ以外のデータとを結合して前記第2の画像符号化データを出力するヘッダ結合部と、
を備えたことを特徴とする画像符号化レート変換装置。
【0025】
単位ブロックをDCT変換して得られた複数の係数を第1の量子化ステップで量子化及び可変長符号化された第1の符号化量子化データを用いて得られた第1の画像符号化データを前記第1量子化ステップよりも広いステップ幅の第2の量子化ステップで量子化及び可変長符号化された第2の符号化量子化データを用いて得られた第2の画像符号化データに変換る画像符号化レート変換方法であって、
前記第1の画像符号化データをヘッダデータ、前記第1の符号化量子化データ及び前記第1の符号化量子化データ以外のデータとに分離し、
前記分離された前記第1の符号化量子化データを可変長復号して第1の量子化データを出力し、
前記第1、第2の画像符号化データの符号量情報に基づいて、前記第2の量子化ステップを出力し、
前記第1の量子化データの逆量子化を行って第1のDCT係数データを得、前記第2の量子化ステップに基づいて、前記第1のDCT係数データを再量子化して第2のDCT係数データを生成し、
前記第2のDCT係数データの中に含まれる係数値が全て0であった場合には、前記第1のDCT係数データの係数を残す指示を行って第3のDCT係数データを出力させ、
前記第3のDCT係数データを可変長符号化して前記第2の符号化DCT係数データを生成し、
前記第2の符号化DCT係数データと分離された前記ヘッダデータと前記第1の符号化量子化データ以外のデータとを結合して前記第2の画像符号化データを出力することを特徴とする画像符号化レート変換方法。
【0031】
【発明の実施の形態】
以下、本発明の画像符号化レート変換装置及び画像符号化レート変換方法の実施形態につき好ましい実施例により説明する。
図1は、その符号化信号のデータ構造を同一に保ちつつ転送レートの変換を行なう画像符号化データのレート変換方法を搭載した画像符号化レート変換装置の構成であり、以下図と共に説明する。
【0032】
同図に示す画像符号化レート変換装置10は、逆量子化、及び再量子化によってレート変換を行う装置であり、その装置はDEMUX(de-multiplexing)部11、入力符号量カウンタ12、ヘッダ分離部13、ヘッダデータ格納部14、ヘッダ結合部15、出力符号量カウンタ16、再MUX(multiplexing)部17、及び逆量子化、再量子化によりレート変換を行う画像レート変換部20より構成される。
【0033】
次に、このように構成される画像符号化レート変換装置10の動作について述べる。
まず、所定のデータレートでMPEG−2(moving picture experts group -2)方式により符号化されたビットストリームは、DEMUX部11で符号化された画像信号と、その画像信号に付随されるオーディオ信号、文字情報等の補助信号、及びそれらの信号の再生方法の制御、同期等を行うためのMPEG−2システムに関るその他の信号とに分離される。
【0034】
その分離して得られるその他の信号部分は再MUX部17に供給されると共に、分離して得られる画像信号は入力符号量カウンタ12に供給され、そこで画像信号の符号量がカウントされ、カウントして得られた信号の一部は画像レート変換部20に供給され、他の一部はヘッダ分離部13に供給される。
【0035】
そのヘッダ分離部13では、供給された画像信号よりシーケンスヘッダ、及びピクチャヘッダなどのスライス層より上の層のデータが分離され、その分離されて得られた信号はヘッダデータ格納部14に供給されて一時格納され、そこに一時格納された信号は必要に応じてヘッダ結合部15に供給されると共に、他の一部のシーケンスヘッダに記録された変換前ビットレート情報、及び符号化された画像信号は画像レート変換部20に供給される。
【0036】
その画像レート変換部20では、入力符号量カウンタ12より供給された変換前ビットレート情報、及び出力符号量カウンタ16より供給される変換後ビットレート情報を基にし、ヘッダ分離部13より供給される符号化された画像信号の画像レート変換われ、変換して得られる変換後画像信号はヘッダ結合部15に供給されて、ヘッダデータ格納部14より供給されたヘッダ信号と結合され、結合して得られた信号は出力符号量カウンタ16に供給される。
【0037】
その出力符号量カウンタ16に供給された信号は、符号化された信号のビットレートが計測されて前述の変換後ビットレート情報が得られると共に、出力符号量のカウントされた信号は再MUX部17に供給され、前述の画像信号に付随されるオーディオ信号、及びMPEG−2システムに関るその他の信号部分が付加されてMPEG−2ストリーム出力信号として画像符号化レート変換装置10より出力される。
【0038】
このようにして、画像符号化レート変換装置10より符号化レートの変換されたMPEG−2ストリームが出力信号として供給されるが、次にその変換装置の要部である画像レート変換部20の動作について、MPEG−2符号化方式で行われる符号化の動作と共に述べる。
【0039】
図2に、MPEG−2により規定される動画像信号の符号化を行うMPEG−2エンコーダの構成を示す。
【0040】
そのMPEG−2エンコーダ60は、減算器61、DCT(Discrete Cosine transform)器62、量子化器63、符号量制御器64、可変長符号化器65、バッファ66、逆量子化器71、IDCT(Inverse Discrete Cosine transform)器72、加算器73、フレームメモリ74、及び動き補償予測器75より構成される。
【0041】
このように構成されるMPEG−2エンコーダ60の動作について述べる。
まず、供給される動画像信号は減算器61の片方の入力端子に供給されると共に動き補償予測器75に供給されて、動画像信号の動ベクトルが求められ、その求められた動ベクトルを基に動き予測信号が生成され、生成された動き予測信号は加算器73の一方の入力端子に供給される、又その動き予測信号は減算器61に減算用入力信号として供給される。
【0042】
その減算器61からは、供給された動画像信号に対して動き予測信号が減算された差信号がDCT器62に供給され、そのDCT器62では供給された差信号の離散余弦変換がなされ、余弦変換して得られた余弦周波数成分は量子化器63に供給される。
【0043】
その量子化器63では、符号量制御部64より供給される制御信号を基にしてDCT器62より供給された余弦周波数成分のうち、画像符号化に有効とされる周波数成分を量子化信号として得、その得られた量子化信号は可変長符号化器65に供給されると共に、逆量子化器71にも供給される。
【0044】
その逆量子化器71に供給された量子化信号は逆量子化されて、近似的な余弦周波数成分が得られ、その得られた近似的な余弦周波数成分はIDCT器72に供給されて近似的な画像の差信号が得られる。
【0045】
その得られた近似的な画像の差信号は加算器73に供給され、前述の動き予測信号と加算されるようにして近似的な画像信号が復号され,、その復号された画像信号はフレームメモリ74に蓄積されると共に、フレームメモリ74に蓄積された画像信号は次に入来される動画信号のフレーム画像に対する動き補償予測画像の生成に用いられる。
【0046】
このようにして動き補償予測画像が生成されながら動画像信号の符号化がなされるが、前述の可変長符号化器65に供給された量子化信号はそこで可変長符号化され、可変長符号化されて得られた信号はバッファ66に一時記憶されて符号化ビットストリームとして供給されると共に、そのバッファ66に一時記憶された信号の一部は符号量制御部64に供給され、その符号量制御部64では生成されたビットストリームの符号量が検出され、検出して得られる符号量情報を基に前述の量子化器63の量子化の粗さを制御するための制御信号が生成されるようになされ、量子化器63では所定のビットレートによる符号化信号が生成される様になされている。
【0047】
以上の様に、供給される動画像信号が動き補償予測手法、及び変換符号化手法が用いられて画像符号化が行われる。
次に、その画像符号化のなされる画像信号は所定のフレーム画像毎の符号化ピクチャ構成とされて動き補償予測がなされるが、次にそのMPEG−2方式において動き補償予測のなされる予測フレーム画像の構成について述べる。
【0048】
図3に、符号化装置60によりなされる動き補償予測に関し、その動きベクトルが求められて動き補償の行われるピクチャ画像の関連を説明するための符号化ピクチャ構造を示す。
【0049】
同図に示すその動き補償予測による符号化ピクチャの構造は、I(Intra-coded)ピクチャ(フレーム内符号化)、P(Predictive-coded)ピクチャ(順方向予測符号化)、及びB(Bidirectionally predictive-coded)ピクチャ(双方向予測符号化)と呼ばれる、動き予測方法の異なる3種類のピクチャの組合せによって構成されている。
【0050】
このような動き予測構造で構成されるフレーム単位の画像信号は、通常のビデオ信号で毎秒30フレーム、映画素材の場合は毎秒24フレームの画像信号として構成されるが、次にその画像信号の変換符号化について述べる。
【0051】
図4に、その変換符号化に関する画像分割の方法を示す。
同図において、フレーム画像は幅が16本の走査線で構成されるスライスと称される横長の画像に分割されて画像圧縮処理がなされることを示している。
【0052】
そして、その画像圧縮処理のための画素単位は、スライスを横方向に16画素毎に分割し、分割して得られる16画素×16走査線(画素)の画素単位がマクロブロックと呼ばれる画素単位である。
【0053】
そして、その画素単位であるマクロブロックは、8画素×8画素の4個の輝度信号ブロックと、青、及び赤のそれぞれが8画素×8画素である色差信号ブロックとの合計6ブロックに分割されて変換符号化がなされる。
【0054】
このようにして変換符号化のなされる画像データは、スライスで構成される画像データに関る符号化データよりなるスライス層、マクロブロック毎のデータに関るマクロブロック層、そしてマクロブロックを構成する6つのブロックを量子化して得られるDCT係数データよりなるブロック層などの各層のデータよりなる符号化データとして構成される。
【0055】
この様にして構成される各層のデータは、シーケンスヘッダ、ピクチャヘッダなどのヘッダに続けて伝送されるが、その様にして伝送されるシリーズな信号であるデータはビットストリームと呼ばれる。
【0056】
図5に、その様にして伝送されるMPEG−2におけるビットストリームのデータ構造を示す。
同図において、伝送されるデータはヘッダデータ、スライス層データ、マクロブロック層データ、及びブロック層データより構成されることを示している。
【0057】
図6に、マクロブロック層におけるデータ構造を示す。
そのマクロブロック層におけるデータは、マクロブロックエスケープ、マクロブロックアドレスインクリメント、マクロブロックタイプ、モーションタイプ、DCTタイプ、Qスケールコード、モーションベクトル、そしてCBP(coded block pattern:コーデドブロックパターン)の順にそれぞれが配列されている。
【0058】
そして、これらの配列中にあるマクロブロックタイプは、I、P、Bで示されるピクチャタイプ毎に予測モード、量子化スケールコードの有無、符号化係数の有無を示しており、その量子化スケールコードはスライス内において当該マクロブロックで量子化スケールが更新された場合にのみ、更新された値が伝送されるようになされている。
【0059】
次に、そのI、P、Bで与えられるピクチャ毎のマクロブロックタイプのVLC(variable length coding)テーブルを示す。
図7は、それらのピクチャの中のIピクチャに対するマクロブロックタイプのVLCテーブルであり、そのコード(code)が「1」のときはイントラコードであることがDescriptionの位置に示されており、「01」のときは量子化スケールコードが後に配置されていることを示している。
【0060】
そして、図8はPピクチャに対するマクロブロックタイプのVLCテーブルであり、そのコード(code)に対する記述(description)により動き予測符号化(MC;Motion Compensation)されている状態を、また量子化スケールコード(Quant)の状態を示している。
【0061】
また、図9はBピクチャに対するマクロブロックタイプのVLCテーブルであり、前方(Fwd:forward)画像からの予測、及び後方(Bwd:backward)画像からの予測に関する予測符号化データの状態を示している。
【0062】
このようにして、マクロブロックタイプ情報が配置されてビットストリームとして伝送されるが、マクロブロック層の最後にCBPが配置され、その後に続くブロック層の量子化後DCT係数データが6つのブロックの各々に存在するか否かを示している。
【0063】
そして、そのマクロブロックタイプが面内符号化画像データであるイントラマクロブロックの場合には、全てのブロックに係数データが少なくとも1つは存在するようにされているので、マクロブロック層の最後のCBPは存在しないようにされている。
【0064】
また、1つのマクロブロック内において全てのブロックに係数が存在しない場合は、そのマクロブロックは"Not Coded"とされる。
【0065】
さらに、フレーム構造符号化の場合で、モーションタイプ(動き予測タイプ)がフレーム予測であり、Pピクチャでは動きベクトルが全て"0"である場合(これを"No MC"という)に、"Not Coded"となると、そのマクロブロックはスキップ、即ち符号化を行わない、とすることが出来る。
【0066】
同様にして、モーションタイプ(動き予測タイプ)がフレーム予測であり、前方予測か後方予測か双方向予測かなどのBピクチャの予測方向と、動きベクトルが同じスライスの直前のマクロブロックと同一である場合には、"Not Coded"としてそのマクロブロックをスキップ、即ち符号化を行わない、とすることが出来る。
【0067】
このようにしてマクロブロック層のデータが配列され、そのマクロブロック層の次にはブロック層のデータが配列されるが、次にそのブロック層のデータ構造について述べる。
図10に、そのブロック層におけるデータ構造を示す。
【0068】
同図において、ブロック層はイントラマクロブロックの画像データをDCT演算して得られる画像のDC(直流)係数、及び余弦周波数成分であるAC(交流)係数と、それらの係数の終了後に伝送されるEOB(end of block)の順に配列されている。
【0069】
そして、ブロック層における量子化後DCT係数データの符号化はイントラマクロブロックとそれ以外のマクロブロックとで異なっており、イントラマクロブロックの場合は最初の係数であるDC係数のみがあり、それはAC係数と異なる方法によりVLC(variable length coding;可変長符号化)がなされる。
【0070】
即ち、イントラマクロブロックのDC係数以外の係数、及びその他のマクロブロックの係数は、指定された順番に並び替えられた後、その順番で先行するゼロ係数の個数(ラン)と、非ゼロ係数の値(レベル)が調べられ、それらのランとレベルを1組にまとめて示される2次元VLCテーブルによって符号化がなされる。
【0071】
そして、その2次元VLCテーブルによる符号化は非ゼロ係数が無くなった時点でEOB(エンドオブブロック)と呼ばれる符号が付加され、そのブロックの符号化を終了するようになされている。
【0072】
以上、動画信号がMPEG−2により符号化され、符号化された画像データを伝送するために行う所定の方法により配列されて生成されるビットストリームについて述べた。
【0073】
次に、このようにして生成された所定のビットレートによる符号化信号を、他の目的とするビットレートの信号に変換する方法について述べる。
【0074】
その変換は、例えばMPEG−2方式によりデジタル放送される受信信号を、デジタルVTRに記録するに際し、記録時間を長くするためなどで放送よりは小さなビットレートに変換して記録する場合などである。
【0075】
そして、そのビットレートの変換をデジタル信号をアナログ信号に変換してから再度デジタル信号に変換して行う場合では、その為の処理時間が長くなり、例えば供給される信号の記録と再生を同時に行う記録信号の同時モニタをするときなどでその遅延時間が障害となり、更にデジタル信号をアナログ信号に変換した後に、再度デジタル信号に変換するときは変換により画質劣化が生じるため、そのような再変換により画質劣化することのない画像符号化レート変換装置の構成を実現することを目的とするものであり、以下複数の実施例と共に述べる。
【0076】
図11に、第1の実施例による画像符号化レート変換装置の構成を示す。
その画像符号化レート変換装置10は、逆量子化及び再量子化によってレート変換を行う装置である。
【0077】
そして、その画像符号化レート変換装置10はDEMUX(de-multiplexing)部11、入力符号量カウンタ12、ヘッダ分離部13、ヘッダデータ格納部14、ヘッダ結合部15、出力符号量カウンタ16、再MUX(multiplexing)部17、可変長復号部21、逆量子化・再量子化部22、符号量制御部23、係数選択部24、及び可変長符号化部25より構成される。
【0078】
次に、このように構成される画像符号化レート変換装置10の動作について述べる。
【0079】
まず、所定のデータレートでMPEG−2方式により符号化されたビットストリームは、DEMUX部11で符号化された画像信号と、その画像信号に付随されるオーディオ信号、及びMPEG−2システムに関るその他の信号部分とに分離され、その分離されて得られるその他の信号部分は再MUX部17に供給されると共に、画像信号は入力符号量カウンタ12に供給され、そこで画像信号の符号量がカウントされ、カウントされた信号の一部は符号量制御部23に供給されると共に、他の一部はヘッダ分離部13に供給される。
【0080】
そのヘッダ分離部13では、供給された画像信号よりシーケンスヘッダ及びピクチャヘッダなどのスライス層より上位の層のデータが分離され、その分離された信号はヘッダデータ格納部14に供給されて一時格納されると共に、他の一部であるシーケンスヘッダに記録された変換前ビットレート情報は符号量制御部23に供給され、更に他の一部は可変長復号部21に供給される。
【0081】
その可変長復号部21に供給されてヘッダデータが分離された信号は、可変長復号部21でDCT(discrete cosine transform)係数部分とそれ以外の部分とに分けられてDCT係数部分は可変長復号され、復号して得られる変換前量子化スケールコードは逆量子化・再量子化部22に供給される。
【0082】
そして、復号して得られるスライス層、マクロブロック層に記録されている変換前量子化スケールコード、及びそのマクロブロックの画面中の位置情報が符号量制御部23に供給される。
【0083】
その符号量制御部23には、変換前ビットレート情報、変換後目標ビットレート情報、変換前量子化スケールコード、そのマクロブロック位置情報、入力符号量カウンタ12と出力符号量カウンタ16から供給される変換前後の各画像の符号量情報、及び逆量子化・再量子化部22でカウントされる各マクロブロックのレート変換前と変換後のそれぞれの符号量情報などが供給される。
【0084】
これらの情報が供給された符号量制御部23では、それらの情報を基に各画像の変換前、及び変換後の量子化スケールに対する画像毎の符号量の平均値が求められ、その求められた符号量に対して予め定めた方法、例えばMPEG−2 Test Model 5のStep 1,2に規定される方法により符号量制御を行うことにより、変換後の量子化スケールを定め、定められた変換後の量子化スケールは逆量子化・再量子化部22に供給される。
【0085】
その逆量子化・再量子化部22における符号量制御は、通常の符号化時には各マクロブロック毎に任意に量子化スケールを用いることが出来る、即ちレート変換時には任意の量子化スケールコードへの変更が可能とされるが、ここでは変換前のデータに量子化スケールコードが存在するマクロブロック位置でのみ、変換後の量子化スケールを変更可能とする。
【0086】
図12に、レート変換前、および後における量子化スケールコードの存在する様子を示す。
同図において、左側の図がレート変換前のスケールコードの存在する状態で、右側はレート変換後のスケールコードの存在を示している。
【0087】
そして、それぞれの図の左側がスライス層の値でありその右にマクロブロック層における値を示し、網点のかけられている個所が量子化スケールコードの存在している位置である。
【0088】
このようにして、レート変換後の量子化スケールコードはレート変換前に存在していたマクロブロック位置の一部のマクロブロック位置に存在する様になされており、その変換後の量子化スケールは逆量子化・再量子化部22に供給される。
【0089】
その逆量子化・再量子化部22には、可変長復号部21で可変長復号された変換前量子化スケールコード及びDCT係数部分が供給され、そのDCT係数部分は変換前量子化スケールコードより得られる変換前量子化スケールにより逆量子化変換され、逆量子化変換されて得られたデータは符号量制御部23より供給された変換後の量子化スケールに基づいて再量子化される。
【0090】
即ち、その逆量子化・再量子化部23における逆量子化、及び再量子化の処理は、供給された変換前量子化スケール及び変換後量子化スケールの比較を行い、比較して得られる大小関係により処理がなされるが、その逆量子化及び再量子化処理には次の3つの場合がある。
【0091】
第1の場合は変換前量子化スケールと変換後量子化スケールが等しい場合であり、その場合は逆量子化及び再量子化の処理は行われず、変換前のDCT係数部分がそのまま変換後のDCT係数部分として供給される。
【0092】
第2の場合は変換前量子化スケールが変換後量子化スケールよりも大きい場合であり、その場合は変換前のそれぞれのDCT係数に対し、変換前量子化スケールを変換後量子化スケールで除した比の値が乗じられ、乗じて得られる更新されたDCT係数値が変換後のDCT係数として供給される。
【0093】
この第2の場合では、レート変換処理により更新されたDCT係数値が大きくなるので、係数値が0となることにより削除されてしまうなどによりデータ構造が同一に保たれなくなることはないので、更新されたDCT係数値に対する係数選択などの処理の必要はないこととなる。
【0094】
そして第3の場合は、変換前量子化スケールが変換後量子化スケールよりも小さい場合であり、このときは変換前のDCT各係数に対して、変換前量子化スケールを変換後量子化スケールで除した比の値が乗じられて更新されたDCT係数値が求められるが、この場合では更新されたDCT係数値は小さな値となるため、場合によっては更新されたDCT係数全てが0になるブロックが生じる可能性がある。
【0095】
そして、更新されたDCT係数値が全て0となり、そのブロックで削除されてしまうことによりデータ構造の同一性が保たれなくなることを防ぐための、更新された係数値が0になったブロックについては変換前DCT係数が係数選択部24に供給され、そこで変換後DCT係数の全てが0になることを防ぐための係数選択処理を行う。
【0096】
その係数選択部24でなされる係数選択処理は、まず逆量子化・再量子化部22より供給される逆量子化前の変換前DCT係数のうち、残すべき係数の決定を行う。
【0097】
その第1の係数決定方法は、逆量子化前の変換前DCT係数の絶対値の最大値に対し、その位置における変換後DCT係数値を"1"または"−1"とし、その他は"0"とするもので、最大値が複数あるブロックについては、2次元VLCで符号化したときに最も符号長が短くなる位置における係数値を、そしてそのときの符号長のそれぞれが同一である場合はゼロランが最も短くなる位置における係数値を選択することにより係数の決定を行う。
【0098】
第2の係数決定方法は、変換前DCTの係数値にかかわらず、係数ブロックが輝度信号か、又は青、赤の色差信号であるか、さらにまた変換前DCT係数の係数分布によって変換後画像の画質に与える影響が最も少なく、かつ2次元VLCの符号長が短くなる係数の位置を予め定めておき、その定められた位置の係数を変換後のDCT係数の位置であるとして係数の決定を行う。
【0099】
このようにして、第1、又は第2の方法により係数選択部24で残すべき係数、又は置換すべき係数の位置が決定される逆量子化・再量子化部22から供給され再量子化された信号全て0にならないブロックのDCT係数として、可変長符号化部25に供給される。
【0100】
このようにして全ては0にならないブロックのDCT係数が可変長符号化部25に供給されるが、その供給されるマクロブロックの信号が面内符号化されるイントラマクロブロックの信号である場合は、仮に全てのDCT係数が0になってもデータ構造の変更はなされないので、イントラマクロブロックに対するこのような係数選択部24の処理は行わなくてもよい。
【0101】
以上の様にして、可変長符号化部25には、逆量子化・再量子化部22に供給されなかった可変長復号されたデータも供給される。
【0102】
そして可変長符号化部25では、その供給されたデータのうちの量子化スケールコードは、変換前の量子化スケールコードが存在するマクロブロックの位置における、符号量制御部23で決定された変換後量子化スケールを示すコードに変換されて、変換されたコードに置換され、そこで置換されたコードの可変長符号化がなされる。
【0103】
なお、符号量制御の状態によっては、同じスライス内でその直前に存在する量子化スケールコードと更新された量子化スケールコードと同じ値となり、実際には量子化スケールコードが不要であるマクロブロックも存在するが、その存在はMPEG−2で定める規格に対して問題はない。
【0104】
それとは反対の場合であり、変換前の量子化スケールコードが存在していないマクロブロックもあるが、そのマクロブロックに新たに変換後量子化スケールコードを追加する必要はない。
【0105】
即ち、その量子化スケールコードが存在しない場合、逆量子化・再量子化部22より供給される変換後DCT係数は可変長符号化部25で可変長符号化され、その可変長符号化して得られた信号と、可変長復号部21で分離されたその他の可変長符号データに含まれる量子化スケールコードとが結合されてヘッダ結合部15に供給されるためによる。
【0106】
そのヘッダ結合部15では、ヘッダデータ格納部14に一時記憶されたヘッダデータのうち、更新された新しいビットレートの値のみが変換後の値に置換されて2次元VLC部28で可変長符号化され、データ結合部29でデータ結合されて得られた変換後データと結合されて再MUX部17に供給される。
【0107】
そして、その再MUX部17ではDEMUX部11より供給される画像符号化信号以外の信号部分と結合され、結合されて得られるビットストリーム信号がこの画像符号化レート変換装置10の出力信号として供給される。
【0108】
以上、逆量子化及び再量子化によってレート変換の行われる第1の実施例による画像符号化レート変換装置の構成、及びその装置の動作について述べた。
なお、ここに示した例ではデータ処理の簡単化のために逆量子化と再量子化を逆量子化・再量子化部22で同時に行っているが、逆量子化を逆量子化部、再量子化を再量子化部で別々に行う構成としてもよい。
【0109】
図13に、逆量子化と再量子化を別々に行う第1の実施例を変形した画像符号化レート変換装置10aの構成を示す。
【0110】
その変形した実施例による場合は、逆量子化部22aで変換前DCT係数のある全てのブロックについて逆量子化を行った後に、再量子化部22bで変換後のDCT係数が全ては0にならないようにして再量子化を行なうようにする。
【0111】
次に、逆量子化及び再量子化によらずにレート変換処理がなされる第2の実施例による画像符号化レート変換装置について述べる。
【0112】
図14に、その第2の実施例による画像符号化レート変換装置の構成を示す。
即ち、その画像符号化レート変換装置は、逆量子化・再量子化を行わずに、DCT係数部分の操作によりレート変換を行う。
【0113】
その第2の実施例による画像符号化レート変換装置10bは、第1の実施例による画像符号化レート変換装置10に比し画像レート変換部20bの動作、即ちDCT係数分離部26、係数操作部27、DCT係数結合部28、及び符号量制御部23の動作が異なるのみであるので、その他の動作は簡略にして画像符号化レート変換装置10bの動作について説明する。
【0114】
その画像符号化レート変換装置10bに供給されるMPEG−2ストリームは、ヘッダ分離部13によりヘッダデータ部が分離された符号化信号の一方である画像データ部分がDCT係数分離部26に供給されるが、そのDCT係数分離部26では画像データ部分よりDCT係数部分が分離されて得られ、その得られたDCT係数部分のデータは係数操作部27に供給される。
【0115】
そして、ヘッダ分離部13により分離された他方のヘッダデータ部分は符号量制御部23に供給され、その符号量制御部23では変換前ビットレート情報と、変換後目標ビットレート情報と、入力符号量カウンタ12及び出力符号量カウンタ16から供給される変換前後の各画像の符号量情報と、係数操作部27でカウントされる各ブロックのレート変換前及び変換後の符号量情報と、更に必要に応じて量子化スケールコード情報と、が供給され、これらの供給された情報を基に予め定められた所定の方法により符号量の制御が行われる。
【0116】
その符号量制御の方法は、各画像に対する目標符号量が決定された後に、その目標符号量を画像1枚当りに含まれるマクロブロック数で除し、除して得られる符号量を基に1マクロブロック当りの目標符号量を定め、その定められたマクロブロック当りの符号量を基にそのマクロブロックに含まれる6つのブロックそれぞれの目標符号量を割り当てる。
【0117】
その様にして割り当てられた各ブロックごとの目標符号量は係数操作部27に供給され、係数操作部27ではそれらの割り当てられた符号量を基に、それぞれの該当するブロックの係数が制御され、各ブロックの符号量が目標符号量になるように係数操作部27での係数操作がなされる。
【0118】
また、他の方法による符号量制御は、各ブロック毎のレート変換前符号量に対する変換後の目標符号量の、DCT係数符号量に関る部分のビットレート比率を求め、その求められたビットレート比率を変換前符号量に乗じて各ブロック毎のレート変換後目標符号量として定め、その定められた変換後目標符号量情報が係数操作部27に供給され、そこでその目標符号量が得られる様にDCT係数部分の操作が行われる。
【0119】
そのときの係数操作部27におけるDCT係数部分の操作は、各ブロック毎のレート変換後目標符号量が変換前符号量より大である場合には係数操作処理を行わないようにするが、目標値に等しい変換後のビットレート信号を得たいときなどは、必要に応じてスライスまたはピクチャ毎の画像データ位置にダミーデータを挿入するようにして目標とする転送レートの信号を得る様にする。
【0120】
その変換後目標符号量が変換前符号量より大である場合の転送レートの調整は、スライスまたはピクチャ毎にダミーデータを挿入しても良いが、その場合はビットレート情報と、DCT係数部分以外の部分は変更されないという前提条件には該当しないこととなる。
【0121】
次に、変換後目標符号量が変換前符号量より小である場合の転送レートの調整について述べるに、その場合は2次元VLCにより符号化されているレート変換前のDCT係数部分のデータ量を削減し、変換後目標符号量のデータを得るための操作を行う。
【0122】
その操作には、例えばEOBの手前に配置される2次元VLC符号を、ランとレベルの組合わせによりなる1語ずつを順に削除し、変換後目標符号量が所定の値に達したときにその削除を中止する方法がある。
【0123】
そしてその削除は、EOBの手前に配置される最後の2次元VLC符号に対しては、変換後目標符号量が所定の値に達していない場合であっても符号の削除を中止するようにする。
【0124】
そして、この場合は係数選択部24から供給される係数ブロックが輝度信号か、青又は赤の色差信号であるかのブロックの種類を示す符号、及び変換前DCT係数の係数分布に基づいて予め定めた係数を示す2次元VLC符号を選択し、その選択された符号にEOBを付加した符号を決定し、その決定された符号をこのブロックの変換後DCT係数部分の符号として用いるようにする。
【0125】
なお、このときのマクロブロックが面内符号化を行うイントラマクロブロックである場合は係数が全て0になっても良いので、EOB以外の2次元VLC符号は全て削除されてもよい。
【0126】
このようにして、DCT係数は周波数の高い成分より削除され、DCT係数部分のデータ量が削減された変換後目標符号量のデータが得られるが、次に他の方法によりデータ量を削減する方法について述べる。
【0127】
その方法は、変換前2次元VLC符号を復号してDCT係数列データを得、その得られたDCT係数列データの一部を"0" に置き換えることにより係数のカットを行い、その係数のカットされたDCT係数列データを再度2次元VLC符号化する方法である。
【0128】
その方法は、係数列を"0"に置き換える部分のレート変換前及び後における符号量比として、変換後の画質に対する影響度の大小を予め定めておき、係数を"0"にしないと目標符号量が満たされないときは、係数選択部24から供給される残すべき係数に置き換えるようにして行う。
【0129】
その係数選択部24では、係数操作部27から供給される2次元VLC符号、又はそれを復号したDCT係数であるDCT係数部分のデータに対し、係数操作部27でその係数部分のデータが"0"とされてしまうブロックについて、残すべき2次元VLC符号またはDCT係数を決定する。
【0130】
そのDCT係数を決定する1つの方法は、2次元VLCレベルの最大値又はDCT係数の絶対値の最大値に対して、その位置を"1"または"−1"とすると共に、その他は"0"としたDCT係数を変換後のDCT係数とすることとし、必要に応じてその係数を2次元VLCの値とする。
【0131】
そして、そのときの最大値が複数個あるブロックについては、2次元VLCで符号化したときに最も符号長が短くなる位置を、又それらが同じ符号長である場合はゼロランが最も短くなる位置を選択し、その位置の係数を2次元VLCの値とする。
【0132】
また、DCT係数を決定する他の方法は、変換前2次元VLC又はDCT係数の値にかかわらず、係数ブロックが輝度信号に対する、又は青ないしは赤に対する色差信号であるかなどのブロックの種類、更にまた変換前DCT係数の係数分布により変換後画像の画質に最も影響が少なく、かつ2次元VLCの符号長が短くなる係数の位置を予め定めておき、その定められた位置に基づいて変換後のDCT係数を決定するものである。
【0133】
これらの方法により係数選択部24で決定された変換後のDCT係数は係数操作部27に供給され、係数操作部27では供給された係数のレート変換を行い、レート変換のなされたDCT係数の2次元VLC符号はDCT係数結合部28に供給される。
【0134】
そのDCT係数結合部28では、供給された2次元VLC符号と、DCT係数分離部26より供給されたDCT係数部分以外のデータと再結合され、その再結合して得られるデータはヘッダ結合部15に供給され、ここでは転送レートの値が更新されたヘッダデータと結合され、結合されて得られる信号は再MUX部で画像以外の音響信号等の符号化された信号と結合され、結合された信号は画像符号化レート変換装置10bのストリーム出力として供給される。
【0135】
以上の様にして、この第2の実施例による画像符号化レート変換装置10bよりのストリーム出力信号が供給されるが、そのストリーム出力においては量子化スケールコードは変更されていなく、シーケンスヘッダに記録されるビットレート情報及びDCT係数部分のみの更新がなされた信号であり、そのようにデータ構造を同一としたままビットストリームの更新を行う画像符号化レート変換装置10bが簡単に構成できることを示している。
【0136】
次に、画像符号化データのレート変換方法について第3の実施例について図と共に説明する。
図15に、その第3の実施例による画像符号化レート変換装置の構成を示す。
【0137】
その画像符号化レート変換装置10cは、第1の実施例と同様に逆量子化・再量子化によってレート変換を行う装置であり、第1の実施例に比し逆量子化・再量子化部22と可変長符号化部25の間に前述の係数操作部27が設けられている点で異なっている。
【0138】
そして、第1の実施例による構成では符号量制御部23から供給される変換後の量子化スケールによって符号量制御を行っていたが、変換前のデータで量子化スケールコードが存在するマクロブロックの数が少なく、また変換後の符号量制御において量子化スケールコードの変更位置が不十分である場合などの符号量制御は次のように行っていた。
【0139】
即ち、その制御は逆量子化・再量子化部22の次の係数操作部27において、再量子化後のDCT係数に対して、その一部を"0"、または元の係数より小さな値にして係数を削減することにより、その後の可変長符号化部で符号化される2次元VLC符号長を短縮し、符号量制御器23における変換後の符号量を所要の値とするものである。
【0140】
そして、そのときに削減するDCT係数の位置、及びその係数の具体的な削減方法は符号量制御器23より供給されるが、例えば2次元VLC処理を行ったときに最も後ろに配置される係数から順に削減する方法として述べた
【0141】
ここに示第3の実施例では、係数操作部27により前述と同様な係数削減を行うようにしている。
【0142】
また、その係数操作部27による係数削減、又は逆量子化・再量子化部22から供給される係数が全て0になる等のブロックについては、上述の係数選択部24によって選択された残すべき係数が係数操作部27から供給されるようになされている。
【0143】
このようにして、第3の実施例に示した画像符号化レート変換装置10cにより符号化レートの変更されたストリーム信号が供給されるが、そのための係数操作部27は前述の図13に示す第1の実施例を変形した画像符号化レート変換装置10aに付加する場合であっても同様の動作を行うレート変換装置を構成することができる。
【0144】
以上、MPEG−2方式に基づいて符号化されたビットストリームの信号を画素レベルまで変換することなしに、及びビットストリームのデータ構造を同一に保ちつつ転送レートの変換を行う第1及〜第3の実施例について述べた。
【0145】
そして、これらの実施例により行われるレート変換方法は供給されるフレーム画像単位の動画信号を、複数の例えば16画素×16画素の画素ブロック毎の画像データに分割し、その分割された画素ブロック毎に動きベクトル量を求め、その求められた動きベクトル量に基づいて動き補償予測を行いつつ、その画素ブロックの画像データをDCT変換等により直交変換を行い、その直交変換して得られるたデータを量子化し、量子化して得られるデータを可変長符号化することにより符号化画像信号を生成し、そしてその符号化画像信号の生成に関る直交変換、及び動き予測などの符号化パラメータの情報を符号化情報として得、その得られた符号化情報を含むヘッダ信号を生成し、それらの生成された符号化画像信号及びヘッダ信号を結合して第1の転送レートにより圧縮符号化された第1の符号化ビットストリームとして得ると共に、その得られたビットストリームのデータが供給され、第1の転送レートよりも低い、又は第1の転送レート異なる第2の転送レートにより符号化されたビットストリームの信号に変換して得る画像符号化データのレート変換方法、又は画像符号化レート変換装置を、供給されたビットストリームの信号より符号化画像信号と符号化パラメータ情報を分離し、分離して得られた符号化情報を基に、符号化画像信号を直交変換して得られる画素ブロック毎の係数データを得、その得られた画像データに関る量子化データの複数ある量子化係数の内1つ以上を残し他の量子化係数を削除して更新画像データを生成し、その生成された更新画像データと、前記信号分離手段で得られた前記符号化情報に基づいて転送レート情報等が更新された符号化情報を結合して第2の転送レートによる第2の符号化データを生成するようにしているため、符号化された信号を画像信号に変換してから再変換により符号化して転送レートの変換をするのに比して信号変換のための遅延時間を少なくでき、また信号変換のための画像信号の一時記憶の必要がなく変換の方法が容易であり、且つその更新された符号化データの生成は第1の符号化方式におけるデータ構造を同一に保ちつつ転送レートの変換を行なうようにでき、即ち分割されたそれぞれのマクロブロックは変換前と同一のマクロブロックタイプ及びCBPの信号に変換するようにし、又再量子化によってレート変換を行う場合は、変換前の量子化スケールの更新マクロブロック位置と同一の位置でのみ量子化スケールの更新を行うようにしてレート変換を行うため、変換されるデータはDCT係数部分のみを、又再量子化によりレート変換を行うときはDCT係数部分と量子化スケールコードのみとすることができ、また変換前後においてマクロブロックタイプ及びCBPの変更を行わなく、そして変換で操作するデータは、直接DCT係数部分の可変長符号を操作する場合はDCT係数部分のみを、さらに再量子化によるレート変換ではDCT係数部分と量子化スケールコードのみを変更すなどレート変換に伴う処理を簡素化することができるためレート変換された画像信号に付されるヘッダ信号も転送レート情報等の最小の変更とすることができ、ヘッダ信号の生成はそのヘッダ信号に該当する全ての画像データの更新を待たずに行うことが出来るためレート変換の実現方法が容易であり、レート変換のための装置の構成も簡単とできるにもかかわらず、このような容易な方法、簡単な装置により生成された符号化信号はビットストリーム全体において調和的に転送レートの変更を行うことが出来るため、特に低い転送レートの符号化信号に変換したビットストリームを得ようとする場合においても画質劣化の少ない符号化信号に変換した信号を得ることができている。
【0146】
なお、以上述べた実施例では変換対象のビットストリームの符号化方式はMPEG−2を中心として述べたが、符号化方式はMPEG−2に限ることなく、所定量の符号化された画像データに対し、その符号化パラメータに関する情報をヘッダー情報としてその画像データに付随してビットストリームを構成するようなMPEG−2と同様のデータ構造を有する符号化方式、例えばMPEG−1方式、H261などの方式、及び他のMPEG−4、MPEG−7、及びMPEG−21などにより符号化されたビットストリームに対しても適用可能である。
【0147】
そして、これらの例に示したレート変換前及び変換後の符号量制御がそれぞれ、固定ビットレート制御、又は可変ビットレート制御のいずれの場合であっても適用可能である。
【0148】
【発明の効果】
請求項1記載の発明によれば、符号化信号を画素レベル迄変換することなく、且つ更新されたDCT係数の量子化値が全て0となり、そのブロックで削除されてしまうことを防ぐようにして符号化信号のデータ構造を同一に保ったまま転送レートの変換を行うため、信号処理のためのデータ記憶量が少なく、信号処理のための遅延時間が短く、画質劣化が少なく、且つCBPなどのヘッダーの変更を伴うような複雑なコード変更をする必要がなく、符号量制御を容易に行える簡単な画像符号化レート変換装置を提供することが出来る効果がある。
【0149】
また、請求項記載の発明によれば、符号化信号を画素レベル迄変換することなく、且つ更新されたDCT係数値が全て0となり、そのブロックで削除されてしまうことを防ぐようにして符号化信号のデータ構造を同一に保ったまま転送レートの変換を行うため、信号処理のためのデータ記憶量が少なく、信号処理のための遅延時間が短く、画質劣化が少なく、且つCBPなどのヘッダーの変更を伴うような複雑なコード変更をする必要がなく、符号量制御を容易に行える簡単な画像符号化レート変換方法を提供できる効果がある
【図面の簡単な説明】
【図1】本発明の実施例に係る画像符号化レート変換装置の概略ブロック図である。
【図2】MPEG−2符号化装置の概略ブロック図である。
【図3】MPEG−2符号化方式の動き補償予測に関するピクチャタイプの構造を示す図である。
【図4】MPEG−2符号化方式の変換符号化に関する画素データの構造を示す図である。
【図5】MPEG−2方式により伝送されるビットストリームのデータ構造を示す図である。
【図6】MPEG−2方式により符号化されるマクロブロック層におけるデータ構造を示す図である。
【図7】MPEG−2方式により符号化されるIピクチャに対するマクロブロックタイプのVLCテーブルを示す。
【図8】MPEG−2方式により符号化されるPピクチャに対するマクロブロックタイプのVLCテーブルを示す。
【図9】MPEG−2方式により符号化されるBピクチャに対するマクロブロックタイプのVLCテーブルを示す。
【図10】MPEG−2方式により符号化されるブロック層におけるデータ構造を示す図である。
【図11】本発明の実施に関る第1の実施例による画像符号化レート変換装置の構成を示す図である。
【図12】本発明の実施に関るレート変換前及び後における量子化スケールコードの存在を説明するための図である。
【図13】本発明の実施に関る第1の実施例の変形による画像符号化レート変換装置の構成を示す図である。
【図14】本発明の実施に関る第2の実施例による画像符号化レート変換装置の構成を示す図である。
【図15】本発明の実施に関る第3の実施例による画像符号化レート変換装置の構成を示す図である。
【図16】従来例におけるレート変換装置の構成を示す図である。
【符号の説明】
10、10a、10b、10c 画像符号化レート変換装置
11 DEMUX部
12 入力符号量カウンタ
13 ヘッダ分離部
14 ヘッダデータ格納部
15 ヘッダ結合部
16 出力符号量カウンタ
17 再MUX部
20、20a、20b、20c 画像レート変換部
21 可変長復号部
22 逆量子化・再量子化部
22a 逆量子化部
22b 再量子化部
23 符号量制御部
24 係数選択部
25 可変長符号化部
26 DCT係数分離部
27 係数操作部
28 DCT係数結合部
60 MPEG−2エンコーダ
61 減算器
62 DCT器
63 量子化器
64 符号量制御器
65 可変長符号化器
66 バッファ
71 逆量子化器
72 IDCT器
73 加算器
74 フレームメモリ
75 動き補償予測器
81 データ分離回路
82 逆VLC回路
83 逆量子化器
84 ビットレート制御回路
85 量子化器
86 VLC回路
87 結合回路
88 バッファ回路
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to rate conversion of encoded image data encoded at a predetermined transfer rate, and in particular, performs rate conversion in an apparatus for recording, transmitting, or displaying encoded moving images with a simple configuration. The present invention relates to a rate conversion method for encoded image data and an image encoding rate conversion apparatus.
[0002]
[Prior art]
MPEG-2 (moving picture experts group -2) is defined as an international standard by ISO / IEC (International Organization for Standardization / International Electrotechnical Commission) as a technology for highly efficient coding of moving picture signals such as television signals. .
[0003]
The MPEG-2 divides a “frame” image constituting a moving image into blocks of 16 × 16 pixels called “macroblocks”, and a predetermined number of frames in the future or in the past for each macroblock unit. A “motion-compensated prediction” technique for obtaining a motion amount called a “motion vector” between a remote reference image and an encoded image, and encoding the encoded image from the reference image based on the motion amount; The image information is converted into frequency information using DCT (Discrete Cosine Transform), which is one of orthogonal transform techniques, for the error signal of motion compensation prediction or the encoded image itself, and then visually Are defined on the basis of two image encoding elemental technologies, namely, a “transform encoding” technique that performs compression encoding so as to obtain only significant information.
[0004]
The setting of the transfer rate of the signal encoded by the technology defined as described above is such that the transmission capacity per unit time is set to be a constant transfer rate, and the transmission capacity is within a certain range. Two types of setting methods are used: a variable transfer rate for variable transfer.
[0005]
Signals encoded using the MPEG-2 standard are used for recording media such as digital broadcasts and DVDs, and communication channels such as ATM (Asynchronous Transfer Mode), and so on. Thus, the bit rate indicating the transmission capacity of the bit stream per unit time can be freely selected within a certain range.
[0006]
As such, since encoded signals having different transfer rates are used depending on the application, the encoded signals of the different transfer rates are recorded as, for example, 7 Mbps (M bits / second) digital broadcast signals, for example, 4 Mbps. You cannot record on a digital recorder that is set to rate.
[0007]
At this time, there is a method of recording by setting the recording capacity of the recorder to a large bit rate in accordance with the signal rate of the digital broadcast, but in that case, it is necessary to secure a large recording area of the recording medium of the recorder. Problems such as a decrease in recording time occur, which is not preferable.
[0008]
Therefore, a signal with a bit rate of 7 Mbps is converted into a signal with a new bit rate of 4 Mbps and then recorded on the recorder to ensure a predetermined recording time.
[0009]
And the rate conversion may record a bit stream broadcast at a fixed transfer rate at a variable transfer rate, or vice versa, record a bit stream broadcast at a variable transfer rate at a fixed transfer rate, A rate conversion process is also required when switching between such fixed and variable setting methods of the bit rate.
[0010]
As a method of performing rate conversion in this way and generating a bit stream of another transfer rate from a bit stream of a certain transfer rate, a decoded image is conventionally generated by decoding the supplied bit stream to the pixel level with a decoder. After that, a so-called “re-encoding” method has been used in which the generated decoded image is supplied to an encoder and encoded again.
[0011]
However, re-encoding requires both a decoder and an encoder, and in addition, an image memory for temporarily storing a decoded image is required for encoding, which increases the circuit scale. In addition, there is a problem that a delay time occurs in the encoding and re-encoding processes.
[0012]
As a rate conversion method to solve the problem, DCT coefficients obtained by performing variable length decoding (VLD) and inverse quantization without decoding the input bitstream to the pixel level. A rate conversion method for performing re-quantization with different quantization scales to obtain a bit stream of a required bit rate is disclosed in Japanese Patent Application Laid-Open No. 7-31756 “Information amount conversion circuit, apparatus, And methods ".
[0013]
FIG. 16 shows a configuration of a rate conversion apparatus in the conventional example thus configured.
In the figure, the supplied 4 Mbps bit stream is separated into an image signal and other signal parts by a data separation circuit 81, and the image signal is decoded by a VLC (variable length coding) circuit 82 from a VLC signal, The signal obtained by decoding is inversely quantized by an inverse quantizer 83 and then quantized by a quantizer 85 controlled by a bit rate control circuit 84, and the signal obtained by the quantization is a VLC circuit. 86. The signal obtained by the VLC and the VLC is combined with the signal separated by the data separation circuit 81 by the combining circuit 87, and the combined signal is temporarily stored in the buffer circuit 88 and temporarily stored in the 2 Mbps. The signal whose transfer rate has been converted is read from the buffer circuit 88 as necessary and supplied as an output signal from the rate conversion device. There.
[0014]
In this way, a signal subjected to rate conversion by dequantization and requantization can be obtained, but as another rate conversion method, the bit rate after rate conversion is lower than that before conversion. JP-A-11-317942 discloses a rate conversion method for adjusting a variable length code corresponding to a DCT coefficient portion after quantization of an input bitstream to shorten a code length and obtaining a bitstream having a required bit rate. It is disclosed in the publication “Image Encoding Device”.
[0015]
[Problems to be solved by the invention]
By the way, in a signal obtained by encoding using the MPEG-2 method or the like, a bit stream signal is formed by prepending information on the encoding parameter as a header signal to the encoded signal.
[0016]
Therefore, when the encoding parameter is changed by the rate conversion process of the encoded signal, it is necessary to update the content of the header signal in accordance with the change of the encoded signal.
[0017]
The header signal is updated by a method of directly adjusting the variable length code of the DCT coefficient portion in the above-described conventional example to perform rate conversion, for example, when adjusting the DCT coefficient of a non-intra macroblock. When the number of DCT coefficients is changed by rate conversion and the number is set to 0, a header signal such as CHP (Coded Block Pattern) needs to be updated accordingly.
[0018]
However, since the header signal is not confirmed until the rate conversion processing of all the image signals related to the header signal is performed, the header signal is temporarily stored during the update of the header signal. For this reason, there is a problem that the configuration of the apparatus is complicated, and a delay time occurs due to the rate conversion process.
[0019]
In order to prevent such a problem from occurring, a method of performing rate conversion to such an extent that the header signal is not changed can be considered, but conversion to a low rate is particularly difficult, and a low-rate stream is In order to obtain the DCT coefficients, the rate conversion methods such as quantizing the coefficients of the blocks with the coarse scale or reducing the coefficients increase the image quality degradation effectively. It was not reached.
[0020]
Accordingly, the present invention is to perform transfer rate conversion while maintaining the same data structure for an encoding method of a data structure in which image data such as MPEG-2 is encoded by dividing it into macroblocks. That is, each divided macroblock is converted into a signal of the same macroblock type and CBP (coded block pattern) as before conversion.
[0021]
For this reason, for blocks in which DCT coefficients encoded before conversion exist, at least one coefficient is left even after conversion. When rate conversion is performed by requantization, the quantization scale before conversion is changed. The quantization scale is updated only at the same position as the update macroblock position.
[0022]
  In the rate conversion performed in this way, the data to be converted is quantized with only the DCT coefficient part when operating the variable length code of the DCT coefficient part, and with the DCT coefficient part when performing rate conversion by requantization. Image code with less image quality degradation that can simplify the process associated with rate conversion, such as scale code onlyChangeConversionapparatusAnd image coding rate conversionMethodIs to provide.
[0023]
[Means for Solving the Problems]
  In order to solve the above problems, the present invention provides the following 1)And 2).
  That is,
[0024]
1)unitblockDCTObtained by conversionMultiple coefficients in the first quantization stepQuantizationas well asVariable length codingFirst image obtained by using the encoded first encoded quantized dataCodingData was obtained using second encoded quantized data that was quantized and variable-length encoded in a second quantization step having a wider step width than the first quantization step.SecondimageConvert to encoded dataYouImage codeChangeConversion device,
  The firstimageEncoded dataThat separates the data into header data, the first encoded quantized data, and data other than the first encoded quantized dataSeparationDepartment and,
  A variable length decoding unit that performs variable length decoding on the first encoded quantized data separated by the header separation unit and outputs first quantized data;
A code amount control unit that outputs the second quantization step based on code amount information of the first and second image encoded data; and
The first quantized data is inversely quantized to obtain first DCT coefficient data, and the first DCT coefficient data is requantized based on the second quantization step to obtain a second DCT coefficient data. An inverse quantization / requantization unit that generates coefficient data;
When all the coefficient values included in the second DCT coefficient data are 0, an instruction to leave the coefficient of the first DCT coefficient data is given to the inverse quantification / requantization unit, and the inverse A coefficient selection unit that outputs third DCT coefficient data from the quantization / requantization unit;
A variable-length encoding unit that variable-encodes the third DCT coefficient data to generate the second encoded DCT coefficient data;
  Combining the header data separated from the second encoded DCT coefficient data and data other than the first encoded quantized data,SecondimageEncoded dataThe header header to output,
WithAn image coding rate conversion apparatus characterized by that.
[0025]
2)unitblockDCTObtained by conversionFirst encoding in which a plurality of coefficients are quantized and variable-length encoded in a first quantization stepQuantized dataThe first image encoded data obtained by using the second quantization step having a step width wider than that of the first quantization step is quantized andVariable length codingSecond obtained using the encoded second encoded quantized dataImage codingTo dataconversionYouImage codeChangeConversion method,
  The firstimageEncoded dataAre separated into header data, the first encoded quantized data, and data other than the first encoded quantized data,
Variable length decoding the separated first encoded quantized data to output first quantized data;
Based on the code amount information of the first and second image encoded data, the second quantization step is output,
The first quantized data is inversely quantized to obtain first DCT coefficient data, and the first DCT coefficient data is requantized based on the second quantization step to obtain a second DCT coefficient data. Generate coefficient data,
When the coefficient values included in the second DCT coefficient data are all 0, the first DCT coefficient datacoefficientTo output the third DCT coefficient data,
Variable length encoding the third DCT coefficient data to generate the second encoded DCT coefficient data;
The header data separated from the second encoded DCT coefficient data and data other than the first encoded quantized data are combined to output the second image encoded data.An image code characterized byChangeConversion method.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
  Hereinafter, the image code of the present inventionChangeConversionapparatusAnd image coding rate conversionMethodThe preferred embodiments will be described with reference to the embodiments.
  FIG. 1 shows a configuration of an image encoding rate conversion apparatus equipped with a rate conversion method for image encoded data that performs transfer rate conversion while maintaining the same data structure of the encoded signal.
[0032]
An image coding rate conversion apparatus 10 shown in FIG. 1 is an apparatus that performs rate conversion by dequantization and requantization, and includes a DEMUX (de-multiplexing) unit 11, an input code amount counter 12, a header separation. 13, a header data storage unit 14, a header combination unit 15, an output code amount counter 16, a re-MUX (multiplexing) unit 17, and an image rate conversion unit 20 that performs rate conversion by inverse quantization and re-quantization. .
[0033]
Next, the operation of the image coding rate conversion apparatus 10 configured as described above will be described.
First, a bit stream encoded by the MPEG-2 (moving picture experts group -2) method at a predetermined data rate includes an image signal encoded by the DEMUX unit 11 and an audio signal attached to the image signal. It is separated into auxiliary signals such as character information and other signals related to the MPEG-2 system for performing control, synchronization and the like of the reproduction method of those signals.
[0034]
The other signal portion obtained by the separation is supplied to the re-MUX unit 17 and the image signal obtained by the separation is supplied to the input code amount counter 12, where the code amount of the image signal is counted and counted. Part of the obtained signal is supplied to the image rate conversion unit 20, and the other part is supplied to the header separation unit 13.
[0035]
The header separation unit 13 separates the data above the slice layer such as the sequence header and the picture header from the supplied image signal, and the separated signal is supplied to the header data storage unit 14. The signal temporarily stored therein is supplied to the header combining unit 15 as necessary, and the pre-conversion bit rate information recorded in the other part of the sequence header, and the encoded image The signal is supplied to the image rate conversion unit 20.
[0036]
  In the image rate conversion unit 20, based on the pre-conversion bit rate information supplied from the input code amount counter 12 and the post-conversion bit rate information supplied from the output code amount counter 16, it is supplied from the header separation unit 13. Image rate conversion of encoded image signalButlineIThe converted image signal obtained by the conversion is supplied to the header combining unit 15 and combined with the header signal supplied from the header data storage unit 14, and the combined signal is supplied to the output code amount counter 16. Is done.
[0037]
  For the signal supplied to the output code amount counter 16, the bit rate of the encoded signal is measured to obtain the above-described converted bit rate information, and the signal whose output code amount is counted is the re-MUX unit 17 The image encoding rate conversion apparatus 10 adds an audio signal attached to the above-described image signal and other signal parts related to the MPEG-2 system as an MPEG-2 stream output signal.outputIs done.
[0038]
In this way, the MPEG-2 stream whose coding rate has been converted is supplied as an output signal from the image coding rate conversion device 10. Next, the operation of the image rate conversion unit 20 which is the main part of the conversion device. Will be described together with the encoding operation performed in the MPEG-2 encoding system.
[0039]
FIG. 2 shows the configuration of an MPEG-2 encoder that encodes a moving image signal defined by MPEG-2.
[0040]
The MPEG-2 encoder 60 includes a subtractor 61, a DCT (Discrete Cosine transform) unit 62, a quantizer 63, a code amount controller 64, a variable length encoder 65, a buffer 66, an inverse quantizer 71, an IDCT ( Inverse Discrete Cosine transform) 72, adder 73, frame memory 74, and motion compensation predictor 75.
[0041]
The operation of the MPEG-2 encoder 60 configured as described above will be described.
First, the supplied moving image signal is supplied to one input terminal of the subtractor 61 and is also supplied to the motion compensation predictor 75 to obtain a moving vector of the moving image signal, and based on the obtained moving vector. The motion prediction signal is generated, and the generated motion prediction signal is supplied to one input terminal of the adder 73, and the motion prediction signal is supplied to the subtractor 61 as an input signal for subtraction.
[0042]
From the subtractor 61, a difference signal obtained by subtracting the motion prediction signal from the supplied moving image signal is supplied to the DCT unit 62, and the DCT unit 62 performs a discrete cosine transform of the supplied difference signal. The cosine frequency component obtained by the cosine transform is supplied to the quantizer 63.
[0043]
The quantizer 63 uses, as a quantized signal, a frequency component effective for image coding among the cosine frequency components supplied from the DCT device 62 based on the control signal supplied from the code amount control unit 64. The obtained quantized signal is supplied to the variable length encoder 65 and also supplied to the inverse quantizer 71.
[0044]
The quantized signal supplied to the inverse quantizer 71 is inversely quantized to obtain an approximate cosine frequency component, and the obtained approximate cosine frequency component is supplied to the IDCT unit 72 for approximation. A difference image signal can be obtained.
[0045]
The obtained approximate image difference signal is supplied to the adder 73, and the approximate image signal is decoded so as to be added to the motion prediction signal, and the decoded image signal is stored in the frame memory. The image signal stored in the frame memory 74 is used to generate a motion compensated prediction image for the frame image of the next incoming video signal.
[0046]
In this way, while the motion compensated prediction image is generated, the moving image signal is encoded. The quantized signal supplied to the variable length encoder 65 is variable length encoded, and the variable length encoding is performed. The obtained signal is temporarily stored in the buffer 66 and supplied as an encoded bit stream, and a part of the signal temporarily stored in the buffer 66 is supplied to the code amount control unit 64 to control the code amount. The unit 64 detects the code amount of the generated bit stream, and generates a control signal for controlling the quantization roughness of the quantizer 63 based on the code amount information obtained by the detection. Thus, the quantizer 63 generates a coded signal at a predetermined bit rate.
[0047]
As described above, image coding is performed on the supplied moving image signal by using the motion compensation prediction method and the transform coding method.
Next, the image signal to be image-encoded has a coded picture structure for each predetermined frame image and is subjected to motion compensation prediction. Next, a prediction frame to be subjected to motion compensation prediction in the MPEG-2 system The configuration of the image will be described.
[0048]
FIG. 3 shows an encoded picture structure for explaining the relationship between picture images for which motion vectors are obtained and motion compensation is performed with respect to motion compensated prediction performed by the encoding device 60.
[0049]
The structure of the coded picture by the motion compensation prediction shown in the figure includes an I (Intra-coded) picture (intraframe coding), a P (Predictive-coded) picture (forward predictive coding), and B (Bidirectionally predictive coding). -coded) picture (bidirectional predictive coding), which is composed of a combination of three types of pictures with different motion prediction methods.
[0050]
An image signal in units of frames configured with such a motion prediction structure is configured as an image signal of 30 frames per second as a normal video signal and 24 frames per second in the case of movie material. Next, conversion of the image signal is performed. The encoding will be described.
[0051]
FIG. 4 shows an image segmentation method related to the transform coding.
In the figure, the frame image is divided into horizontally long images called slices each having a width of 16 scanning lines, and image compression processing is performed.
[0052]
The pixel unit for the image compression processing is a pixel unit of 16 pixels × 16 scanning lines (pixels) obtained by dividing the slice every 16 pixels in the horizontal direction and called a macroblock. is there.
[0053]
The macro block which is the pixel unit is divided into a total of 6 blocks including 4 luminance signal blocks of 8 pixels × 8 pixels and a color difference signal block of 8 pixels × 8 pixels for each of blue and red. Conversion coding is performed.
[0054]
The image data subjected to transform coding in this way constitutes a slice layer composed of coded data related to image data composed of slices, a macroblock layer related to data for each macroblock, and a macroblock. It is configured as encoded data composed of data of each layer such as a block layer composed of DCT coefficient data obtained by quantizing six blocks.
[0055]
Data of each layer configured in this way is transmitted following headers such as a sequence header and a picture header. Data that is a series of signals transmitted in this way is called a bit stream.
[0056]
FIG. 5 shows the data structure of the bit stream in MPEG-2 transmitted in this way.
In the figure, the transmitted data is composed of header data, slice layer data, macroblock layer data, and block layer data.
[0057]
FIG. 6 shows a data structure in the macroblock layer.
The data in the macroblock layer includes macroblock escape, macroblock address increment, macroblock type, motion type, DCT type, Q scale code, motion vector, and CBP (coded block pattern) in this order. It is arranged.
[0058]
The macroblock types in these arrays indicate the prediction mode, the presence / absence of a quantization scale code, and the presence / absence of a coding coefficient for each picture type indicated by I, P, and B. The quantization scale code In the slice, the updated value is transmitted only when the quantization scale is updated in the macroblock in the slice.
[0059]
Next, a VLC (variable length coding) table of a macroblock type for each picture given by I, P, and B is shown.
FIG. 7 is a macro block type VLC table for an I picture in these pictures. When the code is “1”, an Intra code is indicated in the description position. "01" indicates that the quantization scale code is arranged later.
[0060]
FIG. 8 is a macro block type VLC table for a P picture. A state in which motion prediction encoding (MC) is performed by a description of the code (code), and a quantization scale code ( Quant) state.
[0061]
FIG. 9 is a macro block type VLC table for a B picture, and shows the state of predictive encoded data related to prediction from a forward (Fwd) image and prediction from a backward (Bwd) image. .
[0062]
In this way, the macroblock type information is arranged and transmitted as a bit stream. The CBP is arranged at the end of the macroblock layer, and the quantized DCT coefficient data of the subsequent block layer is stored in each of the six blocks. Whether or not it exists.
[0063]
When the macroblock type is an intra macroblock that is intra-coded image data, since at least one coefficient data exists in all the blocks, the last CBP of the macroblock layer Is not present.
[0064]
In addition, when there is no coefficient in all the blocks in one macroblock, the macroblock is set to “Not Coded”.
[0065]
Furthermore, in the case of frame structure coding, when the motion type (motion prediction type) is frame prediction and the motion vector is all “0” in a P picture (this is referred to as “No MC”), “Not Coded "Then the macroblock can be skipped, i.e. not encoded.
[0066]
Similarly, the motion type (motion prediction type) is frame prediction, and the B-picture prediction direction, such as forward prediction, backward prediction, or bidirectional prediction, and the motion vector are the same as those of the macroblock immediately before the same slice. In this case, the macroblock can be skipped as “Not Coded”, that is, encoding is not performed.
[0067]
The macroblock layer data is arranged in this way, and the block layer data is arranged next to the macroblock layer. Next, the data structure of the block layer will be described.
FIG. 10 shows a data structure in the block layer.
[0068]
In the figure, the block layer transmits the DC (direct current) coefficient of the image obtained by DCT calculation of the image data of the intra macroblock and the AC (alternating current) coefficient which is a cosine frequency component, and is transmitted after the end of those coefficients. They are arranged in the order of EOB (end of block).
[0069]
The coding of the quantized DCT coefficient data in the block layer is different between an intra macroblock and other macroblocks. In the case of an intra macroblock, there is only a DC coefficient that is the first coefficient, which is an AC coefficient. VLC (variable length coding) is performed by a different method.
[0070]
That is, the coefficients other than the DC coefficient of the intra macroblock and the coefficients of the other macroblocks are rearranged in the specified order, and then the number (run) of leading zero coefficients in that order and the non-zero coefficient Values (levels) are examined, and encoding is performed by a two-dimensional VLC table in which those runs and levels are shown as a set.
[0071]
In the encoding using the two-dimensional VLC table, a code called EOB (end of block) is added when the non-zero coefficient disappears, and the encoding of the block is finished.
[0072]
The bit stream generated by arranging the moving image signal by MPEG-2 and arranging it by a predetermined method for transmitting the encoded image data has been described above.
[0073]
Next, a method for converting the coded signal generated in this way with a predetermined bit rate into a signal with another target bit rate will be described.
[0074]
The conversion is performed, for example, when a received signal that is digitally broadcast by the MPEG-2 method is recorded after being converted to a bit rate lower than that of the broadcast in order to increase the recording time when recording the digital VTR.
[0075]
When the conversion of the bit rate is performed by converting the digital signal into an analog signal and then converting it again into a digital signal, the processing time for that is increased, for example, recording and reproduction of the supplied signal are performed simultaneously. When simultaneously monitoring the recording signal, the delay time becomes an obstacle, and when converting the digital signal to an analog signal and then converting it again to a digital signal, the image quality deteriorates due to the conversion. An object of the present invention is to realize a configuration of an image coding rate conversion device that does not deteriorate image quality, and will be described below together with a plurality of embodiments.
[0076]
FIG. 11 shows the configuration of the image coding rate conversion apparatus according to the first embodiment.
The image coding rate conversion apparatus 10 is an apparatus that performs rate conversion by inverse quantization and requantization.
[0077]
The image coding rate conversion apparatus 10 includes a DEMUX (de-multiplexing) unit 11, an input code amount counter 12, a header separation unit 13, a header data storage unit 14, a header combining unit 15, an output code amount counter 16, and a re-MUX. (Multiplexing) unit 17, variable length decoding unit 21, inverse quantization / requantization unit 22, code amount control unit 23, coefficient selection unit 24, and variable length coding unit 25.
[0078]
Next, the operation of the image coding rate conversion apparatus 10 configured as described above will be described.
[0079]
First, a bit stream encoded by the MPEG-2 system at a predetermined data rate relates to an image signal encoded by the DEMUX unit 11, an audio signal accompanying the image signal, and an MPEG-2 system. The other signal portion obtained by the separation is supplied to the re-MUX unit 17 and the image signal is supplied to the input code amount counter 12 where the code amount of the image signal is counted. Then, a part of the counted signal is supplied to the code amount control unit 23 and the other part is supplied to the header separation unit 13.
[0080]
In the header separation unit 13, data in a layer higher than the slice layer such as a sequence header and a picture header is separated from the supplied image signal, and the separated signal is supplied to the header data storage unit 14 and temporarily stored. At the same time, the pre-conversion bit rate information recorded in the sequence header which is another part is supplied to the code amount control unit 23, and the other part is supplied to the variable length decoding unit 21.
[0081]
The signal supplied to the variable length decoding unit 21 and from which the header data has been separated is divided into a DCT (discrete cosine transform) coefficient part and other parts by the variable length decoding unit 21, and the DCT coefficient part is variable length decoded. Then, the pre-transform quantization scale code obtained by decoding is supplied to the inverse quantization / requantization unit 22.
[0082]
Then, the pre-conversion quantization scale code recorded in the slice layer and macroblock layer obtained by decoding, and position information in the screen of the macroblock are supplied to the code amount control unit 23.
[0083]
The code amount control unit 23 is supplied from the pre-conversion bit rate information, the post-conversion target bit rate information, the pre-conversion quantization scale code, the macroblock position information, the input code amount counter 12 and the output code amount counter 16. The code amount information of each image before and after conversion, the code amount information before and after rate conversion of each macroblock counted by the inverse quantization / requantization unit 22, and the like are supplied.
[0084]
In the code amount control unit 23 to which these pieces of information are supplied, the average value of the code amount for each image with respect to the quantization scale before and after the conversion of each image is obtained based on the information. By performing code amount control by a predetermined method for the code amount, for example, the method specified in Steps 1 and 2 of MPEG-2 Test Model 5, a post-conversion quantization scale is determined. The quantization scale is supplied to the inverse quantization / requantization unit 22.
[0085]
The code amount control in the inverse quantization / requantization unit 22 can use an arbitrary quantization scale for each macroblock during normal encoding, that is, change to an arbitrary quantization scale code during rate conversion. Here, it is possible to change the quantized scale after conversion only at the macroblock position where the quantized scale code exists in the data before conversion.
[0086]
FIG. 12 shows a state where a quantization scale code exists before and after rate conversion.
In the figure, the left diagram shows a state where a scale code before rate conversion exists, and the right diagram shows the existence of a scale code after rate conversion.
[0087]
The left side of each figure shows the value of the slice layer, the right side shows the value of the macroblock layer, and the halftone dot is the position where the quantization scale code exists.
[0088]
  In this way, the quantized scale code after rate conversion existed before rate conversion.Macro blockPart of the positionMacro blockThe quantization scale after the conversion is supplied to the inverse quantization / requantization unit 22.
[0089]
The inverse quantization / requantization unit 22 is supplied with the pre-conversion quantization scale code and the DCT coefficient part that have been variable-length decoded by the variable-length decoding unit 21, and the DCT coefficient part is obtained from the pre-conversion quantization scale code. The obtained quantization scale is subjected to inverse quantization conversion, and the data obtained by the inverse quantization conversion is requantized based on the converted quantization scale supplied from the code amount control unit 23.
[0090]
That is, the inverse quantization and requantization processing in the inverse quantization / requantization unit 23 compares the supplied pre-conversion quantization scale and post-conversion quantization scale, and the magnitude obtained by the comparison. Processing is performed according to the relationship, and there are the following three cases in the inverse quantization and requantization processing.
[0091]
The first case is a case where the pre-conversion quantization scale and the post-conversion quantization scale are equal. In this case, the inverse quantization and re-quantization processes are not performed, and the DCT coefficient part before conversion remains as it is after the conversion. Supplied as a coefficient part.
[0092]
The second case is a case where the pre-conversion quantization scale is larger than the post-conversion quantization scale. In this case, the pre-conversion quantization scale is divided by the post-conversion quantization scale for each DCT coefficient before conversion. The value of the ratio is multiplied, and the updated DCT coefficient value obtained by the multiplication is supplied as the converted DCT coefficient.
[0093]
In this second case, since the DCT coefficient value updated by the rate conversion process becomes large, the data structure will not be kept the same because it is deleted when the coefficient value becomes 0. It is not necessary to perform processing such as coefficient selection for the DCT coefficient values that have been performed.
[0094]
The third case is a case where the pre-conversion quantization scale is smaller than the post-conversion quantization scale. In this case, the pre-conversion quantization scale is set to the post-conversion quantization scale for each DCT coefficient before conversion. The updated DCT coefficient value is obtained by multiplying by the divided ratio value. In this case, the updated DCT coefficient value is a small value, and in some cases, all the updated DCT coefficients are 0 blocks. May occur.
[0095]
For a block in which the updated coefficient value is 0 to prevent the updated DCT coefficient value from becoming all 0 and the data structure from being deleted due to deletion in that block. The pre-conversion DCT coefficients are supplied to the coefficient selection unit 24, where coefficient selection processing is performed to prevent all post-conversion DCT coefficients from becoming zero.
[0096]
The coefficient selection process performed by the coefficient selection unit 24 first determines a coefficient to be left among DCT coefficients before conversion supplied from the inverse quantization / requantization unit 22 before conversion.
[0097]
In the first coefficient determination method, the DCT coefficient value after conversion at the position is set to “1” or “−1” with respect to the maximum absolute value of the DCT coefficient before conversion before inverse quantization, and “0” is set otherwise. "For a block with a plurality of maximum values, the coefficient value at the position where the code length becomes the shortest when encoded with two-dimensional VLC, and when the code length at that time is the same, The coefficient is determined by selecting the coefficient value at the position where the zero run is the shortest.
[0098]
In the second coefficient determination method, regardless of the coefficient value of the pre-conversion DCT, whether the coefficient block is a luminance signal or a blue / red color difference signal, and also the coefficient distribution of the pre-conversion DCT coefficient The position of the coefficient that has the least influence on image quality and the code length of the two-dimensional VLC is determined in advance, and the coefficient is determined on the assumption that the coefficient at the determined position is the position of the DCT coefficient after conversion. .
[0099]
  In this way, the position of the coefficient to be left or replaced in the coefficient selection unit 24 is determined by the first or second method..Inverse quantization / requantization unit 22FromSuppliedRuRequantized signalIsallButThe DCT coefficient of the block that does not become 0 is supplied to the variable length coding unit 25.
[0100]
In this way, the DCT coefficients of blocks that do not all become zero are supplied to the variable length coding unit 25, but when the supplied macroblock signal is an intra macroblock signal that is intra-coded. Even if all the DCT coefficients become 0, the data structure is not changed, so that the processing of the coefficient selection unit 24 for the intra macroblock may not be performed.
[0101]
As described above, the variable length encoding unit 25 is also supplied with the variable length decoded data that has not been supplied to the inverse quantization / requantization unit 22.
[0102]
In the variable length coding unit 25, the quantization scale code in the supplied data is the post-conversion determined by the code amount control unit 23 at the position of the macroblock where the pre-conversion quantization scale code exists. The code is converted into a code indicating the quantization scale, and is replaced with the converted code, where the replaced code is subjected to variable length coding.
[0103]
Depending on the state of code amount control, the same value as the quantized scale code existing immediately before and the updated quantized scale code in the same slice may be used. Although it exists, its existence is not a problem with the standard defined by MPEG-2.
[0104]
In the opposite case, there is a macroblock for which no pre-conversion quantization scale code exists, but it is not necessary to add a post-conversion quantization scale code to the macroblock.
[0105]
That is, when the quantization scale code does not exist, the converted DCT coefficient supplied from the inverse quantization / requantization unit 22 is variable length encoded by the variable length encoding unit 25 and obtained by variable length encoding. This is because the received signal and the quantization scale code included in the other variable length code data separated by the variable length decoding unit 21 are combined and supplied to the header combining unit 15.
[0106]
In the header combining unit 15, only the updated new bit rate value is replaced with the converted value in the header data temporarily stored in the header data storage unit 14, and variable length coding is performed in the two-dimensional VLC unit 28. Then, it is combined with the converted data obtained by combining the data in the data combining unit 29 and supplied to the re-MUX unit 17.
[0107]
Then, the re-MUX unit 17 is combined with a signal portion other than the image encoded signal supplied from the DEMUX unit 11, and a bit stream signal obtained by the combination is supplied as an output signal of the image encoding rate conversion device 10. The
[0108]
The configuration of the image coding rate conversion apparatus according to the first embodiment in which rate conversion is performed by dequantization and requantization and the operation of the apparatus have been described above.
In the example shown here, inverse quantization and requantization are simultaneously performed by the inverse quantization / requantization unit 22 to simplify data processing. It is good also as a structure which performs a quantization separately in a requantization part.
[0109]
FIG. 13 shows a configuration of an image coding rate conversion apparatus 10a modified from the first embodiment that performs dequantization and requantization separately.
[0110]
  In the case of the modified embodiment, the inverse quantization unit22aAfter performing inverse quantization on all blocks having DCT coefficients before conversion in step 4, the requantization unit22bThus, the re-quantization is performed so that all the DCT coefficients after conversion do not become zero.
[0111]
Next, an image coding rate conversion apparatus according to a second embodiment that performs rate conversion processing without using inverse quantization and requantization will be described.
[0112]
FIG. 14 shows the configuration of an image coding rate conversion apparatus according to the second embodiment.
That is, the image coding rate conversion apparatus performs rate conversion by operating the DCT coefficient portion without performing inverse quantization / requantization.
[0113]
Compared with the image coding rate conversion device 10 according to the first embodiment, the image coding rate conversion device 10b according to the second embodiment operates as the image rate conversion unit 20b, that is, the DCT coefficient separation unit 26 and the coefficient operation unit. 27, only the operations of the DCT coefficient combining unit 28 and the code amount control unit 23 are different. Therefore, the operations of the image coding rate conversion apparatus 10b will be described with the other operations being simplified.
[0114]
In the MPEG-2 stream supplied to the image coding rate conversion apparatus 10b, an image data portion which is one of the encoded signals from which the header data portion is separated by the header separation unit 13 is supplied to the DCT coefficient separation unit 26. However, the DCT coefficient separation unit 26 obtains the DCT coefficient part from the image data part, and the obtained DCT coefficient part data is supplied to the coefficient operation unit 27.
[0115]
Then, the other header data portion separated by the header separation unit 13 is supplied to the code amount control unit 23, which pre-conversion bit rate information, post-conversion target bit rate information, and input code amount The code amount information of each image before and after conversion supplied from the counter 12 and the output code amount counter 16, the code amount information before and after the rate conversion of each block counted by the coefficient operation unit 27, and further if necessary Quantization scale code information is supplied, and the code amount is controlled by a predetermined method based on the supplied information.
[0116]
The code amount control method is such that, after the target code amount for each image is determined, the target code amount is divided by the number of macroblocks included in one image, and 1 is based on the code amount obtained by dividing the target code amount. A target code amount per macroblock is determined, and a target code amount for each of six blocks included in the macroblock is assigned based on the determined code amount per macroblock.
[0117]
The target code amount for each block allocated in this way is supplied to the coefficient operation unit 27, and the coefficient operation unit 27 controls the coefficient of each corresponding block based on the allocated code amount, The coefficient operation is performed by the coefficient operation unit 27 so that the code amount of each block becomes the target code amount.
[0118]
In addition, the code amount control by another method is performed by calculating the bit rate ratio of the portion related to the DCT coefficient code amount of the target code amount after conversion with respect to the code amount before rate conversion for each block, and obtaining the obtained bit rate. The ratio is multiplied by the pre-conversion code amount to determine the target code amount after rate conversion for each block, and the determined post-conversion target code amount information is supplied to the coefficient operation unit 27, where the target code amount is obtained. The DCT coefficient portion is manipulated.
[0119]
In the operation of the DCT coefficient portion in the coefficient operation unit 27 at that time, when the target code amount after rate conversion for each block is larger than the code amount before conversion, coefficient operation processing is not performed, but the target value For example, when it is desired to obtain a bit rate signal after conversion equal to, dummy data is inserted into the image data position for each slice or picture as necessary to obtain a signal having a target transfer rate.
[0120]
When the post-conversion target code amount is larger than the pre-conversion code amount, the transfer rate may be adjusted by inserting dummy data for each slice or picture. In this case, except for the bit rate information and the DCT coefficient part This part does not fall under the precondition that no change is made.
[0121]
Next, the adjustment of the transfer rate when the converted target code amount is smaller than the pre-conversion code amount will be described. In this case, the data amount of the DCT coefficient part before rate conversion encoded by the two-dimensional VLC is changed. An operation for obtaining the data of the target code amount after conversion is performed.
[0122]
For this operation, for example, the two-dimensional VLC code arranged before the EOB is deleted one by one by the combination of the run and the level, and when the converted target code amount reaches a predetermined value, There is a way to cancel the deletion.
[0123]
The deletion is stopped for the last two-dimensional VLC code arranged before the EOB even if the converted target code amount does not reach the predetermined value. .
[0124]
In this case, the coefficient block supplied from the coefficient selection unit 24 is predetermined based on the code indicating the block type, which is a luminance signal or a blue or red color difference signal, and the coefficient distribution of the DCT coefficients before conversion. A two-dimensional VLC code indicating the selected coefficient is selected, a code obtained by adding EOB to the selected code is determined, and the determined code is used as a code of the DCT coefficient portion after conversion of this block.
[0125]
Note that if the macroblock at this time is an intra macroblock that performs in-plane coding, all the coefficients may be 0, and therefore, all the two-dimensional VLC codes other than EOB may be deleted.
[0126]
In this way, the DCT coefficient is deleted from the high frequency component, and the data of the converted target code amount in which the data amount of the DCT coefficient portion is reduced is obtained. Next, a method of reducing the data amount by another method Is described.
[0127]
The method decodes a two-dimensional VLC code before conversion to obtain DCT coefficient sequence data, replaces a part of the obtained DCT coefficient sequence data with “0”, and cuts the coefficient. This is a method of performing two-dimensional VLC encoding again on the DCT coefficient sequence data.
[0128]
In this method, the degree of influence on the image quality after conversion is determined in advance as the code amount ratio before and after rate conversion of the portion where the coefficient sequence is replaced with “0”, and the target code is set unless the coefficient is set to “0”. When the amount is not satisfied, it is replaced with a coefficient to be left supplied from the coefficient selection unit 24.
[0129]
In the coefficient selection unit 24, for the data of the DCT coefficient part that is the DCT coefficient obtained by decoding the two-dimensional VLC code supplied from the coefficient operation part 27, the coefficient part data is “0” in the coefficient operation part 27. “2D VLC code or DCT coefficient to be left is determined for a block that is determined as“.
[0130]
One method for determining the DCT coefficient is to set the position to “1” or “−1” with respect to the maximum value of the two-dimensional VLC level or the absolute value of the DCT coefficient, and “0” for the other. The DCT coefficient "" is used as the DCT coefficient after conversion, and the coefficient is set as a two-dimensional VLC value as necessary.
[0131]
For a block having a plurality of maximum values at that time, the position where the code length becomes the shortest when encoded by two-dimensional VLC, and the position where the zero run becomes the shortest when they are the same code length, The coefficient of the position is set as the value of the two-dimensional VLC.
[0132]
Other methods for determining DCT coefficients include block types such as whether the coefficient block is a luminance signal or a color difference signal for blue or red, regardless of the value of the two-dimensional VLC or DCT coefficient before conversion, The coefficient distribution of the DCT coefficient before conversion has the least influence on the image quality of the converted image, and the position of the coefficient at which the code length of the two-dimensional VLC is shortened is determined in advance, and after conversion based on the determined position. The DCT coefficient is determined.
[0133]
The DCT coefficients after conversion determined by the coefficient selection unit 24 by these methods are supplied to the coefficient operation unit 27, and the coefficient operation unit 27 performs rate conversion of the supplied coefficients, and 2 of the DCT coefficients subjected to rate conversion. The dimensional VLC code is supplied to the DCT coefficient combining unit 28.
[0134]
The DCT coefficient combining unit 28 recombines the supplied two-dimensional VLC code and data other than the DCT coefficient part supplied from the DCT coefficient separating unit 26, and the data obtained by the recombination is the header combining unit 15. In this example, the transfer rate value is combined with the updated header data, and the combined signal is combined with an encoded signal such as an audio signal other than an image in the re-MUX unit and combined. The signal is supplied as a stream output of the image coding rate conversion apparatus 10b.
[0135]
As described above, the stream output signal is supplied from the image coding rate conversion apparatus 10b according to the second embodiment, but the quantization scale code is not changed in the stream output and is recorded in the sequence header. This is a signal in which only the bit rate information and the DCT coefficient portion are updated, and the image coding rate conversion apparatus 10b for updating the bit stream with the same data structure can be easily configured. Yes.
[0136]
Next, a third embodiment of the rate conversion method for encoded image data will be described with reference to the drawings.
FIG. 15 shows the configuration of an image coding rate conversion apparatus according to the third embodiment.
[0137]
The image coding rate conversion device 10c is a device that performs rate conversion by inverse quantization / requantization in the same manner as in the first embodiment, and is an inverse quantization / requantization unit as compared with the first embodiment. 22 and the variable length encoding unit 25 are different in that the coefficient operation unit 27 is provided.
[0138]
In the configuration according to the first embodiment, the code amount control is performed using the post-conversion quantization scale supplied from the code amount control unit 23, but the macro block in which the quantization scale code exists in the pre-conversion data. The code amount control when the number is small and the change position of the quantization scale code is insufficient in the code amount control after conversion is performed as follows.
[0139]
That is, in the control of the coefficient operation unit 27 next to the inverse quantization / requantization unit 22, a part of the DCT coefficient after requantization is set to “0” or a value smaller than the original coefficient. By reducing the coefficient, the two-dimensional VLC code length encoded by the subsequent variable-length encoding unit is shortened, and the code amount after conversion in the code amount controller 23 is set to a required value.
[0140]
  The position of the DCT coefficient to be reduced at that time and the specific method for reducing the coefficient are supplied from the code amount controller 23. For example, when the two-dimensional VLC processing is performed, the coefficient arranged at the rearmost position To reduce in orderSaid as.
[0141]
  Shown hereYouIn the third embodiment, the coefficient operation unit 27 performs the same coefficient reduction as described above.
[0142]
Further, for the block in which the coefficient is reduced by the coefficient operation unit 27 or the coefficients supplied from the inverse quantization / requantization unit 22 are all 0, the coefficient to be left selected by the coefficient selection unit 24 described above. Is supplied from the coefficient operation unit 27.
[0143]
In this way, the stream signal with the coding rate changed is supplied by the image coding rate conversion apparatus 10c shown in the third embodiment, and the coefficient operation unit 27 for that purpose is provided in the first example shown in FIG. Even when added to the image coding rate conversion apparatus 10a modified according to the first embodiment, a rate conversion apparatus that performs the same operation can be configured.
[0144]
As described above, the transfer rate conversion is performed without converting the bit stream signal encoded based on the MPEG-2 system to the pixel level and maintaining the same data structure of the bit stream. An example of this was described.
[0145]
  The rate conversion method performed by these embodiments divides a supplied moving image signal of a frame image into a plurality of image data for each pixel block of 16 pixels × 16 pixels, for example, and for each divided pixel block. A motion vector amount is obtained, and while performing motion compensation prediction based on the obtained motion vector amount, image data of the pixel block is subjected to orthogonal transformation by DCT transformation or the like, and data obtained by the orthogonal transformation is obtained. Quantize, generate encoded image signal by variable length encoding the data obtained by quantization, and information on encoding parameters such as orthogonal transformation and motion prediction related to the generation of the encoded image signal Obtained as encoded information, generates a header signal including the obtained encoded information, and combines the generated encoded image signal and header signal To obtain a first encoded bit stream that is compression-encoded at the first transfer rate, and the data of the obtained bit stream is supplied and is lower than the first transfer rate or the first transfer rate. A rate conversion method of image encoded data obtained by converting into a bit stream signal encoded at a different second transfer rate, or an image encoding rate conversion device using an encoded image signal from a supplied bit stream signal And coding parameter information are separated, and coefficient data for each pixel block obtained by orthogonal transform of the coded image signal is obtained based on the coded information obtained by the separation, and the obtained image data Generating updated image data by deleting one or more of the plurality of quantized coefficients of the quantized data and deleting other quantized coefficients, and the generated updated image data, Based on the encoded information obtained by the signal separating means, the encoded information whose transfer rate information is updated is combined to generate second encoded data at the second transfer rate.LikeTherefore, it is possible to reduce the delay time for signal conversion as compared to converting the encoded signal into an image signal and then encoding by reconversion to convert the transfer rate. There is no need for temporary storage of the image signal, the conversion method is easy, and generation of the updated encoded data is performed by converting the transfer rate while maintaining the same data structure in the first encoding method.CanThat is, when each divided macroblock is converted into a signal of the same macroblock type and CBP as before conversion, and when rate conversion is performed by requantization, an updated macroblock of the quantization scale before conversion Since the rate conversion is performed so that the quantization scale is updated only at the same position as the position, only the DCT coefficient portion is converted in the data to be converted, and when the rate conversion is performed by requantization, the DCT coefficient portion and the quantum are converted. Only the scale code can be used, and the macroblock type and CBP are not changed before and after the conversion, and the data to be operated in the conversion is only the DCT coefficient part when directly operating the variable length code of the DCT coefficient part. In the rate conversion by requantization, only the DCT coefficient part and the quantization scale code are changed.RuSince the processing accompanying the rate conversion can be simplified, the header signal attached to the rate-converted image signal can also be set to the minimum change such as the transfer rate information, and the header signal is generated in the header signal. Even though all applicable image data can be updated without waiting, the method for realizing the rate conversion is easy, and the configuration of the device for rate conversion can be simplified. Since the encoded signal generated by a simple device can change the transfer rate in a harmonious manner throughout the bitstream, especially when trying to obtain a bitstream converted into an encoded signal with a low transfer rate. In addition, a signal converted into an encoded signal with little image quality degradation can be obtained.
[0146]
In the embodiment described above, the encoding method of the bit stream to be converted has been described centering on MPEG-2. However, the encoding method is not limited to MPEG-2, and a predetermined amount of encoded image data is included. On the other hand, an encoding method having a data structure similar to MPEG-2, such as MPEG-1 method, H261, etc., in which bitstream is formed in association with the image data by using information on the encoding parameter as header information. , And other MPEG-4, MPEG-7, and MPEG-21 encoded bitstreams.
[0147]
The code amount control before and after rate conversion shown in these examples can be applied to either fixed bit rate control or variable bit rate control.
[0148]
【The invention's effect】
  According to the first aspect of the present invention, without converting the encoded signal to the pixel level,In addition, the quantized values of the updated DCT coefficients are all 0 and are prevented from being deleted in that block.Transfer rate conversion is performed while maintaining the same data structure of the encoded signal.SongTherefore, the amount of data storage for signal processing is small, the delay time for signal processing is short, image quality degradation is small, and there is no need to make complicated code changes such as CBP header changes. Simple image code for easy volume controlChangeConversionapparatusThere is an effect that can be provided.
[0149]
  Claims2According to the described invention, without converting the encoded signal to the pixel level,In addition, the updated DCT coefficient values are all 0 to prevent deletion in that block.Transfer rate conversion is performed while maintaining the same data structure of the encoded signal.SongTherefore, the amount of data stored for signal processing is small, the delay time for signal processing is short, the image quality is hardly deteriorated, and there is no need to make complicated code changes such as changing the header such as CBP. Simple image coding rate conversion with easy volume controlMethodThere is an effect that can provide.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram of an image coding rate conversion apparatus according to an embodiment of the present invention.
FIG. 2 is a schematic block diagram of an MPEG-2 encoding device.
[Fig. 3] Fig. 3 is a diagram illustrating a picture type structure related to motion compensated prediction in the MPEG-2 encoding scheme.
FIG. 4 is a diagram illustrating a structure of pixel data related to transform coding in the MPEG-2 coding method.
FIG. 5 is a diagram illustrating a data structure of a bit stream transmitted by the MPEG-2 method.
FIG. 6 is a diagram illustrating a data structure in a macroblock layer encoded by the MPEG-2 method.
FIG. 7 shows a macro block type VLC table for an I picture encoded by the MPEG-2 system.
FIG. 8 shows a macro block type VLC table for a P picture encoded by the MPEG-2 system.
FIG. 9 shows a macro block type VLC table for a B picture encoded by the MPEG-2 system.
FIG. 10 is a diagram illustrating a data structure in a block layer encoded by the MPEG-2 method.
FIG. 11 is a diagram showing a configuration of an image coding rate conversion apparatus according to a first embodiment relating to the implementation of the present invention.
FIG. 12 is a diagram for explaining the presence of a quantization scale code before and after rate conversion according to the embodiment of the present invention.
FIG. 13 is a diagram illustrating a configuration of an image coding rate conversion apparatus according to a modification of the first embodiment relating to the implementation of the present invention.
FIG. 14 is a diagram showing a configuration of an image coding rate conversion apparatus according to a second embodiment relating to the implementation of the present invention.
FIG. 15 is a diagram showing a configuration of an image coding rate conversion apparatus according to a third embodiment relating to the implementation of the present invention.
FIG. 16 is a diagram showing a configuration of a rate conversion apparatus in a conventional example.
[Explanation of symbols]
10, 10a, 10b, 10c Image coding rate conversion device
11 DEMUX section
12 Input code amount counter
13 Header separator
14 Header data storage
15 Header coupling part
16 Output code amount counter
17 Re-MUX section
20, 20a, 20b, 20c Image rate conversion unit
21 Variable length decoder
22 Inverse quantization / requantization unit
22a Inverse quantization unit
22b Requantizer
23 Code amount control unit
24 Coefficient selector
25 Variable length coding unit
26 DCT coefficient separation unit
27 Coefficient operation section
28 DCT coefficient coupling part
60 MPEG-2 encoder
61 Subtractor
62 DCT unit
63 Quantizer
64 Code amount controller
65 Variable length encoder
66 buffers
71 Inverse Quantizer
72 IDCT device
73 Adder
74 frame memory
75 Motion Compensated Predictor
81 Data separation circuit
82 Inverse VLC circuit
83 Inverse quantizer
84 bit rate control circuit
85 Quantizer
86 VLC circuit
87 Coupling circuit
88 Buffer circuit

Claims (2)

単位ブロックをDCT変換して得られた複数の係数を第1の量子化ステップで量子化及び可変長符号化された第1の符号化量子化データを用いて得られた第1の画像符号化データを前記第1の量子化ステップよりも広いステップ幅の第2の量子化ステップで量子化及び可変長符号化された第2の符号化量子化データを用いて得られた第2の画像符号化データに変換る画像符号化レート変換装置であって、
前記第1の画像符号化データをヘッダデータ、前記第1の符号化量子化データ及び前記第1の符号化量子化データ以外のデータとに分離するヘッダ分離部と
前記ヘッダ分離部で分離された前記第1の符号化量子化データを可変長復号して第1の量子化データを出力する可変長復号部と、
前記第1、第2の画像符号化データの符号量情報に基づいて、前記第2の量子化ステップを出力する符号量制御部と、
前記第1の量子化データの逆量子化を行って第1のDCT係数データを得、前記第2の量子化ステップに基づいて、前記第1のDCT係数データを再量子化して第2のDCT係数データを生成する逆量子化・再量子化部と、
前記第2のDCT係数データの中に含まれる係数値が全て0であった場合には、前記第1のDCT係数データの係数を残す指示を前記逆量化・再量子化部に行って前記逆量子化・再量子化部から第3のDCT係数データを出力させる係数選択部と、
前記第3のDCT係数データを可変長符号化して前記第2の符号化DCT係数データを生成する可変長符号化部と、
前記第2の符号化DCT係数データと分離された前記ヘッダデータと前記第1の符号化量子化データ以外のデータとを結合して前記第2の画像符号化データを出力するヘッダ結合部と、
を備えたことを特徴とする画像符号化レート変換装置。
First image coding obtained using first coded quantized data obtained by quantizing and variable-length coding a plurality of coefficients obtained by DCT transform of a unit block in a first quantization step Second image code obtained by using second encoded quantized data obtained by quantizing and variable-length encoding data in a second quantization step having a step width wider than that of the first quantization step an image coding him over preparative converter that converts the data,
A header separating portion for separating the first image coded data header data, the said first coded quantized data and the first encoded quantized data other than the data,
A variable length decoding unit that performs variable length decoding on the first encoded quantized data separated by the header separation unit and outputs first quantized data;
A code amount control unit that outputs the second quantization step based on code amount information of the first and second image encoded data; and
The first quantized data is inversely quantized to obtain first DCT coefficient data, and the first DCT coefficient data is requantized based on the second quantization step to obtain a second DCT coefficient data. An inverse quantization / requantization unit that generates coefficient data;
When all the coefficient values included in the second DCT coefficient data are 0, an instruction to leave the coefficient of the first DCT coefficient data is given to the inverse quantification / requantization unit, and the inverse A coefficient selection unit that outputs third DCT coefficient data from the quantization / requantization unit;
A variable-length encoding unit that variable-encodes the third DCT coefficient data to generate the second encoded DCT coefficient data;
A header combining unit that combines the header data separated from the second encoded DCT coefficient data and data other than the first encoded quantized data to output the second image encoded data ;
Picture coding rate conversion apparatus characterized by comprising a.
単位ブロックをDCT変換して得られた複数の係数を第1の量子化ステップで量子化及び可変長符号化された第1の符号化量子化データを用いて得られた第1の画像符号化データを前記第1量子化ステップよりも広いステップ幅の第2の量子化ステップで量子化及び可変長符号化された第2の符号化量子化データを用いて得られた第2の画像符号化データに変換る画像符号化レート変換方法であって、
前記第1の画像符号化データをヘッダデータ、前記第1の符号化量子化データ及び前記第1の符号化量子化データ以外のデータとに分離し、
前記分離された前記第1の符号化量子化データを可変長復号して第1の量子化データを出力し、
前記第1、第2の画像符号化データの符号量情報に基づいて、前記第2の量子化ステップを出力し、
前記第1の量子化データの逆量子化を行って第1のDCT係数データを得、前記第2の量子化ステップに基づいて、前記第1のDCT係数データを再量子化して第2のDCT係数データを生成し、
前記第2のDCT係数データの中に含まれる係数値が全て0であった場合には、前記第1のDCT係数データの係数を残す指示を行って第3のDCT係数データを出力させ、
前記第3のDCT係数データを可変長符号化して前記第2の符号化DCT係数データを生成し、
前記第2の符号化DCT係数データと分離された前記ヘッダデータと前記第1の符号化量子化データ以外のデータとを結合して前記第2の画像符号化データを出力することを特徴とする画像符号化レート変換方法。
First image coding obtained using first coded quantized data obtained by quantizing and variable-length coding a plurality of coefficients obtained by DCT transform of a unit block in a first quantization step Second image encoding obtained using second encoded quantized data obtained by quantizing and variable-length encoding data in a second quantization step having a step width wider than that of the first quantization step an image coding him over preparative conversion method that converts the data,
Separating the first image encoded data into data other than header data, the first encoded quantized data, and the first encoded quantized data;
Variable length decoding the separated first encoded quantized data to output first quantized data;
Based on the code amount information of the first and second image encoded data, the second quantization step is output,
The first quantized data is inversely quantized to obtain first DCT coefficient data, and the first DCT coefficient data is requantized based on the second quantization step to obtain a second DCT coefficient data. Generate coefficient data,
If all the coefficient values included in the second DCT coefficient data are 0, an instruction to leave the coefficient of the first DCT coefficient data is issued to output the third DCT coefficient data,
Variable length encoding the third DCT coefficient data to generate the second encoded DCT coefficient data;
And wherein also be output from the second image coded data by combining said second encoded DCT coefficient data and separated the header data and the first encoded quantized data other than the data image encoding he over preparative conversion method for.
JP2001014249A 2001-01-23 2001-01-23 Image coding rate conversion apparatus and image coding rate conversion method Expired - Lifetime JP3770466B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001014249A JP3770466B2 (en) 2001-01-23 2001-01-23 Image coding rate conversion apparatus and image coding rate conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001014249A JP3770466B2 (en) 2001-01-23 2001-01-23 Image coding rate conversion apparatus and image coding rate conversion method

Publications (2)

Publication Number Publication Date
JP2002218471A JP2002218471A (en) 2002-08-02
JP3770466B2 true JP3770466B2 (en) 2006-04-26

Family

ID=18880974

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001014249A Expired - Lifetime JP3770466B2 (en) 2001-01-23 2001-01-23 Image coding rate conversion apparatus and image coding rate conversion method

Country Status (1)

Country Link
JP (1) JP3770466B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4642509B2 (en) * 2005-03-08 2011-03-02 国立大学法人信州大学 Apparatus for embedding confidential information in compressed image data and apparatus for encoding confidential data

Also Published As

Publication number Publication date
JP2002218471A (en) 2002-08-02

Similar Documents

Publication Publication Date Title
KR100289852B1 (en) Image coding method, image coding apparatus and image recording medium
KR100599017B1 (en) Image data compression device and method
JP3358620B2 (en) Image encoding method and image encoding device
US6628713B1 (en) Method and device for data encoding and method for data transmission
JPH0923423A (en) Signal coding method, signal coding device, and signal recording medium
KR19990072968A (en) Picture signal processing system, decoder, picture signal processing method, and decoding method
JPH06125543A (en) Encoder
JP2001145113A (en) Image information conversion apparatus and method
JP2004343280A (en) Image processing apparatus and image processing method, information processing apparatus, recording medium, and program
EP1032212A2 (en) Transcoder, transcoding system, and recording medium
JPH06276481A (en) Picture signal coding and decoding method and recording medium
JPH0879766A (en) Moving picture coding method and moving picture coding apparatus
JPH09322176A (en) Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method
EP1833256B1 (en) Selection of encoded data, setting of encoded data, creation of recoded data, and recoding method and device
JP4224778B2 (en) STREAM CONVERTING APPARATUS AND METHOD, ENCODING APPARATUS AND METHOD, RECORDING MEDIUM, AND PROGRAM
JP4114210B2 (en) Video data compression apparatus and method
US8054887B2 (en) Method and apparatus for encoding a picture sequence using predicted and non-predicted pictures which each include multiple macroblocks
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
JP3818819B2 (en) Image coding method conversion apparatus, image coding method conversion method, and recording medium
JP4120934B2 (en) Image processing apparatus, image processing method, recording medium, and program
JP4292659B2 (en) Image information conversion apparatus and image information conversion method
JP3770466B2 (en) Image coding rate conversion apparatus and image coding rate conversion method
JP4032446B2 (en) Video data compression apparatus and method
JP2007235989A (en) Image processing apparatus, image processing method, program, and recording medium
JP2002262293A (en) Video decoding apparatus and video decoding method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051014

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060202

R151 Written notification of patent or utility model registration

Ref document number: 3770466

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20090217

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100217

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110217

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120217

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20120217

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120217

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130217

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130217

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140217

Year of fee payment: 8

EXPY Cancellation because of completion of term