JP4134572B2 - Compressed video re-encoding program, re-encoding device and method - Google Patents

Compressed video re-encoding program, re-encoding device and method Download PDF

Info

Publication number
JP4134572B2
JP4134572B2 JP2002036716A JP2002036716A JP4134572B2 JP 4134572 B2 JP4134572 B2 JP 4134572B2 JP 2002036716 A JP2002036716 A JP 2002036716A JP 2002036716 A JP2002036716 A JP 2002036716A JP 4134572 B2 JP4134572 B2 JP 4134572B2
Authority
JP
Japan
Prior art keywords
signal
frequency
encoding
discrete cosine
error signal
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
JP2002036716A
Other languages
Japanese (ja)
Other versions
JP2003244705A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2002036716A priority Critical patent/JP4134572B2/en
Publication of JP2003244705A publication Critical patent/JP2003244705A/en
Application granted granted Critical
Publication of JP4134572B2 publication Critical patent/JP4134572B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は圧縮動画像の再符号化技術に係り、特に入力した圧縮動画ビットストリームの符号量を低減して出力する圧縮動画像再符号化プログラム、方法および装置に関する。
【0002】
【従来の技術】
ディジタル放送システムやサービス等において動画像信号を伝送・蓄積する場合、多くの動画像信号は圧縮符号化され伝送・蓄積される。近年では動画像信号の圧縮符号化方式としてISO/ICE IS13818-2(MPEG-2 VIDEO)等が規格化され、ディジタル放送システムやサービス等に用いられている。
【0003】
放送局や家庭では、所定のビットレートで圧縮符号化された圧縮動画ビットストリームを異なるビットレートの圧縮動画ビットストリームに再符号化し、伝送あるいは蓄積するアプリケーションや装置が期待されている。例えばディジタル動画像信号録画装置における長時間録画機能があげられる。放送局から家庭に分配される圧縮動画ビットストリームは所定のビットレートで符号化されている。これを視聴者が長時間録画を目的とし、限られた記憶容量に録画する場合、分配時のビットレートよりも低いビットレートで圧縮動画ビットストリームを再符号化する必要がある。
【0004】
以下、このようなビットレート変換を行う従来の再符号化装置について、MPEG-2 VIDEOに従って圧縮符号化されている圧縮動画ビットストリーム(以下、MPEG-2ビットストリームという。)の場合を例にとって説明する。
【0005】
MPEG-2 VIDEOでは離散コサイン変換とフレーム間予測を組み合わせたハイブリッド符号化方式が採用されており、I、P、Bの3つのピクチャタイプが存在する。Iピクチャはフレーム内予測だけを用いて符号化されるピクチャであり、Pピクチャはフレーム内予測および前方向フレーム間予測を用いて符号化されるピクチャであり、Bピクチャはフレーム内予測および双方向フレーム間予測(前方向、逆方向予測も含む。)を用いて符号化されるピクチャである。
【0006】
IおよびPピクチャはフレーム間予測の参照画像として用いられる。また、MPEG-2 VIDEOの符号化は、複数のブロックで構成されるマクロブロックという単位ごとに行われる。1ブロックは8画素×8ラインもしくは8×8離散コサイン変換係数で構成される。
【0007】
図35に基本的な再符号化装置を示す。再符号化装置はMPEG-2ビットストリームの復号器と符号化器とを直列に接続した構成となる。復号器は、MPEG-2ビットストリームを画像信号に復号し、復号した画像信号と再利用可能な符号化情報とを符号化器へ供給する。
【0008】
可変長復号器201は、入力したMPEG-2ビットストリームから、符号化モードや動きベクトルなどのマクロブロック符号化情報およびレベル値を復号すると共に、復号したレベル値を逆量子化器202へ供給する。ここで、レベル値は低周波成分から順にスキャニングされて1次元情報に変換されているので、可変長復号器201では2次元情報への変換も行う。逆量子化器202はレベル値に対して逆量子化を行い、離散コサイン変換係数DCT[R1(n)]を求め、逆離散コサイン変換器203へ供給する。以下、可変長復号器201と逆量子化器202とをまとめて変換係数復号部21という。
【0009】
ここで、DCT[R1(n)]は予測誤差信号R1(n)を離散コサイン変換して得られる係数を表し、添え字‘1’は復号器で得られた信号であることを表し、‘n’は画像信号系列内の画像信号の時間方向の番号を表す(以下、同様である)。逆離散コサイン変換器203は、離散コサイン変換係数DCT[R1(n)]に逆離散コサイン変換を行うことで予測誤差信号R1(n)を求め、加算器204へ供給する。MPEG-2 VIDEOでは離散コサイン変換および逆離散コサイン変換は8×8のブロック単位で行われる。
【0010】
動き補償器205は、マクロブロックの符号化方式がフレーム間予測であれば、既に復号した画像信号I1(n−1)と可変長復号器201から供給される動きベクトルVとを用いて動き補償MCを行い、予測画像信号MC[I1(n−1),V]を求めて加算器204へ供給する。
【0011】
加算器204は、フレーム間予測であれば、予測誤差信号R1(n)と予測画像信号MC[I1(n-1), V]とを加算して画像信号I1(n)を求め、フレーム内予測であれば、予測誤差信号R1(n)を画像信号I1(n)とする。復号された画像信号I1(n)は符号化器へ供給される。また、ピクチャタイプがI、Pピクチャの場合は、画像信号I1(n)は参照画像として、メモリ206で遅延され動き補償器205へ供給される。
【0012】
符号化器は、復号器で復号した画像信号I1(n)の再符号化を行う。動き補償器208は、フレーム間予測であれば、既に復号した画像信号I2(n-1)と動きベクトルVとを用いて動き補償MCを行い、予測画像信号MC[I2(n-1), V]を求め、減算器207へ供給する。また、ピクチャタイプがPピクチャの場合は、予測画像信号MC[I2(n-1), V]を加算器214へ供給する。
【0013】
減算器207は、フレーム間予測であれば、復号した画像信号I1(n)から第2の予測画像信号MC[I2(n-1), V]を減算して予測誤差信号R2(n)を求め、離散コサイン変換器209へ供給する。また、フレーム内予測であれば、復号した画像信号I1(n)を予測誤差信号R2(n)として離散コサイン変換器209へ供給する。ここで、添え字‘2’は符号化器で得られた信号であることを表し、‘n’は画像信号系列内の画像信号の時間方向の番号を表す(以下、同様である)。
【0014】
離散コサイン変換器209は、予測誤差信号R2(n)に離散コサイン変換を行うことで離散コサイン変換係数DCT[R2(n)]を求め、再量子化器210へ供給する。再量子化器210は、離散コサイン変換係数DCT[R2(n)]に量子化を行うことでレベル値を求め、可変長符号化器211へ供給する。可変長符号化器211はレベル値およびマクロブロック符号化情報を符号化し、ビットレート変換したMPEG-2ビットストリームを生成して出力する。
【0015】
また、ピクチャタイプがI、Pピクチャの場合は、以下の処理を行うことで画像信号I2(n)を復号し参照画像を生成する。逆量子化器212は再量子化した離散コサイン変換係数に逆量子化を行うことで離散コサイン変換係数DCT[R2(n)+E2(n)]を求め、逆離散コサイン変換器213へ供給する。以下、再量子化器210、可変長符号化器211および逆量子化器212の構成をまとめて変換係数符号化部22という。
【0016】
ここで、量子化と逆量子化は可逆変換ではないため、逆量子化器で求めた離散コサイン変換係数には誤差DCT[E2(n)]が含まれる。逆離散コサイン変換器213は、離散コサイン変換係数DCT[R2(n)+E2(n)]に逆離散コサイン変換を行うことで予測誤差信号R2(n)+E2(n)を求め、加算器214へ供給する(以下、E2(n)を誤差信号という。)。
【0017】
加算器214は、フレーム間予測であれば、動き補償器208によって得られた予測画像信号MC[I2(n-1), V]と予測誤差信号R2(n)+E2(n)とを加算して画像信号I2(n)を求め、フレーム内予測であれば、予測誤差信号R2(n)+E2(n)を画像信号I2(n)とする。画像信号I2(n)はメモリ215で遅延され動き補償器208へ供給される。
【0018】
上述した基本的構成の再符号化装置を用いることで、ビットレート変換したMPEG-2ストリームを生成できるが、処理量が膨大なこと、復号した画像信号を蓄積するためのメモリが必要であるという問題がある。
【0019】
そこで、再符号化装置を簡易化した従来技術が、特開平8−51631号公報、米国特許5,623,312号、特開2001−186519号公報、および特許第3166501号などに記載されている。ここでは、特開平8−51631号公報および特開2001−186519号公報に記載された圧縮動画像再符号化装置を例として説明する。
【0020】
図36は、特開平8−51631号公報に記載された再符号化装置の一例を示す回路図である。この再符号化装置には、図35と同様に変換係数復号部21が設けられ、入力したMPEG-2ビットストリームから離散コサイン変換係数DCT[R1(n)]を求め、減算器301へ供給する。動き補償器306は、フレーム間予測であれば、既に復号した誤差信号E2(n-1)と変換係数復号部21から供給される動きベクトルVを用いて動き補償MCを行い、誤差予測信号MC[E2(n-1),V]を求め、離散コサイン変換器302へ供給する。誤差信号E2(n-1)はメモリ305に蓄積されている。以下、メモリ305および動き補償器306の構成をまとめて誤差信号動き補償部31という。
【0021】
離散コサイン変換器302は、フレーム間予測であれば、誤差予測信号MC[E2(n-1),V]に離散コサイン変換を行うことで離散コサイン変換係数DCT[MC[E2(n-1),V]]を求め、減算器301へ供給する。
【0022】
減算器301は、フレーム間予測であれば、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して離散コサイン変換係数DCT[R2(n)]を求め、変換係数符号化部22へ供給する。また、フレーム内予測であれば、離散コサイン変換係数DCT[R1(n)]を離散コサイン変換係数DCT[R2(n)]として、変換係数符号化部22へ供給する。なお、変換係数符号化部22は、上述した図35の変換係数符号化部22と同様である。
【0023】
変換係数符号化部22は、離散コサイン変換係数DCT[R2(n)]から、ビットレート変換したMPEG-2ビットストリームを生成して出力する。
【0024】
また、ピクチャタイプがI、Pピクチャの場合は、以下の処理を行うことで誤差信号E2(n)を復号する。変換係数符号化部22は、離散コサイン変換係数DCT[R2(n)+E2(n)]を減算器303へ供給する。減算器303は、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R2(n)]を減算して離散コサイン変換係数DCT[E2(n)]を求め、逆離散コサイン変換器304へ供給する。逆離散コサイン変換器304は、離散コサイン変換係数DCT[E2(n)]に逆離散コサイン変換を行うことで誤差信号E2(n)を求め、誤差信号動き補償部31へ供給する。
【0025】
図37は、特開2001−186519公報に記載された従来の再符号化装置の一例を示す回路図である。この再符号化装置は、米国特許5,623,312号に記載の再符号化装置に、離散コサイン変換係数分布推定部404および差分画素分布推定部407が追加された構成となっている。
【0026】
具体的には、図37に示すように、変換係数復号部21は、入力したMPEG-2ビットストリームから離散コサイン変換係数DCT[R1(n)]を求め、加算器401へ供給する。また、ピクチャタイプがI、Pピクチャの場合は、離散コサイン変換係数DCT[R1(n)]を減算器403へ供給する。
【0027】
誤差信号動き補償部31は、フレーム間予測であれば、既に復号した誤差信号-E2(n-1)と動きベクトルVを用いて動き補償MCを行い、誤差予測信号MC[-E2(n-1),V]を求め、差分画素分布推定部407へ供給する。また、ピクチャタイプがI、Pピクチャの場合は、加算器406へ供給する。
【0028】
差分画素分布推定部407は、フレーム間予測であれば、誤差予測信号MC[-E2(n-1),V]の値を調べ、有意な画素が存在しない場合には、全ての誤差予測信号の値を零に設定し、離散コサイン変換402へ供給する。離散コサイン変換器402は、フレーム間予測であれば、誤差予測信号MC[-E2(n-1),V]に離散コサイン変換を行うことで、離散コサイン変換係数DCT[MC[-E2(n-1),V]]を求め、加算器401へ供給する。
【0029】
加算器401は、フレーム間予測であれば、離散コサイン変換係数DCT[R1(n)]とDCT[MC[-E2(n-1),V]]とを加算して離散コサイン変換係数DCT[R2(n)]を求め、変換係数符号化部22へ供給する。また、フレーム内予測であれば、離散コサイン変換係数DCT[R1(n)]を離散コサイン変換係数DCT[R2(n)]とし、変換係数符号化部22へ供給する。
【0030】
変換係数符号化部22は、ビットレート変換したMPEG-2ビットストリームを生成して出力する。また、ピクチャタイプがI、Pピクチャの場合は、以下の処理を行うことで誤差信号-E2(n)を復号する。
【0031】
変換係数符号化部22は、離散コサイン変換係数DCT[R2(n)+E2(n)]を減算器403へ供給する。減算器403は、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[R2(n)+E2(n)]を減算して、離散コサイン変換係数DCT[-E2(n)-MC[-E2(n-1),V]]を求め、離散コサイン変換係数分布推定部404に供給する。
【0032】
離散コサイン変換係数分布推定部404は、離散コサイン変換係数DCT[-E2(n)-MC[-E2(n-1),V]]の分布を調べ、有意な係数が存在しない場合には、全ての係数を零に設定し、逆離散コサイン変換405へ供給する。逆離散コサイン変換405は、離散コサイン変換係数DCT[-E2(n)-MC[-E2(n-1),V]]に逆離散コサイン変換を行うことで誤差信号-E2(n)-MC[-E2(n-1),V]を求め、加算器406に供給する。加算器406は、フレーム間予測であれば、誤差予測信号MC[-E2(n-1),V]と誤差信号-E2(n)-MC[-E2(n-1),V]とを加算して誤差信号-E2(n)を求め、誤差信号動き補償部31へ供給し、フレーム内予測であれば、誤差信号-E2(n)-MC[-E2(n-1),V]を誤差信号-E2(n)とし、誤差信号動き補償部31へ供給する。
【0033】
このように、誤差信号の動き補償を用いた再符号化装置では、処理量の増加や必要となるメモリ容量を抑えることができ、図35の再符号化装置と等価な処理を実現できる。
【0034】
【発明が解決しようとする課題】
しかしながら、上記従来の再符号化装置は効率的な処理を実現できない。入力圧縮動画ビットストリームの符号化情報が出力圧縮動画ビットストリームに複製されたり復号処理に用いたりされてはいるものの、再符号化処理の高速化には用いられておらず、また、圧縮動画ビットストリームの特性を考慮していないためである。
【0035】
特開2001−186519号公報に記載された再符号化装置では、離散コサイン変換係数の分布、誤差予測信号の値を調べているが、入力圧縮動画ビットストリームの符号化情報は用いていない。また、分布推定部において有意でないと判断された場合は、全ての離散コサイン変換係数は零に設定されてしまう。その結果、本来の結果とは異なる結果が得られることになる。
【0036】
本発明の目的は、画質劣化を抑制し、高速かつ効率的にビットレート変換を実現する再符号化プログラム、再符号化装置および方法を提供することにある。
【0037】
【課題を解決するための手段】
本発明の第1実施形態によれば、
動き補償および量子化を用いた所定符号化方式の圧縮動画ビットストリームを入力として、少なくとも量子化された信号を逆量子化して復号信号を計算する第1ステップと、
蓄積した過去の誤差信号を動き補償して補正信号を計算する第2ステップと、
前記復号信号から前記補正信号を減算して再符号化する信号を計算し、前記再符号化する信号を再量子化し、再度符号化変換して圧縮動画ビットストリームを出力する第3ステップと、
再量子化による誤差である現在の前記誤差信号を計算して蓄積する第4ステップと、
を有する圧縮動画ビットストリームの再符号化処理をコンピュータに実行させるプログラムにおいて、
前記誤差信号の計算方法として、
前記再符号化する信号と、前記再量子化した信号を逆量子化した第2復号信号と、を用いて前記誤差信号を求める第1の計算方法と、
前記復号信号と、前記第2復号信号と、前記補正信号と、を用いて前記誤差信号を求める第2の計算方法と、
が用意され、
前記第1ステップで得られる前記復号信号の信号値および分布情報と、前記第4ステップで得られる前記第2復号信号の信号値および分布情報と、の少なくとも一方を計測する第5ステップと、
前記第5ステップで計測された信号値および分布情報の少なくとも一方に基づいて前記複数の計算方法の演算量を推定する第6ステップと、
前記第6ステップの推定結果に従って最も演算量の少ない計算方法を選択し、前記誤差信号を計算する第7ステップと、
を含むことを特徴とする。
【0038】
本発明の第2実施形態によれば、上述の第1実施形態において、前記所定符号化方式は周波数領域への変換処理を組み合わせた符号化方式であり、前記復号信号は空間領域の画像信号を周波数係数で表現した周波数復号信号であり、前記補正信号は周波数係数で表現される周波数補正信号であり、前記再符号化する信号は周波数係数で表現される周波数符号化信号であり、前記第2復号信号は周波数係数で表現される周波数第2復号信号であり、前記周波数補正信号は、過去の蓄積した空間領域の第1誤差信号である空間第1誤差信号と、当該空間第1誤差信号を周波数変換した周波数第1誤差信号とのいずれかを用いて計算されることを特徴とする。
【0039】
ここで、前記信号値および分布情報は前記参照する信号の信号値および分布情報であり、周波数係数が零である位置の情報、複数の周波数係数が零である位置の情報、あるいは周波数係数の非零係数が複数個の予め設定された周波数領域に属するかの情報であってもよい。
【0040】
第1実施形態および第2実施形態によれば、信号および制御情報の少なくとも一方を参照して信号値および分布情報を計測し、その信号値および分布情報を用いて補正信号を計算する。そのため、補正信号の計算に必要な演算量を削減できる。
【0041】
本発明の第3実施形態、第6実施形態および第7実施形態によれば、上記第2実施形態において、周波数補正信号は、少なくとも、前記周波数符号化信号と前記周波数第2復号信号とを用いて現在の前記周波数第1誤差信号および前記空間第1誤差信号の一方を計算するステップを含む第1の計算方法と、前記周波数復号信号と、前記周波数第2復号信号と、蓄積した過去の前記周波数第1誤差信号および前記空間第1誤差信号の一方と、を用いて現在の前記周波数第1誤差信号および前記空間第1誤差信号の一方を計算するステップを含む第2の計算方法と、を含む複数の計算方法によって計算可能であり、
前記複数の計算方法の各演算量を推定するステップと、前記推定結果に従って最も演算量の少ない計算方法を選択し、前記周波数補正信号を計算するステップと、を含むことを特徴とする。
【0042】
複数の周波数補正信号の計算方法から最も演算量の少ない計算方法を選択するために、単一の周波数補正信号の計算よりも処理量を削減できる。
【0043】
本発明の第4実施形態によれば、再符号化処理または復号処理の単位毎に、前記復号信号が全て零であるかを計測するステップと、全て零であれば、前記再符号化する信号を零として再符号化し前記補正信号を現在の前記第1誤差信号として蓄積するステップと、を含むことを特徴とする。
【0044】
本発明の第5実施形態および第6実施形態によれば、第2実施形態において、再符号化処理または復号処理単位毎に、前記復号信号が全て零であるかを計測するステップと、全て零であれば、前記再符号化する信号を零として再符号化し、前記周波数補正信号を現在の前記周波数第1誤差信号および前記空間第1誤差信号の一方で蓄積するステップと、を含むことを特徴とする。
【0045】
また、前記周波数復号信号と、前記周波数第2復号信号と、蓄積した過去の前記周波数第1誤差信号または前記空間第1誤差信号と、を用いて、現在の前記周波数第1誤差信号または前記空間第1誤差信号を計算してもよい。
【0046】
また、前記周波数符号化信号と前記周波数第2復号信号とを用いて、現在の前記周波数第1誤差信号または前記空間第1誤差信号を計算してもよい。
【0047】
第4実施形態、第5実施形態および第6実施形態によれば、信号零判定手段を備えており、復号信号が全て零であると判定された場合、通常の再符号化よりも簡略な方式を適用する。そのため、従来の再符号化方法に比べ演算量を削減できる。
【0048】
本発明の第8実施形態によれば、第2実施形態において、前記周波数符号化信号の計算方法が2種類存在し、前記2種類の計算方法は、前記周波数復号信号と前記周波数補正信号とを用いて周波数符号化信号を計算する方法、および前記周波数復号信号を用いて周波数符号化信号を計算する方法であり、前記2種類の計算方法を、再符号化処理に依存しない処理単位ごとに選択するステップを含むことを特徴とする。
【0049】
第8実施形態は、ある定めた処理単位ごとにのみ、前記周波数復号信号と前記周波数補正信号とを用いて周波数符号化信号を計算する。そのため、前記周波数復号信号を用いて周波数符号化信号を計算する場合は、演算量を削減できる。
【0050】
本発明の第9実施形態によれば、第2実施形態において、符号化処理または復号処理単位毎に、前記再量子化を行う量子化幅が前記逆量子化を行う量子化幅以下、または、前記再量子化を行う量子化幅と前記逆量子化を行う量子化幅の差の絶対値が閾値以下かを判定するステップと、前記判定条件が成立した場合に、前記逆量子化を行う量子化幅を前記再量子化を行う量子化幅として、前記周波数復号信号を前記周波数符号化信号として再符号化し、前記周波数補正信号を現在の前記周波数第1誤差信号および前記空間第1誤差信号の一方として蓄積するステップと、を含むことを特徴とする。
【0051】
第9実施形態では、再量子化を行う量子化幅および逆量子化を行う量子化幅の判定条件の判定結果に応じて、前記周波数符号化信号を計算する。そして前記判定条件が成立した場合は、通常の再符号化よりも簡略な方式を適用する。そのため、従来の再符号化方法に比べ演算量を削減できる。
【0052】
【発明の実施の形態】
以下、本発明の実施形態について図面を参照して詳細に説明する。
【0053】
1)第1実施形態
1−1)構成
図1を参照すると、本発明による再符号化装置の第1実施形態は、復号処理部11、符号化処理部12、信号補正部13、および信号分布測定部14を含む。
【0054】
復号処理部11は、入力した圧縮動画ビットストリームから、少なくとも量子化された信号を逆量子化して復号信号を計算し、符号化処理部12へ供給する。また、復号信号を現在の第1誤差信号の計算に用いる場合は、信号補正部13および信号分布計測部14へ供給し、復号時に得られた制御情報を信号分布計測部14へ供給する。
【0055】
符号化処理部12は、復号信号と信号補正部13から供給される補正信号とを用いて再符号化する信号を計算し、再符号化する信号を再量子化し、再度符号化して圧縮動画ビットストリームを出力する。また、再符号化する信号または再量子化した信号を逆量子化した第2復号信号を現在の第1誤差信号の計算に用いる場合は、信号補正部13および信号分布計測部14へ供給し、符号化時に得られた制御情報を信号分布計測部14へ供給する。
【0056】
信号分布計測部14は、復号時および再符号化時の少なくとも一方で得られた制御情報と、復号信号と、補正信号と、再符号化する信号と、第2復号信号と、復号信号、補正信号、再符号化する信号および第2復号信号の少なくとも1つを用いて計算した第2誤差信号と、のうち少なくとも1つの信号を参照して、信号値および分布情報の少なくとも一方を計測し、信号補正部13における補正信号の計算を制御する。ここで、信号値は、画像信号であれば画素値、周波数信号であれば周波数係数の値である。
【0057】
信号補正部13は、蓄積した過去の第1誤差信号を用いて信号分布計測部14の制御に従い補正信号を計算し、符号化処理部12へ供給する。また、補正信号を現在の第1誤差信号の計算に用いる場合は、信号補正部13および信号分布計測部14へ供給する。また、復号信号、補正信号、再符号化する信号または第2復号信号を用いて、信号分布計測部14の制御に従い、現在の第1誤差信号を計算および蓄積し前記補正信号の計算に供する。
【0058】
1−2)動作
図2は、本発明による第1実施形態の動作を示すフローチャートである。
【0059】
まずステップS101では、入力した圧縮動画ビットストリームから、少なくとも量子化された信号を逆量子化して復号信号を計算する。また、復号信号が現在の第1誤差信号の計算に用いられる場合は復号時の制御情報を作成する。
【0060】
続いて、ステップS102では、信号値または分布情報、および蓄積した過去の第1誤差信号を用いて補正信号を計算し、ステップS103へ移る。
【0061】
ステップS103では、復号信号および補正信号を用いて再符号化する信号を計算し、次に再符号化する信号を再量子化し、再度符号化して圧縮動画ビットストリームを出力する。また、第2復号信号が現在の第1誤差信号の計算に用いられる場合は符号化時の制御情報を作成する。
【0062】
続いて、ステップS104では、復号時および再符号化時の少なくとも一方で得られた制御情報と、復号信号と、補正信号と、再符号化する信号と、第2復号信号と、復号信号、補正信号、再符号化する信号および第2復号信号の少なくとも1つを用いて計算した第2誤差信号と、のうち少なくとも1つの信号を参照して、信号値および分布情報の少なくとも一方を計測する。
【0063】
ステップS105では、信号値および分布情報と、復号信号、補正信号、再符号化する信号および第2復号信号の少なくとも1つを用いて計算した現在の第1誤差信号とを蓄積し、再符号化処理を終了する。
【0064】
上述したように、本発明による第1実施形態では、信号および制御情報を参照して、信号値および分布情報の少なくとも一方を計測する手段、および、信号値および分布情報を用いて補正信号を計算する手段を備えている。そのため、補正信号の計算に必要な演算量を削減できる。
【0065】
2)第2実施形態
本発明による第2実施形態では、上記第1実施形態と、圧縮動画ビットストリームの符号化方式として周波数空間への変換処理と、を組み合わせていることを特徴としている。以下、周波数変換処理として離散コサイン変換(DCT)を用いた再符号化装置を例示するが、本発明は、これに限定されるものではなく、アダマール変換やウェーブレット変換などの周波数変換であれば適用可能であることはいうまでもない。
【0066】
2−1)第1構成例
図3を参照すると、本発明による再符号化装置の第2実施形態では、変換係数復号部51、変換係数符号化部52、誤差信号動き補償部31、減算器503、減算器506、変換係数分布計測器507、逆離散コサイン変換器508、加算器509、および離散コサイン変換器510を含む。
【0067】
変換係数復号部51は、入力した圧縮動画ビットストリームから離散コサイン変換係数DCT[R1(n)]を求め、減算器503へ供給する。また、画像信号がフレーム間予測で参照される場合は、離散コサイン変換係数DCT[R1(n)]を減算器506へ供給し、離散コサイン変換係数DCT[R1(n)]の分布や係数値などの変換係数情報を変換係数分布計測器507へ供給する。
【0068】
なお、従来技術で説明した図35に示す変換係数復号部21と比較すると、図3に示す第2実施形態の変換係数復号部51は、可変長復号器501および逆量子化器502が離散コサイン変換係数DCT[R1(n)]の変換係数情報を出力する点で異なる。ここで、変換係数情報は、可変長復号器501および逆量子化器502の一方が出力する場合もある。
【0069】
誤差信号動き補償部31は、フレーム間予測であれば、誤差予測信号MC[E2(n-1),V]を求め、離散コサイン変換器510へ供給する。また、画像信号がフレーム間予測で参照される場合は、誤差予測信号MC[E2(n-1),V]を加算器509へ供給する。
【0070】
離散コサイン変換器510は、フレーム間予測であれば、誤差予測信号MC[E2(n-1),V]に離散コサイン変換を行うことで離散コサイン変換係数DCT[MC[E2(n-1),V]]を求め、減算器503へ供給する。
【0071】
減算器503は、フレーム間予測であれば、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して、離散コサイン変換係数DCT[R2(n)]を求め、変換係数符号化部52へ供給し、フレーム内予測であれば、離散コサイン変換係数DCT[R1(n)]を離散コサイン変換係数DCT[R2(n)]として変換係数符号化部52へ供給する。
【0072】
変換係数符号化部52は、ビットレート変換した圧縮動画ビットストリームを生成して出力する。また、画像信号がフレーム間予測で参照される場合は、以下の処理を行うことで誤差信号E2(n)を復号する。
【0073】
まず、変換係数符号化部52は、離散コサイン変換係数DCT[R2(n)+E2(n)]を減算器506へ供給し、離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報を変換係数分布計測器507へ供給する。なお、従来技術で説明した図35に示す変換係数符号化部22と比較すると、図3に示す第2実施形態の変換係数符号化部52は、可変長符号化器504および逆量子化器505が離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報を出力する点で異なる。ここで、変換係数情報は、可変長符号化器504と逆量子化器505の一方が出力する場合もある。
【0074】
減算器506は、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R1(n)]を減算して離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]を求め、変換係数分布計測器507および逆離散コサイン変換器508へ供給する。
【0075】
変換係数分布計測器507は、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報、および離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]から当該離散コサイン変換係数の変換係数情報を作成し、逆離散コサイン変換508へ供給する。ここで、計測の処理量を削減するために、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報から離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の変換係数情報を作成する場合もある。
【0076】
逆離散コサイン変換器508は、変換係数情報を用いて、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]に逆離散コサイン変換を行うことで誤差信号E2(n)-MC[E2(n-1),V]を求め、加算器509へ供給する。ここで逆離散コサイン変換器508は複数の処理手段を備えており、変換係数情報を用いて処理手段を切り替える。
【0077】
加算器509は、フレーム間予測であれば、誤差信号E2(n)-MC[E2(n-1),V]と誤差予測信号MC[E2(n-1),V]とを加算して誤差信号E2(n)を求め、誤差信号動き補償部31へ供給し、フレーム内予測であれば、誤差信号E2(n)-MC[E2(n-1),V]を誤差信号E2(n)として誤差信号動き補償部31へ供給する。
【0078】
以上の説明では、空間領域の誤差信号E2(n)に対して動き補償を行った。しかし、本発明は離散コサイン変換係数DCT[E2(n)]を生成するような再符号化装置であれば適用可能である。例えば、後述するように、周波数領域での動き補償を用いた図5の構成も適用可能である。
【0079】
2−2)第1動作例
図4は、図3に示した第1構成例の動作を示すフローチャートである。
【0080】
ステップS1では、再符号化対象となるブロックが参照画像か否かを判断する。参照画像となる場合はステップS2へ、参照画像とならない場合はステップS3へ移る。
【0081】
ステップS2では、入力した圧縮動画ビットストリームから、符号化モードや動きベクトルなどの符号化情報、および離散コサイン変換係数DCT[R1(n)]を求め、離散コサイン変換係数DCT[R1(n)]の変換係数情報を作成し、ステップS4へ移る。
【0082】
ステップS3では、入力した圧縮動画ビットストリームから、符号化モードや動きベクトルなどの符号化情報、および離散コサイン変換係数DCT[R1(n)]を求め、ステップS4へ移る。
【0083】
ステップS4では、再符号化対象となるブロックがフレーム間予測を用いて符号化されたか否かを判断する。フレーム間予測を用いて符号化されている場合はステップS5へ、フレーム内予測を用いて符号化されている場合は離散コサイン変換係数DCT[R1(n)]を離散コサイン変換係数DCT[R2(n)]としてステップS6へ移る。
【0084】
ステップS5では、既に復号した誤差信号E2(n-1)と動きベクトルVを用いて動き補償MCを行い、誤差予測信号MC[E2(n-1),V]を求める。続いて、誤差予測信号MC[E2(n-1),V]に離散コサイン変換を行うことで離散コサイン変換係数DCT[MC[E2(n-1),V]]を求める。次に離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して、離散コサイン変換係数DCT[R2(n)]を求め、ステップS6へ移る。
【0085】
ステップS6では、再符号化対象となるブロックが参照画像か否かを判断する。参照画像となる場合はステップS7へ、参照画像とならない場合はステップS8へ移る。
【0086】
ステップS7では、符号化情報および離散コサイン変換係数DCT[R2(n)]を符号化し、ビットレート変換した圧縮動画ビットストリームを生成する。続いて、逆量子化を行うことで離散コサイン変換係数DCT[R2(n)+E2(n)]を求める。次に、離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報を作成し、ステップS9へ移る。
【0087】
ステップS8では、符号化情報および離散コサイン変換係数DCT[R2(n)]を符号化し、ビットレート変換した圧縮動画ビットストリームを生成し、再符号化処理を終了する。
【0088】
ステップS9では、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R1(n)]を減算して離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]を求め、ステップS10へ移る。
【0089】
ステップS10では、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報、および離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]から離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の変換係数情報を作成する。次に、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の変換係数情報を用いて、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]に逆離散コサイン変換を行うことで誤差信号E2(n)-MC[E2(n-1),V]を求め、ステップS11へ移る。
【0090】
ステップS11では、再符号化対象となるブロックがフレーム間予測を用いて符号化されたか否かを判断する。フレーム間予測を用いて符号化されている場合はステップS12へ、フレーム内予測を用いて符号化されている場合は、誤差信号E2(n)-MC[E2(n-1), V]を誤差信号E2(n)としステップS13へ移る。
【0091】
ステップS12では、誤差信号E2(n)-MC[E2(n-1), V]と誤差予測信号MC[E2(n-1), V]とを加算して誤差信号E2(n)を求め、ステップS13へ移る。
【0092】
ステップS13では、誤差信号E2(n)をメモリに格納し、再符号化処理を終了する。
【0093】
2−3)第2構成例
上記第1構成例では、空間領域の誤差信号E2(n)に対して動き補償を行ったが、次に説明するように、周波数領域での動き補償を用いた構成も可能である。
【0094】
図5において、周波数領域動き補償器518は、フレーム間予測であれば、既に復号した離散コサイン変換係数DCT[E2(n-1)]と変換係数復号部51から供給される動きベクトルVを用いて周波数領域動き補償DCT[MC]を行い、離散コサイン変換係数DCT[MC[E2(n-1),V]]を求め、減算器503へ供給する。また、画像信号がフレーム間予測で参照される場合は、離散コサイン変換係数DCT[MC[E2(n-1),V]]を加算器519へ供給する。離散コサイン変換係数DCT[E2(n-1)]はメモリ517に蓄積されている。以下、メモリ517および周波数領域動き補償器518の構成をまとめて周波数領域誤差信号動き補償部53という。
【0095】
変換係数分布計測器507は、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報、および離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]から離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の変換係数情報を作成し、加算器519へ供給する。
【0096】
加算器519は、複数の処理手段を備えており、変換係数情報を用いて処理手段を切り替える。すなわち、変換係数情報を用いて、フレーム間予測であれば、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]と離散コサイン変換係数DCT[MC[E2(n-1),V]]とを加算して離散コサイン変換係数DCT[E2(n)]を求め、周波数領域誤差信号動き補償部53へ供給する。フレーム内予測であれば、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]を離散コサイン変換係数DCT[E2(n)]として周波数領域誤差信号動き補償部53へ供給する。
【0097】
2−4)第2動作例
図6は、図5に示した第2構成例の動作を示すフローチャートである。図4に示す第1実施形態のフローチャートと同様のステップには同一の参照番号を付し、異なる動作を示すステップについて詳細に説明する。
【0098】
ステップS4においてフレーム間予測であると判断された場合(S4のYES)、ステップS121において、既に復号した離散コサイン変換係数DCT[E2(n-1)]と動きベクトルVを用いて動き補償MCを行い、離散コサイン変換係数DCT[MC[E2(n-1),V]]を求める。次に、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して、離散コサイン変換係数DCT[R2(n)]を求め、ステップS6へ移る。
【0099】
また、ステップS11においてフレーム間予測であると判断された場合(S11のYES)、ステップS122において、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の変換係数情報、および離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]から離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の変換係数情報を作成する。次に、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の変換係数情報を用いて、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1), V]]と離散コサイン変換係数DCT[MC[E2(n-1), V]]とを加算して離散コサイン変換係数DCT[E2(n)]を求め、ステップS123へ移る。
【0100】
ステップS123では、離散コサイン変換係数DCT[E2(n)]をメモリに格納し、再符号化処理を終了する。
【0101】
これより第2実施形態は周波数領域でも適用可能であることが分かる。また、以降の実施形態でも同様に適用可能である。
【0102】
2−5)具体的動作例
次に、具体例を用いて、第2実施形態における第1構成例の動作例を詳細に説明する。ここでは、入力となる圧縮動画ビットストリームはMPEG-2 VIDEOビットストリームとするが、本発明はこれに限定されるものではなく、他方式により圧縮符号化された圧縮動画像ストリームに対しても同様な処理により再符号化を実現できる。
【0103】
2−5−1)分布情報
まず、変換係数情報の一つである分布情報に関して説明する。
【0104】
図7に画像信号の8×8離散コサイン変換係数の例を示す。分布情報としては、例えば有意(非零)係数の存在する位置情報がある。この場合、図7(a)では分布情報として、有意係数が存在する(0,0)、(0,1)、(0,2)、(1,0)、(1,2)、(1,3)、(2,0)、(2,1)、(2,2)、(3,0)、(3,2)の位置情報を保持する。ここで(0,0)は0行、0列の位置を表す。以下同様である。
【0105】
また、各有意係数の位置情報を保持するのではなく、全てが零となる行や列の位置情報を保持することなども考えられる。この場合、図7(a)では、全てが零となる4,5,6,7行目および4,5,6,7列目の位置情報を保持することになる。以上の例では零係数の位置情報に着目している。これは、零係数の位置情報を利用することで逆離散コサイン変換の処理量を削減できるからである。以下に具体例を示す。
【0106】
MPEG-2 VIDEOでは、次式に示す8×8逆離散コサイン変換が用いられる。
【0107】
【数1】

Figure 0004134572
【数2】
Figure 0004134572
ここで、f(x,y)は予測誤差信号、F(u,v)は離散コサイン変換係数を表す。
【0108】
図7(b)のように有意係数が(0,0)にのみ存在する変換係数を考える。この場合、零係数の位置情報を利用しなければ、数1および数2に従い逆離散コサイン変換を行うことになるが、位置情報を利用すれば、有意係数は直流成分のみに存在することが分かる。その結果、数1及び数2の8×8逆離散コサイン変換は次式で簡略化でき、逆離散コサイン変換の処理量を削減できる。
【0109】
【数3】
Figure 0004134572
例として、有意係数の位置情報や零となる行列の位置情報を考えたが、分布情報としては様々なものが考えられる。本実施例では、有意係数が複数のある定めた範囲で、どの範囲に含まれているかを分布情報(以下、範囲情報という。)として保持する。
【0110】
具体的には、離散コサイン変換係数が図8に示す4つの範囲のうちどの範囲に属するかを範囲情報として保持する。図7(a)の離散コサイン変換係数の場合は、"低域4×4"および"8×8成分"の範囲に属することになるが、この場合は範囲の狭い"低域4×4成分"の範囲に属するものとする。同様に、図7(b)の場合は、"低域1×1成分"の範囲に属する。
【0111】
なお、本実施例では4種類の範囲を用いるが、範囲は任意の係数位置の組み合わせおよび任意の種類の設定が可能であることはいうまでもない。また、本実施例では分布情報を用いるが、係数値から得られる最大値、平均、分散などの統計情報を用いることも可能である。
【0112】
2−5−2)具体的動作
図9は、図3に示す第1構成例の具体的動作を示すフローチャートである。処理はマクロブロック単位で行い、ピクチャタイプや量子化マトリックスなどの符号化情報は復号されているものとする。
【0113】
ステップS21では、再符号化対象となるブロックのピクチャタイプがIピクチャまたはPピクチャか否かを判断する。IピクチャまたはPピクチャである場合はステップS22へ、Bピクチャである場合はステップS23へ移る。
【0114】
ステップS22では、入力したMPEG-2ビットストリームから、符号化モードや動きベクトルなどの符号化情報、および離散コサイン変換係数DCT[R1(n)]を求める。また、本実施例では離散コサイン変換係数DCT[R1(n)]が、"有意係数なし"、"低域1×1成分"、"低域4×4成分"、"8×8成分"のどの範囲に属するか判定し、範囲情報として保持する。そして、ステップS24へ移る。
【0115】
範囲判定
ステップS22における範囲判定処理について説明する。MPEG-2 VIDEOでは、ブロックの係数が全て零であることを示す情報(coded block pattern、skipped macroblock)が含まれているので、この符号化情報を用いて、ブロックが"有意係数なし"かを判定できる。
【0116】
次に、”有意係数なし”以外の範囲判定について説明する。まず、MPEG-2 VIDEOにおける離散コサイン変換係数の復号過程について説明する。
【0117】
前述したように、MPEG-2 VIDEOでは離散コサイン変換係数を量子化した結果であるレベル値は、ある定められた順にスキャニングされ、1次元情報に変換、符号化される。
【0118】
具体的な変換方法としては、図10に示すようなジグザグスキャンとオルタネートスキャンが用いられる。また、レベル値をスキャン順でみたとき非零となるレベル値の間には多くの零レベルが存在するため、MPEG-2では連続する零の個数(RUN)と、その直後のレベル値(LEVEL)をまとめて符号化が行われる。さらに、ある係数以降のレベル値が全て零になることが多いので、ブロックの終了を意味するフラグ(EOB: end of block)が用いられる。ただし、フレーム内符号化の直流成分のみは異なる符号化方式が用いられる。離散コサイン変換係数の復号は、符号化の逆変換を行うことになる。
【0119】
復号処理の具体例を図11に示す。この例では(5,2)、(6,-1)、(0,-1)、(3,-1)、EOBで構成されるフレーム間予測、ジグザグスキャンされたブロックの復号を行う。ここで(5,2)は零の個数が5個であり、その直後のレベル値が2であることを表す。
【0120】
まず、1次元情報はスキャン順に従い、2次元情報に変換される。次に、2次元情報に変換されたレベル値に対して、MPEG-2 VIDEOで規定された逆量子化処理に従い逆量子を行い、離散コサイン変換係数を求める。
【0121】
以上の説明から分かるように、RUN,LEVEL情報から有意係数の位置情報が得られるので、可変長復号時、逆量子化時、および可変長符号化時に変換係数がどの範囲に属するか判定できる。
【0122】
図9に戻って、ステップS23では、入力したMPEG-2ビットストリームから、符号化モードや動きベクトルなどの符号化情報、および離散コサイン変換係数DCT[R1(n)]を求め、ステップS24へ移る。
【0123】
ステップS24では、再符号化対象となるブロックがフレーム間予測を用いて符号化されたか否かを判断する。フレーム間予測を用いて符号化されている場合はステップS25へ、フレーム内予測を用いて符号化されている場合は離散コサイン変換係数DCT[R1(n)]を離散コサイン変換係数DCT[R2(n)]としてステップS26へ移る。
【0124】
ステップS25では、既に復号した誤差信号E2(n-1)と動きベクトルVを用いて動き補償MCを行い、誤差予測信号MC[E2(n-1),V]を求める。続いて、誤差予測信号MC[E2(n-1),V]に離散コサイン変換を行うことで離散コサイン変換係数DCT[MC[E2(n-1),V]]を求める。次に、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して、離散コサイン変換係数DCT[R2(n)]を求め、ステップS26へ移る。
【0125】
ステップS26では、再符号化対象となるブロックのピクチャタイプがIピクチャまたはPピクチャか否かを判断する。IピクチャまたはPピクチャである場合はステップS27へ、Bピクチャである場合はステップS28へ移る。
【0126】
ステップS27では、符号化情報および離散コサイン変換係数DCT[R2(n)]を符号化し、ビットレート変換したMPEG-2ビットストリームを生成する。続いて、逆量子化を行うことで離散コサイン変換係数DCT[R2(n)+E2(n)]を求める。次に、離散コサイン変換係数DCT[R2(n)+E2(n)]が、"有意係数なし"、"低域1x1成分"、"低域4x4成分"、"8x8成分"のどの範囲に属するか判定し、範囲情報として保持する。そして、ステップS29へ移る。
【0127】
ステップS28では、符号化情報および離散コサイン変換係数DCT[R2(n)]を符号化し、ビットレート変換したMPEG-2ビットストリームを生成し、再符号化処理を終了する。
【0128】
ステップS29では、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R1(n)]を減算して離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]を求め、ステップS30へ移る。
【0129】
ステップS30では、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の範囲情報から、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の範囲情報を求める。
【0130】
本実施例では、広い方の範囲を離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の範囲情報とする。より精度の高い範囲判定を行う場合には、変換係数の減算を行い、零判定を行う。次に、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]の範囲情報を用いて、逆離散コサイン変換の処理手段を選択し、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]に逆離散コサイン変換を行うことで誤差信号E2(n)-MC[E2(n-1),V]を求め、ステップS31へ移る。
【0131】
ステップS31では、再符号化対象となるブロックがフレーム間予測を用いて符号化されたか否かを判断する。フレーム間予測を用いて符号化されている場合はステップS32へ、フレーム内予測を用いて符号化されている場合は、誤差信号E2(n)-MC[E2(n-1), V]を誤差信号E2(n)としステップS33へ移る。
【0132】
ステップS32では、誤差信号E2(n)-MC[E2(n-1), V]と誤差予測信号MC[E2(n-1), V]とを加算して誤差信号E2(n)を求め、ステップS33へ移る。
【0133】
ステップS33では、誤差信号E2(n)をメモリに格納し、再符号化処理を終了する。
【0134】
図12は、MPEG-2ビットストリームを実際に再符号化した場合に、減算器506の出力ブロックが属する範囲の割合を示した表である。ここで、計測したブロックはPピクチャかつフレーム間予測を用いたブロックである。入力となるMPEG-2ビットストリームは6Mbpsで符号化されており、再符号化は3Mbpsで行う。また、MPEG-2ビットストリームのgroup of pictures (GOP)構成は、IPPPPPP...およびIBBPBBPBB...の2種類であり、Iピクチャの間隔は15フレームである。
【0135】
図12からも明らかなように、MPEG-2ビットストリームにおける離散コサイン変換係数の約44%〜66%は"低域4x4成分"の範囲内である。そこで、零係数の位置情報を用いて逆離散コサイン変換を行えば、通常の8x8逆離散コサイン変換に比べ処理量を削減できる。
【0136】
第2実施形態は、変換係数情報を求める手段、および変換係数情報を用いて、複数の逆離散コサイン変換処理を切り替え可能な逆離散コサイン変換手段を備えている。そのため、逆離散コサイン変換の処理量を削減できる。
【0137】
3)第3実施形態
次に、本発明の第3実施形態について図面を参照して詳細に説明する。ここでは、第2実施形態と異なる構成および動作について説明する。
【0138】
図13を参照すると、本発明による再符号化装置の第3実施形態は、第2実施形態にモード判定器511が追加され、さらに2つの選択可能な処理パスを備えている。第1の処理パスが選択されると第2実施形態と同様の構成となり、第2の処理パスが選択されると図36に示した従来の再符号化装置と同様の構成となる。以下、第1の処理パスをモード3−1、第2の処理パスをモード3−2という。
【0139】
モード判定器511は、離散コサイン変換係数DCT[R1(n)]およびDCT[R2(n)]の変換係数情報および各ブロックの処理量から、各モードにおける全体の処理量を推定し、処理量の少ないモードを選択する。ここで、フレーム内予測の場合は、モード3−2が選択される。なお、図13ではモード3−2が選択されている。
【0140】
まず、モード判定器511がモード3−1を選択した場合の動作を説明する。減算器506は、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R1(n)]を減算して離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]を求め、逆離散コサイン変換器508へ供給する。
【0141】
逆離散コサイン変換器508は、変換係数情報を用いて、離散コサイン変換係数DCT[E2(n)-MC[E2(n-1),V]]に逆離散コサイン変換を行うことで誤差信号E2(n)-MC[E2(n-1),V]を求め、加算器509へ供給する。加算器509は、誤差信号E2(n)-MC[E2(n-1),V]と誤差予測信号MC[E2(n-1),V]とを加算して誤差信号E2(n)を求め、誤差信号動き補償部31へ供給する。
【0142】
次に、モード判定器511がモード3−2を選択した場合の動作を説明する。減算器506は、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R2(n)]を減算して離散コサイン変換係数DCT[E2(n)]を求め、逆離散コサイン変換器508へ供給する。逆離散コサイン変換器508は、変換係数情報を用いて、離散コサイン変換係数DCT[E2(n)]に逆離散コサイン変換を行うことで誤差信号E2(n)を求め、誤差信号動き補償部31へ供給する。
【0143】
第3実施形態では、変換係数の分布計測処理量を削減するために変換係数分布計測器507は離散コサイン変換係数DCT[R1(n)]およびDCT[R2(n)+E2(n)]のみから変換係数情報を作成し、モード判定器511へ供給する。
【0144】
より精度の高い変換係数情報を作成するには図14に示した構成をとる。図14の構成では、減算器512および減算器513が各モードにおける離散コサイン変換係数の減算を行い、変換係数分布計測器507に供給する。
【0145】
以上の説明では、第1の処理パスとして第2実施形態を用いた。しかし、第3実施形態における処理パスは、誤差信号E2(n)または周波数変換係数DCT[E2(n)]を生成するような再符号化装置であれば適用可能である。
【0146】
図15は、モード3−1の処理パスが図13と異なる例を示すブロック図である。図15ではモード3−1が選択されている。この構成においてもモード判定器511が処理量の少ないモードを選択する動作は同様である。ここでは、図13と異なる構成および動作について説明する。
【0147】
図15において、モード判定器511がモード3−1を選択した場合、逆離散コサイン変換器508は、変換係数情報を用いて、離散コサイン変換係数DCT[R2(n)+E2(n)]に逆離散コサイン変換を行うことで予測誤差信号R2(n)+E2(n)を求め、加算器509へ供給する。
【0148】
加算器509は、フレーム間予測であれば、誤差予測信号MC[E2(n-1), V]と予測誤差信号R2(n)+E2(n)とを加算して予測誤差信号R1(n)+E2(n)を求め、減算器515へ供給する。また、フレーム内予測であれば、予測誤差信号R2(n)+E2(n)を予測誤差信号R1(n)+E2(n)として減算器515へ供給する。
【0149】
逆離散コサイン変換器514は、変換係数情報を用いて、離散コサイン変換係数DCT[R1(n)]に逆離散コサイン変換を行うことで予測誤差信号R1(n)を求め、減算器515へ供給する。減算器515は、予測誤差信号R1(n)+E2(n)から予測誤差信号R1(n)を減算して誤差信号E2(n)を求め、誤差信号動き補償部31へ供給する。
【0150】
図16は、第3実施形態の動作を示すフローチャートである。ここでは、図4に示す第2実施形態と同様のステップには同一の参照番号を付し、第2実施形態と異なる動作に関してのみ説明する。
【0151】
ステップS41では、離散コサイン変換係数DCT[R1(n)]とDCT[R2(n)]の変換係数情報、および各ブロックの処理量から、各モード全体の処理量を推定し、処理量の少ないモードを選択する。
【0152】
続いて、ステップS42では、選択されたモードがモード3−1か否かを判断する。モード3−1であればステップS43へ、モード3−2であればステップS44へ移る。
【0153】
ステップS43では、再符号化方式2−1を用いて誤差信号E2(n)を求め、メモリに格納し再符号化処理を終了する。
【0154】
ステップS44では、再符号化方式2−2を用いて誤差信号E2(n)を求め、メモリに格納し再符号化処理を終了する。
【0155】
3−1)第3実施形態の動作例
次に、具体的な実施例を用いて第3実施形態の動作を詳細に説明する。この実施例では、入力となる圧縮動画ビットストリームは同様にMPEG-2 VIDEOビットストリームとする。
【0156】
図17は、図13に示す構成例の動作を示すフローチャートである。処理はマクロブロック単位で行い、ピクチャタイプや量子化マトリックスなどの符号化情報は復号されているものとする。なお、第2実施形態の動作を示す図9のフローチャートと同様のステップには同一参照番号を付して説明は省略する。
【0157】
図17において、ステップ27を完了すると、ステップS51において、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の範囲からモード選択を行う。このステップでは、各モードにおける全体の処理量から、処理量の少ないモードを選択する。本実施例の場合、モード3−1とモード3−2の処理量は、逆離散コサイン変換および加減算の処理量で決まる。処理量は実装方法によって大きく異なるが、本実施例では"低域4x4成分"の離散コサイン変換および加算器509の加算の処理量は、"8x8成分"の離散コサイン変換の処理量よりも少ないとする。その結果、離散コサイン変換係数DCT[R1(n)]およびDCT[R2(n)+E2(n)]の範囲情報が共に"8x8成分"の場合にモード3−2を選択し、それ以外の場合は、モード3−1を選択することとする。ただし、フレーム内予測の場合は、モード3−2を選択する。
【0158】
ここで、モード3−2における全体の処理量を求めるには、減算器506の出力である離散コサイン変換係数の範囲情報も考慮すべきであるが、減算器506の出力には量子化前の離散コサイン変換係数が含まれるため、多くの離散コサイン係数は"8×8成分”の範囲に属する。そこで、本実施例では離散コサイン変換係数DCT[R1(n)]およびDCT[R2(n)+E2(n)]の範囲から、2つのモードの処理量を推定し、モード選択を行う。
【0159】
図18は、MPEG-2ビットストリームを実際に図13の方式を用いて再符号化した場合に、減算器506の出力ブロックが属する範囲の割合を示した表である。ここで、計測したブロックはPピクチャかつフレーム間予測を用いたブロックである。入力ストリームなどは図12と同様である。図18からも明らかなように、MPEG-2ビットストリームにおける離散コサイン変換係数の約83〜94%が"8x8成分"の範囲に属する。
【0160】
ステップS52では、選択されたモードがモード3−1か否かを判断する。モード3−1であればステップS29へ、モード3−2であればステップS53へ移る。
【0161】
ステップS53では、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R2(n)]を減算して離散コサイン変換係数DCT[E2(n)]を求め、ステップS54へ移る。
【0162】
ステップS54では、離散コサイン変換係数DCT[R1(n)]と離散コサイン変換係数DCT[R2(n)+E2(n)]の範囲情報を用いて、離散コサイン変換係数DCT[E2(n)]に逆離散コサイン変換を行うことで誤差信号E2(n)を求め、ステップS33へ移る。
【0163】
第3実施形態は、変換係数情報および各ブロックの処理量から、各モードにおける全体の処理量を推定し、最も処理量の少ない再符号化方式を選択するモード判定手段を備える。そのため、単一のモードの再符号化方式よりも処理量を削減できる。
【0164】
4)第4実施形態
次に、本発明の第4実施形態について図面を参照して詳細に説明する。ただし、図1に示す第1実施形態と同様のブロックには同一の参照番号を付し、ここでは第1実施形態と異なる構成および動作について説明する。
【0165】
図19を参照すると、本発明の第4実施形態による再符号化装置では、第1実施形態の構成に信号零判定部15が追加されている。また第4実施形態は、2つの処理パスを備えている。第1の処理パスは通常の再符号化パスであり、第2の処理パスに関して以下説明する。なお、第1の処理パスをモード4−1、第2の処理パスをモード4−2という。
【0166】
入力した圧縮動画ビットストリームから、少なくとも一部の信号を復号し、復号信号または復号時に得られた制御情報を信号零判定部15に供給する。信号零判定部15は、復号信号または復号時に得られた制御情報から符号化処理単位または復号処理単位毎に復号信号が全て零であるかを判定する。もし、全て零の場合はモード4−2を選択し、そうでない場合はモード4−1を選択する。図19ではモード4−2が選択されている。モード4−1が選択された場合の動作は、第1実施形態の動作と同様である。したがって、ここではモード4−2が選択された場合の動作を説明する。
【0167】
モード4−2が選択された場合、符号化処理部12は符号化信号を零として再度符号化を行う。信号補正部13は、蓄積した信号を用いて補正信号を計算し、信号補正部13へ供給する。
【0168】
図20は、図19に示す第4実施形態の動作を示すフローチャートである。ここでは、図2に示す第1実施形態のフローチャートと異なる動作に関してのみ説明する。
【0169】
ステップS111では、復号信号が全て零であるか否かを判断する。全て零であればステップS112へ、そうでなければステップS103へ移る。
【0170】
ステップS112では、符号化信号を零とし再度符号化を行い、計算した補正信号を蓄積して再符号化処理を終了する。
【0171】
上述したように、第4実施形態では、信号零判定手段を備えており、復号信号が全て零であると判定された場合、通常の再符号化よりも簡略な方式を適用する。その結果、従来の再符号化装置に比べ処理量を削減できる。
【0172】
5)第5実施形態
次に、本発明の第5実施形態について図面を参照して詳細に説明する。第5実施形態は、第4実施形態に対して、圧縮動画ビットストリームの符号化方式として周波数空間への変換処理を組み合わせていることを特徴としている。ここでは、図3に示す第2実施形態と同様のブロックには同一参照番号を付し、第2実施形態と異なる構成および動作について説明する。
【0173】
図21を参照すると、本発明の第5実施形態による再符号化装置は、図3に示す第2実施形態に変換係数零判定器516が追加された構成となっている。また第5実施形態は2つの処理パスを備えている。第1の処理パスは第2実施形態と同様であり、第2の処理パスに関して以下説明する。ここでは、第1の処理パスをモード5−1、第2の処理パスをモード5−2という。
【0174】
変換係数復号部51は、入力した圧縮動画ビットストリームから離散コサイン変換係数DCT[R1(n)]を求め、離散コサイン変換係数DCT[R1(n)]の変換係数情報を変換係数零判定器516へ供給する。
【0175】
変換係数零判定器516は、離散コサイン変換係数DCT[R1(n)]の変換係数情報から離散コサイン変換係数に有意係数が含まれるかを判定する。もし、離散コサイン変換係数に有意係数が含まれている場合はモード5−1を選択し、離散コサイン変換係数DCT[R1(n)]の変換係数情報を変換係数分布計測器507へ供給する。もし、有意係数が含まれていない(全ての変換係数が零の)場合はモード5−2を選択する。図21ではモード5−2が選択されている。モード5−1が選択された場合の動作は第2実施形態の動作と同様であるから、モード5−2が選択された場合の動作を説明する。
【0176】
モード5−2が選択された場合、変換係数符号化部52は離散コサイン変換係数DCT[R2(n)]を零とし、ビットレート変換した圧縮動画ビットストリームを生成して出力する。
【0177】
誤差信号動き補償部31は、画像信号がフレーム間予測で参照される場合、フレーム間予測であれば、誤差予測信号MC[E2(n-1),V]を求め、誤差予測信号MC[E2(n-1),V]を誤差信号E2(n)とし、誤差信号動き補償部31へ供給する。フレーム内予測であれば、誤差信号E2(n)を零とし、誤差信号動き補償部31へ供給する。
【0178】
なお、図5に示す第2実施形態の実施例と同様に、周波数領域での動き補償を用いた図26の構成も適用可能である。
【0179】
図22は、図21に示した第5実施形態の動作を示すフローチャートである。ここでは、図4に示す第2実施形態のフローチャートと異なる動作に関してのみ説明する。
【0180】
図22において、フレーム間予測である場合(ステップS4のYES)、ステップS61において、既に復号した誤差信号E2(n-1)と動きベクトルVを用いて動き補償MCを行い、誤差予測信号MC[E2(n-1),V]を求め、ステップS62へ移る。
【0181】
ステップS62では、変換係数情報を用いて再符号化対象となるブロックに有意係数が含まれるか否かを判断する。有意係数が含まれる場合はステップS63へ、全ての係数が零の場合はステップS6へ移る。
【0182】
ステップS63では、誤差予測信号MC[E2(n-1),V]に離散コサイン変換を行うことで離散コサイン変換係数DCT[MC[E2(n-1),V]]を求める。次に、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して、離散コサイン変換係数DCT[R2(n)]を求め、ステップS6へ移る。
【0183】
ステップS6において参照画像であると判定された場合には、ステップS64において、変換係数情報を用いて再符号化対象となるブロックに有意係数が含まれるか否かを判断する。有意係数が含まれる場合はステップS7へ、全ての係数が零の場合はステップS65へ移る。
【0184】
ステップS65では、離散コサイン変換係数DCT[R2(n)]を零とし、変換係数および符号化情報を符号化し、ビットレート変換した圧縮動画ビットストリームを生成する。フレーム間予測であれば、誤差予測信号MC[E2(n-1),V]を誤差信号E2(n)とし、フレーム内予測であれば、誤差信号E2(n)を零とし、ステップS13へ移る。
【0185】
次に、具体的な実施例を用いて、第5実施形態の動作を詳細に説明する。この実施例では、入力となる圧縮動画ビットストリームは同様にMPEG-2 VIDEOビットストリームとする。
【0186】
図23は、第5実施形態の第1実施例の動作を示すフローチャートである。本実施例では、ブロックごとに零判定を行うのでブロック単位の動作を示す。ここで、MPEG-2 VIDEOでは動き補償はマクロブロック単位で行われるが、フローチャートを簡略にするため、ブロック単位に行うものとしている。
【0187】
MPEG-2 VIDEOでの零判定は、前述したようにブロックの係数が全て零であることを示す情報(coded block pattern、skipped macroblock)を用いればよい。
【0188】
以下、図9に示す第2実施形態のフローチャートと異なる動作に関してのみ説明する。
【0189】
図23において、フレーム間予測である場合(ステップS24のYES)、ステップS71において、既に復号した誤差信号E2(n-1)と動きベクトルVを用いて動き補償MCを行い、誤差予測信号MC[E2(n-1),V]を求め、ステップS72へ移る。
【0190】
ステップS72では、復号時の情報を用いて再符号化対象となるブロックに有意係数が含まれるか否かを判断する。有意係数が含まれる場合はステップS73へ、全ての係数が零の場合はステップS26へ移る。
【0191】
ステップS73では、誤差予測信号MC[E2(n-1),V]に離散コサイン変換を行うことで離散コサイン変換係数DCT[MC[E2(n-1),V]]を求める。次に、離散コサイン変換係数DCT[R1(n)]から離散コサイン変換係数DCT[MC[E2(n-1),V]]を減算して、離散コサイン変換係数DCT[R2(n)]を求め、ステップS26へ移る。
【0192】
IピクチャあるいはPピクチャである場合(ステップS26のYES)、ステップS74では、復号時の情報を用いて再符号化対象となるブロックに有意係数が含まれるか否かを判断する。有意係数が含まれる場合はステップS27へ、全ての係数が零の場合はステップS75へ移る。
【0193】
ステップS75では、離散コサイン変換係数DCT[R2(n)]を零とし、変換係数および符号化情報を符号化し、ビットレート変換したMPEG-2ビットストリームを生成する。また、フレーム間予測であれば、誤差予測信号MC[E2(n-1),V]を誤差信号E2(n)とし、フレーム内予測であれば、誤差信号E2(n)を零とし、ステップS33へ移る。
【0194】
図24は、MPEG-2ビットストリームを実際に再符号化した場合に、入力の変換係数に有意係数が含まれていないブロックが、出力の変換係数で有意係数をもつ割合を示した表である。入力ストリームなどは図12と同様である。
【0195】
図24からも明らかなように、入力の変換係数に有意係数が含まれない場合に、出力の変換係数に有意係数が含まれる割合は3.3%以内であり、低いことが分かる。
【0196】
図25は、入力ストリームに有意係数が含まれないブロックの割合が高く、誤差蓄積の影響の大きい(GOP構成IPPP....)シーケンス4を再符号化した場合の、輝度信号の原画像に対するpeak signal to noise ratio(PSNR)を示すグラフである。ここで、縦軸はPSNRを表し、横軸はフレーム番号を表す。
【0197】
このグラフでは、第2実施形態の実施例を用いた場合と、簡略方式を適用した第5実施形態の実施例を用いた場合とを表している。グラフから明らかなように、2つの方式の平均PSNRはどちらも24.98dBであり、簡略化による画質劣化の影響は小さい。また、誤差蓄積による画質劣化も生じていないことが分かる。
【0198】
第5実施形態は、離散コサイン変換係数零判定手段を備えており、変換係数に有意係数が含まれないと判定された場合、通常の再符号化よりも簡略な方式を適用する。簡略方式は離散コサイン変換、量子化、および逆離散コサイン変換の処理を省略するので、従来の再符号化装置に比べ処理量を削減できる。簡略方式を適用することで画質劣化が生じるが、もともと入力の変換係数に有意係数が含まれない場合に、出力の変換係数に有意係数が含まれる割合は低いので、画質劣化の影響は小さい。
【0199】
ただし、再量子化の量子化幅で、出力の変換係数に有意係数が含まれる割合は異なる。そこで、変換係数零判定器516は再量子化の量子化幅がある定めた閾値を超えた場合のみ、第2の処理パス(モード5−2)を選択するように動作させてもよい。
【0200】
6)第6実施形態
次に、本発明の第6実施形態について図面を参照して詳細に説明する。
【0201】
第6実施形態は、第3実施形態と第5実施形態を組み合わせた構成である。ここでは、第3実施形態および第5実施形態と異なる構成および動作について説明する。
【0202】
図27を参照すると、本発明の第6実施形態による再符号化装置は、2つの処理パスを備えている。第1の処理パスは図36に示す再符号化装置の構成と同じであり、第2の処理パスは第5実施形態の第2パス(モード5−2)と同じである。以下、第1の処理パスをモード6−1、第2の処理パスをモード6−2という。
【0203】
図27に示すように、第6実施形態における変換係数零判定器516は、離散コサイン変換係数DCT[R1(n)]の変換係数情報から離散コサイン変換係数に有意係数が含まれるかを判定し、処理パスを選択する。そのため、第3実施形態におけるモード判定器511は不要である。
【0204】
また、第2実施形態の場合と同様に、周波数領域での動き補償を用いた図30の構成も適用可能である。この構成の場合は、加算器519も存在しないので変換係数分布計測器507は不要である。
【0205】
図28は、図27に示した第6実施形態の動作を示すフローチャートである。以下、図22に示す第5実施形態のフローチャートと異なる動作に関してのみ説明する。
【0206】
図28において、ステップS81では、離散コサイン変換係数DCT[R2(n)+E2(n)]から離散コサイン変換係数DCT[R2(n)]を減算して離散コサイン変換係数DCT[E2(n)]を求め、ステップS82へ移る。
【0207】
ステップS82では、変換係数情報を用いて、離散コサイン変換係数DCT[E2(n)]に逆離散コサイン変換を行い、誤差信号E2(n)を求め、ステップS13へ移る。
【0208】
図29は、MPEG-2ビットストリームを復号した場合に、入力の変換係数が属する範囲の割合を示した表である。ここで、計測したブロックはPピクチャかつフレーム間予測を用いたブロックである。入力ストリームなどは図12と同様である。図29からも明らかなように、MPEG-2ビットストリームにおける入力変換係数の約25〜49%は"有意係数なし"の範囲に属する。
【0209】
第6実施形態は、第5実施形態と同様に離散コサイン変換係数零判定手段を備えており、変換係数に有意係数が含まれないと判定された場合、通常の再符号化よりも簡略な方式を適用する。その結果、図36に示した従来の再符号化装置に比べ処理量を削減できる。
【0210】
7)第7実施形態
第3実施形態では、図16及び17において説明したように、変換係数情報および各ブロックの処理量から2つのモードにおける処理量を推定し、処理量の少ないモードを選択していた。
【0211】
これに対して、第7実施形態によれば、再符号化装置はN種類の再符号化方式を備える。この場合、変換係数情報および各ブロックの処理量からN種類のモードにおける全体の処理量を推定し、処理量の少ないモードを選択する。そのため、最も処理量の少ない再符号化方式を選択するので、再符号化の処理量を削減できる。ここで、言うまでもなく、第7実施形態も、第3実施形態と同様に、誤差信号E2(n)または離散コサイン変換係数DCT[E2(n)]を生成するような再符号化方式であれば適用可能であり、さらには第5実施形態のような簡略方式も適用可能である。
【0212】
図31は、第7実施形態の動作を示すフローチャートである。以下、図16に示す第3実施形態のフローチャートと異なる動作に関してのみ説明する。
【0213】
ステップS91では、離散コサイン変換係数DCT[R1(n)]およびDCT[R2(n)]の変換係数情報および各ブロックの処理量から、N種のモードにおける全体の処理量を推定し、処理量の少ないモードを選択する。
【0214】
続いて、ステップS92では、モード7−1が選択されたか否かを判断する。モード7−1が選択された場合はステップS93へ移り、モード7−2が選択された場合はモード7−2の選択へ移る。
【0215】
ステップS93では、再符号化方式7−1を用いて誤差信号E2(n)を求め、メモリに格納して再符号化処理を終了する。モード7−2の判定以降はステップS92およびステップS93と同様の処理を行う。ステップS94では、モード7−(N−1)が選択されたか否かを判断する。モード7−(N−1)が選択された場合はステップS95へ、モード7−Nが選択された場合はステップS96へ移る。
【0216】
ステップS95では、再符号化方式5−(N−1)を用いて誤差信号E2(n)を求めてメモリに格納し、再符号化処理を終了する。ステップS96では、再符号化方式5−Nを用いて誤差信号E2(n)を求めてメモリに格納し、再符号化処理を終了する。
【0217】
8)第8実施形態
図22に示す第5実施形態では、有意係数が存在した場合(ステップS62のYES)にステップS63を実行するのに対して、第8実施形態による再符号化装置は、入力する圧縮動画ビットストリームの再符号化処理に依存しない処理単位ごとにステップS63を行うことを特徴としている。
【0218】
図32は、本発明の第8実施形態の動作を示すフローチャートである。以下、図22に示す第5実施形態のフローチャートと異なる動作に関してのみ説明する。
【0219】
図32において、ステップS131では、離散コサイン変換係数DCT[R1(n)]を補正する時期であるか否かを判断する。補正時であればステップS63へ、補正時でない場合にはステップS6へ移る。
【0220】
第8実施形態では、ある定めた処理単位ごとにのみ、離散コサイン変換係数DCT[R1(n)]の補正を行う。そのため、補正を行わない場合は、離散コサイン変換および減算の処理量を削減できる。離散コサイン変換係数DCT[R1(n)]の補正を行う処理単位としては、様々なものが考えられる。例えば、1フレームおきに、あるいは複数のブロックおきに補正を行うこと等が考えられる。
【0221】
なお、第2実施形態の場合と同様に、第8実施形態は周波数領域での動き補償を用いた構成にも適用可能である。
【0222】
9)第9実施形態
図22に示す第5実施形態では、有意係数が存在した場合(ステップS62のYES)にステップS63を実行するのに対して、第9実施形態による再符号化装置は、再量子化を行う量子化幅が逆量子化を行う量子化幅以下、あるいは再量子化を行う量子化幅と逆量子化を行う量子化幅の差の絶対値がある定めた閾値以下であるか否かを判定し、前記の条件が成立しなかった場合に、ステップS63を行うことを特徴としている。
【0223】
図33は、第9実施形態の動作を示すフローチャートである。以下、図22に示す第5実施形態のフローチャートと異なる動作に関してのみ説明する。
【0224】
ステップS141では、再量子化を行う量子化幅が逆量子化を行う量子化幅以下、あるいは再量子化を行う量子化幅と逆量子化を行う量子化幅の差の絶対値がある定めた閾値以下であるか否かを判断する。前記条件が成立する場合はステップS6へ、成立しない場合はステップS63へ移る。
【0225】
ステップS142では、再量子化を行う量子化幅が逆量子化を行う量子化幅以下、あるいは再量子化を行う量子化幅と逆量子化を行う量子化幅の差の絶対値がある定めた閾値以下であるか否かを判断する。前記条件が成立する場合は、逆量子化を行った量子化幅を再量子化を行う量子化幅に設定しステップS65へ、成立しない場合はステップS7へ移る。
【0226】
第9実施形態は、再量子化を行う量子化幅および逆量子化を行う量子化幅の判定条件の判定結果に応じて、離散コサイン変換係数DCT[R1(n)]の補正を行う。そのため、補正を行わない場合には離散コサイン変換および減算の処理量を削減できる。さらに、量子化を行う量子化幅を再量子化を行う量子化幅に設定しているため、再量子化による誤差は生じない。そのため、再量子化および逆離散コサイン変換の処理量も削減できる。
【0227】
なお、第2実施形態の場合と同様に、第9実施形態は周波数領域での動き補償を用いた構成にも適用可能である。
【0228】
10)コンピュータシステム
図34は、本発明による再符号化装置をインプリメントした情報処理システムの一例を示す概略的ブロック構成図である。本発明による再符号化装置は、以上の説明からも明らかなように、ハードウェアで構成することもできるが、コンピュータプログラムにより実現することも可能である。
【0229】
図34に示す情報処理システムは、プロセッサ601、プログラムメモリ602、記憶媒体603および604からなる。記憶媒体603および604は、別個の記憶媒体であってもよいし、同一の記憶媒体の異なる記憶領域であってもよい。記憶媒体としては、ハードディスク等の磁気記憶媒体を用いることができる。
【0230】
【発明の効果】
以上詳細に説明したように、本発明によれば、信号および制御情報を参照して信号値または分布情報を計測し、その信号値または分布情報を用いて補正信号を計算する。このために、補正信号の計算に必要な演算量を削減することができ、高速なビットレート変換を実現できる。
【0231】
また、複数の周波数補正信号の計算方法から最も演算量の少ない計算方法を選択することで、単一の周波数補正信号の計算よりも処理量をさらに削減することができる。
【0232】
さらに、信号零判定手段を設けることで、復号信号が全て零であると判定された場合、通常の再符号化よりも簡略な方式を適用することができ、従来の再符号化方法に比べ演算量を削減することができる。
【図面の簡単な説明】
【図1】本発明による再符号化装置の第1実施形態の構成を示すブロック図である。
【図2】本発明による第1実施形態における動作を示すフローチャートである。
【図3】本発明による再符号化装置の第2実施形態の構成を示すブロック図である。
【図4】本発明による図3に示した第2実施形態における動作を示すフローチャートである。
【図5】本発明による再符号化装置の第2実施形態の異なる構成を示すブロック図である。
【図6】本発明による図5に示した第2実施形態における動作を示すフローチャートである。
【図7】(a)は8×8離散コサイン変換係数の一例を示す図であり、(b)は8×8離散コサイン変換係数の別の例を示す図である。
【図8】本発明による第2実施形態における有意係数が存在する範囲を示す図である。
【図9】本発明による図3に示した第2実施形態の実施例における動作を示すフローチャートである。
【図10】MPEG-2 VIDEOにおけるスキャン順を示す図である。
【図11】MPEG-2 VIDEOにおける離散コサイン変換係数の復号処理を示す図である。
【図12】(a)はGOP構成がIPPP・・・のストリームを再符号化した場合の、離散コサイン変換係数の属する範囲の割合を示す図であり、(b)はGOP構成がIBBP・・・のストリームを再符号化した場合の、離散コサイン変換係数の属する範囲の割合を示す図である。
【図13】本発明による再符号化装置の第3実施形態の構成を示すブロック図である。
【図14】本発明による再符号化装置の第3実施形態の異なる構成を示すブロック図である。
【図15】本発明による再符号化装置の第3実施形態の異なる構成を示すブロック図である。
【図16】本発明による第3実施形態における動作を示すフローチャートである。
【図17】本発明による第3実施形態の実施例における動作を示すフローチャートである。
【図18】(a)はGOP構成がIPPP・・・のストリームを再符号化した場合の、離散コサイン変換係数の属する範囲の割合を示す図であり、(b)はGOP構成がIBBP・・・のストリームを再符号化した場合の、離散コサイン変換係数の属する範囲の割合を示す図である。
【図19】本発明による再符号化装置の第4実施形態の構成を示すブロック図である。
【図20】本発明による第4実施形態における動作を示すフローチャートである。
【図21】本発明による再符号化装置の第5実施形態の構成を示すブロック図である。
【図22】本発明による図21に示した第5実施形態における動作を示すフローチャートである。
【図23】本発明による図21に示した第5実施形態の実施例における動作を示すフローチャートである。
【図24】(a)はGOP構成がIPPP・・・のストリームを再符号化した場合の、入力の変換係数に有意係数が含まれない場合に出力の変換係数に有意係数が含まれる割合を示す図であり、(b)はGOP構成がIBBP・・・のストリームを再符号化した場合の、入力の変換係数に有意係数が含まれない場合に出力の変換係数に有意係数が含まれる割合を示す図である。
【図25】MPEG-2ビットストリームを実際に再符号化した場合の、輝度信号の原画像に対するpeak signal to noise ratio (PSNR)を示すグラフである。
【図26】本発明による再符号化装置の第5実施形態の異なる構成を示すブロック図である。
【図27】本発明による再符号化装置の第6実施形態の構成を示すブロック図である。
【図28】本発明による図27に示した第6実施形態における動作を示すフローチャートである。
【図29】(a)はGOP構成がIPPP・・・のストリームを再符号化した場合の、離散コサイン変換係数の属する範囲の割合を示す図であり、(b)はGOP構成がIBBP・・・のストリームを再符号化した場合の、離散コサイン変換係数の属する範囲の割合を示す図である。
【図30】本発明による再符号化装置の第6実施形態の異なる構成を示すブロック図である。
【図31】本発明による第7実施形態における動作を示すフローチャートである。
【図32】本発明による第8実施形態における動作を示すフローチャートである。
【図33】本発明による第9実施形態における動作を示すフローチャートである。
【図34】本発明による再符号化装置をインプリメントした情報処理システムの一例を示す概略的ブロック構成図である。
【図35】基本的な再符号化装置の回路構成を示すブロック図である。
【図36】従来の再符号化装置の回路構成の一例を示すブロック図である。
【図37】従来の再符号化装置の回路構成の一例を示すブロック図である。
【符号の説明】
11 復号処理部
12 符号化処理部
13 信号補正部
14 信号分布計測部
15 信号零判定部
21 変換係数復号部
22 変換係数符号化部
201 可変長復号器
202 逆量子化器
203 逆離散コサイン変換器
204 加算器
205 動き補償器
206 メモリ
207 減算器
208 動き補償器
209 離散コサイン変換器
210 再量子化器
211 可変長符号化器
212 逆量子化器
213 逆離散コサイン変換器
214 加算器
215 メモリ
31 誤差信号動き補償部
301 減算器
302 離散コサイン変換器
303 減算器
304 逆離散コサイン変換器
305 メモリ
306 動き補償器
401 加算器
402 離散コサイン変換器
403 減算器
404 離散コサイン変換係数分布推定部
405 逆離散コサイン変換器
406 加算器
407 差分画素分布推定部
51 変換係数復号部
52 変換係数符号化部
53 周波数領域誤差信号動き補償部
501 可変長復号器
502 逆量子化器
503 減算器
504 可変長符号化器
505 逆量子化器
506 減算器
507 変換係数分布計測器
508 逆離散コサイン変換器
509 加算器
510 離散コサイン変換器
511 モード判定器
512 減算器
513 減算器
514 逆離散コサイン変換器
515 減算器
516 変換係数零判定器
517 メモリ
518 周波数領域動き補償器
519 加算器
601 プロセッサ
602 プログラムメモリ
603 記憶媒体
604 記憶媒体[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a re-encoding technique for compressed moving images, and more particularly to a compressed moving image re-encoding program, method, and apparatus for reducing the code amount of an input compressed moving image bit stream and outputting it.
[0002]
[Prior art]
When moving image signals are transmitted / stored in a digital broadcasting system or service, many moving image signals are compression-coded and transmitted / stored. In recent years, ISO / ICE IS13818-2 (MPEG-2 VIDEO) or the like has been standardized as a compression encoding method for moving image signals, and is used in digital broadcasting systems and services.
[0003]
Broadcasting stations and homes are expected to have applications and devices that re-encode compressed video bitstreams compressed and encoded at a predetermined bit rate into compressed video bitstreams of different bit rates and transmit or store them. For example, there is a long-time recording function in a digital moving image signal recording apparatus. A compressed video bit stream distributed from a broadcasting station to a home is encoded at a predetermined bit rate. When the viewer intends to record for a long time and records in a limited storage capacity, it is necessary to re-encode the compressed video bit stream at a bit rate lower than the bit rate at the time of distribution.
[0004]
Hereinafter, a conventional re-encoding apparatus that performs such bit rate conversion will be described by taking as an example a case of a compressed moving picture bit stream (hereinafter referred to as an MPEG-2 bit stream) that has been compression-encoded according to MPEG-2 VIDEO. To do.
[0005]
MPEG-2 VIDEO employs a hybrid coding scheme that combines discrete cosine transform and inter-frame prediction, and there are three picture types of I, P, and B. An I picture is a picture that is encoded using only intraframe prediction, a P picture is a picture that is encoded using intraframe prediction and forward interframe prediction, and a B picture is intraframe prediction and bidirectional It is a picture that is encoded using inter-frame prediction (including forward and backward prediction).
[0006]
I and P pictures are used as reference images for inter-frame prediction. Also, MPEG-2 VIDEO encoding is performed for each unit of a macroblock composed of a plurality of blocks. One block is composed of 8 pixels × 8 lines or 8 × 8 discrete cosine transform coefficients.
[0007]
FIG. 35 shows a basic re-encoding device. The re-encoding device has a configuration in which an MPEG-2 bit stream decoder and an encoder are connected in series. The decoder decodes the MPEG-2 bit stream into an image signal, and supplies the decoded image signal and reusable coding information to the encoder.
[0008]
The variable length decoder 201 decodes macroblock coding information such as a coding mode and a motion vector and a level value from the input MPEG-2 bit stream and supplies the decoded level value to the inverse quantizer 202. . Here, since the level value is scanned in order from the low frequency component and converted into one-dimensional information, the variable length decoder 201 also performs conversion into two-dimensional information. The inverse quantizer 202 performs inverse quantization on the level value to obtain a discrete cosine transform coefficient DCT [R1 (n)] and supplies it to the inverse discrete cosine transformer 203. Hereinafter, the variable length decoder 201 and the inverse quantizer 202 are collectively referred to as a transform coefficient decoding unit 21.
[0009]
Here, DCT [R1 (n)] represents a coefficient obtained by subjecting the prediction error signal R1 (n) to discrete cosine transform, and the subscript “1” represents a signal obtained by the decoder. n ′ represents the number of the image signal in the image signal sequence in the time direction (the same applies hereinafter). The inverse discrete cosine transformer 203 obtains a prediction error signal R1 (n) by performing inverse discrete cosine transformation on the discrete cosine transform coefficient DCT [R1 (n)], and supplies it to the adder 204. In MPEG-2 VIDEO, discrete cosine transform and inverse discrete cosine transform are performed in units of 8 × 8 blocks.
[0010]
If the macroblock coding method is inter-frame prediction, the motion compensator 205 uses the already decoded image signal I1 (n−1) and the motion vector V supplied from the variable length decoder 201 to perform motion compensation. MC is performed to obtain a predicted image signal MC [I1 (n−1), V] and supply it to the adder 204.
[0011]
In the case of inter-frame prediction, the adder 204 adds the prediction error signal R1 (n) and the predicted image signal MC [I1 (n-1), V] to obtain the image signal I1 (n). For prediction, the prediction error signal R1 (n) is set as the image signal I1 (n). The decoded image signal I1 (n) is supplied to the encoder. When the picture type is I or P picture, the image signal I 1 (n) is delayed as a reference image by the memory 206 and supplied to the motion compensator 205.
[0012]
The encoder re-encodes the image signal I1 (n) decoded by the decoder. In the case of inter-frame prediction, the motion compensator 208 performs motion compensation MC using the already decoded image signal I2 (n-1) and the motion vector V, so that the predicted image signal MC [I2 (n-1), V] is obtained and supplied to the subtractor 207. When the picture type is a P picture, the predicted image signal MC [I2 (n−1), V] is supplied to the adder 214.
[0013]
In the case of inter-frame prediction, the subtracter 207 subtracts the second predicted image signal MC [I2 (n-1), V] from the decoded image signal I1 (n) to obtain a prediction error signal R2 (n). Obtained and supplied to the discrete cosine transformer 209. For intra-frame prediction, the decoded image signal I1 (n) is supplied to the discrete cosine transformer 209 as a prediction error signal R2 (n). Here, the subscript “2” represents a signal obtained by the encoder, and “n” represents a time direction number of the image signal in the image signal sequence (the same applies hereinafter).
[0014]
The discrete cosine transformer 209 obtains a discrete cosine transform coefficient DCT [R2 (n)] by performing a discrete cosine transform on the prediction error signal R2 (n) and supplies it to the requantizer 210. The requantizer 210 quantizes the discrete cosine transform coefficient DCT [R2 (n)] to obtain a level value and supplies the level value to the variable length encoder 211. The variable length encoder 211 encodes the level value and the macroblock coding information, and generates and outputs an MPEG-2 bit stream obtained by bit rate conversion.
[0015]
When the picture type is I or P picture, the following processing is performed to decode the image signal I2 (n) and generate a reference image. The inverse quantizer 212 obtains a discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] by performing inverse quantization on the requantized discrete cosine transform coefficient and supplies it to the inverse discrete cosine transformer 213. . Hereinafter, the configurations of the requantizer 210, the variable length encoder 211, and the inverse quantizer 212 are collectively referred to as a transform coefficient encoding unit 22.
[0016]
Here, since quantization and inverse quantization are not reversible transforms, an error DCT [E2 (n)] is included in the discrete cosine transform coefficients obtained by the inverse quantizer. The inverse discrete cosine transformer 213 obtains a prediction error signal R2 (n) + E2 (n) by performing an inverse discrete cosine transform on the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)], and an adder (E2 (n) is hereinafter referred to as an error signal).
[0017]
For inter-frame prediction, the adder 214 adds the prediction image signal MC [I2 (n-1), V] obtained by the motion compensator 208 and the prediction error signal R2 (n) + E2 (n). Then, the image signal I2 (n) is obtained, and in the case of intra-frame prediction, the prediction error signal R2 (n) + E2 (n) is set as the image signal I2 (n). The image signal I 2 (n) is delayed in the memory 215 and supplied to the motion compensator 208.
[0018]
By using the re-encoding device with the basic configuration described above, it is possible to generate an MPEG-2 stream with bit rate conversion, but the processing amount is enormous and a memory for storing the decoded image signal is required. There's a problem.
[0019]
Therefore, conventional techniques in which the re-encoding device is simplified are described in Japanese Patent Laid-Open No. 8-51631, US Pat. No. 5,623,312, Japanese Patent Laid-Open No. 2001-186519, and Japanese Patent No. 3166501. . Here, the compressed moving image re-encoding device described in Japanese Patent Laid-Open Nos. 8-51631 and 2001-186519 will be described as an example.
[0020]
FIG. 36 is a circuit diagram showing an example of a re-encoding device described in Japanese Patent Laid-Open No. 8-51631. In this re-encoding device, a transform coefficient decoding unit 21 is provided as in FIG. 35, and a discrete cosine transform coefficient DCT [R1 (n)] is obtained from the input MPEG-2 bit stream and supplied to the subtractor 301. . In the case of inter-frame prediction, the motion compensator 306 performs motion compensation MC using the already decoded error signal E2 (n−1) and the motion vector V supplied from the transform coefficient decoding unit 21, and the error prediction signal MC. [E2 (n−1), V] is obtained and supplied to the discrete cosine transformer 302. The error signal E2 (n-1) is stored in the memory 305. Hereinafter, the configurations of the memory 305 and the motion compensator 306 are collectively referred to as an error signal motion compensation unit 31.
[0021]
In the case of inter-frame prediction, the discrete cosine transformer 302 performs a discrete cosine transform on the error prediction signal MC [E2 (n-1), V], thereby performing a discrete cosine transform coefficient DCT [MC [E2 (n-1)]. , V]] is obtained and supplied to the subtractor 301.
[0022]
In the case of inter-frame prediction, the subtractor 301 subtracts the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] from the discrete cosine transform coefficient DCT [R1 (n)] to obtain the discrete cosine transform coefficient. DCT [R2 (n)] is obtained and supplied to the transform coefficient coding unit 22. For intra-frame prediction, the discrete cosine transform coefficient DCT [R1 (n)] is supplied to the transform coefficient coding unit 22 as the discrete cosine transform coefficient DCT [R2 (n)]. Note that the transform coefficient encoding unit 22 is the same as the transform coefficient encoding unit 22 of FIG. 35 described above.
[0023]
The transform coefficient encoding unit 22 generates and outputs an MPEG-2 bit stream subjected to bit rate conversion from the discrete cosine transform coefficient DCT [R2 (n)].
[0024]
When the picture type is I or P picture, the error signal E2 (n) is decoded by performing the following processing. The transform coefficient encoding unit 22 supplies the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to the subtractor 303. The subtractor 303 subtracts the discrete cosine transform coefficient DCT [R2 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to obtain the discrete cosine transform coefficient DCT [E2 (n)]. To the inverse discrete cosine transformer 304. The inverse discrete cosine transformer 304 obtains an error signal E2 (n) by performing inverse discrete cosine transform on the discrete cosine transform coefficient DCT [E2 (n)], and supplies the error signal E2 (n) to the error signal motion compensation unit 31.
[0025]
FIG. 37 is a circuit diagram showing an example of a conventional re-encoding device described in Japanese Patent Laid-Open No. 2001-186519. This re-encoding device has a configuration in which a discrete cosine transform coefficient distribution estimation unit 404 and a difference pixel distribution estimation unit 407 are added to the re-encoding device described in US Pat. No. 5,623,312.
[0026]
Specifically, as illustrated in FIG. 37, the transform coefficient decoding unit 21 obtains a discrete cosine transform coefficient DCT [R1 (n)] from the input MPEG-2 bit stream and supplies it to the adder 401. When the picture type is I or P picture, the discrete cosine transform coefficient DCT [R1 (n)] is supplied to the subtractor 403.
[0027]
In the case of inter-frame prediction, the error signal motion compensation unit 31 performs motion compensation MC using the already decoded error signal -E2 (n-1) and the motion vector V, and generates an error prediction signal MC [-E2 (n- 1), V] is obtained and supplied to the difference pixel distribution estimation unit 407. When the picture type is I or P picture, the picture type is supplied to the adder 406.
[0028]
The difference pixel distribution estimation unit 407 examines the value of the error prediction signal MC [−E2 (n−1), V] for inter-frame prediction, and if no significant pixel exists, all the error prediction signals. Is set to zero and supplied to the discrete cosine transform 402. In the case of inter-frame prediction, the discrete cosine transformer 402 performs discrete cosine transform on the error prediction signal MC [-E2 (n-1), V], thereby obtaining a discrete cosine transform coefficient DCT [MC [-E2 (n -1), V]] is obtained and supplied to the adder 401.
[0029]
For inter-frame prediction, the adder 401 adds the discrete cosine transform coefficients DCT [R1 (n)] and DCT [MC [-E2 (n-1), V]] to add the discrete cosine transform coefficients DCT [ R2 (n)] is obtained and supplied to the transform coefficient encoding unit 22. For intra-frame prediction, the discrete cosine transform coefficient DCT [R1 (n)] is set as the discrete cosine transform coefficient DCT [R2 (n)] and supplied to the transform coefficient coding unit 22.
[0030]
The transform coefficient encoding unit 22 generates and outputs an MPEG-2 bit stream after bit rate conversion. When the picture type is I or P picture, the error signal -E2 (n) is decoded by performing the following processing.
[0031]
The transform coefficient encoding unit 22 supplies the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to the subtractor 403. The subtractor 403 subtracts the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] from the discrete cosine transform coefficient DCT [R1 (n)] to obtain the discrete cosine transform coefficient DCT [−E2 (n) −. MC [-E2 (n-1), V]] is obtained and supplied to the discrete cosine transform coefficient distribution estimation unit 404.
[0032]
The discrete cosine transform coefficient distribution estimation unit 404 examines the distribution of the discrete cosine transform coefficient DCT [-E2 (n) -MC [-E2 (n-1), V]], and if there is no significant coefficient, All coefficients are set to zero and supplied to inverse discrete cosine transform 405. The inverse discrete cosine transform 405 performs an inverse discrete cosine transform on the discrete cosine transform coefficient DCT [-E2 (n) -MC [-E2 (n-1), V]], thereby generating an error signal -E2 (n) -MC. [−E2 (n−1), V] is obtained and supplied to the adder 406. For inter-frame prediction, the adder 406 generates an error prediction signal MC [-E2 (n-1), V] and an error signal -E2 (n) -MC [-E2 (n-1), V]. The error signal -E2 (n) is obtained by addition and supplied to the error signal motion compensation unit 31, and if it is intra-frame prediction, the error signal -E2 (n) -MC [-E2 (n-1), V] Is set as an error signal -E2 (n) and supplied to the error signal motion compensation unit 31.
[0033]
As described above, in the re-encoding device using the error signal motion compensation, it is possible to suppress an increase in processing amount and a necessary memory capacity, and it is possible to realize processing equivalent to that of the re-encoding device in FIG.
[0034]
[Problems to be solved by the invention]
However, the conventional re-encoding device cannot realize efficient processing. Although the encoded information of the input compressed video bitstream is duplicated in the output compressed video bitstream or used for decoding, it is not used for speeding up the re-encoding process. This is because the characteristics of the stream are not taken into consideration.
[0035]
In the re-encoding device described in Japanese Patent Laid-Open No. 2001-186519, the distribution of discrete cosine transform coefficients and the value of the error prediction signal are examined, but the encoding information of the input compressed moving image bit stream is not used. Further, if the distribution estimation unit determines that it is not significant, all the discrete cosine transform coefficients are set to zero. As a result, a result different from the original result is obtained.
[0036]
An object of the present invention is to provide a re-encoding program, a re-encoding device, and a method that suppress the deterioration of image quality and realize bit rate conversion efficiently at high speed.
[0037]
[Means for Solving the Problems]
  According to the first embodiment of the present invention,
  A first step of calculating a decoded signal by dequantizing at least the quantized signal, using a compressed video bitstream of a predetermined encoding method using motion compensation and quantization as an input;
  A second step of calculating a correction signal by performing motion compensation on the accumulated past error signal;
  A third step of calculating a signal to be re-encoded by subtracting the correction signal from the decoded signal, re-quantizing the signal to be re-encoded, re-encoding and converting, and outputting a compressed video bit stream;
  RequantizationA fourth step of calculating and storing the current error signal, which is an error due to
  In a program for causing a computer to execute re-encoding processing of a compressed video bitstream having
  As a calculation method of the error signal,
A first calculation method for obtaining the error signal using the signal to be re-encoded and a second decoded signal obtained by dequantizing the re-quantized signal;
A second calculation method for obtaining the error signal using the decoded signal, the second decoded signal, and the correction signal;
Is prepared,
  A fifth step of measuring at least one of the signal value and distribution information of the decoded signal obtained in the first step and the signal value and distribution information of the second decoded signal obtained in the fourth step;
  A sixth step of estimating a calculation amount of the plurality of calculation methods based on at least one of the signal value and the distribution information measured in the fifth step;
  A seventh step of selecting a calculation method with the least amount of calculation according to the estimation result of the sixth step, and calculating the error signal;
  It is characterized by including.
[0038]
According to a second embodiment of the present invention, in the first embodiment described above, the predetermined encoding method is an encoding method combined with a conversion process to a frequency domain, and the decoded signal is a spatial domain image signal. A frequency decoded signal expressed by a frequency coefficient, the correction signal is a frequency correction signal expressed by a frequency coefficient, the signal to be re-encoded is a frequency encoded signal expressed by a frequency coefficient, and the second The decoded signal is a frequency second decoded signal expressed by a frequency coefficient, and the frequency correction signal includes a spatial first error signal that is a first error signal of a spatial region accumulated in the past, and the spatial first error signal. It is calculated using either of the frequency-converted frequency first error signals.
[0039]
Here, the signal value and distribution information are the signal value and distribution information of the reference signal, information on a position where the frequency coefficient is zero, information on a position where a plurality of frequency coefficients are zero, or non-frequency coefficients. It may be information as to whether the zero coefficient belongs to a plurality of preset frequency regions.
[0040]
According to the first embodiment and the second embodiment, the signal value and the distribution information are measured with reference to at least one of the signal and the control information, and the correction signal is calculated using the signal value and the distribution information. Therefore, it is possible to reduce the amount of calculation necessary for calculating the correction signal.
[0041]
According to the third embodiment, the sixth embodiment, and the seventh embodiment of the present invention, in the second embodiment, the frequency correction signal uses at least the frequency encoded signal and the frequency second decoded signal. A first calculation method including a step of calculating one of the current frequency first error signal and the spatial first error signal, the frequency decoded signal, the frequency second decoded signal, and the accumulated past A second calculation method including a step of calculating one of the current frequency first error signal and the first spatial error signal using a first frequency error signal and one of the first spatial error signal; It can be calculated by multiple calculation methods including
Estimating each calculation amount of the plurality of calculation methods, and selecting a calculation method having the smallest calculation amount according to the estimation result, and calculating the frequency correction signal.
[0042]
Since the calculation method with the least amount of calculation is selected from a plurality of frequency correction signal calculation methods, the processing amount can be reduced as compared with the calculation of a single frequency correction signal.
[0043]
According to the fourth embodiment of the present invention, for each unit of re-encoding processing or decoding processing, measuring whether the decoded signal is all zero, and if all are zero, the signal to be re-encoded And re-encoding as zero to store the correction signal as the current first error signal.
[0044]
According to the fifth and sixth embodiments of the present invention, in the second embodiment, for each re-encoding process or decoding process unit, measuring whether the decoded signal is all zero, And re-encoding the signal to be re-encoded as zero, and accumulating the frequency correction signal in one of the current frequency first error signal and the spatial first error signal. And
[0045]
Further, using the frequency decoded signal, the frequency second decoded signal, and the accumulated past frequency first error signal or the spatial first error signal, the current frequency first error signal or the spatial A first error signal may be calculated.
[0046]
The current frequency first error signal or the current spatial first error signal may be calculated using the frequency encoded signal and the frequency second decoded signal.
[0047]
According to the fourth embodiment, the fifth embodiment, and the sixth embodiment, a signal zero determination unit is provided, and when it is determined that the decoded signal is all zero, a scheme simpler than normal re-encoding Apply. Therefore, the amount of calculation can be reduced as compared with the conventional re-encoding method.
[0048]
According to an eighth embodiment of the present invention, in the second embodiment, there are two types of calculation methods of the frequency encoded signal, and the two types of calculation methods include the frequency decoded signal and the frequency correction signal. A frequency-encoded signal calculation method and a frequency-encoded signal calculation method using the frequency-decoded signal, and the two types of calculation methods are selected for each processing unit independent of the re-encoding process. Including the step of:
[0049]
In the eighth embodiment, a frequency encoded signal is calculated using the frequency decoded signal and the frequency correction signal only for each predetermined processing unit. Therefore, when the frequency encoded signal is calculated using the frequency decoded signal, the amount of calculation can be reduced.
[0050]
According to the ninth embodiment of the present invention, in the second embodiment, the quantization width for performing the requantization is equal to or less than the quantization width for performing the inverse quantization, for each encoding process or decoding process unit, or Determining whether an absolute value of a difference between a quantization width for performing requantization and a quantization width for performing dequantization is equal to or less than a threshold; and a quantum for performing the dequantization when the determination condition is satisfied The frequency-decoded signal is re-encoded as the frequency-encoded signal, and the frequency correction signal is converted into the current frequency first error signal and the spatial first error signal. And storing as one side.
[0051]
In the ninth embodiment, the frequency encoded signal is calculated according to the determination result of the determination condition of the quantization width for performing requantization and the quantization width for performing dequantization. If the determination condition is satisfied, a method simpler than normal re-encoding is applied. Therefore, the amount of calculation can be reduced as compared with the conventional re-encoding method.
[0052]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0053]
1) First embodiment
1-1) Configuration
Referring to FIG. 1, the first embodiment of the re-encoding device according to the present invention includes a decoding processing unit 11, an encoding processing unit 12, a signal correction unit 13, and a signal distribution measurement unit 14.
[0054]
The decoding processing unit 11 calculates the decoded signal by dequantizing at least the quantized signal from the input compressed video bitstream, and supplies the decoded signal to the encoding processing unit 12. When the decoded signal is used for the calculation of the current first error signal, the decoded signal is supplied to the signal correcting unit 13 and the signal distribution measuring unit 14, and the control information obtained at the time of decoding is supplied to the signal distribution measuring unit 14.
[0055]
The encoding processing unit 12 calculates a signal to be re-encoded using the decoded signal and the correction signal supplied from the signal correction unit 13, re-quantizes the signal to be re-encoded, re-encodes it, and compresses the compressed moving image bit. Output a stream. Further, when the second decoded signal obtained by dequantizing the signal to be recoded or the requantized signal is used for the calculation of the current first error signal, the signal is supplied to the signal correction unit 13 and the signal distribution measurement unit 14, Control information obtained at the time of encoding is supplied to the signal distribution measuring unit 14.
[0056]
The signal distribution measurement unit 14 includes control information obtained at least one of decoding and re-encoding, a decoded signal, a correction signal, a signal to be re-encoded, a second decoded signal, a decoded signal, and a correction Measuring at least one of the signal value and the distribution information with reference to at least one of the signal, the second error signal calculated using at least one of the signal, the signal to be recoded, and the second decoded signal; The calculation of the correction signal in the signal correction unit 13 is controlled. Here, the signal value is a pixel value for an image signal and a frequency coefficient value for a frequency signal.
[0057]
The signal correction unit 13 calculates a correction signal according to the control of the signal distribution measurement unit 14 using the accumulated past first error signal, and supplies the correction signal to the encoding processing unit 12. When the correction signal is used for calculation of the current first error signal, it is supplied to the signal correction unit 13 and the signal distribution measurement unit 14. In addition, using the decoded signal, the correction signal, the signal to be re-encoded, or the second decoded signal, the current first error signal is calculated and stored under the control of the signal distribution measuring unit 14 and used for the calculation of the correction signal.
[0058]
1-2) Operation
FIG. 2 is a flowchart showing the operation of the first embodiment according to the present invention.
[0059]
First, in step S101, at least a quantized signal is inversely quantized from the input compressed video bitstream to calculate a decoded signal. When the decoded signal is used for the calculation of the current first error signal, control information at the time of decoding is created.
[0060]
Subsequently, in step S102, a correction signal is calculated using the signal value or distribution information and the accumulated past first error signal, and the process proceeds to step S103.
[0061]
In step S103, a signal to be re-encoded is calculated using the decoded signal and the correction signal, and the signal to be re-encoded next is re-quantized and encoded again to output a compressed moving image bit stream. When the second decoded signal is used for the calculation of the current first error signal, control information at the time of encoding is created.
[0062]
Subsequently, in step S104, control information obtained at least one of decoding and re-encoding, a decoded signal, a correction signal, a signal to be re-encoded, a second decoded signal, a decoded signal, and a correction At least one of the signal value and the distribution information is measured with reference to at least one of the signal, the signal to be re-encoded, and the second error signal calculated using at least one of the second decoded signal.
[0063]
In step S105, the signal value and distribution information, and the current first error signal calculated using at least one of the decoded signal, the correction signal, the signal to be re-encoded, and the second decoded signal are accumulated and re-encoded. The process ends.
[0064]
As described above, in the first embodiment of the present invention, referring to the signal and the control information, the means for measuring at least one of the signal value and the distribution information, and the correction signal is calculated using the signal value and the distribution information. Means to do. Therefore, it is possible to reduce the amount of calculation necessary for calculating the correction signal.
[0065]
2) Second embodiment
The second embodiment according to the present invention is characterized in that the first embodiment is combined with a conversion process to a frequency space as an encoding method of a compressed moving image bitstream. Hereinafter, a re-encoding device using discrete cosine transform (DCT) is exemplified as frequency transform processing, but the present invention is not limited to this, and any frequency transform such as Hadamard transform or wavelet transform may be applied. It goes without saying that it is possible.
[0066]
2-1) First configuration example
Referring to FIG. 3, in the second embodiment of the re-encoding device according to the present invention, a transform coefficient decoding unit 51, a transform coefficient coding unit 52, an error signal motion compensation unit 31, a subtractor 503, a subtractor 506, a transform coefficient. A distribution measuring instrument 507, an inverse discrete cosine transformer 508, an adder 509, and a discrete cosine transformer 510 are included.
[0067]
The transform coefficient decoding unit 51 obtains a discrete cosine transform coefficient DCT [R1 (n)] from the input compressed video bitstream, and supplies it to the subtractor 503. When an image signal is referred to in inter-frame prediction, the discrete cosine transform coefficient DCT [R1 (n)] is supplied to the subtractor 506, and the distribution and coefficient values of the discrete cosine transform coefficient DCT [R1 (n)] are supplied. Such conversion coefficient information is supplied to the conversion coefficient distribution measuring instrument 507.
[0068]
Compared with the transform coefficient decoding unit 21 shown in FIG. 35 described in the prior art, the transform coefficient decoding unit 51 according to the second embodiment shown in FIG. 3 has a variable length decoder 501 and an inverse quantizer 502 that are discrete cosines. The difference is that the conversion coefficient information of the conversion coefficient DCT [R1 (n)] is output. Here, the transform coefficient information may be output by one of the variable length decoder 501 and the inverse quantizer 502.
[0069]
In the case of inter-frame prediction, the error signal motion compensation unit 31 obtains an error prediction signal MC [E2 (n−1), V] and supplies it to the discrete cosine transformer 510. When the image signal is referred to in inter-frame prediction, the error prediction signal MC [E2 (n−1), V] is supplied to the adder 509.
[0070]
In the case of inter-frame prediction, the discrete cosine transformer 510 performs discrete cosine transform on the error prediction signal MC [E2 (n-1), V], thereby performing a discrete cosine transform coefficient DCT [MC [E2 (n-1)]. , V]] is obtained and supplied to the subtracter 503.
[0071]
In the case of inter-frame prediction, the subtracter 503 subtracts the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] from the discrete cosine transform coefficient DCT [R1 (n)], and performs discrete cosine transform. The coefficient DCT [R2 (n)] is obtained and supplied to the transform coefficient coding unit 52, and if it is intra-frame prediction, the discrete cosine transform coefficient DCT [R1 (n)] is converted to the discrete cosine transform coefficient DCT [R2 (n)]. ] To the transform coefficient encoding unit 52.
[0072]
The transform coefficient encoding unit 52 generates and outputs a compressed moving image bitstream obtained by bit rate conversion. When the image signal is referred to in inter-frame prediction, the error signal E2 (n) is decoded by performing the following processing.
[0073]
First, the transform coefficient encoding unit 52 supplies the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to the subtractor 506, and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. The conversion coefficient information is supplied to the conversion coefficient distribution measuring instrument 507. Compared with the transform coefficient encoding unit 22 illustrated in FIG. 35 described in the related art, the transform coefficient encoding unit 52 of the second embodiment illustrated in FIG. 3 includes a variable length encoder 504 and an inverse quantizer 505. Differ in that transform coefficient information of discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] is output. Here, the transform coefficient information may be output from either the variable length encoder 504 or the inverse quantizer 505.
[0074]
The subtractor 506 subtracts the discrete cosine transform coefficient DCT [R1 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to obtain the discrete cosine transform coefficient DCT [E2 (n) −MC [ E2 (n−1), V]] is obtained and supplied to the transform coefficient distribution measuring instrument 507 and the inverse discrete cosine transformer 508.
[0075]
The transform coefficient distribution measuring device 507 includes transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)], and the discrete cosine transform coefficient DCT [E2 ( n) The coefficient information of the discrete cosine transform coefficient is created from -MC [E2 (n-1), V]] and supplied to the inverse discrete cosine transform 508. Here, in order to reduce the amount of measurement processing, the discrete cosine transform coefficient is calculated from the transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. In some cases, conversion coefficient information of DCT [E2 (n) -MC [E2 (n-1), V]] is created.
[0076]
The inverse discrete cosine transformer 508 performs an inverse discrete cosine transform on the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]] using the transform coefficient information, thereby generating an error signal E2. (n) −MC [E2 (n−1), V] is obtained and supplied to the adder 509. Here, the inverse discrete cosine transformer 508 includes a plurality of processing means and switches the processing means using the transform coefficient information.
[0077]
For inter-frame prediction, the adder 509 adds the error signal E2 (n) -MC [E2 (n-1), V] and the error prediction signal MC [E2 (n-1), V]. An error signal E2 (n) is obtained and supplied to the error signal motion compensation unit 31, and if it is intra-frame prediction, the error signal E2 (n) -MC [E2 (n-1), V] is converted into the error signal E2 (n ) To the error signal motion compensation unit 31.
[0078]
In the above description, motion compensation is performed on the error signal E2 (n) in the spatial domain. However, the present invention is applicable to any re-encoding device that generates discrete cosine transform coefficients DCT [E2 (n)]. For example, as described later, the configuration of FIG. 5 using motion compensation in the frequency domain is also applicable.
[0079]
2-2) First operation example
FIG. 4 is a flowchart showing the operation of the first configuration example shown in FIG.
[0080]
In step S1, it is determined whether or not the block to be re-encoded is a reference image. If it is a reference image, the process proceeds to step S2, and if it is not a reference image, the process proceeds to step S3.
[0081]
In step S2, coding information such as a coding mode and a motion vector and a discrete cosine transform coefficient DCT [R1 (n)] are obtained from the input compressed video bitstream, and the discrete cosine transform coefficient DCT [R1 (n)] is obtained. The conversion coefficient information is created, and the process proceeds to step S4.
[0082]
In step S3, encoding information such as an encoding mode and a motion vector and a discrete cosine transform coefficient DCT [R1 (n)] are obtained from the input compressed video bitstream, and the process proceeds to step S4.
[0083]
In step S4, it is determined whether or not the block to be re-encoded has been encoded using inter-frame prediction. If it is encoded using inter-frame prediction, the process proceeds to step S5. If it is encoded using intra-frame prediction, the discrete cosine transform coefficient DCT [R1 (n)] is converted to the discrete cosine transform coefficient DCT [R2 ( n)], the process proceeds to step S6.
[0084]
In step S5, motion compensation MC is performed using the already decoded error signal E2 (n-1) and the motion vector V to obtain an error prediction signal MC [E2 (n-1), V]. Subsequently, a discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] is obtained by performing a discrete cosine transform on the error prediction signal MC [E2 (n-1), V]. Next, the discrete cosine transform coefficient DCT [R2 (n)] is obtained by subtracting the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] from the discrete cosine transform coefficient DCT [R1 (n)]. The process proceeds to step S6.
[0085]
In step S6, it is determined whether or not the block to be re-encoded is a reference image. If it is a reference image, the process proceeds to step S7, and if it is not a reference image, the process proceeds to step S8.
[0086]
In step S7, the encoded information and the discrete cosine transform coefficient DCT [R2 (n)] are encoded, and a compressed moving picture bitstream obtained by bit rate conversion is generated. Subsequently, inverse quantization is performed to obtain a discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. Next, transform coefficient information of the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] is created, and the process proceeds to step S9.
[0087]
In step S8, the encoded information and the discrete cosine transform coefficient DCT [R2 (n)] are encoded to generate a compressed moving picture bitstream obtained by bit rate conversion, and the re-encoding process ends.
[0088]
In step S9, the discrete cosine transform coefficient DCT [E2 (n) -MC [E2] is obtained by subtracting the discrete cosine transform coefficient DCT [R1 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. (n-1), V]] is obtained, and the process proceeds to step S10.
[0089]
In step S10, the transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)], and the discrete cosine transform coefficient DCT [E2 (n) −MC The transform coefficient information of the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]] is created from [E2 (n-1), V]]. Next, using the transform coefficient information of the discrete cosine transform coefficient DCT [E2 (n) −MC [E2 (n−1), V]], the discrete cosine transform coefficient DCT [E2 (n) −MC [E2 (n -1), V]] is subjected to inverse discrete cosine transform to obtain an error signal E2 (n) -MC [E2 (n-1), V], and the process proceeds to step S11.
[0090]
In step S11, it is determined whether or not the block to be re-encoded has been encoded using inter-frame prediction. If it is encoded using inter-frame prediction, go to step S12. If it is encoded using intra-frame prediction, the error signal E2 (n) -MC [E2 (n-1), V] is The error signal E2 (n) is determined and the process proceeds to step S13.
[0091]
In step S12, the error signal E2 (n) -MC [E2 (n-1), V] and the error prediction signal MC [E2 (n-1), V] are added to obtain the error signal E2 (n). The process proceeds to step S13.
[0092]
In step S13, the error signal E2 (n) is stored in the memory, and the re-encoding process is terminated.
[0093]
2-3) Second configuration example
In the first configuration example, motion compensation is performed on the error signal E2 (n) in the spatial domain. However, as described below, a configuration using motion compensation in the frequency domain is also possible.
[0094]
In FIG. 5, the frequency domain motion compensator 518 uses the already decoded discrete cosine transform coefficient DCT [E2 (n-1)] and the motion vector V supplied from the transform coefficient decoding unit 51 in the case of inter-frame prediction. Frequency domain motion compensation DCT [MC] is performed to obtain a discrete cosine transform coefficient DCT [MC [E2 (n-1), V]], which is supplied to the subtractor 503. When the image signal is referred to in inter-frame prediction, the discrete cosine transform coefficient DCT [MC [E2 (n−1), V]] is supplied to the adder 519. The discrete cosine transform coefficient DCT [E2 (n-1)] is stored in the memory 517. Hereinafter, the configurations of the memory 517 and the frequency domain motion compensator 518 are collectively referred to as a frequency domain error signal motion compensation unit 53.
[0095]
The transform coefficient distribution measuring device 507 includes transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)], and the discrete cosine transform coefficient DCT [E2 ( n) -MC [E2 (n-1), V]] is used to create transform coefficient information of discrete cosine transform coefficients DCT [E2 (n) -MC [E2 (n-1), V]], and an adder 519 To supply.
[0096]
The adder 519 includes a plurality of processing means and switches the processing means using the conversion coefficient information. That is, using the transform coefficient information, for inter-frame prediction, the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]] and the discrete cosine transform coefficient DCT [MC [E2 ( n-1), V]] are added to obtain a discrete cosine transform coefficient DCT [E2 (n)], which is supplied to the frequency domain error signal motion compensation unit 53. For intra-frame prediction, the frequency domain error signal motion compensation unit uses the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]] as the discrete cosine transform coefficient DCT [E2 (n)]. 53.
[0097]
2-4) Second operation example
FIG. 6 is a flowchart showing the operation of the second configuration example shown in FIG. Steps similar to those in the flowchart of the first embodiment shown in FIG. 4 are denoted by the same reference numerals, and steps indicating different operations will be described in detail.
[0098]
If it is determined in step S4 that the prediction is inter-frame prediction (YES in S4), motion compensation MC is performed using the already decoded discrete cosine transform coefficient DCT [E2 (n-1)] and the motion vector V in step S121. The discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] is obtained. Next, the discrete cosine transform coefficient DCT [R1 (n)] is subtracted from the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] to obtain the discrete cosine transform coefficient DCT [R2 (n)]. The process proceeds to step S6.
[0099]
If it is determined in step S11 that the prediction is interframe prediction (YES in S11), in step S122, the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 ( n)] and the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]] to the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n- 1) Create conversion coefficient information for V]]. Next, using the transform coefficient information of the discrete cosine transform coefficient DCT [E2 (n) −MC [E2 (n−1), V]], the discrete cosine transform coefficient DCT [E2 (n) −MC [E2 (n -1), V]] and the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] are added to obtain the discrete cosine transform coefficient DCT [E2 (n)], and the process proceeds to step S123.
[0100]
In step S123, the discrete cosine transform coefficient DCT [E2 (n)] is stored in the memory, and the re-encoding process is terminated.
[0101]
From this, it can be seen that the second embodiment can also be applied in the frequency domain. The same applies to the following embodiments.
[0102]
2-5) Specific operation example
Next, an operation example of the first configuration example in the second embodiment will be described in detail using a specific example. Here, the input compressed video bitstream is an MPEG-2 VIDEO bitstream, but the present invention is not limited to this, and the same applies to a compressed video stream that has been compression-encoded by another method. Re-encoding can be realized by simple processing.
[0103]
2-5-1) Distribution information
First, the distribution information that is one of the conversion coefficient information will be described.
[0104]
FIG. 7 shows an example of 8 × 8 discrete cosine transform coefficients of the image signal. As the distribution information, for example, there is position information where a significant (non-zero) coefficient exists. In this case, in FIG. 7A, significant coefficients exist as distribution information (0,0), (0,1), (0,2), (1,0), (1,2), (1 , 3), (2, 0), (2, 1), (2, 2), (3, 0), and (3, 2) position information. Here, (0,0) represents the position of 0 row and 0 column. The same applies hereinafter.
[0105]
In addition, it is conceivable to hold position information of rows and columns in which all significant coefficients are not held, instead of holding position information of each significant coefficient. In this case, in FIG. 7A, the position information of the fourth, fifth, sixth and seventh rows and the fourth, fifth, sixth and seventh columns, all of which are zero, is held. In the above example, attention is paid to the position information of the zero coefficient. This is because the processing amount of the inverse discrete cosine transform can be reduced by using the position information of the zero coefficient. Specific examples are shown below.
[0106]
In MPEG-2 VIDEO, 8 × 8 inverse discrete cosine transform represented by the following equation is used.
[0107]
[Expression 1]
Figure 0004134572
[Expression 2]
Figure 0004134572
Here, f (x, y) represents a prediction error signal, and F (u, v) represents a discrete cosine transform coefficient.
[0108]
Consider a conversion coefficient having a significant coefficient only at (0,0) as shown in FIG. In this case, if the position information of the zero coefficient is not used, the inverse discrete cosine transform is performed according to Equations 1 and 2, but if the position information is used, it can be seen that the significant coefficient exists only in the DC component. . As a result, the 8 × 8 inverse discrete cosine transform of Equations 1 and 2 can be simplified by the following equation, and the processing amount of the inverse discrete cosine transform can be reduced.
[0109]
[Equation 3]
Figure 0004134572
As an example, the position information of the significant coefficient and the position information of the matrix that becomes zero are considered, but various kinds of distribution information can be considered. In this embodiment, a range in which a significant coefficient is included in a certain predetermined range is held as distribution information (hereinafter referred to as range information).
[0110]
Specifically, which range the discrete cosine transform coefficient belongs to among the four ranges shown in FIG. 8 is held as range information. In the case of the discrete cosine transform coefficient of FIG. 7A, it belongs to the range of “low frequency 4 × 4” and “8 × 8 component”, but in this case, the “low frequency 4 × 4 component having a narrow range”. "Belongs to the scope of". Similarly, in the case of FIG. 7B, it belongs to the range of “low frequency 1 × 1 component”.
[0111]
In the present embodiment, four types of ranges are used, but it goes without saying that the ranges can be combined with arbitrary coefficient positions and set with arbitrary types. In this embodiment, distribution information is used, but statistical information such as maximum value, average, and variance obtained from coefficient values can also be used.
[0112]
2-5-2) Specific operation
FIG. 9 is a flowchart showing a specific operation of the first configuration example shown in FIG. It is assumed that the processing is performed in units of macroblocks, and encoded information such as picture type and quantization matrix is decoded.
[0113]
In step S21, it is determined whether the picture type of the block to be re-encoded is an I picture or a P picture. If it is an I picture or a P picture, the process proceeds to step S22. If it is a B picture, the process proceeds to step S23.
[0114]
In step S22, encoding information such as an encoding mode and a motion vector, and a discrete cosine transform coefficient DCT [R1 (n)] are obtained from the input MPEG-2 bit stream. In this embodiment, the discrete cosine transform coefficient DCT [R1 (n)] is “no significant coefficient”, “low frequency 1 × 1 component”, “low frequency 4 × 4 component”, “8 × 8 component”. It is determined which range it belongs to and is held as range information. Then, the process proceeds to step S24.
[0115]
Range judgment
The range determination process in step S22 will be described. Since MPEG-2 VIDEO contains information (coded block pattern, skipped macroblock) indicating that the coefficients of the block are all zero, this encoded information is used to determine whether the block is "no significant coefficient". Can be judged.
[0116]
Next, range determination other than “no significant coefficient” will be described. First, the decoding process of discrete cosine transform coefficients in MPEG-2 VIDEO will be described.
[0117]
As described above, in MPEG-2 VIDEO, level values that are the result of quantizing discrete cosine transform coefficients are scanned in a predetermined order, converted into one-dimensional information, and encoded.
[0118]
As a specific conversion method, a zigzag scan and an alternate scan as shown in FIG. 10 are used. In addition, since there are many zero levels between level values that are non-zero when the level values are viewed in scan order, in MPEG-2, the number of consecutive zeros (RUN) and the level value immediately following it (LEVEL ) Are collectively encoded. Furthermore, since the level values after a certain coefficient are often all zero, a flag (EOB: end of block) indicating the end of the block is used. However, different encoding methods are used only for the DC component of intra-frame encoding. The decoding of the discrete cosine transform coefficient is to perform the inverse transform of encoding.
[0119]
A specific example of the decoding process is shown in FIG. In this example, (5,2), (6, -1), (0, -1), (3, -1), inter-frame prediction composed of EOB, and decoding of zigzag scanned blocks are performed. Here, (5,2) indicates that the number of zeros is 5, and the level value immediately after that is 2.
[0120]
First, the one-dimensional information is converted into two-dimensional information according to the scan order. Next, the level value converted into the two-dimensional information is inversely quantized according to the inverse quantization process defined by MPEG-2 VIDEO to obtain a discrete cosine transform coefficient.
[0121]
As can be understood from the above description, since the position information of the significant coefficient is obtained from the RUN and LEVEL information, it can be determined to which range the transform coefficient belongs during variable length decoding, inverse quantization, and variable length coding.
[0122]
Returning to FIG. 9, in step S23, encoding information such as an encoding mode and a motion vector and a discrete cosine transform coefficient DCT [R1 (n)] are obtained from the input MPEG-2 bit stream, and the process proceeds to step S24. .
[0123]
In step S24, it is determined whether or not the block to be re-encoded has been encoded using inter-frame prediction. If it is encoded using inter-frame prediction, the process proceeds to step S25. If it is encoded using intra-frame prediction, the discrete cosine transform coefficient DCT [R1 (n)] is converted to the discrete cosine transform coefficient DCT [R2 ( n)], the process proceeds to step S26.
[0124]
In step S25, motion compensation MC is performed using the already decoded error signal E2 (n-1) and the motion vector V to obtain an error prediction signal MC [E2 (n-1), V]. Subsequently, a discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] is obtained by performing a discrete cosine transform on the error prediction signal MC [E2 (n-1), V]. Next, the discrete cosine transform coefficient DCT [R1 (n)] is subtracted from the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] to obtain the discrete cosine transform coefficient DCT [R2 (n)]. The process proceeds to step S26.
[0125]
In step S26, it is determined whether the picture type of the block to be re-encoded is an I picture or a P picture. If it is an I picture or a P picture, the process proceeds to step S27. If it is a B picture, the process proceeds to step S28.
[0126]
In step S27, the encoded information and the discrete cosine transform coefficient DCT [R2 (n)] are encoded, and an MPEG-2 bit stream obtained by bit rate conversion is generated. Subsequently, inverse quantization is performed to obtain a discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. Next, the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] belongs to any range of “no significant coefficient”, “low frequency 1 × 1 component”, “low frequency 4 × 4 component”, and “8 × 8 component”. Is determined and stored as range information. Then, the process proceeds to step S29.
[0127]
In step S28, the encoded information and discrete cosine transform coefficient DCT [R2 (n)] are encoded to generate a bit rate converted MPEG-2 bit stream, and the re-encoding process is terminated.
[0128]
In step S29, the discrete cosine transform coefficient DCT [E2 (n) -MC [E2] is subtracted from the discrete cosine transform coefficient DCT [R1 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. (n-1), V]] is obtained, and the process proceeds to step S30.
[0129]
In step S30, from the range information of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)], the discrete cosine transform coefficient DCT [E2 (n) −MC [ E2 (n-1), V]] range information is obtained.
[0130]
In this embodiment, the wider range is set as range information of the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]]. When performing more accurate range determination, the conversion coefficient is subtracted and zero determination is performed. Next, using the range information of the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]], a processing means for inverse discrete cosine transform is selected, and the discrete cosine transform coefficient DCT [ An error signal E2 (n) -MC [E2 (n-1), V] is obtained by performing inverse discrete cosine transform on E2 (n) -MC [E2 (n-1), V]], and the process proceeds to step S31. Move.
[0131]
In step S31, it is determined whether or not the block to be re-encoded has been encoded using inter-frame prediction. If it is encoded using inter-frame prediction, the process proceeds to step S32. If it is encoded using intra-frame prediction, an error signal E2 (n) -MC [E2 (n-1), V] is set. The error signal E2 (n) is determined and the process proceeds to step S33.
[0132]
In step S32, the error signal E2 (n) -MC [E2 (n-1), V] and the error prediction signal MC [E2 (n-1), V] are added to obtain the error signal E2 (n). The process proceeds to step S33.
[0133]
In step S33, the error signal E2 (n) is stored in the memory, and the re-encoding process is terminated.
[0134]
FIG. 12 is a table showing the ratio of the range to which the output block of the subtracter 506 belongs when the MPEG-2 bit stream is actually re-encoded. Here, the measured block is a block using P picture and inter-frame prediction. The input MPEG-2 bit stream is encoded at 6 Mbps, and re-encoding is performed at 3 Mbps. Also, there are two types of MPEG-2 bitstream group of pictures (GOP) configurations, IPPPPPP ... and IBPBPBPBB ..., and the interval between I pictures is 15 frames.
[0135]
As apparent from FIG. 12, about 44% to 66% of the discrete cosine transform coefficients in the MPEG-2 bit stream are within the range of “low frequency 4 × 4 components”. Therefore, if the inverse discrete cosine transform is performed using the position information of the zero coefficient, the processing amount can be reduced as compared with the normal 8 × 8 inverse discrete cosine transform.
[0136]
The second embodiment includes means for obtaining transform coefficient information, and inverse discrete cosine transform means capable of switching a plurality of inverse discrete cosine transform processes using the transform coefficient information. Therefore, the processing amount of inverse discrete cosine transform can be reduced.
[0137]
3) Third embodiment
Next, a third embodiment of the present invention will be described in detail with reference to the drawings. Here, configurations and operations different from those of the second embodiment will be described.
[0138]
Referring to FIG. 13, the third embodiment of the re-encoding device according to the present invention includes a mode determination unit 511 added to the second embodiment, and further includes two selectable processing paths. When the first processing path is selected, the configuration is the same as that of the second embodiment, and when the second processing path is selected, the configuration is the same as that of the conventional re-encoding device shown in FIG. Hereinafter, the first processing path is referred to as mode 3-1, and the second processing path is referred to as mode 3-2.
[0139]
The mode determiner 511 estimates the overall processing amount in each mode from the transform coefficient information of the discrete cosine transform coefficients DCT [R1 (n)] and DCT [R2 (n)] and the processing amount of each block, and the processing amount Select a mode with less. Here, in the case of intra-frame prediction, mode 3-2 is selected. In FIG. 13, mode 3-2 is selected.
[0140]
First, the operation when the mode determiner 511 selects the mode 3-1 will be described. The subtractor 506 subtracts the discrete cosine transform coefficient DCT [R1 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to obtain the discrete cosine transform coefficient DCT [E2 (n) −MC [ E2 (n−1), V]] is obtained and supplied to the inverse discrete cosine transformer 508.
[0141]
The inverse discrete cosine transformer 508 performs an inverse discrete cosine transform on the discrete cosine transform coefficient DCT [E2 (n) -MC [E2 (n-1), V]] using the transform coefficient information, thereby generating an error signal E2. (n) −MC [E2 (n−1), V] is obtained and supplied to the adder 509. The adder 509 adds the error signal E2 (n) -MC [E2 (n-1), V] and the error prediction signal MC [E2 (n-1), V] to obtain the error signal E2 (n). It is obtained and supplied to the error signal motion compensation unit 31.
[0142]
Next, an operation when the mode determiner 511 selects the mode 3-2 will be described. The subtracter 506 subtracts the discrete cosine transform coefficient DCT [R2 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] to obtain the discrete cosine transform coefficient DCT [E2 (n)]. To the inverse discrete cosine transformer 508. The inverse discrete cosine transformer 508 obtains an error signal E2 (n) by performing inverse discrete cosine transform on the discrete cosine transform coefficient DCT [E2 (n)] using the transform coefficient information, and obtains an error signal motion compensation unit 31. To supply.
[0143]
In the third embodiment, the transform coefficient distribution measuring device 507 reduces only the discrete cosine transform coefficients DCT [R1 (n)] and DCT [R2 (n) + E2 (n)] in order to reduce the transform coefficient distribution measurement processing amount. Conversion coefficient information is generated from the data and supplied to the mode decision unit 511.
[0144]
In order to create more accurate conversion coefficient information, the configuration shown in FIG. 14 is adopted. In the configuration of FIG. 14, the subtractor 512 and the subtracter 513 perform subtraction of the discrete cosine transform coefficient in each mode and supply the result to the transform coefficient distribution measuring device 507.
[0145]
In the above description, the second embodiment is used as the first processing path. However, the processing path in the third embodiment is applicable to any re-encoding device that generates the error signal E2 (n) or the frequency conversion coefficient DCT [E2 (n)].
[0146]
FIG. 15 is a block diagram illustrating an example in which the processing path of mode 3-1 is different from that in FIG. In FIG. 15, mode 3-1 is selected. Even in this configuration, the operation of selecting a mode with a small processing amount by the mode determiner 511 is the same. Here, a configuration and operation different from those in FIG. 13 will be described.
[0147]
In FIG. 15, when the mode determiner 511 selects the mode 3-1, the inverse discrete cosine transformer 508 converts the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)] using the transform coefficient information. By performing inverse discrete cosine transform, a prediction error signal R2 (n) + E2 (n) is obtained and supplied to the adder 509.
[0148]
In the case of inter-frame prediction, the adder 509 adds the error prediction signal MC [E2 (n-1), V] and the prediction error signal R2 (n) + E2 (n) to generate the prediction error signal R1 (n ) + E2 (n) is obtained and supplied to the subtracter 515. For intra-frame prediction, the prediction error signal R2 (n) + E2 (n) is supplied to the subtracter 515 as the prediction error signal R1 (n) + E2 (n).
[0149]
The inverse discrete cosine transformer 514 obtains a prediction error signal R1 (n) by performing inverse discrete cosine transform on the discrete cosine transform coefficient DCT [R1 (n)] using the transform coefficient information, and supplies the prediction error signal R1 (n) to the subtractor 515. To do. The subtracter 515 subtracts the prediction error signal R1 (n) from the prediction error signal R1 (n) + E2 (n) to obtain an error signal E2 (n) and supplies it to the error signal motion compensation unit 31.
[0150]
FIG. 16 is a flowchart showing the operation of the third embodiment. Here, the same steps as those of the second embodiment shown in FIG. 4 are denoted by the same reference numerals, and only operations different from those of the second embodiment will be described.
[0151]
In step S41, the processing amount of each mode is estimated from the transform coefficient information of the discrete cosine transform coefficients DCT [R1 (n)] and DCT [R2 (n)] and the processing amount of each block, and the processing amount is small. Select a mode.
[0152]
Subsequently, in step S42, it is determined whether or not the selected mode is mode 3-1. If it is mode 3-1, the process proceeds to step S43. If it is mode 3-2, the process proceeds to step S44.
[0153]
In step S43, the error signal E2 (n) is obtained using the re-encoding method 2-1, stored in the memory, and the re-encoding process ends.
[0154]
In step S44, the error signal E2 (n) is obtained using the re-encoding method 2-2, stored in the memory, and the re-encoding process ends.
[0155]
3-1) Example of operation of the third embodiment
Next, the operation of the third embodiment will be described in detail using specific examples. In this embodiment, the input compressed video bit stream is similarly an MPEG-2 VIDEO bit stream.
[0156]
FIG. 17 is a flowchart showing the operation of the configuration example shown in FIG. It is assumed that the processing is performed in units of macroblocks, and encoded information such as picture type and quantization matrix is decoded. In addition, the same reference number is attached | subjected to the step similar to the flowchart of FIG. 9 which shows operation | movement of 2nd Embodiment, and description is abbreviate | omitted.
[0157]
In FIG. 17, when step 27 is completed, in step S51, mode selection is performed from the range of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. In this step, a mode with a small processing amount is selected from the total processing amount in each mode. In the case of the present embodiment, the amount of processing in mode 3-1 and mode 3-2 is determined by the amount of processing of inverse discrete cosine transform and addition / subtraction. Although the amount of processing varies greatly depending on the implementation method, in this embodiment, the processing amount of the discrete cosine transform of “low frequency 4 × 4 component” and the addition of the adder 509 is smaller than the processing amount of the discrete cosine transform of “8 × 8 component”. To do. As a result, when the range information of the discrete cosine transform coefficients DCT [R1 (n)] and DCT [R2 (n) + E2 (n)] are both “8 × 8 components”, the mode 3-2 is selected, and the others In this case, mode 3-1 is selected. However, in the case of intra-frame prediction, mode 3-2 is selected.
[0158]
Here, in order to obtain the overall processing amount in mode 3-2, the range information of the discrete cosine transform coefficient that is the output of the subtractor 506 should be considered, but the output of the subtractor 506 includes the value before quantization. Since discrete cosine transform coefficients are included, many discrete cosine coefficients belong to the range of “8 × 8 components”. Therefore, in the present embodiment, the processing amount of the two modes is estimated from the range of the discrete cosine transform coefficients DCT [R1 (n)] and DCT [R2 (n) + E2 (n)], and the mode is selected.
[0159]
FIG. 18 is a table showing the ratio of the range to which the output block of the subtracter 506 belongs when the MPEG-2 bit stream is actually re-encoded using the method of FIG. Here, the measured block is a block using P picture and inter-frame prediction. The input stream and the like are the same as in FIG. As apparent from FIG. 18, about 83 to 94% of the discrete cosine transform coefficients in the MPEG-2 bit stream belong to the range of “8 × 8 components”.
[0160]
In step S52, it is determined whether or not the selected mode is mode 3-1. If it is mode 3-1, the process proceeds to step S29, and if it is mode 3-2, the process proceeds to step S53.
[0161]
In step S53, the discrete cosine transform coefficient DCT [E2 (n)] is obtained by subtracting the discrete cosine transform coefficient DCT [R2 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. Control goes to step S54.
[0162]
In step S54, using the range information of the discrete cosine transform coefficient DCT [R1 (n)] and the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)], the discrete cosine transform coefficient DCT [E2 (n)] The error signal E2 (n) is obtained by performing the inverse discrete cosine transform, and the process proceeds to step S33.
[0163]
The third embodiment includes mode determination means for estimating the overall processing amount in each mode from the transform coefficient information and the processing amount of each block, and selecting the re-encoding method with the smallest processing amount. Therefore, the processing amount can be reduced as compared with the single-mode re-encoding method.
[0164]
4) Fourth embodiment
Next, a fourth embodiment of the present invention will be described in detail with reference to the drawings. However, the same blocks as those in the first embodiment shown in FIG. 1 are denoted by the same reference numerals, and here, configurations and operations different from those in the first embodiment will be described.
[0165]
Referring to FIG. 19, in the re-encoding device according to the fourth embodiment of the present invention, a signal zero determination unit 15 is added to the configuration of the first embodiment. The fourth embodiment has two processing paths. The first processing pass is a normal re-encoding pass, and the second processing pass will be described below. The first processing path is referred to as mode 4-1, and the second processing path is referred to as mode 4-2.
[0166]
At least a part of the signal is decoded from the input compressed video bitstream, and the decoded signal or the control information obtained at the time of decoding is supplied to the signal zero determination unit 15. The signal zero determination unit 15 determines whether the decoded signal is all zero for each encoding process unit or each decoding process unit from the decoded signal or control information obtained at the time of decoding. If all are zero, mode 4-2 is selected, otherwise mode 4-1 is selected. In FIG. 19, mode 4-2 is selected. The operation when mode 4-1 is selected is the same as the operation of the first embodiment. Therefore, the operation when mode 4-2 is selected will be described here.
[0167]
When mode 4-2 is selected, the encoding processing unit 12 performs encoding again with the encoded signal set to zero. The signal correction unit 13 calculates a correction signal using the accumulated signal and supplies it to the signal correction unit 13.
[0168]
FIG. 20 is a flowchart showing the operation of the fourth embodiment shown in FIG. Here, only operations different from the flowchart of the first embodiment shown in FIG. 2 will be described.
[0169]
In step S111, it is determined whether or not the decoded signals are all zero. If all are zero, the process proceeds to step S112, and if not, the process proceeds to step S103.
[0170]
In step S112, the encoded signal is set to zero, encoding is performed again, the calculated correction signal is accumulated, and the re-encoding process is terminated.
[0171]
As described above, in the fourth embodiment, the signal zero determination unit is provided, and when it is determined that the decoded signal is all zero, a method simpler than normal re-encoding is applied. As a result, the processing amount can be reduced as compared with the conventional re-encoding device.
[0172]
5) Fifth embodiment
Next, a fifth embodiment of the present invention will be described in detail with reference to the drawings. The fifth embodiment is characterized in that a conversion process to a frequency space is combined as a coding method of a compressed moving image bitstream with respect to the fourth embodiment. Here, the same reference numerals are assigned to the same blocks as those in the second embodiment shown in FIG. 3, and configurations and operations different from those in the second embodiment will be described.
[0173]
Referring to FIG. 21, the re-encoding device according to the fifth embodiment of the present invention has a configuration in which a transform coefficient zero determiner 516 is added to the second embodiment shown in FIG. The fifth embodiment has two processing paths. The first processing path is the same as in the second embodiment, and the second processing path will be described below. Here, the first processing path is referred to as mode 5-1, and the second processing path is referred to as mode 5-2.
[0174]
The transform coefficient decoding unit 51 obtains a discrete cosine transform coefficient DCT [R1 (n)] from the input compressed video bitstream, and transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)] is a transform coefficient zero determiner. To 516.
[0175]
The transform coefficient zero determiner 516 determines whether or not a significant coefficient is included in the discrete cosine transform coefficient from the transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)]. If a significant coefficient is included in the discrete cosine transform coefficient, mode 5-1 is selected, and transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)] is supplied to the transform coefficient distribution measuring instrument 507. If no significant coefficient is included (all conversion coefficients are zero), mode 5-2 is selected. In FIG. 21, mode 5-2 is selected. Since the operation when the mode 5-1 is selected is the same as the operation of the second embodiment, the operation when the mode 5-2 is selected will be described.
[0176]
When the mode 5-2 is selected, the transform coefficient encoding unit 52 generates and outputs a compressed moving picture bitstream obtained by bit rate conversion with the discrete cosine transform coefficient DCT [R2 (n)] set to zero.
[0177]
The error signal motion compensation unit 31 obtains an error prediction signal MC [E2 (n−1), V] if the image signal is referred to in the inter-frame prediction, and the error prediction signal MC [E2] (n−1), V] is set as an error signal E2 (n) and supplied to the error signal motion compensation unit 31. In the case of intra-frame prediction, the error signal E2 (n) is set to zero and supplied to the error signal motion compensation unit 31.
[0178]
As in the example of the second embodiment shown in FIG. 5, the configuration of FIG. 26 using motion compensation in the frequency domain is also applicable.
[0179]
FIG. 22 is a flowchart showing the operation of the fifth embodiment shown in FIG. Here, only operations different from the flowchart of the second embodiment shown in FIG. 4 will be described.
[0180]
In FIG. 22, in the case of inter-frame prediction (YES in step S4), motion compensation MC is performed using the already decoded error signal E2 (n-1) and the motion vector V in step S61, and the error prediction signal MC [ E2 (n-1), V] is obtained, and the process proceeds to step S62.
[0181]
In step S62, it is determined whether or not a significant coefficient is included in the block to be re-encoded using the transform coefficient information. If a significant coefficient is included, the process proceeds to step S63, and if all the coefficients are zero, the process proceeds to step S6.
[0182]
In step S63, a discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] is obtained by performing a discrete cosine transform on the error prediction signal MC [E2 (n-1), V]. Next, the discrete cosine transform coefficient DCT [R1 (n)] is subtracted from the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] to obtain the discrete cosine transform coefficient DCT [R2 (n)]. The process proceeds to step S6.
[0183]
If it is determined in step S6 that the image is a reference image, it is determined in step S64 whether or not a significant coefficient is included in the block to be re-encoded using the transform coefficient information. If a significant coefficient is included, the process proceeds to step S7. If all the coefficients are zero, the process proceeds to step S65.
[0184]
In step S65, the discrete cosine transform coefficient DCT [R2 (n)] is set to zero, the transform coefficient and the encoded information are encoded, and a compressed moving picture bitstream subjected to bit rate conversion is generated. In the case of inter-frame prediction, the error prediction signal MC [E2 (n-1), V] is set as the error signal E2 (n). In the case of intra-frame prediction, the error signal E2 (n) is set to zero, and the process proceeds to step S13. Move.
[0185]
Next, the operation of the fifth embodiment will be described in detail using specific examples. In this embodiment, the input compressed video bit stream is similarly an MPEG-2 VIDEO bit stream.
[0186]
FIG. 23 is a flowchart showing the operation of the first example of the fifth embodiment. In this embodiment, since a zero determination is performed for each block, an operation in units of blocks is shown. Here, in MPEG-2 VIDEO, motion compensation is performed in units of macroblocks, but in order to simplify the flowchart, it is performed in units of blocks.
[0187]
The zero determination in MPEG-2 VIDEO may use information (coded block pattern, skipped macroblock) indicating that the block coefficients are all zero as described above.
[0188]
Hereinafter, only operations different from the flowchart of the second embodiment illustrated in FIG. 9 will be described.
[0189]
In FIG. 23, in the case of inter-frame prediction (YES in step S24), in step S71, motion compensation MC is performed using the already decoded error signal E2 (n-1) and the motion vector V, and the error prediction signal MC [ E2 (n-1), V] is obtained, and the process proceeds to step S72.
[0190]
In step S72, it is determined whether or not a significant coefficient is included in a block to be re-encoded using information at the time of decoding. If a significant coefficient is included, the process proceeds to step S73, and if all the coefficients are zero, the process proceeds to step S26.
[0191]
In step S73, a discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] is obtained by performing a discrete cosine transform on the error prediction signal MC [E2 (n-1), V]. Next, the discrete cosine transform coefficient DCT [R1 (n)] is subtracted from the discrete cosine transform coefficient DCT [MC [E2 (n-1), V]] to obtain the discrete cosine transform coefficient DCT [R2 (n)]. The process proceeds to step S26.
[0192]
If it is an I picture or P picture (YES in step S26), in step S74, it is determined whether or not a significant coefficient is included in a block to be re-encoded using information at the time of decoding. If a significant coefficient is included, the process proceeds to step S27. If all the coefficients are zero, the process proceeds to step S75.
[0193]
In step S75, the discrete cosine transform coefficient DCT [R2 (n)] is set to zero, the transform coefficient and the encoded information are encoded, and an MPEG-2 bit stream subjected to bit rate conversion is generated. Further, if it is inter-frame prediction, the error prediction signal MC [E2 (n-1), V] is set to the error signal E2 (n). If it is intra-frame prediction, the error signal E2 (n) is set to zero. Move on to S33.
[0194]
FIG. 24 is a table showing a ratio of blocks having no significant coefficient in the input conversion coefficient and having a significant coefficient in the output conversion coefficient when the MPEG-2 bitstream is actually re-encoded. . The input stream and the like are the same as in FIG.
[0195]
As is apparent from FIG. 24, when the input conversion coefficient does not include a significant coefficient, the ratio of the output conversion coefficient including the significant coefficient is within 3.3%, which is low.
[0196]
FIG. 25 shows the luminance signal with respect to the original image when the ratio of blocks in which no significant coefficient is included in the input stream is high and the effect of error accumulation (GOP configuration IPPP...) Sequence 4 is re-encoded. It is a graph which shows peak signal to noise ratio (PSNR). Here, the vertical axis represents PSNR, and the horizontal axis represents the frame number.
[0197]
This graph shows the case where the example of the second embodiment is used and the case where the example of the fifth embodiment to which the simplified method is applied is used. As is apparent from the graph, the average PSNR of the two methods is 24.98 dB, and the influence of image quality deterioration due to simplification is small. It can also be seen that there is no deterioration in image quality due to error accumulation.
[0198]
The fifth embodiment includes discrete cosine transform coefficient zero determination means, and when it is determined that a significant coefficient is not included in the transform coefficient, a method simpler than normal re-encoding is applied. Since the simplified method omits the processing of discrete cosine transform, quantization, and inverse discrete cosine transform, the processing amount can be reduced as compared with the conventional re-encoding device. Although the image quality degradation occurs by applying the simplified method, the influence of the image quality degradation is small because the ratio of the significant coefficient included in the output conversion coefficient is low when the input conversion coefficient is not originally included in the input conversion coefficient.
[0199]
However, the ratio of the significant coefficient included in the output transform coefficient differs depending on the quantization width of requantization. Therefore, the transform coefficient zero determiner 516 may be operated so as to select the second processing path (mode 5-2) only when the quantization width of requantization exceeds a predetermined threshold.
[0200]
6) Sixth embodiment
Next, a sixth embodiment of the present invention will be described in detail with reference to the drawings.
[0201]
The sixth embodiment is a combination of the third embodiment and the fifth embodiment. Here, configurations and operations different from those in the third embodiment and the fifth embodiment will be described.
[0202]
Referring to FIG. 27, the re-encoding device according to the sixth embodiment of the present invention includes two processing paths. The first processing pass is the same as the configuration of the re-encoding device shown in FIG. 36, and the second processing pass is the same as the second pass (mode 5-2) of the fifth embodiment. Hereinafter, the first processing path is referred to as mode 6-1 and the second processing path is referred to as mode 6-2.
[0203]
As shown in FIG. 27, the transform coefficient zero determiner 516 in the sixth embodiment determines whether a discrete cosine transform coefficient includes a significant coefficient from the transform coefficient information of the discrete cosine transform coefficient DCT [R1 (n)]. And select a processing path. Therefore, the mode determiner 511 in the third embodiment is not necessary.
[0204]
As in the case of the second embodiment, the configuration of FIG. 30 using motion compensation in the frequency domain is also applicable. In this configuration, since the adder 519 does not exist, the conversion coefficient distribution measuring device 507 is not necessary.
[0205]
FIG. 28 is a flowchart showing the operation of the sixth embodiment shown in FIG. Hereinafter, only operations different from the flowchart of the fifth embodiment shown in FIG. 22 will be described.
[0206]
In FIG. 28, in step S81, the discrete cosine transform coefficient DCT [E2 (n)] is subtracted by subtracting the discrete cosine transform coefficient DCT [R2 (n)] from the discrete cosine transform coefficient DCT [R2 (n) + E2 (n)]. ] And proceeds to step S82.
[0207]
In step S82, the inverse cosine transform is performed on the discrete cosine transform coefficient DCT [E2 (n)] using the transform coefficient information to obtain an error signal E2 (n), and the process proceeds to step S13.
[0208]
FIG. 29 is a table showing a ratio of a range to which an input conversion coefficient belongs when an MPEG-2 bit stream is decoded. Here, the measured block is a block using P picture and inter-frame prediction. The input stream and the like are the same as in FIG. As is clear from FIG. 29, about 25 to 49% of the input conversion coefficients in the MPEG-2 bit stream belong to the range of “no significant coefficient”.
[0209]
Similar to the fifth embodiment, the sixth embodiment includes discrete cosine transform coefficient zero determination means, and when it is determined that a significant coefficient is not included in the transform coefficient, the sixth embodiment is simpler than normal re-encoding. Apply the method. As a result, the amount of processing can be reduced compared to the conventional re-encoding device shown in FIG.
[0210]
7) Seventh embodiment
In the third embodiment, as described in FIGS. 16 and 17, the processing amount in the two modes is estimated from the transform coefficient information and the processing amount of each block, and the mode with the smaller processing amount is selected.
[0211]
On the other hand, according to the seventh embodiment, the re-encoding device includes N types of re-encoding schemes. In this case, the total processing amount in the N types of modes is estimated from the transform coefficient information and the processing amount of each block, and a mode with a small processing amount is selected. Therefore, since the re-encoding method with the smallest processing amount is selected, the re-encoding processing amount can be reduced. Here, it is needless to say that the seventh embodiment is also a re-encoding system that generates the error signal E2 (n) or the discrete cosine transform coefficient DCT [E2 (n)], as in the third embodiment. It can be applied, and furthermore, a simplified method as in the fifth embodiment is also applicable.
[0212]
FIG. 31 is a flowchart showing the operation of the seventh embodiment. Hereinafter, only operations different from the flowchart of the third embodiment shown in FIG. 16 will be described.
[0213]
In step S91, the total processing amount in the N types of modes is estimated from the transform coefficient information of the discrete cosine transform coefficients DCT [R1 (n)] and DCT [R2 (n)] and the processing amount of each block. Select a mode with less.
[0214]
Subsequently, in step S92, it is determined whether or not mode 7-1 is selected. If mode 7-1 is selected, the process proceeds to step S93, and if mode 7-2 is selected, the process proceeds to selection of mode 7-2.
[0215]
In step S93, the error signal E2 (n) is obtained using the re-encoding method 7-1, stored in the memory, and the re-encoding process is terminated. After the determination in mode 7-2, the same processing as in step S92 and step S93 is performed. In step S94, it is determined whether or not mode 7- (N-1) has been selected. If mode 7- (N-1) is selected, the process proceeds to step S95. If mode 7-N is selected, the process proceeds to step S96.
[0216]
In step S95, the error signal E2 (n) is obtained using the re-encoding method 5- (N-1) and stored in the memory, and the re-encoding process is terminated. In step S96, the error signal E2 (n) is obtained using the re-encoding method 5-N and stored in the memory, and the re-encoding process is terminated.
[0217]
8) Eighth embodiment
In the fifth embodiment shown in FIG. 22, when a significant coefficient exists (YES in step S62), step S63 is executed, whereas the re-encoding device according to the eighth embodiment inputs a compressed moving picture bitstream. Step S63 is performed for each processing unit that does not depend on the re-encoding process.
[0218]
FIG. 32 is a flowchart showing the operation of the eighth embodiment of the present invention. Hereinafter, only operations different from the flowchart of the fifth embodiment shown in FIG. 22 will be described.
[0219]
In FIG. 32, in step S131, it is determined whether or not it is time to correct the discrete cosine transform coefficient DCT [R1 (n)]. If it is time of correction, it will move to Step S63, and if it is not time of correction, it will move to Step S6.
[0220]
In the eighth embodiment, the discrete cosine transform coefficient DCT [R1 (n)] is corrected only for each predetermined processing unit. Therefore, when correction is not performed, the processing amount of discrete cosine transform and subtraction can be reduced. Various processing units for correcting the discrete cosine transform coefficient DCT [R1 (n)] can be considered. For example, it is conceivable to perform correction every other frame or every plurality of blocks.
[0221]
As in the case of the second embodiment, the eighth embodiment can also be applied to a configuration using motion compensation in the frequency domain.
[0222]
9) Ninth embodiment
In the fifth embodiment shown in FIG. 22, when a significant coefficient exists (YES in step S62), step S63 is executed, whereas the re-encoding device according to the ninth embodiment performs a requantization quantum. It is determined whether the quantization width is equal to or less than the quantization width for performing inverse quantization, or whether the absolute value of the difference between the quantization width for performing requantization and the quantization width for performing inverse quantization is equal to or less than a predetermined threshold. When the above condition is not satisfied, step S63 is performed.
[0223]
FIG. 33 is a flowchart showing the operation of the ninth embodiment. Hereinafter, only operations different from the flowchart of the fifth embodiment shown in FIG. 22 will be described.
[0224]
In step S141, the quantization width for performing requantization is equal to or smaller than the quantization width for performing dequantization, or the absolute value of the difference between the quantization width for performing requantization and the quantization width for performing dequantization is determined. It is determined whether or not it is below the threshold value. If the condition is satisfied, the process proceeds to step S6, and if not, the process proceeds to step S63.
[0225]
In step S142, the quantization width for performing requantization is equal to or smaller than the quantization width for performing inverse quantization, or the absolute value of the difference between the quantization width for performing requantization and the quantization width for performing inverse quantization is determined. It is determined whether or not it is below the threshold value. If the above condition is satisfied, the quantization width that has been subjected to inverse quantization is set to the quantization width that is to be requantized, and the process proceeds to step S65. If not, the process proceeds to step S7.
[0226]
In the ninth embodiment, the discrete cosine transform coefficient DCT [R1 (n)] is corrected according to the determination result of the determination condition of the quantization width for performing requantization and the quantization width for performing dequantization. Therefore, when correction is not performed, the processing amount of discrete cosine transform and subtraction can be reduced. Further, since the quantization width for performing quantization is set to the quantization width for performing requantization, an error due to requantization does not occur. Therefore, it is possible to reduce the processing amount of requantization and inverse discrete cosine transform.
[0227]
As in the case of the second embodiment, the ninth embodiment can be applied to a configuration using motion compensation in the frequency domain.
[0228]
10) Computer system
FIG. 34 is a schematic block diagram showing an example of an information processing system that implements the re-encoding device according to the present invention. As is clear from the above description, the re-encoding device according to the present invention can be configured by hardware, but can also be realized by a computer program.
[0229]
The information processing system shown in FIG. 34 includes a processor 601, a program memory 602, and storage media 603 and 604. The storage media 603 and 604 may be separate storage media or different storage areas of the same storage medium. As the storage medium, a magnetic storage medium such as a hard disk can be used.
[0230]
【The invention's effect】
As described above in detail, according to the present invention, a signal value or distribution information is measured with reference to a signal and control information, and a correction signal is calculated using the signal value or distribution information. For this reason, it is possible to reduce the amount of calculation required for calculating the correction signal and to realize high-speed bit rate conversion.
[0231]
Further, by selecting a calculation method with the least amount of calculation from among a plurality of frequency correction signal calculation methods, the processing amount can be further reduced as compared with the calculation of a single frequency correction signal.
[0232]
Furthermore, by providing a signal zero determination means, when it is determined that the decoded signal is all zero, a method simpler than the normal re-encoding can be applied, and the calculation is performed in comparison with the conventional re-encoding method. The amount can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a first embodiment of a re-encoding device according to the present invention.
FIG. 2 is a flowchart showing an operation in the first embodiment according to the present invention.
FIG. 3 is a block diagram showing a configuration of a second embodiment of a re-encoding device according to the present invention.
4 is a flowchart showing an operation in the second embodiment shown in FIG. 3 according to the present invention.
FIG. 5 is a block diagram showing a different configuration of the second embodiment of the re-encoding device according to the present invention.
6 is a flowchart showing an operation in the second embodiment shown in FIG. 5 according to the present invention.
7A is a diagram illustrating an example of an 8 × 8 discrete cosine transform coefficient, and FIG. 7B is a diagram illustrating another example of an 8 × 8 discrete cosine transform coefficient.
FIG. 8 is a diagram showing a range in which a significant coefficient exists in the second embodiment according to the present invention.
FIG. 9 is a flowchart showing an operation in the example of the second embodiment shown in FIG. 3 according to the present invention.
FIG. 10 is a diagram illustrating a scan order in MPEG-2 VIDEO.
FIG. 11 is a diagram illustrating a decoding process of discrete cosine transform coefficients in MPEG-2 VIDEO.
12A is a diagram illustrating a ratio of a range to which a discrete cosine transform coefficient belongs when a stream having a GOP configuration of IPPP... Is re-encoded, and FIG. It is a figure which shows the ratio of the range to which a discrete cosine transform coefficient belongs when the stream of * is re-encoded.
FIG. 13 is a block diagram showing a configuration of a third embodiment of a re-encoding device according to the present invention.
FIG. 14 is a block diagram showing a different configuration of the third embodiment of the re-encoding device according to the present invention.
FIG. 15 is a block diagram showing a different configuration of the third embodiment of the re-encoding device according to the present invention.
FIG. 16 is a flowchart showing an operation according to the third embodiment of the present invention.
FIG. 17 is a flowchart showing an operation in an example of the third embodiment according to the present invention;
18A is a diagram showing a ratio of a range to which a discrete cosine transform coefficient belongs when a stream having a GOP configuration of IPPP... Is re-encoded, and FIG. It is a figure which shows the ratio of the range to which a discrete cosine transform coefficient belongs when the stream of * is re-encoded.
FIG. 19 is a block diagram showing a configuration of a fourth embodiment of a re-encoding device according to the present invention.
FIG. 20 is a flowchart showing an operation according to the fourth embodiment of the present invention.
FIG. 21 is a block diagram showing a configuration of a fifth embodiment of a re-encoding device according to the present invention.
22 is a flowchart showing an operation in the fifth embodiment shown in FIG. 21 according to the present invention.
FIG. 23 is a flowchart showing an operation in the example of the fifth embodiment shown in FIG. 21 according to the present invention.
FIG. 24 (a) shows a ratio of a significant coefficient included in an output transform coefficient when a significant coefficient is not included in an input transform coefficient when a stream whose GOP configuration is IPPP ... is re-encoded. (B) shows the ratio of the output conversion coefficient including the significant coefficient when the input conversion coefficient does not include the significant coefficient when re-encoding the stream whose GOP configuration is IBBP ... FIG.
FIG. 25 is a graph showing a peak signal to noise ratio (PSNR) of an original image of a luminance signal when an MPEG-2 bit stream is actually re-encoded.
FIG. 26 is a block diagram showing a different configuration of the fifth embodiment of the re-encoding device according to the present invention.
FIG. 27 is a block diagram showing a configuration of a sixth embodiment of a re-encoding device according to the present invention;
FIG. 28 is a flowchart showing an operation in the sixth embodiment shown in FIG. 27 according to the present invention.
FIG. 29A is a diagram showing a ratio of a range to which a discrete cosine transform coefficient belongs when a stream having a GOP configuration of IPPP... Is re-encoded, and FIG. It is a figure which shows the ratio of the range to which a discrete cosine transform coefficient belongs when the stream of * is re-encoded.
FIG. 30 is a block diagram showing a different configuration of the re-encoding device according to the sixth embodiment of the present invention.
FIG. 31 is a flowchart showing an operation according to the seventh embodiment of the present invention.
FIG. 32 is a flowchart showing an operation according to the eighth embodiment of the present invention.
FIG. 33 is a flowchart showing an operation according to the ninth embodiment of the present invention.
FIG. 34 is a schematic block diagram showing an example of an information processing system that implements a re-encoding device according to the present invention.
FIG. 35 is a block diagram showing a circuit configuration of a basic re-encoding device.
FIG. 36 is a block diagram illustrating an example of a circuit configuration of a conventional re-encoding device.
FIG. 37 is a block diagram illustrating an example of a circuit configuration of a conventional re-encoding device.
[Explanation of symbols]
11 Decoding processor
12 Encoding processing unit
13 Signal correction unit
14 Signal distribution measurement unit
15 Signal zero judgment part
21 Transform coefficient decoding unit
22 Transform coefficient coding unit
201 Variable length decoder
202 Inverse quantizer
203 Inverse discrete cosine transformer
204 Adder
205 Motion compensator
206 memory
207 subtractor
208 motion compensator
209 Discrete cosine transformer
210 Requantizer
211 Variable length encoder
212 Inverse quantizer
213 Inverse discrete cosine transformer
214 Adder
215 memory
31 Error signal motion compensation unit
301 Subtractor
302 Discrete cosine transformer
303 Subtractor
304 Inverse discrete cosine transformer
305 memory
306 Motion compensator
401 Adder
402 Discrete cosine transformer
403 subtractor
404 Discrete cosine transform coefficient distribution estimation unit
405 Inverse discrete cosine transformer
406 Adder
407 Difference pixel distribution estimation unit
51 Transform coefficient decoding unit
52 Transform coefficient coding unit
53 Frequency Domain Error Signal Motion Compensator
501 Variable length decoder
502 Inverse quantizer
503 subtractor
504 Variable length encoder
505 Inverse quantizer
506 subtractor
507 Conversion coefficient distribution measuring instrument
508 Inverse discrete cosine transformer
509 Adder
510 Discrete cosine transformer
511 Mode determiner
512 subtractor
513 subtractor
514 Inverse discrete cosine transformer
515 subtractor
516 Zero conversion coefficient determiner
517 memory
518 Frequency domain motion compensator
519 Adder
601 processor
602 program memory
603 storage medium
604 storage medium

Claims (12)

動き補償および量子化を用いた所定符号化方式の圧縮動画ビットストリームを入力として、少なくとも量子化された信号を逆量子化して復号信号を計算する第1ステップと、
蓄積した過去の誤差信号を動き補償して補正信号を計算する第2ステップと、
前記復号信号から前記補正信号を減算して再符号化する信号を計算し、前記再符号化する信号を再量子化し、再度符号化変換して圧縮動画ビットストリームを出力する第3ステップと、
再量子化による誤差である現在の前記誤差信号を計算して蓄積する第4ステップと、
を有する圧縮動画ビットストリームの再符号化処理をコンピュータに実行させるプログラムにおいて、
前記誤差信号の計算方法として、
前記再符号化する信号と、前記再量子化した信号を逆量子化した第2復号信号と、を用いて前記誤差信号を求める第1の計算方法と、
前記復号信号と、前記第2復号信号と、前記補正信号と、を用いて前記誤差信号を求める第2の計算方法と、
が用意され、
前記第1ステップで得られる前記復号信号の信号値および分布情報と、前記第4ステップで得られる前記第2復号信号の信号値および分布情報と、の少なくとも一方を計測する第5ステップと、
前記第5ステップで計測された信号値および分布情報の少なくとも一方に基づいて前記複数の計算方法の演算量を推定する第6ステップと、
前記第6ステップの推定結果に従って最も演算量の少ない計算方法を選択し、前記誤差信号を計算する第7ステップと、
を含むことを特徴とする圧縮動画ビットストリームの再符号化コンピュータプログラム。
A first step of calculating a decoded signal by dequantizing at least the quantized signal, using a compressed video bitstream of a predetermined encoding method using motion compensation and quantization as an input;
A second step of calculating a correction signal by performing motion compensation on the accumulated past error signal;
A third step of calculating a signal to be re-encoded by subtracting the correction signal from the decoded signal, re-quantizing the signal to be re-encoded, re-encoding and converting, and outputting a compressed video bit stream;
A fourth step of calculating and storing the current error signal, which is an error due to requantization ;
In a program for causing a computer to execute re-encoding processing of a compressed video bitstream having
As a calculation method of the error signal,
A first calculation method for obtaining the error signal using the signal to be re-encoded and a second decoded signal obtained by dequantizing the re-quantized signal;
A second calculation method for obtaining the error signal using the decoded signal, the second decoded signal, and the correction signal;
Is prepared,
A fifth step of measuring at least one of the signal value and distribution information of the decoded signal obtained in the first step and the signal value and distribution information of the second decoded signal obtained in the fourth step;
A sixth step of estimating a calculation amount of the plurality of calculation methods based on at least one of the signal value and the distribution information measured in the fifth step;
A seventh step of selecting a calculation method with the least amount of calculation according to the estimation result of the sixth step, and calculating the error signal;
A computer program for re-encoding a compressed video bitstream, comprising:
前記所定符号化方式は周波数領域への変換処理を組み合わせた符号化方式であり、前記復号信号は空間領域の画像信号を周波数係数で表現した周波数復号信号であり、前記補正信号は周波数係数で表現される周波数補正信号であり、前記再符号化する信号は周波数係数で表現される周波数符号化信号であり、前記第2復号信号は周波数係数で表現される周波数第2復号信号であり、
前記周波数補正信号は、過去の蓄積した空間領域の誤差信号である空間誤差信号と、当該空間誤差信号を周波数変換した周波数誤差信号とのいずれかを用いて計算されることを特徴とする請求項1記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。
The predetermined encoding method is an encoding method combined with conversion processing to a frequency domain, the decoded signal is a frequency decoded signal that represents a spatial domain image signal with a frequency coefficient, and the correction signal is expressed with a frequency coefficient. A frequency correction signal, wherein the signal to be re-encoded is a frequency encoded signal expressed by a frequency coefficient, and the second decoded signal is a frequency second decoded signal expressed by a frequency coefficient,
The frequency correction signal is calculated using any one of a spatial error signal that is an error signal of a spatial region accumulated in the past and a frequency error signal obtained by frequency-converting the spatial error signal. 1. A computer program for re-encoding a compressed video bit stream according to 1.
前記信号値および分布情報は、周波数係数が零である位置を示す情報であることを特徴とする請求項2記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。  3. The computer program according to claim 2, wherein the signal value and the distribution information are information indicating a position where the frequency coefficient is zero. 前記信号値および分布情報は、複数の周波数係数が零である位置を示す情報であることを特徴とする請求項2記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。  3. The computer program for re-encoding a compressed moving picture bit stream according to claim 2, wherein the signal value and the distribution information are information indicating positions where a plurality of frequency coefficients are zero. 前記信号値および分布情報は、周波数係数の非零係数が複数個の予め設定された周波数領域に属するか否かを示す範囲情報であることを特徴とする請求項2記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。  The compressed video bitstream according to claim 2, wherein the signal value and the distribution information are range information indicating whether or not non-zero coefficients of frequency coefficients belong to a plurality of preset frequency regions. Re-encoding computer program. 再符号化処理または復号処理の単位毎に、
前記復号信号が全て零であるかを計測するステップと、
全て零であれば、前記再符号化する信号を零として再符号化し、前記補正信号を現在の前記誤差信号として蓄積するステップと、
を含むことを特徴とする請求項1記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。
For each unit of re-encoding or decoding,
Measuring whether the decoded signals are all zero;
If all zero, re-encode the signal to be re-encoded as zero and store the correction signal as the current error signal;
The computer program for re-encoding a compressed moving picture bitstream according to claim 1.
再符号化処理または復号処理単位毎に、
前記復号信号が全て零であるかを計測するステップと、
全て零であれば、前記再符号化する信号を零として再符号化し、前記周波数補正信号を現在の前記周波数誤差信号および前記空間誤差信号の一方で蓄積するステップと、
を含むことを特徴とする請求項2記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。
For each re-encoding process or decoding process unit,
Measuring whether the decoded signals are all zero;
If all zeros, re-encode the signal to be re-encoded as zero and store the frequency correction signal in one of the current frequency error signal and the spatial error signal;
The computer program for re-encoding a compressed moving picture bitstream according to claim 2, wherein:
周波数領域への変換処理および量子化を用いた所定符号化方式の圧縮動画ビットストリームを入力として、少なくとも量子化された信号を逆量子化して周波数復号信号を計算し、過去の蓄積した空間領域の誤差信号である空間誤差信号と当該空間誤差信号を周波数変換した周波数誤差信号とのいずれか一方を動き補償して周波数補正信号を計算し、前記周波数復号信号から前記周波数補正信号を減算して周波数符号化信号を計算し、前記周波数符号化信号を再量子化し、再度符号化変換して圧縮動画ビットストリームを出力し、再量子化による誤差である現在の前記周波数誤差信号および前記空間誤差信号の一方を計算して蓄積し、前記周波数補正信号の計算に供する再符号化方法において、
前記空間誤差信号および前記周波数誤差信号の一方を計算する計算方法として、
前記周波数符号化信号と、前記再量子化した信号を逆量子化した周波数第2復号信号と、を用いる第1の計算方法と、
前記周波数復号信号と、前記周波数第2復号信号と、前記周波数補正信号と、を用いる第2の計算方法と、
を用意し、
前記周波数復号信号の信号値および分布情報と、前記周波数第2復号信号の信号値および分布情報と、の少なくとも一方を計測する第1ステップと、
前記第1ステップで計測された信号値および分布情報の少なくとも一方に基づいて前記複数の計算方法の演算量を推定する第2ステップと、
前記第2ステップの推定結果に従って最も演算量の少ない計算方法を選択し、前記空間誤差信号および前記周波数誤差信号の一方を計算するステップと、
を有することを特徴とする圧縮動画ビットストリームの再符号化方法。
Input a compressed video bitstream of a predetermined encoding system using frequency domain conversion processing and quantization, and at least quantize the signal to calculate the frequency-decoded signal by dequantizing it. A frequency correction signal is calculated by motion-compensating one of a spatial error signal that is an error signal and a frequency error signal obtained by frequency-converting the spatial error signal, and the frequency correction signal is subtracted from the frequency decoded signal. An encoded signal is calculated, the frequency encoded signal is re-quantized, encoded and converted again to output a compressed video bit stream, and the current frequency error signal and the spatial error signal, which are errors due to re-quantization, are output. In the re-encoding method for calculating and accumulating one side and providing for the calculation of the frequency correction signal,
As a calculation method for calculating one of the spatial error signal and the frequency error signal ,
A first calculation method using the frequency encoded signal and a frequency second decoded signal obtained by dequantizing the requantized signal;
A second calculation method using the frequency decoded signal, the frequency second decoded signal, and the frequency correction signal;
Prepare
A first step of measuring at least one of the signal value and distribution information of the frequency decoded signal and the signal value and distribution information of the frequency second decoded signal;
A second step of estimating a calculation amount of the plurality of calculation methods based on at least one of the signal value and the distribution information measured in the first step;
Selecting a calculation method with the least amount of calculation according to the estimation result of the second step, and calculating one of the spatial error signal and the frequency error signal;
A method for re-encoding a compressed video bitstream, comprising:
再符号化処理または復号処理単位毎に、
前記復号信号が全て零であるかを計測するステップと、
全て零であれば、前記再符号化する信号を零として再符号化し、前記周波数補正信号を現在の前記周波数誤差信号および前記空間誤差信号の一方として蓄積するステップと、
を有することを特徴とする請求項記載の圧縮動画ビットストリームの再符号化方法。
For each re-encoding process or decoding process unit,
Measuring whether the decoded signals are all zero;
If all zeros, re-encode the signal to be re-encoded as zero and store the frequency correction signal as one of the current frequency error signal and the spatial error signal;
9. The method of re-encoding a compressed moving picture bitstream according to claim 8 , further comprising:
周波数領域への変換処理および量子化を用いた所定符号化方式の圧縮動画ビットストリームを入力として、少なくとも量子化された信号を逆量子化して周波数復号信号を計算する手段と、過去の蓄積した空間領域の誤差信号である空間誤差信号と、当該空間誤差信号を周波数変換した周波数誤差信号とのいずれか一方を動き補償して周波数補正信号を計算する手段と、前記周波数復号信号から前記周波数補正信号を減算して周波数符号化信号を計算する手段と、前記周波数符号化信号を再量子化し、再度符号化変換して圧縮動画ビットストリームを生成する手段と、再量子化による誤差である現在の前記周波数誤差信号および前記空間誤差信号の一方を計算して蓄積し前記周波数補正信号の計算に供する手段と、を有する再符号化装置において、
前記周波数符号化信号と前記再量子化した信号を逆量子化した周波数第2復号信号とを用いる第1の計算方法と、前記周波数復号信号と前記周波数第2復号信号と前記周波数補正信号とを用いる第2の計算方法とを用意して、これらの計算方法で前記空間誤差信号および前記周波数誤差信号の一方を計算可能な計算手段と、
前記周波数復号信号の信号値および分布情報と、前記周波数第2復号信号の信号値および分布情報と、の少なくとも一方を計測する計測手段と、
前記計測手段で計測された信号値および分布情報の少なくとも一方に基づいて前記複数の計算方法の演算量を推定する推定手段と、
前記推定手段による推定結果に従って最も演算量の少ない計算方法を選択し、前記計算手段により前記空間誤差信号および前記周波数誤差信号の一方を計算させる制御手段と、
を有することを特徴とする圧縮動画ビットストリームの再符号化装置。
Means for calculating a frequency decoded signal by dequantizing at least the quantized signal, using a compressed video bitstream of a predetermined encoding method using frequency domain conversion processing and quantization as input, and past accumulated space Means for calculating a frequency correction signal by motion-compensating one of a spatial error signal that is an error signal of a region and a frequency error signal obtained by frequency-converting the spatial error signal, and the frequency correction signal from the frequency decoded signal Means for subtracting the frequency encoded signal, requantizing the frequency encoded signal, re-encoding and generating a compressed video bitstream, and the current error due to requantization Means for calculating and accumulating one of a frequency error signal and the spatial error signal and providing the frequency correction signal to the re-encoding apparatus. ,
A first calculation method using the frequency encoded signal and a frequency second decoded signal obtained by dequantizing the requantized signal, the frequency decoded signal, the frequency second decoded signal, and the frequency correction signal. A second calculation method to be used, and a calculation means capable of calculating one of the spatial error signal and the frequency error signal by these calculation methods ;
Measuring means for measuring at least one of the signal value and distribution information of the frequency decoded signal and the signal value and distribution information of the frequency second decoded signal;
Estimating means for estimating the amount of calculation of the plurality of calculation methods based on at least one of the signal value and distribution information measured by the measuring means;
Control means for selecting a calculation method with the least amount of calculation according to the estimation result by the estimation means, and calculating one of the spatial error signal and the frequency error signal by the calculation means;
A re-encoding apparatus for compressed moving picture bitstreams, comprising:
再符号化処理または復号処理単位毎に、
前記復号信号が全て零であるかを計測する手段と、
全て零であれば、前記再符号化する信号を零として再符号化し、前記周波数補正信号を現在の前記周波数誤差信号および前記空間誤差信号の一方として蓄積する手段と、
を有することを特徴とする請求項10記載の圧縮動画ビットストリームの再符号化装置。
For each re-encoding process or decoding process unit,
Means for measuring whether the decoded signals are all zero;
Means for re-encoding the signal to be re-encoded as zero if all are zero and storing the frequency correction signal as one of the current frequency error signal and the spatial error signal;
11. The apparatus for re-encoding a compressed moving picture bit stream according to claim 10, further comprising:
前記周波数符号化信号の計算方法が2種類存在し、前記2種類の計算方法は、前記周波数復号信号と前記周波数補正信号とを用いて周波数符号化信号を計算する方法、および前記周波数復号信号を用いて周波数符号化信号を計算する方法であり、
前記2種類の計算方法を、予め定めた処理単位ごとに選択するステップを含むことを特徴とする請求項2記載の圧縮動画ビットストリームの再符号化コンピュータプログラム。
There are two types of calculation methods of the frequency encoded signal, and the two types of calculation methods include a method of calculating a frequency encoded signal using the frequency decoded signal and the frequency correction signal, and the frequency decoded signal. Is a method of calculating a frequency encoded signal using:
3. The computer program for re-encoding a compressed moving image bit stream according to claim 2, further comprising a step of selecting the two types of calculation methods for each predetermined processing unit.
JP2002036716A 2002-02-14 2002-02-14 Compressed video re-encoding program, re-encoding device and method Expired - Fee Related JP4134572B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002036716A JP4134572B2 (en) 2002-02-14 2002-02-14 Compressed video re-encoding program, re-encoding device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002036716A JP4134572B2 (en) 2002-02-14 2002-02-14 Compressed video re-encoding program, re-encoding device and method

Publications (2)

Publication Number Publication Date
JP2003244705A JP2003244705A (en) 2003-08-29
JP4134572B2 true JP4134572B2 (en) 2008-08-20

Family

ID=27778525

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002036716A Expired - Fee Related JP4134572B2 (en) 2002-02-14 2002-02-14 Compressed video re-encoding program, re-encoding device and method

Country Status (1)

Country Link
JP (1) JP4134572B2 (en)

Also Published As

Publication number Publication date
JP2003244705A (en) 2003-08-29

Similar Documents

Publication Publication Date Title
US7301999B2 (en) Quantization method and system for video MPEG applications and computer program product therefor
JP5021502B2 (en) Method and apparatus for controlling rate distortion trade-off by mode selection of video encoder
KR101608426B1 (en) Method for predictive intra coding/decoding for video and apparatus for same
US6590936B1 (en) Coded data transform method, transcoding method, transcoding system, and data storage media
JP3149418B2 (en) Image prediction decoding method and apparatus
US7653129B2 (en) Method and apparatus for providing intra coding frame bit budget
JP4361613B2 (en) Variable bit rate video encoding method and corresponding video encoding apparatus
US7925108B2 (en) Encoding device and dynamic image recording system having the encoding device
JP4247680B2 (en) Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program
US20080008246A1 (en) Optimizing video coding
US20060209952A1 (en) Image encoding/decoding method and apparatus therefor
US20090097546A1 (en) System and method for enhanced video communication using real-time scene-change detection for control of moving-picture encoding data rate
CN101491106A (en) Image processing device, method, and program
JP2001145113A (en) Device and method for image information conversion
KR100790149B1 (en) Rate control of scene-changed video encoder
US20100232722A1 (en) Method and apparatus for encoding and decoding image based on code table selection adapted to residual value distribution
JP4494803B2 (en) Improved noise prediction method and apparatus based on motion compensation, and moving picture encoding method and apparatus using the same
JP2004241957A (en) Image processor and encoding device, and methods therefor
JP2006511164A (en) Elastic memory
US9094716B2 (en) Methods for coding and decoding a block of picture data, devices for coding and decoding implementing said methods
JP4532607B2 (en) Apparatus and method for selecting a coding mode in a block-based coding system
JP2005513896A (en) Coding image
US20080025401A1 (en) Method for measuring real-time image complexity
JP4784618B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding program, and moving picture decoding program
JP4292659B2 (en) Image information conversion apparatus and image information conversion method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071015

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071023

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080205

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080407

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

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

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130613

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees