JP2004343648A - Video reproducing method, video reproducing device, and video encoding method - Google Patents

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

Info

Publication number
JP2004343648A
JP2004343648A JP2003140668A JP2003140668A JP2004343648A JP 2004343648 A JP2004343648 A JP 2004343648A JP 2003140668 A JP2003140668 A JP 2003140668A JP 2003140668 A JP2003140668 A JP 2003140668A JP 2004343648 A JP2004343648 A JP 2004343648A
Authority
JP
Japan
Prior art keywords
frame
decoding
video
reproduction
decoder
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.)
Granted
Application number
JP2003140668A
Other languages
Japanese (ja)
Other versions
JP3869389B2 (en
Inventor
Toshihiro Tanaka
俊啓 田中
Hiroshi Saito
浩 齋藤
Hideaki Mita
英明 三田
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 Holdings Corp
Original Assignee
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
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

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for more smoothly reproducing a video in high speed reproduction of a video signal subjected to inter-frame encoding. <P>SOLUTION: In the reproducing method for using a CPU capable of carrying out decoding processing higher than the real time to reproduce an MPEG stream 100 comprising in-frame coded frames 101 and inter-frame prediction coded frames 102 at a high speed, a table 110 denoting the number of times required for decoding each frame is prepared, the CPU compares the number of decodable frames in average within one frame time with the table 110 at reproduction, and an optimum frame pattern whereby decoding can smoothly be carried out is selected to perform high speed reproduction. <P>COPYRIGHT: (C)2005,JPO&NCIPI

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]
TECHNICAL FIELD OF THE INVENTION
The present invention provides a video playback device that reads out and plays back an inter-frame predictive encoded video from a recording medium such as an optical disk, and performs high-speed playback that displays video more smoothly when decoding at a higher speed than real time is possible. 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]
Devices using digital recording and reproduction of video are increasing irrespective of whether they are for home use or business use. Realizing long-time recording and high image quality with a limited recording medium capacity is a contradictory element, but a series of MPEG standards (Moving Pictures coding Experts Group: ISO / IEC11172) based on inter-frame coding. 2, ISO / IEC13818-2, ISO / IEC14496-2) have high cost performance in terms of compression ratio and image quality, and are used in many applications such as digital TV broadcasting, DVD-Video, and mobile phones.
[0003]
In video coding based on MPEG, each frame is coded with a configuration as shown in FIG. The coding type includes three types of an intra-coded frame (hereinafter, referred to as an I frame), an inter-frame coded frame (hereinafter, referred to as a P frame), and a frame interpolation coded frame (hereinafter, referred to as a B frame). There are types. An 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. A B frame is a frame that can be decoded using data of two I or P frames that are temporally adjacent to each other and data of the frame.
[0004]
The B frame is decoded with reference to a frame located backward in display order at the time of decoding. Therefore, when encoding a B frame, the encoding is performed with the order changed as shown in FIG. In many cases, the data to be encoded is output as a bit stream (hereinafter, referred to as a stream) as a sequence of GOPs (Group Of Pictures) starting from an I frame.
[0005]
The I frame and the P frame are decoded without reference to a frame located rearward 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, a frame is read from the stream in the order of encoding, and then decoded in the order of encoding. Video output is performed in the order of display.
[0006]
When trick-playing, especially high-speed playing, an MPEG stream encoded / decoded as described above, great difficulty is involved. For example, as shown in FIG. 21A, consider a case where a stream in which I, P, and B frames are mixed is read and quadruple-speed playback is performed. 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 four frames of frames 2, 6, 10, and 14 are reproduced, the speed becomes quadruple. However, as shown in FIG. 21B, decoding of each frame requires 1, 4, 5, and 5 decoding times including the prediction reference frame. This means that in one frame time (33 msec for NTSC and 40 msec for PAL), smooth reproduction cannot be performed unless (1 + 4 + 5 + 5) /4=3.75 frames are decoded on average.
[0007]
On the other hand, a general-purpose MPEG decoder such as an LSI generally operates in real time in conjunction with a clock for normal reproduction (1 × speed reproduction), and has a configuration in which one frame is decoded in one frame time. For this reason, the fast-forward playback function of DVD-Video and the like merely displays and updates an I frame like frame advance. From the above, it can be seen that it is difficult to smoothly reproduce a video encoded by MPEG at high speed.
[0008]
Various patents have been filed as a conventional technique for performing smooth high-speed reproduction on interframe predictive encoded video such as MPEG. First, there are Japanese Patent No. 3301274 and Japanese Patent No. 3203169 as methods for preventing a buffer failure during decoding caused by continuously reproducing frames having a large data amount such as an I frame. In the former, when there is no data, a freeze screen is output ignoring PTS (display time stamp). The latter is to skip frames according to the occupation amount of the buffer. However, any of them is intended to prevent the buffer of the decoder from being broken, and cannot perform smooth display when the MPEG stream is reproduced at high speed.
[0009]
Next, Japanese Patent Application Laid-Open No. 08-186794 discloses a high-speed reproduction method considering the reading time. In this method, a high-speed reproduction is performed by calculating a possible double-speed value during high-speed reproduction from the reading time of the optical disk. However, this method is not a method considering the decoding processing time. The decoding processing time is the most important factor when reproducing an MPEG stream at high speed. Therefore, with 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 Application Laid-Open No. 2001-54066. The former saves decoding processing time without reading unnecessary B frames and the like. In the latter case, the decoding processing speed is changed, and the frame rate is changed and displayed in a display environment such as a PC. Both attempt to reduce the decoding processing time during high-speed playback, but do not realize smooth high-speed playback at varying playback speeds, taking into account the processing capability of the decoder and the decoding processing time for each frame. Absent.
[0011]
[Patent Document 1]
Patent No. 3301274 (Claim 1)
[Patent Document 2]
Patent No. 3203169 (Claim 1)
[Patent Document 3]
JP 08-186794 A (Table 3)
[Patent Document 4]
Japanese Patent No. 3025447 (Claim 1)
[Patent Document 5]
JP-A-2001-54066 (abstract)
[0012]
[Problems to be solved by the invention]
Constructing a decoder based on a processor represented by a CPU has been rapidly advancing in recent years, and it is becoming possible to increase the decoding speed of a decoder configured in this way more than in real time. However, in the case of performing special reproduction, particularly high-speed reproduction, of a medium on which a prediction-encoded video typified by MPEG is recorded, a technique for performing smoother special reproduction using the above-described high-speed decoding technique has been proposed. Did not.
[0013]
The present invention calculates a decoding processing speed and a decoding processing time of a CPU when a decoding operation faster than real time is possible in a special reproduction of an inter-frame predictive-encoded video signal, and performs decoding smoothly. It is an object of the present invention to obtain a method of selecting an optimal frame pattern that can be reproduced and performing high-speed reproduction.
[0014]
[Means for Solving the Problems]
In order to achieve the above object, according to the present invention, in a reproducing method for performing high-speed reproduction using a CPU capable of performing decoding processing faster than real time, a decoding number table indicating the number of decoding times required for decoding each frame is created before reproduction. At the time of reproduction, the CPU compares the number of frames that can be decoded on average within one frame time with the decoding count table, selects an optimal frame pattern that enables smooth decoding, and performs high-speed reproduction. It is possible to calculate the decoding processing speed and the decoding processing time of the CPU, select the optimal frame pattern that enables smooth decoding, and perform high-speed reproduction.
[0015]
More specifically, the present invention relates to a video reproducing method for reproducing a video signal from a recording medium on which an encoded video signal is recorded, and then decoding the video signal with a decoder. A plurality of sets of one or more frames to be reproduced within a predetermined time from a code position (hereinafter, referred to as a frame group) are extracted, a decoding processing time of each of the extracted frame groups is calculated, and the calculated decoding processing time is calculated. , An arbitrary frame group is selected from the plurality of frame groups and decoded by the decoder.
[0016]
This makes it possible to select and decode an optimal frame 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 calculated decoding processing time. Then, the decoding processing time can be shortened. 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]
In addition, it is preferable that the frame group indicating a value at which the calculated decoding processing time indicates a value at which the decoding process can be performed within a unit time by the decoder be selected and decoded by the decoder. 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 more of the frame groups indicating a value that allows decoding processing within a unit time by the decoder;
From the selected frame group, select and decode a frame group having the smallest temporal error with respect to a playback frame sequence set based on the current time code and the current playback speed;
It is preferable to carry out the processing described above, so that the decoding processing can be optimized without impairing the smoothness of the motion of the video.
[0021]
Note that the plurality of different frame groups for which the calculation of the decoding processing time is performed have a basic configuration of a playback frame sequence set based on the current time code and the current playback speed. It is preferable to replace the frame with a temporally shifted frame, so that the decoding processing time can be reduced while maintaining the smooth motion of the video.
[0022]
Note that the video signal is a video signal that has been subjected to inter-frame prediction coding, and it is preferable that the process of decoding the video signal is performed while sequentially decoding predicted reference frames required for decoding. Then, the present invention can be similarly implemented in a configuration for decoding a video signal subjected to inter-frame prediction encoding. In this case, it is preferable that the decoding processing time is calculated by adding the decoding processing times of the prediction reference frames to be sequentially decoded. This makes it possible to calculate the decoding processing time with high accuracy even for a video signal that has been subjected to inter-frame predictive coding.
[0023]
Preferably, the plurality of frame groups are set by changing a temporal shift amount from a current time code position to a time code position at which reproduction is started. Then, the decoding processing time can be reduced while maintaining the smoothness of the motion of the video.
[0024]
Note that the certain time is determined based on the least common multiple of a reproduction speed ratio (= reproduction speed / normal reproduction speed) at the time of video reproduction and the length (number of frames) of a GOP which is an aggregate of a plurality of continuous frames. Preferably, it is calculated. Then, it is 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 prepares a decoding count table indicating the number of decodings required for decoding each frame before reproduction, and then decodes the decoding average table within one frame reproduction time. It can also be realized by comparing the number of possible frames with the decoding count table, selecting a frame arrangement pattern that enables smooth decoding, and decoding and reproducing the video based on the selected frame arrangement pattern.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to FIGS. 1 to 21.
[0027]
(Embodiment 1)
FIG. 2 is a block diagram showing a configuration for implementing the video reproducing method according to the present invention. In FIG. 2, reference numeral 420 denotes a recording medium on which a video is recorded, 440 denotes a reproduction operation input unit for a user to perform a reproduction operation, 450 denotes a video reproduction unit for performing video reproduction according to the present invention, and 432 denotes a display device. is there.
[0028]
In FIG. 2, the user operates the reproduction operation input unit 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 have any configuration capable of changing the information indicating the playback speed Vp and transmitting the information to the video playback means 450, such as buttons for playback / stop / fast-forward and a jog dial used for an editing / playback machine. .
[0029]
The video reproducing means 450 reads the video recorded on the recording medium 420 and reproduces the video based on the start time code position and the reproduction speed set based on the input start time code Ts and the information on the reproduction speed Vp. . 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, and a memory can be used.
[0030]
The video playback processing steps in the video playback method according to the present embodiment will be described with reference to the flowchart in FIG. First, when reproducing a video, a process 261 of moving the reproduction start position to a position of a preset start time code Ts is performed. In this process 261, a process of moving the reproduction start position to the position of the preset start time code Ts is performed by searching for the time code Ts from the video data recorded on the recording medium 420. As a result, the reproduction processing status becomes a state in which reproduction can be started.
[0031]
Next, a reproduction mode setting process 272 is performed. The reproduction mode is set to one of the normal reproduction mode and the high-speed reproduction mode. In this process, first, the current reproduction speed Vp is recognized. Then, 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 reproduction speed Vp here indicates, in detail, a reproduction speed ratio (= reproduction speed / normal reproduction speed), and the reproduction speed Vp = 1 means a normal reproduction speed (1 × speed), and Vp = 0 means stationary (stop), Vp <0 means reverse playback, and | Vp |> 1 means fast playback. When 0 <Vp <1, low-speed forward reproduction is performed. In low-speed forward reproduction, the decoding processing time is shorter than that in normal reproduction, and can be dealt with by controlling the transmission of frames from the video reproduction means 450 to the display device 432. Therefore, in the present embodiment, a description will be given assuming that the playback speed (0 <Vp <1) is included in the normal playback mode.
[0032]
When the reproduction mode setting processing 272 is completed, the decoding processing 230 in the normal reproduction mode or the decoding processing 200 in the special reproduction mode is performed through the reproduction mode determination processing 284. In these processes, the frame decoding process is continued in the playback mode until a change in the playback mode is detected. When the reproduction mode changes, a stop determination process 280 is performed. If it is determined in the determination process 280 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, the frame normal decoding process 240 and the frame output process 241 are performed. The normal decoding process 240 is a general decoding process of an MPEG stream, and decodes a frame located in the next coding order in the stream. The output process 241 is a process of outputting a corresponding next time-ordered frame from the decoded frames.
[0034]
At the time when the normal decoding process 240 and the output process 241 are completed, since the time required for decoding one frame has elapsed, a process 280 which is a process for detecting whether or not the reproduction speed Vp has been changed by a user operation. Step 282 is performed. If it is determined in step 280 that the reproduction is being continued (Vp) 0), the process proceeds to step 282. If it is determined that the reproduction is stopped (Vp = 0), a series of decoding processes ends.
[0035]
In the 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 step 271. If the current reproduction 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 reproduction mode is continuing.
[0036]
The decoding process 200 in the special reproduction 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) to be reproduced within a fixed time from the current time code position.
[0037]
Next, a process 211 of selecting an optimum reproduction pattern from the calculated reproduction patterns in terms of decoding processing time and decoding processing capability is performed. Based on the optimum pattern obtained by the process 211, a special decoding process 300 of the frame 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 the reproduction mode has changed are performed. First, in process 280, it is determined whether or not the current reproduction speed Vp is Vp = 0. When it is determined in step 280 that Vp = 0, it is determined that the reproduction is currently stopped, and the subsequent processing is stopped and the end processing is performed.
[0039]
If it is determined in step 280 that Vp ≠ 0, it is determined that reproduction is currently being continued, and the flow shifts to step 281. In the process 281, it is determined whether or not the current reproduction speed Vp is 0 <Vp ≦ 1. If it is determined in step 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 step 270. In the process 270, the reproduction mode is set to the normal reproduction mode. After the reproduction mode is set to the normal reproduction mode, the process ends.
[0040]
If it is determined in step 281 that 0 <Vp ≦ 1 is not satisfied (Vp <0 or 1 <Vp), it is determined that the current reproduction mode is in the special reproduction mode, and the flow shifts to step 283. In the process 283, it is determined whether or not the reproduction speed Vp has changed from before the frame decoding. If it is determined that the reproduction speed Vp has not changed, it is not necessary to change the optimum pattern (reproduction pattern for the reproduction speed Vp) set in step 211 in view of the decoding processing time and the decoding processing capability. Then, the process returns to the process 300 to continue the special decoding of the frame.
[0041]
On the other hand, when it is determined in the process 283 that the playback speed Vp has changed before the frame decoding, in the process 211, the optimal pattern (playback) set based on the decoding processing time and the decoding processing capability is determined. 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 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 of the frame f. In FIG. 6, a symbol f indicates a frame number that can uniquely designate a frame in the sequence.
[0043]
First, processing 330 is performed to determine whether the frame f has been decoded or can be decoded. The fact that the frame f has been decoded indicates a state in which the frame f has already been decoded and stored as frame data in a storage medium such as a memory. Once a frame is decoded, it can be used repeatedly without decoding, as long as it is stored in the memory. The fact that the frame f can be decoded means that decoding can be performed using only the frame data of the frame f.
Specifically, the frame f can be decoded,
Frame f is an I-frame,
The frame f is a P frame and the forward prediction reference frame has been decoded,
The frame f is a B frame, and both the forward prediction reference frame and the backward prediction reference frame have been decoded;
State.
[0044]
When it is determined in the determination process 330 that the frame f has been decoded or can be decoded, a determination process 333 of whether or not the frame f has been decoded is performed. If it is determined in the determination process 333 that the decryption has been completed, a series of processes ends. On the other hand, when it is determined in the determination process 333 that the frame f has not been decoded, the decoding process 340 and the storage process 350 for the frame f are performed, and a series of processes ends.
[0045]
When it is determined in the determination process 330 that the frame f is neither decoded nor decodable, a determination process 331 is performed to determine whether 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 the display order.
[0046]
When it is determined in the determination process 331 that the backward prediction is being performed, 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 processing 300A for the frame bwd, or when determining in the determination processing 331 that backward prediction has not been performed, determination processing 332 is performed to determine whether or not the frame f has performed forward prediction.
[0048]
When it is determined in the determination process 332 that the forward prediction is being performed, the process 312 of 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 it is determined in the determination process 332 that the forward prediction has not been performed, it is determined that a 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 process returns to the determination process 330 and continues. When the prediction is performed on the frame f, the prediction reference frame is decoded by one or both of the special decoding 300 of the frame bwd and the special decoding 300 of the frame fwd, so that the frame f can be decoded here.
[0050]
The special decoding 300 of the frame bwd and the special decoding 300 of the frame fwd are recursive processes of the special decoding 300 of the frame f. Therefore, the frame decoding process 340 can be performed only after tracing the prediction reference frame (frame bwd, frame fwd) in order and reaching an I frame that can be decoded only with its own frame data. Therefore, the decoding of the frames that require the prediction reference frame is performed in order from the point where the I frame that can be decoded only with 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 decodings and the decoding processing capability will be described with reference to FIG. The decoding count table 520 indicates how many frames including the predicted reference frame need to be decoded to decode each frame. FIG. 7 shows that decoding processing of an average of 3.75 frames per frame time is required in the frame range of FIG. 7 to perform Vp = 4, that is, quadruple speed reproduction. This value (the average number of decoding processes required per frame time) is defined as the average required decoding speed Vn at the reproduction speed Vp.
[0052]
On the other hand, the decoding 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 for the reproduction speed Vp to be calculated 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 same can be applied to the case of reproducing at another speed.
[0054]
FIG. 8A shows an example of a frame structure in normal quadruple speed reproduction. In normal quadruple-speed playback, quadruple-speed playback is performed by displaying one frame every four frames from the current time (decimated display). Here, by displaying one frame for every four frames, the frame sequence (reproduction pattern) of the quadruple speed reproduction to be performed is the reproduction frame sequence set based on the current time code and the current reproduction speed. Make up an example.
[0055]
As a method of calculating the reproduction pattern, a normal quadruple speed reproduction pattern (reproduction frame sequence) is calculated, a quadruple speed reproduction pattern for shifting the entire quadruple speed reproduction pattern (reproduction frame sequence), and a quadruple speed reproduction pattern (reproduction) are calculated. Calculation of a quadruple speed reproduction pattern (reproduction frame sequence) in which each reproduction frame constituting the frame sequence is individually shifted.
[0056]
The normal 4 × speed reproduction pattern is as shown in FIG. As shown in FIG. 8B, the quadruple speed reproduction pattern for shifting the entire reproduction frame shifts the reproduction start position by a certain number of frames from the current time to shift the entire reproduction frame from the state of FIG. 8A. This is a reproduction pattern. As shown in FIG. 8C, the quadruple-speed playback pattern in which each playback frame is individually shifted is a playback pattern in which each playback frame is independently shifted back and forth by a predetermined number of frames.
[0057]
In a reproduction pattern that shifts the entire reproduction frame (FIG. 8B) or a reproduction pattern that shifts each reproduction frame individually (FIG. 8C), a plurality of reproduction patterns are changed by changing the frame shift amount. Can be calculated. Further, by setting a reproduction pattern in which a reproduction pattern for shifting the entire reproduction frame (FIG. 8B) and a reproduction pattern for individually shifting each reproduction frame (FIG. 8C) is set, various types of reproduction patterns are set. Various reproduction patterns can be calculated.
[0058]
The process 210 of calculating the reproduction pattern 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 is reproduced at 4 × speed with a GOP length N = 6.
[0059]
First, a decoding count 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 method for calculating the reproduction pattern. Many values can be used for the frame shift amount. In this example, there are four types of reproduction patterns to be shifted based on the periodicity of the GOP and the double speed value (4). For each reproduction pattern, the corresponding decoding count is extracted using the decoding count table.
[0060]
The optimum pattern selection process 211 (see FIG. 5) is performed on the reproduction pattern calculated as described above as follows. When the average required decoding speed Vn is obtained for the four types of reproduction patterns shown in FIG. 9, as shown in FIG. 9, the reproduction pattern 2 and the reproduction pattern 4 take the minimum value when Vn = 3. Here, the reproduction pattern 1 and the reproduction pattern 3 and the reproduction pattern 2 and the reproduction pattern 4 are the same type of reproduction pattern in which not only the value of the average required decoding speed but also the appearance pattern of the number of times of decoding of each frame is the same. That is, the number of decodings of the reproduction pattern 1 changes to 2, 6, 4, and 2, while the number of decodings of the reproduction pattern 3 also changes to 2, 6, 4, and 2 after the first 4. The same applies to reproduction pattern 2 and 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 type of reproduction pattern. Therefore, the reproduction pattern 2 having a small frame shift amount is set to the minimum value. Here, assuming that the decoding processing capacity 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 ability is insufficient, so that smooth reproduction cannot be performed. At this point, the effect of setting the reproduction 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, the number of times of decoding is six. However, if the frames in the GOP are stored, the decoded data of the frame b can be used. Therefore, it is only necessary to decode four P frames after the frame b, so that the number of decoding can be reduced to four. The average required speed Vn is also reduced, and is reduced to Vn = 2.67 in the reproduction pattern 2. Also, a reproduction method using a frame stored in this way can be handled by the operation of the special decoding process 300 for the frame f (see FIG. 6). That is, when the special decoding process 300 of the prediction reference frame is performed recursively, if there are already decoded and stored frames, the decoded frames are confirmed in the processes 330 and 333 (both refer to FIG. 6). This is because decryption and storage are not performed.
[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 a quadruple speed with a GOP length N = 6. Also in this example, as in FIG. 9, there are four types of reproduction patterns, and the reproduction pattern 1 and the reproduction pattern 3, and the reproduction pattern 2 and the reproduction pattern 4 are the same type of reproduction patterns in terms of the number of decodings. In this case, similarly, the reproduction pattern 2 is selected as the optimum pattern. As described above, the present invention can be applied irrespective of whether a GOP is composed of only I and P frames or is composed of I, P and B frames.
[0063]
9 to 11, the byte position table 510 in FIG. 12 is used as a method for discretely accessing the 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 is variable in length, and information on the start position (byte position) of the GOP and the start position of the frame generally does not exist in the stream. It depends.
[0064]
It is sufficient that the byte position table 510 has at least information on the index (e) in the display order, the frame type (b), and the total number of bytes (d). For example, consider the case where a P frame whose encoding order is 3 in the byte position table 510 of FIG. 12 is read. In FIG. 12, the total number of bytes up to the frame head position is uniquely determined in the stream. Therefore, if frame data is read based on the total number of bytes up to the frame head position, 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 the frame data of the 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 values of the encoding order and the display order are values that are uniquely determined in the GOP for simplicity, but are preferably values that are uniquely determined 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 output as a stream when encoding a video, outputting a table together with the stream, and recording the table on the recording medium 420 (see FIG. 2). The second method is a method in which a stream is calculated when the stream is transferred, and is stored in an internal memory or the like without being recorded on the recording medium 420. Even when the byte position table 510 is not created, when reading the stream, the byte position estimated from the time, bit rate, buffer occupancy, and the like is calculated, and the stream is searched from a position slightly before the byte position. 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 calculated as a fixed value. 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 a maximum frame shift amount Tf are set. Next, a decoding frequency table is created for frames having the set number of frames Nf. Next, frames constituting a reproduction pattern corresponding to the reproduction speed Vp are extracted from (Tf + 1) kinds of frame start positions from the frame shift amount 0 (current time) to the maximum frame shift amount Tf. Extraction of frames is performed up to the number of frames Nf. The average required decoding speed Vn is calculated for each of (Tf + 1) reproduced patterns from which frame extraction has been performed. Then, the reproduction pattern having the minimum value of the average required decoding speed Vn is selected as the optimum pattern.
[0068]
As another method of selecting the optimum pattern, there is a method of not selecting the one having the minimum average decoding speed Vn and selecting the one having the smallest frame shift amount below the average decoding speed Vd. Certainly, 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, as the number of patterns increases, errors can be recognized. Therefore, it is effective to select a frame shift amount as small as possible within a range that can be decoded. Further, the higher the speed of reproduction, the greater the tolerance of the error, so that the allowable frame shift amount can be changed according to the reproduction speed Vp. Not limited to the above, various methods can be applied to the method of selecting the optimum pattern.
[0069]
Although the present embodiment has been described taking forward high-speed reproduction as an example, reverse reproduction and reverse high-speed reproduction can be realized by the same method based on the decoding count table and the selection of the reproduction pattern. is there.
[0070]
As described above, according to the present invention, the reproduction pattern in which the reproduction start frame is shifted is calculated, and the 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-described embodiment, the frame group is selected and decoded based on the decoding processing time and the decoding processing capability. However, the frame group may be simply selected based on the decoding processing time. . Even in such a case, an optimal 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 of calculating a reproduction pattern without preparing a decoding count table and selecting an optimum pattern when the GOP length N can be considered to be constant or almost constant in Embodiment 1 will be described.
[0073]
With reference to FIG. 1, the reason why the reproduction pattern can be calculated within a finite range regardless of the reproduction speed Vp will be described. FIG. 1 shows a decoding count table 110 corresponding to an MPEG stream 100 having a constant GOP length. Based on the configuration shown in FIG. 1, a case is considered where the GOP length is N = 6, the second P frame in the GOP is the current frame, and the reproduction is performed at the reproduction speed Vp = 4.
[0074]
According to the reproduction speed Vp = 4, the 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 mode is defined as a reproduction pattern. Then, if three frames are reproduced from the current frame, the frame located at the same periodic position in the GOP as the current frame, that is, the P frame located second in the GOP is reproduced. From the above, the reproduction pattern has periodicity, and the length Tp of one period in that period can be defined by the following equation (1). The length Tp of one cycle of the reproduction pattern is a time concept showing an example of a certain time in the claims. However, the certain time in the present invention is not limited to such a concept of time, and it is needless to say that the time length may be set arbitrarily in advance.
[0075]
Tp = 1 cm (N, Vp) (1)
N is the GOP length, Vp is the playback speed, and lcm (a, b) is a function that gives 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. In other words, if the reproduction is performed for 100 msec or more, the average required number of times of decoding can be approximately regarded as the same. Therefore, it is possible to calculate a reproduction pattern by evaluating only the number of times of decoding of a frame included in one cycle of the reproduction pattern. Further, since the decoding count table only needs to generate a range of one cycle from the GOP structure, it is not necessary to prepare the table 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 a GOP is composed of only I and P frames or I, P and B frames, and regardless of whether or not a frame is stored, a condition under which the GOP length can be regarded as constant or constant. Below, in each of a plurality of set reproduction patterns, the number of reproduction patterns (Npat) that can be regarded as different types of reproduction patterns in the present invention can be defined by the following equation (2). Note that the criteria for determining whether the reproduction patterns are the same type or different types are based on the same type determination criteria described in the first embodiment with reference to FIGS.
[0077]
Npat = gcd (N, Vp) (2)
Here, N is the GOP length, Vp is the reproduction speed, and gcd (a, b) is a function that gives the greatest common divisor of a and b. The reason why the number of reproduction patterns (Npat) is not the Vp but the greatest common divisor of N and Vp is as described in the first embodiment with reference to FIG. That's because we 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. Also, the number of reproduction patterns (Npat) when the reproduction speed (Vp) is changed is shown in the table. As shown in the table, Npat = gcd (6, Vp), and Npat does not take a value larger than 6. This indicates that the calculation of the reproduction pattern is easy, and the optimum pattern can be easily selected by comparing the number of decodings.
[0079]
The generalization of the reproduction pattern selection method is as follows. First, when Npat = 1, a reproduction pattern including the current frame is selected. This is because a reproduction pattern having the least amount of frame shift is applied because there is only one type of reproduction pattern. Second, when Npat = a (where 1 <a <N is an integer), a reproduction pattern including an I frame is selected. This is because, regardless of the GOP structure, the reproduction pattern including an I frame has the smallest average required number of decodings. Here, it should be noted that a plurality of reproduction patterns including the I frame do not appear. Thirdly, when Npat = N, playback is performed by moving to the I frame. In this case, since Vp = mN (m is a natural number), a reproduction pattern of only I frames always exists.
[0080]
In the present embodiment, the fast forward reproduction in the forward direction has been described as an example. However, the reverse playback in which Vp <0 and the high-speed playback in the reverse direction can be similarly realized by using | Vp | instead of Vp. It is possible to do.
[0081]
As described above, according to the present embodiment, when the GOP length can be considered to be constant or almost constant, it is possible to calculate the reproduction pattern and select the optimum pattern without preparing the decoding count table. Smooth special reproduction can be performed within the obtained decoding processing capability.
[0082]
(Embodiment 3)
In the present embodiment, the shift of each reproduction frame shown in FIG. 8C is further applied to Embodiment 1 to perform smooth special reproduction even when the decoding processing capability is further limited. An example that enables the above 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 one of -1, 0, and +1. As the shift method, three types of shift, bidirectional shift, one-way shift, and no shift are used. The bidirectional shift permits a bidirectional shift of -1 and +1 and no shift, and the one-way shift permits only a forward shift of -1 or only a +1 backward shift in addition to no shift. When no shift is performed, no shift is performed from the reproduction pattern of FIG. The reason why the above three types of shifts are used separately is that the time interval of frame display, that is, the frame display accuracy differs between the three types. In order to evaluate the display accuracy of the frame, a minimum frame interval dmin and a maximum frame interval dmax are defined.
[0084]
As shown in FIG. 14, (a) bidirectional shift, (b) one-way shift, and (c) no shift are applied to each of the reproduction patterns 1 and 2 obtained in FIG. (A), (b), (c) Among the shifts, a shift pattern having the minimum average required decoding speed is calculated. However, the following rules apply.
[0085]
First rule
This excludes the case where 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 shift of the reproduction start frame shown in FIG. 8B.
[0086]
Second rule
In all bidirectional shifts, if the reproduction pattern having the minimum average required decoding speed is one-way shift or no shift, it is not applicable.
[0087]
Third rule
In the one-way shift, a reproduction pattern having the minimum average required decoding speed is selected from the forward and backward shifts. However, if the reproduction pattern having the minimum average required decoding speed has no shift, there is no corresponding case.
[0088]
Fourth rule
If the reproduction pattern that has already appeared as the reproduction pattern with the minimum average required decoding speed becomes the reproduction pattern with the minimum again, there is no corresponding case.
[0089]
When the above rule is applied, a table of the average required decoding speed Vn, the minimum frame interval dmin, and the maximum frame interval dmax is obtained as shown in FIG. Here, the frame minimum interval dmin refers to a frame separation interval that takes a minimum value in a separation interval between adjacent display frames in which a thinning interval (separation interval) varies due to a shift. Conversely, the frame maximum 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 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, a reproduction pattern having the smallest required display fluctuation width with the average required decoding speed Vn equal to or lower than the average decoding speed Vd representing the decoding processing capability is selected.
[0091]
Further, the minimum number of times of decoding and the maximum number of times of decoding can be used as the evaluation of the decoding processing capability. As the evaluation of the display accuracy, the shift amount of the reproduction start frame used in the first embodiment can be used. However, it should be noted that the reproduction start frame may be shifted again as in the reproduction 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 required decoding speed, two or more values can be applied if necessary. In this case, more than three types of shifts can be classified. However, a shift is not performed such that the temporal order of consecutive frames is exchanged.
[0093]
In the above example, the example in which the GOP is composed of only the I frame and the P frame has been described. However, even when the GOP is composed of the I frame, the P frame, and the B frame, only the decoding frequency tables are 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 can be similarly applied since the decoding frequency table is different.
[0094]
As described above, according to the present embodiment, a shift of each reproduction frame is further applied to Embodiment 1, and smooth special reproduction can be performed even when the decoding processing capability is further limited. .
[0095]
(Embodiment 4)
In the present embodiment, an apparatus for implementing Embodiment 1 will be described.
[0096]
FIG. 16 is a diagram showing a video playback device of the present invention. In the video reproducing apparatus 400 of FIG. 16, reference numeral 410 denotes a decoder for decoding a stream that is an encoded video, 411 denotes a CPU for performing a decoding process, 412 denotes a memory for recording the stream and the decoded frame, 413, a ROM for storing a program for operating the CPU 411 in an initial state; 421, a disk controller for driving a disk; 422, an optical disk drive on which a stream is recorded; 431, a disk controller 421 and a decoder 410; Is a display device for displaying images, such as a monitor.
[0097]
The operation of the video playback device configured as described above will be described below. First, before the video playback device 400 is activated, 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 stream decoding processing. The decoding process in the video reproduction device 400 (video reproduction means 450 (see FIG. 2)) is realized by this program. Before playback, the optical disk on which the stream is recorded is loaded into the optical disk 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 streams starting from the time specified by the optical disk drive 422, and reads the stream into the memory 412. Forward. This fixed amount can be set to an appropriate length, for example, a unit of several GOPs or a unit of seconds so as not to cause a failure in the reproduction operation. At the same time, a decoding instruction to the CPU is written in the interrupt area of the memory 412. The CPU 411 monitors an interrupt area of the memory 412. When a reproduction command is given, the CPU 411 reads a stream from the memory 412, performs a decoding process, and writes the decoded frame data to the memory 412. At this time, the CPU 411 extracts a plurality of frames to be reproduced within a predetermined time from the current time code position, and then calculates the time required for decoding the extracted plurality of frames, respectively. A process of selecting and decoding an arbitrary frame group from the plurality of frame groups based on the obtained decoding processing time, thereby decoding the frame data. That is, the CPU 411 exhibits the function of the timer and the function of the decoder in the claims. Further, the CPU 411 exhibits a means for selecting a frame arrangement pattern in the claims and a 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 unit 450) will be described with reference to FIG. FIG. 17 shows a decoded frame table 500 (FIG. 17A) managed by a program stored in the CPU 411, and a memory 412 (FIG. 17B). The program has a decoded data presence flag indicating whether or not the decoded frame data exists on the memory 412, and a table of the index (serial number uniquely determined in the sequence) of the corresponding frame. 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 check whether the decoded frame data exists in the memory by checking the index on the memory 412. However, the index on the memory 412 is not limited to the arrangement shown in FIG. 17B, and may be stored in the memory in an easily searchable format such as a list shown in FIG. 17A.
[0101]
In the above description of the video reproducing apparatus 400, the description has been made assuming an optical disk drive. However, it is needless to say that the present invention can be realized with a medium for recording information such as a hard disk drive or a memory. Also, an example is described in which a CPU and a memory are used as a decoder that performs decoding processing faster than real time, but the 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, Embodiment 1 can be realized as an apparatus.
[0102]
(Embodiment 5)
In the present embodiment, an encoding method for reducing the average required decoding speed Vn by limiting the prediction direction at the time of encoding in the video encoding method 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 a B frame. FIG. 18B shows a method in which the first two B frames of a GOP use only backward prediction, and the other B frames use only forward prediction. FIG. 18C shows a method in which the first two B frames of a GOP use only backward prediction, and the other B frames use only forward prediction for a forward frame and use only backward prediction for a backward frame. . In both FIG. 18B and FIG. 18C, the average required decoding speed Vn is reduced as compared with FIG. This means that the decoding process can be performed at a higher speed when the encoded stream is specially reproduced as shown in FIGS. 18B and 18C. Here, the prediction directions for the first two B frames of the GOP can be generally limited by a closed GOP. Restriction on the prediction direction of other frames can be realized by not performing prediction processing in that direction on the entire frame at the time of encoding, or by restricting the prediction mode that can be set for each macroblock.
[0104]
If the information obtained by performing the prediction-limited coding on the video coded in the present embodiment is added to the byte position table 510 in FIG. Is not done. In the example described with reference to FIG. 11, the stream according to the present 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 required decoding speed Vn by limiting the prediction direction at the time of encoding. It is possible to generate a stream capable of performing smooth special reproduction even with respect to the reproducing means having the stream.
[0105]
【The invention's effect】
As is clear from the above description, according to the present invention, a reproduction pattern in which a reproduction frame is shifted is calculated, and an optimum pattern in which the average required decoding speed falls within the average decoding speed is selected. The video can be played smoothly during special playback with a large load.
[Brief description of the drawings]
FIG. 1 is a view for explaining the basis on which a reproduction pattern can be calculated within a finite range according to a second embodiment of the present invention.
FIG. 2 is a configuration diagram for realizing a video reproduction method according to the first embodiment of the present invention.
FIG. 3 is a flowchart showing a decoding process during reproduction according to the first embodiment;
FIG. 4 is a flowchart showing a decoding process in a normal reproduction mode according to the first embodiment;
FIG. 5 is a flowchart showing a decoding process in a special reproduction mode according to the first embodiment;
FIG. 6 is a flowchart showing special decoding processing of a frame according to the first embodiment;
FIG. 7 is a view for explaining the relationship between the number of times of decoding and decoding processing capability in the first embodiment.
FIG. 8 is a diagram showing a shift of a frame in the first embodiment and the third embodiment.
FIG. 9 is a diagram showing an example of calculation of a reproduction pattern according to the first embodiment.
FIG. 10 is a diagram showing an example of calculation of a reproduction pattern according to the first embodiment.
FIG. 11 is a diagram showing an example of calculation of a reproduction pattern according to the first embodiment.
FIG. 12 is a diagram showing an example of a byte position table according to the first embodiment;
FIG. 13 is a diagram showing the number of reproduction patterns according to the second embodiment of the present invention.
FIG. 14 is a diagram showing an example of calculation of a reproduction pattern according to the third embodiment of the present invention.
FIG. 15 is a view for explaining selection of an optimum pattern in the third embodiment.
FIG. 16 is a diagram showing a configuration of a video playback device according to a fourth embodiment of the present invention.
FIG. 17 is a diagram showing a storage method of a decoded frame in the fourth embodiment.
FIG. 18 is a diagram showing an encoding method in which a prediction direction is limited according to the fifth embodiment 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 when encoding an I frame and a P frame.
FIG. 21 is an explanatory diagram of a conventional example in the case of performing 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 count 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 Decryption count table

Claims (23)

符号化された映像信号を記録した記録媒体から映像信号を再生したうえで復号器で復号する映像再生方法であって、
映像信号を復号する処理に際して、現在のタイムコード位置から一定時間内に再生する1枚以上のフレームの集合(以下、フレーム群と称す)を複数抽出し、
抽出した複数のフレーム群それぞれの復号処理時間を算出し、
算出した前記復号処理時間に基いて、前記複数のフレーム群から任意のフレーム群を選択して前記復号器で復号する、
ことを特徴とする映像再生方法。
A video reproducing method of reproducing a video signal from a recording medium on which an encoded video signal is recorded and decoding the reproduced video signal by a decoder,
In a process of decoding a video signal, a plurality of sets of one or more frames (hereinafter, referred to as a frame group) to be reproduced within a predetermined time from a current time code position are extracted,
Calculate the decoding processing time of each of the plurality of extracted frame groups,
Based on the calculated decoding processing time, an arbitrary frame group is selected from the plurality of frame groups and decoded by the decoder.
A video reproducing method characterized by the above-mentioned.
算出した前記復号処理時間が最も短い前記フレーム群を選択して前記復号器で復号する、
ことを特徴とする請求項1に記載の映像再生方法。
Selecting the frame group with the shortest calculated decoding processing time and decoding with the decoder;
2. The video reproducing method according to claim 1, wherein:
算出した前記復号処理時間と前記復号器の復号処理能力とに基づいて前記フレーム群を選択して前記復号器で復号する、
ことを特徴とする請求項1に記載の映像再生方法。
Selecting the frame group based on the calculated decoding processing time and the decoding processing capability of the decoder, and decoding by the decoder;
2. The video reproducing method according to claim 1, wherein:
算出した前記復号処理時間が、前記復号器による単位時間内での復号処理が可能となる値を示す前記フレーム群を選択して前記復号器で復号する、
ことを特徴とする請求項3に記載の映像再生方法。
The calculated decoding processing time is selected by the decoder to select the frame group indicating a value that enables the decoding processing in the unit time by the decoder, and decoding is performed by the decoder.
4. The video reproducing method according to claim 3, wherein:
算出した前記復号処理時間が、前記復号器による単位時間内での復号処理が可能となる値を示す一つないし複数の前記フレーム群をさらに選択し、
選択したフレーム群の中から、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列に対して最も時間的誤差の小さいフレーム群を選択して前記復号器で復号する、
ことを特徴とする請求項1に記載の映像再生方法。
The calculated decoding processing time further selects one or more of the frame groups indicating a value that enables decoding processing within a unit time by the decoder,
From among the selected frame groups, a frame group having the smallest temporal error with respect to a playback frame sequence set based on the current time code and the current playback speed is selected and decoded by the decoder.
2. The video reproducing method according to claim 1, wherein:
復号処理時間の算出を実施する前記複数のフレーム群を、現在のタイムコードと現在の再生速度とに基いて想定される再生フレーム列を基本構成としさらにこの再生フレーム列内の任意のフレームを時間的にシフトしたフレームに置き換えることで構成する、
ことを特徴とする請求項2ないし5のいずれかに記載の映像再生方法。
The plurality of frame groups for which the calculation of the decoding processing time is performed have a basic configuration of a playback frame sequence assumed based on a current time code and a current playback speed. It is composed by replacing the frame with
The video reproducing method according to claim 2, wherein:
前記映像信号は、フレーム間予測符号化された映像信号であり、
復号処理を、復号に必要な予測参照フレームを順に復号しつつ実施する、
ことを特徴とする請求項1ないし6のいずれかに記載の映像再生方法。
The video signal is a video signal subjected to inter-frame prediction encoding,
Performing the decoding process while sequentially decoding the predicted reference frames required for decoding,
7. The video reproducing method according to claim 1, wherein:
前記復号処理時間を、順に復号する前記予測参照フレームそれぞれの復号処理時間を加算することで算出する、
ことを特徴とする請求項7に記載の映像再生方法。
The decoding processing time is calculated by adding the decoding processing time of each of the prediction reference frames to be sequentially decoded,
8. The video reproducing method according to claim 7, wherein:
前記複数のフレーム群を、現在のタイムコード位置から再生を開始するタイムコード位置への時間的なシフト量を変化させることで設定する、
ことを特徴とする請求項7または8に記載の映像再生方法。
The plurality of frame groups 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 reproducing method according to claim 7 or 8, wherein:
前記一定時間を、映像再生時の再生速度比(=再生速度/通常再生速度)と、連続する複数のフレームの集合体であるGOPの長さとの最小公倍数に基づいて算出する、
ことを特徴とする請求項7ないし9のいずれかに記載の映像再生方法。
Calculating the fixed time based on a least common multiple of a playback speed ratio during video playback (= playback speed / normal playback speed) and a length of a GOP that is an aggregate of a plurality of continuous frames;
10. The video reproducing method according to claim 7, wherein:
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生方法であって、
各フレームの復号に要する復号回数を示す復号回数表を再生前に作成したうえで、
1フレーム再生時間内に平均的に復号可能なフレーム数と前記復号回数表とを比較して復号が円滑に行えるフレーム配置パターンを選択し、
選択したフレーム配置パターンに基いて映像を復号して再生する、
ことを特徴とする映像再生方法。
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 indicating the decoding count required for decoding each frame before playback,
Comparing the number of frames that can be decoded on average within one frame reproduction time with the decoding count table to select a frame arrangement pattern that enables smooth decoding;
Decode and play the video based on the selected frame arrangement pattern,
A video reproducing method characterized by the above-mentioned.
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生装置であって、
映像信号を復号する復号器と、
現在のタイムコード位置から一定時間内に再生する1枚以上のフレームの集合(以下、フレーム群と称す)を複数抽出したうえで、抽出した複数のフレーム群を前記復号器で復号処理するのに要する時間をそれぞれ算出する計時器と、
を備え、
前記復号器は、前記計時器で算出した前記復号処理時間に基いて、前記複数のフレーム群から任意のフレーム群を選択して復号するものである、
ことを特徴とする映像再生装置。
A video reproducing apparatus 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;
After extracting a plurality of sets of one or more frames (hereinafter, referred to as a frame group) to be reproduced within a predetermined time from a current time code position, and performing decoding processing on the extracted plurality of frame groups by the decoder, A timer for calculating the time required,
With
The decoder is configured to select and decode an arbitrary frame group from the plurality of frame groups based on the decoding processing time calculated by the timer.
A video playback device characterized by the above-mentioned.
前記復号器は、前記計時器で算出した前記復号処理時間が最も短い前記フレーム群を選択して復号するものである、
ことを特徴とする請求項12に記載の映像再生装置。
The decoder selects and decodes the frame group having the shortest decoding processing time calculated by the timer.
13. The video playback device according to claim 12, wherein:
前記復号器は、前記計時器で算出した前記復号処理時間と当該復号器の復号処理能力とに基づいて前記フレーム群を選択して復号するものである、
ことを特徴とする請求項12に記載の映像再生装置。
The decoder selects and decodes the frame group based on the decoding processing time calculated by the timer and the decoding processing capability of the decoder.
13. The video playback device according to claim 12, wherein:
前記復号器は、前記計時器で算出した前記復号処理時間が、当該復号器による単位時間内での復号処理が可能となる値を示す前記フレーム群を選択して復号するものである、
ことを特徴とする請求項14に記載の映像再生装置。
The decoder is configured to select and decode the frame group indicating a value at which the decoding processing time calculated by the timer is enabled for decoding within a unit time by the decoder.
The video playback device according to claim 14, wherein:
前記復号器は、算出した前記復号処理時間が、当該復号器による単位時間内での復号処理が可能となる値を示す一つないし複数の前記フレーム群をさらに選択し、選択したフレーム群の中から、現在のタイムコードと現在の再生速度とに基いて設定される再生フレーム列に対して最も時間的誤差の小さいフレーム群を選択して復号するものである、
ことを特徴とする請求項12に記載の映像再生装置。
The decoder further selects one or more of the frame groups indicating a value at which the calculated decoding processing time enables the decoding processing in the unit time by the decoder, and among the selected frame groups, From the above, a frame group having the smallest temporal error is selected and decoded for a playback frame sequence set based on the current time code and the current playback speed.
13. The video playback device according to claim 12, wherein:
前記復号器は、復号処理時間の算出を実施する前記複数のフレーム群を、現在のタイムコードと現在の再生速度とに基いて想定される再生フレーム列を基本構成としさらにこの再生フレーム列内の任意のフレームを時間的にシフトしたフレームに置き換えることで構成するものである、
ことを特徴とする請求項13ないし16のいずれかに記載の映像再生装置。
The decoder is configured such that the plurality of frame groups for performing the calculation of the decoding processing time have a basic configuration of a playback frame sequence assumed based on a current time code and a current playback speed. It is constructed by replacing an arbitrary frame with a temporally shifted frame.
17. The video reproducing apparatus according to claim 13, wherein:
前記映像信号はフレーム間予測符号化された映像信号であり、
前記復号器は、復号に必要な予測参照フレームを順に復号するものである、
ことを特徴とする請求項12ないし17のいずれかに記載の映像再生装置。
The video signal is a video signal subjected to inter-frame predictive encoding,
The decoder is for sequentially decoding predicted reference frames required for decoding,
18. The video reproducing apparatus according to claim 12, wherein:
前記復号器は、前記復号処理時間を、順に復号する前記予測参照フレームそれぞれの復号処理時間を加算することで算出するものである、
ことを特徴とする請求項18に記載の映像再生装置。
The decoder is configured to calculate the decoding processing time by adding a decoding processing time of each of the prediction reference frames to be sequentially decoded.
The video playback device according to claim 18, wherein:
前記復号器は、前記複数のフレーム群を、現在のタイムコード位置から再生を開始するタイムコード位置への時間的なシフト量を変化させることで設定するものである、
ことを特徴とする請求項18または19に記載の映像再生装置。
The decoder sets the plurality of frame groups by changing a temporal shift amount from a current time code position to a time code position at which playback is started.
20. The video playback device according to claim 18, wherein
前記復号器は、前記一定時間を、映像再生時の再生速度比(=再生速度/通常再生速度)と、連続する複数のフレームの集合体であるGOPの長さ(フレーム数)との最小公倍数に基づいて算出するものである、
ことを特徴とする請求項18ないし20のいずれかに記載の映像再生装置。
The decoder sets the fixed time as a least common multiple of a playback speed ratio during video playback (= playback speed / normal playback speed) and a length (number of frames) of a GOP that is an aggregate of a plurality of continuous frames. Is calculated based on
21. The video reproducing apparatus according to claim 18, wherein:
符号化された映像信号を記録した記録媒体から映像信号を再生して復号する映像再生装置であって、
各フレームの復号に要する復号回数を示す復号回数表を再生前に作成したうえで、1フレーム再生時間内に平均的に復号可能なフレーム数と前記復号回数表とを比較して復号が円滑に行えるフレーム配置パターンを選択する手段と、
選択したフレーム配置パターンに基いて映像を復号する手段と、
を備えることを特徴とする映像再生装置。
A video reproducing apparatus for reproducing and decoding a video signal from a recording medium on which an encoded video signal is recorded,
A decoding count table indicating the number of decodings required for decoding each frame is created before playback, and the number of frames that can be decoded on average within one frame playback time is compared with the decoding count table to facilitate decoding. Means for selecting a possible frame arrangement pattern;
Means for decoding the video based on the selected frame arrangement pattern;
A video playback device comprising:
請求項7から10のいずれかに記載の映像再生方法によって復号される映像信号を予測符号化する映像符号化方法であって、
双方向予測符号化フレームの予測方向を、一方向に限定した状態で符号化を行う、
ことを特徴とする映像符号化方法。
A video encoding method for predictively encoding a video signal decoded by the video reproduction method according to any one of claims 7 to 10,
The encoding is performed in a state where the prediction direction of the bidirectional prediction encoding frame is limited to one direction,
A video encoding method characterized by the above-mentioned.
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 true JP2004343648A (en) 2004-12-02
JP3869389B2 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)

Cited By (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

Cited By (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
JP3869389B2 (en) 2007-01-17

Similar Documents

Publication Publication Date Title
JP4416796B2 (en) Image encoding device, image decoding device, image encoding program, and image decoding program
US8437408B2 (en) Decoding with reference image stored in image memory for random playback
JPWO2005088964A1 (en) Recording / playback editing device
JP4827669B2 (en) Movie playback method and apparatus
EP2154900A1 (en) Dynamic image decoding method, dynamic image decoding device, and electronic apparatus
US20040233806A1 (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
US8320749B1 (en) Method and system for DVD smooth search transitions
JP2007531435A (en) Method and apparatus for generating menu
JP3870930B2 (en) Video playback method and apparatus
JP2007129489A (en) Picture reproducer and picture reproduction method
JP4399744B2 (en) Program, information processing apparatus, information processing method, and recording medium
US7231138B1 (en) Method and system for DVD single frame stepping backwards
JP2004048206A (en) Video reproducing method and video reproducing apparatus
JP3897760B2 (en) Video playback device
US20050002645A1 (en) Reproducing device and method, recording medium and program
JP2006319645A (en) Picture reproducer, method, program, and storage medium
JP2000032395A (en) Decoding method
US8149679B2 (en) Recording/reproducing device and method, recording medium, and program
CN115988268A (en) Video variable speed control method, system, equipment and storage medium
JP3384562B2 (en) Recording device and recording method
JP2011234069A (en) Video reproduction device
JP3370660B1 (en) Recording device and recording method
JP2005310306A (en) Reproduction time display device and reproduction time calculation method

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