JP3869389B2 - Video playback method, video playback device, and video encoding method - Google Patents

Video playback method, video playback device, and video encoding method Download PDF

Info

Publication number
JP3869389B2
JP3869389B2 JP2003140668A JP2003140668A JP3869389B2 JP 3869389 B2 JP3869389 B2 JP 3869389B2 JP 2003140668 A JP2003140668 A JP 2003140668A JP 2003140668 A JP2003140668 A JP 2003140668A JP 3869389 B2 JP3869389 B2 JP 3869389B2
Authority
JP
Japan
Prior art keywords
frame
decoding
video
playback
reproduction
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
JP2003140668A
Other languages
Japanese (ja)
Other versions
JP2004343648A (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 JP2003140668A priority Critical patent/JP3869389B2/en
Publication of JP2004343648A publication Critical patent/JP2004343648A/en
Application granted granted Critical
Publication of JP3869389B2 publication Critical patent/JP3869389B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、フレーム間予測符号化された映像を光ディスク等の記録媒体から読み出して再生する映像再生装置において、実時間より高速な復号が可能な場合に、より滑らかに映像を表示する高速再生を行うことのできる映像再生方法、映像再生装置および映像符号化方法に関する。
【0002】
【従来の技術】
映像のディジタル記録・再生を利用した機器は、家庭用や業務用を問わず増加の一途をたどっている。限られた記録媒体の容量で長時間記録と高画質化を実現するのは相反する要素であるが、フレーム間符号化をベースとする一連のMPEG規格(Moving Pictures coding Experts Group:ISO/IEC11172−2,ISO/IEC13818−2,ISO/IEC14496−2)は圧縮率と画質におけるコストパフォーマンスが高く、ディジタルTV放送,DVD−Video,携帯電話など、多くのアプリケーションで採用されている。
【0003】
MPEGに基づく映像符号化では、各フレームを図19(a)に示すような構成で符号化する。符号化タイプには、フレーム内符号化フレーム(以下、Iフレームと称す)、フレーム間符号化フレーム(以下、Pフレームと称す)およびフレーム内挿符号化フレーム(以下、Bフレームと称す)の3種類がある。Iフレームは、当該フレームのデータのみを用いて復号が可能なフレームである。Pフレームは、当該フレーム以前に復号されたIまたはPフレームのデータと当該フレームのデータとを用いて復号が可能なフレームである。Bフレームは時間的に前後する2枚のIまたはPフレームのデータと当該フレームのデータとを用いて復号が可能なフレームである。
【0004】
Bフレームは、復号化に際して表示順で後方に位置するフレームを参照して復号される。そのため、Bフレームを符号化する場合には、図19(b)に示すように、順を入れ替えて符号化する。符号化されるデータは、多くの場合Iフレームから始まるGOP(Group Of Pictures)の列として、順にビットストリーム(以下、ストリームと称す)として出力される。
【0005】
IフレームとPフレームとは、復号化に際して表示順で後方に位置するフレームを参照することなく復号される。そのため、IフレームとPフレームとを符号化する場合には、図20に示すように、順を入れ替えることなく、表示順のまま符号化される。MPEGストリームを復号化する際には、ストリームから符号化順でフレームを読込んだ後、符号化順に復号化される。映像の出力は、表示順に行われる。
【0006】
以上のようにして符号化・復号化されるMPEGのストリームを、特殊再生、特に高速再生する際には、大きな困難が伴う。例えば、図21(a)に示すように、I,P,Bフレームが混在するストリームを読込み、4倍速再生を行う場合を考える。現在がフレーム2のIフレームであるとして、フレームのインデックスが0〜14の範囲だけであるとした場合、フレーム2,6,10,14の4フレームを再生すれば、4倍速となる。しかし、図21(b)に示すように、各フレームを復号するには予測参照フレームを含めてそれぞれ1,4,5,5回の復号回数が必要となる。これは、1フレーム時間(NTSCでは33msec,PALでは40msec)において、平均的には(1+4+5+5)/4=3.75フレームを復号しなければ滑らかな再生ができないことを意味する。
【0007】
一方、LSI等の汎用のMPEGデコーダは、通常再生(1倍速再生)のためクロックと連動してリアルタイム動作するのが一般的であり、1フレーム時間に1フレームを復号する構成となっている。そのため、DVD−Video等の早送り再生機能は、Iフレームをコマ送りのように表示・更新するものにとどまっている。以上のことから、MPEGで符号化された映像を滑らかに高速再生するのは困難が伴うことがわかる。
【0008】
MPEG等のフレーム間予測符号化された映像に対して、滑らかな高速再生を行う従来の技術としては、各種の特許が出願されている。まず、Iフレーム等のデータ量の多いフレームを連続して再生することにより生じる、復号時のバッファの破綻を防止する方法として、特許3301274号や特許3203169号がある。前者は、データがない場合、PTS(表示タイムスタンプ)を無視してフリーズ画面を出力するものである。後者は、バッファの占有量に応じてフレームをスキップするものである。しかしながら、いずれも、復号器のバッファの破綻を防止するものであり、MPEGストリームを高速再生した場合に滑らかな表示が行えるものではない。
【0009】
次に、読み込み時間を考慮した高速再生方法として、特開平08−186794号公報がある。これは、光ディスクの読み込み時間から、高速再生時の可能な倍速値を計算して、高速再生を行うものである。しかしながら、この方法は復号処理時間を考慮した方法ではない。復号処理時間はMPEGストリームを高速再生する際に最も重要な要素である。そのため、復号処理時間について考慮されていないこの方法では、MPEGストリームを高速再生した場合に滑らかな表示を行えるものではない。
【0010】
復号処理時間を考慮した改善方法としては、特許3025447号と特開2001−54066号公報とがある。前者は、不要なBフレーム等を読み込まずに復号処理時間を節約するものである。後者は、復号処理速度を変更し、PCのような表示環境において、フレームレートを変更して表示するものである。両者とも、高速再生時に復号処理時間の短縮を試みるものではあるが、変化する再生速度において、復号器の処理能力と各フレームの復号処理時間を考慮して、滑らかな高速再生を実現するものではない。
【0011】
【特許文献1】
特許3301274号(請求項1)
【特許文献2】
特許3203169号(請求項1)
【特許文献3】
特開平08−186794号公報(表3)
【特許文献4】
特許3025447号(請求項1)
【特許文献5】
特開2001−54066号公報(要約)
【0012】
【発明が解決しようとする課題】
CPUに代表されるプロセッサに基づいて復号器を構成することが近年急速に進歩しており、そのようにして構成された復号器では、リアルタイム以上に復号速度を早くすることが可能となりつつある。しかしながら、MPEGに代表される予測符号化された映像を記録した媒体を特殊再生、特に高速再生を行う場合において、上述した高速復号技術を用いて、より滑らかに特殊再生を行う手法は提案されていなかった。
【0013】
本発明は、フレーム間予測符号化された映像信号の特殊再生において、実時間より高速な復号動作が可能な場合、CPUの復号処理速度と復号処理時間とを計算し、復号を円滑に行うことができる最適なフレームのパターンを選択して高速再生する方法を得ることを課題とする。
【0014】
【課題を解決するための手段】
上記目的を達成するために、本発明は、実時間より高速な復号処理を行えるCPUを用いて高速再生する再生方法において、各フレームの復号に要する復号回数を示す復号回数表を再生前に作成し、再生時にはCPUが1フレーム時間内に平均的に復号可能なフレーム数と復号回数表を比較して、復号が円滑に行える最適なフレームのパターンを選択して、高速再生を行うことを特徴とする映像再生方法であり、CPUの復号処理速度と復号処理時間とを計算し、復号を円滑に行うことができる最適なフレームのパターンを選択して高速再生することを可能とする。
【0015】
具体的には本発明は、符号化された映像信号を記録した記録媒体から映像信号を再生したうえで復号器で復号する映像再生方法であって、映像信号を復号する処理に際して、現在のタイムコード位置から一定時間内に再生する1枚以上のフレームの集合(以下、フレーム群と称す)を複数抽出し、抽出した複数のフレーム群それぞれの復号処理時間を算出し、算出した前記復号処理時間に基いて、前記複数のフレーム群から任意のフレーム群を選択して前記復号器で復号する。
【0016】
これにより、複数のフレーム群の中から、復号処理時間に基いて最適なものを選択して復号することが可能となる。
【0017】
なお、算出した復号処理時間が最も短い前記フレーム群を選択して復号するのが好ましい。そうすれば、復号処理時間の短縮化を図ることが可能となる。これは、復号器の処理能力から鑑みた最適な復号処理の1形態といえる。
【0018】
なお、算出した前記復号処理時間と前記復号器の復号処理能力とに基づいて前記フレーム群を選択して前記復号器で復号するのが好ましい。そうすれば、復号処理の最適化を、映像の動きの滑らかさを損なうことなく実現することができる。これは、復号器の処理能力から鑑みた最適な復号処理の1形態といえる。
【0019】
なお、算出した前記復号処理時間が、前記復号器による単位時間内での復号処理が可能となる値を示す前記フレーム群を選択して前記復号器で復号するのが好ましい。そうすれば、復号器で復号処理の最適化を図ることが可能となる。これも復号器の処理能力から鑑みた最適な復号処理の1形態といえる。
【0020】
なお、
・前記復号器による単位時間内での復号処理が可能となる値を示す一つないし複数の前記フレーム群をさらに選択し、
・選択したフレーム群の中から、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列に対して最も時間的誤差の小さいフレーム群を選択して復号する、
という処理を実施するのが好ましく、そうすれば、復号処理の最適化を、映像の動きの滑らかさを損なうことなく実現することができる。
【0021】
なお、復号処理時間の算出を実施する前記複数の異なるフレーム群は、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列を基本構成とし、さらにこの再生フレーム列内の任意のフレームを時間的にシフトしたフレームに置き換えることで構成するのが好ましく、そうすれば、映像の動きの滑らかさを維持した状態で、復号処理時間の短縮化を図ることができる。
【0022】
なお、前記映像信号は、フレーム間予測符号化された映像信号であり、映像信号を復号する処理を、復号に必要な予測参照フレームを順に復号しつつ実施するのが好ましい。そうすれば、フレーム間予測符号化された映像信号を復号する構成においても、同様に本発明を実施することが可能となる。この場合、前記復号処理時間を、順に復号する前記予測参照フレームそれぞれの復号処理時間を加算することで算出するのが好ましい。そうすれば、フレーム間予測符号化された映像信号においても、復号処理時間を精度高く算出することが可能となる。
【0023】
なお、前記複数のフレーム群を、現在のタイムコード位置から再生を開始するタイムコード位置への時間的なシフト量を変化させることで設定するのが好ましい。そうすれば、映像の動き滑らかさを維持した状態で、復号処理時間の短縮化を図ることができる。
【0024】
なお、前記一定時間を、映像再生時の再生速度比(=再生速度/通常再生速度)と、連続する複数のフレームの集合体であるGOPの長さ(フレーム数)との最小公倍数に基づいて算出するのが好ましい。そうすれば、一定時間を、精度高くしかも容易に算定することが可能となる。
【0025】
なお、本発明の特徴を異なる視点から見た場合、本発明は、各フレームの復号に要する復号回数を示す復号回数表を再生前に作成したうえで、1フレーム再生時間内に平均的に復号可能なフレーム数と前記復号回数表とを比較して復号が円滑に行えるフレーム配置パターンを選択し、選択したフレーム配置パターンに基いて映像を復号して再生することでも実現できる。
【0026】
【発明の実施の形態】
以下、本発明の実施の形態について、図1から図21を参照して説明する。
【0027】
(実施の形態1)
図2は、本発明による映像再生方法を実施する構成を示すブロック図である。図2において、420は、映像が記録された記録媒体、440は、ユーザが再生操作を行うための再生操作入力手段、450は本発明による映像再生が行われる映像再生手段、432は表示デバイスである。
【0028】
図2において、ユーザは再生操作入力手段440を操作し、再生操作を行う。再生操作により再生操作入力手段440に入力されたスタートタイムコードTsと再生速度Vpとを示す情報は、再生操作入力手段440から映像再生手段450に伝えられる。再生入力手段440を実現するには多様な構成がある。再生入力手段440は、再生・停止・早送り等のボタン類や、編集再生機に使われるジョグダイアル等、再生速度Vpを示す情報を変化させて映像再生手段450に伝えることのできる構成であれば良い。
【0029】
映像再生手段450は、記録媒体420に記録された映像を読み取り、入力されるスタートタイムコードTsと再生速度Vpの情報に基づいて設定したスタートタイムコード位置と再生速度とに基づいて映像を再生する。再生された映像は、表示デバイス432に表示される。記録媒体420としては、テープ,光ディスク,磁気ディスク,メモリ等のデバイスを用いることができる。
【0030】
本実施の形態の映像再生方法における映像再生処理工程を図3のフローチャートを参照して説明する。まず、映像を再生するに際して、その再生開始位置を、予め設定されたスタートタイムコードTsの位置に移動する処理261を行う。この処理261に際して、記録媒体420上に記録された映像データからタイムコードTsがサーチされることで、再生開始位置を、予め設定されたスタートタイムコードTsの位置に移動する処理が実施される。これにより再生処理状況は再生を開始できる状態になる。
【0031】
次に再生モードの設定処理272を行う。再生モードは、通常再生モードと高速再生モードとのどちらかに設定される。この処理ではまず、現在の再生速度Vpが認識される。そして、認識された現在の再生速度Vpが0≦Vp≦1ならば通常再生モードが、Vp<0または1<Vpならば特殊再生モードがそれぞれ設定される。ここでいう再生速度Vpとは、詳細にいえば、再生速度比(=再生速度/通常再生速度)を示し、再生速度Vp=1は、通常再生の速度(1倍速)を意味し、Vp=0は静止(停止)、Vp<0は逆再生、|Vp|>1は高速再生を意味する。0<Vp<1は低速順再生となるが、低速順再生は復号処理時間が通常再生より短くなり、映像再生手段450から表示デバイス432へのフレーム送出を制御することで対処可能である。そのため、本実施の形態では、再生速度(0<Vp<1)は通常再生モードに含まれるとして説明する。
【0032】
再生モードの設定処理272が終了すると、再生モードの判定処理284を経て、通常再生モードの復号処理230、または特殊再生モードの復号処理200を行う。これらの処理では、再生モードの変化を検出するまで、その再生モードでフレームの復号処理を継続する。再生モードが変化すると停止の判定処理280を行う。判定処理280において、再生継続中(Vp≠0)と判定すれば、再生モードの判定処理284に戻る。再生停止(Vp=0)と判定すれば再生を終了する。
【0033】
通常再生モードの復号処理230について、図4のフローチャートを参照して説明する。まず、フレームの通常復号処理240とフレームの出力処理241とを行う。通常復号処理240は、MPEGストリームの一般的な復号処理であり、ストリーム中において次の符号化順に位置するフレームを復号する。出力処理241は、復号されたフレームの中から、該当する次の時間順のフレームを出力する処理である。
【0034】
通常復号処理240と出力処理241とを終了した時点で、1フレームの復号に要する時間が経過しているので、再生速度Vpがユーザの操作により変化したかどうかを検出する処理である処理280と処理282とを行う。処理280で再生継続中(Vp≠0)と判定すれば、処理282に移り、再生停止(Vp=0)と判定すれば、一連の復号処理を終了する。
【0035】
処理282では、現在の再生速度Vpが特殊再生モードに属する再生速度に変化したかどうかを判定する。具体的には、現在の再生速度Vpが、Vp<0または1<Vpの範囲であれば特殊再生モードに属する再生速度に変化したと判定して処理271に移る。現在の再生速度Vpが、それ以外の範囲(0≦Vp≦1)であれば、通常再生モードが継続している判断として、次のフレームの通常復号処理240を実施する。
【0036】
特殊再生モードの復号処理200について、図5のフローチャートを参照して説明する。まず、再生速度Vpに対する再生パターンの算出処理210を行う。これは、将来再生するフレームの組合せのいくつかを、それぞれ再生パターンとして算出するものである。再生パターンとは、現在のタイムコード位置から一定時間内に再生するフレーム群(1枚以上のフレームの集合)の配置パターンを示す概念である。
【0037】
次に、算出した再生パターンの中から、復号処理時間と復号処理能力との点から判断して最適な再生パターンを選択する処理211を行う。処理211により得られた最適パターンを元にして、フレームの特殊復号処理300を行う。特殊復号処理300によって復号されたフレームが、次処理であるフレームの出力処理241にて出力される。
【0038】
出力処理241を実施したのち、再生モードが変化したかどうかを検出する処理280,282を行う。まず、処理280において、現在の再生速度Vpが、Vp=0であるか否かを判定する。処理280でVp=0であると判定する場合は、現在は再生停止状態であると判断して、以降の処理を停止して終了処理を行う。
【0039】
処理280でVp≠0であると判定すれば、現在、再生は継続されていると判断して、処理281に移行する。処理281では、現在の再生速度Vpが0<Vp≦1であるか否かを判定する。処理281で0<Vp≦1であると判定する場合は、現在の再生モードは、特殊再生モードから通常再生モードに変更されたと判断して、処理270に移行する。処理270では、再生モードを通常再生モードに設定する。再生モードを通常再生モードに設定したのち処理を終了する。
【0040】
処理281で0<Vp≦1でない(Vp<0又は1<Vp)と判定する場合は、現在の再生モードは特殊再生モードを維持していると判断して、処理283に移行する。処理283では、再生速度Vpがフレーム復号前から変化しているか否かを判断する。再生速度Vpが変化していないと判断する場合には、処理211で復号処理時間と復号処理能力との点から判断して設定した最適パターン(再生速度Vpに対する再生パターン)を変更する必要がないと判断して、処理300に戻ってフレームの特殊復号を継続する。
【0041】
一方、処理283において、再生速度Vpがフレーム復号前から変化していると判断する場合には、処理211で、復号処理時間と復号処理能力との点から判断して設定された最適パターン(再生速度Vpに対する再生パターン)を変更する必要があると判断して、処理210に戻って最適パターンを選択し直したうえで、フレームの特殊復号を継続する。
【0042】
フレームの特殊復号処理300について図6を参照して説明する。図6は、フレームfの特殊復号処理300の詳細を示すフローチャートである。図6において符号fは、シーケンス内のフレームを一意に指定できるフレーム番号を示す。
【0043】
まず、フレームfが復号済み又は復号可能であるかを判定する処理330を行う。フレームfが復号済みとは、フレームfが既に復号されてフレームデータとしてメモリ等の記憶媒体に記憶されている状態を示す。一度復号されたフレームは、メモリに保存しておく限り、復号せずに何度でも利用することができる。フレームfが復号可能とは、フレームfのフレームデータだけを用いて復号が可能な状態を意味する。
フレームfが復号可能とは、具体的にいうと、
・フレームfがIフレームである、
・フレームfがPフレームでかつ前方予測参照フレームが復号済みである、
・フレームfがBフレームでかつ前方予測参照フレームと後方予測参照フレームの両方が復号済みである、
のいずれかの状態である。
【0044】
判定処理330において、フレームfが復号済み又は復号可能であると判定する場合は、フレームfが復号済みか否かの判定処理333を行う。判定処理333で復号済みと判定する場合は一連の処理を終了する。一方、判定処理333で、フレームfが復号未済であると判断する場合はフレームfの復号処理340と記憶処理350とを実施したうえで一連の処理を終了する。
【0045】
判定処理330において、フレームfが復号済みでも復号可能でもないと判定する場合は、フレームfが後方予測を行っているか否かの判定処理331を行う。後方予測とは、表示順でそのフレームより後方に位置するフレームのデータを参照して復号化を行うことを示す。
【0046】
判定処理331で後方予測を行っていると判定する場合は、フレームfの後方予測参照フレームのフレーム番号をbwdに設定する処理311を行ったうえで、設定したフレームbwdの特殊復号処理300Aを行う。
【0047】
フレームbwdの特殊復号処理300Aを実施したのち、もしくは、判定処理331で後方予測を行っていないと判定する場合は、フレームfが前方予測を行っているかどうかの判定処理332を行う。
【0048】
判定処理332で前方予測を行っていると判定する場合は、フレームfの前方予測参照フレームのフレーム番号をfwdに設定する処理312を行ったうえで、設定したフレームfwdの特殊復号処理300Bを行う。
【0049】
フレームfwdの特殊復号処理300Bを実施したのち、もしくは、判定処理332で前方予測を行っていないと判定する場合は、フレームfに対する一連の特殊復号処理が終了したと判断して、次なるフレームfに対する特殊復号処理に移行するために、判定処理330に戻って処理を継続する。フレームfが予測を行っている場合は、フレームbwdの特殊復号300又はフレームfwdの特殊復号300のどちらか又は両方で予測参照フレームが復号されているので、ここでフレームfは復号可能となる。
【0050】
フレームbwdの特殊復号300とフレームfwdの特殊復号300は、フレームfの特殊復号300の再帰処理である。したがって、予測参照フレーム(フレームbwd, フレームfwd)を順に辿っていき、自身のフレームデータだけで復号可能なIフレームにたどり着いた所で初めてフレームの復号処理340が行える。そのため、自身のフレームデータだけで復号可能なIフレームに辿り着いた所から予測参照フレームを必要とするフレームの復号が順に行われ、その結果、復号対象となるフレームfの特殊復号が完了することとなる。
【0051】
次に、復号回数と復号処理能力の関係について、図7を参照して説明する。復号回数表520は、各フレームを復号するのに予測参照フレームを含めて何フレームの復号が必要かを表す。図7では、Vp=4つまり4倍速再生を行うのに、図7のフレームの範囲では1フレーム時間当たり平均3.75フレームの復号処理が必要となることを示している。この値(1フレーム時間当たりに必要な平均復号処理回数)を、再生速度Vpにおける平均必要復号速度Vnと定義する。
【0052】
一方、復号処理能力は、図6における復号処理340を1フレーム時間に平均何回実行できるかで定義する。換言すれば、平均復号速度Vdは、1フレーム時間当りに復号可能なフレーム数として定義される。
【0053】
次に、算出処理210(図5参照)における算出対象とした再生速度Vpに対する再生パターンを、図8を用いて説明する。ここでは、4倍速再生を例にして特殊再生モードにおける再生パターンを説明するが、他の速度で再生する場合においても同様に実施できるのはいうまでもない。
【0054】
図8(a)は、通常の4倍速再生におけるフレームの構造例を示している。通常の4倍速再生では、現時点から4フレーム毎に1フレームを表示(間引き表示)することで4倍速再生が実施される。ここで、4フレーム毎に1フレームを表示することで、実施される4倍速再生のフレーム列(再生パターン)は、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列の一例を構成する。
【0055】
再生パターンの算出方法としては、通常の4倍速再生パターン(再生フレーム列)の算出と、4倍速再生パターン(再生フレーム列)全体をシフトする4倍速再生パターンの算出と、4倍速再生パターン(再生フレーム列)を構成する各再生フレームを個別にシフトする4倍速再生パターン(再生フレーム列)の算出とがある。
【0056】
通常の4倍速再生パターンは、図8(a)に示す通りである。再生フレーム全体をシフトする4倍速再生パターンは、図8(b)に示す通り、現時点からあるフレーム数だけ再生開始位置をシフトすることで再生フレーム全体を、図8(a)の状態からシフトする再生パターンである。各再生フレームを個別にシフトする4倍速再生パターンは、図8(c)に示す通り、各再生フレームを、単独で所定のフレーム数だけ前後にシフトする再生パターンである。
【0057】
再生フレーム全体をシフトする再生パターン(図8(b))や、各再生フレームを個別にシフトする再生パターン(図8(c))では、フレームのシフト量を変化させることで、複数の再生パターンを算出することができる。さらには、再生フレーム全体をシフトする再生パターン(図8(b))と各再生フレームを個別にシフトする再生パターン(図8(c))とを組み合わせてなる再生パターンを設定することで、多種多様な再生パターンを算出することができる。
【0058】
再生速度Vpに対する再生パターンの算出処理210について、図9を参照してさらに説明する。図9は、GOP長N=6で、IフレームとPフレームとだけから構成されるMPEGストリームを4倍速再生する例を示す。
【0059】
まず、ストリームに対して復号回数表を準備する。この例では、再生パターンの算出方法として、図8(b)に示す再生フレーム全体をシフトする再生パターンを用いる。フレームのシフト量は多くの値を用いることができる。この例では、GOPの周期性と倍速値(4)とから、シフトする再生パターンは4種類となる。各再生パターンに対して、復号回数表を用いて対応する復号回数を抜き出す。
【0060】
このように算出された再生パターンに対しては、最適パターンの選択処理211(図5参照)を以下のように行う。図9の4種類の再生パターンに対して、平均必要復号速度Vnを求めると、図9に示すように、再生パターン2と再生パターン4とがVn=3で最小値を取る。ここで、再生パターン1と再生パターン3、再生パターン2と再生パターン4は、それぞれ平均必要復号速度の値だけでなく、各フレームの復号回数の出現パターンも同じ同種の再生パターンである。つまり、再生パターン1は2,6,4,2と復号回数が推移するが、再生パターン3も最初の4の次から2,6,4,2と復号回数が推移する。再生パターン2と再生パターン4も同様である。したがって、再生パターン1と再生パターン3、および再生パターン2と再生パターン4は、同種の再生パターンと考えることができる。そこで、フレームのシフト量の少ない再生パターン2を最小値とする。ここで復号処理能力を平均復号速度Vd=3と仮定すると、再生パターン2はVn=Vdなので滑らかに再生可能となる。しかし、再生パターン1ではVn>Vdとなり、復号処理能力が不足するため、滑らかな再生ができないことになる。この点において、本発明の方法によって再生フレームを設定することによる効果が明らかとなる。
【0061】
図10に、GOP内のフレームデータをメモリ等に記憶しておく場合の例を示す。図10の再生パターン1におけるフレームaを復号するためには、復号回数を6必要とするが、GOP内のフレームを記憶しておくと、フレームbの復号データを利用できる。そこでフレームb以降の4枚のPフレームを復号すれば良いので、復号回数は4に削減できる。平均必要速度Vnも低くなり、再生パターン2ではVn=2.67に削減される。また、このように記憶したフレームを利用する場合の再生方法も、フレームfの特殊復号処理300(図6参照)の動作で対応できる。すなわち、予測参照フレームの特殊復号処理300を再帰的に実行する際において、既に復号されて記憶されたフレームがある場合、処理330と処理333(ともに図6参照)で復号済みのフレームが確認されて、復号や記憶は実行されないためである。
【0062】
再生速度Vpに対する再生パターンを算出する処理210(図5参照)の別の例について、図11を参照して説明する。図11は、GOP長N=6で、Iフレーム,Pフレーム,Bフレームから構成されるMPEGストリームを4倍速再生する例である。この例も、図9と同様、4種類の再生パターンがあり、再生パターン1と再生パターン3,再生パターン2と再生パターン4が,それぞれ復号回数の点で同種の再生パターンとなる。この場合も同様に,再生パターン2を最適パターンとして選択する。このように本発明は,GOPがI,Pフレームのみで構成されるか、I,P,Bフレームで構成されるかに関わらず適用することが可能である。
【0063】
図9〜図11の例において、MPEGストリームにおけるフレームデータに離散的にアクセスする方法として、図12のバイト位置表510を用いる。バイト位置表510を用いる理由は、MPEGストリームにおいて圧縮された各フレームデータのサイズは可変長であり、GOPの先頭位置(バイト位置)やフレームの先頭位置の情報は、一般にストリーム中には存在しないことによる。
【0064】
バイト位置表510は、少なくとも、表示順のインデックス(e),フレームタイプ(b),総バイト数(d)の情報を有しておれば良い。例えば、図12のバイト位置表510における符号化順が3のPフレームを読み出す場合を考える。図12において、フレーム先頭位置までの総バイト数はストリーム中で一意に決まる。そのため、フレーム先頭位置までの総バイト数に基づいて、フレームデータを読み込めば、正確に所望のフレームデータを読み込むことができる。例えば、フレーム先頭位置から数えて343419バイトの位置からデータを読み込めば、それが符号化順3のPフレームのフレームデータとなる。
【0065】
このように、バイト位置表510を用いれば、フレームデータの検索が非常に容易にかつ正確に行うことができる。なお、図12では、符号化順と表示順の値は簡単のためGOP内で一意に決まる値にしているが、ストリーム全体で一意に決まる値とするのが望ましい。
【0066】
バイト位置表510を作成する方法を説明する。第1の方法は、映像を符号化する際に、ストリームとして出力するバイト数をカウントしておき、ストリームと共に表を出力して記録媒体420(図2参照)に記録する方法である。第2の方法は、記録媒体420には記録せずに、ストリームを転送する際に算出して内部のメモリ等に記憶しておく方法である。なお、バイト位置表510を作成しない場合でも、ストリームを読み込む際に時刻,ビットレート,バッファ占有量などから推定されるバイト位置を算出し、その少し手前の位置からストリームを探索することでフレームデータの開始位置を探し出すことも可能である。
【0067】
図9〜図11を参照して説明した再生パターンの算出方法では、GOP長を一定として算出した。しかしながら、本発明は、GOP長が可変である場合にも適用することができる。この場合には、現時点から参照するある一定のフレーム数Nfと、最大のフレームシフト量Tfとを設定する。次に設定したフレーム数Nfのフレームに対して復号回数表を作成する。次に、フレームシフト量0(現時点)から最大のフレームシフト量Tfまでの(Tf+1)通りのフレーム開始位置から、再生速度Vpに対応した再生パターンを構成するフレームを抜き出す。フレームの抜き出しは、フレーム数Nfまで実施する。フレーム抜き出しを実施した(Tf+1)通りの再生パターンそれぞれの平均必要復号速度Vnを計算する。そして、平均必要復号速度Vnが最小の値を持つ再生パターンを最適パターンとして選択する。
【0068】
また、最適パターンを選択する他の方法としては、平均必要復号速度Vnが最小のものを選択せず、平均復号速度Vd以下で最もフレームシフト量が小さいものを選択する方法がある。確かに、図9の再生パターン2では、フレームシフト量は1となり、このシフト量はNTSCにおいて約33msecの誤差であり殆ど無視できる。しかしながら、パターン数が増える程、誤差が認識できるようになる。そのため、復号できる範囲でできるだけ小さいフレームシフト量を選択することは有効である。また、高速に再生するほど誤差の許容度が大きくなることから、再生速度Vpに応じて許容するフレームシフト量を変化させることも可能である。以上に限らず、最適パターン選択の方法は様々な方法を適用することが可能である。
【0069】
本実施の形態では順方向の高速再生を例にとって説明したが、逆再生、逆方向の高速再生に対しても、復号回数表と再生パターンの選択に基づく同様の方法で実現することが可能である。
【0070】
以上説明したように本発明によれば、再生開始フレームをシフトさせた再生パターンを算出し、平均必要復号速度が平均復号速度に収まる最適パターンを選択することで、限られた復号処理能力の中で滑らかな特殊再生を行うことが可能となる。
【0071】
なお、上記実施の形態では、復号処理時間と復号処理能力とに基づいてフレーム群を選択して復号する構成となっていたが、単に、復号処理時間に基いてフレーム群を選択してもよい。その場合であっても、復号処理を最短時間で行うことができるという意味で、最適の復号処理が実施可能となる。
【0072】
(実施の形態2)
本実施の形態では、実施の形態1において、GOP長Nが一定又はほぼ一定と見なせる場合に、復号回数表を用意せずに再生パターンを算出し、最適パターンを選択する方法について説明する。
【0073】
図1を参照して、再生速度Vpに関わらず有限の範囲で再生パターンを算出できる根拠を説明する。図1は、GOP長が一定であるMPEGストリーム100において、対応した復号回数表110を示している。このような図1の構成に基いて、GOP長N=6で、GOP内で2番目のPフレームを現在のフレームとし、再生速度Vp=4で再生する場合を考える。
【0074】
再生速度Vp=4に応じれば、4フレーム毎にフレームを選択しつつ(間引きつつ)再生を実施することとなる。実施の形態1で説明したように、このような再生形態により再生されるパターン群を再生パターンと規定する。そうすると、現在のフレームから数えて3フレーム再生すれば、現在のフレームと同じGOP内の周期位置に位置するフレーム、つまりGOP内で2番目に位置するPフレームを再生することになる。以上のことから、再生パターンには周期性があり、さらにはその周期における1周期の長さTpは次の(1)式で定義できる。なお、再生パターンの1周期の長さTpは、請求項における一定時間の一例を示す時間概念である。但し、本発明における一定時間はこのような時間概念に限定されるものではなく、予め、任意に設定する時間長であってもよいのはいうまでもない。
【0075】
Tp=lcm(N,Vp) …(1)
NはGOP長、Vpは再生速度、lcm(a,b)はaとbの最小公倍数を与える関数である。Tp/Vpの値が、再生パターンの1周期中に再生されるフレーム数である。例として、Tp/Vpの値を3フレームとすると、その時間はNTSCでは約100msecとなる。つまり100msec以上再生されれば、近似的に平均必要復号回数は同じとみなすことができる。そのため、再生パターンの1周期に含まれるフレームの復号回数のみを評価して再生パターンを算出することができる。また、復号回数表は1周期の範囲のみをGOP構造から生成すれば良いので、記録媒体420(図2参照)に記録するなどして予め用意する必要はない。
【0076】
実施の形態1において、図9,図10,図11を参照して説明した再生パターンの定義を一般化する。GOPがI,Pフレームのみで構成されるか、I,P,Bフレームで構成されるかに関わらず、またフレームが記憶されるかどうかに関わらず、GOP長が一定または一定と見なせる条件の下で、複数設定される再生パターンそれぞれにおいて、本発明において異種の再生パターンと見なすことができる再生パターンの数(Npat)は以下の(2)式で定義できる。なお、ここで再生パターンを同種,異種に判別する基準は、図9,図10を参照して実施の形態1で説明した同種の判別基準に基いている。
【0077】
Npat=gcd(N,Vp) …(2)
但し、NはGOP長、Vpは再生速度、gcd(a,b)はaとbの最大公約数を与える関数である。再生パターンの数(Npat)がVpでなくNとVpの最大公約数になる理由は、図9を参照して実施の形態1で説明したように、周期的には同一になる再生パターンを排除できるためである。
【0078】
図13に、図9の例に対して、再生パターンの数(Npat)を算出した例を示す。N=6,Vp=4であるから、Npat=gcd(6,4)=2となる。また、再生速度(Vp)を変化させた場合の再生パターンの数(Npat)を表に示している。表のように、Npat=gcd(6,Vp)であり、Npatは6より大きな値を取ることはない。このことから、再生パターンの算出は容易であり、復号回数の比較により最適パターンを容易に選び出すことが可能であることがわかる。
【0079】
再生パターンの選択方法を一般化すると次のようになる。第1に、Npat=1の場合、現在のフレームを含む再生パターンを選択する。これは再生パターンが1種類のため、最もフレームシフト量の少ない再生パターンを適用するためである。第2に、Npat=a(但し1<a<Nの整数)の場合、Iフレームを含む再生パターンを選択する。これは、GOP構造に関わらず、Iフレームを含む再生パターンが最も平均必要復号回数が小さくなるためである。ここで、Iフレームを含む再生パターンは複数個出現しないことに注意されたい。第3に、Npat=Nの場合、Iフレームまで移動して再生する。この場合は、Vp=m・N(mは自然数)であるから、Iフレームのみの再生パターンが必ず存在するためである。
【0080】
本実施の形態では順方向の高速再生を例にとって説明したが、Vp<0となる逆再生や逆方向の高速再生に対しても、Vpの代わりに|Vp|を用いることで、同様に実現することが可能である。
【0081】
以上説明したように、本実施の形態によれば、GOP長を一定またはほぼ一定と見なせる場合に、復号回数表を用意せずに再生パターンを算出して最適パターンを選択することができ、限られた復号処理能力の中で滑らかな特殊再生を行うことが可能となる。
【0082】
(実施の形態3)
本実施の形態では、実施の形態1に対して、さらに図8(c)に示した各再生フレームのシフトを適用して、復号処理能力が一層限られた場合でも滑らかな特殊再生を行うことを可能とする例について示す。
【0083】
図14に、図9の例に対して、図8(c)に示した各再生フレームのシフトを適用した例を示す。最大フレームシフト量は1とし、各フレームのシフト量は、−1,0,+1のうちいずれかの値を持つ。シフトの方法として、双方向シフト,片方向シフト,シフトなしの3種類を用いる。双方向シフトは−1と+1の双方向のシフトとシフトなしを許可するものであり、片方向シフトはシフトなし以外に−1の前方シフトのみ又は+1後方シフトのみを許可するものである。シフトなしは図9の再生パターンからシフトを行わない。以上の3種類のシフトを区別して用いる理由は、3種類の間でフレーム表示の時間間隔、つまりフレームの表示精度が異なるためである。フレームの表示精度を評価するため、フレーム最小間隔dminとフレーム最大間隔dmaxとを定義する。
【0084】
図14に示すように、図9で得られた再生パターン1,2それぞれに対して、(a)双方向シフト,(b)片方向シフト,(c)シフトなしを適用する。(a),(b),(c)各シフトの中で平均必要復号速度が最小のシフトパターンを算出する。但し、以下の規則を適用する。
【0085】
第1の規則
再生パターンの1周期中の全てのフレームが同一方向にシフトされる場合は除外する。この再生パターンは、行われた図8(b)の再生開始フレームのシフトで既に含まれているためである。
【0086】
第2の規則
全ての双方向シフトにおいては、平均必要復号速度が最小の再生パターンが片方向シフト又はシフトなしになる場合、該当なしとする。
【0087】
第3の規則
片方向シフトにおいては、前方または後方シフトのうち平均必要復号速度が最小となる再生パターンを選択するが、平均必要復号速度が最小の再生パターンがシフトなしになる場合、該当なしとする。
【0088】
第4の規則
既に平均必要復号速度が最小となる再生パターンとして出現した再生パターンが再び最小となる再生パターンとなる場合、該当なしとする。
【0089】
以上の規則を適用すると、図14のように平均必要復号速度Vn,フレーム最小間隔dmin,フレーム最大間隔dmaxの表が得られる。ここで、フレーム最小間隔dminとは、シフトにより、間引き間隔(離間間隔)が変動する隣接表示フレームの離間間隔において、最小値を取るフレーム離間間隔をいう。反対に、フレーム最大間隔dmaxとは、最大値を取るフレーム離間間隔をいう。これら最大最小間隔に基いて定義される表示ゆらぎ幅W(=dmax−dmin)は、表示精度に影響を及ぼす。表示ゆらぎ幅Wが大きい程、表示精度が落ちる。
【0090】
図15に、図14で得られた結果を評価するための表を示す。図15に示すように、平均必要復号速度Vdを中心とした復号処理能力の評価と、表示ゆらぎ幅W(=dmax−dmin)を中心とした表示精度の評価とから、最適パターンを選択する。具体的には、平均必要復号速度Vnが、復号処理能力を表す平均復号速度Vd以下となり、表示ゆらぎ幅が最も小さい再生パターンを選択する。
【0091】
また、復号処理能力の評価として最小復号回数や最大復号回数を用いることもできる。表示精度の評価としては、実施の形態1で用いた再生開始フレームのシフト量を用いることもできる。但し、再生パターン1(a)のように再生開始フレームも再度シフトされる場合があることに注意する。
【0092】
図14の例において、最大フレームシフト量を1とした理由は、実際には1で十分な場合が多いためである。平均必要復号速度を一層削減したい場合には、必要であれば2以上の値も同様に適用することができる。この場合、シフト量による分類は3種類より多く取ることもできる。但し、当然ながら連続するフレームの時間的順序が入れ替わるようなシフトは行われない。
【0093】
以上の例では、GOPがIフレームとPフレームのみで構成される例で示したが、GOPがIフレーム,Pフレーム,Bフレームで構成される場合においても、復号回数表が異なるだけであるので同様に適用することができる。また、一度復号したフレームを記憶しない場合を示したが、復号したフレームを記憶する場合も、復号回数表が異なるだけであるので同様に適用できる。
【0094】
以上のように本実施の形態によれば、実施の形態1に対して、さらに各再生フレームのシフトを適用して、復号処理能力が一層限られた場合でも滑らかな特殊再生を行うことができる。
【0095】
(実施の形態4)
本実施の形態では、実施の形態1を実現するための装置について説明する。
【0096】
図16は、本発明の映像再生装置を示す図である。図16の映像再生装置400において、410は符号化された映像であるストリームを復号する復号器、411は復号処理を行うためのCPU、412はストリームや復号されたフレームを記録しておくメモリ、413はCPU411を動作させるプログラムを初期状態で格納しておくためのROM、421はディスクを駆動するためのディスクコントローラ、422はストリームが記録されている光ディスクドライブ、431はディスクコントローラ421と復号器410を制御して最適な表示を行うための制御プロセッサ、432はモニタ等、映像を表示するための表示デバイスである。
【0097】
以上のように構成された映像再生装置において、以下、その動作を説明する。まず、映像再生装置400の起動前には、本発明による復号のためのプログラムがROM413に記録されている。本装置の起動操作により、ROM413からプログラムがCPU411にロードされ、CPU411はストリームの復号処理が可能となる。映像再生装置400(映像再生手段450(図2参照))における復号処理は、このプログラムで実現されている。再生前には、ストリームが記録された光ディスクが、光ディスクドライブ422に装填される。
【0098】
映像再生装置400の再生動作を説明する。ユーザからの再生コマンドが、バス433を介して制御プロセッサ431に与えられると、制御プロセッサ431はディスクコントローラ421を駆動し、光ディスクドライブ422から指定された時刻から始まるストリームを一定量読み出し、メモリ412に転送する。この一定量は、再生動作に障害が生じないように、例えば数GOP単位や数秒単位といった適切な長さとすることができる。同時に、メモリ412の割込み領域にCPUへの復号命令を書き込む。CPU411はメモリ412の割込み領域を監視しており、再生命令が与えられると、メモリ412からストリームを読み出し、復号処理を行い、復号したフレームデータをメモリ412に書き込む。その際、CPU411は、現在のタイムコード位置から一定時間内に再生するフレーム群を複数抽出したうえで、抽出した複数のフレーム群を復号処理するのに要する時間をそれぞれ算出するという処理と、算出した前記復号処理時間に基いて、前記複数のフレーム群から任意のフレーム群を選択して復号する処理とを実施することで、フレームデータを復号処理する。つまり、CPU411は請求項における計時器の機能と復号器の機能とを発揮する。また、CPU411は請求項におけるフレーム配置パターンを選択する手段と、映像を復号する手段とを発揮する。
【0099】
フレームデータがメモリ412に書き込まれると、制御プロセッサ431は、それを表示デバイス432に送って映像を表示させる。
【0100】
映像再生装置400(映像再生手段450)において、フレームを記憶する方法を、図17を参照して説明する。図17は、CPU411に格納されるプログラムによって管理される復号フレーム表500(図17(a))と、メモリ412(図17(b))とを示している。プログラムは、メモリ412上に復号されたフレームデータが存在するかどうかを示す復号データ存在フラグと、対応するフレームのインデックス(シーケンス内で一意に決まる通し番号)の表とを持っており、これらを常に最新の状態に保つ。この表は、フレームを復号してメモリ412に格納する際にフラグを更新することで簡単に管理できる。メモリ412には、インデックスと対応するフレームデータを格納する。図16の制御プロセッサ431は、このメモリ412上のインデックスを確認することで、復号されたフレームデータがメモリ上に存在するかどうかを確認できる。但し、メモリ412上のインデックスは図17(b)の配置に限られるものではなく、例えば図17(a)の一覧表のような検索し易い形式でメモリに保存してあっても良い。
【0101】
以上の映像再生装置400の説明においては、光ディスクドライブを想定して説明したが、ハードディスクドライブやメモリなど、情報を記録する媒体であれば同じく実現が可能であるのは言うまでもない。また、実時間より高速に復号処理を行う復号器としてCPUとメモリを用いた例を示したが、復号処理が実時間より高速に行えるものであれば、これに限定するものではない。以上のように本実施の形態によれば、実施の形態1を装置として実現できる。
【0102】
(実施の形態5)
本実施の形態では、映像符号化方法において、符号化時の予測方向を限定することで、平均必要復号速度Vnを削減する符号化方法を示す。
【0103】
図18に、予測方向を限定する符号化方法を示す。図18(a)がGOP長N=15の通常の符号化方法を示す。図18(b),(c)はBフレームの双方向予測に対して予測方向の限定を行う方法ほ示す。図18(b)は、GOPの最初の2枚のBフレームは後方予測しか用いず、それ以外のBフレームは前方予測しか用いない方法を示す。図18(c)は、GOPの最初の2枚のBフレームは後方予測しか用いず、それ以外のBフレームは前方にあるフレームは前方予測、後方にあるフレームは後方予測しか用いない方法である。図18(b)と図18(c)との両方において、平均必要復号速度Vnが(a)と比べて削減されている。これは、図18(b),図18(c)のように符号化されたストリームを特殊再生する際、復号処理をより高速に行えることを意味する。ここで、GOPの最初の2枚のBフレームに対する予測方向限定は、一般的にはクローズドGOPにより行うことができる。その他のフレームの予測方向限定は、符号化時にフレーム全体でその方向への予測処理を行わないか、マクロブロック単位に設定可能な予測モードを限定することで、実現可能である。
【0104】
本実施の形態で符号化した映像に対して、予測を限定した符号化を行った情報を図12のバイト位置表510に加えておけば、特殊再生時に予測に用いなかった予測参照フレームの復号は行われない。図11を参照して説明したような例において、本実施の形態によるストリームを利用することが可能である。以上のように本実施の形態によれば、符号化時の予測方向を限定することで、平均必要復号速度Vnを削減する映像符号化方法を提供することができ、限られた復号処理能力を持つ再生手段に対しても滑らかな特殊再生を行うことができるストリームを生成することができる。
【0105】
【発明の効果】
以上の説明から明らかなように、本発明によれば、再生フレームをシフトさせた再生パターンを算出し、平均必要復号速度が平均復号速度に収まる最適パターンを選択することで、高速再生等の復号の負荷の大きい特殊再生時に、滑らかに映像を再生できる。
【図面の簡単な説明】
【図1】本発明の実施の形態2における有限の範囲で再生パターンを算出できる根拠を説明する図。
【図2】本発明の実施の形態1における映像再生方法を実現する構成図。
【図3】同実施の形態1における再生時の復号処理を示すフローチャート図。
【図4】同実施の形態1における通常再生モードの復号処理を示すフローチャート図。
【図5】同実施の形態1における特殊再生モードの復号処理を示すフローチャート図。
【図6】同実施の形態1におけるフレームの特殊復号処理を示すフローチャート図。
【図7】同実施の形態1における復号回数と復号処理能力の関係を説明する図。
【図8】同実施の形態1及び同実施の形態3におけるフレームのシフトを示す図。
【図9】同実施の形態1における再生パターンの算出の例を示す図。
【図10】同実施の形態1における再生パターンの算出の例を示す図。
【図11】同実施の形態1における再生パターンの算出の例を示す図。
【図12】同実施の形態1におけるバイト位置表の例を示す図。
【図13】本発明の実施の形態2における再生パターン数を示す図。
【図14】本発明の実施の形態3における再生パターンの算出の例を示す図。
【図15】同実施の形態3における最適パターンの選択を説明する図。
【図16】本発明の実施の形態4における映像再生装置の構成を示す図。
【図17】同実施の形態4における復号フレームの記憶方法を示す図。
【図18】本発明の実施の形態5における予測方向を限定した符号化方法を示す図。
【図19】MPEGに基づく映像符号化方法における各フレームの構成図。
【図20】IフレームとPフレームとを符号化する場合の従来例におけるフレーム構成図。
【図21】符号化・復号化されるMPEGのストリームを、特殊再生、特に高速再生する場合の従来例における説明図。
【符号の説明】
100 MPEGストリーム 101 Iフレーム
102 Pフレーム 110 復号回数表
400 映像再生装置 410 復号器
411 CPU 412 メモリ(RAM)
413 ROM 414 バス
415 CPUコア 416 プログラムキャッシュ
417 データキャッシュ 418 プログラムバス
419 データバス 420 記録媒体
421 ディスクコントローラ
422 光ディスクドライブ 431 制御プロセッサ
432 表示デバイス 433 バス
440 再生操作入力手段 450 映像再生手段
500 復号フレーム表 510 バイト位置表
520 復号回数表
[0001]
BACKGROUND OF THE INVENTION
The present invention provides a video playback apparatus that reads out and plays back inter-frame predictive encoded video from a recording medium such as an optical disc, and performs high-speed playback that displays video more smoothly when decoding can be performed faster than real time. The present invention relates to a video playback method, a video playback device, and a video encoding method that can be performed.
[0002]
[Prior art]
The number of devices that use digital recording / reproduction of video has been increasing regardless of whether it is for home use or business use. Realizing long-time recording and high image quality with a limited recording medium capacity is a conflicting element, but a series of MPEG standards (Moving Pictures coding Experts Group: ISO / IEC11172-) based on interframe coding. 2, ISO / IEC13818-2 and ISO / IEC14496-2) have high cost performance in terms of compression rate and image quality, and are used in many applications such as digital TV broadcasting, DVD-Video, and cellular phones.
[0003]
In video encoding based on MPEG, each frame is encoded with a configuration as shown in FIG. There are three types of encoding: intra-frame encoded frame (hereinafter referred to as I frame), inter-frame encoded frame (hereinafter referred to as P frame), and inter-frame encoded frame (hereinafter referred to as B frame). There are types. The I frame is a frame that can be decoded using only the data of the frame. The P frame is a frame that can be decoded using the data of the I or P frame decoded before the frame and the data of the frame. The B frame is a frame that can be decoded using data of two I or P frames that are temporally changed and data of the frame.
[0004]
The B frame is decoded with reference to a frame located rearward in the display order at the time of decoding. Therefore, when encoding a B frame, as shown in FIG. 19B, the order is changed and encoded. Data to be encoded is output as a bit stream (hereinafter referred to as a stream) in order as a GOP (Group Of Pictures) sequence starting from an I frame in many cases.
[0005]
The I frame and the P frame are decoded without referring to a frame positioned backward in the display order at the time of decoding. Therefore, when encoding the I frame and the P frame, as shown in FIG. 20, the encoding is performed in the display order without changing the order. When decoding an MPEG stream, frames are read from the stream in the encoding order, and then decoded in the encoding order. Video output is performed in the order of display.
[0006]
When the MPEG stream encoded / decoded as described above is specially reproduced, particularly at a high speed, a great difficulty is involved. For example, as shown in FIG. 21A, a case where a stream in which I, P, and B frames are mixed is read and quadruple speed reproduction is performed is considered. Assuming that the current frame is the I frame of frame 2 and the frame index is only in the range of 0 to 14, if 4 frames of frames 2, 6, 10, and 14 are reproduced, the speed is 4 ×. However, as shown in FIG. 21B, decoding of each frame requires 1, 4, 5, and 5 decoding times including the predicted reference frame. This means that in one frame time (33 msec for NTSC and 40 msec for PAL), smooth reproduction cannot be achieved unless (1 + 4 + 5 + 5) /4=3.75 frames are decoded on average.
[0007]
On the other hand, general-purpose MPEG decoders such as LSI generally operate in real time in conjunction with a clock for normal reproduction (single-speed reproduction), and are configured to decode one frame in one frame time. For this reason, the fast-forward playback function such as DVD-Video is limited to displaying and updating I frames like frame-by-frame. From the above, it can be seen that it is difficult to smoothly and rapidly reproduce a video encoded by MPEG.
[0008]
Various patents have been filed as conventional techniques for performing smooth high-speed playback of inter-frame predictive encoded video such as MPEG. First, as a method for preventing the failure of a buffer at the time of decoding, which is caused by continuously reproducing a frame having a large amount of data such as an I frame, there are Japanese Patent No. 3301274 and Japanese Patent No. 3203169. In the former case, when there is no data, the PTS (display time stamp) is ignored and a freeze screen is output. The latter skips frames according to the buffer occupancy. However, both prevent the decoder buffer from failing, and cannot smoothly display an MPEG stream when it is played back at high speed.
[0009]
Next, Japanese Patent Laid-Open No. 08-186794 discloses a high-speed playback method considering the reading time. This is to perform high-speed playback by calculating a possible double speed value at high-speed playback from the reading time of the optical disk. However, this method is not a method considering the decoding processing time. Decoding processing time is the most important factor when high-speed playback of an MPEG stream. Therefore, in this method in which the decoding processing time is not taken into consideration, smooth display cannot be performed when an MPEG stream is reproduced at high speed.
[0010]
As an improvement method in consideration of the decoding processing time, there are Japanese Patent No. 3025447 and Japanese Patent Laid-Open No. 2001-54066. The former saves decoding processing time without reading unnecessary B frames and the like. In the latter, the decoding processing speed is changed, and the frame rate is changed and displayed in a display environment such as a PC. Although both attempt to shorten the decoding processing time during high-speed playback, it is not possible to achieve smooth high-speed playback at varying playback speeds, taking into account the processing capacity of the decoder and the decoding processing time of each frame. Absent.
[0011]
[Patent Document 1]
Patent 3301274 (Claim 1)
[Patent Document 2]
Patent No. 3203169 (Claim 1)
[Patent Document 3]
JP 08-186794 A (Table 3)
[Patent Document 4]
Patent 3025447 (Claim 1)
[Patent Document 5]
JP 2001-54066 A (summary)
[0012]
[Problems to be solved by the invention]
In recent years, the construction of a decoder based on a processor typified by a CPU has progressed rapidly, and it is becoming possible to increase the decoding speed faster than real time in a decoder configured in this way. However, a method for performing special reproduction more smoothly by using the above-described high-speed decoding technique in the case of performing special reproduction, particularly high-speed reproduction, on a medium on which predictive-encoded video typified by MPEG has been proposed. There wasn't.
[0013]
The present invention calculates the decoding processing speed and the decoding processing time of the CPU and performs the decoding smoothly when the decoding operation faster than the real time is possible in the special reproduction of the inter-frame prediction encoded video signal. It is an object of the present invention to obtain a method of selecting an optimal frame pattern that can be reproduced and reproducing at high speed.
[0014]
[Means for Solving the Problems]
In order to achieve the above object, the present invention creates a decoding count table indicating the number of decoding required for decoding each frame before playback in a playback method for high speed playback using a CPU capable of decoding processing faster than real time. In reproduction, the CPU compares the number of frames that can be decoded on average within one frame time with the number-of-decoding table, selects an optimal frame pattern that can be decoded smoothly, and performs high-speed reproduction. In this video reproduction method, the decoding processing speed and decoding processing time of the CPU are calculated, and it is possible to select an optimum frame pattern that can be smoothly decoded and to perform high-speed reproduction.
[0015]
Specifically, the present invention relates to a video playback method in which a video signal is played back from a recording medium on which the encoded video signal is recorded and then decoded by a decoder. A plurality of sets of one or more frames (hereinafter referred to as a frame group) to be reproduced within a predetermined time from the code position are extracted, the decoding processing times of the extracted plurality of frame groups are calculated, and the calculated decoding processing time Based on the above, an arbitrary frame group is selected from the plurality of frame groups and decoded by the decoder.
[0016]
As a result, it is possible to select and decode an optimum one from a plurality of frame groups based on the decoding processing time.
[0017]
It is preferable to select and decode the frame group having the shortest decoding processing time. Then, it becomes possible to shorten the decoding processing time. This can be said to be one form of optimal decoding processing in view of the processing capability of the decoder.
[0018]
It is preferable that the frame group is selected based on the calculated decoding processing time and the decoding processing capability of the decoder and is decoded by the decoder. Then, optimization of the decoding process can be realized without impairing the smoothness of the motion of the video. This can be said to be one form of optimal decoding processing in view of the processing capability of the decoder.
[0019]
Note that it is preferable to select the frame group indicating the value at which the calculated decoding processing time can be decoded within a unit time by the decoder, and decode the selected frame. Then, the decoding process can be optimized by the decoder. This can also be said to be one form of optimal decoding processing in view of the processing capability of the decoder.
[0020]
In addition,
-Further selecting one or a plurality of the frame groups indicating values that enable decoding processing within a unit time by the decoder;
Selecting and decoding from the selected frame group a frame group having the smallest temporal error with respect to the playback frame sequence set based on the current time code and the current playback speed;
It is preferable to perform the above process, so that the decoding process can be optimized without impairing the smoothness of the motion of the video.
[0021]
The plurality of different frame groups for calculating the decoding processing time are based on a playback frame sequence that is set based on the current time code and the current playback speed, and any arbitrary frame within this playback frame sequence. This frame is preferably replaced by a temporally shifted frame, so that the decoding processing time can be shortened while maintaining the smoothness of the motion of the video.
[0022]
Note that the video signal is a video signal subjected to interframe prediction encoding, and it is preferable that the process of decoding the video signal is performed while sequentially decoding the prediction reference frames necessary for decoding. By doing so, the present invention can be similarly implemented even in a configuration in which a video signal that has been inter-frame predictively encoded is decoded. In this case, it is preferable to calculate the decoding processing time by adding the decoding processing times of the prediction reference frames to be sequentially decoded. By doing so, it is possible to calculate the decoding processing time with high accuracy even in a video signal subjected to interframe predictive coding.
[0023]
The plurality of frame groups are preferably set by changing a temporal shift amount from the current time code position to the time code position at which reproduction is started. By doing so, it is possible to shorten the decoding processing time while maintaining smooth motion of the video.
[0024]
The predetermined time is based on the least common multiple of the playback speed ratio (= playback speed / normal playback speed) during video playback and the length (number of frames) of GOP, which is an aggregate of a plurality of consecutive frames. It is preferable to calculate. Then, it becomes possible to calculate the fixed time with high accuracy and easily.
[0025]
When the features of the present invention are viewed from different viewpoints, the present invention creates a decoding number table indicating the number of decoding times required for decoding each frame before reproduction, and then performs decoding on average within one frame reproduction time. This can also be realized by comparing the number of possible frames with the number-of-decodings table and selecting a frame arrangement pattern that allows smooth decoding, and decoding and reproducing the video based on the selected frame arrangement pattern.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to FIGS.
[0027]
(Embodiment 1)
FIG. 2 is a block diagram showing a configuration for carrying out the video reproduction method according to the present invention. In FIG. 2, 420 is a recording medium on which video is recorded, 440 is playback operation input means for a user to perform playback operation, 450 is video playback means for performing video playback according to the present invention, and 432 is a display device. is there.
[0028]
In FIG. 2, the user operates the reproduction operation input means 440 to perform a reproduction operation. Information indicating the start time code Ts and the playback speed Vp input to the playback operation input unit 440 by the playback operation is transmitted from the playback operation input unit 440 to the video playback unit 450. There are various configurations for realizing the reproduction input means 440. The playback input means 440 may be any configuration that can change information indicating the playback speed Vp and transmit it to the video playback means 450, such as buttons for playback, stop, fast forward, etc., a jog dial used in an editing playback machine, and the like. .
[0029]
The video playback means 450 reads the video recorded on the recording medium 420 and plays back the video based on the start time code position and playback speed set based on the input start time code Ts and playback speed Vp information. . The reproduced video is displayed on the display device 432. As the recording medium 420, a device such as a tape, an optical disk, a magnetic disk, or a memory can be used.
[0030]
The video playback processing steps in the video playback method of the present embodiment will be described with reference to the flowchart of FIG. First, when reproducing a video, a process 261 is performed for moving the reproduction start position to a position of a preset start time code Ts. In this process 261, the time code Ts is searched from the video data recorded on the recording medium 420, and thereby the process of moving the reproduction start position to the position of the preset start time code Ts is performed. As a result, the playback processing status becomes ready for playback.
[0031]
Next, playback mode setting processing 272 is performed. The playback mode is set to either the normal playback mode or the high speed playback mode. In this process, first, the current reproduction speed Vp is recognized. If the recognized current playback speed Vp is 0 ≦ Vp ≦ 1, the normal playback mode is set, and if Vp <0 or 1 <Vp, the special playback mode is set. The playback speed Vp here indicates a playback speed ratio (= playback speed / normal playback speed) in detail, and the playback speed Vp = 1 means a normal playback speed (single speed), and Vp = 0 means rest (stop), Vp <0 means reverse reproduction, and | Vp |> 1 means high-speed reproduction. 0 <Vp <1 is low-speed playback, but low-speed playback can be dealt with by controlling the frame transmission from the video playback means 450 to the display device 432 because the decoding processing time is shorter than normal playback. Therefore, in the present embodiment, description will be made assuming that the playback speed (0 <Vp <1) is included in the normal playback mode.
[0032]
When the playback mode setting process 272 is completed, the normal playback mode decoding process 230 or the special playback mode decoding process 200 is performed via the playback mode determination process 284. In these processes, the frame decoding process is continued in the reproduction mode until a change in the reproduction mode is detected. When the reproduction mode changes, stop determination processing 280 is performed. In the determination process 280, if it is determined that the reproduction is continuing (Vp ≠ 0), the process returns to the reproduction mode determination process 284. If it is determined that the reproduction is stopped (Vp = 0), the reproduction is terminated.
[0033]
The decoding process 230 in the normal playback mode will be described with reference to the flowchart in FIG. First, a normal frame decoding process 240 and a frame output process 241 are performed. The normal decoding process 240 is a general decoding process of an MPEG stream, and decodes frames located in the next encoding order in the stream. The output process 241 is a process for outputting the corresponding next time-ordered frame from the decoded frames.
[0034]
When the normal decoding process 240 and the output process 241 are completed, the time required for decoding one frame has elapsed, so that the process 280 is a process for detecting whether or not the playback speed Vp has changed due to the user's operation. Processing 282 is performed. If it is determined in the process 280 that the reproduction is continuing (Vp ≠ 0), the process proceeds to the process 282, and if it is determined that the reproduction is stopped (Vp = 0), the series of decoding processes is terminated.
[0035]
In process 282, it is determined whether or not the current playback speed Vp has changed to a playback speed belonging to the special playback mode. Specifically, if the current playback speed Vp is in the range of Vp <0 or 1 <Vp, it is determined that the playback speed has changed to the playback speed belonging to the special playback mode, and the process proceeds to processing 271. If the current playback speed Vp is in the other range (0 ≦ Vp ≦ 1), the normal decoding process 240 for the next frame is performed as a determination that the normal playback mode continues.
[0036]
The decoding process 200 in the special playback mode will be described with reference to the flowchart in FIG. First, a reproduction pattern calculation process 210 for the reproduction speed Vp is performed. In this method, some combinations of frames to be reproduced in the future are calculated as reproduction patterns. The reproduction pattern is a concept indicating an arrangement pattern of a frame group (a set of one or more frames) reproduced within a predetermined time from the current time code position.
[0037]
Next, a process 211 for selecting an optimum reproduction pattern from the calculated reproduction patterns based on the decoding processing time and the decoding processing capability is performed. Based on the optimum pattern obtained by the process 211, the frame special decoding process 300 is performed. The frame decoded by the special decoding process 300 is output in the frame output process 241 which is the next process.
[0038]
After performing the output process 241, processes 280 and 282 for detecting whether or not the reproduction mode has changed are performed. First, in process 280, it is determined whether or not the current playback speed Vp is Vp = 0. If it is determined in the process 280 that Vp = 0, it is determined that the playback is currently stopped, the subsequent processes are stopped, and the end process is performed.
[0039]
If it is determined in the process 280 that Vp ≠ 0, it is determined that the reproduction is currently continued, and the process proceeds to the process 281. In process 281, it is determined whether or not the current playback speed Vp is 0 <Vp ≦ 1. If it is determined in process 281 that 0 <Vp ≦ 1, it is determined that the current playback mode has been changed from the special playback mode to the normal playback mode, and the process proceeds to process 270. In process 270, the playback mode is set to the normal playback mode. After setting the playback mode to the normal playback mode, the process is terminated.
[0040]
If it is determined in process 281 that 0 <Vp ≦ 1 is not satisfied (Vp <0 or 1 <Vp), it is determined that the current playback mode is maintaining the special playback mode, and the process proceeds to process 283. In process 283, it is determined whether or not the playback speed Vp has changed from before frame decoding. When it is determined that the reproduction speed Vp has not changed, it is not necessary to change the optimum pattern (reproduction pattern with respect to the reproduction speed Vp) set by judging from the point of the decoding processing time and the decoding processing capacity in the process 211. It returns to the process 300, and the special decoding of a frame is continued.
[0041]
On the other hand, if it is determined in process 283 that the playback speed Vp has changed from before frame decoding, an optimum pattern (reproduction) determined by determining in terms of decoding processing time and decoding processing capacity in process 211. It is determined that it is necessary to change the reproduction pattern for the speed Vp, and the process returns to the process 210 to select the optimum pattern again, and then continue the special decoding of the frame.
[0042]
The frame special decoding process 300 will be described with reference to FIG. FIG. 6 is a flowchart showing details of the special decoding process 300 for the frame f. In FIG. 6, a symbol f indicates a frame number that can uniquely specify a frame in the sequence.
[0043]
First, a process 330 is performed for determining whether the frame f has been decoded or can be decoded. The frame f has been decoded indicates that the frame f has already been decoded and stored as frame data in a storage medium such as a memory. As long as the frame once decoded is stored in the memory, it can be used any number of times without decoding. The fact that the frame f is decodable means a state in which decoding is possible using only the frame data of the frame f.
Specifically, the fact that the frame f is decodable is
Frame f is an I frame,
The frame f is a P frame and the forward prediction reference frame has been decoded;
Frame f is a B frame and both the forward prediction reference frame and the backward prediction reference frame have been decoded;
Either state.
[0044]
In the determination process 330, when it is determined that the frame f has been decoded or can be decoded, a determination process 333 is performed to determine whether or not the frame f has been decoded. If it is determined in the determination process 333 that the decoding has been completed, the series of processes ends. On the other hand, in the determination process 333, when it is determined that the frame f has not been decoded, the decoding process 340 and the storage process 350 of the frame f are performed, and then the series of processes ends.
[0045]
In the determination process 330, when it is determined that the frame f has not been decoded or is not decodable, a determination process 331 is performed as to whether or not the frame f is performing backward prediction. The backward prediction indicates that decoding is performed with reference to data of a frame located behind the frame in display order.
[0046]
When it is determined that the backward prediction is performed in the determination process 331, the process 311 of setting the frame number of the backward prediction reference frame of the frame f to bwd is performed, and then the special decoding process 300A of the set frame bwd is performed. .
[0047]
After performing the special decoding process 300A for the frame bwd, or when it is determined that the backward prediction is not performed in the determination process 331, a determination process 332 is performed to determine whether the frame f is performing the forward prediction.
[0048]
When it is determined that the forward prediction is performed in the determination process 332, the process 312 for setting the frame number of the forward prediction reference frame of the frame f to fwd is performed, and then the special decoding process 300B of the set frame fwd is performed. .
[0049]
After performing the special decoding process 300B of the frame fwd or when determining that the forward prediction is not performed in the determination process 332, it is determined that the series of special decoding processes for the frame f has been completed, and the next frame f In order to shift to the special decoding process for the above, the process returns to the determination process 330 to continue the process. When the frame f is performing prediction, since the prediction reference frame is decoded by either or both of the special decoding 300 of the frame bwd and the special decoding 300 of the frame fwd, the frame f can be decoded here.
[0050]
Special decoding 300 for frame bwd and special decoding 300 for frame fwd are recursive processing of special decoding 300 for frame f. Accordingly, the prediction reference frame (frame bwd, frame fwd) is traced in order, and the frame decoding process 340 can be performed for the first time when an I frame that can be decoded only by its own frame data is reached. Therefore, the decoding of the frame that requires the prediction reference frame is sequentially performed from the point where the I frame that can be decoded only by the own frame data is reached, and as a result, the special decoding of the frame f to be decoded is completed. It becomes.
[0051]
Next, the relationship between the number of decoding times and the decoding processing capability will be described with reference to FIG. The number-of-decodings table 520 indicates how many frames including the predicted reference frame are required to decode each frame. FIG. 7 shows that in order to perform Vp = 4, that is, quadruple speed reproduction, an average of 3.75 frames per frame time is required for decoding within the frame range of FIG. This value (average number of decoding processes required per frame time) is defined as the average required decoding speed Vn at the playback speed Vp.
[0052]
On the other hand, the decoding processing capability is defined by the average number of times the decoding process 340 in FIG. 6 can be executed in one frame time. In other words, the average decoding speed Vd is defined as the number of frames that can be decoded per frame time.
[0053]
Next, a reproduction pattern with respect to the reproduction speed Vp as a calculation target in the calculation process 210 (see FIG. 5) will be described with reference to FIG. Here, the reproduction pattern in the special reproduction mode will be described by taking 4 × speed reproduction as an example, but it goes without saying that the reproduction pattern can be similarly applied to reproduction at other speeds.
[0054]
FIG. 8A shows an example of a frame structure in normal 4 × speed reproduction. In normal quadruple speed playback, one frame is displayed (decimated display) every four frames from the current time point to perform quadruple speed playback. Here, by displaying one frame for every four frames, the frame sequence (playback pattern) of the 4 × speed playback that is performed is a playback frame sequence set based on the current time code and the current playback speed. Configure an example.
[0055]
As a calculation method of the reproduction pattern, calculation of a normal 4 × speed reproduction pattern (reproduction frame sequence), calculation of a 4 × speed reproduction pattern for shifting the entire 4 × speed reproduction pattern (reproduction frame sequence), and 4 × speed reproduction pattern (reproduction) There is a calculation of a 4 × speed reproduction pattern (reproduction frame sequence) for individually shifting each reproduction frame constituting the frame sequence).
[0056]
A normal 4 × speed reproduction pattern is as shown in FIG. As shown in FIG. 8B, the quadruple speed playback pattern for shifting the entire playback frame shifts the entire playback frame from the state shown in FIG. 8A by shifting the playback start position by a certain number of frames from the present time. It is a playback pattern. The quadruple speed reproduction pattern for individually shifting each reproduction frame is a reproduction pattern for shifting each reproduction frame by a predetermined number of frames independently as shown in FIG. 8C.
[0057]
In a playback pattern that shifts the entire playback frame (FIG. 8B) and a playback pattern that shifts each playback frame individually (FIG. 8C), a plurality of playback patterns can be obtained by changing the frame shift amount. Can be calculated. Furthermore, by setting a reproduction pattern that combines a reproduction pattern (FIG. 8 (b)) for shifting the entire reproduction frame and a reproduction pattern (FIG. 8 (c)) for individually shifting each reproduction frame, various types of reproduction patterns are set. Various reproduction patterns can be calculated.
[0058]
The reproduction pattern calculation process 210 for the reproduction speed Vp will be further described with reference to FIG. FIG. 9 shows an example in which an MPEG stream composed of only I frames and P frames with a GOP length N = 6 is reproduced at 4 × speed.
[0059]
First, a decoding frequency table is prepared for the stream. In this example, a reproduction pattern for shifting the entire reproduction frame shown in FIG. 8B is used as a reproduction pattern calculation method. Many values can be used for the frame shift amount. In this example, there are four types of reproduction patterns to be shifted from the periodicity of GOP and the double speed value (4). For each reproduction pattern, the corresponding number of decoding times is extracted using the number of decoding times table.
[0060]
For the reproduction pattern calculated in this way, the optimum pattern selection process 211 (see FIG. 5) is performed as follows. When the average required decoding speed Vn is obtained for the four types of reproduction patterns in FIG. 9, reproduction pattern 2 and reproduction pattern 4 take a minimum value when Vn = 3, as shown in FIG. Here, the reproduction pattern 1 and the reproduction pattern 3, the reproduction pattern 2 and the reproduction pattern 4 are not only the value of the average required decoding speed, but also the appearance pattern of the number of decoding times of each frame is the same type of reproduction pattern. That is, the reproduction pattern 1 has a number of decoding times of 2, 6, 4, 2 and the reproduction pattern 3 has a number of decoding times of 2, 6, 4, 2 from the next of the first 4. The same applies to the reproduction pattern 2 and the reproduction pattern 4. Therefore, the reproduction pattern 1 and the reproduction pattern 3, and the reproduction pattern 2 and the reproduction pattern 4 can be considered as the same kind of reproduction patterns. Therefore, the reproduction pattern 2 with a small frame shift amount is set to the minimum value. Assuming that the decoding processing capability is an average decoding speed Vd = 3, the reproduction pattern 2 can be smoothly reproduced because Vn = Vd. However, in the reproduction pattern 1, Vn> Vd and the decoding processing capability is insufficient, so that smooth reproduction cannot be performed. In this respect, the effect of setting the playback frame by the method of the present invention becomes clear.
[0061]
FIG. 10 shows an example in which frame data in a GOP is stored in a memory or the like. In order to decode the frame a in the reproduction pattern 1 of FIG. 10, six decoding times are required, but if the frame in the GOP is stored, the decoded data of the frame b can be used. Therefore, since it is only necessary to decode four P frames after the frame b, the number of decoding can be reduced to four. The average required speed Vn is also lowered, and in the reproduction pattern 2, Vn = 2.67. Further, the reproduction method in the case of using the frame thus stored can be dealt with by the operation of the special decoding process 300 (see FIG. 6) for the frame f. That is, when recursively executing the prediction reference frame special decoding process 300, if there is a frame that has already been decoded and stored, the decoded frame is confirmed in the process 330 and the process 333 (both see FIG. 6). This is because decryption and storage are not executed.
[0062]
Another example of the process 210 (see FIG. 5) for calculating the reproduction pattern for the reproduction speed Vp will be described with reference to FIG. FIG. 11 shows an example in which an MPEG stream composed of an I frame, a P frame, and a B frame is reproduced at 4 × speed with a GOP length N = 6. Similarly to FIG. 9, there are four types of reproduction patterns in this example, and reproduction pattern 1 and reproduction pattern 3, reproduction pattern 2 and reproduction pattern 4 are the same kind of reproduction patterns in terms of the number of decoding times. Similarly in this case, the reproduction pattern 2 is selected as the optimum pattern. Thus, the present invention can be applied regardless of whether the GOP is composed of only I, P frames or I, P, B frames.
[0063]
9 to 11, the byte position table 510 of FIG. 12 is used as a method for discretely accessing frame data in the MPEG stream. The reason for using the byte position table 510 is that the size of each frame data compressed in the MPEG stream has a variable length, and information on the head position (byte position) of the GOP and the head position of the frame generally does not exist in the stream. It depends.
[0064]
The byte position table 510 may have at least information on the display order index (e), frame type (b), and total number of bytes (d). For example, consider the case of reading a P frame whose encoding order is 3 in the byte position table 510 of FIG. In FIG. 12, the total number of bytes up to the frame head position is uniquely determined in the stream. Therefore, if the frame data is read based on the total number of bytes up to the frame head position, the desired frame data can be read accurately. For example, if data is read from a position of 343419 bytes counted from the frame head position, it becomes frame data of P frame in encoding order 3.
[0065]
As described above, by using the byte position table 510, frame data can be searched very easily and accurately. In FIG. 12, the encoding order and display order values are uniquely determined in the GOP for simplicity, but are desirably determined uniquely in the entire stream.
[0066]
A method for creating the byte position table 510 will be described. The first method is a method of counting the number of bytes to be output as a stream when encoding a video, outputting a table together with the stream, and recording it on a recording medium 420 (see FIG. 2). The second method is a method in which a stream is calculated and stored in an internal memory or the like without being recorded in the recording medium 420. Even if the byte position table 510 is not created, frame data is calculated by calculating the byte position estimated from the time, bit rate, buffer occupancy, etc. when reading the stream, and searching the stream from a position slightly before that. It is also possible to find the starting position of
[0067]
In the reproduction pattern calculation method described with reference to FIGS. 9 to 11, the GOP length is constant. However, the present invention can also be applied when the GOP length is variable. In this case, a certain number of frames Nf to be referred from the present time and the maximum frame shift amount Tf are set. Next, a decoding frequency table is created for the set frame number Nf. Next, frames constituting a reproduction pattern corresponding to the reproduction speed Vp are extracted from (Tf + 1) frame start positions from the frame shift amount 0 (current time) to the maximum frame shift amount Tf. Frame extraction is performed up to the number of frames Nf. The average required decoding speed Vn for each of the (Tf + 1) playback patterns subjected to frame extraction is calculated. Then, the reproduction pattern having the minimum average necessary decoding speed Vn is selected as the optimum pattern.
[0068]
Further, as another method for selecting the optimum pattern, there is a method for selecting the one with the smallest frame shift amount that is equal to or less than the average decoding speed Vd without selecting the one with the minimum required average decoding speed Vn. Indeed, in the reproduction pattern 2 of FIG. 9, the frame shift amount is 1, and this shift amount is an error of about 33 msec in NTSC and can be almost ignored. However, the error can be recognized as the number of patterns increases. Therefore, it is effective to select a frame shift amount that is as small as possible within the decoding range. Further, since the error tolerance increases as the playback speed increases, the allowable frame shift amount can be changed according to the playback speed Vp. The method for selecting the optimum pattern is not limited to the above, and various methods can be applied.
[0069]
In the present embodiment, description has been made by taking forward high-speed playback as an example, but reverse playback and reverse high-speed playback can also be realized by a similar method based on the selection of the decoding count table and the playback pattern. is there.
[0070]
As described above, according to the present invention, a reproduction pattern in which the reproduction start frame is shifted is calculated, and an optimum pattern in which the average required decoding speed falls within the average decoding speed is selected. And smooth special reproduction can be performed.
[0071]
In the above embodiment, the frame group is selected and decoded based on the decoding processing time and the decoding processing capacity. However, the frame group may be simply selected based on the decoding processing time. . Even in that case, the optimum decoding process can be performed in the sense that the decoding process can be performed in the shortest time.
[0072]
(Embodiment 2)
In the present embodiment, a method for calculating a reproduction pattern without preparing a decoding number table and selecting an optimum pattern when the GOP length N can be regarded as constant or almost constant in the first embodiment will be described.
[0073]
With reference to FIG. 1, the basis for calculating the reproduction pattern within a finite range regardless of the reproduction speed Vp will be described. FIG. 1 shows a corresponding decoding count table 110 in an MPEG stream 100 having a constant GOP length. Based on the configuration shown in FIG. 1, consider a case where the GOP length N = 6, the second P frame in the GOP is the current frame, and playback is performed at the playback speed Vp = 4.
[0074]
According to the reproduction speed Vp = 4, reproduction is performed while selecting (thinning out) frames every four frames. As described in the first embodiment, a pattern group reproduced in such a reproduction form is defined as a reproduction pattern. Then, if three frames are reproduced from the current frame, a frame located at the same periodic position in the GOP as the current frame, that is, a P frame located second in the GOP is reproduced. From the above, the reproduction pattern has periodicity, and furthermore, the length Tp of one period in the period can be defined by the following equation (1). Note that the length Tp of one period of the reproduction pattern is a time concept indicating an example of a fixed time in the claims. However, the fixed time in the present invention is not limited to such a time concept, and it is needless to say that a predetermined time length may be set in advance.
[0075]
Tp = lcm (N, Vp) (1)
N is the GOP length, Vp is the reproduction speed, and lcm (a, b) is a function giving the least common multiple of a and b. The value of Tp / Vp is the number of frames reproduced during one cycle of the reproduction pattern. As an example, if the value of Tp / Vp is 3 frames, the time is about 100 msec in NTSC. That is, if playback is performed for 100 msec or longer, the average required number of decoding times can be regarded as approximately the same. Therefore, it is possible to calculate the reproduction pattern by evaluating only the number of times of decoding of the frames included in one period of the reproduction pattern. In addition, the decoding number table need only be generated from the GOP structure for only one period, and need not be prepared in advance by recording it on the recording medium 420 (see FIG. 2).
[0076]
In the first embodiment, the definition of the reproduction pattern described with reference to FIGS. 9, 10, and 11 is generalized. Regardless of whether the GOP is composed of only I, P frames, I, P, or B frames, and whether the frames are stored or not, the GOP length can be regarded as constant or constant. Below, in each of a plurality of reproduction patterns to be set, the number (Npat) of reproduction patterns that can be regarded as different types of reproduction patterns in the present invention can be defined by the following equation (2). Here, the criteria for discriminating the reproduction patterns of the same type and different types are based on the same type of discriminating criteria described in the first embodiment with reference to FIGS.
[0077]
Npat = gcd (N, Vp) (2)
Where N is the GOP length, Vp is the playback speed, and gcd (a, b) is a function giving the greatest common divisor of a and b. The reason why the number of reproduction patterns (Npat) becomes the greatest common divisor of N and Vp instead of Vp is to eliminate reproduction patterns that are periodically the same as described in the first embodiment with reference to FIG. This is because it can.
[0078]
FIG. 13 shows an example in which the number of reproduction patterns (Npat) is calculated with respect to the example of FIG. Since N = 6 and Vp = 4, Npat = gcd (6,4) = 2. Further, the table shows the number of playback patterns (Npat) when the playback speed (Vp) is changed. As shown in the table, Npat = gcd (6, Vp), and Npat never takes a value larger than 6. From this, it is understood that the calculation of the reproduction pattern is easy and the optimum pattern can be easily selected by comparing the number of decoding times.
[0079]
Generalizing the playback pattern selection method is as follows. First, when Npat = 1, a reproduction pattern including the current frame is selected. This is because the reproduction pattern having the smallest frame shift amount is applied because there is only one type of reproduction pattern. Second, when Npat = a (where 1 <a <N), a playback pattern including an I frame is selected. This is because, regardless of the GOP structure, the reproduction pattern including the I frame has the smallest average required number of decoding times. Here, it should be noted that a plurality of reproduction patterns including I frames do not appear. Thirdly, when Npat = N, playback is performed by moving to the I frame. In this case, since Vp = m · N (m is a natural number), there is always a reproduction pattern of only an I frame.
[0080]
This embodiment has been described by taking forward high-speed playback as an example, but it can be similarly realized by using | Vp | instead of Vp for reverse playback where Vp <0 or reverse high-speed playback. Is possible.
[0081]
As described above, according to the present embodiment, when the GOP length can be regarded as constant or almost constant, the reproduction pattern can be calculated without preparing the decoding number table, and the optimum pattern can be selected. It is possible to perform smooth special reproduction within the decoding processing capability.
[0082]
(Embodiment 3)
In this embodiment, the shift of each reproduction frame shown in FIG. 8C is further applied to the first embodiment to perform smooth special reproduction even when the decoding processing capability is further limited. An example that enables this will be described.
[0083]
FIG. 14 shows an example in which the shift of each reproduction frame shown in FIG. 8C is applied to the example of FIG. The maximum frame shift amount is 1, and the shift amount of each frame has any value among -1, 0, and +1. Three types of shifting are used: bidirectional shifting, unidirectional shifting, and no shifting. Bidirectional shift allows -1 and +1 bidirectional shift and no shift, and unidirectional shift allows only -1 forward shift or +1 backward shift in addition to no shift. No shift does not shift from the reproduction pattern of FIG. The reason for distinguishing and using the above three types of shifts is that the frame display time interval, that is, the frame display accuracy differs among the three types. In order to evaluate the frame display accuracy, a frame minimum interval dmin and a frame maximum interval dmax are defined.
[0084]
As shown in FIG. 14, (a) bidirectional shift, (b) unidirectional shift, and (c) no shift are applied to the reproduction patterns 1 and 2 obtained in FIG. (A), (b), (c) Among each shift, a shift pattern having the minimum average required decoding speed is calculated. However, the following rules apply:
[0085]
First rule
This is excluded when all frames in one cycle of the reproduction pattern are shifted in the same direction. This is because the reproduction pattern is already included in the reproduction start frame shift shown in FIG. 8B.
[0086]
Second rule
In all bidirectional shifts, if the reproduction pattern with the minimum average required decoding speed becomes one-way shift or no shift, it is not applicable.
[0087]
Third rule
In the unidirectional shift, a reproduction pattern having the minimum average necessary decoding speed is selected from the forward and backward shifts. However, if the reproduction pattern having the minimum average necessary decoding speed is not shifted, it is not applicable.
[0088]
Fourth rule
If a playback pattern that has already appeared as a playback pattern with the minimum required average decoding speed becomes a playback pattern with the minimum again, it is not applicable.
[0089]
When the above rules are applied, a table of average necessary decoding speed Vn, minimum frame interval dmin, and maximum frame interval dmax is obtained as shown in FIG. Here, the minimum frame interval dmin refers to a frame separation interval that takes a minimum value among the separation intervals of adjacent display frames in which the thinning interval (separation interval) varies due to the shift. On the contrary, the maximum frame interval dmax is a frame separation interval that takes a maximum value. The display fluctuation width W (= dmax−dmin) defined based on these maximum and minimum intervals affects the display accuracy. The display accuracy decreases as the display fluctuation width W increases.
[0090]
FIG. 15 shows a table for evaluating the results obtained in FIG. As shown in FIG. 15, the optimum pattern is selected from the evaluation of the decoding processing capability centered on the average required decoding speed Vd and the evaluation of the display accuracy centered on the display fluctuation width W (= dmax−dmin). Specifically, the reproduction pattern having the smallest display fluctuation width is selected because the average necessary decoding speed Vn is equal to or lower than the average decoding speed Vd representing the decoding processing capability.
[0091]
In addition, the minimum number of decoding times and the maximum number of decoding times can be used as an evaluation of the decoding processing capability. As the evaluation of display accuracy, the shift amount of the reproduction start frame used in the first embodiment can also be used. However, note that the playback start frame may be shifted again as in playback pattern 1 (a).
[0092]
In the example of FIG. 14, the reason why the maximum frame shift amount is set to 1 is that 1 is often sufficient in practice. If it is desired to further reduce the average necessary decoding speed, a value of 2 or more can be similarly applied if necessary. In this case, more than three types of classification based on shift amounts can be taken. However, of course, a shift that changes the temporal order of consecutive frames is not performed.
[0093]
In the above example, the GOP is composed of only the I frame and the P frame. However, even when the GOP is composed of the I frame, the P frame, and the B frame, only the decoding number table is different. The same can be applied. In addition, although the case where the frame once decoded is not stored is shown, the case where the decoded frame is stored is also applicable because the decoding number table is different.
[0094]
As described above, according to the present embodiment, smooth special reproduction can be performed even when the decoding processing capability is further limited by applying the shift of each reproduction frame to the first embodiment. .
[0095]
(Embodiment 4)
In this embodiment, an apparatus for realizing Embodiment 1 will be described.
[0096]
FIG. 16 is a diagram showing a video playback apparatus of the present invention. In the video reproduction apparatus 400 of FIG. 16, 410 is a decoder for decoding a stream that is an encoded video, 411 is a CPU for performing decoding processing, 412 is a memory for recording the stream and decoded frames, 413 is a ROM for storing a program for operating the CPU 411 in an initial state, 421 is a disk controller for driving a disk, 422 is an optical disk drive in which a stream is recorded, 431 is a disk controller 421 and a decoder 410. 432 is a display device for displaying video, such as a monitor.
[0097]
The operation of the video reproduction apparatus configured as described above will be described below. First, before starting the video reproduction apparatus 400, a decoding program according to the present invention is recorded in the ROM 413. By starting the apparatus, a program is loaded from the ROM 413 to the CPU 411, and the CPU 411 can perform a stream decoding process. Decoding processing in the video playback device 400 (video playback means 450 (see FIG. 2)) is realized by this program. Prior to reproduction, the optical disc on which the stream is recorded is loaded into the optical disc drive 422.
[0098]
The playback operation of the video playback device 400 will be described. When a playback command from the user is given to the control processor 431 via the bus 433, the control processor 431 drives the disk controller 421, reads a certain amount of a stream starting from a specified time from the optical disk drive 422, and stores it in the memory 412. Forward. This fixed amount can be set to an appropriate length such as a unit of several GOPs or a unit of several seconds so that no trouble occurs in the reproduction operation. At the same time, a decryption instruction for the CPU is written in the interrupt area of the memory 412. The CPU 411 monitors the interrupt area of the memory 412, and when a playback command is given, reads a stream from the memory 412, performs a decoding process, and writes the decoded frame data to the memory 412. At that time, the CPU 411 extracts a plurality of frame groups to be reproduced within a predetermined time from the current time code position, and then calculates the time required to decode the extracted plurality of frame groups, Based on the decoding processing time, the frame data is decoded by selecting and decoding an arbitrary frame group from the plurality of frame groups. That is, the CPU 411 performs the function of the timer and the function of the decoder in the claims. Further, the CPU 411 exhibits means for selecting a frame arrangement pattern and means for decoding video.
[0099]
When the frame data is written into the memory 412, the control processor 431 sends it to the display device 432 to display the video.
[0100]
A method of storing frames in the video playback device 400 (video playback means 450) will be described with reference to FIG. FIG. 17 shows a decoded frame table 500 (FIG. 17A) and a memory 412 (FIG. 17B) managed by a program stored in the CPU 411. The program has a decoded data presence flag indicating whether or not decoded frame data exists on the memory 412 and a table of corresponding frame indexes (serial numbers uniquely determined in the sequence). Keep up to date. This table can be easily managed by updating the flag when the frame is decoded and stored in the memory 412. The memory 412 stores frame data corresponding to the index. The control processor 431 in FIG. 16 can confirm whether or not the decoded frame data exists on the memory by checking the index on the memory 412. However, the index on the memory 412 is not limited to the arrangement in FIG. 17B, and may be stored in the memory in a format that is easy to search, such as the list in FIG.
[0101]
In the above description of the video reproduction device 400, the description has been made assuming an optical disk drive, but it goes without saying that the present invention can be similarly realized if it is a medium for recording information, such as a hard disk drive or a memory. In addition, although an example in which a CPU and a memory are used as a decoder that performs decoding processing faster than real time has been shown, the present invention is not limited to this as long as decoding processing can be performed faster than real time. As described above, according to the present embodiment, the first embodiment can be realized as an apparatus.
[0102]
(Embodiment 5)
In the present embodiment, in the video encoding method, an encoding method for reducing the average necessary decoding speed Vn by limiting the prediction direction at the time of encoding will be described.
[0103]
FIG. 18 shows an encoding method for limiting the prediction direction. FIG. 18A shows a normal encoding method with a GOP length N = 15. FIGS. 18B and 18C show a method of limiting the prediction direction for bidirectional prediction of B frames. FIG. 18B shows a method in which the first two B frames of the GOP use only backward prediction, and other B frames use only forward prediction. FIG. 18C shows a method in which the first two B frames of the GOP use only backward prediction, the other B frames use only forward prediction, and the rear frame uses only backward prediction. . In both FIG. 18 (b) and FIG. 18 (c), the average required decoding speed Vn is reduced as compared with (a). This means that the decoding process can be performed at higher speed when specially reproducing the encoded stream as shown in FIGS. 18B and 18C. Here, the prediction direction limitation for the first two B frames of a GOP can be generally performed by a closed GOP. The prediction direction of other frames can be limited by not performing prediction processing in that direction for the entire frame at the time of encoding or by limiting the prediction modes that can be set for each macroblock.
[0104]
If information that has been encoded with limited prediction is added to the byte position table 510 of FIG. 12 for the video encoded in the present embodiment, decoding of a prediction reference frame that was not used for prediction during special playback is performed. Is not done. In the example described with reference to FIG. 11, the stream according to this embodiment can be used. As described above, according to the present embodiment, it is possible to provide a video encoding method that reduces the average necessary decoding speed Vn by limiting the prediction direction at the time of encoding, and has limited decoding processing capability. It is possible to generate a stream that can perform smooth special reproduction even with the reproduction means.
[0105]
【The invention's effect】
As is apparent from the above description, according to the present invention, a reproduction pattern obtained by shifting a reproduction frame is calculated, and an optimum pattern in which the average necessary decoding speed falls within the average decoding speed is selected, so that decoding such as high-speed reproduction is performed. During special playback with a heavy load, video can be played smoothly.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining the basis for calculating a reproduction pattern within a finite range according to Embodiment 2 of the present invention;
FIG. 2 is a configuration diagram for realizing a video reproduction method according to Embodiment 1 of the present invention;
FIG. 3 is a flowchart showing decoding processing during reproduction in the first embodiment.
FIG. 4 is a flowchart showing a decoding process in a normal playback mode according to the first embodiment.
FIG. 5 is a flowchart showing a special reproduction mode decoding process according to the first embodiment;
FIG. 6 is a flowchart showing special frame decoding processing according to the first embodiment;
FIG. 7 is a diagram for explaining the relationship between the number of decoding times and the decoding processing capacity in the first embodiment.
FIG. 8 is a diagram showing frame shift in the first embodiment and the third embodiment.
FIG. 9 is a view showing an example of reproduction pattern calculation in the first embodiment.
FIG. 10 is a diagram showing an example of calculation of a reproduction pattern in the first embodiment.
FIG. 11 is a diagram showing an example of reproduction pattern calculation in the first embodiment.
FIG. 12 is a diagram showing an example of a byte position table in the first embodiment.
FIG. 13 is a diagram showing the number of reproduction patterns in the second embodiment of the present invention.
FIG. 14 is a diagram illustrating an example of calculation of a reproduction pattern according to Embodiment 3 of the present invention.
FIG. 15 is a diagram for explaining selection of an optimum pattern in the third embodiment.
FIG. 16 is a diagram showing a configuration of a video reproduction device according to Embodiment 4 of the present invention.
FIG. 17 is a diagram showing a method for storing decoded frames in the fourth embodiment.
FIG. 18 shows an encoding method with limited prediction directions in Embodiment 5 of the present invention.
FIG. 19 is a configuration diagram of each frame in a video encoding method based on MPEG.
FIG. 20 is a frame configuration diagram in a conventional example in the case of encoding an I frame and a P frame.
FIG. 21 is an explanatory diagram of a conventional example in the case of special reproduction, particularly high-speed reproduction, of an MPEG stream to be encoded / decoded.
[Explanation of symbols]
100 MPEG stream 101 I frame
102 P frame 110 Decoding times table
400 Video playback device 410 Decoder
411 CPU 412 Memory (RAM)
413 ROM 414 bus
415 CPU core 416 Program cache
417 Data cache 418 Program bus
419 Data bus 420 Recording medium
421 Disk controller
422 Optical disk drive 431 Control processor
432 Display device 433 Bus
440 Playback operation input means 450 Video playback means
500 Decoding frame table 510 Byte position table
520 Decoding times table

Claims (19)

符号化された映像信号を記録した記録媒体から映像信号を再生したうえで復号器で復号する映像再生方法であって、
映像信号を復号する処理に際して、現在のタイムコード位置から一定時間内に再生するm枚(mは2以上の整数)のフレームから、n枚(nは1以上の整数、n<m)を間引き抽出して構成されるフレームの集合(以下、フレーム群と称す)を複数パターン設定し、
設定した前記複数のフレーム群それぞれの復号処理時間を算出し、
前記複数のフレーム群から、算出した前記復号処理時間が最も短いフレーム群を選択して前記復号器で復号する、
ことを特徴とする映像再生方法。
A video reproduction method for reproducing a video signal from a recording medium on which an encoded video signal is recorded and then decoding the decoded video signal by a decoder,
When decoding a video signal , n frames (n is an integer of 1 or more, n <m) are thinned out from m frames (m is an integer of 2 or more) reproduced within a predetermined time from the current time code position. Set multiple patterns for a set of extracted frames (hereinafter referred to as a frame group)
Set and calculates the plurality of frame groups each decoding time,
Selecting the frame group with the shortest decoding processing time calculated from the plurality of frame groups , and decoding with the decoder;
A video reproduction method characterized by the above.
符号化された映像信号を記録した記録媒体から映像信号を再生したうえで復号器で復号する映像再生方法であって、
映像信号を復号する処理に際して、現在のタイムコード位置から一定時間内に再生するm枚(mは2以上の整数)のフレームから、n枚(nは1以上の整数、n<m)を間引き抽出して構成されるフレームの集合(以下、フレーム群と称す)を複数パターン設定し、
設定した前記複数のフレーム群それぞれの復号処理時間を算出し、
記複数のフレーム群から、算出した前記復号処理時間が、前記復号器による単位時間内での復号処理が可能となる値を示すフレーム群を選択して前記復号器で復号する、
ことを特徴とする映像再生方法。
A video reproduction method for reproducing a video signal from a recording medium on which an encoded video signal is recorded and then decoding the decoded video signal by a decoder,
When decoding a video signal, n frames (n is an integer of 1 or more, n <m) are thinned out from m frames (m is an integer of 2 or more) reproduced within a predetermined time from the current time code position. Set multiple patterns for a set of extracted frames (hereinafter referred to as a frame group)
Calculating a decoding processing time for each of the plurality of set frame groups;
Before Symbol plurality of frame groups, calculated the decoding processing time is decrypted with the decoder by selecting the frame group showing the decoding processing can be a value within a unit time by the decoder,
A video reproduction method characterized by the above .
算出した前記復号処理時間が、前記復号器による単位時間内での復号処理が可能となる値を示す一つないし複数の前記フレーム群をさらに選択し、
選択したフレーム群の中から、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列に対して最も時間的誤差の小さいフレーム群を選択して前記復号器で復号する、
ことを特徴とする請求項に記載の映像再生方法。
The calculated decoding processing time further selects one or a plurality of the frame groups indicating values that enable decoding processing within a unit time by the decoder,
From the selected frame group, select a frame group having the smallest temporal error with respect to the playback frame sequence set based on the current time code and the current playback speed, and decode by the decoder.
The video reproduction method according to claim 2 , wherein:
復号処理時間の算出を実施する前記複数のフレーム群を、現在の
タイムコードと現在の再生速度とに基いて想定される再生フレーム列を基本構成としさらにこの再生フレーム列内の任意のフレームを時間的にシフトしたフレームに置き換えることで構成する、
ことを特徴とする請求項ないしのいずれかに記載の映像再生方法。
Said plurality of frame groups to implement the calculation of the decryption processing time, the current time code and the basic structure of the reproduction frame sequence is assumed on the basis of the current playback speed, further arbitrary frame in the playback frame sequence Compose by replacing with a frame shifted in time,
Image reproducing method according to any one of claims 1 to 3, characterized in that.
前記映像信号は、フレーム間予測符号化された映像信号であり、
復号処理を、復号に必要な予測参照フレームを順に復号しつつ実施する、
ことを特徴とする請求項1ないしのいずれかに記載の映像再生方法。
The video signal is an inter-frame predictive encoded video signal,
The decoding process is performed while sequentially decoding prediction reference frames necessary for decoding.
Image reproducing method according to any one of claims 1 to 4, characterized in that.
前記復号処理時間を、順に復号する前記予測参照フレームそれぞれの復号処理時間を加算することで算出する、
ことを特徴とする請求項に記載の映像再生方法。
The decoding processing time is calculated by adding the decoding processing times of the prediction reference frames to be sequentially decoded.
The video reproduction method according to claim 5 , wherein:
前記複数のフレーム群を、現在のタイムコード位置から再生を開始するタイムコード位置への時間的なシフト量を変化させることで設定する、
ことを特徴とする請求項またはに記載の映像再生方法。
The plurality of frames are set by changing a temporal shift amount from a current time code position to a time code position at which playback is started.
The video reproduction method according to claim 5 or 6 , characterized in that
前記一定時間を、映像再生時の再生速度比(=再生速度/通常再生速度)と、連続する複数のフレームの集合体であるGOPの長さとの最小公倍数に基づいて算出する、
ことを特徴とする請求項ないしのいずれかに記載の映像再生方法。
The predetermined time is calculated based on a least common multiple of a playback speed ratio (= playback speed / normal playback speed) at the time of video playback and a GOP length which is an aggregate of a plurality of consecutive frames.
Image reproducing method according to any one of claims 5 to 7, characterized in that.
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生方法であって、
各フレームの復号に要する復号回数を示す復号回数表を再生前に作成したうえで、
前記各フレームによって構成される複数のフレーム配置パターンを設定し、
前記復号器が1フレーム再生時間内に復号可能な平均フレーム数Vd前記復号回数表に基いて算出された前記フレーム配置パターン毎の平均復号回数Vnとを比較して、前記Vnが前記Vd以下であることにより復号が円滑に行えるフレーム配置パターンを選択し、
選択したフレーム配置パターンに基いて映像を復号して再生する、
ことを特徴とする映像再生方法。
A video reproduction method for reproducing and decoding a video signal from a recording medium on which an encoded video signal is recorded,
After creating a decoding count table showing the number of decoding required to decode each frame before playback,
Set a plurality of frame arrangement patterns constituted by the frames,
Compared average frame number Vd decodable in the decoder frame playback time and an average number of times of decoding Vn for each of the frame arrangement pattern calculated based on the number of times of decoding tables, the Vn is the Vd Select a frame layout pattern that allows smooth decoding by:
Decode and play the video based on the selected frame layout pattern,
A video reproduction method characterized by the above.
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生装置であって、
映像信号を復号する復号器と、
現在のタイムコード位置から一定時間内に再生するm枚(mは2以上の整数)のフレームから、n枚(nは1以上の整数、n<m)を間引き抽出して構成されるフレームの集合(以下、フレーム群と称す)を複数パターン設定したうえで、設定した複数のフレーム群を前記復号器で復号処理するのに要する時間をそれぞれ算出する計時器と、
を備え、
前記復号器は、前記計時器で算出した前記復号処理時間に基いて、前記複数のフレーム群から、算出した前記復号処理時間が最も短いフレーム群を選択して復号するものである、
ことを特徴とする映像再生装置。
A video reproduction device for reproducing and decoding a video signal from a recording medium on which an encoded video signal is recorded,
A decoder for decoding the video signal;
A frame constructed by thinning out n frames (n is an integer of 1 or more, n <m) from m frames (m is an integer of 2 or more) reproduced within a predetermined time from the current time code position. A timer for setting a plurality of patterns of a set (hereinafter referred to as a frame group) and calculating time required for decoding the set plurality of frame groups by the decoder;
With
The decoder selects and decodes a frame group having the shortest decoding processing time calculated from the plurality of frame groups based on the decoding processing time calculated by the timer.
A video reproducing apparatus characterized by that.
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生装置であって、
映像信号を復号する復号器と、
現在のタイムコード位置から一定時間内に再生するm枚(mは2以上の整数)のフレームから、n枚(nは1以上の整数、n<m)を間引き抽出して構成されるフレームの集合(以下、フレーム群と称す)を複数パターン設定したうえで、設定した複数のフレーム群を前記復号器で復号処理するのに要する時間をそれぞれ算出する計時器と、
を備え、
設定した前記複数のフレーム群それぞれの復号処理時間を算出し、
前記復号器は、前記計時器で算出した前記復号処理時間と当該復号器の復号処理能力とに基づいて前記複数のフレーム群から、算出した前記復号処理時間が、前記復号器による単位時間内での復号処理が可能となる値を示すフレーム群を選択して復号するものである、
ことを特徴とする映像再生装置。
A video reproduction device for reproducing and decoding a video signal from a recording medium on which an encoded video signal is recorded,
A decoder for decoding the video signal;
A frame constructed by thinning out n frames (n is an integer of 1 or more, n <m) from m frames (m is an integer of 2 or more) reproduced within a predetermined time from the current time code position. A timer for setting a plurality of patterns of a set (hereinafter referred to as a frame group) and calculating time required for decoding the set plurality of frame groups by the decoder;
With
Calculating a decoding processing time for each of the plurality of set frame groups;
The decoder, based on the decoding processing time calculated by the timer and the decoding processing capability of the decoder, from the plurality of frame groups, the calculated decoding processing time within a unit time by the decoder. The frame group indicating a value that enables the decoding process is selected and decoded.
A video reproducing apparatus characterized by that.
前記復号器は、算出した前記復号処理時間が、当該復号器による単位時間内での復号処理が可能となる値を示す一つないし複数の前記フレーム群をさらに選択し、選択したフレーム群の中から、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列に対して最も時間的誤差の小さいフレーム群を選択して復号するものである、
ことを特徴とする請求項10に記載の映像再生装置。
The decoder further selects one or a plurality of the frame groups indicating the values at which the calculated decoding processing time can be decoded within the unit time by the decoder. From this, a frame group with the smallest temporal error is selected and decoded with respect to a playback frame sequence set based on the current time code and the current playback speed.
The video reproduction apparatus according to claim 10 .
前記復号器は、復号処理時間の算出を実施する前記複数のフレーム群を、現在のタイムコードと現在の再生速度とに基いて想定される再生フレーム列を基本構成としさらにこの再生フレーム列内の任意のフレームを時間的にシフトしたフレームに置き換えることで構成するものである、
ことを特徴とする請求項10ないし12のいずれかに記載の映像再生装置。
The decoder has, as a basic configuration, a playback frame sequence that is assumed based on a current time code and a current playback speed, and further includes a plurality of frame groups for calculating a decoding processing time. It is composed by replacing an arbitrary frame with a temporally shifted frame.
The preceding claims 10, characterized in that the video reproducing apparatus according to any one 12 of the.
前記映像信号はフレーム間予測符号化された映像信号であり、
前記復号器は、復号に必要な予測参照フレームを順に復号するものである、
ことを特徴とする請求項10ないし13のいずれかに記載の映像再生装置。
The video signal is an inter-frame predictive encoded video signal,
The decoder sequentially decodes prediction reference frames necessary for decoding.
Video reproducing apparatus according to any one of claims 10, characterized in that 13.
前記復号器は、前記復号処理時間を、順に復号する前記予測参照フレームそれぞれの復号処理時間を加算することで算出するものである、
ことを特徴とする請求項14に記載の映像再生装置。
The decoder calculates the decoding processing time by adding the decoding processing times of the prediction reference frames to be sequentially decoded.
15. The video reproduction apparatus according to claim 14 , wherein
前記復号器は、前記複数のフレーム群を、現在のタイムコード位置から再生を開始するタイムコード位置への時間的なシフト量を変化させることで設定するものである、
ことを特徴とする請求項14または15に記載の映像再生装置。
The decoder sets the plurality of frames by changing a temporal shift amount from a current time code position to a time code position at which reproduction is started.
16. The video reproduction apparatus according to claim 14 , wherein the video reproduction apparatus is characterized in that
前記復号器は、前記一定時間を、映像再生時の再生速度比(=再生速度/通常再生速度)と、連続する複数のフレームの集合体であるGOPの長さ(フレーム数)との最小公倍数に基づいて算出するものである、
ことを特徴とする請求項14ないし16のいずれかに記載の映像再生装置。
The decoder uses the least common multiple of the playback speed ratio (= playback speed / normal playback speed) during video playback and the length (number of frames) of a GOP, which is an aggregate of a plurality of consecutive frames, for the predetermined time. Is calculated based on
Video reproducing apparatus according to any one of claims 14 to 16, characterized in that.
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生装置であって、
各フレームの復号に要する復号回数を示す復号回数表を再生前に作成したうえで、前記各フレームによって構成される複数のフレーム配置パターンを設定し、前記復号器が1フレーム再生時間内に復号可能な平均フレーム数Vd前記復号回数表に基いて算出された前記フレーム配置パターン毎の平均復号回数Vnとを比較して、前記Vnが前記Vd以下であることにより復号が円滑に行えるフレーム配置パターンを選択する手段と、
選択したフレーム配置パターンに基いて映像を復号する手段と、
を備えることを特徴とする映像再生装置。
A video reproduction device for reproducing and decoding a video signal from a recording medium on which an encoded video signal is recorded,
A decoding number table indicating the number of decoding times required for decoding each frame is created before reproduction, and a plurality of frame arrangement patterns configured by the respective frames are set , so that the decoder can decode within one frame reproduction time. and Do average frame number Vd, by comparing the average number of times of decoding Vn for each of the frame arrangement pattern calculated based on the number of times of decoding table frame arrangement which decoding can be performed smoothly by the Vn is less than the Vd Means for selecting a pattern;
Means for decoding video based on the selected frame placement pattern;
A video playback apparatus comprising:
請求項からのいずれかに記載の映像再生方法によって復号される映像信号を予測符号化する映像符号化方法であって、
双方向予測符号化フレームの予測方向を、一方向に限定した状態で符号化を行う、
ことを特徴とする映像符号化方法。
A video encoding method for predictively encoding a video signal decoded by the video reproduction method according to any one of claims 5 to 8 ,
Encoding in a state where the prediction direction of the bidirectional predictive encoded frame is limited to one direction,
And a video encoding method.
JP2003140668A 2003-05-19 2003-05-19 Video playback method, video playback device, and video encoding method Expired - Fee Related JP3869389B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003140668A JP3869389B2 (en) 2003-05-19 2003-05-19 Video playback method, video playback device, and video encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003140668A JP3869389B2 (en) 2003-05-19 2003-05-19 Video playback method, video playback device, and video encoding method

Publications (2)

Publication Number Publication Date
JP2004343648A JP2004343648A (en) 2004-12-02
JP3869389B2 true JP3869389B2 (en) 2007-01-17

Family

ID=33529338

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003140668A Expired - Fee Related JP3869389B2 (en) 2003-05-19 2003-05-19 Video playback method, video playback device, and video encoding method

Country Status (1)

Country Link
JP (1) JP3869389B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007300371A (en) * 2006-04-28 2007-11-15 Toshiba Corp Recorder-reproducer, recording and reproducing method, and recording and reproducing program

Also Published As

Publication number Publication date
JP2004343648A (en) 2004-12-02

Similar Documents

Publication Publication Date Title
US8437408B2 (en) Decoding with reference image stored in image memory for random playback
US20080247729A1 (en) Method and apparatus for normal reverse playback
WO2006030694A1 (en) Image encoding apparatus, image decoding apparatus, image encoding program and image decoding program
JPH08214260A (en) Specific reproducing method and device for encoded data
JPWO2005088964A1 (en) Recording / playback editing device
US6707984B2 (en) Changing a playback speed for video presentation recorded in a modified film format
KR100765787B1 (en) Method for reproducing compressed and encoded video data stream and apparatus thereof
JP4827669B2 (en) Movie playback method and apparatus
EP2154900A1 (en) Dynamic image decoding method, dynamic image decoding device, and electronic apparatus
US7433288B2 (en) Recording device and method, recording medium and program
JP3869389B2 (en) Video playback method, video playback device, and video encoding method
JP2004350152A (en) Video reproducing apparatus and video reproducing method
JP2005525710A (en) Variation in playback speed for presentation of video recorded in field configuration format
JP3870930B2 (en) Video playback method and apparatus
JP2003324690A (en) Video record playback device
JP3344607B2 (en) Optical disc, reproducing apparatus and reproducing method
JP2007129489A (en) Picture reproducer and picture reproduction method
JP4591549B2 (en) Reproduction processing apparatus, reproduction processing method, and program
JP3897760B2 (en) Video playback device
JP4399744B2 (en) Program, information processing apparatus, information processing method, and recording medium
JP2004048206A (en) Video reproducing method and video reproducing apparatus
US20050002645A1 (en) Reproducing device and method, recording medium and program
US8149679B2 (en) Recording/reproducing device and method, recording medium, and program
JP3203169B2 (en) MPEG video decoder
JP2006319645A (en) Picture reproducer, method, program, and storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060711

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060906

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061012

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101020

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111020

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121020

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131020

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees