JP4153150B2 - Transcoding method and transcoding apparatus for moving image encoded data - Google Patents

Transcoding method and transcoding apparatus for moving image encoded data Download PDF

Info

Publication number
JP4153150B2
JP4153150B2 JP2000266346A JP2000266346A JP4153150B2 JP 4153150 B2 JP4153150 B2 JP 4153150B2 JP 2000266346 A JP2000266346 A JP 2000266346A JP 2000266346 A JP2000266346 A JP 2000266346A JP 4153150 B2 JP4153150 B2 JP 4153150B2
Authority
JP
Japan
Prior art keywords
frame
processing target
motion information
encoded data
macroblock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000266346A
Other languages
Japanese (ja)
Other versions
JP2001169295A (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.)
NTT Docomo Inc
Original Assignee
NTT Docomo Inc
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 NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to JP2000266346A priority Critical patent/JP4153150B2/en
Publication of JP2001169295A publication Critical patent/JP2001169295A/en
Application granted granted Critical
Publication of JP4153150B2 publication Critical patent/JP4153150B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明が属する技術分野】
この発明は、動画像情報の圧縮伝送技術に係り、特に動画像符号化データを構成の異なった動画像符号化データに変換するトランスコーディング方法およびトランスコーデイング装置に関する。
【0002】
【従来の技術】
文字、図形、音声、映像などの異なる情報をデジタルデータで表現し、これらのメディアを統合して一元的に取り扱うマルチメディアが近年注目を浴びている。このマルチメディアに対応するオーディオ・ビデオ符号化方式として、ISO/IECのMPEG(Moving Picture Experts Group)1等があり、これらに準拠した動画像符号化伝送システムが各種提供されている。
【0003】
図24(a)および(b)は、この種の動画像符号化伝送システムの一般的な構成を示すものであり、同図(a)は送信側の符号化器の構成を示すブロック図、同図(b)は受信側の復号器の構成を示すブロック図である。
【0004】
送信側の符号化器は、図24(a)に示すように、減算器101と、DCT(Discrete Cosine Transform ;離散コサイン変換)部102と、量子化器103と、逆量子化器104と、逆DCT部105と、動き予測および補償部106と、可変長符号化器107および108と、多重化装置109とを有している。
【0005】
また、受信側の復号器は、図24(b)に示すように、逆多重化装置201Aと、可変長復号器201および206と、逆量子化器202と、逆DCT部203と、加算器204と、動き補償部205とを有している。なお、以上列挙した符号化器および復号器の各構成要素は、専用のハードウェアにより構成する他、所定のプログラムを実行するDSP(デジタル信号プロセッサ)等により構成してもよい。
【0006】
図24(a)および(b)に示す構成において、符号化器には、所定個数の画面(以下、フレームという)からなるピクチャグループの画像情報が順次供給される。符号化器は、このピクチャグループを一単位として画像情報の符号化を行う。1つのピクチャグループには、1つのIフレームを含めることが必要であり、また、これに加えて、1または複数のPフレームやBフレームを含めることができる。ここで、Iフレームは、いわゆるフレーム内符号化の対象となるフレームである。また、Pフレームは、当該フレームの前のフレームの画像を参照することにより符号化および復号が行われるフレームであり、Bフレームは、当該フレームの前および後の各フレームを参照することにより符号化および復号が行われるフレームである。
【0007】
図25は、このようなピクチャグループを構成する各フレームが順次与えられた場合の符号化器の動作を例示している。なお、この図25では、説明を簡単にするため、Iフレームに続いて、P1フレーム、P2フレーム、という具合に、IフレームとPフレームが符号化器に入力される場合を例に挙げている。以下、この図25を参照し、符号化器の動作を説明する。
【0008】
まず、Iフレームに対応した画像情報が入力された場合、図24(a)における符号化器の各構成要素による処理は行われず、所定の符号化アルゴリズムにより現画像(Iフレーム)の画像情報のフレーム内符号化が行われ、この結果得られる符号化データが受信側に伝送される。また、符号化器では、上記符号化アルゴリズムに対応した復号アルゴリズムに従って、符号化データからIフレームの画像情報が復号され、動き予測および補償部106内のメモリ(図示略)に参照画像として保存される。
【0009】
次に、P1フレームが入力されると、符号化器では、現画像(P1フレーム)が複数のマクロブロックMBij(i=1〜M、j=1〜N)に分割される。ここで、各マクロブロックは、2×2=4個のブロックからなり、各ブロックは8×8=64個の画素により構成されている。そして、符号化器では、各マクロブロックMBijについて、以下の処理が行われる。
【0010】
まず、動き予測および補償部106は、現画像のマクロブロックMBijに類似した同サイズの参照マクロブロックMBij’を参照画像(この場合、Iフレーム)の中から探索する。そして、この参照マクロブロックMBij’が移動してマクロブロックMBijとなったとみなし、その空間的な移動距離および方位を表す動き情報Vを出力する。ここで、動き情報Vは可変長符号化器206によって可変長符号に変換される。
【0011】
減算器101は、マクロブロックMBijの画像情報から参照マクロブロックMBij’の画像情報を減算して両画像の差分を求め、DCT部102は、この差分に対し、直交変換の一種であるDCTを施す。
【0012】
量子化器103は、DCT部102から得られる差分画像のDCT係数を量子化し、可変長符号化器107は、この量子化により得られたデータを可変長符号化する。
【0013】
このDCT係数を量子化したものの可変長符号と上述した動き情報Vの可変長符号とが、多重化装置109によって多重化され、マクロブロックMBijに対応した符号化データとして受信側へ送信される。
【0014】
一方、量子化器103の出力データは、逆量子化器104によって逆量子化され、この逆量子化器104の出力データが逆DCT部105に入力される。この結果、逆DCT部105から差分画像Δが出力される。この差分画像Δは、現画像(P1フレーム)のマクロブロックMBijと参照マクロブロックMBij’との差分に対応した画像情報であるが、DCT、量子化、逆量子化および逆DCTという過程を経て生成されるものであるため、これに伴った誤差を含んでいる。
【0015】
動き予測および補償部106は、逆DCT部105から得られた差分画像Δと参照マクロブロックMBij’とを加算する等の方法により、現画像(フレームP1)におけるマクロブロックMBijの画像情報を復元し、後続フレームの符号化の際に参照する参照画像としてメモリに保存する。
以上の処理が現画像(P1フレーム)を構成する全てのマクロブロックMBij(i=1〜M、j=1〜N)について実施されるのである。
【0016】
そして、次のフレームP2が入力されると、動き予測および補償部106内のメモリに保存された参照画像(フレームP1の画像)を参照して、上述と同様な符号化処理が行われる。フレームP2の後続の各フレームについても同様である。
【0017】
図26は、以上のようにして符号化器から送信されたIフレーム、P1フレーム、P2フレーム、…の各符号化データが受信された場合における復号器の動作を例示している。以下、この図26を参照し、復号器の動作を説明する。
【0018】
まず、Iフレームのフレーム内符号化データが受信された場合、図24(b)における復号器では、図示の各構成要素による処理は行われず、符号器側のフレーム内符号化アルゴリズムに対応した復号アルゴリズムに従って、フレーム内符号化データの復号が行われる。この結果、符号器側における動き予測および補償部106内のメモリに格納されたものと同じIフレームの画像情報が復号され、これが参照画像として復号器における動き補償部205内のメモリ(図示略)に保存される。
【0019】
次に、P1フレームの符号化データが復号器に入力される。この符号化データは、P1フレームの画像を分割した複数のマクロブロックMBij(i=1〜M、j=1〜N)に各々に対応した次の情報を含んでいる。
a.当該マクロブロックMBijと参照画像(フレームI)内のこれに類似した参照マクロブロックMBij’との間の差分に対し、DCT、量子化および可変長符号化を施して得られた可変長符号
b.参照マクロブロックMBij’から当該マクロブロックMBijに至る動きベクトルを表す動き情報Vの可変長符号
【0020】
復号器では、上記aおよびbの各可変長符号が逆多重化装置201Aによって分離され、可変長復号化器201および206によって実際の数値に戻される。そして、これらの各情報に従い、各マクロブロックMBij毎に以下の処理が行われる。
【0021】
まず、逆量子化器202および逆DCT部203により、上記aの可変長符号から得た実際の数値から、マクロブロックMBijと参照画像(フレームI)内の参照マクロブロックMBij’との間の差分画像Δが復元される。
【0022】
また、動き補償部205では、マクロブロックMBijに対応した上記bの動き情報Vに従い、当該マクロブロックMBijに対応した参照画像(フレームI)内の参照マクロブロックMBij’の所在が求められ、この参照マクロブロックMBij’の画像情報が内蔵のメモリ(図示略)から読み出される。そして、参照マクロブロックMBij’の画像情報と上記差分画像Δとが加算器204によって加算され、マクロブロックMBijの画像情報が復元される。
【0023】
以上の処理が全てのマクロブロックMBij(i=1〜M、j=1〜N)について行われ、フレームP1の全画像が復元される。このフレームP1の復元画像は参照画像として動き補償部205内のメモリに保存される。
【0024】
そして、次のフレームP2に対応した符号化データが受信されると、動き補償部205内のメモリに保存された参照画像(フレームP1の画像)を参照して、上述と同様な復号処理が行われる。フレームP2の後続の各フレームに対応した符号化データが受信された場合も同様である。
【0025】
さて、最近では、様々な通信システムにおいて動画像の符号化伝送が検討されるようになってきている。このため、ある伝送レートでの伝送を想定して動画像の符号化データが生成されたが、この符号化データを当初の予定とは異なった伝送レートで伝送しなければならないようなことが起こりうる。
【0026】
このような場合、ピクチャグループ当たりのフレームの数を減らし、符号化データのデータレートを減少させることが求められる。このための技術として、符号化データの方式を変換するトランスコーディングがある。図27(a)はこのトランスコーディングを行うための方法を示すものであり、図27(b)はこのトランスコーディングを行うための従来のトランスコーディング装置の構成を示すブロック図である。
【0027】
図27(b)に示すように、従来のトランスコーディング装置は、前掲図24(b)に示すものと同様な構成の復号器100と前掲図24(a)に示すものと同様な構成の符号化器200とを組み合わせた構成を有している。
【0028】
このトランスコーディング装置では、図27(a)に示すように、第1の符号化方法により生成された符号化データが復号器100によって復号され、この復号により得られた画像が、符号化器200により第2の符号化方法に従って符号化される。このような再符号化を行うことにより、元の符号化データとはデータレートの異なった符号化データを生成することができるのである。
【0029】
【発明が解決しようとする課題】
ところで、上述した従来のトランスコーディング方法は、符号化データから元の画像を復号し、この画像を再符号化することにより他の構成の符号化データを生成するので、演算量が多く、非効率的であり、また、符号化データの復号および再符号化に伴う変換誤差によって画質が劣化するという問題があった。
【0030】
この発明は以上説明した事情に鑑みてなされたものであり、少ない演算量で、符号化データを他の構成の符号化データに変換することができるトランスコーディング方法およびトランスコーディング装置を提供することを目的としている。
【0031】
【課題を解決するための手段】
この発明は、動き補償を伴ったフレーム間予測符号化アルゴリズムを含む符号化アルゴリズムにより動画像を構成する複数のフレームから得られた第1符号化データを、異なった構成を有する第2符号化データに変換するトランスコーディング方法において、前記動画像を構成する複数のフレームのうちフレーム間予測符号化の対象となったものの一部のフレームを処理対象フレームとし、処理対象フレームのフレーム間予測符号化において参照された第1参照フレームとは別の第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろう符号化データに相当する第2符号化データを、処理対象フレームを含む1または複数のフレームの第1符号化データから生成するフレーム間予測符号化データ再編集過程を含み、前記フレーム間予測符号化データ再編集過程は、少なくとも前記処理対象符号化データに含まれている動き情報を用いて、前記第2符号化データに含めるべき動き情報を算出する動き情報算出過程を含むことを特徴とするトランスコーディング方法を提供する。また、この発明は、かかるトランスコーディング方法によりトランスコーディングを行うトランスコーディング装置を提供する。
【0032】
【発明の実施の形態】
以下、図面を参照し、本発明の実施形態について説明する。
【0033】
A.第1の実施形態
A−1.トランスコーディング
図1はこの発明の第1の実施形態において行われるトランスコーディングの例を示す図である。この図1には、IフレームとP1フレーム〜P4フレームとからなるピクチャグループが図示されている。本実施形態では、これらの各フレームのうち例えばP1フレームとP3フレームとを間引くことによりデータレートの小さな符号化データを生成する。ここで、P2フレームは間引かれるP1フレームを参照しており、P4フレームは間引かれるP3フレームを参照している。従って、符号化データの中からP1フレームとP3フレームとに対応したものを間引くと、残りの符号化データからP2フレームやP4フレームの画像を復号することができなくなる。
【0034】
本実施形態では、フレーム間予測符号化が行われたフレームのうち間引かれるフレーム(この例ではP1フレームおよびP3フレーム)を第1参照フレームとし、この第1参照フレームを参照してフレーム間予測符号化が行われたフレーム(この例ではP2フレームおよびP4フレーム)を処理対象フレームとし、第1参照フレームのフレーム間予測符号化において参照されたフレームを第2参照フレーム(この例ではIフレームおよびP2フレーム)とする。そして、本実施形態では、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろう符号化データを、処理対象フレームに対応した符号化データと、第1参照フレームに対応した符号化データとから演算する。これが本実施形態におけるフレーム間予測符号化データ再編集処理である。
【0035】
A−2.トランスコーディング装置
図2は、本実施形態に係るトランスコーディング法を実施するためのトランスコーディング装置の構成を示すブロック図である。図2において、逆多重化装置1は、Iフレーム以外の各フレームに対応した符号化データを量子化されたDCT係数の可変長符号と動き情報の可変長符号とに分離する装置である。
可変長復号化器2Aは、動き情報の可変長符号を実際に数値に戻す装置である。
【0036】
動き情報算出回路2は、上述したフレーム間予測符号化データ再編集処理の一部である動き情報算出処理を行う回路である。さらに詳述すると、動き情報算出回路2は、処理対象フレームに対応した動き情報、第1参照フレームに対応した動き情報、第2参照フレームに対応した動き情報、その他のフレームに対応した動き情報を可変長復号化器2Aから受け取る。動き情報算出回路2は、処理対象フレームに対応した動き情報を受け取った場合、処理対象フレームに対応した動き情報と第1参照フレームに対応した動き情報とから新たな動き情報を算出し、元の動き情報の代わりに出力する。この新たな動き情報は、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行ったときに得られるであろう動き情報に相当する。第1参照フレームに対応した動き情報は廃棄される。他のフレームに対応した動き情報は動き情報算出回路2をそのまま通過する。可変長符号化器2Bは、このようにして動き情報算出回路2から出力される動き情報を可変長符号化する回路である。
【0037】
可変長復号器3は、逆多重化装置1から出力される可変長符号からDCT係数の量子化データを復号する装置である。また、逆量子化器4は、この量子化データを逆量子化し、DCT係数を出力する装置である。
【0038】
DCT係数算出回路5は、上述したフレーム間予測符号化データ再編集処理の一部であるDCT係数算出処理を行う回路である。さらに詳述すると、DCT係数算出回路5は、逆量子化器4から、処理対象フレームに対応したDCT係数、第1参照フレームに対応したDCT係数、第2参照フレームに対応したDCT係数、その他のフレームに対応したDCT係数を受け取る。DCT係数算出回路5は、処理対象フレームに対応したDCT係数を受け取った場合、処理対象フレームに対応した動き情報およびDCT係数と第1参照フレームに対応したDCT係数とから新たなDCT係数を算出し、元のDCT係数の代わりに出力する。この新たなDCT係数は、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろうDCT係数に相当する。第1参照フレームに対応したDCT係数はDCT係数算出回路5によって廃棄される。他のフレームに対応したDCT係数はDCT係数算出回路5をそのまま通過する。
【0039】
量子化器6は、DCT係数算出回路5から出力されたDCT係数を量子化し、量子化データを出力する装置である。また、可変長符号化器7は、この量子化データを可変長符号化して出力する装置である。多重化器8は、可変長符号化器22から得られる各フレームの動き情報の可変長符号と、可変長符号化器7から得られる各フレームのDCT係数に対応した可変長符号とを多重化して出力する装置である。
【0040】
次に、動き情報算出回路2の処理内容について詳しく説明する。例えば図1において、P3フレームの間引きを行う場合を考える。この場合、P3フレームが第1参照フレーム、P4フレームが処理対象フレーム、P2フレームが第2参照フレームである。ここで、処理対象フレーム(P4フレーム)に対応した符号化データは、同フレーム中の各マクロブロック毎に動き情報を含んでいるが、これらの動き情報は、第1参照フレーム(P3フレーム)の状態からの動きを表した内容になっている。従って、第1参照フレーム(P3フレーム)を間引く場合には、処理対象フレーム(P4フレーム)における各マクロブロックが第2参照フレーム(P2フレーム)の画面内において占めていた各エリアを求め、各エリアから処理対象フレームの各マクロブロックの位置までの移動に対応した新たな動き情報(以下、便宜上、P2−P4間の動き情報という)を求める必要がある。そこで、本実施形態における動き情報算出回路2では、次の方法により、このP2−P4間の動き情報の算出を行う。
【0041】
図3において、処理対象MBとあるのは、処理対象フレーム(P4フレーム)を構成する各マクロブロックの中の1つである。ここで、処理対象MBの画像に類似したマクロブロック(以下、第1参照MBという)が第1参照フレーム(P3フレーム)に含まれている場合、この第1参照MBから処理対象MBまでの移動に対応した動き情報V0が、処理対象フレーム(P4フレーム)の符号化データの中に含まれている。従って、処理対象MBの処理対象フレーム内での位置とこの動き情報V0とにより第1参照MBの第1参照フレーム内での位置を求めることができる。
【0042】
しかし、この第1参照MBに類似した画像(以下、第2参照MBという)が第2参照フレーム(P2フレーム)に含まれていたとしてもその画像の所在位置を第1参照フレーム(P3フレーム)の動き情報から直接求めることはできない。その理由は次の通りである。
【0043】
一般的に、第1参照MBは、第1参照フレーム(P3フレーム)を分割した各マクロブロックのいずれとも一致せず、通常は、図示のように、4個のマクロブロックに跨った状態となる。ここで、動き情報はフレームを構成する各マクロブロック毎に定められている情報であり、第1参照MBが跨っている4個のマクロブロックについては動き情報V1〜V4が定まっている。しかし、これらのマクロブロックはいずれも第1参照MBとは一致しない。このように、第1参照フレーム(P3フレーム)の符号化データには、第1参照MBに対応した動き情報が存在しないので、第2参照フレーム(P2フレーム)における第2参照MBの所在位置を第1参照フレーム(P3フレーム)の動き情報から直接求めることはできないのである。
【0044】
そこで、この動き情報算出回路2では、次のようにして、第2参照MBから処理対象MBまでの移動に対応した動き情報を算出する。
ステップS1:まず、動き情報算出回路2は、第1参照MBが跨っている4個のマクロブロックの中から、第1参照MBと重複している部分の面積が最も大きいマクロブロックに対応した動き情報を選択する。図3に示す例では、4個のマクロブロックのうちマクロブロックb4が、第1参照MBとの間の重複部分の面積が最も大きいので、このマクロブロックb4に対応した動き情報V4が選択されることとなる。
ステップS2:次に、動き情報算出回路2は、処理対象MBに対応した動き情報V0と、上記ステップS2において求めた動き情報V4を用いて、以下の演算を行い、第2参照MBから処理対象MBまでの移動に対応した動き情報の算出値Vnewを求める。
【数1】

Figure 0004153150
【0045】
動き情報算出回路2は、以上説明した処理を、処理対象フレーム(P4フレーム)における各マクロブロックを処理対象MBとして実行し、各マクロブロックについて、第2参照フレーム(P2フレーム)内の第2参照MB(各マクロブロックに対応したもの)から当該処理対象マクロブロックまでの移動に対応した動き情報の算出値Vnewを求めるのである。
また、図1に例示するように間引かれるフレームが複数ある場合、動き情報算出回路2は、間引かれるフレームが参照しているフレームと間引かれるフレームを参照しているフレームとの間の動き情報の算出値を上記と同様な手順により求める。
【0046】
次に、DCT係数算出回路5の処理内容について詳述する。図4には、処理対象フレーム(P4フレーム)に含まれる各処理対象MBのうちの1個が示されている。各処理対象MBは、図示のように4個のブロックにより構成されている。本実施形態が前提とするフレーム間予測符号化方法では、このブロック単位で、フレーム間の差分画像のDCTが行われる。以下では、図示の処理対象MB内の1つのブロック(以下、処理対象ブロックという)に対応した差分画像のDCT係数の修正手順を取り上げる。
【0047】
まず、図4には第1参照フレーム(P3フレーム)における1つのMBが示されており、このMBは、フレームP4の処理対象ブロックの画像に類似した第1参照ブロックb’を含んでいる。以下、便宜上、このブロックb’を第1参照ブロックと呼ぶ。
【0048】
この第1参照ブロックb’に対応した第2参照フレーム(P2フレーム)および第1参照フレーム(P3フレーム)間の差分画像のDCT係数が第1参照フレーム(P3フレーム)の符号化データから得られれば、このDCT係数を処理対象フレーム(P4フレーム)の処理対象ブロックに対応したDCT係数に加算することにより、処理対象ブロックに対応したDCT係数を第2参照フレームを参照した内容に修正することができる。しかしながら、逆量子化器4からDCT係数算出回路5に供給されるDCT係数は、各フレームを分割した各ブロックに対応したDCT係数であり、この中には第1参照ブロックb’に対応したDCT係数はない。そこで、本実施形態におけるDCT係数算出回路5では、次のようにして第1参照ブロックb’に対応したDCT係数を算出する。
【0049】
まず、図4において、第1参照ブロックb’は、4個のブロックb1〜b4に跨っている。DCT係数算出回路5は、この第1参照ブロックb’のうちブロックb1内に侵入している部分の水平方向の長さw1と高さ方向の長さh1、ブロックb2内に侵入している部分の水平方向の長さw2と高さ方向の長さh2、ブロックb3内に侵入している部分の水平方向の長さw3と高さ方向の長さh3、ブロックb4内に侵入している部分の水平方向の長さw4と高さ方向の長さh4を各々求める。
【0050】
次に、各ブロックbi(i=1〜4)に対応したDCT係数の行列をBi(i=1〜4)とした場合、DCT係数算出回路5は、第1参照ブロックb’に対応したDCT係数の算出値の行列B’を次式により求める。
【数2】
Figure 0004153150
【0051】
ここで、HHiはhhiのDCT係数、HwiはhwiのDCT係数であり、各hhiおよびhwiは、次のように与えられる。
【数3】
Figure 0004153150
【数4】
Figure 0004153150
【数5】
Figure 0004153150
【数6】
Figure 0004153150
【0052】
上記の各式においてIhiやIwiを用いた行列の表記の意味するところは次の通りである。すなわち、例えばhi=4であるとすると、上記各式は、次のように表される。
【数7】
Figure 0004153150
【数8】
Figure 0004153150
【0053】
DCT係数算出回路5は、以上のようにして、第2参照フレーム(P2フレーム)および第1参照フレーム(P3フレーム)間の差分画像であって第1参照ブロックb’に対応したもののDCT係数を算出すると、このDCT係数を処理対象ブロックのDCT係数に加算し、第2参照フレーム(P2フレーム)および処理対象フレーム(P4フレーム)間の動き補償後の差分画像であって処理対象ブロックに対応したもののDCT係数を得るのである。
【0054】
そして、DCT係数算出回路5は、処理対象フレーム(P4フレーム)内の他のブロックについても、以上と同様な処理を行い、処理対象フレーム内の全ブロックのDCT係数を修正する。
以上、P3フレームを間引く場合を例に説明したが、他のフレームを間引く場合も同様である。
以上が本実施形態に係るトランスコーディング装置の詳細である。
【0055】
図5は、本実施形態に係るトランスコーディング装置を構成するに当たり、従来技術に係るトランスコーディング装置に含まれていたもののうち削除したものを示している。本実施形態によれば、符号化データから画像を復号することなく、符号化データのまま加工することにより、特定フレームの間引きを行った符号化データを生成するので、画像の復号のための逆DCT、復号された画像を再符号化するためのDCT、逆量子化、逆DCT、動き予測および補償が不要となる。このため、これらの不要な変換によって生じる誤差をなくし、トランスコーディングに伴う画質の劣化を低減することができ、かつ、トランスコーディングのための演算量や演算時間を大幅に削減することができる。また、符号化データから画像を復号しないので、復号した画像を格納するためのメモリが不要であり、トランスコーディング装置のハードウェアを小規模にすることができる。
【0056】
A−3.動き情報算出アルゴリズムの他の例
以上説明した第1の実施形態では、動く情報算出回路2(図2)によって実行される動き情報算出アルゴリズムの一例が示された。しかしながら、動き情報算出回路2によって実行され得る動き情報算出アルゴリスムには他に例がある。
【0057】
A−3−1.例1
本例は、MPEG−4あるいはH.263のようなブロック毎に動き補償を行うことができる符号化データに好適なトランスコーディング方法およびトランスコーディング装置を提供するものである。本例では、上記第1の実施形態における動き情報算出回路2(図2参照)の動き情報算出アルゴリズムが図6に示すものに変更されている。以下、P4フレームを処理対象フレーム、P3フレームを第1参照フレーム、P2フレームを第2参照フレームとし、P3フレーム(第1参照フレーム)を間引く場合を想定し、本例による動き情報算出アルゴリズムについて説明する。
【0058】
このアルゴリズムでは、以下の手順により動き情報の算出を行う。
ステップ1:まず、処理対象フレームにおける処理対象マクロブロックに対応した動き情報V0を求め、この動き情報V0から、第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックを求める。
【0059】
ステップ2:次に、第1参照フレームにおいて第1参照マクロブロックを分割した各第1参照ブロック毎に、第1参照フレームにおける各マクロブロックのうち当該第1参照ブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報を求める。図14の例では、左上の第1参照ブロックについては、左上のマクロブロックb1と重複している面積が最も広いので、この左上のマクロブロックb1に対応した動き情報V1が第1参照フレームの符号化データの中から選択されることとなる。また、右上の第1参照ブロックについては、右上のマクロブロックb2と重複している面積が最も広いので、この右上のマクロブロックb2に対応した動き情報V2が第1参照フレームの符号化データの中から選択されることとなる。また、左下の第1参照ブロックについては、左下のマクロブロックb3と重複している面積が最も広いので、この左下のマクロブロックb3に対応した動き情報V3が第1参照フレームの符号化データの中から選択されることとなる。最後に、右下の第1参照ブロックについては、右下のマクロブロックb4と重複している面積が最も広いので、この右下のマクロブロックb4に対応した動き情報V4が第1参照フレームの符号化データの中から選択されることとなる。
【0060】
ステップ3:上記ステップ1の動き情報V0とステップS2において各第1参照ブロック毎に選択した動き情報V1〜V4から、次の演算により、第2参照フレームから処理対象フレームにおける処理対象マクロブロックを分割した4個のブロックまでの動き情報V1new〜V4newを求める。
【数9】
Figure 0004153150
【0061】
この動き情報算出アルゴリズムによれば、処理対象マクロブロックを分割した各ブロックについて、参照画像との間の動き情報が得られるので、各ブロック毎に動き補償が可能な符号化方法に対して最適なトランスコーディングを行うことができる。
【0062】
A−3−2.例2
次に、図7(a)に示す動き情報算出アルゴリズムでは、以下の手順により動き情報の算出を行う。
ステップ1:まず、処理対象フレームの符号化データから処理対象マクロブロックに対応した動き情報V0を求め、この動き情報V0から、第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックを求める。
ステップ2:次に、第1参照フレームにおいて各マクロブロックのうち第1参照マクロブロックと重複しているマクロブロックb1〜b4を求め、これらのマクロブロックb1〜b4のうち第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報を求める。図7(a)の例では、図示された4個のマクロブロックb1〜b4のうち右下に図示されたマクロブロックb4と第1参照マクロブロックとの重複部分の面積が最も広いので、このマクロブロックb4に対応した動き情報V4が第1参照フレームの符号化データの中から選択されることとなる。
【0063】
ステップ3:次に、第1参照フレームにおいて、第1参照マクロブロックの中心からこの第1参照マクロブロックとの重複部分の面積が最も広いマクロブロックb4の中心までの動き情報ΔV4を求める(図7(b)参照)。
ステップS4:上記ステップ1の動き情報V0と、ステップ2において求めた動き情報V4と、ステップ3において求めた動き情報ΔV4とから、次の演算により、第2参照レームから処理対象フレームにおける処理対象マクロブロックまでの動き情報Vnewを求める。
【数10】
Figure 0004153150
【0064】
A−4.DCT係数算出アルゴリズムの他の例
次に図7を参照し、本実施形態におけるDCT係数算出回路のDCT係数算出アルゴリズムについて説明する。本実施形態では、次の手順によりP3フレーム(第1参照フレーム)間引き後の処理対象MBに対応したDCT係数を算出する。
ステップS1:まず、P4フレーム(処理対象フレーム)の符号化データの中から処理対象MBに対応したDCT係数(すなわち、処理対象MBと第1参照MBの差分のDCT係数)を求める。
ステップS2:次に、間引かれるP3フレームにおいて第1参照MBと重複しているマクロブロックb1〜b4のうち第1参照MBと重複している部分の面積が最も広いマクロブロックb4に対応したDCT係数(すなわち、マクロブロックb4と参照MBとの差分のDCT係数)を求める。
ステップS3:次に、ステップS1において求めた処理対象MBに対応したDCT係数と、ステップS2において求めたマクロブロックb4に対応したDCT係数とを加算し、この加算結果をP3フレーム間引き後における符号化MBに対応したDCT係数とする。
【0065】
本例の場合、単なるDCT係数の加算により処理対象MBに対応したDCT係数を得ることができ、上記第1の実施形態における数2のような演算を行う必要がないので、演算量を削減することができるという利点がある。
なお、本例におけるDCT係数算出回路は、本例における動き情報算出回路の他、他の構成の動き情報算出回路と組み合わせてもよい。
【0066】
A−5.変形例1
以上説明した実施形態では、ピクチャグループの中のフレームの概念を使用して説明したが、フレームに限らず、本発明はフィールドを取り扱うMPEG−2などの符号化方式にも適用可能である。例えばテレビジョン信号の場合、図8に例示するように、1つのフレームが2つのフィールドから構成されている。そして、隣り合ったフレームの奇数フィールド同士の間および偶数フィールド同士の間でフレーム間予測符号化が行われる。このようなフレーム間予測符号化により得られた符号化データのトランスコーディングを行う場合であっても、上記各実施形態において説明したものと基本的に同じ手順により動き情報およびDCT係数の算出を行うことができる。すなわち、フレーム内の各フィールドを処理対象フレームとし、上記各実施形態による動き情報の算出およびDCT係数の算出を行えばよいのである。
【0067】
A−6.変形例2
以上説明した実施形態では、ピクチャグループの中のPフレームを間引いた。これに対し、本実施形態では、例えばIBBPという構成のピクチャグループにおいてBフレームを間引き、その場合に残るBフレームの符号化データの動き情報およびDCT係数を変更し、データ量を削減する。
【0068】
以下、図9を参照し、本変形例に係るトランスコーディング方法について説明する。図9に示すピクチャグループにおいて、IフレームとPフレームとの間には2個のBフレームが介挿されている。これらのBフレームは、いずれもIフレームおよびPフレームを参照することにより各々の符号化データが生成される。ここでは、これらのBフレームのうちPフレームの直前のBフレームを間引くものとする。この間引きを行った場合、Iフレームの直後のBフレームが残るが、このBフレームは、次の3種類のマクロブロックを含んでいる。
【0069】
a.順方向予測モードによりフレーム間予測符号化がなされたマクロブロック。すなわち、前フレーム(この例ではIフレーム)のみを参照した動き情報を符号化データに含むマクロブロック。
b.双方向予測モードによりフレーム間予測符号化がなされたマクロブロック。すなわち、前フレーム(この例ではIフレーム)を参照した動き情報と後フレーム(この例ではPフレーム)を参照した動き情報とを符号化データに含むマクロブロック。
c.逆方向予測モードによりフレーム間予測符号化がなされたマクロブロック。すなわち、後フレーム(この例ではPフレーム)のみを参照した動き情報を符号化データに含むマクロブロック。
【0070】
本実施形態では、これらの3種類のマクロブロックa〜cの符号化データを次のように処理する。
【0071】
<マクロブロックaの符号化データの処理>
このマクロブロックの符号化データについては、動き情報(順方向)Vforword(B)およびDCT係数をそのまま残す。
【0072】
<マクロブロックbの符号化データの処理>
このマクロブロックの符号化データについては、前フレームを参照した動き情報(順方向)Vforword(B)のみを残し、後フレームを参照した動き情報(逆方向)Vbackword(B)を廃棄する。また、動き補償後の差分画像のDCT係数については、そのまま残す。
【0073】
<マクロブロックcの符号化データの処理>
このマクロブロックの符号化データについては、当該マクロブロックを処理対象マクロブロックとし、後フレーム(Pフレーム)を上記各実施形態における間引かれるフレームとし、前フレーム(Iフレーム)を上記各実施形態における間引かれるフレームが参照している参照フレームとし、当該マクロブロックに対応した動き情報を参照フレームを参照した内容に変更するとともに、当該マクロブロックに対応したDCT係数も参照フレームを参照した内容に変更する。図9には上記第1の実施形態に開示された動き情報の算出方法を本変形例に適用した例が示されている。すなわち、この図9に示す例では、以下に示す手順により当該マクロブロックについて参照フレームを参照した動き情報を得ている。
【0074】
a.符号化データから当該処理対象マクロブロックに対応した動き情報Vbackword(B)を求める。
b.動き情報Vbackword(B)からPフレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックを求める。
c.Pフレームにおける各マクロブロックのうち第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報Vforword(p)を求める。
d.上記aおよびcの各動き情報から、下記式に従い、Pフレームの符号化データを生成するために参照されたIフレームと当該処理対象マクロブロックとの間の動き補償のための動き情報Vnewを算出する。
【数11】
Figure 0004153150
以上が本変形例における動き情報の算出処理の詳細である。
【0075】
Bフレームに対応したDCT係数の変更も、以上の動き情報の場合と同様、上記第1の実施形態のものをそのまま利用することができる。
以上の処理を経ることにより、間引き後に残ったBフレームは、前フレーム(この例ではIフレーム)のみを参照したPフレームとなる。
【0076】
なお、以上の例では、第1の実施形態における動き情報およぶDCT係数の算出方法を利用する場合を例に挙げたが、他の実施形態における動き情報およぶDCT係数の算出方法を本実施形態に適用し得ることは言うまでもない。
また、以上の例では、IBBPという構成においてBフレームを間引く場合について説明したが、本実施形態は例えばIBBPBBPという構成において2個のPフレームの間の2個のBフレームの一方を間引く場合にも適用可能である。
【0077】
B.第2の実施形態
B−1.トランスコーディングの例
図10(a)〜(c)は本実施形態において行われるトランスコーディングの例を示す図である。まず、図10(a)に示す例では、Iフレームと2個のBフレームとPフレームとからなるピクチャグループに対応した符号化データを、Iフレームと3個のPフレームとからなるピクチャグループに対応した符号化データに変換するトランスコーディングを行っている。
【0078】
この例において、トランスコーディング前のBフレームに対応した符号化データは、その前のIフレームの画像データとその後のPフレームの画像データとを参照することにより生成されており、Iフレームとの間で動き補償(順方向予測)と行うための動き情報とPフレームとの間で動き補償(逆方向予測)を行うための動き情報を含んでいる。
【0079】
次に図10(b)に示す例では、上記図10(a)に示す例において、2個のBフレームのうち後の方のBフレームに対応した符号化データを間引き、Iフレームの直後のBフレームに対応した符号化データをIフレームのみを参照したPフレームの符号化データに変換し、このPフレームを参照した内容となるようにピクチャグループ内の最後のPフレームに対応した符号化データの変換を行う。
【0080】
次に図10(c)に示す例では、Iフレームと3個のPフレームからなるピクチャグループに対応した符号化データが与えられた場合において、3個のPフレームのうち1個を間引き、Iフレームと2個のPフレームからなるピクチャグループに対応した符号化データに変換する。
【0081】
以上例示したように本発明の適用対象となるトランスコーディングでは、ある処理対象フレームの符号化データが他のフレーム(第1の参照フレーム)を参照して生成されたものである場合において、当該処理対象フレームの符号化データが第2の参照フレームを参照した内容に変更される。その際に、第2の参照フレームから当該処理対象フレームまでの動きに対応した動き情報が必要となる。従来のトランスコーディング装置では、この動き情報を求めるために、当該処理対象フレームの各マクロブロックに対応した画像と類似した画像を第2の参照フレームの画像の中から探索するという方法を採っていたので、演算量が膨大なものとなっていた。本発明は、このような動き情報の探索に代わる新たな技術的手段を提供し、トランスコーディングの際の演算量を削減するものである。
【0082】
B−2.トランスコーディング装置
図11は、この発明の一実施形態であるトランスコーディング装置の構成を示すブロック図である。図11に示すように、このトランスコーディング装置は、復号器10と、符号化器20と、動き情報算出部40と、動き情報修正部50とを有している。
【0083】
これらのうち復号器10は、ある符号化アルゴリズムにより符号化された符号化データを受け取り、この符号化データから元の画像データを復元する手段であり、逆多重化器11と、可変長復号器12および13と、逆量子化器14と、加算器16と、フレームメモリ17と、動き補償部18とを有している。
【0084】
ここで、逆多重化装置11は、Iフレーム以外の各フレームに対応した符号化データを、フレーム間予測符号化によって得られた差分画像のDCT係数を表す可変長符号と、動き情報の可変長符号とに分離する装置である。可変長復号器12および13は、逆多重化装置1によって分離されたDCT係数の可変長符号および動き情報の可変長符号を各々DCT係数の量子化データおよび動き情報に戻す装置である。逆量子化器14は、可変長復号器12から得られるDCT係数の量子化データを逆量子化し、DCT係数を出力する装置である。逆DCT部15は、逆量子化器14から得られるDCT係数に逆DCTを施し、動き補償を伴うフレーム間予測符号化において得られた予測誤差を求める装置である。この予測誤差は、処理対象である符号化データを生成する際に、動き補償を行いながら、当該符号化データに対応した画像と当該符号化データを生成するために参照されたフレーム(第1の参照フレーム)の画像との減算を行うことにより得られた差分画像に相当するものである。フレームメモリ17は、復号された画像データを格納するメモリである。動き補償部18は、ある処理対象フレームに対応した予測誤差(差分画像)が逆DCT部15から加算器16に出力されるときに、この処理対象フレームの符号化データの生成時に参照された第1の参照フレームの画像データをフレームメモリ17から読み出し、これに対し、可変長復号器13からの動き情報を用いた動き補償を施して加算器16に出力する装置である。加算機16は、この動き補償された参照フレームの画像データと、逆DCT部15からの予測誤差とを加算し、加算結果を処理対象フレームに対応した画像データとして出力する。以上説明した復号器1の構成および動作は、既に図17(b)および図19を参照して説明した通りである。
【0085】
次に、符号化器20は、減算器21と、DCT部22と、量子化器23と、逆量子化器24と、逆DCT部25と、加算器26と、フレームメモリ27と、動き補償部28と、可変長符号化器29および30と、多重化器31とを有している。
【0086】
ここで、減算器21は、復号器1側から供給される処理対象フレームに対応した画像データと、動き補償部28から供給される動き補償のなされた参照画像データとの差分である予測誤差を算出する装置である。なお、参照画像データについては後述する。DCT部22は、減算器21から得られる予測誤差に対してDCTを施す装置であり、量子化器23はこのDCT部22から得られるDCT係数に量子化を施し、量子化データを出力する装置である。逆量子化器24は、量子化器23から出力された量子化データに逆量子化を施してDCT係数を出力する装置であり、逆DCT部25は、逆量子化器24から出力されるDCT係数に逆DCTを施して予測誤差を復元する装置である。フレームメモリ27は、参照フレームの画像データを記憶するためのメモリである。動き補償部28は、ある処理対象フレームに対応した画像データが復号器1側から減算器21に供給されるとき、フレームメモリ27に記憶された当該処理対象フレームの符号化において参照された参照フレームに対応した画像データを読み出し、この画像データに対し、後述する動き情報修正部4から供給される動き情報を用いた動き補償を行う。そして、この動き補償により得られる参照画像データを減算器21および加算器26に供給する。加算器26は、この動き補償済みの参照画像データと逆DCT部25から得られる予測誤差とを加算し、処理対象フレームに対応した画像データを出力する。この画像データは、後続のフレームの符号化の際に参照される参照フレームの画像データとしてフレームメモリ24に書き込まれる。
【0087】
以上説明した符号化器20と、既に説明した従来のトランスコーディング装置における符号化器との間には大きな相違点がある。すなわち、従来のトランスコーディング装置の符号化器は動き予測および補償部106を有しており(図24(a)参照)、この動き予測および補償部106が、参照フレームから処理対象フレームまでの動きに対応した動き情報の探索を行っていたのに対し、本実施形態における符号化器20は、このような動き情報の探索のための手段を有していない。本実施形態における符号化器20は、動き情報修正部50から送られてくる動き情報を用いて参照フレームの画像データの動き補償を行うのである。本実施形態の特徴は、この動き情報を、従来に比して著しく少ない演算量により得ている点にある。本実施形態では、この動き情報を図11における動き情報算出部40および動き情報修正部50により得ている。
【0088】
次に動き情報算出部40について説明する。この動き情報算出部40は、復号器1の可変長復号器13から得られる動き情報を用いて所定の演算を行うことにより、トランスコーディング後の符号化データに含めるべき動き情報を算出する装置である。さらに詳述すると、次の通りである。例えば図10(a)に例示するトランスコーディングを行う場合、Iフレームの直後のBフレームを処理対象フレームとすると、この処理対象フレームに対応した符号化データは、IフレームおよびPフレーム(第1の参照フレーム)の画像データを参照することにより生成されており、Iフレームから当該処理対象フレームまでの動きに対応した動き情報とPフレームから当該処理対象フレームまでの動きに対応した動き情報とを含んでいる。そして、トランスコーディングでは、この処理対象フレームの符号化データをIフレーム(第2の参照フレーム)のみを参照した符号化データに変換する。このIフレーム(第2の参照フレーム)のみを参照した符号化データを得るため、動き情報算出部3は、少なくとも当該処理対象フレームの符号化データに含まれていた動き情報を用いて、Iフレーム(第2の参照フレーム)から当該処理対象フレームまでの動きに対応した動き情報を算出するのである。なお、この動き情報の算出アルゴリズムは幾つか適当なものがあるので、後にまとめて詳述する。
【0089】
次に動き情報修正部50について説明する。動き情報算出部40から得られる動き情報は、動き情報の探索により得られたものではなく、既存の動き情報に演算を施すことにより得られるものである。このため、あまり正確でない動き情報が得られる場合がある。そこで、本実施形態では、動き情報算出部3から得られた動き情報が正確なものであるといえるか否かを判定し、正確なものであると認められる場合には、その動き情報をそのまま符号化器20に送る。これに対し、動き情報算出部40から得られた動き情報が正確なものでないと認められる場合には、フレームメモリ17内に記憶された第2の参照フレームの画像データの中から処理対象フレームの画像に近似した画像を探索し、第2の参照フレームから処理対象フレームまでの動きに対応した動き情報を求める。動き情報修正部50は、このような機能を営む手段である。なお、動き情報算出部3から得られた動き情報が正確なものであるといえるか否かを判定するための処理の具体的内容および探索により動き情報を求める処理の詳細については、説明の重複を避けるため、本実施形態の動作の項において説明する。
【0090】
以下、図10(a)に示すトランスコーディングを行う場合を例に挙げ、本実施形態の動作について説明する。なお、本実施形態に係るトランスコーディング装置は、動き情報算出部40および動き情報修正部50を有し、これらにより得られる動き情報を符号化器20側において使用する点において、従来のトランスコーディング装置と相違している。従って、以下では、動き情報算出部40および動き情報修正部50の各々の動作を中心に説明する。
【0091】
(1)動き情報算出部40の動作
まず、図12〜図14を参照し、図10(a)に示すトランスコーディングを行う場合における動き情報算出部40の動作について説明する。
【0092】
図12〜図14において、トランスコーディング前のIフレームとPフレームの間には2個のBフレームが介挿されている。動き情報算出部3は、これらのBフレームを直前のフレームのみを参照したPフレームとするのに必要な動き情報算出処理および最後のPフレームを直前のPフレーム(元々はBフレームであったもの)のみを参照したPフレームとするのに必要な動き情報算出処理を実行する。
【0093】
<Iフレームの直後のBフレームに対応した処理>
本実施形態では、このBフレームに含まれる次の3種類のマクロブロックを取り扱う。
a.順方向予測モードによりフレーム間予測符号化がなされたマクロブロック。すなわち、前フレーム(この例ではIフレーム)のみを参照した動き情報を符号化データに含むマクロブロック。
b.双方向予測モードによりフレーム間予測符号化がなされたマクロブロック。すなわち、前フレーム(この例ではIフレーム)を参照した動き情報と後フレーム(この例ではPフレーム)を参照した動き情報とを符号化データに含むマクロブロック。
c.逆方向予測モードによりフレーム間予測符号化がなされたマクロブロック。すなわち、後フレーム(この例ではPフレーム)のみを参照した動き情報を符号化データに含むマクロブロック。
なお、Iフレームの直後のものに限らず、2番目のBフレームも同様である。
【0094】
動き情報算出部3は、Iフレームの直後のBフレームに関し、3種類のマクロブロックa〜cに対応したトランスコーディング後の動き情報を次のようにして算出する。
【0095】
まず、このマクロブロックaについては、当該マクロブロックの符号化データから分離された動き情報(順方向)Vforward(B)をそのままトランスコーディング後の動き情報とする。次に、マクロブロックbについては、当該マクロブロックの符号化データから分離された動き情報のうち、前フレームを参照した動き情報(順方向)Vforward(B)のみをトランスコーディング後の動き情報とし、後フレームを参照した動き情報(逆方向)Vbackward(B)を廃棄する。
【0096】
次に、マクロブロックcについてであるが、このマクロブロックcに対応した符号化データは、Pフレーム(第1参照フレーム)との間の動き補償のための動き情報Vbackward(B)しか含んでおらず、トランスコーディング後の参照先であるIフレーム(第2参照フレーム)との間の動き補償のための動き情報を含んでいない。一方、Pフレーム(第1参照フレーム)を構成する各マクロブロックの符号化データは、Iフレーム(第2参照フレーム)との間の動き補償のための動き情報Vforward(P)を含んでいる。そこで、動き情報算出回路3は、動き情報Vbackwaord(B)およびVforward(P)を用いた演算により、当該マクロブロックcとIフレーム(第2参照フレーム)との間の動き補償のための動き情報の予測値を求める。
【0097】
ここで、図15を参照し、この動き情報の予測値の算出方法の一例を説明する。
ステップ1:まず、処理対象であるマクロブロックcの符号化データから分離された動き情報Vbackward(B)を取得する。この動き情報Vbackward(B)は、Pフレーム(第1参照フレーム)に含まれる当該処理対象マクロブロックcに対応したマクロブロック(第1参照マクロブロック)から当該処理対象マクロブロックcまでの動きに対応している。
【0098】
ステップ2:上記動き情報Vbackward(B)からPフレーム(第1参照フレーム)における当該マクロブロックcに対応した第1参照マクロブロックを求める。
ステップ3:Pフレーム(第1参照フレーム)における各マクロブロックのうち上記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報Vforward(P)を求める。図15に示す例において第1参照マクロブロックは、マクロブロックb1〜b4に跨っており、これらのうちマクロブロックb4と重複している部分の面積が最も広い。従って、このマクロブロックb4に対応した動き情報V4が動き情報Vforward(P)として選択されることとなる。
【0099】
ステップ4:上記動き情報Vbackward(B)およびVforward(P)から、下記式に従い、当該マクロブロックcのトランスコーディング後の予測動き情報Vforward(B)を算出する。
【数12】
Figure 0004153150
以上がIフレームの直後のBフレームに対応したトランスコーディング後の動き情報の算出方法の詳細である。
【0100】
<2番目のBフレームに対応した処理>
次に図13を参照し、2番目のBフレームに対応した処理を説明する。この2番目のBフレームも、Iフレームの直後のBフレームと同様、上記3種類のマクロブロックa〜cを含んでいる。また、処理対象フレームである2番目のBフレームとそのトランスコーディング前の参照先である第1参照フレーム(IフレームのBフレーム)との時間差と、同処理対象フレームとそのトランスコーディング後の参照先である第2参照フレーム(Iフレームの直後のBフレーム)との間差を比較すると、後者は前者の1/2である。そこで、動き情報算出部3は、3種類のマクロブロックa〜cに対応したトランスコーディング後の動き情報を次のような線形補間により算出する。
【0101】
まず、このマクロブロックaについては、当該マクロブロックの符号化データから分離された動き情報(順方向)Vforward(B)を取得し、Vforward(B)/2をトランスコーディング後の動き情報とする。次に、マクロブロックbについては、当該マクロブロックの符号化データから分離された動き情報のうち、前フレームを参照した動き情報(順方向)Vforward(B)を取得し、Vforward(B)/2をトランスコーディング後の動き情報とする。次に、マクロブロックcについては、上述したIフレームの直後のBフレームの場合と同様な方法により、当該マクロブロックcとIフレーム(第2参照フレーム)における対応するマクロブロックとの間の動き補償のための予測動き情報Vforward(B)を求め、Vforward(B)/2をトランスコーディング後の動き情報とする。以上が2番目のBフレームに対応したトランスコーディング後の動き情報の算出方法の詳細である。画像の動きが比較的緩やかな場合には、このような線形補間によっても、動き情報探索によって得られるものに比較的近い動き情報の予測値が得られると考えられる。
【0102】
<最後のPフレームに対応した処理>
次に図14を参照し、最後のPフレームに対応した処理を説明する。このPフレームを構成する各マクロブロックは、全て先頭のIフレーム(第1参照フレーム)を参照することにより符号化データが生成されている。また、この処理対象フレームであるPフレームとそのトランスコーディング前の参照先である第1参照フレーム(Iフレーム)との時間差と、同処理対象フレームとそのトランスコーディング後の参照先である第2参照フレーム(2番目のBフレーム)との時間差を比較すると、後者は前者の1/3である。そこで、動き情報算出部3は、この処理対象フレームにおけるトランスコーディング後の動き情報を次のような線形補間により算出する。すなわち、各マクロブロックについて、当該マクロブロックの符号化データから分離された動き情報(順方向)Vforward(P)を取得し、Vforward(P)/3をトランスコーディング後の動き情報とするのである。以上が最後のPフレームに対応したトランスコーディング後の動き情報の算出方法の詳細である。
【0103】
(2)動き情報修正部50の動作
動き情報算出部40から得られる動き情報は、以上説明したように既存の動き情報をそのまま流用し、あるいは既存の動き情報に所定の演算を施すことにより得られるものであるため、あまり正確でない動き情報が得られる場合がある。動き情報修正部50は、この動き情報算出部40によって得られた動き情報が正確なものであるといえるか否かを判定し、正確なものでないと認められる場合には、これに代わる動き情報を生成して符号化器20に供給する。図16は、この動き情報修正部4の動作を示すフローチャートである。動き情報修正部50は、処理対象フレームを構成する各マクロブロック(以下、処理対象マクロブロックという)毎にこのフローチャートに示す処理を実行する。
【0104】
まず、動き情報修正部50は、動き情報算出部3によって算出された動き情報(以下、動き情報MEnewという)を用いて、処理対象マクロブロックに対応した第2参照マクロブロックのフレーム内の位置を求め、この第2参照マクロブロックに対応した画像データをフレームメモリ17から読み出す。次に、動き情報修正部4は、加算器16から得られた処理対象マクロブロックの画像データから第2参照マクロブロックに対応した画像データを差し引き、予測誤差(以下、第2の予測誤差という)を算出する(以上、ステップS1)。
【0105】
次に、動き情報修正部50は、逆DCT部15から出力される当該処理対象マクロブロックに対応した予測誤差(当該処理対象マクロブロックと第1参照マクロブロックとの差分画像。以下、第1の予測誤差という。)を取得し、次式に示す条件が成立するか否かを判断する(ステップS2)。
【数13】
Figure 0004153150
ただし、αは所定の定数である。
【0106】
上記式(13)に示す条件が満たされる場合、動き情報修正部50は、動き情報MEnewが正確な動き情報であるとみなし、その動き情報MEnewを第2参照マクロブロックから当該処理対象ブロックまでの動きに対応した動き情報として符号化器2に送る(ステップS5)。
【0107】
一方、上記式(13)に示す条件が満たされない場合、動き情報修正部50は、動き情報MEnewが不正確な動き情報であるとみなし、動き情報MEnewに基づき動き情報の探索範囲を決定し(ステップS3)、この探索範囲内において動き情報MEnewに代わる正確な動き情報を探索する(ステップS4)。
以下、これらの処理について、図17〜図19を参照して説明する。
【0108】
まず、図17は、図10(a)に示すトランスコーディングを行う場合において、Iフレームの直後のBフレームに含まれるマクロブロックが処理対象マクロブロックである場合の動き情報の探索範囲の決定方法を説明するものである。
【0109】
ここで、Iフレームの直後のBフレームの場合、トランスコーディング後の参照先である第2参照フレームは、Iフレームとなる。そこで、動き情報修正部4は、動き情報算出回路3によって算出された動き情報(図17ではVforward(B))を用いて当該処理対象マクロブロックに対応した第2参照マクロブロックの位置を求める。図17ではこの第2参照マクロブロックがIフレームを表す矩形の中に破線で示されている。動き情報修正回路50は、第2参照フレームであるIフレームを構成する各マクロブロックのうち第2参照ブロックと重複している部分を有する4個のマクロブロックを求める。この4個のマクロブロックが、処理対象マクロブロックに対応した動き情報の探索範囲である。
【0110】
このようにして動き情報の探索範囲が定まると、動き情報修正部50は、第2参照フレーム(Iフレーム)に対応した画像のうちこの探索範囲内のものの中から、処理対象マクロブロックの画像との間の予測誤差が最も小さいものを探索する。そして、この探索により得られた参照画像から処理対象マクロブロックまでの動きに対応した動き情報を求める。
【0111】
次に、図18は、図10(a)に示すトランスコーディングを行う場合において、2番目のBフレームに含まれるマクロブロックが処理対象マクロブロックである場合の動き情報の探索範囲の決定方法を説明するものである。また、図19は、最後のPフレームに含まれるマクロブロックが処理対象マクロブロックである場合の動き情報の探索範囲の決定方法を説明するものである。これらの場合における動き情報修正部50の動作は、既に説明したIフレームの直後のBフレームの場合と同様である。すなわち、動き情報修正部50は、処理対象フレームの直前の第2参照フレームを構成する各マクロブロックのうち第2参照マクロブロックと重複する各マクロブロックを求め、これらのマクロブロックを探索範囲として動き情報の探索を行うのである。
【0112】
以上が図16におけるステップS3およびS4に対応した動き情報修正部50の処理内容である。動き情報修正部50は、このようにして得られた動き情報を第2参照マクロブロックから当該処理対象ブロックまでの動きに対応した動き情報として符号化器20に送る(ステップS5)。
【0113】
(3)符号化器20の動作
符号化器20には、復号器10から出力された処理対象フレームの各マクロブロック(処理対象マクロブロック)の画像データと、動き情報修正部50によって出力された各処理対象マクロブロックに対応した動き情報とが供給される。そして、符号化器20における動き補償部28は、動き情報修正部50から受け取った各処理対象マクロブロックに対応した動き情報を用いて、各処理対象マクロブロックに対応した第2参照マクロブロックの位置を各々求める。そして、この各処理対象マクロブロックに対応した第2参照ブロックの画像データをフレームフレームメモリ27から読み出して減算器21に送る。
【0114】
減算器21は、これらの各第2参照マクロブロックの画像データを各々に対応した処理対象マクロブロックの画像データから減算し、各々予測誤差として出力する。この予測誤差は、DCT部22によってDCT係数に変換され、量子化器23によって量子化データとされる。この量子化データは、逆量子化器24および逆DCT部25を介することにより予測誤差に戻られる。加算器26は、動き補償部28から出力された第2参照マクロブロックの画像データとこの予測誤差とを加算し、処理対象マクロブロックに対応した画像データとしてフレームメモリ27に書き込む。
【0115】
一方、量子化器23から出力された量子化データは、可変長符号化器29によって可変長符号とされる。また、動き情報修正部4からの動き情報は可変長符号化器30によって可変長符号とされる。これらの可変長符号は、多重化器31によって多重化され、処理対象フレームに対応したトランスコーディング後の符号化データとして出力される。
【0116】
このように本実施形態によれば、符号化器20側での動き情報探索は行われず、トランスコーディングの際の動き情報の探索のための演算量が大幅に削減されるので、トランスコーディングの効率を著しく高めることができる。
【0117】
B−3.他のトランスコーディングにおける動作例
以上説明した実施形態では、図10(a)に示すトランスコーディングを行う場合を例に挙げたが、ここでは他のトランスコーディングを行う場合の動作例を説明する。
【0118】
まず、図20を参照し、図10(b)に示すトランスコーディングを行う場合における動き情報算出部40の動作を説明する。図20において、Iフレームの直後のBフレームのトランスコーディング後の動き情報の算出方法は上記実施形態において説明した通りである。次に、図20における2番目のBフレームは、トランスコーディングの際に間引かれる。
【0119】
そして、ピクチャグループの最後のPフレームのトランスコーディング後の動き情報は次のようにして求める。まず、図20に示すように、トランスコーディング前にIフレームを参照フレームとしていたPフレームは、トランスコーディング後、Iフレームの直後のPフレーム(元はBフレームであったもの)を参照したフレームとなる。ここで、IフレームとPフレームとの間の時間差と、トランスコーディング前のIフレームの直後のPフレームと最後のPフレームとの時間差とを比較すると、後者は前者の2/3となる。そこで、動き情報算出部3は、最後のPフレームの各マクロブロックに対応した動き情報V(P)を取得し、2V(P)/3をトランスコーディング後の動き情報とする。
【0120】
次に、図21を参照し、図10(c)に示すトランスコーディングを行う場合における動き情報算出部40の動作を説明する。図21において、Iフレームの直後のPフレームは、トランスコーディングの前後において参照先であるフレームに変化がない。従って、このPフレームは、動き情報算出部3の処理対象とならない。2番目のPフレームは、トランスコーディングの際に間引かれる。従って、この2番目のPフレームも動き情報算出部3の処理対象とならない。
【0121】
次に、ピクチャグループの最後のPフレームは、トランスコーディング前の参照先である第1参照フレームは2番目のPフレームであるが、トランスコーディング後の参照先である第2参照フレームはIフレームの直後の1番目のPフレームである。そこで、動き情報算出部3は、処理対象フレームたる最後のPフレームを構成する各処理対象マクロブロックについて、以下の手順により第2参照フレームと当該処理対象フレームとの間の動きに対応した動き情報の予測値Vforward(P)を算出する。
【0122】
ステップ1:まず、最後のPフレーム中の処理対象マクロブロックに対応した動き情報Vforward(P)を用いて、第1参照フレーム(2番目のPフレーム)における当該処理対象マクロブロックに対応した第1参照マクロブロックを求める。
ステップ2:次に第1参照フレームにおける各マクロブロックのうち上記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報Vforward(P)を求め、この動き情報Vforward(P)と上記ステップ1において求めた動き情報Vforward(P)を加算する。この結果、第2参照フレーム(1番目のPフレーム)と当該処理対象フレームとの間の動きに対応した動き情報の予測値Vforward(P)が得られる。
【0123】
以上が図10(b)および(c)に例示するようなフレームの間引きを伴うトランスコーディングを行う場合の動き情報算出回路3の動作である。動き情報修正部50および他の部分の動作は上記実施形態と何等変わるところはない。図22には、図10(c)に例示するトランスコーディングを行う場合において、動き情報算出部40によって算出された最後のPフレーム内の処理対象マクロブロックに対応した動き情報が不正確なものであり、動き情報修正部50が動き情報の探索を行う場合における探索範囲の決定方法を示されている。この図に示すように、動き情報修正部50は、動き情報算出部40によって算出された動き情報を用いて第2参照フレーム(1番目のPフレーム)内の第2参照マクロブロックを求め、この第2参照マクロブロックと重複している第2参照フレーム内の各マクロブロックを探索範囲として動き情報の探索を行うのである。
【0124】
B−4.フレームが2つのフィールドによって構成されている場合の実施形態
以上説明した実施形態では、ピクチャグループの中のフレームの概念を使用して説明したが、フレームに限らず、本実施形態は上記第1実施形態と同様、図8に示すように、フィールドを取り扱うMPEG−2などの符号化方式にも適用可能である。すなわち、フレーム内の各フィールドを処理対象フレームとし、上記実施形態による動き情報の算出および修正を行えばよいのである。
【0125】
C.第3の実施形態
図23はこの発明の第3の実施形態であるトランスコーディング装置の構成を示すブロック図である。図23に示すように、このトランスコーディング装置は、入力部61と、バッファ62と、切換制御部63と、切換部64と、第1トランスコーディング部70と、第2トランスコーディング部80とを有している。
【0126】
入力部61は、逆多重化器61Aと、可変長復号器61Bおよび61Cと、逆量子化器61Dとを有している。
【0127】
ここで、逆多重化器61Aは、Iフレームを除いた他のフレームの符号化データをフレーム間予測符号化により得られた差分画像のDCT係数の可変長符号と動き情報の可変長符号とに分離する装置である。可変長復号器61Bおよび61Cは、逆多重化器61Aによって分離されたDCT係数の可変長符号と動き情報の可変長符号をDCT係数の量子化データと動き情報に戻す装置である。バッファ62は、可変長復号器61Cからの動き情報と逆量子化器61DからのDCT係数とを受け取り、最近の所定個数のフレームに対応した動き情報およびDCT係数を記憶する。最近の所定個数のフレームとは、例えばピクチャグループである。1つのピクチャグループに対応したDCT係数および動き情報の格納が終了すると、その格納されたDCT係数および動き情報がバッファ62から読み出されるとともに、次のピクチャグループに対応したDCT係数および動き情報の格納が開始される。
【0128】
切換制御部63は、バッファ62内の動き情報を監視し、動画像の動きが速いか否かを動き情報に基づいて判定し、この判定結果に基づいて切換部64を制御する。 切換部64は、切換制御部63による制御の下、所定個数のフレームに対応したDCT係数および動き情報をバッファ62から第1トランスコーディング部70または第2トランスコーディング部80に転送する。
【0129】
第1トランスコーディング部70は、第1の実施形態に開示された方法に従ってトランスコーディングを行う装置である。このため、第1トランスコーディング部70は、第1の実施形態に係るトランスコーディング装置に含まれていた要素を含んでいる(図2参照)。第2トランスコーディング部80は、第2の実施形態に開示された方法に従ってトランスコーディングを行う装置である。このため、第2トランスコーディング部80は、第2の実施形態に係るトランスコーディング装置に含まれていた要素を含んでいる(図11参照)。
【0130】
次に、本実施形態の動作について説明する。動画像のフレームの符号化データは、トランスコーディング装置に供給され、バッファ62には、最近の所定個数のフレームに対応したDCT係数および動き情報が格納される。
【0131】
バッファ62に格納されている動き情報が所定の閾値より小さい場合(動画像の動きが遅い場合)、切換制御部63は、DCT係数および動き情報がバッファ62から第1トランスコーディング部70のDCT係数算出回路5および動き情報算出回路2に各々転送されるように切換部64を制御する。この結果、少ない演算量で、動画像のDCT係数および動き情報に対して第1の実施形態において開示されたトランスコーディングが施される。
【0132】
これに対し、バッファ62に格納されている動き情報が閾値より大きい場合(動画像の動きが速い場合)、動き情報算出回路2が正確な動き情報を算出することは困難であり、トランスコーディングにより得られる符号化データの符号量が増加する不具合が起こりうる。そこで、この場合、切換制御部63は、DCT係数および動き情報がバッファ62から第2トランスコーディング部80の逆DCT部15および動き情報算出部40に各々転送されるように切換部64を制御する。この結果、動画像のDCT係数および動き情報に対して第2の実施形態において開示されたトランスコーディングが施される。
【0133】
以上説明した第3の実施形態では、ピクチャグループのような所定個数のフレーム単位で切換部64の切換制御が行われた。しかしながら、切換制御の方法は、以上説明した態様に限定されるものではない。切換制御を行うフレームの個数は、一定でなくてもよい。
【0134】
D.変形例
以上説明した各実施形態では、一定個数のフレームからなるピクチャグループの概念が用いられていたが、本発明は、このようなピクチャグループへの適用に限定されるものではなく、MPEG−4のようなピクチャグループの概念を持たない符号化方式に適用してもよい。
【0135】
【発明の効果】
以上説明したように、この発明によれば、少ない演算量により、第1の動画像符号化データを第2の動画像符号化データに変換するトランスコーディングを実行することができる。
【図面の簡単な説明】
【図1】 この発明の第1の実施形態において行われるトランスコーディングの例を示す図である。
【図2】 同実施形態におけるトランスコーディング装置を示すブロック図である。
【図3】 同実施形態における動き情報算出回路の処理内容を示す図である。
【図4】 同実施形態におけるDCT係数算出回路の処理内容を示す図である。
【図5】 同実施形態の効果を従来のトランスコーディング装置との対比において説明する図である。
【図6】 動き情報算出アルゴリズムの他の例を示す図である。
【図7】 動き情報算出アルゴリズムの他の例を示す図である。
【図8】 同実施形態におけるフィールドの概念を示す図である。
【図9】 同実施形態における動き情報算出アルゴリズムの他の例を示す図である。
【図10】 この発明の第2の実施形態において行われるトランスコーディングの例を示す図である。
【図11】 この発明の第2の実施形態であるトランスコーディング装置を示すブロック図である。
【図12】 同実施形態における動き情報算出部の処理内容を示す図である。
【図13】 同実施形態における動き情報算出部の処理内容を示す図である。
【図14】 同実施形態における動き情報算出部の処理内容を示す図である。
【図15】 同実施形態における動き情報算出部の動き情報算出アルゴリズムを示す図である。
【図16】 同実施形態における動き情報修正部の動作を示すフローチャートである。
【図17】 同実施形態における動き情報修正部の動き情報探索処理を説明する図である。
【図18】 同実施形態における動き情報修正部の動き情報探索処理を説明する図である。
【図19】 同実施形態における動き情報修正部の動き情報探索処理を説明する図である。
【図20】 同実施形態においてフレームの間引きを伴うトランスコーディングを行う場合の動作例を示す図である。
【図21】 同実施形態においてフレームの間引きを伴うトランスコーディングを行う場合の動作例を示す図である。
【図22】 同実施形態においてフレームの間引きを伴うトランスコーディングを行う場合の動作例を示す図である。
【図23】 この発明の第3の実施形態であるトランスコーディング装置の構成を示すブロック図である。
【図24】 動画像符号化伝送システムにおける符号化器および復号器の一般的な構成を示すブロック図である。
【図25】 上記符号化器の動作を例示する図である。
【図26】 上記復号器の動作を例示する図である。
【図27】 従来のトランスコーディング方法およびトランスコーディング装置を示す図である。
【符号の説明】
2……動き情報算出回路、5……DCT係数算出回路、10……復号器、20……符号化器、40……動き情報算出部、50……動き情報修正部、63……切換制御部、64……切換部、70……第1トランスコーディング部、80……第2トランスコーディング部。[0001]
[Technical field to which the invention belongs]
The present invention relates to a technique for compressing and transmitting moving picture information, and more particularly, to a transcoding method and transcoding apparatus for converting moving picture encoded data to moving picture encoded data having a different configuration.
[0002]
[Prior art]
In recent years, multimedia that expresses different information such as characters, figures, sounds, and images as digital data and integrates and integrates these media has attracted attention in recent years. There are ISO / IEC MPEG (Moving Picture Experts Group) 1 and the like as audio / video encoding systems corresponding to this multimedia, and various video encoding and transmission systems compliant with these are provided.
[0003]
FIGS. 24A and 24B show a general configuration of this type of moving image encoding transmission system, and FIG. 24A is a block diagram showing the configuration of the encoder on the transmission side. FIG. 2B is a block diagram showing the configuration of the receiving side decoder.
[0004]
As shown in FIG. 24A, the encoder on the transmission side includes a subtractor 101, a DCT (Discrete Cosine Transform) unit 102, a quantizer 103, an inverse quantizer 104, An inverse DCT unit 105, a motion prediction and compensation unit 106, variable length encoders 107 and 108, and a multiplexing device 109 are included.
[0005]
Further, as shown in FIG. 24B, the receiving side decoder includes a demultiplexer 201A, variable length decoders 201 and 206, an inverse quantizer 202, an inverse DCT unit 203, an adder 204 and a motion compensation unit 205. The constituent elements of the encoder and decoder listed above may be configured by dedicated hardware or a DSP (digital signal processor) that executes a predetermined program.
[0006]
In the configuration shown in FIGS. 24A and 24B, image information of picture groups including a predetermined number of screens (hereinafter referred to as frames) is sequentially supplied to the encoder. The encoder encodes image information with this picture group as a unit. One picture group needs to include one I frame, and in addition to this, one or a plurality of P frames and B frames can be included. Here, the I frame is a frame to be subjected to so-called intra-frame encoding. The P frame is a frame that is encoded and decoded by referring to the image of the frame before the frame, and the B frame is encoded by referring to the frames before and after the frame. And a frame to be decoded.
[0007]
FIG. 25 exemplifies the operation of the encoder when the frames constituting such a picture group are sequentially given. In FIG. 25, for the sake of simplicity of explanation, the case where the I frame and the P frame are input to the encoder, such as the P1 frame and the P2 frame, is described as an example. . Hereinafter, the operation of the encoder will be described with reference to FIG.
[0008]
First, when image information corresponding to an I frame is input, processing by each component of the encoder in FIG. 24A is not performed, and image information of the current image (I frame) is determined by a predetermined encoding algorithm. Intraframe coding is performed, and the resulting coded data is transmitted to the receiving side. In the encoder, the I-frame image information is decoded from the encoded data according to a decoding algorithm corresponding to the encoding algorithm, and is stored as a reference image in a memory (not shown) in the motion prediction and compensation unit 106. The
[0009]
Next, when the P1 frame is input, the encoder divides the current image (P1 frame) into a plurality of macro blocks MBij (i = 1 to M, j = 1 to N). Here, each macro block is composed of 2 × 2 = 4 blocks, and each block is composed of 8 × 8 = 64 pixels. Then, the encoder performs the following processing for each macroblock MBij.
[0010]
First, the motion prediction and compensation unit 106 searches for a reference macroblock MBij ′ of the same size similar to the macroblock MBij of the current image from the reference image (I frame in this case). Then, it is considered that the reference macroblock MBij ′ has moved to become the macroblock MBij, and motion information V representing the spatial movement distance and direction is output. Here, the motion information V is converted into a variable length code by the variable length encoder 206.
[0011]
The subtractor 101 subtracts the image information of the reference macroblock MBij ′ from the image information of the macroblock MBij to obtain a difference between both images, and the DCT unit 102 performs DCT, which is a kind of orthogonal transform, on the difference. .
[0012]
The quantizer 103 quantizes the DCT coefficients of the difference image obtained from the DCT unit 102, and the variable length encoder 107 performs variable length encoding on the data obtained by this quantization.
[0013]
The variable length code obtained by quantizing the DCT coefficient and the above-described variable length code of the motion information V are multiplexed by the multiplexer 109 and transmitted to the receiving side as encoded data corresponding to the macroblock MBij.
[0014]
On the other hand, the output data of the quantizer 103 is inversely quantized by the inverse quantizer 104, and the output data of the inverse quantizer 104 is input to the inverse DCT unit 105. As a result, the difference image Δ is output from the inverse DCT unit 105. This difference image Δ is image information corresponding to the difference between the macroblock MBij of the current image (P1 frame) and the reference macroblock MBij ′, and is generated through the processes of DCT, quantization, inverse quantization, and inverse DCT. Therefore, an error accompanying this is included.
[0015]
The motion prediction and compensation unit 106 restores the image information of the macroblock MBij in the current image (frame P1) by a method such as adding the difference image Δ obtained from the inverse DCT unit 105 and the reference macroblock MBij ′. Then, it is stored in the memory as a reference image to be referred to when the subsequent frame is encoded.
The above processing is performed for all macro blocks MBij (i = 1 to M, j = 1 to N) constituting the current image (P1 frame).
[0016]
When the next frame P2 is input, an encoding process similar to that described above is performed with reference to the reference image (image of frame P1) stored in the memory in the motion prediction and compensation unit 106. The same applies to each subsequent frame of the frame P2.
[0017]
FIG. 26 illustrates the operation of the decoder when each encoded data of I frame, P1 frame, P2 frame,... Transmitted from the encoder as described above is received. Hereinafter, the operation of the decoder will be described with reference to FIG.
[0018]
First, when intra-frame encoded data of an I frame is received, the decoder in FIG. 24B does not perform the processing by each illustrated component, but decodes corresponding to the intra-frame encoding algorithm on the encoder side. The intra-frame encoded data is decoded according to the algorithm. As a result, the same I frame image information stored in the memory in the motion prediction and compensation unit 106 on the encoder side is decoded, and this is used as a reference image in the memory (not shown) in the motion compensation unit 205 in the decoder. Saved in.
[0019]
Next, the encoded data of the P1 frame is input to the decoder. This encoded data includes the following information corresponding to each of a plurality of macroblocks MBij (i = 1 to M, j = 1 to N) obtained by dividing the P1 frame image.
a. Variable length code obtained by performing DCT, quantization and variable length coding on the difference between the macroblock MBij and a reference macroblock MBij ′ similar to this in the reference image (frame I)
b. Variable length code of motion information V representing a motion vector from the reference macroblock MBij ′ to the macroblock MBij
[0020]
In the decoder, the variable length codes a and b are separated by the demultiplexer 201A and returned to actual numerical values by the variable length decoders 201 and 206. Then, according to these pieces of information, the following processing is performed for each macroblock MBij.
[0021]
First, the difference between the macroblock MBij and the reference macroblock MBij ′ in the reference image (frame I) from the actual numerical value obtained from the variable length code a by the inverse quantizer 202 and the inverse DCT unit 203. The image Δ is restored.
[0022]
Further, the motion compensation unit 205 obtains the location of the reference macroblock MBij ′ in the reference image (frame I) corresponding to the macroblock MBij according to the motion information V of b corresponding to the macroblock MBij. Image information of the macro block MBij ′ is read from a built-in memory (not shown). Then, the image information of the reference macroblock MBij ′ and the difference image Δ are added by the adder 204, and the image information of the macroblock MBij is restored.
[0023]
The above processing is performed for all the macroblocks MBij (i = 1 to M, j = 1 to N), and all images of the frame P1 are restored. The restored image of the frame P1 is stored in the memory in the motion compensation unit 205 as a reference image.
[0024]
When the encoded data corresponding to the next frame P2 is received, the same decoding process as described above is performed with reference to the reference image (image of the frame P1) stored in the memory in the motion compensation unit 205. Is called. The same applies to the case where encoded data corresponding to each frame following the frame P2 is received.
[0025]
Recently, coded transmission of moving images has been studied in various communication systems. For this reason, encoded data of moving images is generated assuming transmission at a certain transmission rate, but this encoded data must be transmitted at a transmission rate different from the original schedule. sell.
[0026]
In such a case, it is required to reduce the number of frames per picture group and reduce the data rate of encoded data. As a technique for this purpose, there is transcoding for converting the format of encoded data. FIG. 27 (a) shows a method for performing this transcoding, and FIG. 27 (b) is a block diagram showing the configuration of a conventional transcoding apparatus for performing this transcoding.
[0027]
As shown in FIG. 27 (b), the conventional transcoding apparatus includes a decoder 100 having a configuration similar to that shown in FIG. 24 (b) and a code having a configuration similar to that shown in FIG. 24 (a). And a combination with the generator 200.
[0028]
In this transcoding apparatus, as shown in FIG. 27 (a), the encoded data generated by the first encoding method is decoded by the decoder 100, and an image obtained by this decoding is converted into an encoder 200. Is encoded according to the second encoding method. By performing such re-encoding, encoded data having a data rate different from that of the original encoded data can be generated.
[0029]
[Problems to be solved by the invention]
By the way, the above-described conventional transcoding method decodes the original image from the encoded data and re-encodes this image to generate encoded data of another configuration. In addition, there is a problem that image quality deteriorates due to a conversion error accompanying decoding and re-encoding of encoded data.
[0030]
The present invention has been made in view of the circumstances described above, and provides a transcoding method and a transcoding device capable of converting encoded data into encoded data of another configuration with a small amount of calculation. It is aimed.
[0031]
[Means for Solving the Problems]
According to the present invention, first encoded data obtained from a plurality of frames constituting a moving image by an encoding algorithm including an inter-frame predictive encoding algorithm with motion compensation is converted into second encoded data having a different configuration. In the transcoding method for converting into a frame, in the interframe prediction encoding of the processing target frame, some frames of the plurality of frames constituting the moving image that are subject to the interframe prediction encoding are set as processing target frames. Second encoded data corresponding to encoded data that would be obtained when inter-frame predictive encoding of the processing target frame is performed with reference to a second reference frame different from the referenced first reference frame Inter-frame prediction encoded data generated from first encoded data of one or more frames including the processing target frame A motion for calculating motion information to be included in the second encoded data using at least motion information included in the processing target encoded data. A transcoding method comprising an information calculation process is provided. The present invention also provides a transcoding device that performs transcoding by such transcoding method.
[0032]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0033]
A. First embodiment
A-1. Transcoding
FIG. 1 is a diagram showing an example of transcoding performed in the first embodiment of the present invention. FIG. 1 shows a picture group including an I frame and P1 to P4 frames. In the present embodiment, encoded data with a small data rate is generated by thinning out, for example, P1 frame and P3 frame among these frames. Here, the P2 frame refers to the thinned P1 frame, and the P4 frame refers to the thinned P3 frame. Therefore, if the data corresponding to the P1 frame and the P3 frame is thinned out from the encoded data, the P2 frame and P4 frame images cannot be decoded from the remaining encoded data.
[0034]
In the present embodiment, a frame to be thinned out (in this example, P1 frame and P3 frame) among frames that have undergone interframe prediction encoding is used as a first reference frame, and interframe prediction is performed with reference to the first reference frame. Encoded frames (P2 frame and P4 frame in this example) are set as processing target frames, and frames referred to in interframe predictive encoding of the first reference frame are set as second reference frames (I frame and I frame in this example). P2 frame). In this embodiment, encoded data that will be obtained when inter-frame predictive encoding of the processing target frame is performed with reference to the second reference frame, encoded data corresponding to the processing target frame, Calculation is performed from the encoded data corresponding to the first reference frame. This is the inter-frame prediction encoded data re-editing process in the present embodiment.
[0035]
A-2. Transcoding equipment
FIG. 2 is a block diagram showing a configuration of a transcoding apparatus for performing the transcoding method according to the present embodiment. In FIG. 2, a demultiplexer 1 is an apparatus that separates encoded data corresponding to each frame other than an I frame into a variable length code of quantized DCT coefficients and a variable length code of motion information.
The variable length decoder 2A is a device that actually returns a variable length code of motion information to a numerical value.
[0036]
The motion information calculation circuit 2 is a circuit that performs a motion information calculation process that is a part of the inter-frame prediction encoded data re-editing process described above. More specifically, the motion information calculation circuit 2 obtains motion information corresponding to the processing target frame, motion information corresponding to the first reference frame, motion information corresponding to the second reference frame, and motion information corresponding to other frames. Received from the variable length decoder 2A. When the motion information calculation circuit 2 receives the motion information corresponding to the processing target frame, the motion information calculation circuit 2 calculates new motion information from the motion information corresponding to the processing target frame and the motion information corresponding to the first reference frame. Output instead of motion information. This new motion information corresponds to motion information that may be obtained when inter-frame predictive encoding of the processing target frame is performed with reference to the second reference frame. The motion information corresponding to the first reference frame is discarded. The motion information corresponding to other frames passes through the motion information calculation circuit 2 as it is. The variable length encoder 2B is a circuit that performs variable length encoding on the motion information output from the motion information calculation circuit 2 in this way.
[0037]
The variable length decoder 3 is a device that decodes quantized data of DCT coefficients from the variable length code output from the demultiplexer 1. The inverse quantizer 4 is a device that inversely quantizes the quantized data and outputs a DCT coefficient.
[0038]
The DCT coefficient calculation circuit 5 is a circuit that performs a DCT coefficient calculation process that is a part of the inter-frame prediction encoded data re-editing process described above. More specifically, the DCT coefficient calculation circuit 5 receives from the inverse quantizer 4 a DCT coefficient corresponding to the processing target frame, a DCT coefficient corresponding to the first reference frame, a DCT coefficient corresponding to the second reference frame, and the like. DCT coefficients corresponding to the frame are received. When receiving the DCT coefficient corresponding to the processing target frame, the DCT coefficient calculating circuit 5 calculates a new DCT coefficient from the motion information and DCT coefficient corresponding to the processing target frame and the DCT coefficient corresponding to the first reference frame. , Instead of the original DCT coefficients. This new DCT coefficient corresponds to a DCT coefficient that will be obtained when inter-frame predictive encoding of the processing target frame is performed with reference to the second reference frame. The DCT coefficient corresponding to the first reference frame is discarded by the DCT coefficient calculation circuit 5. DCT coefficients corresponding to other frames pass through the DCT coefficient calculation circuit 5 as they are.
[0039]
The quantizer 6 is a device that quantizes the DCT coefficient output from the DCT coefficient calculation circuit 5 and outputs quantized data. The variable length encoder 7 is a device that performs variable length encoding on the quantized data and outputs the result. The multiplexer 8 multiplexes the variable length code of the motion information of each frame obtained from the variable length encoder 22 and the variable length code corresponding to the DCT coefficient of each frame obtained from the variable length encoder 7. Output device.
[0040]
Next, the processing content of the motion information calculation circuit 2 will be described in detail. For example, consider the case where P3 frame is thinned out in FIG. In this case, the P3 frame is the first reference frame, the P4 frame is the processing target frame, and the P2 frame is the second reference frame. Here, the encoded data corresponding to the processing target frame (P4 frame) includes motion information for each macroblock in the same frame, but the motion information is included in the first reference frame (P3 frame). The content represents the movement from the state. Therefore, when thinning out the first reference frame (P3 frame), each area occupied by each macroblock in the processing target frame (P4 frame) in the screen of the second reference frame (P2 frame) is obtained. Therefore, it is necessary to obtain new motion information (hereinafter referred to as motion information between P2 and P4 for the sake of convenience) corresponding to the movement from the target frame to the position of each macroblock. Therefore, the motion information calculation circuit 2 in this embodiment calculates the motion information between P2 and P4 by the following method.
[0041]
In FIG. 3, the processing target MB is one of the macroblocks constituting the processing target frame (P4 frame). Here, when a macro block similar to the image of the processing target MB (hereinafter referred to as a first reference MB) is included in the first reference frame (P3 frame), the movement from the first reference MB to the processing target MB Is included in the encoded data of the processing target frame (P4 frame). Therefore, the position of the first reference MB in the first reference frame can be obtained from the position of the processing target MB in the processing target frame and the motion information V0.
[0042]
However, even if an image similar to the first reference MB (hereinafter referred to as the second reference MB) is included in the second reference frame (P2 frame), the location of the image is determined as the first reference frame (P3 frame). It cannot be obtained directly from the movement information. The reason is as follows.
[0043]
In general, the first reference MB does not match any of the macroblocks obtained by dividing the first reference frame (P3 frame), and normally, the first reference MB is in a state straddling four macroblocks as illustrated. . Here, the motion information is information defined for each macroblock constituting the frame, and motion information V1 to V4 is determined for the four macroblocks straddling the first reference MB. However, none of these macroblocks matches the first reference MB. Thus, since there is no motion information corresponding to the first reference MB in the encoded data of the first reference frame (P3 frame), the location of the second reference MB in the second reference frame (P2 frame) is determined. It cannot be obtained directly from the motion information of the first reference frame (P3 frame).
[0044]
Therefore, the motion information calculation circuit 2 calculates motion information corresponding to the movement from the second reference MB to the processing target MB as follows.
Step S1: First, the motion information calculation circuit 2 selects the motion corresponding to the macroblock having the largest area of the portion overlapping with the first reference MB among the four macroblocks straddling the first reference MB. Select information. In the example shown in FIG. 3, the macro block b4 of the four macroblocks has the largest area of overlap with the first reference MB, so the motion information V4 corresponding to the macroblock b4 is selected. It will be.
Step S2: Next, the motion information calculation circuit 2 performs the following calculation using the motion information V0 corresponding to the processing target MB and the motion information V4 obtained in step S2, and performs processing from the second reference MB. A calculated value Vnew of motion information corresponding to movement to MB is obtained.
[Expression 1]
Figure 0004153150
[0045]
The motion information calculation circuit 2 executes the above-described processing using each macroblock in the processing target frame (P4 frame) as the processing target MB, and for each macroblock, the second reference in the second reference frame (P2 frame). The calculated value Vnew of the motion information corresponding to the movement from the MB (corresponding to each macroblock) to the processing target macroblock is obtained.
In addition, when there are a plurality of frames to be thinned as illustrated in FIG. 1, the motion information calculation circuit 2 determines between a frame that is referenced by the frame that is thinned and a frame that is referenced by the frame that is thinned. The calculated value of motion information is obtained by the same procedure as described above.
[0046]
Next, the processing content of the DCT coefficient calculation circuit 5 will be described in detail. FIG. 4 shows one of the processing target MBs included in the processing target frame (P4 frame). Each processing target MB is composed of four blocks as shown in the figure. In the inter-frame predictive encoding method assumed in the present embodiment, DCT of difference images between frames is performed in units of blocks. Hereinafter, a procedure for correcting the DCT coefficient of the difference image corresponding to one block (hereinafter referred to as a processing target block) in the processing target MB shown in the drawing will be taken up.
[0047]
First, FIG. 4 shows one MB in the first reference frame (P3 frame), and this MB includes a first reference block b ′ similar to the image of the processing target block in frame P4. Hereinafter, for convenience, this block b ′ is referred to as a first reference block.
[0048]
The DCT coefficient of the difference image between the second reference frame (P2 frame) and the first reference frame (P3 frame) corresponding to the first reference block b ′ can be obtained from the encoded data of the first reference frame (P3 frame). For example, by adding this DCT coefficient to the DCT coefficient corresponding to the processing target block of the processing target frame (P4 frame), the DCT coefficient corresponding to the processing target block can be corrected to the content referring to the second reference frame. it can. However, the DCT coefficient supplied from the inverse quantizer 4 to the DCT coefficient calculation circuit 5 is a DCT coefficient corresponding to each block obtained by dividing each frame, and among these, the DCT coefficient corresponding to the first reference block b ′ is included. There is no coefficient. Therefore, the DCT coefficient calculation circuit 5 in the present embodiment calculates the DCT coefficient corresponding to the first reference block b ′ as follows.
[0049]
First, in FIG. 4, the first reference block b ′ straddles four blocks b1 to b4. The DCT coefficient calculation circuit 5 includes a horizontal length w1 and a height h1 of the portion that has entered the block b1 in the first reference block b ′, and a portion that has entered the block b2. The horizontal length w2 and the height direction length h2, the horizontal length w3 and the height direction length h3 of the portion entering the block b3, the portion entering the block b4 The horizontal length w4 and the height length h4 are respectively obtained.
[0050]
Next, when the matrix of DCT coefficients corresponding to each block bi (i = 1 to 4) is Bi (i = 1 to 4), the DCT coefficient calculation circuit 5 performs DCT corresponding to the first reference block b ′. A matrix B ′ of calculated coefficient values is obtained by the following equation.
[Expression 2]
Figure 0004153150
[0051]
Here, HHi is hhi's DCT coefficient, Hwi is hwi's DCT coefficient, and hhi and hwi are given as follows.
[Equation 3]
Figure 0004153150
[Expression 4]
Figure 0004153150
[Equation 5]
Figure 0004153150
[Formula 6]
Figure 0004153150
[0052]
In the above equations, the meaning of matrix notation using Ihi or Iwi is as follows. That is, for example, assuming that hi = 4, the above equations are expressed as follows.
[Expression 7]
Figure 0004153150
[Equation 8]
Figure 0004153150
[0053]
As described above, the DCT coefficient calculation circuit 5 calculates the DCT coefficient of the difference image between the second reference frame (P2 frame) and the first reference frame (P3 frame) corresponding to the first reference block b ′. When calculated, this DCT coefficient is added to the DCT coefficient of the processing target block, and is a difference image after motion compensation between the second reference frame (P2 frame) and the processing target frame (P4 frame) corresponding to the processing target block. The DCT coefficient of the object is obtained.
[0054]
Then, the DCT coefficient calculation circuit 5 performs the same process as described above for other blocks in the processing target frame (P4 frame), and corrects the DCT coefficients of all the blocks in the processing target frame.
The case where the P3 frame is thinned out has been described above as an example, but the same applies to the case where other frames are thinned out.
The above is the details of the transcoding apparatus according to the present embodiment.
[0055]
FIG. 5 shows a configuration in which the transcoding apparatus according to this embodiment is deleted from those included in the transcoding apparatus according to the prior art. According to the present embodiment, encoded data in which a specific frame is thinned out is generated by processing the encoded data as it is without decoding the image from the encoded data. DCT, DCT for re-encoding the decoded image, inverse quantization, inverse DCT, motion prediction and compensation are not required. For this reason, errors caused by these unnecessary conversions can be eliminated, image quality deterioration due to transcoding can be reduced, and the amount of computation and computation time for transcoding can be greatly reduced. In addition, since the image is not decoded from the encoded data, a memory for storing the decoded image is unnecessary, and the hardware of the transcoding device can be reduced in scale.
[0056]
A-3. Other examples of motion information calculation algorithm
In the first embodiment described above, an example of the motion information calculation algorithm executed by the motion information calculation circuit 2 (FIG. 2) is shown. However, there are other examples of motion information calculation algorithms that can be executed by the motion information calculation circuit 2.
[0057]
A-3-1. Example 1
This example is MPEG-4 or H.264. The present invention provides a transcoding method and transcoding apparatus suitable for encoded data capable of performing motion compensation for each block such as H.263. In this example, the motion information calculation algorithm of the motion information calculation circuit 2 (see FIG. 2) in the first embodiment is changed to that shown in FIG. Hereinafter, the motion information calculation algorithm according to this example will be described assuming that P4 frame is a processing target frame, P3 frame is a first reference frame, P2 frame is a second reference frame, and P3 frame (first reference frame) is thinned out. To do.
[0058]
In this algorithm, motion information is calculated according to the following procedure.
Step 1: First, motion information V0 corresponding to the processing target macroblock in the processing target frame is obtained, and a first reference macroblock corresponding to the processing target macroblock in the first reference frame is obtained from this motion information V0.
[0059]
Step 2: Next, for each first reference block obtained by dividing the first reference macroblock in the first reference frame, the area of the portion of each macroblock in the first reference frame that overlaps the first reference block Finds motion information corresponding to the widest macroblock. In the example of FIG. 14, the upper left first reference block has the widest area overlapping with the upper left macroblock b1, so the motion information V1 corresponding to the upper left macroblock b1 is the code of the first reference frame. Will be selected from the digitized data. Also, the upper right first reference block has the largest area overlapping with the upper right macro block b2, so that the motion information V2 corresponding to the upper right macro block b2 is included in the encoded data of the first reference frame. Will be selected. In addition, since the lower left first reference block has the largest area overlapping with the lower left macroblock b3, the motion information V3 corresponding to the lower left macroblock b3 is included in the encoded data of the first reference frame. Will be selected. Finally, since the lower right first reference block has the largest area overlapping with the lower right macro block b4, the motion information V4 corresponding to the lower right macro block b4 is the code of the first reference frame. Will be selected from the digitized data.
[0060]
Step 3: Divide the processing target macroblock in the processing target frame from the second reference frame from the motion information V0 in step 1 and the motion information V1 to V4 selected for each first reference block in step S2 by the following calculation: The motion information V1new to V4new up to four blocks is obtained.
[Equation 9]
Figure 0004153150
[0061]
According to this motion information calculation algorithm, motion information between each block obtained by dividing the processing target macroblock and the reference image can be obtained, which is optimal for an encoding method capable of motion compensation for each block. Transcoding can be performed.
[0062]
A-3-2. Example 2
Next, in the motion information calculation algorithm shown in FIG. 7A, motion information is calculated according to the following procedure.
Step 1: First, motion information V0 corresponding to the processing target macroblock is obtained from the encoded data of the processing target frame, and the first reference macroblock corresponding to the processing target macroblock in the first reference frame is obtained from the motion information V0. Ask for.
Step 2: Next, macroblocks b1 to b4 that overlap with the first reference macroblock among the macroblocks in the first reference frame are obtained, and among the macroblocks b1 to b4, overlap with the first reference macroblock. The motion information corresponding to the macroblock having the largest area is calculated. In the example of FIG. 7A, the macro block b4 shown in the lower right among the four macro blocks b1 to b4 shown in FIG. The motion information V4 corresponding to the block b4 is selected from the encoded data of the first reference frame.
[0063]
Step 3: Next, in the first reference frame, motion information ΔV4 from the center of the first reference macroblock to the center of the macroblock b4 having the largest area of the overlapping portion with the first reference macroblock is obtained (FIG. 7). (See (b)).
Step S4: The processing target macro in the processing target frame from the second reference frame based on the motion information V0 obtained in step 1, the motion information V4 obtained in step 2, and the motion information ΔV4 obtained in step 3 by the following calculation: The motion information Vnew up to the block is obtained.
[Expression 10]
Figure 0004153150
[0064]
A-4. Another example of DCT coefficient calculation algorithm
Next, the DCT coefficient calculation algorithm of the DCT coefficient calculation circuit in this embodiment will be described with reference to FIG. In the present embodiment, the DCT coefficient corresponding to the processing target MB after P3 frame (first reference frame) thinning is calculated by the following procedure.
Step S1: First, the DCT coefficient corresponding to the processing target MB (that is, the DCT coefficient of the difference between the processing target MB and the first reference MB) is obtained from the encoded data of the P4 frame (processing target frame).
Step S2: Next, among the macroblocks b1 to b4 overlapping with the first reference MB in the thinned P3 frame, the DCT corresponding to the macroblock b4 having the largest area overlapping with the first reference MB The coefficient (that is, the DCT coefficient of the difference between the macroblock b4 and the reference MB) is obtained.
Step S3: Next, the DCT coefficient corresponding to the processing target MB obtained in Step S1 and the DCT coefficient corresponding to the macroblock b4 obtained in Step S2 are added, and this addition result is encoded after P3 frame decimation. The DCT coefficient corresponding to the MB is used.
[0065]
In the case of this example, the DCT coefficient corresponding to the processing target MB can be obtained by simply adding the DCT coefficient, and it is not necessary to perform the calculation as in Expression 2 in the first embodiment, so that the calculation amount is reduced. There is an advantage that you can.
Note that the DCT coefficient calculation circuit in this example may be combined with a motion information calculation circuit of another configuration in addition to the motion information calculation circuit in this example.
[0066]
A-5. Modification 1
In the embodiment described above, the concept of the frame in the picture group has been described. However, the present invention is not limited to the frame, and the present invention can also be applied to an encoding method such as MPEG-2 that handles fields. For example, in the case of a television signal, one frame is composed of two fields as illustrated in FIG. Then, interframe predictive coding is performed between odd fields and adjacent fields of adjacent frames. Even when transcoding encoded data obtained by such inter-frame predictive encoding, motion information and DCT coefficients are calculated according to basically the same procedure as described in the above embodiments. be able to. That is, each field in the frame is set as a processing target frame, and motion information and DCT coefficients according to the above embodiments may be calculated.
[0067]
A-6. Modification 2
In the embodiment described above, P frames in a picture group are thinned out. On the other hand, in this embodiment, for example, B frames are thinned out in a picture group having a configuration of IBBP, and the motion information and DCT coefficients of the encoded data of the B frames remaining in that case are changed to reduce the data amount.
[0068]
Hereinafter, the transcoding method according to the present modification will be described with reference to FIG. In the picture group shown in FIG. 9, two B frames are inserted between the I frame and the P frame. Each of these B frames is generated by referring to the I frame and the P frame. Here, among these B frames, the B frame immediately before the P frame is thinned out. When this thinning is performed, the B frame immediately after the I frame remains, but this B frame includes the following three types of macroblocks.
[0069]
a. A macroblock that has undergone interframe predictive coding in the forward prediction mode. That is, a macroblock that includes motion information referring to only the previous frame (I frame in this example) in the encoded data.
b. A macroblock that has been subjected to interframe predictive coding in the bidirectional prediction mode. That is, a macroblock that includes motion information referring to the previous frame (I frame in this example) and motion information referring to the subsequent frame (P frame in this example) in the encoded data.
c. A macroblock that has been subjected to interframe predictive coding in the backward prediction mode. That is, a macroblock that includes motion information referring to only a subsequent frame (P frame in this example) in encoded data.
[0070]
In the present embodiment, the encoded data of these three types of macro blocks a to c are processed as follows.
[0071]
<Processing of coded data of macroblock a>
For the encoded data of the macroblock, the motion information (forward direction) Vforward (B) and the DCT coefficient are left as they are.
[0072]
<Processing of coded data of macroblock b>
For the encoded data of the macroblock, only the motion information (forward direction) Vforward (B) referring to the previous frame is left, and the motion information (reverse direction) Vbackword (B) referring to the subsequent frame is discarded. Further, the DCT coefficient of the difference image after motion compensation is left as it is.
[0073]
<Processing of coded data of macroblock c>
For the encoded data of the macroblock, the macroblock is a processing target macroblock, the subsequent frame (P frame) is a frame to be thinned out in each of the above embodiments, and the previous frame (I frame) is in each of the above embodiments. Change the motion information corresponding to the macroblock to the content referring to the reference frame, and the DCT coefficient corresponding to the macroblock to the content referring to the reference frame. To do. FIG. 9 shows an example in which the motion information calculation method disclosed in the first embodiment is applied to this modification. That is, in the example shown in FIG. 9, the motion information referring to the reference frame is obtained for the macroblock by the following procedure.
[0074]
a. Motion information Vbackword (B) corresponding to the processing target macroblock is obtained from the encoded data.
b. A first reference macroblock corresponding to the processing target macroblock in the P frame is obtained from the motion information Vbackword (B).
c. The motion information Vforward (p) corresponding to the macroblock having the largest area of the portion overlapping each of the first reference macroblocks among the macroblocks in the P frame is obtained.
d. The motion information Vnew for motion compensation between the I frame referred to for generating the encoded data of the P frame and the processing target macroblock is calculated from the motion information of a and c according to the following equation. To do.
[Expression 11]
Figure 0004153150
The above is the details of the motion information calculation process in the present modification.
[0075]
As in the case of the motion information described above, the DCT coefficient corresponding to the B frame can be used as it is in the first embodiment.
Through the above processing, the B frame remaining after the thinning becomes a P frame referring only to the previous frame (I frame in this example).
[0076]
In the above example, the case of using the motion information and DCT coefficient calculation method in the first embodiment has been described as an example. However, the motion information and DCT coefficient calculation method in other embodiments is described in this embodiment. It goes without saying that it can be applied.
In the above example, the case where the B frame is thinned out in the configuration called IBBP has been described. However, in the present embodiment, for example, one of two B frames between two P frames is thinned out in the configuration called IBBPBBP. Applicable.
[0077]
B. Second embodiment
B-1. Transcoding example
FIGS. 10A to 10C are diagrams illustrating an example of transcoding performed in the present embodiment. First, in the example shown in FIG. 10A, encoded data corresponding to a picture group composed of an I frame, two B frames, and a P frame is converted into a picture group composed of an I frame and three P frames. Transcoding is performed to convert the data into corresponding encoded data.
[0078]
In this example, the encoded data corresponding to the B frame before transcoding is generated by referring to the image data of the previous I frame and the image data of the subsequent P frame. Motion information for performing motion compensation (forward prediction) and motion information for performing motion compensation (reverse prediction) between P frames.
[0079]
Next, in the example shown in FIG. 10B, in the example shown in FIG. 10A, the encoded data corresponding to the later B frame out of the two B frames is thinned out, and immediately after the I frame. The encoded data corresponding to the B frame is converted into the encoded data of the P frame referring only to the I frame, and the encoded data corresponding to the last P frame in the picture group so as to have the content referring to the P frame. Perform the conversion.
[0080]
Next, in the example shown in FIG. 10C, when encoded data corresponding to a picture group including an I frame and three P frames is given, one of the three P frames is thinned out, and I Conversion into encoded data corresponding to a picture group consisting of a frame and two P frames.
[0081]
As exemplified above, in the transcoding to which the present invention is applied, when the encoded data of a certain processing target frame is generated with reference to another frame (first reference frame), the processing is performed. The encoded data of the target frame is changed to the content referring to the second reference frame. At that time, motion information corresponding to the motion from the second reference frame to the processing target frame is required. In order to obtain this motion information, the conventional transcoding device employs a method of searching an image similar to the image corresponding to each macroblock of the processing target frame from the image of the second reference frame. Therefore, the amount of calculation has become enormous. The present invention provides a new technical means to replace such motion information search, and reduces the amount of calculation in transcoding.
[0082]
B-2. Transcoding equipment
FIG. 11 is a block diagram showing a configuration of a transcoding apparatus according to an embodiment of the present invention. As shown in FIG. 11, the transcoding apparatus includes a decoder 10, an encoder 20, a motion information calculation unit 40, and a motion information correction unit 50.
[0083]
Among these, the decoder 10 is means for receiving encoded data encoded by a certain encoding algorithm and restoring the original image data from the encoded data. The demultiplexer 11 and the variable length decoder 12 and 13, an inverse quantizer 14, an adder 16, a frame memory 17, and a motion compensation unit 18.
[0084]
Here, the demultiplexer 11 converts encoded data corresponding to each frame other than the I frame, a variable length code representing a DCT coefficient of a difference image obtained by interframe predictive encoding, and a variable length of motion information. It is a device that separates into a code. The variable length decoders 12 and 13 are devices for returning the DCT coefficient variable length code and motion information variable length code separated by the demultiplexer 1 to DCT coefficient quantized data and motion information, respectively. The inverse quantizer 14 is a device that inversely quantizes the DCT coefficient quantized data obtained from the variable length decoder 12 and outputs the DCT coefficient. The inverse DCT unit 15 is a device that performs inverse DCT on the DCT coefficient obtained from the inverse quantizer 14 and obtains a prediction error obtained in interframe predictive coding with motion compensation. This prediction error is generated when the encoded data to be processed is generated, while performing motion compensation, the image corresponding to the encoded data and the frame (first image) that is referenced to generate the encoded data. This corresponds to the difference image obtained by performing subtraction with the image of the reference frame. The frame memory 17 is a memory that stores the decoded image data. When the prediction error (difference image) corresponding to a certain processing target frame is output from the inverse DCT unit 15 to the adder 16, the motion compensation unit 18 is referred to when the encoded data of the processing target frame is generated. This is a device that reads image data of one reference frame from the frame memory 17, performs motion compensation using the motion information from the variable length decoder 13, and outputs it to the adder 16. The adder 16 adds the motion compensated reference frame image data and the prediction error from the inverse DCT unit 15 and outputs the addition result as image data corresponding to the processing target frame. The configuration and operation of the decoder 1 described above are as already described with reference to FIG. 17B and FIG.
[0085]
Next, the encoder 20 includes a subtracter 21, a DCT unit 22, a quantizer 23, an inverse quantizer 24, an inverse DCT unit 25, an adder 26, a frame memory 27, and motion compensation. Section 28, variable length encoders 29 and 30, and multiplexer 31.
[0086]
Here, the subtractor 21 calculates a prediction error that is a difference between the image data corresponding to the processing target frame supplied from the decoder 1 side and the reference image data subjected to motion compensation supplied from the motion compensation unit 28. It is a device to calculate. Reference image data will be described later. The DCT unit 22 is a device that performs DCT on the prediction error obtained from the subtractor 21, and the quantizer 23 is a device that performs quantization on the DCT coefficient obtained from the DCT unit 22 and outputs quantized data. It is. The inverse quantizer 24 is a device that performs inverse quantization on the quantized data output from the quantizer 23 and outputs DCT coefficients. The inverse DCT unit 25 includes a DCT output from the inverse quantizer 24. This is a device that performs inverse DCT on a coefficient to restore a prediction error. The frame memory 27 is a memory for storing reference frame image data. When the image data corresponding to a certain processing target frame is supplied from the decoder 1 side to the subtractor 21, the motion compensation unit 28 refers to the reference frame referenced in the encoding of the processing target frame stored in the frame memory 27. The image data corresponding to is read, and motion compensation is performed on the image data using motion information supplied from a motion information correction unit 4 described later. Then, the reference image data obtained by this motion compensation is supplied to the subtracter 21 and the adder 26. The adder 26 adds the motion compensated reference image data and the prediction error obtained from the inverse DCT unit 25, and outputs image data corresponding to the processing target frame. This image data is written in the frame memory 24 as image data of a reference frame that is referred to when a subsequent frame is encoded.
[0087]
There is a significant difference between the encoder 20 described above and the encoder in the conventional transcoding apparatus already described. That is, the encoder of the conventional transcoding apparatus has a motion prediction and compensation unit 106 (see FIG. 24A), and the motion prediction and compensation unit 106 performs motion from the reference frame to the processing target frame. However, the encoder 20 in this embodiment does not have a means for searching for such motion information. The encoder 20 in this embodiment performs motion compensation of the image data of the reference frame using the motion information sent from the motion information correction unit 50. The feature of this embodiment is that this motion information is obtained with a remarkably small amount of calculation as compared with the prior art. In the present embodiment, this motion information is obtained by the motion information calculation unit 40 and the motion information correction unit 50 in FIG.
[0088]
Next, the motion information calculation unit 40 will be described. The motion information calculation unit 40 is a device that calculates motion information to be included in encoded data after transcoding by performing a predetermined calculation using motion information obtained from the variable length decoder 13 of the decoder 1. is there. Further details are as follows. For example, when transcoding illustrated in FIG. 10A is performed, if a B frame immediately after an I frame is a processing target frame, encoded data corresponding to the processing target frame is an I frame and a P frame (first frame). Reference frame) image data, including motion information corresponding to the motion from the I frame to the processing target frame and motion information corresponding to the motion from the P frame to the processing target frame. It is out. In transcoding, the encoded data of the processing target frame is converted into encoded data that refers to only the I frame (second reference frame). In order to obtain encoded data that refers to only this I frame (second reference frame), the motion information calculation unit 3 uses at least the motion information included in the encoded data of the processing target frame, The motion information corresponding to the motion from the (second reference frame) to the processing target frame is calculated. There are several suitable algorithms for calculating the motion information, and will be described in detail later.
[0089]
Next, the motion information correction unit 50 will be described. The motion information obtained from the motion information calculation unit 40 is not obtained by searching for motion information, but is obtained by calculating existing motion information. For this reason, motion information that is not very accurate may be obtained. Therefore, in the present embodiment, it is determined whether or not the motion information obtained from the motion information calculation unit 3 is accurate. If it is recognized that the motion information is accurate, the motion information is used as it is. The data is sent to the encoder 20. On the other hand, when it is recognized that the motion information obtained from the motion information calculation unit 40 is not accurate, the processing target frame is selected from the image data of the second reference frame stored in the frame memory 17. An image approximate to the image is searched, and motion information corresponding to the motion from the second reference frame to the processing target frame is obtained. The motion information correction unit 50 is a means for performing such a function. Note that the specific contents of the process for determining whether or not the motion information obtained from the motion information calculation unit 3 is accurate and the details of the process for obtaining the motion information by searching are redundant. Will be described in the operation section of this embodiment.
[0090]
Hereinafter, the operation of this embodiment will be described with reference to the case of performing transcoding shown in FIG. The transcoding device according to the present embodiment includes a motion information calculation unit 40 and a motion information correction unit 50, and the conventional transcoding device is used in that the motion information obtained by these is used on the encoder 20 side. Is different. Therefore, hereinafter, the operations of the motion information calculation unit 40 and the motion information correction unit 50 will be mainly described.
[0091]
(1) Operation of the motion information calculation unit 40
First, the operation of the motion information calculation unit 40 when performing the transcoding shown in FIG. 10A will be described with reference to FIGS.
[0092]
12 to 14, two B frames are inserted between an I frame and a P frame before transcoding. The motion information calculation unit 3 uses the motion information calculation processing necessary to make these B frames P frames referring only to the immediately preceding frame and the last P frame as the immediately preceding P frame (which was originally a B frame). ) To perform motion information calculation processing necessary to obtain a P frame referring only to.
[0093]
<Process corresponding to B frame immediately after I frame>
In the present embodiment, the following three types of macroblocks included in the B frame are handled.
a. A macroblock that has undergone interframe predictive coding in the forward prediction mode. That is, a macroblock that includes motion information referring to only the previous frame (I frame in this example) in the encoded data.
b. A macroblock that has been subjected to interframe predictive coding in the bidirectional prediction mode. That is, a macroblock that includes motion information referring to the previous frame (I frame in this example) and motion information referring to the subsequent frame (P frame in this example) in the encoded data.
c. A macroblock that has been subjected to interframe predictive coding in the backward prediction mode. That is, a macroblock that includes motion information referring to only a subsequent frame (P frame in this example) in encoded data.
The same applies to the second B frame, not limited to the one immediately after the I frame.
[0094]
The motion information calculation unit 3 calculates the post-transcoding motion information corresponding to the three types of macro blocks a to c regarding the B frame immediately after the I frame as follows.
[0095]
First, for the macroblock a, the motion information (forward direction) Vforward (B) separated from the encoded data of the macroblock is directly used as the motion information after transcoding. Next, for the macroblock b, among the motion information separated from the encoded data of the macroblock, only the motion information (forward direction) Vforward (B) referring to the previous frame is used as the motion information after transcoding, The motion information (reverse direction) Vbackward (B) referring to the subsequent frame is discarded.
[0096]
Next, with respect to the macro block c, the encoded data corresponding to the macro block c includes only motion information Vbackward (B) for motion compensation with the P frame (first reference frame). In addition, it does not include motion information for motion compensation with an I frame (second reference frame) that is a reference destination after transcoding. On the other hand, the encoded data of each macroblock constituting the P frame (first reference frame) includes motion information Vforward (P) for motion compensation with the I frame (second reference frame). Therefore, the motion information calculation circuit 3 performs motion information for motion compensation between the macroblock c and the I frame (second reference frame) by calculation using the motion information Vbackward (B) and Vforward (P). Find the predicted value of.
[0097]
Here, an example of a method for calculating the predicted value of the motion information will be described with reference to FIG.
Step 1: First, the motion information Vbackward (B) separated from the encoded data of the macroblock c to be processed is acquired. This motion information Vbackward (B) corresponds to the motion from the macroblock (first reference macroblock) corresponding to the processing target macroblock c included in the P frame (first reference frame) to the processing target macroblock c. is doing.
[0098]
Step 2: The first reference macroblock corresponding to the macroblock c in the P frame (first reference frame) is obtained from the motion information Vbackward (B).
Step 3: The motion information Vforward (P) corresponding to the macroblock having the widest area of the portion overlapping with the first reference macroblock among the macroblocks in the P frame (first reference frame) is obtained. In the example shown in FIG. 15, the first reference macroblock extends over the macroblocks b1 to b4, and the area of the portion overlapping with the macroblock b4 is the largest. Therefore, the motion information V4 corresponding to the macro block b4 is selected as the motion information Vforward (P).
[0099]
Step 4: Predicted motion information Vforward (B) after transcoding of the macroblock c is calculated from the motion information Vbackward (B) and Vforward (P) according to the following equation.
[Expression 12]
Figure 0004153150
The above is the details of the method for calculating the motion information after transcoding corresponding to the B frame immediately after the I frame.
[0100]
<Process corresponding to second B frame>
Next, a process corresponding to the second B frame will be described with reference to FIG. This second B frame also includes the above three types of macroblocks a to c, similarly to the B frame immediately after the I frame. Also, the time difference between the second B frame that is the processing target frame and the first reference frame (B frame of the I frame) that is the reference destination before the transcoding, the reference target after the processing target frame and the transcoding thereof Comparing the difference with the second reference frame (B frame immediately after the I frame), the latter is ½ of the former. Therefore, the motion information calculation unit 3 calculates the motion information after transcoding corresponding to the three types of macro blocks a to c by the following linear interpolation.
[0101]
First, for this macroblock a, motion information (forward direction) Vforward (B) separated from the encoded data of the macroblock is acquired, and Vforward (B) / 2 is used as motion information after transcoding. Next, for the macroblock b, the motion information (forward direction) Vforward (B) referring to the previous frame is acquired from the motion information separated from the encoded data of the macroblock, and Vforward (B) / 2 Is the motion information after transcoding. Next, for the macroblock c, motion compensation between the macroblock c and the corresponding macroblock in the I frame (second reference frame) is performed in the same manner as in the case of the B frame immediately after the I frame. Predictive motion information Vforward (B) is obtained, and Vforward (B) / 2 is set as motion information after transcoding. The above is the details of the method for calculating the motion information after transcoding corresponding to the second B frame. When the motion of the image is relatively slow, it is considered that a predicted value of motion information that is relatively close to that obtained by motion information search can be obtained even by such linear interpolation.
[0102]
<Process corresponding to the last P frame>
Next, a process corresponding to the last P frame will be described with reference to FIG. In each macroblock constituting the P frame, encoded data is generated by referring to the first I frame (first reference frame). Also, the time difference between the P frame that is the processing target frame and the first reference frame (I frame) that is the reference destination before the transcoding, and the second reference that is the reference destination after the processing target frame and the transcoding. Comparing the time difference with the frame (second B frame), the latter is 1/3 of the former. Therefore, the motion information calculation unit 3 calculates the motion information after transcoding in the processing target frame by the following linear interpolation. That is, for each macroblock, motion information (forward direction) Vforward (P) separated from the encoded data of the macroblock is acquired, and Vforward (P) / 3 is used as motion information after transcoding. The above is the details of the calculation method of the motion information after transcoding corresponding to the last P frame.
[0103]
(2) Operation of the motion information correction unit 50
As described above, the motion information obtained from the motion information calculation unit 40 is obtained by using the existing motion information as it is or by applying a predetermined calculation to the existing motion information. Information may be obtained. The motion information correction unit 50 determines whether or not the motion information obtained by the motion information calculation unit 40 can be said to be accurate. If it is determined that the motion information is not accurate, the motion information that replaces the motion information is obtained. Is supplied to the encoder 20. FIG. 16 is a flowchart showing the operation of the motion information correction unit 4. The motion information correction unit 50 executes the processing shown in this flowchart for each macroblock (hereinafter referred to as a processing target macroblock) constituting the processing target frame.
[0104]
First, the motion information correction unit 50 uses the motion information calculated by the motion information calculation unit 3 (hereinafter referred to as motion information MEnew) to determine the position in the frame of the second reference macroblock corresponding to the processing target macroblock. The image data corresponding to the second reference macro block is obtained from the frame memory 17. Next, the motion information correction unit 4 subtracts the image data corresponding to the second reference macroblock from the image data of the processing target macroblock obtained from the adder 16 to obtain a prediction error (hereinafter referred to as a second prediction error). Is calculated (step S1).
[0105]
Next, the motion information correcting unit 50 predicts a prediction error corresponding to the processing target macroblock output from the inverse DCT unit 15 (difference image between the processing target macroblock and the first reference macroblock. Is called a prediction error), and it is determined whether or not the condition shown in the following equation is satisfied (step S2).
[Formula 13]
Figure 0004153150
Here, α is a predetermined constant.
[0106]
When the condition shown in the above equation (13) is satisfied, the motion information correction unit 50 regards the motion information MEnew as accurate motion information, and determines the motion information MEnew from the second reference macroblock to the processing target block. The motion information corresponding to the motion is sent to the encoder 2 (step S5).
[0107]
On the other hand, when the condition shown in the above equation (13) is not satisfied, the motion information correction unit 50 regards the motion information MEnew as inaccurate motion information, and determines a search range for motion information based on the motion information MEnew ( In step S3), accurate motion information replacing the motion information MEnew is searched for in this search range (step S4).
Hereinafter, these processes will be described with reference to FIGS.
[0108]
First, FIG. 17 shows a method for determining a search range of motion information when the macroblock included in the B frame immediately after the I frame is the processing target macroblock in the case of performing the transcoding shown in FIG. Explain.
[0109]
Here, in the case of the B frame immediately after the I frame, the second reference frame which is a reference destination after transcoding is the I frame. Therefore, the motion information correction unit 4 uses the motion information calculated by the motion information calculation circuit 3 (Vforward (B) in FIG. 17) to determine the position of the second reference macroblock corresponding to the processing target macroblock. In FIG. 17, this second reference macroblock is indicated by a broken line in a rectangle representing an I frame. The motion information correction circuit 50 obtains four macroblocks having a portion overlapping with the second reference block among the macroblocks constituting the I frame that is the second reference frame. These four macroblocks are the search range of motion information corresponding to the processing target macroblock.
[0110]
When the search range of motion information is determined in this way, the motion information correction unit 50 selects the image of the processing target macroblock from the images corresponding to the second reference frame (I frame) within the search range. Search for the one with the smallest prediction error. Then, motion information corresponding to the motion from the reference image obtained by this search to the processing target macroblock is obtained.
[0111]
Next, FIG. 18 illustrates a method for determining a motion information search range when the macroblock included in the second B frame is the processing target macroblock in the case of performing the transcoding illustrated in FIG. To do. FIG. 19 illustrates a method for determining a search range for motion information when the macroblock included in the last P frame is a processing target macroblock. The operation of the motion information correction unit 50 in these cases is the same as in the case of the B frame immediately after the I frame already described. That is, the motion information correction unit 50 obtains each macroblock that overlaps with the second reference macroblock among the macroblocks constituting the second reference frame immediately before the processing target frame, and uses these macroblocks as a search range for motion. It searches for information.
[0112]
The above is the processing content of the motion information correction unit 50 corresponding to steps S3 and S4 in FIG. The motion information correction unit 50 sends the motion information obtained in this way to the encoder 20 as motion information corresponding to the motion from the second reference macroblock to the processing target block (step S5).
[0113]
(3) Operation of encoder 20
The encoder 20 includes image data of each macro block (processing target macro block) output from the decoder 10 and motion corresponding to each processing target macro block output by the motion information correction unit 50. Information. Then, the motion compensation unit 28 in the encoder 20 uses the motion information corresponding to each processing target macroblock received from the motion information modification unit 50 to position the second reference macroblock corresponding to each processing target macroblock. Each is obtained. Then, the image data of the second reference block corresponding to each processing target macroblock is read from the frame frame memory 27 and sent to the subtracter 21.
[0114]
The subtracter 21 subtracts the image data of each of these second reference macroblocks from the image data of the processing target macroblock corresponding to each, and outputs each as a prediction error. This prediction error is converted into DCT coefficients by the DCT unit 22 and converted into quantized data by the quantizer 23. This quantized data is returned to the prediction error through the inverse quantizer 24 and the inverse DCT unit 25. The adder 26 adds the image data of the second reference macroblock output from the motion compensation unit 28 and the prediction error, and writes the result in the frame memory 27 as image data corresponding to the processing target macroblock.
[0115]
On the other hand, the quantized data output from the quantizer 23 is converted into a variable length code by the variable length encoder 29. Also, the motion information from the motion information correction unit 4 is converted into a variable length code by the variable length encoder 30. These variable length codes are multiplexed by the multiplexer 31 and output as encoded data after transcoding corresponding to the processing target frame.
[0116]
As described above, according to this embodiment, no motion information search is performed on the encoder 20 side, and the amount of calculation for searching for motion information during transcoding is greatly reduced. Can be significantly increased.
[0117]
B-3. Example of operation in other transcoding
In the embodiment described above, the case where the transcoding illustrated in FIG. 10A is performed has been described as an example, but here, an operation example in the case where other transcoding is performed will be described.
[0118]
First, the operation of the motion information calculation unit 40 when performing the transcoding shown in FIG. 10B will be described with reference to FIG. In FIG. 20, the method for calculating the motion information after transcoding the B frame immediately after the I frame is as described in the above embodiment. Next, the second B frame in FIG. 20 is thinned out during transcoding.
[0119]
Then, motion information after transcoding of the last P frame of the picture group is obtained as follows. First, as shown in FIG. 20, a P frame that uses an I frame as a reference frame before transcoding is a frame that refers to a P frame immediately after the I frame after transcoding (originally a B frame). Become. Here, when the time difference between the I frame and the P frame is compared with the time difference between the P frame immediately after the I frame before transcoding and the last P frame, the latter is 2/3 of the former. Therefore, the motion information calculation unit 3 acquires motion information V (P) corresponding to each macroblock of the last P frame, and uses 2V (P) / 3 as motion information after transcoding.
[0120]
Next, the operation of the motion information calculation unit 40 when performing the transcoding shown in FIG. 10C will be described with reference to FIG. In FIG. 21, the P frame immediately after the I frame has no change in the reference frame before and after transcoding. Therefore, the P frame is not a processing target of the motion information calculation unit 3. The second P frame is thinned out during transcoding. Therefore, the second P frame is not processed by the motion information calculation unit 3.
[0121]
Next, the last P frame of the picture group is the first reference frame that is the reference destination before transcoding, and the second reference frame that is the reference destination after transcoding is the I frame. This is the first P frame immediately after. Therefore, the motion information calculation unit 3 performs motion information corresponding to the motion between the second reference frame and the processing target frame for each processing target macroblock constituting the last P frame that is the processing target frame by the following procedure. The predicted value Vforward (P) is calculated.
[0122]
Step 1: First, using the motion information Vforward (P) corresponding to the processing target macroblock in the last P frame, the first corresponding to the processing target macroblock in the first reference frame (second P frame). Find a reference macroblock.
Step 2: Next, motion information Vforward (P) corresponding to the macroblock having the largest area of the portion overlapping with the first reference macroblock among the macroblocks in the first reference frame is obtained, and this motion information Vforward is obtained. (P) and the motion information Vforward (P) obtained in step 1 are added. As a result, a predicted value Vforward (P) of motion information corresponding to the motion between the second reference frame (first P frame) and the processing target frame is obtained.
[0123]
The above is the operation of the motion information calculation circuit 3 when transcoding with frame thinning as exemplified in FIGS. 10B and 10C is performed. The operations of the motion information correction unit 50 and other parts are not different from those of the above embodiment. FIG. 22 shows that the motion information corresponding to the processing target macroblock in the last P frame calculated by the motion information calculation unit 40 is incorrect when the transcoding illustrated in FIG. 10C is performed. There is shown a method of determining a search range when the motion information correction unit 50 searches for motion information. As shown in this figure, the motion information correction unit 50 obtains a second reference macroblock in the second reference frame (first P frame) using the motion information calculated by the motion information calculation unit 40, and this The motion information is searched for each macroblock in the second reference frame that overlaps with the second reference macroblock as a search range.
[0124]
B-4. Embodiment in which a frame is composed of two fields
In the embodiment described above, the concept of a frame in a picture group has been described. However, the present invention is not limited to a frame, and this embodiment handles fields as shown in FIG. 8 as in the first embodiment. The present invention can also be applied to an encoding method such as MPEG-2. That is, each field in the frame is set as a processing target frame, and the motion information may be calculated and corrected according to the above embodiment.
[0125]
C. Third embodiment
FIG. 23 is a block diagram showing a configuration of a transcoding apparatus according to the third embodiment of the present invention. As shown in FIG. 23, this transcoding device includes an input unit 61, a buffer 62, a switching control unit 63, a switching unit 64, a first transcoding unit 70, and a second transcoding unit 80. is doing.
[0126]
The input unit 61 includes a demultiplexer 61A, variable length decoders 61B and 61C, and an inverse quantizer 61D.
[0127]
Here, the demultiplexer 61A converts the encoded data of the other frames excluding the I frame into a variable length code of the DCT coefficient and a variable length code of the motion information of the difference image obtained by the inter-frame prediction encoding. It is a device to separate. The variable length decoders 61B and 61C are devices that return the DCT coefficient variable length code and motion information variable length code separated by the demultiplexer 61A to DCT coefficient quantized data and motion information. The buffer 62 receives the motion information from the variable length decoder 61C and the DCT coefficients from the inverse quantizer 61D, and stores the motion information and DCT coefficients corresponding to the latest predetermined number of frames. The recent predetermined number of frames is, for example, a picture group. When the storage of the DCT coefficient and motion information corresponding to one picture group is completed, the stored DCT coefficient and motion information are read from the buffer 62, and the DCT coefficient and motion information corresponding to the next picture group are stored. Be started.
[0128]
The switching control unit 63 monitors the motion information in the buffer 62, determines whether or not the moving image is fast based on the motion information, and controls the switching unit 64 based on the determination result. The switching unit 64 transfers DCT coefficients and motion information corresponding to a predetermined number of frames from the buffer 62 to the first transcoding unit 70 or the second transcoding unit 80 under the control of the switching control unit 63.
[0129]
The first transcoding unit 70 is a device that performs transcoding according to the method disclosed in the first embodiment. For this reason, the first transcoding unit 70 includes the elements included in the transcoding device according to the first embodiment (see FIG. 2). The second transcoding unit 80 is a device that performs transcoding according to the method disclosed in the second embodiment. For this reason, the second transcoding unit 80 includes elements included in the transcoding apparatus according to the second embodiment (see FIG. 11).
[0130]
Next, the operation of this embodiment will be described. The encoded data of the frame of the moving image is supplied to the transcoding device, and the buffer 62 stores DCT coefficients and motion information corresponding to a recent predetermined number of frames.
[0131]
When the motion information stored in the buffer 62 is smaller than a predetermined threshold (when the motion of the moving image is slow), the switching control unit 63 receives the DCT coefficient and the motion information from the buffer 62 to the DCT coefficient of the first transcoding unit 70. The switching unit 64 is controlled so as to be transferred to the calculation circuit 5 and the motion information calculation circuit 2, respectively. As a result, the transcoding disclosed in the first embodiment is applied to the DCT coefficients and motion information of a moving image with a small amount of calculation.
[0132]
On the other hand, when the motion information stored in the buffer 62 is larger than the threshold (when the motion of the moving image is fast), it is difficult for the motion information calculation circuit 2 to calculate accurate motion information. There may be a problem that the code amount of the obtained encoded data increases. Therefore, in this case, the switching control unit 63 controls the switching unit 64 so that the DCT coefficient and the motion information are transferred from the buffer 62 to the inverse DCT unit 15 and the motion information calculation unit 40 of the second transcoding unit 80, respectively. . As a result, the transcoding disclosed in the second embodiment is applied to the DCT coefficient and motion information of the moving image.
[0133]
In the third embodiment described above, the switching control of the switching unit 64 is performed in units of a predetermined number of frames such as a picture group. However, the switching control method is not limited to the mode described above. The number of frames for which switching control is performed may not be constant.
[0134]
D. Modified example
In each of the embodiments described above, the concept of a picture group consisting of a fixed number of frames is used. However, the present invention is not limited to application to such a picture group, and is not limited to MPEG-4. The present invention may be applied to an encoding method that does not have a concept of a simple picture group.
[0135]
【The invention's effect】
As described above, according to the present invention, transcoding for converting the first moving image encoded data into the second moving image encoded data can be executed with a small amount of calculation.
[Brief description of the drawings]
FIG. 1 is a diagram showing an example of transcoding performed in a first embodiment of the present invention.
FIG. 2 is a block diagram showing a transcoding device in the same embodiment.
FIG. 3 is a diagram showing a processing content of a motion information calculation circuit in the same embodiment.
FIG. 4 is a diagram showing processing contents of a DCT coefficient calculation circuit in the same embodiment;
FIG. 5 is a diagram for explaining the effect of the embodiment in comparison with a conventional transcoding apparatus;
FIG. 6 is a diagram illustrating another example of a motion information calculation algorithm.
FIG. 7 is a diagram illustrating another example of a motion information calculation algorithm.
FIG. 8 is a diagram showing a concept of a field in the same embodiment.
FIG. 9 is a diagram showing another example of the motion information calculation algorithm in the embodiment.
FIG. 10 is a diagram showing an example of transcoding performed in the second embodiment of the present invention.
FIG. 11 is a block diagram showing a transcoding apparatus according to a second embodiment of the present invention.
FIG. 12 is a diagram showing processing contents of a motion information calculation unit in the embodiment.
FIG. 13 is a diagram showing processing contents of a motion information calculation unit in the embodiment.
FIG. 14 is a diagram showing processing contents of a motion information calculation unit in the embodiment.
FIG. 15 is a diagram showing a motion information calculation algorithm of a motion information calculation unit in the same embodiment.
FIG. 16 is a flowchart showing an operation of a motion information correction unit in the embodiment.
FIG. 17 is a diagram illustrating a motion information search process of a motion information correction unit in the same embodiment.
FIG. 18 is a diagram illustrating a motion information search process of a motion information correction unit in the same embodiment.
FIG. 19 is a diagram illustrating a motion information search process of a motion information correction unit in the same embodiment.
FIG. 20 is a diagram illustrating an operation example when performing transcoding with frame thinning in the embodiment.
FIG. 21 is a diagram showing an operation example when performing transcoding with frame thinning in the embodiment;
FIG. 22 is a diagram showing an operation example when performing transcoding with frame thinning in the embodiment;
FIG. 23 is a block diagram showing a configuration of a transcoding apparatus according to a third embodiment of the present invention.
FIG. 24 is a block diagram illustrating a general configuration of an encoder and a decoder in a moving image encoding transmission system.
FIG. 25 is a diagram illustrating the operation of the encoder.
FIG. 26 is a diagram illustrating an operation of the decoder.
FIG. 27 shows a conventional transcoding method and transcoding apparatus.
[Explanation of symbols]
2 ... motion information calculation circuit, 5 ... DCT coefficient calculation circuit, 10 ... decoder, 20 ... encoder, 40 ... motion information calculation unit, 50 ... motion information correction unit, 63 ... switching control , 64... Switching section, 70... First transcoding section, 80.

Claims (13)

動き補償を伴ったフレーム間予測符号化アルゴリズムを含む符号化アルゴリズムにより動画像を構成する複数のフレームから得られた第1符号化データを、異なった構成を有する第2符号化データに変換するトランスコーディング方法において、
前記動画像を構成する複数のフレームのうちフレーム間予測符号化の対象となったものの一部のフレームを処理対象フレームとし、処理対象フレームのフレーム間予測符号化において参照された第1参照フレームとは別の第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろう符号化データに相当する第2符号化データを、処理対象フレームを含む1または複数のフレームの第1符号化データから生成するフレーム間予測符号化データ再編集過程を含み、
前記フレーム間予測符号化データ再編集過程は、少なくとも前記処理対象符号化データに含まれている動き情報を用いて、前記第2符号化データに含めるべき動き情報を算出する動き情報算出過程を含み、
前記フレーム間予測符号化データ再編集過程では、フレーム間予測符号化が行われたフレームの一部のフレームを第1参照フレームとし、この第1参照フレームを参照してフレーム間予測符号化が行われたフレームを処理対象フレームとし、第1参照フレームのフレーム間予測符号化において参照されたフレームを第2参照フレームとし、処理対象フレームに対応した第1符号化データである処理対象符号化データと、第1参照フレームに対応した第1符号化データである第1参照符号化データとから、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行ったときに得られる符号化データに対応した第2符号化データを生成し、
前記動き情報算出過程では、処理対象フレームを構成する各マクロブロックを処理対象マクロブロックとし、この処理対象マクロブロックを分割したブロックを処理対象ブロックとし、各処理対象マクロブロックについて、
a.前記処理対象符号化データから当該処理対象マクロブロックに対応した動き情報を求め、
b.該動き情報から前記第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの位置を求め、
c.前記第1参照マクロブロックを分割した複数の第1参照ブロックの各々について、前記第1参照フレームにおける各マクロブロックのうち当該第1参照ブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報を求め、
d.前記aの動き情報と、前記cの複数の第1参照ブロックの各々について求めた各動き情報とを加算することにより、前記第2参照フレームと前記処理対象フレームを分割した各処理対象ブロックとの間の動き補償のための動き情報を算出することを特徴とするトランスコーディング方法。
Transformer that converts first encoded data obtained from a plurality of frames constituting a moving image by an encoding algorithm including an inter-frame predictive encoding algorithm with motion compensation into second encoded data having a different configuration In coding method,
The first reference frame referred to in the inter-frame prediction encoding of the processing target frame, with some frames of the plurality of frames constituting the moving image being the target of the inter-frame prediction encoding as processing target frames Includes the second encoded data corresponding to the encoded data that would be obtained when the inter-frame prediction encoding of the processing target frame is performed with reference to another second reference frame, Including an inter-frame prediction encoded data re-editing process generated from the first encoded data of a plurality of frames,
The inter-frame prediction encoded data re-editing process includes a motion information calculation process for calculating motion information to be included in the second encoded data using at least the motion information included in the processing target encoded data. See
In the inter-frame predictive encoded data re-editing process, a part of the frames subjected to the inter-frame predictive encoding is set as a first reference frame, and the inter-frame predictive encoding is performed with reference to the first reference frame. A frame to be processed as a processing target frame, a frame referred to in inter-frame prediction encoding of the first reference frame as a second reference frame, and processing target encoded data that is first encoded data corresponding to the processing target frame; Encoding obtained when interframe predictive encoding of a processing target frame is performed with reference to a second reference frame from first reference encoded data that is first encoded data corresponding to the first reference frame Generating second encoded data corresponding to the data;
In the motion information calculation process, each macro block constituting the processing target frame is a processing target macro block, a block obtained by dividing the processing target macro block is a processing target block, and each processing target macro block is
a. Obtaining motion information corresponding to the processing target macroblock from the processing target encoded data;
b. Obtaining the position of the first reference macroblock corresponding to the processing target macroblock in the first reference frame from the motion information;
c. For each of a plurality of first reference blocks obtained by dividing the first reference macroblock, it corresponds to a macroblock having the widest area of the portion overlapping with the first reference block among the macroblocks in the first reference frame. Seeking movement information,
d. By adding the motion information of a and the motion information obtained for each of the plurality of first reference blocks of c, the second reference frame and each processing target block obtained by dividing the processing target frame A transcoding method characterized in that motion information for motion compensation is calculated.
動き補償を伴ったフレーム間予測符号化アルゴリズムを含む符号化アルゴリズムにより動画像を構成する複数のフレームから得られた第1符号化データを、異なった構成を有する第2符号化データに変換するトランスコーディング方法において、
前記動画像を構成する複数のフレームのうちフレーム間予測符号化の対象となったものの一部のフレームを処理対象フレームとし、処理対象フレームのフレーム間予測符号化において参照された第1参照フレームとは別の第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろう符号化データに相当する第2符号化データを、処理対象フレームを含む1または複数のフレームの第1符号化データから生成するフレーム間予測符号化データ再編集過程を含み、
前記フレーム間予測符号化データ再編集過程は、少なくとも前記処理対象符号化データに含まれている動き情報を用いて、前記第2符号化データに含めるべき動き情報を算出する動き情報算出過程を含み、
前記フレーム間予測符号化データ再編集過程では、フレーム間予測符号化が行われたフレームの一部のフレームを第1参照フレームとし、この第1参照フレームを参照してフレーム間予測符号化が行われたフレームを処理対象フレームとし、第1参照フレームのフレ ーム間予測符号化において参照されたフレームを第2参照フレームとし、処理対象フレームに対応した第1符号化データである処理対象符号化データと、第1参照フレームに対応した第1符号化データである第1参照符号化データとから、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行ったときに得られる符号化データに対応した第2符号化データを生成し、
前記動き情報算出過程では、処理対象フレームを構成する各マクロブロックを処理対象マクロブロックとし、各処理対象マクロブロックについて、
a.前記処理対象符号化データから当該処理対象マクロブロックに対応した動き情報を求め、
b.該動き情報から前記第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの位置を求め、
c.前記第1参照フレームにおける各マクロブロックのうち前記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報を求め、
d.前記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックから前記第1参照マクロブロックまでの移動に対応した動き情報を求め、
e.前記aおよびcの動き情報を加算し、そこから前記dの動き情報を減算することにより、第2参照フレームと前記処理対象フレームとの間の動き補償のための動き情報を算出することを特徴とするトランスコーディング方法。
Transformer that converts first encoded data obtained from a plurality of frames constituting a moving image by an encoding algorithm including an inter-frame predictive encoding algorithm with motion compensation into second encoded data having a different configuration In coding method,
The first reference frame referred to in the inter-frame prediction encoding of the processing target frame, with some frames of the plurality of frames constituting the moving image being the target of the inter-frame prediction encoding as processing target frames Includes the second encoded data corresponding to the encoded data that would be obtained when the inter-frame prediction encoding of the processing target frame is performed with reference to another second reference frame, Including an inter-frame prediction encoded data re-editing process generated from the first encoded data of a plurality of frames,
The inter-frame prediction encoded data re-editing process includes a motion information calculation process for calculating motion information to be included in the second encoded data using at least the motion information included in the processing target encoded data. See
In the inter-frame predictive encoded data re-editing process, a part of the frames subjected to the inter-frame predictive encoding is set as a first reference frame, and the inter-frame predictive encoding is performed with reference to the first reference frame. the Broken frame processed frame, a reference frame in frame over arm predictive coding of the first reference frame and a second reference frame, processed coded is first encoded data corresponding to the processing object frame Obtained when interframe predictive encoding of the processing target frame is performed with reference to the second reference frame from the data and the first reference encoded data that is the first encoded data corresponding to the first reference frame Generating second encoded data corresponding to the encoded data;
In the motion information calculation process, each macro block constituting the processing target frame is set as a processing target macro block, and for each processing target macro block,
a. Obtaining motion information corresponding to the processing target macroblock from the processing target encoded data;
b. Obtaining the position of the first reference macroblock corresponding to the processing target macroblock in the first reference frame from the motion information;
c. Obtaining motion information corresponding to a macroblock having the widest area of a portion overlapping with the first reference macroblock among the macroblocks in the first reference frame;
d. Obtaining motion information corresponding to the movement from the macroblock having the largest area overlapping the first reference macroblock to the first reference macroblock;
e. The motion information for motion compensation between the second reference frame and the processing target frame is calculated by adding the motion information of a and c and subtracting the motion information of d from there. And transcoding method.
前記動画像を構成する複数のフレームに対応した第1符号化データから一部のフレームに対応した第1符号化データを間引く間引き過程を有し、
前記フレーム間予測符号化データ再編集過程では、間引かれる第1符号化データに対応したフレームを第1参照フレームとし、第1参照フレームを参照してフレーム間予測符号化が行われたフレームを処理対象フレームとし、第1参照フレームのフレーム間予測符号化において参照されたフレームを第2参照フレームとし、第2符号化データを生成することを特徴とする請求項1または2のいずれかの項に記載のトランスコーディング方法。
A thinning-out process of thinning out first encoded data corresponding to some frames from first encoded data corresponding to a plurality of frames constituting the moving image;
In the inter-frame predictive encoded data re-editing process, a frame corresponding to the first encoded data to be thinned out is set as a first reference frame, and a frame subjected to inter-frame predictive encoding with reference to the first reference frame is used. the processing target frame, a reference frame in inter-frame predictive coding of the first reference frame and a second reference frame, any one of claims 1 or 2, characterized in that to generate the second coded data The transcoding method described in 1.
前記フレーム間予測符号化アルゴリズムは、フレームを分割したマクロブロック毎に動き補償を行うとともに、マクロブロックを分割したブロック毎に、フレーム間の差分画像の直交変換を行って符号化データを生成するものであり、
前記フレーム間予測符号化データ再編集過程は、
処理対象符号化データに含まれる動き情報および直交変換係数と第1参照フレームの第1符号化データに含まれる直交変換係数を用いて、処理対象フレームを分割した各処理対象ブロック毎に、第2参照フレームにおける当該処理対象ブロックに対応した参照画像との間の差分の直交変換係数を算出する直交変換係数算出過程を具備することを特徴とする請求項1または2のいずれかの項に記載のトランスコーディング方法。
The inter-frame predictive encoding algorithm performs motion compensation for each macro block obtained by dividing a frame, and generates encoded data by performing orthogonal transformation of a difference image between frames for each block obtained by dividing the macro block. And
The inter-frame predictive encoded data re-editing process includes:
For each processing target block obtained by dividing the processing target frame using the motion information and orthogonal transform coefficient included in the processing target encoded data and the orthogonal transform coefficient included in the first encoded data of the first reference frame, the second The orthogonal transformation coefficient calculation process which calculates the orthogonal transformation coefficient of the difference between the reference image corresponding to the said process target block in a reference frame is provided, The claim of Claim 1 or 2 characterized by the above-mentioned. Transcoding method.
前記直交変換係数算出過程では、処理対象フレームを分割した複数のマクロブロックを各々処理対象マクロブロックとし、各処理対象マクロブロックを分割した複数のブロックを各々処理対象ブロックとし、各処理対象マクロブロックについて、
a.前記処理対象フレームの第1符号化データから当該処理対象マクロブロックに対応した動き情報を求め、
b.該動き情報から前記第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの位置を求め、
c.当該処理対象マクロブロック内における各処理対象ブロックについて、前記第1参照マクロブロックを分割した第1参照ブロックのうち当該処理対象ブロックの当該処理対象マクロブロック内での位置と同じ位置にある第1参照ブロックと重複している部分を有する各ブロックに対応した差分画像の直交変換係数と、当該第1参照ブロックとこれと重複している部分を有する各ブロックとの位置関係と、当該処理対象ブロックに対応した差分画像の直交変換係数とから、当該処理対象ブロックと、第2参照フレーム内の当該処理対象ブロックに対応した参照画像との差分の直交変換係数を算出することを特徴とする請求項4に記載のトランスコーディング方法。
In the orthogonal transform coefficient calculation process, a plurality of macroblocks obtained by dividing the processing target frame are set as processing target macroblocks, a plurality of blocks obtained by dividing each processing target macroblock are set as processing target blocks, and each processing target macroblock is ,
a. Obtaining motion information corresponding to the processing target macroblock from the first encoded data of the processing target frame;
b. Obtaining the position of the first reference macroblock corresponding to the processing target macroblock in the first reference frame from the motion information;
c. For each processing target block in the processing target macroblock, the first reference at the same position as the position of the processing target block in the processing target macroblock among the first reference blocks obtained by dividing the first reference macroblock The orthogonal transformation coefficient of the difference image corresponding to each block having a portion overlapping with the block, the positional relationship between the first reference block and each block having a portion overlapping with the first reference block, and the processing target block from an orthogonal transformation coefficients of the corresponding difference image, claim 4, characterized in that to calculate the corresponding target block, the orthogonal transform coefficients of the difference between the reference image corresponding to the target block in the second reference frame The transcoding method described in 1.
前記直交変換係数算出過程では、処理対象フレームを分割した複数のマクロブロックを各々処理対象マクロブロックとし、各処理対象マクロブロックを分割した複数のブロックを各々処理対象ブロックとし、
a.前記処理対象フレームの第1符号化データから当該処理対象マクロブロックに対応した動き情報を求め、
b.該動き情報から前記第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの位置を求め、
c.前記第1参照フレームにおいて前記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した差分画像の直交変換係数と、当該処理対象マクロブロックに対応した差分画像の直交変換係数とから、当該処理対象マクロブロックと、前記第2参照フレーム内の当該処理対象マクロブロックに対応した参照画像との差分の直交変換係数を算出することを特徴とする請求項4に記載のトランスコーディング方法。
In the orthogonal transform coefficient calculation process, each of a plurality of macro blocks obtained by dividing the processing target frame is set as a processing target macro block, and each of the plurality of blocks obtained by dividing each processing target macro block is set as a processing target block.
a. Obtaining motion information corresponding to the processing target macroblock from the first encoded data of the processing target frame;
b. Obtaining the position of the first reference macroblock corresponding to the processing target macroblock in the first reference frame from the motion information;
c. In the first reference frame, the orthogonal transform coefficient of the difference image corresponding to the macroblock having the widest area of the portion overlapping with the first reference macroblock, and the orthogonal transform coefficient of the difference image corresponding to the processing target macroblock transcoding of claim 4, characterized in that from, calculates the the process target macroblock, an orthogonal conversion coefficient of a difference between the reference image corresponding to the current macroblock of the second reference frame Method.
前記フレームは、複数のフィールドによって構成され、これらの各フィールドを前記処理対象フレームとして、前記第2符号化データを生成することを特徴とする請求項1または2のいずれかの項に記載のトランスコーディング方法。3. The transformer according to claim 1 , wherein the frame includes a plurality of fields, and the second encoded data is generated using each of the fields as the processing target frame. 4. Coding method. 前記動画像を構成する複数のフレームは、複数のピクチャグループからなり、前記フレーム間予測符号化データ再編集過程は、各ピクチャグループがIフレームおよびその後のPフレーム間またはPフレームおよびその後のPフレーム間に複数のBフレームを含む場合に、これらのうちの1つのBフレームを間引き、残ったBフレームをその前のIフレームまたはPフレームのみを参照したPフレームに変換することを特徴とする請求項1または2のいずれかの項に記載のトランスコーディング方法。A plurality of frames constituting the moving image is composed of a plurality of picture groups, predictive coded data re-editing process between the frames, between each group of pictures is an I-frame and subsequent P-frame or P-frame and the subsequent P frame When a plurality of B frames are included, one of these B frames is thinned out, and the remaining B frame is converted into a P frame referring only to the preceding I frame or P frame. Item 3. The transcoding method according to any one of Items 1 and 2. 前記フレーム間予測符号化データ再編集過程は、
前記第1符号化データから前記動画像を構成する複数のフレームの画像データを復元する画像データ復元過程と、
前記動き情報算出過程により算出された動き情報が不正確である場合に画像データ復元過程により復元された画像データを探索することにより当該動き情報に代わる前記第2符号化データに含めるべき動き情報を求める動き情報修正過程と、
前記画像データ復元過程により得られた画像データと前記動き情報算出過程および前記動き情報修正過程により得られた動き情報を用いて符号化を行い、前記第2符号化データを生成する符号化過程と
を具備することを特徴とする請求項1または2のいずれかの項に記載のトランスコーディング方法。
The inter-frame predictive encoded data re-editing process includes:
An image data restoration process for restoring a plurality of frames of image data constituting the moving image from the first encoded data;
When the motion information calculated by the motion information calculation process is inaccurate, the motion information to be included in the second encoded data instead of the motion information is searched by searching the image data restored by the image data restoration process. The desired motion information correction process,
An encoding process for encoding the image data obtained by the image data restoration process, the motion information calculation process, and the motion information obtained by the motion information correction process, and generating the second encoded data; The transcoding method according to claim 1 , further comprising:
前記動き情報修正過程は、
前記第1符号化データを復号することにより、処理対象フレームを構成する各処理対象マクロブロック毎に、前記第1符号化データに含まれる当該処理対象マクロブロックに対応した動き情報を用いた動き補償を行った場合における当該処理対象マクロブロックの画像データと第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの画像データとの差分である第1予測誤差を求める予測誤差復号過程と、
当該処理対象フレームを構成する各処理対象マクロブロック毎に、前記動き情報算出過程により算出した動き情報を用いた動き補償を行って、当該処理対象マクロブロックの画像データと前記第2参照フレームの画像データとの差分である第2予測誤差を算出する予測誤差算出過程と、
前記第2予測誤差が前記第1予測誤差よりも所定値以上大きい処理対象マクロブロックについて、当該処理対象マクロブロックの画像データと前記第2参照フレームに対応した画像デ−タとを用いて、前記動き情報算出過程により得られた動き情報に代わる動き情報を探索する動き情報探索過程と
を含むことを特徴とする請求項9に記載のトランスコーディング方法。
The motion information correction process includes:
Motion compensation using motion information corresponding to the processing target macroblock included in the first encoded data for each processing target macroblock constituting the processing target frame by decoding the first encoded data Prediction error decoding process for obtaining a first prediction error that is a difference between the image data of the processing target macroblock in the first reference frame and the image data of the first reference macroblock corresponding to the processing target macroblock in the first reference frame When,
For each processing target macroblock constituting the processing target frame, motion compensation is performed using the motion information calculated by the motion information calculation process, and the image data of the processing target macroblock and the image of the second reference frame A prediction error calculation process for calculating a second prediction error that is a difference from the data;
For the processing target macroblock whose second prediction error is greater than the first prediction error by a predetermined value or more, using the image data of the processing target macroblock and the image data corresponding to the second reference frame, The transcoding method according to claim 9 , further comprising: a motion information search process that searches for motion information instead of the motion information obtained by the motion information calculation process.
前記動き情報修正過程は、前記動き情報算出過程によって算出された動き情報に基づいて動き情報の探索範囲を定める処理を含み、前記動き情報探索過程では該探索範囲内において動き情報の探索を行うことを特徴とする請求項9に記載のトランスコーディング方法。The motion information correction process includes a process of determining a search range of motion information based on the motion information calculated by the motion information calculation process, and the motion information search process searches for motion information within the search range. The transcoding method according to claim 9 . 動き補償を伴ったフレーム間予測符号化アルゴリズムを含む符号化アルゴリズムにより動画像を構成する複数のフレームから得られた第1符号化データを、異なった構成を有する第2符号化データに変換するトランスコーディング装置において、
前記動画像を構成する複数のフレームのうちフレーム間予測符号化の対象となったものの一部のフレームを処理対象フレームとし、処理対象フレームのフレーム間予測符号化において参照された第1参照フレームとは別の第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろう符号化データに相当する第2符号化データを、処理対象フレームを含む1または複数のフレームの第1符号化データから生成するフレーム間予測符号化データ再編集手段を含み、
前記フレーム間予測符号化データ再編集手段は、少なくとも前記処理対象符号化データに含まれている動き情報を用いて、前記第2符号化データに含めるべき動き情報を算出する動き情報算出手段を含み、
前記フレーム間予測符号化データ再編集手段が、フレーム間予測符号化が行われたフレームの一部のフレームを第1参照フレームとし、この第1参照フレームを参照してフレーム間予測符号化が行われたフレームを処理対象フレームとし、第1参照フレームのフレーム間予測符号化において参照されたフレームを第2参照フレームとし、処理対象フレームに対応した第1符号化データである処理対象符号化データと、第1参照フレームに対応した第1符号化データである第1参照符号化データとから、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行ったときに得られる符号化データに対応した第2符号化データを生成し、
前記動き情報算出手段が、処理対象フレームを構成する各マクロブロックを処理対象マクロブロックとし、この処理対象マクロブロックを分割したブロックを処理対象ブロックとし、各処理対象マクロブロックについて、
a.前記処理対象符号化データから当該処理対象マクロブロックに対応した動き情報を求め、
b.該動き情報から前記第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの位置を求め、
c.前記第1参照マクロブロックを分割した複数の第1参照ブロックの各々について、前記第1参照フレームにおける各マクロブロックのうち当該第1参照ブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報を求め、
d.前記aの動き情報と、前記cの複数の第1参照ブロックの各々について求めた各動き情報とを加算することにより、前記第2参照フレームと前記処理対象フレームを分割した各処理対象ブロックとの間の動き補償のための動き情報を算出することを特徴とするトランスコーディング装置。
Transformer that converts first encoded data obtained from a plurality of frames constituting a moving image by an encoding algorithm including an inter-frame predictive encoding algorithm with motion compensation into second encoded data having a different configuration In the coding device,
The first reference frame referred to in the inter-frame prediction encoding of the processing target frame, with some frames of the plurality of frames constituting the moving image being the target of the inter-frame prediction encoding as processing target frames Includes the second encoded data corresponding to the encoded data that would be obtained when the inter-frame prediction encoding of the processing target frame is performed with reference to another second reference frame, Including inter-frame prediction encoded data re-editing means generated from the first encoded data of a plurality of frames,
The inter-frame prediction encoded data re-editing means includes motion information calculation means for calculating motion information to be included in the second encoded data using at least the motion information included in the processing target encoded data. See
The inter-frame prediction encoded data re-editing means sets a part of the frames subjected to the inter-frame prediction encoding as a first reference frame, and performs the inter-frame prediction encoding with reference to the first reference frame. A frame to be processed as a processing target frame, a frame referred to in inter-frame prediction encoding of the first reference frame as a second reference frame, and processing target encoded data that is first encoded data corresponding to the processing target frame; Encoding obtained when interframe predictive encoding of a processing target frame is performed with reference to a second reference frame from first reference encoded data that is first encoded data corresponding to the first reference frame Generating second encoded data corresponding to the data;
The motion information calculation means uses each macro block constituting the processing target frame as a processing target macro block, sets a block obtained by dividing the processing target macro block as a processing target block, and for each processing target macro block,
a. Obtaining motion information corresponding to the processing target macroblock from the processing target encoded data;
b. Obtaining the position of the first reference macroblock corresponding to the processing target macroblock in the first reference frame from the motion information;
c. For each of a plurality of first reference blocks obtained by dividing the first reference macroblock, it corresponds to a macroblock having the widest area of the portion overlapping with the first reference block among the macroblocks in the first reference frame. Seeking movement information,
d. By adding the motion information of a and the motion information obtained for each of the plurality of first reference blocks of c, the second reference frame and each processing target block obtained by dividing the processing target frame A transcoding apparatus that calculates motion information for motion compensation between the two.
動き補償を伴ったフレーム間予測符号化アルゴリズムを含む符号化アルゴリズムにより動画像を構成する複数のフレームから得られた第1符号化データを、異なった構成を有する第2符号化データに変換するトランスコーディング装置において、
前記動画像を構成する複数のフレームのうちフレーム間予測符号化の対象となったものの一部のフレームを処理対象フレームとし、処理対象フレームのフレーム間予測符号化において参照された第1参照フレームとは別の第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行った場合に得られるであろう符号化データに相当する第2符号化データを、処理対象フレームを含む1または複数のフレームの第1符号化データから生成するフレーム間予測符号化データ再編集手段を含み、
前記フレーム間予測符号化データ再編集手段は、少なくとも前記処理対象符号化データに含まれている動き情報を用いて、前記第2符号化データに含めるべき動き情報を算出する動き情報算出手段を含み、
前記フレーム間予測符号化データ再編集手段が、フレーム間予測符号化が行われたフレームの一部のフレームを第1参照フレームとし、この第1参照フレームを参照してフレーム間予測符号化が行われたフレームを処理対象フレームとし、第1参照フレームのフレーム間予測符号化において参照されたフレームを第2参照フレームとし、処理対象フレーム に対応した第1符号化データである処理対象符号化データと、第1参照フレームに対応した第1符号化データである第1参照符号化データとから、第2参照フレームを参照して処理対象フレームのフレーム間予測符号化を行ったときに得られる符号化データに対応した第2符号化データを生成し、
前記動き情報算出手段が、処理対象フレームを構成する各マクロブロックを処理対象マクロブロックとし、各処理対象マクロブロックについて、
a.前記処理対象符号化データから当該処理対象マクロブロックに対応した動き情報を求め、
b.該動き情報から前記第1参照フレームにおける当該処理対象マクロブロックに対応した第1参照マクロブロックの位置を求め、
c.前記第1参照フレームにおける各マクロブロックのうち前記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックに対応した動き情報を求め、
d.前記第1参照マクロブロックと重複している部分の面積が最も広いマクロブロックから前記第1参照マクロブロックまでの移動に対応した動き情報を求め、
e.前記aおよびcの動き情報を加算し、そこから前記dの動き情報を減算することにより、第2参照フレームと前記処理対象フレームとの間の動き補償のための動き情報を算出することを特徴とするトランスコーディング装置。
Transformer that converts first encoded data obtained from a plurality of frames constituting a moving image by an encoding algorithm including an inter-frame predictive encoding algorithm with motion compensation into second encoded data having a different configuration In the coding device,
The first reference frame referred to in the inter-frame prediction encoding of the processing target frame, with some frames of the plurality of frames constituting the moving image being the target of the inter-frame prediction encoding as processing target frames Includes the second encoded data corresponding to the encoded data that would be obtained when the inter-frame prediction encoding of the processing target frame is performed with reference to another second reference frame, Including inter-frame prediction encoded data re-editing means generated from the first encoded data of a plurality of frames,
The inter-frame prediction encoded data re-editing means includes motion information calculation means for calculating motion information to be included in the second encoded data using at least the motion information included in the processing target encoded data. See
The inter-frame prediction encoded data re-editing means sets a part of the frames subjected to the inter-frame prediction encoding as a first reference frame, and performs the inter-frame prediction encoding with reference to the first reference frame. A frame to be processed as a processing target frame, a frame referred to in inter-frame prediction encoding of the first reference frame as a second reference frame, and processing target encoded data that is first encoded data corresponding to the processing target frame ; Encoding obtained when interframe predictive encoding of a processing target frame is performed with reference to a second reference frame from first reference encoded data that is first encoded data corresponding to the first reference frame Generating second encoded data corresponding to the data;
The motion information calculating means sets each macroblock constituting the processing target frame as a processing target macroblock, and for each processing target macroblock,
a. Obtaining motion information corresponding to the processing target macroblock from the processing target encoded data;
b. Obtaining the position of the first reference macroblock corresponding to the processing target macroblock in the first reference frame from the motion information;
c. Obtaining motion information corresponding to a macroblock having the widest area of a portion overlapping with the first reference macroblock among the macroblocks in the first reference frame;
d. Obtaining motion information corresponding to the movement from the macroblock having the largest area overlapping the first reference macroblock to the first reference macroblock;
e. The motion information for motion compensation between the second reference frame and the processing target frame is calculated by adding the motion information of a and c and subtracting the motion information of d from there. Transcoding device.
JP2000266346A 1999-09-10 2000-09-01 Transcoding method and transcoding apparatus for moving image encoded data Expired - Fee Related JP4153150B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000266346A JP4153150B2 (en) 1999-09-10 2000-09-01 Transcoding method and transcoding apparatus for moving image encoded data

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP25811999 1999-09-10
JP11-276557 1999-09-29
JP27655799 1999-09-29
JP11-258119 1999-09-29
JP2000266346A JP4153150B2 (en) 1999-09-10 2000-09-01 Transcoding method and transcoding apparatus for moving image encoded data

Publications (2)

Publication Number Publication Date
JP2001169295A JP2001169295A (en) 2001-06-22
JP4153150B2 true JP4153150B2 (en) 2008-09-17

Family

ID=27334704

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000266346A Expired - Fee Related JP4153150B2 (en) 1999-09-10 2000-09-01 Transcoding method and transcoding apparatus for moving image encoded data

Country Status (1)

Country Link
JP (1) JP4153150B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9479660B2 (en) 2009-08-27 2016-10-25 Brother Kogyo Kabushiki Kaisha Image recording apparatus
US9663319B2 (en) 2009-08-27 2017-05-30 Brother Kogyo Kabushiki Kaisha Image recording apparatus

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4622077B2 (en) * 2000-10-11 2011-02-02 ソニー株式会社 Image processing apparatus and image processing method
JP2002247588A (en) * 2001-02-21 2002-08-30 Sony Corp Method and device for transforming moving vector
JP4403737B2 (en) 2003-08-12 2010-01-27 株式会社日立製作所 Signal processing apparatus and imaging apparatus using the same
US20070201554A1 (en) * 2006-02-24 2007-08-30 Samsung Electronics Co., Ltd. Video transcoding method and apparatus
JP4577292B2 (en) * 2006-10-03 2010-11-10 日本ビクター株式会社 Motion information conversion apparatus and motion information conversion program for moving picture encoding

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9479660B2 (en) 2009-08-27 2016-10-25 Brother Kogyo Kabushiki Kaisha Image recording apparatus
US9663319B2 (en) 2009-08-27 2017-05-30 Brother Kogyo Kabushiki Kaisha Image recording apparatus
US10099883B2 (en) 2009-08-27 2018-10-16 Brother Kogyo Kabushiki Kaisha Image recording apparatus

Also Published As

Publication number Publication date
JP2001169295A (en) 2001-06-22

Similar Documents

Publication Publication Date Title
US7359558B2 (en) Spatial scalable compression
KR100592651B1 (en) Transcoding
US6912253B1 (en) Method and apparatus for transcoding coded video image data
JP3720875B2 (en) Transcoding method and apparatus
KR0161551B1 (en) Method and apparatus for editing or mixing compressed pictures
JP4373702B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, moving picture encoding program, and moving picture decoding program
JP3861698B2 (en) Image information encoding apparatus and method, image information decoding apparatus and method, and program
JP2006279573A (en) Encoder and encoding method, and decoder and decoding method
US20060133475A1 (en) Video coding
US6961377B2 (en) Transcoder system for compressed digital video bitstreams
US20080095239A1 (en) Method for video frame rate conversion
JP4153150B2 (en) Transcoding method and transcoding apparatus for moving image encoded data
KR100203281B1 (en) Moving picture decorder based on forced one-direction motion compensation
JP4164903B2 (en) Video code string conversion apparatus and method
JP4361665B2 (en) Transcoding method and transcoding apparatus for moving image encoded data
JP2001359103A (en) Moving picture data coder, moving picture data transmission method and moving picture data decoder
JPH1023415A (en) Method and device for encoding and decoding picture
JP2004007736A (en) Device and method for decoding image
JP2004040446A (en) Image-coding device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070220

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080408

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080609

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080703

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130711

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees