JP4490046B2 - Image coding apparatus and image coding method - Google Patents

Image coding apparatus and image coding method Download PDF

Info

Publication number
JP4490046B2
JP4490046B2 JP2003120626A JP2003120626A JP4490046B2 JP 4490046 B2 JP4490046 B2 JP 4490046B2 JP 2003120626 A JP2003120626 A JP 2003120626A JP 2003120626 A JP2003120626 A JP 2003120626A JP 4490046 B2 JP4490046 B2 JP 4490046B2
Authority
JP
Japan
Prior art keywords
frame
bits
frame rate
encoded
frames
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
JP2003120626A
Other languages
Japanese (ja)
Other versions
JP2004007619A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2003120626A priority Critical patent/JP4490046B2/en
Publication of JP2004007619A publication Critical patent/JP2004007619A/en
Application granted granted Critical
Publication of JP4490046B2 publication Critical patent/JP4490046B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像符号化技術及び画像復号化技術に関し、特に可変ビットレート方式や可変フレームレート方式を用いた画像符号化技術に関する。
【0002】
【従来の技術】
従来、MPEG(Moving Picture Expert Group)規格等の画像符号化技術におけるビットレートを制御する方式の一つに可変ビットレート(Variable Bit Rate)方式がある。これは、主に符号化データを蓄積するバッファメモリの容量等の制約や、記録媒体に記録する際の映像記録時間の制約を守るため、符号化される画像の複雑さに伴う局所的なビットレートの変化を許容しつつ、所定の時間長(例えば、1秒間)における発生ビット数を一定内に抑えるという制御方式である。つまり、符号化が困難なシーンにおいては符号化のためのビットを多く発生させ(ビットレートが高くなり)、符号化が容易なシーンでは発生させるビット数を少なくする(ビットレートが低くなる)ことにより、シーンに応じて割り当てるビット数を制御するものである。即ち、一定時間内の発生ビット数を一定に保ちつつ(即ち、バッフメモリ容量の制約や記録時間の制約の範囲で)、高画質な画像を再現できるように符号化を行なおうとするものである(例えば、特許文献1参照)。
【0003】
上記従来の可変ビットレート方式を用いた画像符号化装置について、図32の画像符号化装置100を用いて説明する。この画像符号化装置100は、直交変換部105、量子化部106、可変長符号化部107、逆量子化部108、逆直交変換部109、フレームメモリ102、動き検出部103、動き補償部104及びビットレート制御部110から構成されている。
【0004】
直交変換部105は、受信した被符号化フレーム信号101(画像信号データ)に対して、マクロブロック単位で離散コサイン変換(DCT:Discrete Cosine Transform)を行ない、DCT係数を生成して量子化部106に出力する。ここで、I(Intra coded)ピクチャのフレームについては、画面内符号化モードでDCT演算が行われる。P(Predictive coded)ピクチャのフレームについては、時間的に過去に位置するIピクチャ又はPピクチャに基づいて前方向予測符号化モードでDCT演算が行なわれる。B(Bidirectionally)ピクチャのフレームについては、時間的に前後に位置するIピクチャ又はPピクチャに基づいて両方向予測符号化モードでDCT演算が行なわれる。
【0005】
量子化部106は、直交変換部105から入力したDCT係数に対し、マクロブロック毎にビットレート制御部110から受信した量子化ステップ(又は量子化パラメータでもよい。)で量子化を行ない、可変長符号化部107及び逆量子化部108に出力する。可変長符号化部107は、量子化部106から入力した量子化されたDCT係数等について可変長符号化及び多重化を行ない、出力バッファ(図示せず)に出力する。
【0006】
逆量子化部108は、量子化部106から受信した量子化されたDCT係数に対して逆量子化演算を行ない、逆直交変換部109に出力する。逆直交変換部109は、逆量子化部108から入力した逆量子化されたDCT係数に基づいて逆直交変換演算を行なって画像信号データを再現し、フレームメモリ102に出力する。
【0007】
フレームメモリ102は、Iピクチャ又はPピクチャの復号化された画像信号データと動き補償部104で生成された動き補償データとを加算して格納する。動き検出部103は、フレームメモリ102に格納されている参照画像から動きベクトルを検出し、この動きベクトルを表すデータを動き補償部104に出力する。
【0008】
動き補償部104は、Pピクチャ又はBピクチャの符号化のためにフレームメモリ102に格納されている参照画像と動き検出部103から入力した動きベクトルを表すデータに基づいて動き補償データ(参照画像データ)を生成する。ビットレート制御部110は、可変長符号化部107から発生ビット数を受信し、この発生ビット数に基づいて、量子化ステップを決定し、この量子化ステップを量子化部106に送信する。
【0009】
全体制御部140は、例えば、ROMやRAM等を備えるマイクロコンピュータ等であり、画像符号化装置100全体の制御を行なう部分である。全体制御部140は、制御信号等に基づいて、それぞれの処理タイミングの制御等を行なう。
【0010】
図33は、従来の画像符号化装置100におけるビットレート制御部110の機能構成を示すブロック図である。図33に示されるように、ビットレート制御部110は、フレーム群目標ビット数導出部111、次フレーム目標ビット数導出部112及び量子化ステップ導出部113から構成される。
【0011】
フレーム群目標ビット数導出部111は、可変長符号化部107から発生ビット数Nn131を受信して内部のメモリ(図示せず)に格納する。この際、フレーム群目標ビット数導出部111は、発生ビット数Nn131を受信した回数(つまり、符号化を行なったフレームのフレーム数)をカウントする。さらに、フレーム群目標ビット数導出部111は、フレーム群単位で未だ符号化されていないフレームに対する割り当て可能なビット数を算出し、次フレーム目標ビット数導出部112に送信すると共に、実際の符号化によって生じた発生ビット数Nn131を用いて、上記の割り当て可能なビット数を順次更新する。ここで、「フレーム群」とは、所定の時間長に符号化され得るフレームの集まりをいう。
【0012】
次フレーム目標ビット数導出部112は、フレーム群目標ビット数導出部111から受信したフレーム群単位で割り当て可能なビット数に基づいて、次のフレームに割り当てるビット数の目標値を導出し、量子化ステップ導出部113に送信する。上記目標値は、その時点のフレーム群単位で割り当て可能なビット数を残りのフレーム数で除することによって算出する。
【0013】
量子化ステップ導出部113は、次フレーム目標ビット数導出部112から受信した次のフレームに割り当てるビット数の目標値に基づいて、量子化ステップ141(量子化パラメータでもよい。)を算出して量子化部106に出力する。
【0014】
図34は、従来の画像符号化装置100の全体制御部140及びビットレート制御部110における処理の流れを示すフローチャートである。
【0015】
最初に、ビットレート制御部110によって発生ビット数Nn131が受信されると(S1401)、全体制御部140は、次の符号化対象のフレームがフレーム群の先頭か否かを判断する(S1402)。この場合、次のフレームがフレーム群の先頭のフレームの場合は(S1402:Yes)、ビットレート制御部110は、割当可能ビット数Na、割当対象期間Ta及び割当対象フレーム数Ntの初期化を行なう(S1405〜1407)。ここで、"NA"は、フレーム群単位に割り当てるビット数の初期値である。"TA"は、フレーム群全体の期間である。"Rf"は、本画像符号化装置100の符号化のフレームレートである。
【0016】
一方、次のフレームがフレーム群の先頭のフレームでない場合は(S1402:No)、ビットレート制御部110は、割当可能ビット数Na及び割当対象期間Taの更新を行なう(S1403〜1404)。
【0017】
次に、ビットレート制御部110は、割当可能ビット数Naと割当対象フレーム数Ntに基づいて割当ビット数Nbを算出し(S1408)、割当対象フレーム数Ntの更新(デクリメント)を行なう(S1409)。
【0018】
この後、ビットレート制御部110は、符号化するフレームについて間引きが必要か否かを判定し、間引きが必要な場合はその旨を全体制御部140に通知し(S1410:Yes)する。一方、間引きをする必要がない場合は(S1410:No)、量子化ステップを算出して量子化部106に出力する(S1411)。
【0019】
全体制御部140及びビットレート制御部110は、以上の処理を符号化処理が終わるまで繰り返す(S1401〜1412)。
【0020】
図35は、従来のビットレート制御部110における割当ビット数Nbの算出方法の具体例を示した図である。なお、この場合は、便宜上、発生ビット数Nn131と割当ビット数Nbとは、一致するものとする。
【0021】
図35の例では、30[fps]で入力される画像信号データ(被符号化フレーム信号101)に対して、15[fps]のフレームレートで符号化が行なわれ、原則として15フレームで構成されるフレーム群が毎秒1つ生成されることとする。この例では、入力される被符号化フレーム信号101を「入力画像フレーム番号1701」で表し、符号化フレーム信号121を「フレーム群フレーム番号1702」で表している。図35において、フレーム群フレーム番号1702及び発生ビット数Nn131の欄が「×」となっているのは、対応する入力画像フレーム番号1701のフレームについては符号化がされず、「間引き」されたことを表す。
【0022】
さらに、図35において、例えば入力画像フレーム番号「9」(すなわち、フレーム群フレーム番号「5」)に対する発生ビット数Nnは、既に4つのフレームに割り当てられたビット数の合計が1180ビットで、残りのフレーム数が「11」であるため、((3600−1180)/11=220ビット)となる。
【0023】
一方、入力画像フレーム番号「13」(すなわち、フレーム群フレーム番号「6」)に対する発生ビット数は、入力画像フレーム番号「11」が「間引き」されているので、既に割り当てられたビット数の合計が1400ビットで、残りのフレーム数が「9」であるため、小数点以下を切り捨てて((3600−1400)/9=244ビット)となる。
【0024】
なお、図35の入力画像フレーム番号「29」に対応するフレーム群フレーム番号1702の欄に記載されている"(14)"は、入力画像フレーム番号1701が「13」の時点における、最後のフレーム群フレーム番号1702の予想値である。
【0025】
以上のように、従来の画像符号化装置100では、次の符号化対象のフレームにビットを割り当てている。
【0026】
【特許文献1】
特開2001−25015号公報
【0027】
【発明が解決しようとする課題】
しかしながら、上記の従来技術における可変ビットレートを用いた画像符号化装置100においては、符号化が困難な(複雑な)フレームが連続する場合、量子化ステップを大きな値に変えても符号化に伴う発生ビット数が多くなる(この場合は、ビットレートの値が大きくなる)。すると、所定の時間長(1つのフレーム群)における発生ビット数を一定に保とうとするために、符号化が困難なフレームが連続した後のフレームについては、割り当てるビット数が少なくなってしまう。このため、後のフレームについては量子化ステップを大きくして符号化しなければならず、それらのフレームの画質が極端に劣化してしまうという第1の問題がある(この場合の現象としては、ビットレートが著しく小さな値となる)。
【0028】
図36は、上記従来技術の第1の問題を説明するための図である。図36では、フレーム1601からフレーム1602までの15枚のフレームをフレーム群と定義し、フレーム群毎に、目標値として(上記図35に示されるように)3600[ビット]を割り当てることとする。この場合、時刻t1から符号化が困難なシーンが連続し、それらのフレームの符号化に多くのビットが割り当てられた場合は、フレーム群の後半に割り当て得るビット数が少なくなるため、量子化ステップを大きくする必要が出てくるが(これに伴ってビットレートが小さくなる)、量子化ステップを大きな値とした場合は、画質が極端に劣化する。図36においては、「t3−t4」間で量子化ステップが特に大きくなっており、これに伴って画質の劣化が生じていると推測できる。
【0029】
さらに、いよいよ割り当て得るビット数が少なくなり、フレーム群の途中でフレームレートを変化させなければ(すなわち、フレームを間引かなければ)ならなくなった場合は、フレームレートが変化したにも拘らず、1つのフレームに割り当てられるビット数は当初のフレームレートに基づいて決定されるので、フレームレートを下げたにも拘らずビット数を多く割り当てることができず、さらにフレームレートを下げるか、量子化ステップを粗くすることが必要となり、さらなる画質の劣化をきたすという第2の問題点がある。
【0030】
図37は、上記従来技術の第2の問題を説明するための図である。図37の例では、符号化が困難なシーンが連続し、それらのフレームの符号化に多くのビットが割り当てられたため、フレームレートを徐々に下げた結果、フレーム間隔が大きく空いてしまい、結局、動きがぎこちない画像となり、画像としての品質が劣化する様子が示されている。
【0031】
そこで、本発明は、上記課題に鑑みてなされたものであり、符号化が困難なシーンが連続した場合であっても、残りのフレームに割り当て得るビット数が極端に不足することによる画質の劣化を防止すると共に、符号化されるフレームのレートの変化をも考慮しながら高画質の画像のための符号化を可能にする画像符号化装置及びその方法を提供することを目的とする。
【0032】
【課題を解決するための手段】
上記目的を達成するために、本発明に係る画像符号化装置は、フレーム単位で順次入力される画像信号について符号化を行なう画像符号化装置であって、画像信号の周波数成分をフレーム毎に量子化し、量子化された結果に基づいて符号化する符号化手段と、複数のフレームから構成されるフレーム群割り当て総ビット数を特定する総ビット数特定手段と、フレームレートと前記フレーム群における既に符号化されたフレームのフレーム数とに基づいて、前記フレーム群における未だ符号化されていないフレームのフレーム数を特定するフレーム数特定手段と、前記特定された総ビット数と前記特定されたフレーム数とに基づいて、次に符号化するフレームに割り当てるビット数の目標値を算出する目標ビット数算出手段と、前記算出されたビット数の目標値を用いて、次に符号化するフレームに係る量子化ステップを導出する量子化ステップ導出手段と、前記符号化手段によって符号化された符号化データを保持し、一定量ずつ外部に出力する送信バッファと、前記送信バッファに残留している符号化データのデータ量と前記量子化ステップに基づいて、次に符号化するフレームの周期を示すフレームレートを決定するフレームレート制御手段と、前記フレームレート制御手段で決定されたフレームレートに基づいて、前記符号化手段に入力する画像信号の取捨を制御する入力制御手段とを備え、前記目標ビット数算出手段は、前記総ビット数特定手段によって特定された総ビット数を前記フレームレート制御手段によって決定されたフレームレートから算出されるフレーム群のうち未だ符号化されていないフレーム数で除することによって前記ビット数の目標値を算出する。
【0033】
これにより、フレーム群において一定のビットレートになるように、フレーム群全体に割り当てられた総ビット数と既に割当済みのビット数に基づいて、次の符号化するフレームに割り当てるべきビット数を計算するので、割り当てられるビット数が局所的に偏ってしまう場合を未然に回避して平均化したビット割り当てが可能となり、最終的に極端な画質の劣化を防止することが可能となる。
【0034】
また、上記目的を達成するために、本発明に係る画像符号化装置は、さらに、前記フレーム群における既に符号化されたフレームレートと、それによって発生したビット数とに基づいて、発生ビット数の平均値を算出する平均値算出手段と、前記算出された前記発生ビット数の平均値に対して、所定の係数を乗じて得た新たなビット数の目標値と、前記算出された目標ビット数とを比較して、大きい方を基本目標値とし、あらかじめ設定された下限値と前記基本目標値とを比較して大きい方を新たなビット数の目標値する演算手段とを備え、前記量子化ステップ導出手段は、前記演算手段によって特定されたビット数の目標値を用いて量子化ステップを導出することを特徴とする。
【0035】
これにより、受け付けたフレームレートから算出した未だ符号化されていないフレーム数と、フレーム群における割り当て可能なビット数とに基づいて、次に符号化するフレームに割り当てるべきビット数を決定するので、フレームレートの変化に則した符号化が可能となる。
【0036】
また、上記目的を達成するために、本発明に係る画像符号化装置は、さらに、既に符号化されたが未送信のデータを格納する格納手段と、前記格納手段に格納されているデータ量に基づいて、次に符号化するフレーム係るフレームレートを計算するフレームレート計算手段を備え、前記フレームレート受付手段は、前記計算されたフレームレートを受け付けることを特徴とする。
【0037】
これにより、所定の時間長で観測した場合のビットレートを一定に保ちながら、バッファに十分空きがある場合は低い量子化ステップで符号化することで、従来よりも高画質に符号化することができ、かつ複雑なシーンへ移行した場合のフレームレートの急激な低下(多くのフレームが符号化されずスキップされること)を抑制し、従来よりも動きの滑らかな符号化を行なうことが可能となる。
【0038】
なお、上記目的を達成するために、本発明は、上記画像符号化装置の特徴的な手段をステップとする画像符号化方法として実現したり、これらのステップを含むプログラムとして実現したりすることもできる。そして、そのプログラムは、画像符号化装置が備えるROM等に格納しておくだけでなく、CD−ROM等の記録媒体や通信ネットワーク等の伝送媒体を介して流通させることもできる。
【0039】
【発明の実施の形態】
以下、本発明に係る実施の形態について、図面を参照しながら詳細に説明する。なお、以下の説明では、従来技術と共通する構成については同一の符号を付し、その説明は省略する。
【0040】
(実施の形態1)
図1は、実施の形態1に係る画像符号化装置10の機能構成を示すブロック図である。この画像符号化装置10は、所定の時間長(例えば、1秒間)で観測した場合におけるビットレートを一定に保ちながら、局所的なビットレートの変動をも抑えることにより、より高品質な画像の再現のための符号化を可能とする。
【0041】
画像符号化装置10は、フレームメモリ102、動き検出部103、動き補償部104、直交変換部105、量子化部106、可変長符号化部107、逆量子化部108、逆直交変換部109、フレーム間引部20、レート制御部30及び全体制御部40から構成されている。
【0042】
フレーム間引部20は、一定の周期で入力される被符号化フレーム信号101に対し、そのフレームの符号化/非符号化を決定すると共に、その時点のフレームレート値Rf21をレート制御部30に通知する。
【0043】
レート制御部30は、可変長符号化部107から受信した発生ビット数とフレーム間引部20から通知を受けたフレームレート値Rf21とに基づいて、次のフレームの符号化における量子化ステップ(又は量子化パラメータ)を決定し、量子化部106に送信する。
【0044】
全体制御部40は、例えば、ROMやRAM等を備えるマイクロコンピュータであり、画像符号化装置10全体の制御を行なう。より詳細には、全体制御部40は、制御信号(図1の全体制御部40における破線は制御信号線を表している)に基づいて、各部の処理タイミングの制御を行なう。さらに、全体制御部40は、一定の周期で入力される被符号化フレーム信号101のピクチャタイプの識別(Iフレーム、Bフレーム及びPフレームの識別)を行ない、その識別結果をレート制御部30に通知する。
【0045】
図2は、図1におけるレート制御部30の詳細な機能構成を示すブロック図である。レート制御部30は、フレーム群目標ビット数導出部31、次フレーム目標ビット数導出部32、平均フレームビット数導出部33、演算部34、量子化ステップ導出部35及び記憶部36から構成される。
【0046】
フレーム群目標ビット数導出部31は、フレーム群単位で、残りの符号化すべき全てのフレームに割り当て可能な総ビット数の目標値を逐次算出し更新する。より詳細に説明すると、フレーム群目標ビット数導出部31は、可変長符号化部107から発生ビット数Nn131を受信して記憶部36に記憶する。さらに、フレーム群目標ビット数導出部31は、次の符号化すべきフレームからフレーム群の最後のフレームまでに割り当て可能な総ビット数を記憶部36から読み出し、この総ビット数から上記の発生ビット数Nn131を減じ、その値を次フレーム目標ビット数導出部32に送信すると共に記憶部36に格納する。
【0047】
次フレーム目標ビット数導出部32は、フレーム間引部20から受信したフレームレート値Rf21及びフレーム群目標ビット数導出部31から受信した割り当て可能な総ビット数に基づいて、残りの符号化すべきフレームのフレーム数を考慮し、次のフレームに割り当てるビット数の目標値を算出する。
【0048】
平均フレームビット数導出部33は、フレーム間引部20から受信したフレームレート値Rf21及び記憶部36に記憶されている過去のフレームに割り当てられたビット数に基づいて、割り当てられたビット数の平均値を算出する。
【0049】
演算部34は、平均フレームビット数導出部33で算出されたビット数に、所定の係数(例えば、0.8)を乗じたビット数を算出し、これと次フレーム目標ビット数導出部32で算出されたビット数の目標値とを比較し、値の大きい方のビット数を選択する。さらに、演算部34は、選択されたビット数と予め設定されている下限値とを比較し、より大きい値のビット数を選択して(すなわち、下限値を下回らないビット数を選択して)量子化ステップ導出部35に送信する。なお、上記の所定の係数は、「0.8」に限定するものではなく、0より大きく1以下の他の値であってもよい。
【0050】
量子化ステップ導出部35は、演算部34から受信したビット数と発生ビット数が等しくなるように量子化ステップの値を導出する。
【0051】
記憶部36は、可変長符号化部107から受信した各フレームを符号化した結果である発生ビット数Nn131を記憶する。さらに、記憶部36は、フレーム群目標ビット数導出部31の制御に従ってフレーム群目標ビット数を更新する。
【0052】
図3は、画像符号化におけるピクチャタイプ別の発生ビット数の一般的な特徴を示す図である。図3に示されるように、通常、画面内符号化(Iピクチャ)のフレーム(Iフレーム210〜250)における発生ビット数Nnより、画面間符号化(Pピクチャ又はBピクチャ)のフレーム(P又はBフレーム)における発生ビット数Nnの方が少なくなる。従って、Iフレームから次のIフレームまでを1つのフレーム群と定義することによって、他の規則に基づいてフレーム群を定義する場合(例えば、ピクチャタイプと無関係に15フレーム毎にフレーム群を構成させる場合)に比べ、各フレーム群における発生ビット数の偏りを少なくすることができる。なお、図3の例では、便宜上、各フレーム群の符号化に要する時間をTAとし、同一の周期とした。
【0053】
なお、フレーム群の最初のフレームが上記のIフレームであったり、フレーム群の最後のフレームがIフレームであったりすることのみでも、各フレーム群におけるビット数の偏りを少なくする効果が得られ得る。
【0054】
図4は、上記図3で定義したフレーム群の具体例を示した図である。図4に示されるように、フレーム群310は、画面内符号化(I)フレーム210から画面内符号化(I)フレーム220の直前のフレームの15枚のフレームで構成されることとする。同様に、フレーム群220やフレーム群230もそれぞれ15枚のフレームで構成されることとする。この場合、1つのフレーム群に割り当て可能な総ビット数の初期値を予め決定しておく(例えば、3600「ビット]等」。なお、フレーム群の定義の仕方は図4に限定するものではない。
【0055】
図5は、上記図3で定義したフレーム群の変形例である。図5に示されるように、上記図4における2つのフレーム群310、320に相当する第1フレームセットと第2フレームセットからなるフレームの集まりを1つのフレーム群410として定義してもよい。この場合、フレーム群410に割り当て可能な総ビット数の初期値を7200[ビット](第1フレームセット及び第2フレームセットにそれぞれ3600[ビット])とする。
【0056】
図6は、上記図5のように2つのフレームセットでフレーム群を構成することによる効果を説明するための図である。図6(a)は、1つのフレーム群の中に符号化が困難なシーンがあった場合でも、次の第2フレームセットにおける割当可能ビット数を含めて次の被符号化フレームの割当ビット数を決定することができるため、よりビットレートの変化を緩和させることが可能となる。例えば、初期値としてフレーム群410全体で1000ビットを割り当て、第1フレームセットに500ビット、第2フレームセットに500ビット暫定的に割り当てることとする。この後、実際の符号化で第1フレームセットにおいて700ビットを使用したとしても、次のフレーム群420では、初期値として全体で800[ビット](前のフレーム群410の残り分300[ビット]+新規の第2フレームセット分500[ビット])を割り当てるように制御する。
【0057】
図6(b)は、さらに符号化が困難のためフレームレートが変更させなければならない場合であっても、上記図6(a)と同様の方法で、ビットレートが急激に小さな値となる(すなわち、量子化ステップが急激に大きくなる)ことを回避することができる。
【0058】
図7は、画像符号化装置10の全体制御部40及びレート制御部30における処理の流れを示すフローチャートである。
【0059】
最初に、レート制御部30は、可変長符号化部107から発生ビット数Nn131を受信し(S701)、フレーム間引部20からフレームレート値Rf21を受信する(S702)。
【0060】
次に、全体制御部40は、次のフレームがIフレームか否かを識別する(S703)。この場合、次のフレームがIフレームの場合は(S704:Yes)、レート制御部30は、割当可能ビット数Na、割当対象期間Ta及び割当対象フレーム数Ntの初期化を行なう(S708〜S710)。
【0061】
一方、次のフレームがIフレームでない場合(S704:No)、レート制御部30は、割当可能ビット数Na及び割当対象フレーム数Ntの更新を行なう(S705、S706)。さらに、レート制御部30は、割当対象フレーム数Ntの小数点以下を切り捨てて、このNtについて整数化を行なう(S707)。
【0062】
この後、レート制御部30は、割当可能ビット数Na及び割当対象フレーム数Ntに基づいて割当ビット数Nbを算出し(S711)、割当対象期間Taの更新を行なう(S712)。この場合、割当対象期間Taは、フレームレート値Rf21の値が同一のフレーム群の途中で変更した場合にも考慮して更新がなされる。
【0063】
これにより、レート制御部30は、割当ビット数Nbに基づいて量子化ステップを導出し、可変長符号化部107に送信する(S713)。
【0064】
全体制御部40及びレート制御部30は、以上の処理を符号化処理が終わるまで繰り返す(S701〜S714)。
【0065】
図8は、画像符号化装置10を用いて符号化を実行した場合のビットレートの変化を示す一例である。図8に示されるビットレートの変化をみてみると、演算部34における係数(例えば、0.8)のために、従来技術の場合(上記図36)に比べ、割り当て可能なビット数が少なく抑えられるため、ビットレートの変化が鈍化する傾向にある。さらに、図8においては、上記演算部34において、下限値を下回らないビット数が選択され、符号化後のビット数がこのビット数になるように量子化ステップが算出される。さらに、算出された量子化ステップに従って符号化が実行され、発生ビットが決定されるため、ビットレートについても下限値以上の値となっている様子が示されている。
【0066】
図9は、上記図5に示したように、2つのフレームセットで1つのフレーム群を構成した場合のビットレートが変動する様子を示した一例である。図9に示されるように、従来技術(上記図36)ではビットレートの値が著しく小さく(すなわち、量子化ステップが著しく大きく)なった「t3−t4」間においては、ビットレートの値が小さくなることを抑え、画質の劣化を抑制することができたが、第1フレームセットで多くのビット数を使用した影響が、第2フレームセットの最初の部分(「t4−t6」間)に出ている(すなわち、量子化ステップを小さくできずビットレートの値が小さいままの)様子が示されている。
【0067】
図10は、2つのフレームセットで1つのフレーム群を構成し、かつ、フレーム群の途中で符号化のフレームレートが変化した場合におけるビットレートの変化の様子を示した一例である。図10では、フレームレートが15[fps]から7.5[fps]に変化しているが、ビットレートの変化の仕方が上記図8のビットレートと同じである(つまり、図10の場合は、1/2の量子化ステップで符号化を行なって2倍のビット数が発生したために、ビットレートとしては同一になったと想定される場合であり、この場合においても「t3−t4」間で画質の劣化が抑制されている)。
【0068】
図11は、上記図2の演算部34におけるビット数の算出方法の具体例を示した図である。図11の例では、30[fps]で入力される被符号化フレーム信号101に対して、15[fps]のフレームレートで符号化が実施されている。この例においても、上記図37と同様に、入力される被符号化フレーム信号101を「入力画像フレーム番号1701」で表し、符号化フレーム信号121を「フレーム群フレーム番号1102」で表している。図11において、フレーム群フレーム番号1102及び発生ビット数Nn131の欄が「×」となっているのは、対応する入力画像フレーム番号1701のフレームについては符号化がされず、「間引き」されたことを表す。
【0069】
さらに、図11において、例えば入力画像フレーム番号「9」(すなわち、フレーム群フレーム番号「5」)に対する発生ビット数の目標値は、既に割り当てられたビット数の合計が1180[ビット]で、残りのフレーム数は「11」であるため、((3600−1180)/11=220[ビット])となる。また、平均フレームビット数導出部33における過去のフレームにおける発生ビット数の平均値(1180/4=295[ビット])を算出し、演算部34において、発生ビット数の平均値に係数(例えば、0.8)を乗じ、これと上記のビット数の目標値とを比較して値の大きい方を選択する。その結果、フレーム群フレーム番号「5」に対する発生ビット数は、236[ビット]となる。
【0070】
一方、入力画像フレーム番号「13」(すなわち、フレーム群フレーム番号「6」)に対する発生ビット数は、入力画像フレーム番号「11」のフレームについては「間引き」されているため(従って、フレームレート値Rf21が7.5[fps]に変更され)、残りのフレーム数(フレームレート値Rf21を7.5[fps]で計算するので)「5」に基づいて計算する。さらに、計算された値に対して小数点以下を切り捨てるので、(3600−1416)/5=436[ビット]となる。また、平均フレームビット数導出部33における過去のフレームにおける発生ビット数の平均値(1416/5=383[ビット])を算出し、演算部34において、発生ビット数の平均値に係数(例えば、0.8)を乗じ、これと上記ビット数の目標値とを比較して値の大きい方を選択する。その結果、入力画像フレーム番号「13」に対する発生ビット数は、436[ビット]となる。
【0071】
図11と上記従来技術の図35におけるフレーム群フレーム番号「5」及び「6」の発生ビット数Nnを比較してみると、何れも本画像符号化装置10(すなわち、上記図11)における発生ビット数の方が大きな値となっており、より多くのビット数の割り当てができるため、従来より高品質な画像のための符号化が可能であることが明らかである。
【0072】
なお、上記図11の入力画像フレーム番号「29」に対応するフレーム群フレーム番号の欄に2つの数字が記載されているが、"(15)"は、入力画像フレーム番号が「9」の時点における、フレームレートが15[fps]の場合のフレーム群フレーム番号1102の予想値であり、"(10)"は、入力画像フレーム番号が「13」の時点における、フレームレートが7.5[fps]の場合のフレーム群フレーム番号1102の予想値である。
【0073】
なお、上記の実施の形態1では、フレーム間引部20を設け、フレーム間引部20から送信されるフレームレート値Rf21に基づいて、ビットレートの制御を行なうように構成したが、フレームレートの値はフレーム間引部以外から入手してもよい。
【0074】
図12は、上記図1におけるフレーム間引部20を設けず、その他の部署からフレームレート値Rf21の値を入手するように構成した画像符号化装置50の機能構成の一部を示したブロック図である。画像符号化装置50が上記図1の画像符号化装置10と異なる点は、フレーム間引部20がない点と全体制御部40に代えて全体制御部60を備えている点のみである。
【0075】
また、上記実施の形態における量子化ステップは、量子化パラメータと一意に対応するものであるため、当該量子化ステップを量子化パラメータに置き換えて用いることとしてもよい。
【0076】
以上のように、本実施の形態に係る画像符号化装置によれば、符号化のフレームレートの変化に対応させながらより割り当てるビット数を決定するので、画像の符号化が困難か否かに関わらず平均的に良好な画質を確保し、極端に動きがぎこちなくなったり画質が劣悪になったりすることを回避することができる。
【0077】
さらに、上記実施の形態1で示した画像符号化装置によって符号化されたビットストリームは、一般的な画像復号化方法によって復号可能である。また、本実施の形態1による符号化を行なったストリームは画像の複雑さに伴って各フレームの量子化ステップが変動するが、その変動は極端なものではなく、画面内符号化フレームから画面内符号化フレームの直前までのフレームで構成されるフレーム群において、発生ビット数をほぼ一定にすることが可能となる。
【0078】
なお、上記の実施の形態1では、各フレーム群の符号化に要する周期を「TA」として同一としたが、同一とする場合に限るものではなく、各フレーム群の符号化に要する時間が異なっていてもよい。
【0079】
また、上記の実施の形態では、平均フレームビット数導出部で算出されたビット数の平均値にのみ所定の係数(例えば、0.8)を乗じ、これと次フレーム目標ビット数導出部で算出されたビット数の目標値とを比較して値の大きい方のビット数を選択するように構成したが、これら両方に所定の係数を乗じて比較するように構成してもよい。
【0080】
(実施の形態2)
図13は、実施の形態2における画像符号化装置2100の機能構成を示すブロック図である。画像符号化装置2100は、上記実施の形態1の図5に示すように従来の2倍の数のフレームから構成される一かたまりのフレーム群を考慮しながら、量子化ステップやフレームの間引きを制御することにより、急激なビットレートやフレームレートの変動を抑制しつつ、高画質な符号化を可能とする。
【0081】
画像符号化装置2100は、フレーム間引部2101、フレームメモリ102、動き検出部103、動き補償部104、直交変換部105、量子化部106、可変長符号化部107、送信バッファ2108、逆量子化部2109、逆直交変換部2110、差分器2111、加算器2112およびフレームレート制御部2113を備える。
【0082】
フレーム間引部2101は、基準となるフレームレート(例えば、30Hz)で入力される画像信号の各フレームに対して、フレームレート制御部2113から入力される間引き情報に従って間引き処理を行ない、間引きされた画像信号を動き検出部103および差分器2111に出力する。例えば、フレームレート制御部2113からフレーム間引部2101に入力される間引き情報の値が「1」のときは、間引きをしないでそのまま符号化を行なう指示を示し、値が「0」のときは、1フレーム間引きを行なって符号化を行なう指示を示すこととする。つまり、フレーム間引部2101は、間引き情報が「1」のときは、画像信号として入力されたフレームをそのまま被符号化フレームとして動き検出部103および差分器2111に出力する。逆に、間引き情報が「0」のときは、入力されたフレームを間引く(例えば、廃棄する)という処理を行なう。
【0083】
フレームメモリ102は、RAM又はハードディスク等によって実現され、フレーム単位で画像データを保持するための記憶装置である。さらに、フレームメモリ102は、次の画面間予測符号化フレームの参照画像となる参照フレームデータを格納する。動き検出部103は、入力された被符号化フレームが画面間予測符号化を行なうフレームの場合、フレームメモリ102に格納された参照フレームデータを用いて、被符号化フレームの動きを検出する。動き補償部104は、動き検出部103によって検出された動きに対応する動き補償データを生成する。この動き補償データは、参照フレームと被符号化フレームとのブロック間の対応を示す動きベクトル、およびその動きベクトルによって示されるブロック間の画像信号の差分を示すデータである。
【0084】
差分器2111は、被符号化フレームが画面間予測符号化を行なうフレームの場合、被符号化フレームの動きベクトルと動き補償部104とによって生成された動き補償データに基づく動きベクトルとの差分を求める。一方、被符号化フレームが、画面内予測符号化を行なうフレームの場合、差分器2111は、入力された画像信号に対して参照フレームとの差分を求める処理を行わず、画面内で予測を行なった後、直交変換部105に画像信号を出力する。
【0085】
直交変換部105は、動き補償部104において生成された動き補償データをDCT(Discrete Cosine Transform)変換などによって周波数成分を表すデータに直交変換し、その変換結果を量子化部106に出力する。量子化部106は、フレームレート制御部2113から入力される量子化ステップを用いて直交変換されたデータを量子化し、その量子化された結果を可変長符号化部107および逆量子化部2109に出力する。可変長符号化部107は、量子化部106による量子化されたデータを、ハフマン符号などを用いて可変長符号化する。可変長符号化部107で可変長符号化されたデータは、送信バッファ2108に格納され、符号化ビットストリームとして出力される。
【0086】
送信バッファ2108は、RAMなどによって実現されるFIFO(First-In First-Out)メモリである。この送信バッファ2108は、例えば、上記実施の形態1の図5に示されるように、複数のフレームから構成されるフレーム群に割り当てられた総ビット数を記憶すると共に、内部のデータ残量または空き容量をモニタしており、可変長符号化されたデータが送信バッファ2108に送信された時点で、即ち1フレーム分の画像信号の符号化が完了した時点で、送信バッファ2108のデータ残量をフレームレート制御部2113に送信する。
【0087】
逆量子化部2109は、予測画像を生成するために量子化部106によって量子化されたデータを逆量子化し、逆直交変換部2110に出力する。逆直交変換部2110は、逆量子化部2109によって逆量子化されたデータを逆直交変換する。加算器2112は、逆直交変換部2110によって逆量子化されたデータと動き補償部104において生成された動き補償データとを加算してフレームメモリ102に出力する。フレームレート制御部2113には、送信バッファ2108から当該送信バッファ2108内のデータ残量が入力される。フレームレート制御部2113は、送信バッファ2108内のデータ残量に応じた量子化ステップを算出して量子化部106に出力すると共に、算出された量子化ステップに応じたフレームレートを計算し、次のフレームを間引くか否かを示す間引き情報を決定してフレーム間引部2101に出力する。ここで、「量子化ステップ」とは、各フレームの周波数成分を量子化する際の基準となる値(幅)であり、例えば「1」から「31」までの自然数(これを「量子化パラメータ」という)によって特定される。この量子化パラメータは、量子化ステップに1対1で対応しており、その数値が大きくなればなるほど、量子化の幅が大きくなるように定義されている。以下では、この量子化パラメータを「量子化ステップ」として説明する。
【0088】
図14は、上記図13におけるフレームレート制御部2113の詳細な機能構成を示すブロック図である。フレームレート制御部2113は、量子化ステップ予測部2201、フレームレート計算部2202、量子化ステップ決定部2203、フレーム数計算部2204および比較器2205を備える。量子化ステップ予測部2201は、送信バッファ2108から入力されたデータ残量に応じて現時点の量子化ステップに対して所定の演算を施し、量子化ステップ予測値を算出してフレームレート計算部2202および量子化ステップ決定部2203に出力する。 量子化ステップ決定部203は、量子化ステップ予測部201から入力された量子化ステップ予測値に最も近い「1」から「31」までの自然数を1つ選択し、選択した自然数を次の量子化ステップに決定する。具体的には、入力された量子化ステップ予測値が小数点以下の値を含む場合には、四捨五入、切捨てまたは切り上げなどの丸め処理を行なう。この場合、その値が「1」未満の場合には「1」を選択し、「31」を超える場合には「31」を選択する。
【0089】
フレームレート計算部2202は、送信バッファ2108から入力されたデータ残量と、量子化ステップ予測部201から入力された量子化ステップ予測値とに基づいて、現在のフレームレートから次の符号化の際における最適フレームレートを計算する。フレーム数計算部204は、比較器205から出力される間引き情報に基づいて、現在のフレームレートを計算する。比較器205は、フレームレート計算部202の出力である最適フレームレートと、フレーム数計算部204の出力である現在のフレームレートとを比較して、最適フレームレートが現在のフレームレートより大きい場合は、間引きしない旨の指示を示す「1」を間引き情報として出力する。一方、最適フレームレートが現在のフレームレートより小さい場合は、間引きを行なう旨の指示を示す「0」を間引き情報として出力する。
【0090】
図15は、上記図14における量子化ステップ予測部201の機能を説明するためのブロック図である。図15(a)は、量子化ステップ予測部201内の量子化ステップ予測方法を図式的に示す図である。図15(b)は、量子化ステップ予測部201に保持されている予測係数テーブル303を示す図である。量子化ステップ予測部201は、図15(a)に示す現在値メモリ2302と、図15(b)に示す予測係数テーブル2303とを保持している。現在値メモリ302は、符号化開始時においては量子化ステップの初期値を保持しており、符号化開始後には量子化ステップ予測部201によって算出された量子化ステップ予測値を保持する。予測係数テーブル303は、送信バッファ2108のデータ残量と予測係数とが対応付けられて格納されており、量子化ステップ予測部201は、送信バッファ2108から入力されるデータ残量に対応する予測係数を現在値メモリ302に保持している現在の量子化ステップ予測値に乗算して、次のフレームの量子化ステップ予測値を算出する。
【0091】
図15(a)および図15(b)に示されるように、予測係数は、送信バッファ2108内のデータ残量が50%以上80%未満では「1.2」に、80%以上90%未満では「1.5」に、90%以上100%以下では「2」というように、送信バッファ2108内の空き容量が少なくなるほど、その値を大きくして符号化されるデータのビット量が低減するように設定される。また、予測係数は、送信バッファ2108のデータ残量が40%以上50%未満では、そのままの量子化ステップを維持するように「1」に設定される。上記とは逆に、予測係数は、送信バッファ2108のデータ残量が30%以上40%未満の場合は「0.8」に、20%以上30%未満の場合は「0.5」に、0%以上20%未満の場合は「0.4」というように設定される。つまり、予測係数は、送信バッファ2108内の空き容量が多くなるほど、符号化されるデータのビット量が大きくなるように(即ち、量子化ステップを小さくして量子化をきめ細かく行ない、画質の品質を高めるように)設定される。
【0092】
例えば、現在値メモリ302内の量子化ステップ予測値が「7.5」で、送信バッファ2108内のデータ残量が75%であったとすると、次のフレームでは、現在値メモリ302内の量子化ステップ予測値「7.5」に予測係数「1.2」が乗算され、そのフレームに対する量子化ステップ予測値は「9」となる。算出された量子化ステップ予測値「9」は、量子化ステップ予測部2201によって現在値メモリ2302に上書きされる。この量子化ステップ予測値「9」は、「1」から「31」までの自然数であるから、量子化ステップ決定部2203によって当該フレームに対する量子化ステップとして決定される。当該フレームが量子化ステップ「9」で量子化された後、さらに次のフレームにおいても送信バッファ2108のデータ残量が70%であった場合は、現在値メモリ2302内の量子化ステップ予測値「9」には予測係数「1.2」が乗算され、次の量子化ステップ予測値は「10.8」となる。量子化ステップ決定部203が小数以下を四捨五入して量子化ステップを決定するとすると、その次のフレームは量子化ステップ「11」で量子化されることになる。このように予測係数を設定することによって、送信バッファ2108内のデータ残量が50%以上になると、量子化ステップが増大するので符号化される画像の画質が徐々に荒くなり、符号化されるデータのビット量を徐々に低減させることができる。一方、送信バッファ2108内のデータ残量が40%未満になると、量子化ステップが減少するのでデータのビット量は徐々に増大するが、符号化される画像の画質を徐々に向上させることができる。
【0093】
図16は、上記図14におけるフレームレート計算部2202の機能を説明するためのブロック図である。フレームレート計算部202は、送信バッファ2108のデータ残量と、量子化ステップ予測値とに基づいて最適フレームレートを計算する部署であり、比較器2401、比較器2402、フレームレートテーブル2403、閾値メモリ2404、閾値メモリ2405および空き容量算出部2406を備える。閾値メモリ2404および閾値メモリ2405は、ラッチ回路またはRAMなどによって実現される。比較器2401には、量子化ステップ予測部2201の出力である量子化ステップ予測値と、閾値メモリ2404に保持されている閾値Bとが入力される。比較器2401は、この2入力を比較し、例えば量子化ステップ予測値が閾値Bを超えると出力D1として「1」を、量子化ステップ予測値が閾値B以下であれば出力D1として「0」を出力する。比較器2402には、空き容量算出部2406において算出された送信バッファ2108の空き容量と、閾値メモリ2405に保持されている閾値Cとが入力される。比較器2402は、この2入力を比較し、例えば送信バッファ2108の空き容量が閾値Cを超えると出力D2として「1」を、空き容量が閾値C以下であれば出力D2として「0」を出力する。フレームレートテーブル2403は、比較器2401の出力D1と、比較器2402の出力D2との組み合わせに対応した最適フレームレートを示すテーブルである。閾値メモリ2404は、予め設定された、量子化ステップ予測値の閾値Bを保持している。閾値メモリ2405は、予め設定された、送信バッファ2108の閾値Cを保持している。空き容量算出部406は、送信バッファ2108の全データ容量と、送信バッファ2108から入力されるデータ残量とに基づいて、送信バッファ2108の現在の空き容量を算出する。
【0094】
具体的には、フレームレート計算部2202は、フレームレートテーブル2403に従って、符号化対象のフレームに対する最適フレームレートを計算する。例えば、送信バッファ2108の空き容量が閾値Cを超え、かつ、量子化ステップ予測値が閾値B以下である場合、すなわち、量子化ステップが小さい値にも拘らず、送信バッファ2108に余裕がある場合、フレームレートが最大になるよう最適フレームレートを(例えば、30Hzに)決定する。逆に、送信バッファ2108の空き容量が閾値C以下で、かつ、量子化ステップ予測値が閾値Bを超える場合、すなわち、量子化ステップが大きくなっているにも拘らず、送信バッファ2108に余裕がない場合、フレームレートが最小になるよう最適フレームレートを、(例えば、10Hz)に決定する。さらに、送信バッファ2108の空き容量と量子化ステップ予測値の何れもが閾値より大きいか、又は何れもが閾値以下の場合、フレームレートが中間の値になるよう、最適フレームレートを決定する。
【0095】
図17は、上記図16におけるフレームレート計算部2202の各入力信号および出力信号の一例を示す図である。図17(a)は、フレームレート計算部2202の出力信号である最適フレームレートを示す図である。図17(b)は、フレームレート計算部202の一方の入力信号である量子化ステップ予測値を示す図である。図17(c)は、フレームレート計算部202の他方の入力信号である送信バッファ2108の空き容量を示す図である。この空き容量は、正確には、入力されたデータ残量から空き容量算出部2406によって算出されたものである。図17(b)の曲線L1は、時間の経過に伴って量子化ステップ予測値が変化する様子を示し、図17(c)の曲線L2は、送信バッファ2108の空き容量の時間変化を示している。図17(b)のように、量子化ステップ予測値が閾値B以下の間、比較器2401は、D1=0を出力し、量子化ステップ予測値が閾値Bを越えると、比較器2401はD1=1を出力する。また、量子化ステップ予測値が再び閾値B以下となると、比較器401はD1=0を出力する。一方、図17(c)のように、送信バッファ2108の空き容量が閾値C以下の間、比較器2402はD2=0を出力し、空き容量が閾値Cを超えると、比較器2402はD2=1を出力する。また、空き容量が再び閾値C以下となると、D2=0を出力する。
【0096】
フレームレート計算部2202が保持するフレームレートテーブル2403には、比較器2401の出力D1の値「0」または「1」と、比較器2402の出力D2の値「0」または「1」との4通りの組み合わせに対応して4種類のフレームレートが記述されている。フレームレート計算部2202は、D1=0(量子化ステップ予測値が小さい)かつD2=0(空き容量が少ない)の間は、図17(a)のように、最適フレームレートとして20Hzを出力する。また、図17(b)および図17(c)に示されるように、曲線L1で示される量子化ステップ予測値の方だけが閾値Bを越えた場合、すなわち、D1=1(量子化ステップ予測値が大きい)かつD2=0(空き容量が少ない)の間は、フレームレート計算部2202は、最適フレームレートとして15Hzを出力する。続いて、量子化ステップ予測値および空き容量の両方ともが閾値を超えると、すなわち、D1=1(量子化ステップ予測値が大きい)かつD2=1(空き容量が多い)の間、フレームレート計算部は、2202は、量子化ステップを小さく制御するために、最適フレームレートとして20Hzを出力する。さらに、量子化ステップ予測値の方だけが閾値B以下となった場合、すなわち、D1=0(量子化ステップ予測値が小さい)かつD2=1(空き容量が多い)の間、フレームレート計算部202は最適フレームレートとして30Hzを出力する。このように、フレームレート計算部202は、量子化ステップ予測値と送信バッファ2108の空き容量とに応じて(ここでは4段階ではあるが)、徐々にフレームレートを増減を行なう。
【0097】
図18は、上記図14に示したフレーム数計算部204の動作を説明するための図である。図18(a)は、比較器2205から出力される間引き情報の一例を示す図である。図18(b)は、フレーム数計算部2204の詳細な構成を示すブロック図である。図18(a)に示すように、フレーム数計算部2204には、比較器2205から出力された間引き情報が30Hzで入力される。この間引き情報は、「0」または「1」の2値信号である。間引き情報の「0」は、当該フレームが間引きされたことを示し、間引き情報の「1」は当該フレームが符号化されたことを示している。図18(b)のフレーム数計算部2204は、比較器2205から出力された間引き情報に基づいて現在のフレームレートを計算し、計算結果を所定の周期(例えば、5Hz)で出力を行なう処理部または回路である。このフレーム数計算部2204は、間引き情報メモリ2601、カウンタ2602および演算器2603を備える。間引き情報メモリ2601は、先入れ先出しで保持するFIFO(first_in first_out)のメモリ装置であり、30Hzで入力される1ビットの間引き情報を現フレームから遡って30フレーム分保持する。カウンタ2602は、所定の周期(例えば、5Hz)で間引き情報メモリ2601内の直近の間引き情報が「1」のフレーム数mと、間引き情報が「0」のフレーム数nとをカウントし、次の周期(例えば、1/5秒後)にmとnの値をリセットする。演算器2603は、上記所定の周期で「m/(m+n)」を計算し、その結果を現フレームレートとして出力する。これにより、フレーム数計算部2204が、例えば1秒間に5回の現フレームレートを計算して出力した場合は、0.2秒毎により適切な量子化ステップを算出することが可能となる。
【0098】
フレームレート制御部2113の比較器2205は、フレーム数計算部2204によって計算された現フレームレートと、フレームレート計算部2202によって計算された最適フレームレートとを比較して、最適フレームレートが現在のフレームレート以上であれば、符号化の指示を示す「1」を間引き情報として出力する。一方、最適フレームレートが現在のフレームレート未満であれば、間引きの指示を示す「0」を間引き情報として出力する。この結果、被符号化フレームのフレームレートは、フレームレート計算部2202によって算出された最適フレームレートに等しくなる。即ち、本画像符号化装置2100は、送信バッファ2108の空き容量に応じて量子化ステップの制御を行なうので、送信バッファ2108の空き容量の時間変化をより緩和して量子化ステップを制御した場合、即ち、量子化ステップ予測値と送信バッファ2108の空き容量とに応じてフレームレートを徐々に増減させて符号化を行なった場合は、急激な画像の劣化を回避することが可能となる。
【0099】
図19は、画像符号化装置2100における入力画像信号と被符号化フレームの概要を説明するための図である。図19(a)は、画像符号化装置2100に入力される画像信号の各フレームを示す図である。図19(a)に示すように、画像符号化装置2100は、上記実施の形態1の図5の場合と同様に、2つのフレームセットで1つのフレーム群2604を構成し、このフレーム群2604を上記量子化ステップやフレームレートを決定する際の1単位とする。図19(b)は、画像符号化装置2100によって符号化された各被符号化フレームを示す図である。
【0100】
図19(a)に示すように、画像符号化装置2100に入力される画像信号には符号化が容易なシーンと符号化が困難なシーンとが含まれており、符号化が容易なシーンでは符号化されたデータの発生ビット量は少なくなる。一方、符号化が困難なシーンでは符号化されたデータの発生ビット量が増加する。例えば、時刻aに符号化が困難なシーンが画像符号化装置2100に入力されたとすると、符号化が困難なシーンの最初のフレームの符号化による発生ビット量が多いために送信バッファ2108の空き容量が少なくなり、量子化ステップ予測部2201ではこの空き容量に応じて量子化ステップ予測値が増大される。例えば、量子化ステップ予測部2201によって予測された量子化ステップ予測値が、直前フレームに対応する量子化ステップ予測値の1.5倍に大きくされる。これにより、次のフレームの符号化による発生ビット量が抑制される。この結果、符号化による発生ビット量は当初の量子化ステップを用いて量子化した場合ほど大きくならず、送信バッファ2108の空き容量も、急激に低下することはない。従って、従来では連続的に大幅なフレーム間引きが必要になる場合であっても、画像符号化装置2100では、より緩やかにフレームレートを低減することができる。
【0101】
それでもなお、上記送信バッファ2108の空き容量が低下して閾値C以下になった場合、フレームレート計算部202は最適フレームレートを1段階低いフレームレートに変更する。例えば、時刻aまで30Hzのフレームレートで符号化していた場合、フレームレート計算部2202は、次のフレームからの最適フレームレートを20Hzに変更する。このように、量子化ステップを大きくし、フレームレートを小さくしても、なおかつ送信バッファ2108の容量に余裕がなく、量子化ステップ予測値がさらに大きくなり、閾値Bを超えた場合、フレームレート計算部2202は、次の最適フレームレートをさらに1段階低いフレームレートに変更する。例えば、時刻bまで20Hzのフレームレートで符号化していた場合、フレームレート計算部2202は次の最適フレームレートを15Hzに変更する。
【0102】
このように、画像符号化装置100は、符号化が困難なシーンが入力された場合でも、符号化による発生ビット量に応じて量子化ステップ予測値を算出すると共に、その量子化ステップ予測値を最適フレームレートに反映することができるので、より穏やかに段階的にフレームレートを低減していくことができる。逆に、入力される画像信号において、例えば、時刻cで、符号化が困難なシーンから符号化が容易なシーンに切り替わった場合にも、まず量子化ステップを小さくすることにより、できるだけ高画質に符号化を行ない、それでもさらに送信バッファに余裕ができた(符号化が容易なシーンである)場合には、フレームレートを1段大きな値に変更するので、より穏やかに段階的にフレームレートを増加することができる。例えば、時刻cにおいて符号化が容易なシーンが入力され、量子化ステップを小さくしてもなお、送信バッファ2108に余裕ができた場合は、時刻dにおいてフレームレートを1段上の20Hzに変更し、時刻eにおいて量子化ステップが十分小さな値になった場合には、フレームレートをもう1段上の30Hzに変更するので、より穏やかにフレームレートを増加することができる。この結果、画像符号化装置100によって符号化された画像信号を復号化装置で復号化した場合、符号化が困難なシーンでも、急激に画像が荒くなったり急激に動きがぎこちなくなったりすることなく動画像を再生することができる。逆に、符号化が容易なシーンに切り替わった場合でも、急激に画像の濃淡が滑らかになったり、急激に動きが滑らかになったりすることなく、人の目に不自然さを感じさせずにより画質の高い画像を再生することができる。
【0103】
以上のように、本実施の形態の画像符号化装置2100によれば、所定の時間長(例えば、1秒間)で観測した場合のビットレートを一定に保ちながら、バッファに十分空きがある場合は低い量子化ステップで符号化することで、従来よりも高画質に符号化することができ、かつ複雑なシーンへ移行した場合のフレームレートの急激な低下(多くのフレームが符号化されずスキップされること)を抑制し、従来よりも動きの滑らかな符号化を行なうことができる。
【0104】
なお、上記の実施の形態において、フレームレート計算部2202は、送信バッファ2108のデータ残量と、量子化ステップ予測部2201の量子化ステップ予測値とを用いて最適フレームレートを計算することとしたが、本発明はこれに限定されず、何れか一方を用いて計算してもよい。また、フレームレート計算部2202は、上記図16に示したフレームレートテーブル2403を用いて、30Hz、20Hz、15Hzおよび10Hzの4段階の最適フレームレートを計算することとしたが、最適フレームレートはこの値に限定されず、また、4段階である必要もない。さらに、このようなフレームレートテーブルを用いて最適フレームレートを計算する必要もなく、例えば、送信バッファの空き容量が閾値C以上である場合は最適フレームレートを現フレームレートの2倍にし、閾値C未満の場合は現フレームレートの1/2倍にするというように計算してもよい。また、もう1つの閾値D(C<D)を設け、送信バッファの空き容量が閾値C以上である場合は最適フレームレートを現フレームレートの2倍にし、閾値D未満の場合は現フレームレートの1/2倍にするというように計算してもよい。このようにすることによって、閾値Cおよび閾値Dのそれぞれの近傍におけるわずかな送信バッファのデータ残量の変化に対して、最適フレームレートがその都度変更されることを防止することができる。また、最適フレームレートは、量子化ステップ予測値の変化に対しても、これと同様の計算を行なって求めてもよい。さらに、最適フレームレートは現フレームレートの1/2倍、2倍といった値に限定されるものではない。以下の実施の形態においても同様である。
【0105】
また、上記の実施の形態においては、量子化ステップ予測部2201は、上記図15に示した予測係数テーブル2303によって量子化ステップ予測値を計算する場合について説明したが、本発明の量子化ステップ予測方法はこれに限定されず、予め定めた関数を用いて計算するとしてもよい。さらに、予測係数テーブル2303内の量子化ステップの予測係数も、「2」「1.5」「1.2」「1」「0.8」「0.5」「0.4」という値に限定されない。以下の実施の形態においても同様である。
【0106】
なお、本実施の形態2のフレーム数計算部2204は、過去1秒間(即ち、30フレーム分)の間引き情報を格納するための間引き情報メモリ2601を備えることとしたが、本発明はこれに限定されない。また、現フレームレートの計算方法も、上記計算方法に限定されず、他の方法を用いてもよい。以下の実施の形態においても同様である。
【0107】
また、上記送信バッファのデータ残量に代えて、平均ビットレートとしてもよい。以下の実施の形態においても同様である。
【0108】
以下では、上記のフレームレート制御部2113の変形例のフレームレート制御部2800、3000及び3400について説明する。なお、以下の変形例では、上記のフレームレート制御部2113同一の構成についてはその説明は省略し、異なる点について重点的に説明することとする。
【0109】
図20は、変形例のフレームレート制御部2800の機能構成を示すブロック図である。フレームレート制御部2800は、量子化ステップ予測部2201、量子化ステップ決定部2203、フレームレート計算部2202、フレーム数計算部2204および比較器2205を備える。フレームレート制御部2800が上記図14に示したフレームレート制御部2113と異なる点は、フレームレート計算部2202に量子化ステップ予測部2201の量子化ステップ予測値が入力される代わりに、量子化ステップ決定部2203によって決定された量子化ステップが入力される点である。
【0110】
図21は、上記図20におけるフレームレート計算部2202の各入力信号および出力信号の一例を示す図である。図21(a)は、フレームレート計算部2202の出力信号である最適フレームレートを示す図である。図21(b)は、フレームレート計算部2202の一方の入力信号である量子化ステップを示す図である。図21(c)は、フレームレート計算部2202の他方の入力信号である送信バッファ2108の空き容量を示す図である。量子化ステップ決定部2203は、量子化ステップ予測部2201において求められた量子化ステップ予測値に基づいて、「1」から「31」までの整数値を決定し、決定した値を量子化ステップとして出力する。従って、図21(b)のように、フレームレート制御部2800に入力される量子化ステップは、量子化ステップ予測値と異なり、最大でも「31」である。
【0111】
このように、フレームレート計算部2202は、量子化ステップ予測値の代わりに、量子化ステップ決定部2203からの出力である量子化ステップに基づいて最適フレームレートを計算することによって、実際の符号化による発生ビット量から大きくかけ離れることなく最適フレームレートを算出することができる。
【0112】
図22は、変形例のフレームレート制御部3000の機能構成を示すブロック図である。フレームレート制御部3000は、量子化ステップ決定部2203で得られた量子化ステップから過去に符号化したフレームの平均量子化ステップを求め、求められた平均量子化ステップからフレームレート計算部2202の最適フレームレートの計算を行ない、量子化ステップ予測部2201、量子化ステップ決定部2203、平均量子化ステップ計算部3001、フレームレート計算部3002、フレーム数計算部2204および比較器2205を備える。平均量子化ステップ計算部3001は、過去1秒間の符号化に用いた量子化ステップの平均値を計算する。フレームレート計算部3002は、平均量子化ステップ計算部3001によって計算された量子化ステップの平均値と、送信バッファ2108の空き容量とから最適フレームレートを計算する。
【0113】
図23は、上記図22における平均量子化ステップ計算部3001の機能を説明するためのブロック図である。平均量子化ステップ計算部3001は、過去に符号化されたフレームについて量子化ステップの平均値の計算を行ない、量子化ステップメモリ3101、間引き情報メモリ3102、加算器3103および除算器3104を備える。量子化ステップメモリ3101は、量子化ステップ決定部2203の出力である量子化ステップの値を現フレームから1秒間遡って30フレーム分、先入れ先出しで保持するFIFOである。間引き情報メモリ3102は、比較器2205から出力される、各フレームに対応する間引き情報(即ち、例えば、1秒間に30フレームある場合は全部で30ビット)を、現フレームから1秒間遡って先入れ先出しで保持するFIFOである。加算器3103は、各フレーム毎に対応する間引き情報と量子化ステップとの乗算した結果を加算して(即ち、過去1秒間に符号化された全てのフレームの量子化ステップを合計し)、除算器3104に出力する。除算器3104は、加算器3103から入力される量子化ステップの合計を、過去1秒間に符号化されたフレームの数で除算して、量子化ステップの平均値を算出する。
【0114】
図24は、上記図22におけるフレームレート計算部3002の機能を説明するためのブロック図である。フレームレート計算部3002は、上記図16に示したフレームレートテーブル2403を保持しており、さらにヒステリシスコンパレータ3201、閾値メモリ3202、ヒステリシスコンパレータ3203、閾値メモリ3204および空き容量算出部2406を備える。ヒステリシスコンパレータ3201は、閾値メモリ3202から閾値α1、β1(β1<α1)が一方の入力端子に入力され、他方の入力端子に入力される平均量子化ステップが閾値α1を超えると、その後、平均量子化ステップが閾値β1以下になるまでD1=1を出力し、平均量子化ステップが閾値β1を超えても閾値α1を超えるまではD1=0を出力する比較器である。閾値メモリ3202は、閾値α1およびβ1を保持するラッチ回路またはメモリである。ヒステリシスコンパレータ3203は、閾値メモリ3204から閾値α2、β2(β2<α2)が一方の入力端子に入力され、他方の入力端子に入力される送信バッファ2108の空き容量がα2を超えるとD2=1を出力し、その後送信バッファ2108の空き容量がβ2以下となるまでD2=1を出力する。閾値メモリ3204は、閾値α2およびβ2を保持するラッチ回路またはメモリである。
【0115】
図25は、上記図22におけるフレームレート計算部3002の各入力信号および出力信号の一例を示す図である。図25(a)は、フレームレート計算部3002の出力信号である最適フレームレートを示す図である。図25(b)は、フレームレート計算部3002の一方の入力信号である平均量子化ステップを示す図である。図25(c)は、フレームレート計算部3002の他方の入力信号である送信バッファ2108の空き容量を示す図である。図25(b)に示すように、平均量子化ステップは「1」から「31」までの値をとるが、必ずしも各フレームの量子化ステップのように自然数ではなく、また、変化の度合いも緩やかで小さくなっている。フレームレート計算部3002が、このように入力されるヒステリシスコンパレータ3201の出力D1およびヒステリシスコンパレータ3203の出力D2の値に基づいて最適フレームレートを計算する方法はすでに説明した通りである。
【0116】
このように、フレームレート制御部3000は、量子化ステップ予測値の代わりに、平均量子化ステップ計算部3001からの出力である平均量子化ステップに基づいてフレームレートを制御することによって、量子化ステップの値が閾値付近で上下した場合に、1フレームごとにフレームレートが変更されてしまうことを防止することができる。
【0117】
なお、上記実施の形態では、平均量子化ステップ計算部3001において、過去1秒間に符号化されたフレームにおける量子化ステップの平均値を計算する実施例について説明したが、本発明はこれに限定されず、過去数秒間または過去数フレーム〜数十フレームについて量子化ステップの平均値を算出することとしてもよい。また、符号化されていないフレームも含めて、一律に過去の量子化ステップの平均値を計算するようにしてもよい。
【0118】
図26は、変形例のフレームレート制御部3400の機能構成を示すブロック図である。フレームレート制御部3400のフレームレート計算部3401は、比較器2401および比較器2402の代わりにヒステリシスコンパレータ3201およびヒステリシスコンパレータ3203を備え、上記実施の形態1におけるフレームレート計算部202と同様に、最適フレームレートを計算するが、さらに、過去1秒間に計算した最適フレームレートの平均値を求め、求めた平均フレームレートを最適フレームレートとする。
フレームレート制御部3400は、量子化ステップ予測部2201、量子化ステップ決定部2203、フレームレート計算部3401、フレームレートメモリ3402、フレーム数計算部2204および比較器2205を備える。フレームレート計算部3401は、ヒステリシスコンパレータ3201の出力D1およびヒステリシスコンパレータ3203の出力D2を入力して、フレームレートテーブル2403の規則(真理値表)に従って最適フレームレートを計算する。さらに、フレームレート計算部3401は、過去の複数の最適フレームレートの計算結果からその平均値を計算する。
【0119】
フレームレートメモリ3402は、フレームレート計算部3401の計算結果である最適フレームレートを、現フレームから1秒間遡った30フレーム分について、先入れ先出しで保持するFIFOである。
【0120】
図27は、上記図26におけるフレームレート計算部3401およびフレームレートメモリ3402の詳細な構成を示すブロック図である。フレームレート計算部3401は、フレームレートテーブル2403を保持しており、さらに、ヒステリシスコンパレータ3201、閾値メモリ3202、ヒステリシスコンパレータ3203、閾値メモリ3204、空き容量算出部2406、加算器3501および除算器3502を備える。フレームレート計算部3401は、入力される画像信号のフレーム毎に、量子化ステップ予測部2201から量子化ステップ予測値が入力されるヒステリシスコンパレータ3201の出力D1と、送信バッファ2108のデータ残量が入力されるヒステリシスコンパレータ3203の出力D2とに基づいて、フレームレートテーブル2403から最適フレームレートを算出し、算出された最適フレームレートを30Hzでフレームレートメモリ3402に出力する。加算器3501は、フレームレートメモリ3402内の各最適フレームレートを加算する。除算器3502は、加算器3501から出力された値を「30」で除算し、フレームレートテーブル2403を参照して、4段階の最適フレームレートの中から除算結果に最も近いフレームレートを平均最適フレームレートとして決定して出力する。この結果、最適フレームレートが、例えば、30Hz→10Hzと変化するような場合にも、平均最適フレームレートは、必ず30Hz→20Hz→15Hz→10Hzのように、中間のフレームレートを経由して順次変化するので、符号化におけるフレームレートの制御を、より滑らかに行なうことができる。
【0121】
図28は、上記図26におけるフレームレート計算部3401の各入力信号および出力信号の一例を示す図である。図28(a)は、フレームレート計算部3401の出力信号である平均最適フレームレートを示す図である。図28(b)は、フレームレート計算部3401の一方の入力信号である量子化ステップ予測値を示す図である。図28(c)は、フレームレート計算部3401の他方の入力信号である送信バッファ2108の空き容量を示す図である。図28(a)に示すように、平均最適フレームレートは、現フレームから1秒間遡って30フレーム分の最適フレームレートが平均化され、その値に最も近い最適フレームレートが選ばれているため、大きなフレームレートの変更が抑制され、その結果、より動きの滑らかな符号化結果を得ることができる。
【0122】
なお、本フレームレート計算部3401は、過去1秒間、30フレーム分の最適フレームレートの平均値を計算すると説明したが、本発明はこれに限定されず、平均値を求める最適フレームレートの範囲は過去何秒間または何フレーム分であってもよい。
【0123】
(実施の形態3)
図29は、実施の形態3における画像符号化装置4100の機能構成を示すブロック図である。画像符号化装置4100は、上記実施の形態1の画像符号化装置10における可変ビットレート方式と上記実施の形態2の画像符号化装置2100における可変フレームレート方式とを用いて、より適切な符号化を実現する。
【0124】
図29に示すように、画像符号化装置4100は、送信バッファ2108、フレームレート制御部4113およびフレーム間引部4116を除いて、上記実施の形態1における画像符号化装置10と同じ機能構成である。なお、以下において、上記実施の形態1又は実施の形態2における機能構成と同じものについては、同一の符番を付し、その説明は省略する。
【0125】
フレームレート制御部4113は、上記実施の形態2の画像符号化装置2100のフレームレート制御部2113の機能のうち、間引き情報を生成する機能のみを有している。
【0126】
フレーム間引部4116は、フレームレート制御部4113から間引き情報を受信してフレームレートを決定し、決定したその時点のフレームレート値をビットレート制御部30に通知する。
【0127】
図30は、上記図29におけるフレームレート制御部4113の詳細な機能構成を示すブロック図である。図30に示すように、フレームレート制御部4113は、上記実施の形態2におけるフレームレート制御部2113(上記図14参照)から量子化ステップ予測部2201および量子化ステップ決定部2203を除いた構成となっている。従って、このフレームレート制御部4113は、送信バッファ2108から入手したデータ残量に基づいて間引き情報のみを生成し、この間引き情報をフレーム間引部4116に送信する。
【0128】
以上のように、本実施の形態に係る画像符号化装置4100により、送信バッファのデータ残量によってフレームレートを制御すると共に、このフレームレートとフレーム群に割り当てられた総ビット数とに基づいて、より好適なビット割り当てを実現することが可能となる。
【0129】
(実施の形態4)
以下の実施の形態では、上記実施の形態1〜3における画像符号化装置の構成を画像符号化プログラムのステップとして実現し、上記画像符号化装置と同等の機能を一般的なコンピュータシステム上で実現するための方策について説明する。
【0130】
図31は、画像符号化プログラムを格納したフレキシブルディスクを用いて、上記実施の形態1〜3の画像符号化装置と同等の機能を一般的なコンピュータシステム上で実現する場合の説明図である。
【0131】
図31(b)は、フレキシブルディスクの正面から見た外観、断面構造及びフレキシブルディスクを示し、図31(a)は、記録媒体本体であるフレキシブルディスクの物理フォーマットの例を示している。
【0132】
フレキシブルディスク1301は、ケース1302に内蔵され、当該ディスクの表面には同心円状に外周から内周に向かって複数のトラックが形成され、各トラックは角度方向に16のセクタに分割されている。従って、前記画像符号化プログラムを格納したフレキシブルディスクでは、前記フレキシブルディスク1301上に割り当てられた領域に、前記画像符号化プログラムとしてのデータが記録されている。
【0133】
また、図31(c)は、フレキシブルディスク1301に前記画像符号化プログラムの記録再生を行なうための装置の構成を示す。前記画像符号化プログラムをフレキシブルディスク1301に記録する場合は、コンピュータシステム1304から画像符号化プログラムのデータをフレキシブルディスクドライブ1303を介して書き込む。また、フレキシブルディスク1301内のプログラムにより前記符号化あるいは復号化装置をコンピュータシステム中に構築する場合は、フレキシブルディスクドライブ1303からプログラムを読み出し、コンピュータシステム1304に転送する。
【0134】
なお、上記の説明ではデータ記録媒体としてフレキシブルディスクを用いて説明を行なったが、光ディスクやICカード、ROMカセット等、プログラムを記録できる媒体を用いることにより、同様に上記画像符号化装置を実現することができる。
【0135】
【発明の効果】
以上のように、本発明に係る画像符号化装置によれば、所定の時間長において一定のビットレートで符号化を行なう場合、フレームの集まりであるフレーム群における発生ビット数の偏りが少なくなるようにフレーム群を構成し、フレーム群における個々のフレームに対して符号化を行なう毎に、次のフレームに割り当てるべきビット数を計算する。さらに、過去のフレームにおける発生ビット数をも参照することで、次のフレームに対して高画質に符号化し得る最適な割当ビット数を導出することができる。つまり、符号化が困難なシーンが連続した場合であっても、その後のシーンに割り当てるビット数が極端に少なくなることを回避し、全体として画像の品質の向上を図ることが可能となる。
【0136】
また、本発明に係る画像符号化装置によれば、符号化されるフレームのレートが変動する(可変フレームレートの)場合においても、符号化を行なう毎にその時点のフレームレートを用いた最適なビット数を導出することが可能となるので、所定の時間長における平均ビットレートを一定に保ちつつ、画質の極端な劣化を回避し得る符号化を可能とする。
【0137】
また、本発明に係る画像符号化装置によって符号化されたビットストリームは一般的な復号化装置で復号が可能であり、特別な処理をまったく行なうことなく、高画質な復号が可能である。
【0138】
さらに、本発明に係る画像符号化装置によれば、現フレームを符号化した結果、発生した符号量に応じて、まず、量子化の幅を調節して各画素の信号解像度を調節することにより次フレームの発生符号量を制御し、量子化幅の調節による発生符号量の制御に応じて、符号化フレームレートを調節することができる。この結果、例えば、量子化幅を大きくすることによって十分、発生符号量が低減したにも拘らずフレーム間引きを発生させ、必要以上に画質を劣化させてしまうという状態の発生を未然に防止して、効率よく符号化による発生符号量を制御することができるという効果がある。
【0139】
また、本発明に係る画像符号化装置は、送信バッファの残留符号量から次符号化フレームの量子化幅を計算することにより、例えば、送信バッファに余裕がある場合(すなわち、符号化が容易なシーン)は量子化幅を小さな値とし、逆に送信バッファに余裕がない場合は量子化幅を大きな値とすることで、十分長い時間でのビットレートを一定に保ち、かつできるだけ高画質な符号化を行なうことができるという効果がある。
【0140】
さらに、本発明に係る画像符号化装置は、計算された量子化幅の予測値が閾値以上の大きな値となった場合(すなわち符号化が困難な複雑なシーンの場合)に符号化フレームレートを小さな値に変更して、フレームの間引き率を増加する。しかし、量子化幅の制御により発生ビット量が抑制されるので、急激なフレームレートの変化が生じない高画質な符号化を行なうことができるという効果がある。
【0141】
また、本発明に係る画像符号化装置によれば、送信バッファの残留符号量によって制御され変動する量子化幅の平均値を用いて符号化フレームレートを制御することによって、現フレームの符号化で極端に符号量が発生し(送信バッファの残留符号量が増加し)次フレームの量子化ステップが大きく制御された場合に、すぐにフレームレートの変更が行われることが抑制され、直後の画像の動きがぎこちなくなることを防止することができる。また同時に、フレームレートの急激な変更が行われることを抑制し、動きの滑らかな符号化を行なうことができるという効果がある。
【図面の簡単な説明】
【図1】実施の形態1における画像符号化装置の機能構成を示すブロック図である。
【図2】図1におけるビットレート制御部の詳細な機能構成を示すブロック図である。
【図3】一般的な画像符号化におけるピクチャタイプ別の発生ビット数の特徴を示す図である。
【図4】図3で定義したフレーム群の具体例である。
【図5】図3で定義したフレーム群の変形例である。
【図6】(a)は、上記図5のように2つのフレームセットでフレーム群を構成することによる効果を説明するための図である。
(b)は、上記図5のように2つのフレームセットでフレーム群を構成し、かつ、符号化のフレームレートが変化した場合における効果を説明するための図である。
【図7】実施の形態1における画像符号化装置の全体制御部及びビットレート制御部における処理の流れを示すフローチャートである。
【図8】(a)は、実施の形態1における画像符号化装置を用いて符号化を実行する場合のフレーム群の構成例を示す図である。
(b)は、実施の形態1における画像符号化装置を用いて符号化を実行する場合のビットレートの変化を示す一例である。
【図9】(a)は、2つのフレームセットで1つのフレーム群を構成させた場合の各フレームの様子を示した一例である。
(b)は、2つのフレームセットで1つのフレーム群を構成させた場合のビットレートの変動の様子を示した一例である。
【図10】(a)は、2つのフレームセットで1つのフレーム群を構成させ、かつ、符号化のフレームレートが変化した場合の各フレームの様子を示した一例である。
(b)は、2つのフレームセットで1つのフレーム群を構成させ、かつ、符号化のフレームレートが変化した場合のビットレートの変動の様子を示した一例である。
【図11】演算部におけるビット数の算出方法の具体例を示した図である。
【図12】図1においてフレーム間引部を設けず、その他の部署からフレームレート値Rfの値を入手するように構成した画像符号化装置の機能構成の一部を示したブロック図である。
【図13】実施の形態2に係る画像符号化装置の機能構成を示すブロック図である。
【図14】図13におけるレート制御部の詳細な機能構成を示すブロック図である。
【図15】図14における量子化ステップ予測部の機能を説明するためのブロック図である。
【図16】図14におけるフレームレート計算部の機能を説明するためのブロック図である。
【図17】図16におけるフレームレート計算部の各入力信号および出力信号を示す図である。
【図18】図14におけるフレーム数計算部の動作を説明するための図である。
【図19】画像符号化装置の入力画像信号と被符号化フレームとを示す図である。
【図20】変形例のフレームレート制御部の機能構成を示すブロック図である。
【図21】図20におけるフレームレート計算部の各入力信号および出力信号を示す図である。
【図22】変形例のフレームレート制御部の機能構成を示すブロック図である。
【図23】図22における平均量子化ステップ計算部の構成を示すブロック図である。
【図24】図22におけるフレームレート計算部の機能を説明するためのブロック図である。
【図25】図22におけるフレームレート計算部の各入力信号および出力信号を示す図である。
【図26】変形例のフレームレート制御部の機能構成を示すブロック図である。
【図27】図26におけるフレームレート計算部およびフレームレートメモリの機能を説明するためのブロック図である。
【図28】図26におけるフレームレート計算部の各入力信号および出力信号を示す図である。
【図29】実施の形態3における画像符号化装置の機能構成を示すブロック図である。
【図30】図29の画像符号化装置におけるフレームレート制御部の機能構成を示すブロック図である。
【図31】実施の形態1〜3における画像符号化装置を一般のコンピュータシステムによって実現するためのプログラムを格納し得る記憶媒体を説明するための図である。
【図32】従来の可変ビットレート方式を用いた画像符号化装置の機能構成を示すブロック図である。
【図33】従来の画像符号化装置におけるビットレート制御部の機能構成を示すブロック図である。
【図34】従来の画像符号化装置の全体制御部及びビットレート制御部における処理の流れを示すフローチャートである。
【図35】従来のビットレート制御部における割当ビット数の算出方法の具体例を示した図である。
【図36】(a)は、従来技術の第1の問題を説明するためのフレーム群の構成例である。
(b)は、従来技術の第1の問題を説明するためのビットレートの一例である。
【図37】(a)は、従来技術の第2の問題を説明するためのフレーム群の構成例である。
(b)は、従来技術の第2の問題を説明するためのビットレートの一例である。
【符号の説明】
10 画像符号化装置
20 フレーム間引部
30 レート制御部
31 フレーム群目標ビット数導出部
32 次フレーム目標ビット数導出部
33 平均フレームビット数導出部
34 演算部
35 量子化ステップ導出部
36 記憶部
40 全体制御部
50 画像符号化装置
60 全体制御部
100 画像符号化装置
101 被符号化フレーム信号
102 フレームメモリ
103 検出部
104 補償部
105 直交変換部
106 量子化部
107 可変長符号化部
108 逆量子化部
109 逆直交変換部
110 ビットレート制御部
111 フレーム群目標ビット数導出部
112 次フレーム目標ビット数導出部
113 量子化ステップ導出部
121 符号化フレーム信号
140 全体制御部
141 量子化ステップ
201 量子化ステップ予測部
202 フレームレート計算部
203 量子化ステップ決定部
204 フレーム数計算部
205 比較器
302 現在値メモリ
303 予測係数テーブル
401 比較器
406 容量算出部
1301 フレキシブルディスク
1302 ケース
1303 フレキシブルディスクドライブ
1304 コンピュータシステム
2100 画像符号化装置
2101 フレーム間引部
2108 送信バッファ
2109 逆量子化部
2110 逆直交変換部
2111 差分器
2112 加算器
2113 フレームレート制御部
2201 量子化ステップ予測部
2202 フレームレート計算部
2203 量子化ステップ決定部
2204 フレーム数計算部
2205 比較器
2302 現在値メモリ
2303 予測係数テーブル
2401 比較器
2402 比較器
2403 フレームレートテーブル
2404 閾値メモリ
2405 閾値メモリ
2406 容量算出部
2601 情報メモリ
2602 カウンタ
2603 演算器
2604 フレーム群
2800 フレームレート制御部
3000 フレームレート制御部
3001 平均量子化ステップ計算部
3002 フレームレート計算部
3101 量子化ステップメモリ
3102 情報メモリ
3103 加算器
3104 除算器
3201 ヒステリシスコンパレータ
3202 閾値メモリ
3203 ヒステリシスコンパレータ
3204 閾値メモリ
3400 フレームレート制御部
3401 フレームレート計算部
3402 フレームレートメモリ
3501 加算器
3502 除算器
4100 画像符号化装置
4113 フレームレート制御部
4116 フレーム間引部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding technique and an image decoding technique, and more particularly to an image encoding technique using a variable bit rate method or a variable frame rate method.
[0002]
[Prior art]
Conventionally, there is a variable bit rate (Variable Bit Rate) method as one of methods for controlling the bit rate in image coding technology such as MPEG (Moving Picture Expert Group) standard. This is mainly because local bits associated with the complexity of the image to be encoded in order to protect the restrictions such as the capacity of the buffer memory that stores the encoded data and the restrictions on the video recording time when recording on the recording medium. This is a control method in which the number of bits generated in a predetermined time length (for example, 1 second) is kept within a certain range while allowing a change in rate. In other words, generate more bits for encoding in scenes that are difficult to encode (higher bit rates), and reduce the number of bits to generate in scenes that are easier to encode (lower bit rates). Thus, the number of bits allocated according to the scene is controlled. That is, encoding is performed so that a high-quality image can be reproduced while keeping the number of generated bits within a certain time constant (that is, within the limits of buffer memory capacity and recording time). (For example, refer to Patent Document 1).
[0003]
The image coding apparatus using the conventional variable bit rate method will be described with reference to the image coding apparatus 100 in FIG. The image coding apparatus 100 includes an orthogonal transform unit 105, a quantization unit 106, a variable length coding unit 107, an inverse quantization unit 108, an inverse orthogonal transform unit 109, a frame memory 102, a motion detection unit 103, and a motion compensation unit 104. And a bit rate control unit 110.
[0004]
The orthogonal transform unit 105 performs discrete cosine transform (DCT) in units of macroblocks on the received encoded frame signal 101 (image signal data) to generate DCT coefficients and a quantization unit 106 Output to. Here, for an I (Intra coded) picture frame, DCT calculation is performed in the intra-picture coding mode. For a frame of a P (Predictive coded) picture, a DCT operation is performed in the forward predictive coding mode based on an I picture or P picture located in the past in time. For a B (Bidirectionally) picture frame, a DCT operation is performed in a bidirectional predictive coding mode based on an I picture or a P picture positioned before and after in time.
[0005]
The quantization unit 106 quantizes the DCT coefficients input from the orthogonal transform unit 105 in the quantization step (or may be a quantization parameter) received from the bit rate control unit 110 for each macroblock, and has a variable length. The data is output to the encoding unit 107 and the inverse quantization unit 108. The variable length coding unit 107 performs variable length coding and multiplexing on the quantized DCT coefficient and the like input from the quantization unit 106 and outputs the result to an output buffer (not shown).
[0006]
The inverse quantization unit 108 performs an inverse quantization operation on the quantized DCT coefficient received from the quantization unit 106 and outputs the result to the inverse orthogonal transform unit 109. The inverse orthogonal transform unit 109 performs an inverse orthogonal transform operation based on the inversely quantized DCT coefficient input from the inverse quantization unit 108 to reproduce image signal data, and outputs the image signal data to the frame memory 102.
[0007]
The frame memory 102 adds and stores the decoded image signal data of the I picture or P picture and the motion compensation data generated by the motion compensation unit 104. The motion detection unit 103 detects a motion vector from the reference image stored in the frame memory 102 and outputs data representing the motion vector to the motion compensation unit 104.
[0008]
The motion compensation unit 104 performs motion compensation data (reference image data) based on a reference image stored in the frame memory 102 for encoding a P picture or a B picture and data representing a motion vector input from the motion detection unit 103. ) Is generated. The bit rate control unit 110 receives the number of generated bits from the variable length coding unit 107, determines a quantization step based on the number of generated bits, and transmits this quantization step to the quantization unit 106.
[0009]
The overall control unit 140 is, for example, a microcomputer including a ROM, a RAM, and the like, and is a part that controls the entire image encoding apparatus 100. The overall control unit 140 controls each processing timing based on a control signal or the like.
[0010]
FIG. 33 is a block diagram illustrating a functional configuration of the bit rate control unit 110 in the conventional image encoding device 100. As shown in FIG. 33, the bit rate control unit 110 includes a frame group target bit number deriving unit 111, a next frame target bit number deriving unit 112, and a quantization step deriving unit 113.
[0011]
The frame group target bit number deriving unit 111 receives the generated bit number Nn131 from the variable length coding unit 107 and stores it in an internal memory (not shown). At this time, the frame group target bit number deriving unit 111 counts the number of times the generated bit number Nn131 is received (that is, the number of frames of the encoded frame). Further, the frame group target bit number deriving unit 111 calculates the number of bits that can be allocated to a frame that has not yet been encoded in units of frame groups, and transmits the calculated number of bits to the next frame target bit number deriving unit 112, as well as the actual encoding. The number of bits that can be allocated is sequentially updated using the number of generated bits Nn131 generated by the above. Here, the “frame group” refers to a group of frames that can be encoded in a predetermined time length.
[0012]
The next frame target bit number deriving unit 112 derives a target value for the number of bits to be allocated to the next frame based on the number of bits that can be allocated for each frame group received from the frame group target bit number deriving unit 111, and performs quantization. It transmits to the step derivation unit 113. The target value is calculated by dividing the number of bits that can be allocated in units of frames at that time by the number of remaining frames.
[0013]
The quantization step deriving unit 113 calculates a quantization step 141 (which may be a quantization parameter) based on the target value of the number of bits to be allocated to the next frame received from the next frame target bit number deriving unit 112 and performs quantum. To the conversion unit 106.
[0014]
FIG. 34 is a flowchart showing the flow of processing in the overall control unit 140 and the bit rate control unit 110 of the conventional image encoding device 100.
[0015]
First, when the generated bit number Nn131 is received by the bit rate control unit 110 (S1401), the overall control unit 140 determines whether or not the next frame to be encoded is the head of the frame group (S1402). In this case, when the next frame is the first frame of the frame group (S1402: Yes), the bit rate control unit 110 initializes the allocatable bit number Na, the allocation target period Ta, and the allocation target frame number Nt. (S1405 to 1407). Here, “NA” is an initial value of the number of bits assigned to each frame group. “TA” is a period of the entire frame group. “Rf” is an encoding frame rate of the image encoding apparatus 100.
[0016]
On the other hand, when the next frame is not the first frame of the frame group (S1402: No), the bit rate control unit 110 updates the allocatable bit number Na and the allocation target period Ta (S1403 to 1404).
[0017]
Next, the bit rate control unit 110 calculates the allocation bit number Nb based on the allocatable bit number Na and the allocation target frame number Nt (S1408), and updates (decrements) the allocation target frame number Nt (S1409). .
[0018]
Thereafter, the bit rate control unit 110 determines whether or not thinning is necessary for a frame to be encoded. If thinning is necessary, the bit rate control unit 110 notifies the overall control unit 140 of this (S1410: Yes). On the other hand, when it is not necessary to perform decimation (S1410: No), a quantization step is calculated and output to the quantization unit 106 (S1411).
[0019]
The overall control unit 140 and the bit rate control unit 110 repeat the above processing until the encoding processing ends (S1401 to 1412).
[0020]
FIG. 35 is a diagram showing a specific example of a method for calculating the number of allocated bits Nb in the conventional bit rate control unit 110. In this case, for the sake of convenience, the number of generated bits Nn131 and the number of assigned bits Nb are assumed to match.
[0021]
In the example of FIG. 35, image signal data (encoded frame signal 101) input at 30 [fps] is encoded at a frame rate of 15 [fps], and in principle is configured by 15 frames. One frame group is generated every second. In this example, the input encoded frame signal 101 is represented by “input image frame number 1701”, and the encoded frame signal 121 is represented by “frame group frame number 1702”. In FIG. 35, the column of the frame group frame number 1702 and the number of generated bits Nn 131 is “x” because the corresponding frame of the input image frame number 1701 is not coded but “thinned”. Represents.
[0022]
Furthermore, in FIG. 35, for example, the generated bit number Nn for the input image frame number “9” (that is, the frame group frame number “5”) is the total of the number of bits already assigned to the four frames is 1180 bits. Since the number of frames is “11”, ((3600-1180) / 11 = 220 bits).
[0023]
On the other hand, the number of generated bits for the input image frame number “13” (that is, the frame group frame number “6”) is the sum of the already allocated bits because the input image frame number “11” is “decimated”. Is 1400 bits, and the remaining number of frames is “9”, so the fractional part is rounded down ((3600-1400) / 9 = 244 bits).
[0024]
Note that “(14)” described in the column of the frame group frame number 1702 corresponding to the input image frame number “29” in FIG. 35 is the last frame when the input image frame number 1701 is “13”. This is an expected value of the group frame number 1702.
[0025]
As described above, the conventional image encoding apparatus 100 assigns bits to the next encoding target frame.
[0026]
[Patent Document 1]
Japanese Patent Laid-Open No. 2001-25015
[0027]
[Problems to be solved by the invention]
However, in the image coding apparatus 100 using the variable bit rate in the above-described prior art, when (complex) frames that are difficult to encode are continuous, the encoding step is accompanied even if the quantization step is changed to a large value. The number of generated bits increases (in this case, the bit rate value increases). Then, in order to keep the number of generated bits in a predetermined time length (one frame group) constant, the number of bits to be allocated is reduced for a frame after consecutive frames that are difficult to encode. For this reason, subsequent frames must be encoded with a large quantization step, and there is a first problem that the image quality of those frames is extremely deteriorated. The rate will be significantly smaller).
[0028]
FIG. 36 is a diagram for explaining the first problem of the conventional technology. In FIG. 36, 15 frames from the frame 1601 to the frame 1602 are defined as a frame group, and 3600 [bits] is assigned as a target value (as shown in FIG. 35 above) for each frame group. In this case, if scenes that are difficult to encode continue from time t1 and a large number of bits are assigned to the encoding of those frames, the number of bits that can be assigned to the latter half of the frame group is reduced. However, if the quantization step is set to a large value, the image quality is extremely deteriorated. In FIG. 36, the quantization step is particularly large between “t3 and t4”, and it can be estimated that the image quality is deteriorated accordingly.
[0029]
Furthermore, when the number of bits that can be allocated is finally reduced and the frame rate must be changed in the middle of the frame group (that is, the frame must be thinned out), the frame rate has changed even though the frame rate has changed. Since the number of bits allocated to one frame is determined based on the initial frame rate, a large number of bits cannot be allocated even though the frame rate is lowered. There is a second problem that it is necessary to roughen the image and further deteriorate the image quality.
[0030]
FIG. 37 is a diagram for explaining the second problem of the conventional technology. In the example of FIG. 37, scenes that are difficult to encode are continuous, and many bits are assigned to the encoding of those frames. As a result of gradually reducing the frame rate, the frame interval becomes large and eventually, It shows that the image becomes awkward and the quality of the image deteriorates.
[0031]
Therefore, the present invention has been made in view of the above problems, and even when scenes that are difficult to encode are continuous, image quality deterioration due to an extremely insufficient number of bits that can be allocated to the remaining frames. It is an object of the present invention to provide an image coding apparatus and method that can perform coding for high-quality images while also taking into account changes in the rate of frames to be coded.
[0032]
[Means for Solving the Problems]
In order to achieve the above object, an image encoding device according to the present invention is an image encoding device that encodes image signals sequentially input in units of frames, Encoding means for quantizing the frequency component of the image signal for each frame and encoding based on the quantized result; Frame group consisting of multiple frames In allocation Ru Total bit number specifying means for specifying the total number of bits, frame rate, In the frame group Frame number specifying means for specifying the number of unencoded frames in the frame group based on the number of already encoded frames, the specified total number of bits and the specified frame And a target bit number calculation means for calculating a target value of the number of bits to be allocated to the next frame to be encoded based on the number, and a frame to be encoded next using the calculated target number of bits A quantization step deriving means for deriving the quantization step; Based on the transmission buffer that holds the encoded data encoded by the encoding means and outputs to the outside by a certain amount, the amount of encoded data remaining in the transmission buffer, and the quantization step, Next, based on the frame rate determined by the frame rate control means, the frame rate control means for determining the frame rate indicating the cycle of the frame to be encoded, and the image signal input to the encoding means is controlled. Input control means And with The target bit number calculating means is the number of frames that are not yet encoded in the frame group calculated from the frame rate determined by the frame rate control means with the total bit number specified by the total bit number specifying means. The target value of the number of bits is calculated by dividing by The
[0033]
As a result, the number of bits to be allocated to the next frame to be encoded is calculated based on the total number of bits allocated to the entire frame group and the number of already allocated bits so that the frame group has a constant bit rate. Therefore, it is possible to avoid the case where the number of allocated bits is locally biased and to perform averaged bit allocation, and finally it is possible to prevent extreme deterioration in image quality.
[0034]
In order to achieve the above object, an image encoding device according to the present invention further includes a frame group in the frame group. Already encoded flame Occurrence based on the rate and the number of bits generated by it Average value calculating means for calculating an average value of the number of bits, and the calculated Occurrence The average number of bits On the other hand, the target value of the new number of bits obtained by multiplying by a predetermined coefficient is compared with the calculated target number of bits, and the larger one is set as the basic target value, and a preset lower limit value and the basic value are set. Compare the target value with the larger one Target value for new number of bits When And the quantization step deriving unit derives the quantization step using a target value of the number of bits specified by the calculating unit.
[0035]
Thus, the number of bits to be allocated to the next frame to be encoded is determined based on the number of unencoded frames calculated from the accepted frame rate and the number of assignable bits in the frame group. Coding according to the change in rate is possible.
[0036]
In order to achieve the above object, the image encoding apparatus according to the present invention further includes a storage unit that stores already encoded but untransmitted data, and a data amount stored in the storage unit. On the basis of this, a frame rate calculating means for calculating a frame rate relating to a frame to be encoded next is provided, wherein the frame rate receiving means receives the calculated frame rate.
[0037]
As a result, while maintaining a constant bit rate when observed for a predetermined time length, if there is sufficient space in the buffer, encoding can be performed with a higher quantization quality than before by encoding with a low quantization step. It is possible to suppress a sudden drop in the frame rate when a scene is shifted to a complicated scene (a lot of frames are skipped without being encoded), and encoding with smoother motion than before can be performed. Become.
[0038]
In order to achieve the above object, the present invention can be realized as an image encoding method using the characteristic means of the image encoding apparatus as steps, or as a program including these steps. it can. The program is not only stored in a ROM or the like included in the image encoding apparatus, but can also be distributed via a recording medium such as a CD-ROM or a transmission medium such as a communication network.
[0039]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments according to the present invention will be described in detail with reference to the drawings. In the following description, components that are the same as those in the conventional technology are denoted by the same reference numerals, and description thereof is omitted.
[0040]
(Embodiment 1)
FIG. 1 is a block diagram illustrating a functional configuration of an image encoding device 10 according to the first embodiment. This image encoding device 10 suppresses local bit rate fluctuations while keeping the bit rate constant when observed for a predetermined time length (for example, 1 second), thereby enabling higher quality images to be recorded. Enables encoding for reproduction.
[0041]
The image coding apparatus 10 includes a frame memory 102, a motion detection unit 103, a motion compensation unit 104, an orthogonal transform unit 105, a quantization unit 106, a variable length coding unit 107, an inverse quantization unit 108, an inverse orthogonal transform unit 109, The frame thinning unit 20, the rate control unit 30, and the overall control unit 40 are configured.
[0042]
The frame thinning unit 20 determines whether to encode / decode the frame of the encoded frame signal 101 input at a constant period, and sends the frame rate value Rf21 at that time to the rate control unit 30. Notice.
[0043]
Based on the number of generated bits received from the variable length coding unit 107 and the frame rate value Rf21 received from the frame thinning unit 20, the rate control unit 30 performs a quantization step (or a coding step in the next frame coding). Quantization parameter) is determined and transmitted to the quantization unit 106.
[0044]
The overall control unit 40 is, for example, a microcomputer including a ROM, a RAM, and the like, and controls the entire image encoding device 10. More specifically, the overall control unit 40 controls the processing timing of each unit based on a control signal (the broken line in the overall control unit 40 in FIG. 1 represents a control signal line). Further, the overall control unit 40 identifies the picture type of the encoded frame signal 101 input at a constant period (identification of I frame, B frame, and P frame), and sends the identification result to the rate control unit 30. Notice.
[0045]
FIG. 2 is a block diagram showing a detailed functional configuration of the rate control unit 30 in FIG. The rate control unit 30 includes a frame group target bit number deriving unit 31, a next frame target bit number deriving unit 32, an average frame bit number deriving unit 33, a calculating unit 34, a quantization step deriving unit 35, and a storage unit 36. .
[0046]
The frame group target bit number deriving unit 31 sequentially calculates and updates the target value of the total number of bits that can be allocated to all the remaining frames to be encoded in units of frame groups. More specifically, the frame group target bit number deriving unit 31 receives the generated bit number Nn 131 from the variable length coding unit 107 and stores it in the storage unit 36. Further, the frame group target bit number deriving unit 31 reads the total number of bits that can be allocated from the next frame to be encoded to the last frame of the frame group from the storage unit 36, and from the total number of bits, the above-described number of generated bits Nn 131 is subtracted, and the value is transmitted to the next frame target bit number deriving unit 32 and stored in the storage unit 36.
[0047]
The next frame target bit number deriving unit 32 determines the remaining frames to be encoded based on the frame rate value Rf21 received from the frame thinning unit 20 and the total allocatable bit number received from the frame group target bit number deriving unit 31. The target value of the number of bits to be allocated to the next frame is calculated in consideration of the number of frames.
[0048]
The average frame bit number deriving unit 33 calculates the average number of allocated bits based on the frame rate value Rf21 received from the frame thinning unit 20 and the number of bits allocated to the past frame stored in the storage unit 36. Calculate the value.
[0049]
The calculation unit 34 calculates a bit number obtained by multiplying the bit number calculated by the average frame bit number deriving unit 33 by a predetermined coefficient (for example, 0.8), and this and the next frame target bit number deriving unit 32 The calculated number of bits is compared with the target value, and the larger number of bits is selected. Further, the calculation unit 34 compares the selected number of bits with a preset lower limit value and selects a larger number of bits (that is, selects a number of bits that does not fall below the lower limit value). The data is transmitted to the quantization step deriving unit 35. The predetermined coefficient is not limited to “0.8”, and may be another value greater than 0 and less than or equal to 1.
[0050]
The quantization step deriving unit 35 derives the value of the quantization step so that the number of bits received from the calculation unit 34 is equal to the number of generated bits.
[0051]
The storage unit 36 stores the number of generated bits Nn 131 that is a result of encoding each frame received from the variable length encoding unit 107. Further, the storage unit 36 updates the frame group target bit number according to the control of the frame group target bit number deriving unit 31.
[0052]
FIG. 3 is a diagram illustrating general characteristics of the number of generated bits for each picture type in image coding. As shown in FIG. 3, the frame (P or B picture) of the inter-picture coding (P picture or B picture) is usually determined from the number of generated bits Nn in the frame of the intra picture coding (I picture) (I frames 210 to 250). The number of generated bits Nn in (B frame) is smaller. Therefore, by defining one frame group from the I frame to the next I frame, when defining a frame group based on other rules (for example, forming a frame group every 15 frames regardless of the picture type) In comparison with the case (1), the deviation of the number of generated bits in each frame group can be reduced. In the example of FIG. 3, for the sake of convenience, the time required for encoding each frame group is TA, and the period is the same.
[0053]
It should be noted that the effect of reducing the deviation in the number of bits in each frame group can be obtained only by the first frame of the frame group being the I frame or the last frame of the frame group being the I frame. .
[0054]
FIG. 4 is a diagram showing a specific example of the frame group defined in FIG. As shown in FIG. 4, the frame group 310 includes 15 frames from the intra-frame coding (I) frame 210 to the frame immediately before the intra-frame coding (I) frame 220. Similarly, each of the frame group 220 and the frame group 230 is composed of 15 frames. In this case, an initial value of the total number of bits that can be assigned to one frame group is determined in advance (for example, 3600 “bits” etc.) Note that the method of defining a frame group is not limited to FIG. .
[0055]
FIG. 5 shows a modification of the frame group defined in FIG. As shown in FIG. 5, a group of frames including a first frame set and a second frame set corresponding to the two frame groups 310 and 320 in FIG. 4 may be defined as one frame group 410. In this case, the initial value of the total number of bits that can be allocated to the frame group 410 is 7200 [bits] (3600 [bits for each of the first frame set and the second frame set)].
[0056]
FIG. 6 is a diagram for explaining the effect of configuring a frame group with two frame sets as shown in FIG. FIG. 6A shows the number of allocated bits of the next frame to be encoded including the number of allocatable bits in the next second frame set even when there is a scene that is difficult to encode in one frame group. Therefore, the change in the bit rate can be more relaxed. For example, 1000 bits are assigned as an initial value for the entire frame group 410, and 500 bits are temporarily assigned to the first frame set and 500 bits are temporarily assigned to the second frame set. Thereafter, even if 700 bits are used in the first frame set in actual encoding, the next frame group 420 has a total of 800 [bits] as the initial value (the remaining 300 [bits] of the previous frame group 410). + New second frame set (500 [bits]) is allocated.
[0057]
In FIG. 6B, even when the frame rate has to be changed because the encoding is further difficult, the bit rate is rapidly reduced to a small value by the same method as in FIG. That is, it is possible to avoid a sudden increase in the quantization step).
[0058]
FIG. 7 is a flowchart showing the flow of processing in the overall control unit 40 and the rate control unit 30 of the image encoding device 10.
[0059]
First, the rate control unit 30 receives the generated bit number Nn131 from the variable length coding unit 107 (S701), and receives the frame rate value Rf21 from the frame thinning unit 20 (S702).
[0060]
Next, the overall control unit 40 identifies whether or not the next frame is an I frame (S703). In this case, when the next frame is an I frame (S704: Yes), the rate control unit 30 initializes the allocatable bit number Na, the allocation target period Ta, and the allocation target frame number Nt (S708 to S710). .
[0061]
On the other hand, if the next frame is not an I frame (S704: No), the rate control unit 30 updates the allocatable bit number Na and the allocation target frame number Nt (S705, S706). Further, the rate control unit 30 rounds off the decimal part of the allocation target frame number Nt and converts this Nt into an integer (S707).
[0062]
Thereafter, the rate control unit 30 calculates the allocation bit number Nb based on the allocatable bit number Na and the allocation target frame number Nt (S711), and updates the allocation target period Ta (S712). In this case, the allocation target period Ta is updated in consideration of a case where the frame rate value Rf21 is changed in the middle of the same frame group.
[0063]
Thereby, the rate control unit 30 derives a quantization step based on the allocated bit number Nb, and transmits the quantization step to the variable length coding unit 107 (S713).
[0064]
The overall control unit 40 and the rate control unit 30 repeat the above processing until the encoding processing is completed (S701 to S714).
[0065]
FIG. 8 is an example illustrating a change in bit rate when encoding is performed using the image encoding device 10. When the change in the bit rate shown in FIG. 8 is seen, the number of bits that can be allocated is reduced because of the coefficient (for example, 0.8) in the calculation unit 34 as compared with the case of the prior art (FIG. 36 above). Therefore, the change in bit rate tends to slow down. Further, in FIG. 8, the arithmetic unit 34 selects the number of bits that does not fall below the lower limit value, and calculates the quantization step so that the number of bits after encoding becomes this number of bits. Furthermore, since the encoding is executed in accordance with the calculated quantization step and the generated bits are determined, it is shown that the bit rate is equal to or greater than the lower limit value.
[0066]
FIG. 9 is an example showing how the bit rate fluctuates when one frame group is composed of two frame sets as shown in FIG. As shown in FIG. 9, in the prior art (FIG. 36 above), the bit rate value is small during “t3−t4” where the bit rate value is extremely small (that is, the quantization step is extremely large). However, the effect of using a large number of bits in the first frame set appears in the first part of the second frame set (between “t4 and t6”). (That is, the quantization step cannot be reduced and the bit rate value remains small).
[0067]
FIG. 10 shows an example of how the bit rate changes when one frame group is composed of two frame sets and the encoding frame rate changes in the middle of the frame group. In FIG. 10, the frame rate is changed from 15 [fps] to 7.5 [fps], but the way of changing the bit rate is the same as the bit rate of FIG. 8 (that is, in the case of FIG. 10). In this case, it is assumed that the bit rate is the same because encoding is performed at a quantization step of ½ and the number of bits is doubled. In this case as well, between “t3 and t4” Image quality deterioration is suppressed).
[0068]
FIG. 11 is a diagram showing a specific example of a method for calculating the number of bits in the calculation unit 34 of FIG. In the example of FIG. 11, the encoded frame signal 101 input at 30 [fps] is encoded at a frame rate of 15 [fps]. Also in this example, similarly to FIG. 37, the input encoded frame signal 101 is represented by “input image frame number 1701”, and the encoded frame signal 121 is represented by “frame group frame number 1102”. In FIG. 11, the column of the frame group frame number 1102 and the number of generated bits Nn131 is “x” because the corresponding input image frame number 1701 is not coded but “thinned”. Represents.
[0069]
Further, in FIG. 11, for example, the target value of the number of generated bits for the input image frame number “9” (that is, the frame group frame number “5”) is 1180 [bits] with the total number of already assigned bits remaining. Since the number of frames is “11”, ((3600-1180) / 11 = 220 [bits]). In addition, the average number of generated bits (1180/4 = 295 [bits]) in the past frame in the average frame bit number deriving unit 33 is calculated, and the arithmetic unit 34 calculates a coefficient (for example, 0.8) and compare this with the target value of the number of bits described above to select the larger one. As a result, the number of generated bits for the frame group frame number “5” is 236 [bits].
[0070]
On the other hand, the number of generated bits for the input image frame number “13” (that is, the frame group frame number “6”) is “decimated” for the frame of the input image frame number “11” (thus, the frame rate value). Rf21 is changed to 7.5 [fps]), and the number of remaining frames (because the frame rate value Rf21 is calculated at 7.5 [fps]) is calculated based on “5”. Furthermore, since the fractional part is rounded down to the calculated value, (3600-1416) / 5 = 436 [bits]. In addition, the average number of generated bits in the past frame in the average frame bit number deriving unit 33 (1416/5 = 383 [bits]) is calculated, and the arithmetic unit 34 calculates a coefficient (for example, 0.8) and compare this with the target value of the number of bits to select the larger value. As a result, the number of generated bits for the input image frame number “13” is 436 [bits].
[0071]
When comparing the number of generated bits Nn of the frame group frame numbers “5” and “6” in FIG. 11 and FIG. 35 of the above prior art, both are generated in the image coding apparatus 10 (that is, FIG. 11 above). Since the number of bits is a larger value and a larger number of bits can be assigned, it is clear that encoding for a higher quality image than before is possible.
[0072]
Note that although two numbers are written in the frame group frame number column corresponding to the input image frame number “29” in FIG. 11, “(15)” indicates the time when the input image frame number is “9”. Is the expected value of the frame group frame number 1102 when the frame rate is 15 [fps], and “(10)” is a frame rate of 7.5 [fps] when the input image frame number is “13”. ] Is an expected value of the frame group frame number 1102.
[0073]
In the first embodiment, the frame thinning unit 20 is provided and the bit rate is controlled based on the frame rate value Rf21 transmitted from the frame thinning unit 20. The value may be obtained from other than the frame thinning unit.
[0074]
FIG. 12 is a block diagram showing a part of the functional configuration of an image encoding apparatus 50 configured not to provide the frame thinning unit 20 in FIG. 1 but to obtain the frame rate value Rf21 from other departments. It is. The image encoding device 50 is different from the image encoding device 10 in FIG. 1 only in that the frame thinning unit 20 is not provided and an overall control unit 60 is provided instead of the overall control unit 40.
[0075]
In addition, since the quantization step in the above embodiment uniquely corresponds to the quantization parameter, the quantization step may be replaced with the quantization parameter.
[0076]
As described above, according to the image coding apparatus according to the present embodiment, the number of bits to be allocated is determined while responding to changes in the frame rate of coding, so whether or not image coding is difficult. Therefore, it is possible to ensure a good image quality on average, and to prevent the movement from becoming extremely awkward or the image quality from being deteriorated.
[0077]
Furthermore, the bitstream encoded by the image encoding device shown in the first embodiment can be decoded by a general image decoding method. Also, in the stream that has been encoded according to the first embodiment, the quantization step of each frame varies according to the complexity of the image, but the variation is not extreme, and the intra-screen coded frame to the intra-screen It is possible to make the number of generated bits substantially constant in a frame group composed of frames up to immediately before the encoded frame.
[0078]
In the first embodiment, the period required for encoding each frame group is the same as “TA”. However, the period is not limited to the same, and the time required for encoding each frame group is different. It may be.
[0079]
In the above embodiment, only the average value of the number of bits calculated by the average frame bit number deriving unit is multiplied by a predetermined coefficient (for example, 0.8), and this is calculated by the next frame target bit number deriving unit. Although the configuration is such that the larger number of bits is selected by comparing with the set target value of the number of bits, it may be configured such that both are multiplied by a predetermined coefficient for comparison.
[0080]
(Embodiment 2)
FIG. 13 is a block diagram illustrating a functional configuration of the image encoding device 2100 according to the second embodiment. As shown in FIG. 5 of the first embodiment, the image encoding device 2100 controls quantization steps and frame thinning while considering a group of frames composed of twice as many frames as the conventional one. By doing so, it is possible to perform encoding with high image quality while suppressing rapid fluctuations in the bit rate and frame rate.
[0081]
The image coding apparatus 2100 includes a frame thinning unit 2101, a frame memory 102, a motion detection unit 103, a motion compensation unit 104, an orthogonal transform unit 105, a quantization unit 106, a variable length coding unit 107, a transmission buffer 2108, an inverse quantum A conversion unit 2109, an inverse orthogonal transform unit 2110, a subtractor 2111, an adder 2112, and a frame rate control unit 2113.
[0082]
The frame decimation unit 2101 performs decimation processing on each frame of the image signal input at the reference frame rate (for example, 30 Hz) according to the decimation information input from the frame rate control unit 2113, and the decimation is performed. The image signal is output to the motion detector 103 and the differentiator 2111. For example, when the value of the decimation information input from the frame rate control unit 2113 to the frame decimation unit 2101 is “1”, it indicates an instruction to perform encoding without decimation, and when the value is “0” It is assumed that an instruction to perform coding by thinning out one frame is shown. That is, when the decimation information is “1”, the frame decimation unit 2101 outputs the frame input as the image signal as it is to the motion detection unit 103 and the subtractor 2111 as an encoded frame. Conversely, when the thinning information is “0”, a process of thinning (for example, discarding) the input frame is performed.
[0083]
The frame memory 102 is realized by a RAM, a hard disk, or the like, and is a storage device for holding image data in units of frames. Furthermore, the frame memory 102 stores reference frame data serving as a reference image for the next inter-frame predictive coding frame. The motion detection unit 103 detects the motion of the encoded frame using the reference frame data stored in the frame memory 102 when the input encoded frame is a frame on which inter-frame prediction encoding is performed. The motion compensation unit 104 generates motion compensation data corresponding to the motion detected by the motion detection unit 103. This motion compensation data is data indicating a motion vector indicating a correspondence between a reference frame and an encoded frame, and a difference between image signals between blocks indicated by the motion vector.
[0084]
The subtractor 2111 obtains a difference between the motion vector of the frame to be encoded and the motion vector based on the motion compensation data generated by the motion compensation unit 104 when the frame to be encoded is a frame for which inter-frame prediction encoding is performed. . On the other hand, when the frame to be encoded is a frame for which intra-frame prediction encoding is performed, the differentiator 2111 performs prediction within the screen without performing processing for obtaining a difference from the reference frame for the input image signal. After that, the image signal is output to the orthogonal transform unit 105.
[0085]
The orthogonal transform unit 105 orthogonally transforms the motion compensation data generated in the motion compensation unit 104 into data representing a frequency component by DCT (Discrete Cosine Transform) transformation or the like, and outputs the transformation result to the quantization unit 106. The quantization unit 106 quantizes the orthogonally transformed data using the quantization step input from the frame rate control unit 2113, and the quantized result is sent to the variable length coding unit 107 and the inverse quantization unit 2109. Output. The variable length coding unit 107 performs variable length coding on the data quantized by the quantization unit 106 using a Huffman code or the like. The data subjected to the variable length encoding by the variable length encoding unit 107 is stored in the transmission buffer 2108 and output as an encoded bit stream.
[0086]
The transmission buffer 2108 is a first-in first-out (FIFO) memory realized by a RAM or the like. For example, as shown in FIG. 5 of the first embodiment, the transmission buffer 2108 stores the total number of bits allocated to a frame group composed of a plurality of frames, and the remaining data amount or free space inside. When the capacity is monitored and the variable-length encoded data is transmitted to the transmission buffer 2108, that is, when the encoding of the image signal for one frame is completed, the remaining data amount of the transmission buffer 2108 is The data is transmitted to the rate control unit 2113.
[0087]
The inverse quantization unit 2109 inversely quantizes the data quantized by the quantization unit 106 to generate a predicted image, and outputs the data to the inverse orthogonal transform unit 2110. The inverse orthogonal transform unit 2110 performs inverse orthogonal transform on the data inversely quantized by the inverse quantization unit 2109. The adder 2112 adds the data inversely quantized by the inverse orthogonal transform unit 2110 and the motion compensation data generated by the motion compensation unit 104 and outputs the result to the frame memory 102. The remaining data amount in the transmission buffer 2108 is input from the transmission buffer 2108 to the frame rate control unit 2113. The frame rate control unit 2113 calculates a quantization step corresponding to the remaining amount of data in the transmission buffer 2108, outputs the quantization step to the quantization unit 106, calculates a frame rate corresponding to the calculated quantization step, Decimation information indicating whether or not to decimate the current frame is determined and output to the frame decimation unit 2101. Here, the “quantization step” is a reference value (width) when quantizing the frequency component of each frame, for example, a natural number (“quantization parameter”) from “1” to “31”. "). This quantization parameter has a one-to-one correspondence with the quantization step, and is defined such that the greater the numerical value, the greater the quantization width. Hereinafter, this quantization parameter will be described as a “quantization step”.
[0088]
FIG. 14 is a block diagram showing a detailed functional configuration of the frame rate control unit 2113 in FIG. The frame rate control unit 2113 includes a quantization step prediction unit 2201, a frame rate calculation unit 2202, a quantization step determination unit 2203, a frame number calculation unit 2204, and a comparator 2205. The quantization step prediction unit 2201 performs a predetermined operation on the current quantization step in accordance with the remaining amount of data input from the transmission buffer 2108, calculates a quantization step prediction value, and calculates a frame rate calculation unit 2202 and It outputs to the quantization step determination part 2203. The quantization step determination unit 203 selects one natural number from “1” to “31” that is closest to the quantization step prediction value input from the quantization step prediction unit 201, and then selects the selected natural number for the next quantization Decide on a step. Specifically, when the input quantization step predicted value includes a value after the decimal point, rounding processing such as rounding off, rounding down or rounding up is performed. In this case, when the value is less than “1”, “1” is selected, and when it exceeds “31”, “31” is selected.
[0089]
Based on the remaining data amount input from the transmission buffer 2108 and the quantization step prediction value input from the quantization step prediction unit 201, the frame rate calculation unit 2202 performs the next encoding from the current frame rate. Calculate the optimal frame rate at. The frame number calculation unit 204 calculates the current frame rate based on the thinning information output from the comparator 205. The comparator 205 compares the optimum frame rate that is the output of the frame rate calculation unit 202 with the current frame rate that is the output of the frame number calculation unit 204, and if the optimum frame rate is greater than the current frame rate. , “1” indicating an instruction not to be thinned is output as the thinning information. On the other hand, when the optimum frame rate is smaller than the current frame rate, “0” indicating an instruction to perform decimation is output as decimation information.
[0090]
FIG. 15 is a block diagram for explaining the function of the quantization step prediction unit 201 in FIG. FIG. 15A is a diagram schematically illustrating a quantization step prediction method in the quantization step prediction unit 201. FIG. 15B is a diagram illustrating a prediction coefficient table 303 held in the quantization step prediction unit 201. The quantization step prediction unit 201 holds a current value memory 2302 illustrated in FIG. 15A and a prediction coefficient table 2303 illustrated in FIG. The current value memory 302 holds the initial value of the quantization step at the start of encoding, and holds the quantization step prediction value calculated by the quantization step prediction unit 201 after the start of encoding. The prediction coefficient table 303 stores the remaining data amount of the transmission buffer 2108 and the prediction coefficient in association with each other, and the quantization step prediction unit 201 predicts the prediction coefficient corresponding to the remaining data amount input from the transmission buffer 2108. Is multiplied by the current quantization step prediction value held in the current value memory 302 to calculate the quantization step prediction value of the next frame.
[0091]
As shown in FIG. 15A and FIG. 15B, the prediction coefficient is “1.2” when the remaining data amount in the transmission buffer 2108 is 50% or more and less than 80%, and 80% or more and less than 90%. In this case, the bit amount of the encoded data is reduced by increasing the value as the free capacity in the transmission buffer 2108 decreases, such as “1.5”, and “2” when 90% or more and 100% or less. Is set as follows. The prediction coefficient is set to “1” so that the quantization step is maintained as it is when the remaining data amount in the transmission buffer 2108 is 40% or more and less than 50%. Contrary to the above, the prediction coefficient is “0.8” when the remaining data amount of the transmission buffer 2108 is 30% or more and less than 40%, “0.5” when it is 20% or more and less than 30%, In the case of 0% or more and less than 20%, it is set as “0.4”. That is, the prediction coefficient is set so that the bit amount of data to be encoded increases as the free space in the transmission buffer 2108 increases (that is, the quantization step is reduced to finely quantize the quality of image quality). Set to enhance).
[0092]
For example, if the quantization step prediction value in the current value memory 302 is “7.5” and the remaining data amount in the transmission buffer 2108 is 75%, the quantization in the current value memory 302 is performed in the next frame. The step prediction value “7.5” is multiplied by the prediction coefficient “1.2”, and the quantization step prediction value for the frame becomes “9”. The calculated quantization step prediction value “9” is overwritten in the current value memory 2302 by the quantization step prediction unit 2201. Since the predicted quantization step value “9” is a natural number from “1” to “31”, the quantization step determination unit 2203 determines the quantization step as the quantization step. If the remaining amount of data in the transmission buffer 2108 is 70% in the next frame after the frame is quantized in the quantization step “9”, the quantization step predicted value “ 9 ”is multiplied by the prediction coefficient“ 1.2 ”, and the next quantization step prediction value becomes“ 10.8 ”. When the quantization step determination unit 203 determines the quantization step by rounding off the decimals, the next frame is quantized at the quantization step “11”. By setting the prediction coefficient in this way, when the remaining amount of data in the transmission buffer 2108 becomes 50% or more, the quantization step increases, so that the quality of the image to be encoded gradually becomes rough and encoded. The bit amount of data can be gradually reduced. On the other hand, when the remaining amount of data in the transmission buffer 2108 becomes less than 40%, the quantization step decreases, so the data bit amount gradually increases, but the image quality of the encoded image can be gradually improved. .
[0093]
FIG. 16 is a block diagram for explaining the function of the frame rate calculation unit 2202 in FIG. The frame rate calculation unit 202 is a unit that calculates the optimum frame rate based on the remaining data amount of the transmission buffer 2108 and the quantization step predicted value. The comparator 2401, the comparator 2402, the frame rate table 2403, the threshold memory 2404, a threshold memory 2405, and a free space calculation unit 2406. The threshold memory 2404 and the threshold memory 2405 are realized by a latch circuit or a RAM. The comparator 2401 receives the quantization step prediction value that is the output of the quantization step prediction unit 2201 and the threshold value B held in the threshold memory 2404. The comparator 2401 compares these two inputs. For example, when the predicted quantization step value exceeds the threshold B, the output D1 is “1”, and when the predicted quantization step value is equal to or less than the threshold B, the output D1 is “0”. Is output. The comparator 2402 receives the free capacity of the transmission buffer 2108 calculated by the free capacity calculation unit 2406 and the threshold value C held in the threshold memory 2405. The comparator 2402 compares these two inputs, for example, outputs “1” as the output D2 when the free capacity of the transmission buffer 2108 exceeds the threshold C, and outputs “0” as the output D2 when the free capacity is equal to or less than the threshold C. To do. The frame rate table 2403 is a table indicating the optimum frame rate corresponding to the combination of the output D1 of the comparator 2401 and the output D2 of the comparator 2402. The threshold memory 2404 holds a preset threshold B of the quantization step prediction value. The threshold memory 2405 holds a preset threshold C of the transmission buffer 2108. The free capacity calculation unit 406 calculates the current free capacity of the transmission buffer 2108 based on the total data capacity of the transmission buffer 2108 and the remaining data amount input from the transmission buffer 2108.
[0094]
Specifically, the frame rate calculation unit 2202 calculates the optimum frame rate for the encoding target frame according to the frame rate table 2403. For example, when the free capacity of the transmission buffer 2108 exceeds the threshold value C and the predicted quantization step value is equal to or less than the threshold value B, that is, when the transmission buffer 2108 has room despite the small quantization step value. The optimum frame rate is determined (for example, 30 Hz) so that the frame rate is maximized. Conversely, when the free capacity of the transmission buffer 2108 is equal to or smaller than the threshold C and the predicted quantization step value exceeds the threshold B, that is, the transmission buffer 2108 has a margin despite the increase in the quantization step. If not, the optimal frame rate is determined to be a minimum (for example, 10 Hz). Furthermore, when both the free capacity of the transmission buffer 2108 and the predicted quantization step value are larger than the threshold value or both are equal to or smaller than the threshold value, the optimal frame rate is determined so that the frame rate becomes an intermediate value.
[0095]
FIG. 17 is a diagram illustrating an example of each input signal and output signal of the frame rate calculation unit 2202 in FIG. FIG. 17A is a diagram illustrating an optimum frame rate that is an output signal of the frame rate calculation unit 2202. FIG. 17B is a diagram illustrating a quantization step prediction value that is one input signal of the frame rate calculation unit 202. FIG. 17C is a diagram illustrating the free capacity of the transmission buffer 2108 that is the other input signal of the frame rate calculation unit 202. More precisely, this free space is calculated by the free space calculation unit 2406 from the input remaining data amount. A curve L1 in FIG. 17B shows how the quantization step predicted value changes with time, and a curve L2 in FIG. 17C shows the time change in the free capacity of the transmission buffer 2108. Yes. As shown in FIG. 17B, the comparator 2401 outputs D1 = 0 while the quantized step predicted value is equal to or smaller than the threshold B, and when the quantized step predicted value exceeds the threshold B, the comparator 2401 outputs D1. = 1 is output. When the quantized step prediction value becomes equal to or smaller than the threshold value B again, the comparator 401 outputs D1 = 0. On the other hand, as shown in FIG. 17C, the comparator 2402 outputs D2 = 0 while the free capacity of the transmission buffer 2108 is equal to or less than the threshold C, and when the free capacity exceeds the threshold C, the comparator 2402 outputs D2 = 1 is output. Further, when the free space becomes equal to or less than the threshold value C again, D2 = 0 is output.
[0096]
The frame rate table 2403 held by the frame rate calculation unit 2202 includes four values “0” or “1” of the output D1 of the comparator 2401 and “0” or “1” of the output D2 of the comparator 2402. Four types of frame rates are described corresponding to the combinations of the streets. The frame rate calculation unit 2202 outputs 20 Hz as the optimum frame rate as shown in FIG. 17A while D1 = 0 (quantization step prediction value is small) and D2 = 0 (small free space). . Further, as shown in FIGS. 17B and 17C, when only the quantization step prediction value indicated by the curve L1 exceeds the threshold value B, that is, D1 = 1 (quantization step prediction). While the value is large) and D2 = 0 (the free space is small), the frame rate calculation unit 2202 outputs 15 Hz as the optimum frame rate. Subsequently, when both the quantization step predicted value and the free capacity exceed the threshold, that is, while D1 = 1 (the quantized step predicted value is large) and D2 = 1 (the free capacity is large), the frame rate calculation is performed. The unit 2202 outputs 20 Hz as the optimum frame rate in order to control the quantization step to be small. Further, when only the quantization step predicted value is equal to or less than the threshold value B, that is, while D1 = 0 (the quantization step predicted value is small) and D2 = 1 (the free capacity is large), the frame rate calculation unit 202 outputs 30 Hz as the optimum frame rate. As described above, the frame rate calculation unit 202 gradually increases or decreases the frame rate according to the quantization step prediction value and the free capacity of the transmission buffer 2108 (although there are four levels here).
[0097]
FIG. 18 is a diagram for explaining the operation of the frame number calculation unit 204 shown in FIG. FIG. 18A is a diagram illustrating an example of thinning information output from the comparator 2205. FIG. 18B is a block diagram illustrating a detailed configuration of the frame number calculation unit 2204. As illustrated in FIG. 18A, the thinning information output from the comparator 2205 is input to the frame number calculation unit 2204 at 30 Hz. This thinning information is a binary signal of “0” or “1”. “0” in the thinning information indicates that the frame has been thinned out, and “1” in the thinning information indicates that the frame has been encoded. The number-of-frames calculation unit 2204 in FIG. 18B calculates a current frame rate based on the thinning information output from the comparator 2205, and outputs a calculation result at a predetermined period (for example, 5 Hz). Or a circuit. The frame number calculation unit 2204 includes a thinning information memory 2601, a counter 2602, and a calculator 2603. The thinning information memory 2601 is a FIFO (first_in first_out) memory device that holds first-in first-out, and holds 30 bits of 30-bit thinning-out information input at 30 Hz from the current frame. The counter 2602 counts the number m of frames whose thinning information is “1” in the thinning information memory 2601 and the number n of frames whose thinning information is “0” in a predetermined cycle (for example, 5 Hz). The values of m and n are reset in a cycle (for example, after 1/5 second). The computing unit 2603 calculates “m / (m + n)” at the predetermined period and outputs the result as the current frame rate. As a result, when the frame number calculation unit 2204 calculates and outputs the current frame rate, for example, five times per second, it is possible to calculate an appropriate quantization step every 0.2 seconds.
[0098]
The comparator 2205 of the frame rate control unit 2113 compares the current frame rate calculated by the frame number calculation unit 2204 with the optimal frame rate calculated by the frame rate calculation unit 2202, and the optimal frame rate is determined to be the current frame rate. If the rate is greater than or equal to the rate, “1” indicating an encoding instruction is output as thinning information. On the other hand, if the optimum frame rate is less than the current frame rate, “0” indicating a thinning instruction is output as thinning information. As a result, the frame rate of the encoded frame becomes equal to the optimum frame rate calculated by the frame rate calculation unit 2202. That is, the present image coding apparatus 2100 controls the quantization step according to the free capacity of the transmission buffer 2108. Therefore, when the quantization step is controlled by further relaxing the time change of the free capacity of the transmission buffer 2108, That is, when encoding is performed by gradually increasing / decreasing the frame rate in accordance with the quantization step prediction value and the free capacity of the transmission buffer 2108, it is possible to avoid rapid image degradation.
[0099]
FIG. 19 is a diagram for describing an outline of an input image signal and a frame to be encoded in the image encoding device 2100. FIG. 19A is a diagram showing each frame of an image signal input to the image encoding device 2100. As shown in FIG. 19A, the image coding apparatus 2100 forms one frame group 2604 with two frame sets, as in the case of FIG. 5 of the first embodiment, and this frame group 2604 is One unit is used for determining the quantization step and the frame rate. FIG. 19B is a diagram showing each encoded frame encoded by the image encoding device 2100.
[0100]
As shown in FIG. 19A, an image signal input to the image encoding device 2100 includes a scene that is easy to encode and a scene that is difficult to encode. The generated bit amount of encoded data is reduced. On the other hand, in a scene where encoding is difficult, the generated bit amount of encoded data increases. For example, if a scene that is difficult to encode is input to the image encoding device 2100 at time a, the amount of generated bits due to the encoding of the first frame of the scene that is difficult to encode is large. The quantization step prediction unit 2201 increases the quantization step prediction value according to the free space. For example, the quantization step prediction value predicted by the quantization step prediction unit 2201 is increased to 1.5 times the quantization step prediction value corresponding to the immediately preceding frame. As a result, the amount of bits generated by encoding the next frame is suppressed. As a result, the amount of bits generated by encoding does not increase as much as when quantized using the original quantization step, and the free capacity of the transmission buffer 2108 does not drop rapidly. Therefore, even in the case where a large amount of frame thinning is required continuously in the past, the image coding apparatus 2100 can reduce the frame rate more gently.
[0101]
Still, when the free capacity of the transmission buffer 2108 decreases to become the threshold value C or less, the frame rate calculation unit 202 changes the optimal frame rate to a frame rate that is one step lower. For example, when encoding is performed at a frame rate of 30 Hz until time a, the frame rate calculation unit 2202 changes the optimal frame rate from the next frame to 20 Hz. Thus, even if the quantization step is increased and the frame rate is decreased, the capacity of the transmission buffer 2108 is not sufficient, the predicted quantization step value further increases, and the threshold B is exceeded. The unit 2202 changes the next optimum frame rate to a frame rate that is one step lower. For example, when encoding is performed at a frame rate of 20 Hz until time b, the frame rate calculation unit 2202 changes the next optimum frame rate to 15 Hz.
[0102]
As described above, the image encoding device 100 calculates the quantization step prediction value according to the generated bit amount by encoding even when a scene difficult to encode is input, and the quantization step prediction value is calculated. Since the optimum frame rate can be reflected, the frame rate can be reduced more gradually and gradually. On the other hand, in the input image signal, for example, even when the scene that is difficult to encode is switched to a scene that is easy to encode at time c, the image quality is as high as possible by reducing the quantization step first. If encoding is performed and there is still room in the transmission buffer (the scene is easy to encode), the frame rate is changed to a larger value, so the frame rate is increased more gradually and gradually. can do. For example, if a scene that is easy to encode at time c is input and the transmission buffer 2108 still has room even if the quantization step is reduced, the frame rate is changed to 20 Hz, which is one stage higher at time d. When the quantization step becomes sufficiently small at time e, the frame rate is changed to 30 Hz, which is one stage higher, so that the frame rate can be increased more gently. As a result, when the image signal encoded by the image encoding device 100 is decoded by the decoding device, even in a scene where encoding is difficult, the image does not suddenly become rough or suddenly awkward. A moving image can be reproduced. On the other hand, even when switching to a scene that is easy to encode, the shade of the image does not suddenly become smooth or the movement suddenly becomes smooth, so that the human eye does not feel unnaturalness. Images with high image quality can be reproduced.
[0103]
As described above, according to the image coding apparatus 2100 of the present embodiment, when the buffer has sufficient vacancy while maintaining a constant bit rate when observed for a predetermined time length (for example, 1 second). By encoding with a low quantization step, it is possible to encode with higher image quality than before, and a drastic drop in the frame rate when moving to a complicated scene (many frames are skipped without being encoded) Encoding can be performed with a smoother motion than in the prior art.
[0104]
In the above embodiment, the frame rate calculation unit 2202 calculates the optimum frame rate using the remaining data amount of the transmission buffer 2108 and the quantization step prediction value of the quantization step prediction unit 2201. However, the present invention is not limited to this and may be calculated using either one. Further, the frame rate calculation unit 2202 uses the frame rate table 2403 shown in FIG. 16 above to calculate the optimum frame rate of four stages of 30 Hz, 20 Hz, 15 Hz, and 10 Hz. It is not limited to a value, and it is not necessary to have four stages. Furthermore, there is no need to calculate the optimum frame rate using such a frame rate table. For example, when the free capacity of the transmission buffer is equal to or greater than the threshold C, the optimum frame rate is set to twice the current frame rate and the threshold C If it is less than 1, it may be calculated so as to be ½ times the current frame rate. Also, another threshold value D (C <D) is provided. When the free capacity of the transmission buffer is equal to or greater than the threshold value C, the optimum frame rate is set to twice the current frame rate. You may calculate so that it may be 1/2 times. By doing so, it is possible to prevent the optimum frame rate from being changed each time with respect to a slight change in the remaining amount of data in the transmission buffer in the vicinity of each of the threshold value C and the threshold value D. The optimum frame rate may be obtained by performing the same calculation for changes in the quantization step predicted value. Further, the optimum frame rate is not limited to a value such as 1/2 or 2 times the current frame rate. The same applies to the following embodiments.
[0105]
In the above embodiment, the quantization step prediction unit 2201 calculates the quantization step prediction value using the prediction coefficient table 2303 shown in FIG. 15 described above, but the quantization step prediction of the present invention has been described. The method is not limited to this, and it may be calculated using a predetermined function. Furthermore, the prediction coefficient of the quantization step in the prediction coefficient table 2303 is also set to the values “2”, “1.5”, “1.2”, “1”, “0.8”, “0.5”, and “0.4”. It is not limited. The same applies to the following embodiments.
[0106]
The frame number calculation unit 2204 according to the second embodiment includes a thinning information memory 2601 for storing thinning information for the past one second (that is, 30 frames). However, the present invention is not limited to this. Not. The calculation method of the current frame rate is not limited to the above calculation method, and other methods may be used. The same applies to the following embodiments.
[0107]
Further, instead of the remaining data amount in the transmission buffer, an average bit rate may be used. The same applies to the following embodiments.
[0108]
Hereinafter, frame rate control units 2800, 3000, and 3400 as modifications of the frame rate control unit 2113 will be described. In the following modified example, the description of the same configuration as the frame rate control unit 2113 is omitted, and different points will be mainly described.
[0109]
FIG. 20 is a block diagram illustrating a functional configuration of a frame rate control unit 2800 according to a modification. The frame rate control unit 2800 includes a quantization step prediction unit 2201, a quantization step determination unit 2203, a frame rate calculation unit 2202, a frame number calculation unit 2204, and a comparator 2205. The frame rate control unit 2800 is different from the frame rate control unit 2113 shown in FIG. 14 in that the quantization step prediction value of the quantization step prediction unit 2201 is input to the frame rate calculation unit 2202, instead of the quantization step. This is the point at which the quantization step determined by the determination unit 2203 is input.
[0110]
FIG. 21 is a diagram illustrating an example of each input signal and output signal of the frame rate calculation unit 2202 in FIG. FIG. 21A is a diagram illustrating an optimum frame rate that is an output signal of the frame rate calculation unit 2202. FIG. 21B is a diagram illustrating a quantization step which is one input signal of the frame rate calculation unit 2202. FIG. 21C is a diagram showing the free capacity of the transmission buffer 2108 that is the other input signal of the frame rate calculation unit 2202. The quantization step determination unit 2203 determines an integer value from “1” to “31” based on the quantization step predicted value obtained by the quantization step prediction unit 2201, and uses the determined value as the quantization step. Output. Accordingly, as shown in FIG. 21B, the quantization step input to the frame rate control unit 2800 is “31” at the maximum, unlike the quantization step prediction value.
[0111]
As described above, the frame rate calculation unit 2202 calculates the optimum frame rate based on the quantization step that is an output from the quantization step determination unit 2203 instead of the quantization step prediction value, thereby performing the actual encoding. The optimal frame rate can be calculated without greatly departing from the amount of generated bits.
[0112]
FIG. 22 is a block diagram illustrating a functional configuration of a frame rate control unit 3000 according to a modification. The frame rate control unit 3000 obtains an average quantization step of a frame encoded in the past from the quantization step obtained by the quantization step determination unit 2203, and determines the optimum of the frame rate calculation unit 2202 from the obtained average quantization step. The frame rate is calculated, and includes a quantization step prediction unit 2201, a quantization step determination unit 2203, an average quantization step calculation unit 3001, a frame rate calculation unit 3002, a frame number calculation unit 2204, and a comparator 2205. The average quantization step calculation unit 3001 calculates an average value of quantization steps used for encoding for the past one second. The frame rate calculation unit 3002 calculates the optimum frame rate from the average value of the quantization steps calculated by the average quantization step calculation unit 3001 and the free capacity of the transmission buffer 2108.
[0113]
FIG. 23 is a block diagram for explaining the function of the average quantization step calculation unit 3001 in FIG. The average quantization step calculation unit 3001 calculates the average value of quantization steps for frames encoded in the past, and includes a quantization step memory 3101, a thinning information memory 3102, an adder 3103, and a divider 3104. The quantization step memory 3101 is a FIFO that holds the value of the quantization step, which is the output of the quantization step determination unit 2203, for 30 frames from the current frame for 30 frames in a first-in first-out manner. The thinning-out information memory 3102 outputs the thinning-out information corresponding to each frame output from the comparator 2205 (that is, for example, 30 bits in total when there are 30 frames in one second) in a first-in first-out manner by going back one second from the current frame. FIFO to hold. The adder 3103 adds the results obtained by multiplying the thinning information and the quantization step corresponding to each frame (that is, sums the quantization steps of all frames encoded in the past one second), and divides. To the device 3104. The divider 3104 divides the sum of the quantization steps input from the adder 3103 by the number of frames encoded in the past 1 second, and calculates the average value of the quantization steps.
[0114]
FIG. 24 is a block diagram for explaining the function of the frame rate calculation unit 3002 in FIG. The frame rate calculation unit 3002 holds the frame rate table 2403 shown in FIG. 16, and further includes a hysteresis comparator 3201, a threshold memory 3202, a hysteresis comparator 3203, a threshold memory 3204, and a free capacity calculation unit 2406. The hysteresis comparator 3201 inputs threshold values α1 and β1 (β1 <α1) from the threshold memory 3202 to one input terminal, and when the average quantization step input to the other input terminal exceeds the threshold α1, The comparator outputs D1 = 1 until the quantization step becomes equal to or less than the threshold value β1, and outputs D1 = 0 until the average quantization step exceeds the threshold value β1 and exceeds the threshold value α1. The threshold memory 3202 is a latch circuit or memory that holds the thresholds α1 and β1. The hysteresis comparator 3203 inputs threshold values α2 and β2 (β2 <α2) from the threshold memory 3204 to one input terminal, and D2 = 1 when the free capacity of the transmission buffer 2108 input to the other input terminal exceeds α2. After that, D2 = 1 is output until the free capacity of the transmission buffer 2108 becomes β2 or less. The threshold memory 3204 is a latch circuit or memory that holds the thresholds α2 and β2.
[0115]
FIG. 25 is a diagram illustrating an example of each input signal and output signal of the frame rate calculation unit 3002 in FIG. FIG. 25A is a diagram illustrating an optimum frame rate that is an output signal of the frame rate calculation unit 3002. FIG. 25B is a diagram illustrating an average quantization step which is one input signal of the frame rate calculation unit 3002. FIG. 25 (c) is a diagram showing the free capacity of the transmission buffer 2108, which is the other input signal of the frame rate calculation unit 3002. As shown in FIG. 25B, the average quantization step takes a value from “1” to “31”, but it is not necessarily a natural number like the quantization step of each frame, and the degree of change is also gradual. It is getting smaller. The method by which the frame rate calculation unit 3002 calculates the optimum frame rate based on the values of the output D1 of the hysteresis comparator 3201 and the output D2 of the hysteresis comparator 3203 input in this way is as already described.
[0116]
As described above, the frame rate control unit 3000 controls the frame rate based on the average quantization step that is an output from the average quantization step calculation unit 3001 instead of the quantization step predicted value. It is possible to prevent the frame rate from being changed for each frame when the value fluctuates in the vicinity of the threshold value.
[0117]
In the above embodiment, an example has been described in which the average quantization step calculation unit 3001 calculates the average value of quantization steps in frames encoded in the past one second, but the present invention is not limited to this. Instead, the average value of the quantization step may be calculated for the past several seconds or the past several frames to several tens of frames. Also, the average value of past quantization steps may be calculated uniformly including unencoded frames.
[0118]
FIG. 26 is a block diagram illustrating a functional configuration of a frame rate control unit 3400 according to a modification. The frame rate calculation unit 3401 of the frame rate control unit 3400 includes a hysteresis comparator 3201 and a hysteresis comparator 3203 instead of the comparator 2401 and the comparator 2402, and, as with the frame rate calculation unit 202 in the first embodiment, the optimal frame The rate is calculated. Further, an average value of the optimum frame rates calculated in the past one second is obtained, and the obtained average frame rate is set as the optimum frame rate.
The frame rate control unit 3400 includes a quantization step prediction unit 2201, a quantization step determination unit 2203, a frame rate calculation unit 3401, a frame rate memory 3402, a frame number calculation unit 2204, and a comparator 2205. The frame rate calculation unit 3401 receives the output D1 of the hysteresis comparator 3201 and the output D2 of the hysteresis comparator 3203, and calculates the optimum frame rate according to the rules (truth table) of the frame rate table 2403. Further, the frame rate calculation unit 3401 calculates the average value from the calculation results of a plurality of past optimum frame rates.
[0119]
The frame rate memory 3402 is a FIFO that holds the optimal frame rate, which is the calculation result of the frame rate calculation unit 3401, in a first-in first-out manner for 30 frames that go back one second from the current frame.
[0120]
FIG. 27 is a block diagram showing detailed configurations of the frame rate calculation unit 3401 and the frame rate memory 3402 in FIG. The frame rate calculation unit 3401 holds a frame rate table 2403, and further includes a hysteresis comparator 3201, a threshold memory 3202, a hysteresis comparator 3203, a threshold memory 3204, a free space calculation unit 2406, an adder 3501, and a divider 3502. . The frame rate calculation unit 3401 receives the output D1 of the hysteresis comparator 3201 to which the quantization step prediction value is input from the quantization step prediction unit 2201 and the remaining data amount of the transmission buffer 2108 for each frame of the input image signal. The optimum frame rate is calculated from the frame rate table 2403 based on the output D2 of the hysteresis comparator 3203, and the calculated optimum frame rate is output to the frame rate memory 3402 at 30 Hz. An adder 3501 adds each optimum frame rate in the frame rate memory 3402. The divider 3502 divides the value output from the adder 3501 by “30”, refers to the frame rate table 2403, and selects the frame rate closest to the division result from the four optimum frame rates as the average optimum frame. Determine and output as a rate. As a result, even when the optimum frame rate changes, for example, from 30 Hz to 10 Hz, the average optimum frame rate always changes sequentially via an intermediate frame rate, such as 30 Hz → 20 Hz → 15 Hz → 10 Hz. Therefore, the frame rate control in encoding can be performed more smoothly.
[0121]
FIG. 28 is a diagram illustrating an example of each input signal and output signal of the frame rate calculation unit 3401 in FIG. FIG. 28A is a diagram showing an average optimum frame rate that is an output signal of the frame rate calculation unit 3401. FIG. 28B is a diagram illustrating a quantization step prediction value that is one input signal of the frame rate calculation unit 3401. FIG. 28C is a diagram showing the free capacity of the transmission buffer 2108 that is the other input signal of the frame rate calculation unit 3401. As shown in FIG. 28 (a), the average optimum frame rate is obtained by averaging the optimum frame rates of 30 frames going back from the current frame for one second and selecting the optimum frame rate closest to the value. A large change in the frame rate is suppressed, and as a result, an encoding result with smoother motion can be obtained.
[0122]
Note that although the present frame rate calculation unit 3401 has been described as calculating the average value of the optimum frame rate for 30 frames in the past 1 second, the present invention is not limited to this, and the range of the optimum frame rate for obtaining the average value is It may be the number of seconds or the number of frames in the past.
[0123]
(Embodiment 3)
FIG. 29 is a block diagram illustrating a functional configuration of an image encoding device 4100 according to the third embodiment. The image encoding device 4100 uses the variable bit rate method in the image encoding device 10 of the first embodiment and the variable frame rate method in the image encoding device 2100 of the second embodiment to perform more appropriate encoding. Is realized.
[0124]
As shown in FIG. 29, image coding apparatus 4100 has the same functional configuration as image coding apparatus 10 in Embodiment 1 above, except for transmission buffer 2108, frame rate control section 4113, and frame thinning section 4116. . In the following, the same components as those in the first embodiment or the second embodiment are denoted by the same reference numerals, and the description thereof is omitted.
[0125]
The frame rate control unit 4113 has only a function of generating decimation information among the functions of the frame rate control unit 2113 of the image coding apparatus 2100 of the second embodiment.
[0126]
The frame decimation unit 4116 receives the decimation information from the frame rate control unit 4113, determines the frame rate, and notifies the bit rate control unit 30 of the determined frame rate value at that time.
[0127]
FIG. 30 is a block diagram showing a detailed functional configuration of the frame rate control unit 4113 in FIG. As shown in FIG. 30, the frame rate control unit 4113 has a configuration in which the quantization step prediction unit 2201 and the quantization step determination unit 2203 are excluded from the frame rate control unit 2113 (see FIG. 14) in the second embodiment. It has become. Therefore, the frame rate control unit 4113 generates only thinning information based on the remaining data amount obtained from the transmission buffer 2108 and transmits this thinning information to the frame thinning unit 4116.
[0128]
As described above, the image encoding device 4100 according to the present embodiment controls the frame rate according to the remaining data amount of the transmission buffer, and based on the frame rate and the total number of bits allocated to the frame group, It is possible to realize more preferable bit allocation.
[0129]
(Embodiment 4)
In the following embodiment, the configuration of the image encoding device in the above first to third embodiments is realized as a step of an image encoding program, and functions equivalent to those of the image encoding device are realized on a general computer system. We will explain how to do this.
[0130]
FIG. 31 is an explanatory diagram of a case where a function equivalent to that of the image encoding apparatuses according to the first to third embodiments is realized on a general computer system using a flexible disk storing an image encoding program.
[0131]
FIG. 31B shows an appearance, a cross-sectional structure, and a flexible disk as viewed from the front of the flexible disk, and FIG. 31A shows an example of a physical format of the flexible disk that is a recording medium body.
[0132]
The flexible disk 1301 is built in a case 1302, and a plurality of tracks are formed concentrically on the surface of the disk from the outer periphery toward the inner periphery, and each track is divided into 16 sectors in the angular direction. Therefore, in the flexible disk storing the image encoding program, data as the image encoding program is recorded in an area allocated on the flexible disk 1301.
[0133]
FIG. 31C shows the configuration of an apparatus for recording and reproducing the image encoding program on the flexible disk 1301. When the image encoding program is recorded on the flexible disk 1301, the image encoding program data is written from the computer system 1304 via the flexible disk drive 1303. When the encoding or decoding device is constructed in the computer system by the program in the flexible disk 1301, the program is read from the flexible disk drive 1303 and transferred to the computer system 1304.
[0134]
In the above description, a flexible disk is used as the data recording medium. However, the above-described image encoding apparatus is similarly realized by using a medium capable of recording a program such as an optical disk, an IC card, and a ROM cassette. be able to.
[0135]
【The invention's effect】
As described above, according to the image encoding device of the present invention, when encoding is performed at a constant bit rate for a predetermined time length, the deviation in the number of generated bits in a frame group that is a collection of frames is reduced. Each time a frame group is formed and each frame in the frame group is encoded, the number of bits to be allocated to the next frame is calculated. Furthermore, by referring to the number of generated bits in the past frame, it is possible to derive the optimum number of allocated bits that can be encoded with high image quality for the next frame. That is, even when scenes that are difficult to encode are continuous, it is possible to avoid an extremely small number of bits allocated to subsequent scenes, and to improve the image quality as a whole.
[0136]
In addition, according to the image encoding device of the present invention, even when the rate of a frame to be encoded fluctuates (variable frame rate), the optimum frame rate using the current frame rate is used each time encoding is performed. Since the number of bits can be derived, it is possible to perform encoding capable of avoiding extreme deterioration in image quality while keeping the average bit rate in a predetermined time length constant.
[0137]
In addition, the bitstream encoded by the image encoding apparatus according to the present invention can be decoded by a general decoding apparatus, and can be decoded with high image quality without performing any special processing.
[0138]
Further, according to the image encoding device of the present invention, as a result of encoding the current frame, first, by adjusting the quantization resolution and adjusting the signal resolution of each pixel according to the amount of code generated. By controlling the generated code amount of the next frame and adjusting the generated code amount by adjusting the quantization width, the encoding frame rate can be adjusted. As a result, for example, by increasing the quantization width, it is possible to prevent the occurrence of a state in which frame thinning occurs even though the amount of generated code is reduced and the image quality deteriorates more than necessary. There is an effect that it is possible to control the generated code amount by encoding efficiently.
[0139]
In addition, the image encoding apparatus according to the present invention calculates the quantization width of the next encoded frame from the remaining code amount of the transmission buffer, for example, when there is a margin in the transmission buffer (that is, encoding is easy). For scenes), the quantization width is set to a small value, and conversely, if there is not enough room in the transmission buffer, the quantization width is set to a large value so that the bit rate for a sufficiently long time is kept constant and the image quality is as high as possible There is an effect that can be made.
[0140]
Furthermore, the image coding apparatus according to the present invention sets the coding frame rate when the predicted value of the calculated quantization width becomes a large value equal to or larger than the threshold (that is, in the case of a complicated scene that is difficult to code). Change to a smaller value to increase the frame decimation rate. However, since the amount of generated bits is suppressed by controlling the quantization width, there is an effect that high-quality encoding can be performed without causing a sudden change in the frame rate.
[0141]
Further, according to the image coding apparatus according to the present invention, the coding frame rate is controlled by using the average value of the quantization width controlled and fluctuated by the residual code amount of the transmission buffer, so that the coding of the current frame can be performed. When the code amount is extremely generated (the residual code amount of the transmission buffer is increased) and the quantization step of the next frame is largely controlled, it is suppressed that the frame rate is immediately changed. It is possible to prevent the movement from becoming awkward. At the same time, it is possible to suppress an abrupt change in the frame rate and to perform smooth motion encoding.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a functional configuration of an image encoding device according to a first embodiment.
2 is a block diagram showing a detailed functional configuration of a bit rate control unit in FIG. 1; FIG.
FIG. 3 is a diagram illustrating characteristics of the number of generated bits for each picture type in general image coding.
4 is a specific example of a frame group defined in FIG.
FIG. 5 is a modification of the frame group defined in FIG.
6A is a diagram for explaining an effect obtained by configuring a frame group with two frame sets as shown in FIG. 5; FIG.
(B) is a figure for demonstrating the effect when a frame group is comprised by two frame sets like the said FIG. 5, and the frame rate of encoding changes.
7 is a flowchart showing a flow of processing in the overall control unit and the bit rate control unit of the image coding apparatus according to Embodiment 1. FIG.
8A is a diagram illustrating a configuration example of a frame group when encoding is performed using the image encoding device according to Embodiment 1. FIG.
(B) is an example which shows the change of the bit rate when encoding is performed using the image encoding apparatus in Embodiment 1. FIG.
FIG. 9A is an example showing a state of each frame when one frame group is constituted by two frame sets.
(B) is an example showing how the bit rate fluctuates when one frame group is composed of two frame sets.
FIG. 10A is an example showing a state of each frame when one frame group is constituted by two frame sets and the encoding frame rate is changed.
(B) is an example showing how the bit rate fluctuates when one frame group is composed of two frame sets and the encoding frame rate changes.
FIG. 11 is a diagram illustrating a specific example of a method for calculating the number of bits in an arithmetic unit.
12 is a block diagram showing a part of a functional configuration of an image coding apparatus configured to obtain a frame rate value Rf from other departments without providing a frame thinning unit in FIG. 1;
FIG. 13 is a block diagram showing a functional configuration of an image coding apparatus according to Embodiment 2.
14 is a block diagram showing a detailed functional configuration of a rate control unit in FIG. 13;
15 is a block diagram for explaining a function of a quantization step prediction unit in FIG. 14;
16 is a block diagram for explaining a function of a frame rate calculation unit in FIG. 14;
17 is a diagram showing each input signal and output signal of the frame rate calculation unit in FIG. 16;
18 is a diagram for explaining the operation of a frame number calculation unit in FIG. 14;
FIG. 19 is a diagram illustrating an input image signal and an encoded frame of the image encoding device.
FIG. 20 is a block diagram illustrating a functional configuration of a frame rate control unit according to a modification.
FIG. 21 is a diagram showing each input signal and output signal of the frame rate calculation unit in FIG. 20;
FIG. 22 is a block diagram illustrating a functional configuration of a frame rate control unit according to a modified example.
23 is a block diagram showing a configuration of an average quantization step calculation unit in FIG.
24 is a block diagram for explaining a function of a frame rate calculation unit in FIG. 22. FIG.
25 is a diagram showing each input signal and output signal of the frame rate calculation unit in FIG. 22. FIG.
FIG. 26 is a block diagram illustrating a functional configuration of a frame rate control unit according to a modification.
27 is a block diagram for explaining functions of a frame rate calculation unit and a frame rate memory in FIG. 26. FIG.
FIG. 28 is a diagram showing each input signal and output signal of the frame rate calculation unit in FIG.
29 is a block diagram illustrating a functional configuration of an image encoding device according to Embodiment 3. FIG.
30 is a block diagram illustrating a functional configuration of a frame rate control unit in the image encoding device of FIG. 29. FIG.
FIG. 31 is a diagram for explaining a storage medium that can store a program for realizing the image coding apparatus according to the first to third embodiments by a general computer system.
FIG. 32 is a block diagram illustrating a functional configuration of an image encoding device using a conventional variable bit rate method.
FIG. 33 is a block diagram illustrating a functional configuration of a bit rate control unit in a conventional image encoding device.
FIG. 34 is a flowchart showing the flow of processing in the overall control unit and bit rate control unit of the conventional image encoding device.
FIG. 35 is a diagram showing a specific example of a method for calculating the number of allocated bits in a conventional bit rate control unit.
FIG. 36A is a configuration example of a frame group for explaining the first problem of the conventional technology.
(B) is an example of a bit rate for explaining the first problem of the prior art.
FIG. 37A is a configuration example of a frame group for explaining a second problem of the conventional technique.
(B) is an example of a bit rate for explaining the second problem of the prior art.
[Explanation of symbols]
10 Image encoding device
20 Frame thinning part
30 Rate control unit
31 Frame group target bit number deriving unit
32nd frame target bit number derivation unit
33 Average frame bit number derivation unit
34 Calculation unit
35 Quantization step derivation unit
36 Memory unit
40 Overall control unit
50 Image encoding device
60 Overall control unit
100 Image coding apparatus
101 Encoded frame signal
102 frame memory
103 detector
104 Compensator
105 Orthogonal transformation unit
106 Quantization unit
107 Variable length encoding unit
108 Inverse quantization unit
109 Inverse orthogonal transform unit
110 Bit rate control unit
111 Frame Group Target Bit Number Deriving Unit
112 Next frame target bit number derivation unit
113 Quantization step derivation unit
121 Encoded frame signal
140 Overall control unit
141 Quantization step
201 Quantization step prediction unit
202 Frame rate calculator
203 Quantization step determination unit
204 Frame number calculator
205 comparator
302 Current value memory
303 Prediction coefficient table
401 Comparator
406 Capacity calculation unit
1301 Flexible disk
1302 case
1303 Flexible disk drive
1304 Computer system
2100 Image coding apparatus
2101 Frame thinning part
2108 Transmission buffer
2109 Inverse quantization unit
2110 Inverse orthogonal transform unit
2111 Differencer
2112 Adder
2113 Frame rate control unit
2201 Quantization step prediction unit
2202 Frame rate calculator
2203 Quantization step determination unit
2204 Number of frames calculator
2205 comparator
2302 Current value memory
2303 Prediction coefficient table
2401 Comparator
2402 Comparator
2403 Frame rate table
2404 Threshold memory
2405 Threshold memory
2406 Capacity calculation unit
2601 Information memory
2602 counter
2603 calculator
2604 frames
2800 Frame rate controller
3000 Frame rate control unit
3001 Average quantization step calculator
3002 Frame rate calculator
3101 Quantization step memory
3102 Information memory
3103 Adder
3104 Divider
3201 Hysteresis comparator
3202 Threshold memory
3203 Hysteresis Comparator
3204 Threshold memory
3400 Frame rate control unit
3401 Frame rate calculator
3402 frame rate memory
3501 Adder
3502 Divider
4100 Image coding apparatus
4113 Frame rate control unit
4116 Frame thinning part

Claims (8)

フレーム単位で順次入力される画像信号について符号化を行なう画像符号化装置であって、
画像信号の周波数成分をフレーム毎に量子化し、量子化された結果に基づいて符号化する符号化手段と、
複数のフレームから構成されるフレーム群に割り当て総ビット数を特定する総ビット数特定手段と、
フレームレートと前記フレーム群における既に符号化されたフレームのフレーム数とに基づいて、前記フレーム群における未だ符号化されていないフレームのフレーム数を特定するフレーム数特定手段と、
前記特定された総ビット数と前記特定されたフレーム数とに基づいて、次に符号化するフレームに割り当てるビット数の目標値を算出する目標ビット数算出手段と、
前記算出されたビット数の目標値を用いて、次に符号化するフレームに係る量子化ステップを導出する量子化ステップ導出手段と、
前記符号化手段によって符号化された符号化データを保持し、一定量ずつ外部に出力する送信バッファと、
前記送信バッファに残留している符号化データのデータ量と前記量子化ステップに基づいて、次に符号化するフレームの周期を示すフレームレートを決定するフレームレート制御手段と、
前記フレームレート制御手段で決定されたフレームレートに基づいて、前記符号化手段に入力する画像信号の取捨を制御する入力制御手段と
を備え
前記目標ビット数算出手段は、前記総ビット数特定手段によって特定された総ビット数を前記フレームレート制御手段によって決定されたフレームレートから算出されるフレーム群のうち未だ符号化されていないフレーム数で除することによって前記ビット数の目標値を算出する
ことを特徴とする画像符号化装置。
An image encoding device that encodes image signals sequentially input in units of frames,
Encoding means for quantizing the frequency component of the image signal for each frame and encoding based on the quantized result;
And the total number of bits specifying means for specifying the total number of bits Ru assignment in a frame group including a plurality of frames,
Frame number specifying means for specifying the number of frames not yet encoded in the frame group based on the frame rate and the number of frames already encoded in the frame group;
Target bit number calculating means for calculating a target value of the number of bits to be allocated to the next frame to be encoded based on the specified total number of bits and the specified number of frames;
Quantization step deriving means for deriving a quantization step related to a frame to be encoded next using the calculated target number of bits;
A transmission buffer for holding the encoded data encoded by the encoding means and outputting the same to the outside by a fixed amount;
Frame rate control means for determining a frame rate indicating a period of a frame to be encoded next based on a data amount of encoded data remaining in the transmission buffer and the quantization step;
Based on the frame rate determined by the frame rate control means, the input control means for controlling the discarding of the image signal input to the encoding means ,
The target bit number calculation means is the number of frames that have not yet been encoded in the frame group calculated from the frame rate determined by the frame rate control means with the total bit number specified by the total bit number specification means. An image encoding apparatus characterized by calculating a target value of the number of bits by dividing the image.
前記画像符号化装置は、さらに、
前記フレーム群における既に符号化されたフレームレートと、それによって発生したビット数とに基づいて、発生ビット数の平均値を算出する平均値算出手段と、
前記算出された前記発生ビット数の平均値に対して、所定の係数を乗じて得た新たなビット数の目標値と、前記算出された目標ビット数とを比較して、大きい方を基本目標値とし、あらかじめ設定された下限値と前記基本目標値とを比較して大きい方を新たなビット数の目標値とする演算手段とを備え、
前記量子化ステップ導出手段は、前記演算手段によって特定されたビット数の目標値を用いて量子化ステップを導出する
ことを特徴とする請求項1記載の画像符号化装置。
The image encoding device further includes:
An average value calculating means for calculating an average value of the number of generated bits based on the already encoded frame rate in the frame group and the number of bits generated thereby ;
The target value of the new number of bits obtained by multiplying the calculated average value of the number of generated bits by a predetermined coefficient is compared with the calculated target number of bits. A calculation unit that compares the lower limit value set in advance with the basic target value and sets the larger one as the target value for the new number of bits.
The image coding apparatus according to claim 1, wherein the quantization step deriving unit derives the quantization step using a target value of the number of bits specified by the computing unit.
前記総ビット数特定手段は、
前記フレーム群の先頭のフレームを画面内符号化されるフレームとしフレーム群全体として割り当て可能なビット数の初期化を行なう総ビット数初期化部と、
前記全体として割り当て可能なビット数から符号化により実際に発生したビット数を減じて総ビット数を更新する総ビット数更新部とを備える
ことを特徴とする請求項2記載の画像符号化装置。
The total bit number specifying means includes:
The first frame of the frame group is a frame to be encoded in the screen, and a total bit number initialization unit that initializes the number of bits that can be allocated as the entire frame group ;
The image coding apparatus according to claim 2, further comprising: a total bit number updating unit that updates the total number of bits by subtracting the number of bits actually generated by encoding from the number of bits that can be allocated as a whole.
前記フレーム群は、複数のフレームから構成されるフレームセットを2つ以上まとめた構成であり、一のフレームセットに対して符号化を終えると、フレーム群に属する未だ符号化されていないフレームセットに、新たなフレームセットを順次追加して新たなフレーム群を構成し、
前記総ビット数特定手段は、さらに、
前記フレーム群に割り当てられた総ビット数から得られる各フレームセットに分配されていビット数と、符号化が終了し実際に発生したビット数が得られたフレームセットのビット数との差分を加味して、前記新たなフレーム群総ビット数と、個々のフレームセットにおける割り当て可能なビット数とを算出する
ことを特徴とする請求項1記載の画像符号化装置。
The frame group is a frame set that consists of a plurality of frames is two or more combined configuration, when completing the encoding for one frame set, the frameset that has not yet been coded belonging to the group of frames , New frame sets are added sequentially to form a new frame group,
The total bit number specifying means further includes:
Adding the difference between the number of bits that have been distributed to each frame set obtained, the number of bits actually frameset number of bits generated is obtained coding is completed from the total number of bits allocated to the frame group And calculating the total number of bits of the new frame group and the number of assignable bits in each frame set,
The image encoding apparatus according to claim 1, wherein:
前記フレームレート制御手段は、The frame rate control means includes
前記送信バッファに残留している符号化データのデータ量からバッファの空き容量を算出し、所定の閾値と比較することで得られる情報と、前記量子化ステップ導出手段で得られた量子化ステップと所定の閾値とを比較することで得られる情報とを用いて、次に符号化するフレームの周期を決定するInformation obtained by calculating the free space of the buffer from the amount of encoded data remaining in the transmission buffer and comparing it with a predetermined threshold; and the quantization step obtained by the quantization step deriving means; The period of the next frame to be encoded is determined using information obtained by comparing with a predetermined threshold.
ことを特徴とする請求項1記載の画像符号化装置。The image encoding apparatus according to claim 1, wherein:
フレーム単位で順次入力される画像信号に対して符号化を行なう画像符号化方法であって、
画像信号の周波数成分をフレーム毎に量子化し、量子化された結果に基づいて符号化する符号化ステップと、
複数のフレームから構成されるフレーム群に割り当て総ビット数を特定する総ビット数特定ステップと、
前記受け付けられたフレームレートと前記フレーム群における既に符号化されたフレームのフレーム数とに基づいて、前記フレーム群における未だ符号化されていないフレームのフレーム数を特定するフレーム数特定ステップと、
前記総ビット数特定ステップで特定された総ビット数とフレーム群のうち未だ符号化されていないフレーム数とに基づいて、次符号化するフレームに割り当てるビット数の目標値を算出する目標ビット数算出ステップと、
前記算出されたビット数の目標値を用いて、次に符号化するフレームに係る量子化ステップを導出する量子化ステップ導出ステップと、
前記符号化ステップによって符号化された符号化データを保持し、一定量ずつ外部に出力する送信バッファに残留している符号化データのデータ量と前記量子化ステップに基づいて、次に符号化するフレームの周期を決定するフレームレート制御ステップと、
前記フレームレート制御ステップで決定されたフレームレートに基づいて、前記符号化ステップに入力する画像信号の取捨を制御する入力制御ステップとを含み、
前記目標ビット数算出ステップでは、前記総ビット数特定ステップによって特定された総ビット数を前記フレームレート制御ステップによって決定されたフレームレートから算出されるフレーム群のうち未だ符号化されていないフレーム数で除することによって前記ビット数の目標値を算出する
ことを特徴とする画像符号化方法。
An image encoding method for encoding image signals sequentially input in units of frames,
An encoding step of quantizing the frequency component of the image signal for each frame and encoding based on the quantized result;
And the total number of bits specifying step of specifying the total number of bits Ru assignment in a frame group including a plurality of frames,
A number-of-frames identifying step for identifying a number of unencoded frames in the frame group based on the accepted frame rate and the number of frames already encoded in the frame group;
Based on said number of frames which have not yet been coded out of the total number of total bits identified by a specific number Step bits and frame group, the target number of bits for calculating the target value of the bit number allocated to a frame to be coded next A calculation step;
Using the calculated target number of bits, a quantization step derivation step for deriving a quantization step related to a frame to be encoded next;
The encoded data encoded by the encoding step is held, and then encoded based on the amount of encoded data remaining in the transmission buffer to be output to the outside by a predetermined amount and the quantization step. A frame rate control step for determining a frame period;
An input control step for controlling discarding of an image signal input to the encoding step based on the frame rate determined in the frame rate control step;
In the target bit number calculating step, the total bit number specified in the total bit number specifying step is the number of frames that are not yet encoded among the frame groups calculated from the frame rate determined in the frame rate control step. And a target value of the number of bits is calculated by dividing the image.
フレーム単位で入力される画像信号に対して符号化を行なう画像符号化装置のためのプログラムであって、
画像信号の周波数成分をフレーム毎に量子化し、量子化された結果に基づいて符号化する符号化ステップと、
複数のフレームから構成されるフレーム群に割り当て総ビット数を特定する総ビット数特定ステップと、
前記受け付けられたフレームレートと前記フレーム群における既に符号化されたフレームのフレーム数とに基づいて、前記フレーム群における未だ符号化されていないフレームのフレーム数を特定するフレーム数特定ステップと、
前記総ビット数特定ステップで特定された総ビット数とフレーム群のうち未だ符号化されていないフレーム数とに基づいて、次に符号化するフレームに割り当てるビット数の目標値を算出する目標ビット数算出ステップと、
前記算出されたビット数の目標値を用いて、次符号化するフレームに係る量子化ステップを導出する量子化ステップ導出ステップと、
前記符号化ステップによって符号化された符号化データを保持し、一定量ずつ外部に出力する送信バッファに残留している符号化データのデータ量と前記量子化ステップに基づいて、次に符号化するフレームの周期を決定するフレームレート制御ステップと、
前記フレームレート制御ステップで決定されたフレームレートに基づいて、前記符号化ステップに入力する画像信号の取捨を制御する入力制御ステップとを前記画像符号化装置に実行させ、
前記目標ビット数算出ステップでは、前記総ビット数特定ステップによって特定された総ビット数を前記フレームレート制御ステップによって決定されたフレームレートから算出されるフレーム群のうち未だ符号化されていないフレーム数で除することによって前記ビット数の目標値を算出する
ことを特徴とするプログラム。
A program for an image encoding device that encodes an image signal input in units of frames,
An encoding step of quantizing the frequency component of the image signal for each frame and encoding based on the quantized result;
And the total number of bits specifying step of specifying the total number of bits Ru assignment in a frame group including a plurality of frames,
A number-of-frames identifying step for identifying a number of unencoded frames in the frame group based on the accepted frame rate and the number of frames already encoded in the frame group;
Target bit number for calculating a target value of the number of bits to be allocated to the next frame to be encoded based on the total bit number specified in the total bit number specifying step and the number of frames not yet encoded in the frame group A calculation step;
Using the target value of the number of the calculated bit, the quantization step derivation step of deriving the quantization step according to the frame to be coded next,
The encoded data encoded by the encoding step is held, and then encoded based on the amount of encoded data remaining in the transmission buffer to be output to the outside by a predetermined amount and the quantization step. A frame rate control step for determining a frame period;
Based on the frame rate determined in the frame rate control step, the image encoding device executes the input control step for controlling the discarding of the image signal input to the encoding step,
In the target bit number calculating step, the total bit number specified in the total bit number specifying step is the number of frames that are not yet encoded among the frame group calculated from the frame rate determined in the frame rate control step. A program for calculating a target value of the number of bits by dividing .
フレーム単位で順次入力される画像信号に対して符号化を行なう画像符号化装置のためのプログラムが記録されたコンピュータが読み取り可能な記録媒体であって、
前記プログラムは、
画像信号の周波数成分をフレーム毎に量子化し、量子化された結果に基づいて符号化する符号化ステップと、
複数のフレームから構成されるフレーム群に割り当て総ビット数を特定する総ビット数特定ステップと、
前記総ビット数特定ステップで特定された総ビット数とフレーム群のうち未だ符号化されていないフレーム数とに基づいて、次に符号化するフレームに割り当てるビット数の目標値を算出する目標ビット数算出ステップと、
前記算出されたビット数の目標値を用いて、次符号化するフレームに係る量子化ステップを導出する量子化ステップ導出ステップと、
前記符号化ステップによって符号化された符号化データを保持し、一定量ずつ外部に出力する送信バッファに残留している符号化データのデータ量と前記量子化ステップに基づいて、次に符号化するフレームの周期を決定するフレームレート制御ステップと、
前記フレームレート制御ステップで決定されたフレームレートに基づいて、前記符号化ステップに入力する画像信号の取捨を制御する入力制御ステップとを前記画像符号化装置に実行させ、
前記目標ビット数算出ステップでは、前記総ビット数特定ステップによって特定された総ビット数を前記フレームレート制御ステップによって決定されたフレームレートから算出されるフレーム群のうち未だ符号化されていないフレーム数で除することによって前記ビット数の目標値を算出する
ことを特徴とする記録媒体。
A computer-readable recording medium on which a program for an image encoding device for encoding image signals sequentially input in units of frames is recorded,
The program is
An encoding step of quantizing the frequency component of the image signal for each frame and encoding based on the quantized result;
And the total number of bits specifying step of specifying the total number of bits Ru assignment in a frame group including a plurality of frames,
Target bit number for calculating a target value of the number of bits to be allocated to the next frame to be encoded based on the total bit number specified in the total bit number specifying step and the number of frames not yet encoded in the frame group A calculation step;
Using the target value of the number of the calculated bit, the quantization step derivation step of deriving the quantization step according to the frame to be coded next,
The encoded data encoded by the encoding step is held, and then encoded based on the amount of encoded data remaining in the transmission buffer to be output to the outside by a predetermined amount and the quantization step. A frame rate control step for determining a frame period;
Based on the frame rate determined in the frame rate control step, the image encoding device executes the input control step for controlling the discarding of the image signal input to the encoding step,
In the target bit number calculating step, the total bit number specified in the total bit number specifying step is the number of frames that are not yet encoded among the frame group calculated from the frame rate determined in the frame rate control step. The target value of the number of bits is calculated by dividing the recording medium.
JP2003120626A 2002-04-25 2003-04-24 Image coding apparatus and image coding method Expired - Fee Related JP4490046B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003120626A JP4490046B2 (en) 2002-04-25 2003-04-24 Image coding apparatus and image coding method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002124750 2002-04-25
JP2002124749 2002-04-25
JP2003120626A JP4490046B2 (en) 2002-04-25 2003-04-24 Image coding apparatus and image coding method

Publications (2)

Publication Number Publication Date
JP2004007619A JP2004007619A (en) 2004-01-08
JP4490046B2 true JP4490046B2 (en) 2010-06-23

Family

ID=30449170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003120626A Expired - Fee Related JP4490046B2 (en) 2002-04-25 2003-04-24 Image coding apparatus and image coding method

Country Status (1)

Country Link
JP (1) JP4490046B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008236333A (en) * 2007-03-20 2008-10-02 Toshiba Corp Video encoder and video encoding method
JP2009141543A (en) * 2007-12-05 2009-06-25 Nec Saitama Ltd Cellular phone terminal and cellular phone terminal control method
JP2017168878A (en) 2016-03-14 2017-09-21 ルネサスエレクトロニクス株式会社 Semiconductor device, encoding control method and camera apparatus

Also Published As

Publication number Publication date
JP2004007619A (en) 2004-01-08

Similar Documents

Publication Publication Date Title
US7653129B2 (en) Method and apparatus for providing intra coding frame bit budget
EP1551186B1 (en) Video coding apparatus with resolution converter
KR100569613B1 (en) Signal encoding method, signal encoding device, signal recording medium and signal transmission method
JPH0723422A (en) Video signal band compression equipment of digital vtr
JP7015183B2 (en) Image coding device and its control method and program
JP4632049B2 (en) Video coding method and apparatus
US7151856B2 (en) Picture coding apparatus and picture coding method
JP3872849B2 (en) Video encoding device
JP4795223B2 (en) Image processing device
CN104125460A (en) Method and apparatus for controlling video bitrates
JP2008193410A (en) Image encoding device, recording device, moving image encoding method, and moving image encoding program
CN101390389A (en) Method and apparatus for selection of bit budget adjustment in dual pass encoding
JPWO2002080567A1 (en) Image signal quantization apparatus and method
US6647060B1 (en) Video compression device and video compression method
JP4490046B2 (en) Image coding apparatus and image coding method
JP3392335B2 (en) Moving image variable bit rate encoding device, moving image variable bit rate encoding method, and moving image variable bit rate encoding program recording medium
JP2004328150A (en) Moving picture coding apparatus and method
JP2000261799A (en) Variable rate moving image encoding device
JPH11196410A (en) Method and device for dynamic picture encoding and dynamic picture signal record medium
JPWO2002080572A1 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2000092489A (en) Device and method for image encoding and medium recorded with program
JP2009017127A (en) Coding device and coding method
JP3307367B2 (en) Variable transfer rate coding device
JPH0744686B2 (en) Variable transmission rate image coding device
KR100678843B1 (en) Intra-prame qvantomizing system for mpeg encoder and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090519

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090710

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

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

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

Free format text: PAYMENT UNTIL: 20130409

Year of fee payment: 3

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140409

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees