JP4446669B2 - Moving image data recording method and reproducing method thereof, moving image data recording device and reproducing device thereof - Google Patents
Moving image data recording method and reproducing method thereof, moving image data recording device and reproducing device thereof Download PDFInfo
- Publication number
- JP4446669B2 JP4446669B2 JP2003063825A JP2003063825A JP4446669B2 JP 4446669 B2 JP4446669 B2 JP 4446669B2 JP 2003063825 A JP2003063825 A JP 2003063825A JP 2003063825 A JP2003063825 A JP 2003063825A JP 4446669 B2 JP4446669 B2 JP 4446669B2
- Authority
- JP
- Japan
- Prior art keywords
- gop
- moving image
- gops
- data
- frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、映像信号を複数のフレームデータから構成されるフレームグループを最小単位として符号化して、符号化された複数のフレームグループを時系列に沿って配列された動画ストリームをストレージメディアに記録する動画データの記録方法及び装置、並びに前記動画データを複合化して再生する再生方法及び装置に関する。
【0002】
【従来の技術】
アナログの映像信号をデジタルデータに変換し、変換された映像データを符号化(エンコード)して記録する動画データの記録方法が知られている。動画データの符号化方式の代表的なものに、MPEG(Moving Pictures Experts Group) 方式がある。MPEG方式で符号化された動画データは、MPEGストリームと呼ばれる。このMPEGストリームが、動画ファイル(MPEGファイルなど)として、ハードディスク,メモリーカード,DVDメディアなどの各種のストレージメディアに記録される。
【0003】
MPEGストリームには、一般的には、映像(ビデオ)ストリームに加えて、そのビデオストリームに対応する音声(サウンド)ストリームが付加される。ビデオストリームは、複数のGOP(Group Of Picture)と呼ばれる単位に分割される。これら複数のGOPは時系列に沿って配列される。サウンドストリームが付加される場合には、サウンドストリームがGOPに対応するサイズに時分割されて、分割されたデータが各GOPに対応する位置に挿入されて多重化される。
【0004】
GOPは、複数のフレーム(静止画)データからなるピクチャデータと、このピクチャデータの先頭に付加されるGOPヘッダとから構成されるフレームグループであり、エンコードはこのGOPを単位として行われる。ピクチャデータは、例えば、15枚分のフレームデータから構成される。フレームレートを30フレーム/秒とすると、1GOPは約0.5秒程度の動画像になる。
【0005】
1枚のフレームは、隣接するピクセルが類似しているというように空間的な冗長性を持っており、また、時間的に連続する複数のフレームは、前後のフレームが類似しているというように時間的な冗長性を持っている。MPEG方式では、1フレームの空間的な冗長性を排除するフレーム内圧縮と、複数フレーム間の時間的な冗長性を排除するフレーム間圧縮とを行うことで、データ圧縮が行われる。フレーム間圧縮では、フレーム間予測や動き補償といった手法を用いて、GOP内の各フレームを符号化する。
【0006】
動画再生を行う場合には、符号化されたGOPが復号化されるが、MPEG方式では、各GOP単位で復号化できるようにGOPの独立性を確保している。このため、MPEGストリームから任意のGOPを取り出してこれを再生することもできる。GOPヘッダは、MPEGストリームからGOPを取り込む際のエントリポイントとして使用される。
【0007】
記録されたフレームレートで再生する標準再生では、まず、ストリームの先頭のGOPを読み出し、これをデコードしてGOP内の全フレームを復元して、各フレームを順番に再生する。次のGOPは、既に取り込み済みの先頭GOPの終端位置を基準にヘッダが検出されて読み出されて、再生される。こうした処理を繰り返して標準再生が行われる。
【0008】
MPEGストリームの再生装置としては、各種のものが開発されている(例えば、特許文献1)が、こうした再生装置には、標準再生の他に、逆再生,早送り再生,早戻し再生などの特殊再生を行えるものもある。例えば、1GOPが15枚のフレームから構成されている場合には、各GOP毎に1枚のフレームのみを再生していけば、15倍速で早送り再生を行うことができる。また、1つのGOPを飛ばしながら各GOP毎に1枚のフレームのみを再生していけば、30倍速で早送り再生を行うことができる。
【0009】
こうした特殊再生を行う場合にも、GOPサーチ方法は、上述した標準再生と同様であり、既に読み出し済みのGOPの格納位置を基準にそこからMPEGストリームのデータを読み出して、そのデータを解析することにより、所望のGOPのヘッダを検出している。
【0010】
【特許文献1】
特開平8−168042号公報
【0011】
【発明が解決しようとする課題】
しかしながら、上述したGOPサーチ方法では、取り込んだGOPの先頭又は終端アドレスから、次のGOPのヘッダが検出されるまでデータを読み出して解析していかなければならない。こうしたサーチ方法は、標準再生の場合には、取り込んだGOPの終端位置の直後のGOPを取り込めばよいので、それほど問題にはならないが、逆再生,早送り再生,早戻し再生などの特殊再生では、取り込んだGOPの先頭位置又は終端位置から、エントリーポイントであるGOPヘッダまでの間隔が空くのでGOPサーチ処理の負荷が大きくなってしまうという問題があった。
【0012】
例えば、逆再生の場合には、取り込んだGOPの直前のGOPを取り込まなければならない。この場合には、取り込んだGOPの先頭位置と直前のGOPのヘッダとの間には、直前のGOPのピクチャデータが配置される。そのため、標準再生と比較すると、GOP間の間隔が空くため、GOPサーチ処理の負荷が大きい。また、GOPを1つおきに取り込んでいかなければならない早送り再生や早戻し再生では、GOP間の間隔が大きく空くため、GOPサーチ処理の負荷はより大きくなる。
【0013】
CPUの処理能力が低く、また、メモリの容量も少ないというようにマシンリソースが少ない場合には、GOPサーチ処理の負荷が大きいと、処理をスムーズに行うことができず、早送り再生や早戻し再生の速度を上げることができないばかりか、逆再生の場合など再生速度が比較的低速である場合でもスムーズに再生ができない場合もある。
【0014】
そこで、DVD規格の制定や普及を推進する組織であるDVDフォーラムが規格化した動画再生専用の記録フォーマットであるDVD−Videoフォーマットでは、MPEGストリーム(動画ファイル)とは別に、MPEGストリーム内の各GOPの格納位置を記録したインフォメーションファイルを用意し、これをMPEGストリームとともにメディア内に格納するようにしている。この場合には、次に復号化すべきGOPの格納位置を、インフォメーションファイルを参照して取得することができるので、GOPのサーチ処理の負荷を軽減することができる。
【0015】
しかし、MPEGストリームは、DVD−Videoフォーマットで使用される以外でも様々な場面で利用されており、そうした場面の多くでは、MPEGストリーム単体で取り扱われることが多い。そのため、DVD−Videoフォーマットのように、MPEGストリームとは別にGOP位置参照用のインフォメーションファイルを付属させる方式は、ファイルコピーやファイル移動などを行う場合には、ファイルの取り扱いが煩雑化する要因ともなる。
【0016】
本発明は、少ないマシンリソースでもスムーズな特殊再生が可能で、かつ取り扱いの簡便性を維持した形態で動画データを記録する動画データの記録方法及び装置並びに前記記録方法及び装置によって記録された動画データの再生方法及び再生装置を提供することを目的とする。
【0017】
【課題を解決するための手段】
前記目的を達成するために、本発明は、複数のフレームデータから構成されるフレームグループを単位として符号化し、符号化された複数のフレームグループが時系列に沿って配列されたビデオストリームをストレージメディアに記録する動画データの記録方法において、各フレームグループの先頭に付加されるグループヘッダに、各フレームグループと時間的に前後する他のフレームグループのアドレス情報を格納して、前記ビデオストリームを記録することを特徴とする。
【0018】
前記アドレス情報は、各フレームグループの格納位置と、そのフレームグループと時間的に前後する他のフレームグループの格納位置との間の相対的な位置関係を表す相対アドレスであることが好ましい。
【0019】
前記グループヘッダには、直前のフレームグループ,2つ前のフレームグループ,直後のフレームグループ,2つ後のフレームグループの少なくとも4つのフレームグループのアドレス情報が格納される。
【0020】
前記ビデオストリームは、MPEG規格のビデオストリームであり、前記フレームグループはGOPである。
【0021】
本発明の動画データ記録装置は、複数のフレームデータから構成されるフレームグループを単位として符号化し、符号化された複数のフレームグループを時系列に沿って配列した映像ストリームをストレージメディアに記録する動画データの記録装置において、各フレームグループの先頭に付加されるグループヘッダに、各フレームグループと時間的に前後する他のフレームグループのアドレス情報を格納するアドレス格納手段を備えたことを特徴とする。
【0022】
本発明の動画データ再生方法は、複数のフレームデータから構成されるフレームグループを最小単位として符号化され、符号化された複数のフレームグループが時系列に沿って配列されたビデオストリームを、前記フレームグループを単位として復号化して再生する動画データの再生方法において、各フレームグループの先頭に付加されるグループヘッダに、各フレームグループと時間的に前後する他のフレームグループのアドレス情報が含まれている場合には、前記アドレス情報に基づいて、次に復号化すべきフレームグループの格納位置へダイレクトにアクセスすることを特徴とする。
【0023】
本発明の動画データの再生装置は、複数のフレームデータから構成されるフレームグループを最小単位として符号化され、符号化された複数のフレームグループが時系列に沿って配列された動画ストリームを、前記フレームグループを単位として復号化して再生する動画データの再生装置において、各フレームグループの先頭に付加されるグループヘッダに、各フレームグループと時間的に前後する他のフレームグループのアドレス情報が含まれている場合には、前記アドレス情報に基づいて、次に復号化すべきフレームグループの格納位置へダイレクトにアクセスするアクセス手段を備えたことを特徴とする。
【0024】
【発明の実施の形態】
図1は、本発明を適用したデジタルカメラ10の電気構成の概略を示すブロック図である。デジタルカメラ10は、静止画撮影機能の他、動画撮影機能を備えており、撮像部11で撮影した静止画や動画をメモリーカード12に記録する。メモリーカード12は、カメラ本体に設けられたカードスロットに着脱自在にセットされる。メモリーカード12としては、例えば、スマートメディア(商品名),xDピクチャカード(商品名),コンパクトフラッシュ(登録商標)などのストレージメディアが使用される。もちろん、メモリーカード12の他に、マイクロドライブ(商品名)などのストレージメディアを使用してもよい。
【0025】
CPU13は、デジタルカメラ10の各部とデータバス14等を介して接続されており、操作部16からの操作信号に基づいて、カメラ各部を統括的に制御する。EEPROM17には、制御プログラムや各種の設定情報が記録されている。CPU13は、この制御プログラムを読み出して、そのプログラムに記述された処理ステップを実行することにより各種の処理を実行する。
【0026】
操作部16は、モード選択ダイヤル18,レリーズボタン19,十字キー21などからなる。モード選択ダイヤル18は、静止画撮影モード,動画撮影モード,再生モードなどの各種動作モードを選択する。再生モードでは、メモリーカード12に記録した静止画データや動画データをLCDパネル23に再生表示する。レリーズボタン24は、撮影実行ボタンであり、静止画撮影モードにおいては、これを1回押下すると1回の静止画撮影が実行される。他方、動画撮影モードでは、レリーズボタン24を1回押すと動画撮影が開始され、もう1回押すと動画撮影が終了する。
【0027】
十字キー21は、動作モードに応じて複数の役割を持つ汎用キーである。十字キー21は、例えば、略円板状のキー本体を有し、その表面の上下左右がそれぞれ押圧部になっており、各押圧部にはそれぞれ上下左右の矢印がマーキングされている。静止画及び動画の各撮影モードでは、上下の押圧部がズームキーに割り当てられる。また、LCDパネル23に画像選択用のインデックス画面やセットアップ画面が表示されている場合には、十字キー21は、画面上に表示される画像又は項目を選択するためのカーソルを移動するカーソル移動キーに割り当てられる。
【0028】
また、再生モードにおいて動画を再生する場合には、十字キー21が動画再生キーとなる。上下の各押圧部がそれぞれ再生開始キーと再生停止キーに割り当てられ、上押圧部を押下すると、記録したフレームレートで再生を行う標準再生が開始され、下押圧部を押下すると、再生が停止される。このデジタルカメラ10は、標準再生の他に、標準速度で逆方向に再生する逆再生や、順方向及び逆方向のそれぞれの再生を倍速で行う早送り再生及び早戻し再生などの特殊再生ができるようになっている。早送り再生及び早戻し再生の再生速度は、それぞれ15倍速と30倍速の2段階で切り替えられるようになっている。
【0029】
動画再生をした場合には、左右の各押圧部は、それぞれ特殊再生キーとなる。右押圧部は早送りキーとなり、左の押圧部は早戻しキーとなる。標準再生が開始された後、右押圧部が1回押されると、15倍速で早送り再生が開始される。さらにもう1回押すと、再生速度が30倍速に切り替えられる。他方、標準再生が行われているときに、左押圧部を1回押すと、逆再生が行われる。もう1回押下すると再生速度が15倍速の早戻し再生が行われ、さらにもう1回押下すると再生速度が30倍速になる。
【0030】
RAM26は、CPU13などが各種処理を実行する際に使用するための作業用メモリである。RAM26としては、例えば、バスクロック信号に同期してデータ転送を行うSDRAM(Synchronous Dynamic Random Access Memory)が使用される。メディアI/F27は、メモリーカード12へのデータの書き込みと書き込まれたデータの読み出しを行う。
【0031】
撮像部11は、撮影光学系31,CCDイメージセンサ32,A/Dコンバータ33からなる。CCDイメージセンサ32は、周知のように、多数の受光素子をマトリックス状に配列された光電面を備えており、撮影光学系31を通過して光電面に結像した被写体光を光電変換する。光電面の前方には、各画素に光を集光するためのマイクロレンズアレイと、各画素がそれぞれR,G,Bのいずれかに対応するように各色のフイルタが規則的に配列されたカラーフイルタアレイとが配置されている。CCDイメージセンサ32は、垂直転送クロック及び水平転送クロックに同期して、画素毎に蓄積された電荷を1ラインずつシリアルな撮像信号として出力する。
【0032】
動画撮影は、CCDイメージセンサ32がフレーム(静止画)を所定の周期で連続的に取り込むことにより行われる。フレームの取り込み周期(フレームレート)は、例えば、30フレーム/秒に設定されている。また、1フレーム分の取り込み画素数は、動画撮影時と静止画時とでは異なり、動画撮影の場合には、静止画よりも少ない画素数に設定されている。
【0033】
CCDイメージセンサ32から出力されたRGBのアナログの撮像信号は、A/Dコンバータ33によってデジタルデータに変換されて、フレーム単位で一端RAM26に書き込まれる。RAM26に書き込まれたフレームデータは、図示しない画像補正部によってガンマ補正,シャープネス補正などの各種の画像処理が施された後、YC処理回路28によって、画素データが、RGBの濃度データから構成されるRGBデータから、輝度データYと、青色色差データCb,赤色色差データCrとから構成されるYCデータへ変換される。
【0034】
JPEG圧縮伸張処理回路29は、RAM26にアクセスして、静止画撮影モードで取り込まれた1フレーム分のYCデータを読み出し、このYCデータをJPEG(Joint Photograrhic Expart Group)方式で符号化(エンコード)してデータを圧縮する。エンコードされたデータは、RAM26に順次書き出される。1フレーム分のエンコードが終了した後、エンコード済みデータがJPEGファイルとして、メディアI/F31を介してメモリーカード12に記録される。また、JPEG圧縮伸張処理回路29は、いったんメモリーカード12に記録されたJPEGファイルを再生する際に、復号化(デコード)してデータを伸張する。
【0035】
マイク35は、動画撮影モードにおいて音声を記録するためのもので、このマイク35によって取り込まれたアナログの音声信号は、A/Dコンバータ34によって所定のサンプリング周波数でデジタルデータに変換される。変換された音声データは、いったんRAM26に記録される。
【0036】
MPEG圧縮伸張処理回路36は、動画撮影モードで取り込まれた複数フレーム分のYCデータを、MPEG方式で符号化(エンコード)してデータ圧縮する。また、マイク35によって取り込まれた音声データも所定の方式で符号化がされてデータが圧縮される。なお、MPEG方式では、音声データについては非圧縮データもサポートしているので、音声データについては圧縮しなくてもよい。
【0037】
MPEG圧縮伸張処理回路36は、MPEG圧縮部42とMPEG伸張部43とからなる。MPEG圧縮部42は、圧縮済みのビデオデータと音声データとを多重化してMPEGストリームを生成する。生成されたMPEGストリームが動画ファイルとしてメモリーカード12に記録される。また、MPEG伸張部43は、いったんメモリーカード12に記録されたMPEGストリームを再生する際に、データを復号化(デコード)してデータを伸張する。
【0038】
デコードされたフレームデータ(YCデータ)は、RGB変換処理回路37でRGBデータに変換される。LCDドライバ38は、このRGBデータに基づいてLCDパネル23を駆動する。また、動画再生の場合には、デコードされた音声データは、D/Aコンバータ39によってアナログ信号に変換されてスピーカ41に出力される。
【0039】
図2に示すように、MPEG圧縮部42は、サウンドエンコーダ44,ビデオエンコーダ46,多重化部47,GOPヘッダ位置検出部48からなる。サウンドエンコーダ44は、マイク35によって取り込まれた音声データをRAM26から読み出し、読み出したデータを順次エンコードして、圧縮済みの音声データが時系列に配列されたオーディオストリームを生成する。
【0040】
ビデオエンコーダ46は、RAM26にアクセスしてフレームデータを読み出し、読み出したフレームデータを順次エンコードして、フレームデータを圧縮する。ビデオエンコーダ46は、例えば、15フレーム分のフレームデータを単位としてエンコードを行い1つのGOPを生成する。こうした処理を入力されたフレームデータに対して順次行うことにより、複数のGOPが時系列に配列されたビデオストリームが生成される。図上、GOP1は、ビデオストリームの先頭のGOPであり、このGOP1に続いてGOP2以下の各GOPが時系列に沿って配列される。
【0041】
各GOP1〜nは、複数のフレーム(静止画)データからなるピクチャデータと、このピクチャデータの先頭に付加されるGOPヘッダとから構成される。ピクチャデータは、I(Intra) ピクチャ,P(Predictive)ピクチャ,B(Bidirectionally-predictive)ピクチャの3種類のピクチャデータから構成される。
【0042】
Iピクチャは、フレーム内圧縮のみが行われたフレームであり、単独で原画像を復元可能なフレームデータである。Pピクチャ及びBピクチャは、このIピクチャを含む他のピクチャを参照して原画像が復元されるフレームデータである。Pピクチャは、前(過去)のフレームを参照して時間的に後(未来)のフレームを予測するフレーム間順方向予測を用いて生成されるフレームデータであり、Bピクチャは、前後のフレームを参照してその間のフレームを予測するフレーム間双方向予測を用いて生成されるフレームデータである。
【0043】
MPEG方式では、1つのGOPに少なくとも1つのIピクチャを含めるとともに、各GOPの最初のフレームは必ずIピクチャとなるように規定されている。こうして各GOPの独立性を確保することで、動画再生の際にGOP単位で復号化(デコード)ができるようにしている。
【0044】
GOPヘッダには、1つのGOPの開始を示すスタートコード,音声データと同期を取るためのタイムコードなどが格納される。また、MPEG規格では、このGOPヘッダに、MPEGストリームを作成するユーザーが任意のデータを格納することができる領域であるユーザーデータ領域51を確保することが許容されている。ビデオエンコーダ46は、各GOP1〜nのヘッダにこのユーザーデータ領域51を確保して、ビデオストリームを生成する。各GOP1〜nのユーザーデータ領域51には、後述するように、各GOPと時間的に前後するGOPのアドレス情報が格納される。このGOPアドレス情報は、動画再生の際に、ストリーム中の所望のGOPへアクセスする際に参照される。
【0045】
多重化部47は、オーディオストリームとビデオストリームとを多重化してMPEGストリームを生成する。この多重化処理では、オーディオストリームが、各GOP1〜nの再生時間と対応するサイズに分割され、それぞれのオーディオデータA1〜nが、各GOP1〜nと対応する位置に配置される。
【0046】
GOPヘッダ位置検出部48は、MEPGストリームをRAM26に書き出す際に、ストリーム中の各GOP1〜nのGOPヘッダ位置を検出する。RAM26には、アドレスバッファエリア26aが確保されており、GOPヘッダ位置検出部48は、検出した各GOP1〜nのストリーム中の絶対アドレスをこのアドレスバッファエリア26aに書き込む。例えば、図3に示すように、MPEGストリーム内の各GOP1〜nの先頭位置の絶対アドレスをそれぞれad1〜adnとすると、アドレスバッファエリア26aには、各GOP1〜nの絶対アドレスad1〜adnが順次スタックされていく。CPU13は、スタックされた絶対アドレスに基づいて、各GOPと、それらGOPと時間的に前後するGOPとの相対位置を表す相対アドレスを計算して求める。
【0047】
MPEG圧縮部42からRAM26に出力されたMPEGストリームは、先頭のGOP1から順にメモリーカード12へ書き出される。CPU13は、この書き出しの際に、求めた相対アドレスをGOPアドレス情報として、GOPヘッダのユーザーデータ領域51に格納する。動画撮影時間が長い場合には、MPEGストリーム全体をRAM26に記憶しておくことはできないので、GOPアドレス情報を格納済みのGOPは、動画撮影終了を待たずに、順次メモリーカード12へ書き出される。
【0048】
図4に示すように、各GOPヘッダh1〜hnのユーザーデータ領域51には、前後のGOPの相対アドレスが2つずつ、合計4つの相対アドレスが格納される。すなわち、直前のGOPと2つ前のGOPのそれぞれの相対アドレスと、直後のGOPと2つ後のGOPのそれぞれの相対アドレスが格納される。GOP1の場合には、時間的に前(過去)のGOPは存在しないので、その相対アドレスとしては「0」が格納される。時間的に後(未来)のGOPは、直後のGOPがGOP2となるので、GOP2の絶対アドレスad2からGOP1の絶対アドレスad1を引いた値「ad2−ad1」が直後のGOPの相対アドレスとなる。2つ後のGOPは、GOP3となるので、GOP3の絶対アドレスad3からGOP1の絶対アドレスad1を引いた値が2つ後のGOPの相対アドレスとなる。
【0049】
また、GOP5の場合には、直前のGOPがGOP4となり、2つ前のGOPがGOP3となる。したがって、時間的に前のGOPとして、直前のGOP4との相対アドレス「ad4−ad5」と、2つ前のGOP3との相対アドレス「ad3−ad5」が格納される。他方、直後のGOPはGOP6となり、2つ後のGOPはGOP7となる。したがって、時間的に後のGOPとして、直後のGOP6との相対アドレス「ad6−ad5」と、2つ後のGOP7との相対アドレス「ad7−ad5」が格納される。他のGOPのユーザーデータ領域51についても、同様に前後のGOPとの相対アドレスが格納される。
【0050】
図5に示すように、MPEG伸張部43は、GOP取り込み部52,バッファメモリ53,分離部54,サウンドデコーダ55,ビデオデコーダ56からなる。動画再生時には、メモリーカード12に記録されたMPEGストリームがいったんRAM26に読み出される。MPEG伸張部43は、RAM26に読み出されたMPEGストリームを、GOP単位でデコードする。GOP取り込み部52は、RAM26にアクセスして、CPU13からの再生命令の内容に応じて、MPEGストリームから取り込むべきGOPをサーチして取り込む処理を行う。
【0051】
GOP取り込み部52は、取り込んだGOPのヘッダからGOPアドレス情報(相対アドレス)を抽出し、これをバッファメモリ53に格納する。このバッファメモリ53としては、例えば、DRAMと比較して高速に読み出し可能なSRAM(Static-RAM)が使用される。バッファメモリ53には、例えば、デコード中の1GOP分のGOPアドレス情報が格納される。バッファメモリ53のGOPアドレス情報は、次のGOPが取り込まれたときに、そのGOPのGOPアドレス情報によって順次上書き更新される。もちろん、デコード中のGOPに加えて、既にデコード済みのGOPから抽出したGOPアドレス情報を所定のGOP数分格納しておいてもよい。
【0052】
なお、他の機種で撮影されたMPEGストリームのように、GOPアドレス情報が格納されていない場合には、取り込んだGOPの先頭位置と終端位置の絶対アドレスをバッファメモリ53に格納し、その絶対アドレスを基準に所望のGOPをサーチする。
【0053】
分離部54は、取り込まれたMPEGストリームをビデオストリームとオーディオストリームとに分離する。サウンドデコーダ55は、分離されたオーディオストリームをデコードして、音声データとして出力する。出力された音声データに基づいてスピーカ41が駆動されて、音声が再生される。ビデオデコーダ56は、分離されたビデオストリームをGOP単位で復号化してフレームデータを復元する。このフレームデータがLCDパネル23に出力されて映像が再生される。映像と音声とはGOPヘッダ内のタイムコードによって同期が取られて再生される。
【0054】
図6に示すように、CPU13から標準再生命令を受けた場合には、GOP取り込み部52は、MPEGストリームの先頭のGOP1から順に取り込みを行う。そして、ビデオデコーダ56は、取り込まれたGOP1のフレームf1〜f15をデコードして、復元された全フレームをf1から順に出力する。GOP1のデコードが終了した後、その直後のGOP2をデコードして再生する。こうした処理が順次繰り返されて標準再生が行われる。
【0055】
この標準再生が開始された後、CPU13から特殊再生命令を受けた場合には、MPEG伸張部43は、その内容に応じたGOPの取り込み及びデコード処理を行う。図7は、早送り再生のフレーム再生順序を示す。図7(A)に示すように、15倍速の早送り再生の場合には、GOP取り込み部52は、標準再生と同様に、各GOPを順に取り込む。そして、ビデオデコーダ56は、取り込まれたGOPのIピクチャのみをデコードして、復元されたフレームf1のみを出力する。各GOP毎に1フレームずつ出力されるので、15倍速で早送り再生が行われる。
【0056】
図7(B)のように、30倍速の早送り再生の場合には、GOP取り込み部52は、各GOPを1つおきに取り込む。そして、ビデオデコーダ56は、取り込まれたGOPのIピクチャのみをデコードして、復元されたフレームf1のみを出力する。1つおきにGOPが取り込まれ、各GOP毎に1フレームずつ出力されるので、30倍速で早送り再生が行われる。
【0057】
図8は、逆再生のフレーム再生順序を示す。逆再生を行う場合には、GOP取り込み部52は、GOP3,GOP2,GOP1というように、標準再生とは逆方向に各GOPを順に取り込む。そして、ビデオデコーダ56は、取り込まれたGOPの全ピクチャをデコードし、復元された全フレームf1〜f15を、フレームf15から順に出力する。早戻し再生をする場合には、早送りとは逆方向にGOPを取り込み、各GOP毎にIピクチャのみデコードして、復元された1フレームを出力する。
【0058】
GOP取り込み部52は、GOPの取り込みの際に、バッファメモリ53内にGOPアドレス情報を参照して、次にデコードすべきGOPの格納位置を取得し、MPEGストリーム中の所望のGOPの格納位置へダイレクトにアクセスする。このため、GOP取り込み部52のGOPサーチ処理の負荷が軽減される。特に、逆再生の場合や、図9及び図10に示す30倍速の早送り再生や早戻し再生を行う場合のように、既に取り込んだGOPと、次にデコードすべきGOPとの間隔が空く場合には、各GOP間のデータを逐次読み出して解析する処理が不要となるので、GOPサーチ処理の負荷が大きく軽減される。早送り及び早戻しの再生速度をさらに上げる場合には、取り込んだGOPと次にデコードすべきGOPとの間隔がさらに大きく空くので、その効果はより大きなものとなる。
【0059】
以下、上記構成による作用について、図11及び図12のフローチャートを参照しながら説明する。デジタルカメラ10で動画撮影をする場合には、モード選択ダイヤル18を動画モードにセットして、レリーズボタン19を押下する。これにより動画撮影が開始される。動画撮影が開始されると、撮像部11が30フレーム/秒のフレームレートでフレームデータを取り込む。同時にマイク35から音声データが取り込まれる。MPEG圧縮部42は、RAM26にアクセスして、取り込まれたフレームデータ及び音声データを取り込み、サウンドエンコーダ44及びビデオエンコーダ44によってそれぞれのデータをエンコードする。ビデオエンコーダ46は、15フレーム分のフレームデータを単位としてMPEG方式で順次エンコードを行いGOPを生成する。そして、各GOPのGOPヘッダにユーザーデータ領域51を確保してビデオストリームを生成する。
【0060】
多重化部47は、このビデオストリームと、サウンドエンコーダ44から出力されるオーディオストリームとを多重化してMPEGストリームを生成する。GOPヘッダ位置検出部48は、MPEGストリームをRAM26に書き出す際に、各GOPのMPEGストリーム内の格納アドレス(絶対アドレス)を検出して、アドレスバッファエリア26aにスタックする。CPU13は、MPEGストリームをメモリーカード12に書き出す際に、各GOPのユーザーデータ領域51に前後のGOPとの相対アドレスを格納する。こうした処理をレリーズボタン19がもう1度押されるまで繰り返される。レリーズボタン19が押されると、動画撮影が終了する。
【0061】
メモリーカード12へ記録した動画を再生する場合には、モード選択ダイヤル18で再生モードに切り替える。そうすると、LCDパネル23にメモリーカード12に記録された動画及び静止画のインデックス画面が表示される。十字キー21を操作して画面上のカーソルを移動して所望の動画を選択する。選択を確定し、十字キー21の上押圧部を押下すると標準再生が開始される。
【0062】
CPU13は、メモリーカード12から選択されたMPEGストリームをRAM26に読み出す。MPEG伸張部43は、RAM26にアクセスしてMPEGストリームの先頭から1GOP取り込む。取り込んだGOP1は、全フレームが復元されて再生される。GOP取り込み部52は、取り込んだGOPのヘッダにその前後のGOPアドレス情報が格納されている場合には、それをバッファメモリ53に格納する。再生停止指示又は特殊再生指示がない限り、デコードしたGOPの直後のGOPを順次取り込んで標準再生が行われる。
【0063】
早送り再生,逆再生,早戻し再生などの特殊再生指示があった場合には、MPEG伸張部43は、その内容に応じて、GOPの取り込み及びデコードを行う。GOPの取り込みは、バッファメモリ53に格納されたGOPアドレス情報に基づいて次にデコードすべきGOPへダイレクトにアクセスできるので、GOPサーチ処理の負荷が少ない。このため、マシンリソースが少ない場合でもスムーズな特殊再生を行うことができる。
【0064】
また、GOPアドレス情報は、MPEG規格で許容されているユーザーデータ領域に格納される。このため、DVD−Videoフォーマットのように、GOP位置参照用のインフォメーションファイルを必要としないので、MPEGストリームの取り扱いが煩雑化することはない。また、GOPアドレス情報が格納されたMPEGストリームを、GOPアドレス情報に対応していない再生装置で再生した場合でも問題なく再生することができる。
【0065】
本例では、動画記録の際に、MPEGストリームをRAMにいったん書き出した後、ユーザーデータ領域にGOPアドレス情報を格納しているが、MPEGストリームをRAMに書き出す前、すなわちMPEGストリームを生成中に、リアルタイムでGOPアドレス情報を格納してもよい。この場合には、例えば、図13に示すMPEG圧縮部61のように、GOPアドレス情報格納部62を設ける。そして、多重化部47が、多重化する際に、多重化処理済みの各GOPの格納アドレスを検出して、そのアドレス(絶対アドレス)をバッファメモリ63にスタックする。GOPアドレス情報格納部62は、スタックされた格納アドレスに基づいて相対アドレスを計算し、各GOPヘッダのユーザーデータ領域にアドレス情報を格納する。MPEGストリームは、GOPアドレス情報が格納された状態でRAM26に書き出される。
【0066】
例えば、GOP1,GOP2,GOP3というように多重化処理がなされる場合に、これらの絶対アドレスがバッファメモリ63にスタックされる。そして、GOPアドレス情報格納部62は、GOP2をRAM26へ書き出す際に、GOP2のGOPヘッダに、GOP1とGOP2との相対アドレスを格納する。同様に、GOP3をRAM26へ書き出す際には、GOP2とGOP3との相対アドレスが格納される。ただし、この方式の場合には、GOP2のヘッダには、時間的に前のGOP1との相対アドレスしか格納することはできず、時間的に後のGOP3との相対アドレスを格納することはできない。しかし、上述したように、GOPサーチ処理は、順方向再生よりも逆方向再生の方が負荷が大きいので、時間的に前のGOPとの相対アドレスを格納するだけでも十分な効果を期待できる。
【0067】
上記実施形態では、相対アドレスを、時間的に前と後でそれぞれ2つずつ格納するようにしているが、前後それぞれ3つあるいは4つというように、2つ以上のGOPの相対アドレスを格納してもよい。また、相対アドレスを格納するようにしているが、絶対アドレスを使用してもよい。ただし、絶対アドレスを使用すると、記録後、MPEGストリームが分割されたり他のストリームと結合された場合には、格納した絶対アドレスが使用できなくなるおそれがある。こうした場合を考慮して、相対アドレスを使用することが好ましい。
【0068】
また、GOPアドレス情報として、ストリーム中のアドレス値を例に説明したが、アドレス値の代わりに、ストリーム中のパック数を使用してもよい。図14(A)に示すように、MPEGストリームは、そのコンテンツデータが、2KByte(2048Byte)のサイズを持つ複数のパックに格納される。各パックには、それぞれパックヘッダが設けられている。GOPアドレス情報として、アドレス値の代わりに各GOP間のパック数を使用しても、GOPの相対位置を示す情報として使用することができる。
【0069】
パック数を使用する場合には、例えば、ユーザーデータ領域として、1つのGOPのアドレス情報につき16bit程度を確保しておけばよい。16bitのうちの先頭14bitがパック数に割り当てられ、残りの2bitがGOP識別情報に割り当てられる。GOP識別情報に2bitを割り当てておけば、2×2で4通りの値を表すことができるので、直前と2つ前のGOPと、直後と2つ後のGOPの計4つのGOPを識別することができる。パック数に14bitを割り当てておけば、約1万6千パックまで表すことができる。1パックが2KByteなので、約40MByteのGOP間隔を表すことができる。GOPの間隔は、実際上、大きくても数MByte以内に収まるので、この程度のbit数を割り当てておけば十分である。もちろん、これは1例であり、これよりも大きな領域を確保してもよいし、小さくてもよい。
【0070】
また、上記実施形態では、早送り再生,早戻し再生の例として、15倍速と30倍速の例で説明したが、これ以外の速度の再生ができるようにしてもよい。例えば、1つのGOP内の15フレームを1つおきに再生すれば、2倍速再生となり、2つおきに再生すれば、約4倍速再生となる。また、GOPを2つおきに飛ばして取り込み、取り込んだGOP内のフレームを1フレームずつ再生していけば、60倍速再生となる。
【0071】
上記実施形態では、MPEGストリームをビデオストリームに音声データを加えたものとして説明したが、音声データはなくてもよい。また、デジタルカメラを例に説明したが、本発明を、カメラ付き携帯電話やカメラ付きPDA(Personal Digital Assistant) などの各種携帯端末に適用してもよい。少ないマシンリソースを利用してスムーズな特殊再生を行うという本発明の目的に照らせば、こうした携帯用機器には特に有効である。
【0072】
また、動画データ再生方法及び装置をデジタルカメラに適用した例で説明したが、デジタルカメラに限らず、DVDプレーヤーやCDプレーヤーなど動画データを再生する各種再生装置に適用することができる。もちろん、パーソナルコンピュータ上で動作する動画再生ソフトウエアにも適用することができる。また、動画データを記録するストレージメディアの例としてメモリーカードやマイクロドライブを例に説明しているが、この他、ハードディスク,DVDメディア,CDメディア,MOメディアなど各種のストレージメディアに適用することができる。
【0073】
【発明の効果】
以上詳細に説明したように、本発明は、ビデオストリームの各フレームグループの先頭に付加されるグループヘッダに、各フレームグループと時間的に前後する他のフレームグループのアドレス情報を格納することにより、前記アドレス情報を参照して所望のフレームグループへダイレクトにアクセスできるようにしたから、フレームグループのサーチ処理の負荷を軽減することができる。このため、少ないマシンリソースでもスムーズな特殊再生が可能となる。また、ビデオストリーム内にアドレス情報を格納したので、ビデオストリームとは別に、フレームグループの格納位置を記録した参照用データを利用しなくて済む。そのため、データの取り扱いが煩雑化することもない。
【図面の簡単な説明】
【図1】本発明を適用したデジタルカメラの電気構成の概略を示すブロック図である。
【図2】MPEG圧縮部の構成図である。
【図3】アドレスバッファエリアへのGOPアドレスの取り込み方法を示す説明図である。
【図4】ユーザーデータ領域へのGOPアドレス格納方法を示す説明図である。
【図5】MPEG伸張部の構成図である。
【図6】標準再生のフレーム再生順序を示す説明図である。
【図7】早送り再生のフレーム再生順序を示す説明図である。
【図8】逆再生のフレーム再生順序を示す説明図である。
【図9】30倍速早送り時のGOP取り込み手順を示す説明図である。
【図10】30倍速早戻し時のGOP取り込み手順を示す説明図である。
【図11】動画記録手順を示すフローチャートである。
【図12】動画再生手順を示すフローチャートである。
【図13】本発明の別の実施形態を示す図である。
【図14】本発明のさらに別の実施形態を示す図である。
【符号の説明】
10 デジタルカメラ
13 CPU
26 RAM
26a アドレスバッファエリア
36 MPEG圧縮伸張処理回路
42 MPEG圧縮部
43 MPEG伸張部
46 ビデオエンコーダ
48 GOPヘッダ位置検出部
51 ユーザーデータ領域
52 GOP取り込み部
53 バッファメモリ[0001]
BACKGROUND OF THE INVENTION
The present invention encodes a video signal with a frame group composed of a plurality of frame data as a minimum unit, and records a moving image stream in which the plurality of encoded frame groups are arranged in time series on a storage medium. The present invention relates to a moving image data recording method and apparatus, and a reproducing method and apparatus for reproducing the moving image data in a composite manner.
[0002]
[Prior art]
A moving image data recording method is known in which an analog video signal is converted into digital data, and the converted video data is encoded and recorded. A typical moving picture data encoding method is the MPEG (Moving Pictures Experts Group) method. The moving image data encoded by the MPEG method is called an MPEG stream. The MPEG stream is recorded as a moving image file (MPEG file or the like) on various storage media such as a hard disk, a memory card, and a DVD medium.
[0003]
In general, in addition to a video (video) stream, an audio (sound) stream corresponding to the video stream is added to the MPEG stream. The video stream is divided into a plurality of units called GOP (Group Of Picture). The plurality of GOPs are arranged in time series. When a sound stream is added, the sound stream is time-divided into a size corresponding to the GOP, and the divided data is inserted into a position corresponding to each GOP and multiplexed.
[0004]
The GOP is a frame group composed of picture data composed of a plurality of frame (still image) data and a GOP header added to the head of the picture data. Encoding is performed in units of the GOP. The picture data is composed of, for example, 15 frames of frame data. If the frame rate is 30 frames / second, 1 GOP becomes a moving image of about 0.5 seconds.
[0005]
One frame has spatial redundancy such that adjacent pixels are similar, and multiple frames that are temporally continuous are similar in the preceding and following frames. Has temporal redundancy. In the MPEG system, data compression is performed by performing intra-frame compression that eliminates spatial redundancy of one frame and inter-frame compression that eliminates temporal redundancy between a plurality of frames. In inter-frame compression, each frame in a GOP is encoded using a technique such as inter-frame prediction or motion compensation.
[0006]
When playing back a moving image, the encoded GOP is decoded. In the MPEG system, the independence of the GOP is ensured so that it can be decoded in units of each GOP. Therefore, an arbitrary GOP can be taken out from the MPEG stream and reproduced. The GOP header is used as an entry point when capturing a GOP from an MPEG stream.
[0007]
In standard reproduction in which reproduction is performed at the recorded frame rate, first the GOP at the head of the stream is read out, decoded to restore all the frames in the GOP, and each frame is reproduced in order. For the next GOP, the header is detected with reference to the end position of the first GOP that has already been captured, and is reproduced. Such a process is repeated to perform standard reproduction.
[0008]
Various types of MPEG stream playback devices have been developed (for example, Patent Document 1). In addition to standard playback, special playback such as reverse playback, fast forward playback, and fast reverse playback is available for such playback devices. Some can do this. For example, if one GOP is composed of 15 frames, fast-forward playback can be performed at 15 times speed by reproducing only one frame for each GOP. Also, if only one frame is reproduced for each GOP while skipping one GOP, fast-forward reproduction can be performed at 30 times speed.
[0009]
When performing such special playback, the GOP search method is the same as the standard playback described above, and the MPEG stream data is read from the GOP storage position that has already been read and analyzed. Thus, the header of the desired GOP is detected.
[0010]
[Patent Document 1]
JP-A-8-168042
[0011]
[Problems to be solved by the invention]
However, in the GOP search method described above, data must be read and analyzed from the start or end address of the fetched GOP until the next GOP header is detected. In the case of standard playback, this search method is not a problem because it is sufficient to capture the GOP immediately after the end position of the captured GOP, but in special playback such as reverse playback, fast forward playback, and fast reverse playback, There is a problem that the load on the GOP search process increases because the interval from the start position or the end position of the fetched GOP to the GOP header as the entry point is large.
[0012]
For example, in the case of reverse reproduction, the GOP immediately before the captured GOP must be captured. In this case, the picture data of the immediately preceding GOP is arranged between the head position of the captured GOP and the header of the immediately preceding GOP. For this reason, the GOP search processing load is larger because the interval between GOPs is larger than that in the standard reproduction. Further, in fast forward playback and fast reverse playback in which every other GOP must be taken in, the gap between GOPs is greatly increased, and the load of the GOP search processing becomes larger.
[0013]
If the processing power of the CPU is low and the machine resources are small, such as a small amount of memory, if the load of the GOP search processing is large, the processing cannot be performed smoothly, and fast-forward playback and fast-rewind playback are possible. In addition to being able to increase the speed, there are cases where smooth playback is not possible even when the playback speed is relatively low, such as in reverse playback.
[0014]
Therefore, in the DVD-Video format, which is a recording format dedicated to video playback standardized by the DVD Forum, an organization that promotes the establishment and spread of the DVD standard, each GOP in the MPEG stream is separate from the MPEG stream (video file). An information file in which the storage location is recorded is prepared and stored in the medium together with the MPEG stream. In this case, since the GOP storage position to be decoded next can be obtained by referring to the information file, the load of the GOP search process can be reduced.
[0015]
However, the MPEG stream is used in various scenes other than being used in the DVD-Video format, and in many such scenes, the MPEG stream alone is often handled. For this reason, the method of attaching an information file for referring to the GOP position separately from the MPEG stream, such as the DVD-Video format, causes a complicated handling of the file when performing file copying or file movement. .
[0016]
The present invention relates to a moving image data recording method and apparatus for recording moving image data in a form capable of smooth special reproduction with few machine resources and maintaining ease of handling, and moving image data recorded by the recording method and apparatus An object of the present invention is to provide a reproducing method and a reproducing apparatus.
[0017]
[Means for Solving the Problems]
To achieve the above object, the present invention encodes a frame group composed of a plurality of frame data as a unit, and stores a video stream in which the plurality of encoded frame groups are arranged in time series as a storage medium. In the method of recording moving image data to be recorded, the video stream is recorded by storing address information of other frame groups temporally before and after each frame group in a group header added to the head of each frame group. It is characterized by that.
[0018]
The address information is preferably a relative address representing a relative positional relationship between the storage position of each frame group and the storage positions of other frame groups that are temporally adjacent to the frame group.
[0019]
The group header stores address information of at least four frame groups of the immediately preceding frame group, the immediately preceding frame group, the immediately following frame group, and the immediately following frame group.
[0020]
The video stream is an MPEG standard video stream, and the frame group is a GOP.
[0021]
The moving image data recording apparatus of the present invention encodes a frame group composed of a plurality of frame data as a unit, and records a video stream in which a plurality of encoded frame groups are arranged in time series on a storage medium. The data recording apparatus is characterized by comprising address storage means for storing address information of other frame groups temporally preceding and following each frame group in a group header added to the head of each frame group.
[0022]
The moving image data reproduction method of the present invention encodes a video stream in which a plurality of encoded frame groups are arranged in chronological order by encoding a frame group composed of a plurality of frame data as a minimum unit. In the moving image data reproducing method for decoding and reproducing in units of groups, the group header added to the head of each frame group includes the address information of other frame groups temporally surrounding each frame group. In this case, the storage location of the frame group to be decoded next is directly accessed based on the address information.
[0023]
The moving image data reproducing apparatus of the present invention encodes a moving image stream in which a plurality of encoded frame groups are arranged in a time series encoded with a frame group composed of a plurality of frame data as a minimum unit. In a moving image data reproducing apparatus that decodes and reproduces a frame group as a unit, the group header added to the head of each frame group includes address information of other frame groups that are temporally mixed with each frame group. If there is, access means for directly accessing the storage position of the next frame group to be decoded based on the address information is provided.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing an outline of an electrical configuration of a digital camera 10 to which the present invention is applied. The digital camera 10 has a moving image shooting function in addition to a still image shooting function, and records a still image or a moving image shot by the imaging unit 11 in the memory card 12. The memory card 12 is detachably set in a card slot provided in the camera body. As the memory card 12, for example, a storage medium such as smart media (product name), xD picture card (product name), and compact flash (registered trademark) is used. Of course, in addition to the memory card 12, a storage medium such as a microdrive (trade name) may be used.
[0025]
The
[0026]
The operation unit 16 includes a
[0027]
The cross key 21 is a general-purpose key having a plurality of roles according to the operation mode. The cross key 21 has, for example, a substantially disc-shaped key body, and the upper, lower, left, and right surfaces of the cross key 21 serve as pressing portions, and the upper, lower, left, and right arrows are marked on each pressing portion. In each still image and moving image shooting mode, the upper and lower pressing portions are assigned to the zoom keys. Further, when an index screen for image selection or a setup screen is displayed on the
[0028]
In addition, when a moving image is reproduced in the reproduction mode, the cross key 21 becomes a moving image reproduction key. The upper and lower pressing parts are assigned to the playback start key and the playback stop key, respectively. When the upper pressing part is pressed, standard playback is started at the recorded frame rate, and when the lower pressing part is pressed, playback is stopped. The In addition to the standard playback, the digital camera 10 can perform special playback such as reverse playback in the reverse direction at the standard speed, fast forward playback and fast reverse playback in which the playback in the forward direction and the reverse direction is performed at double speed, respectively. It has become. The playback speed of fast forward playback and fast reverse playback can be switched in two stages of 15 × speed and 30 × speed, respectively.
[0029]
When the moving image is played back, the left and right pressing parts become special playback keys. The right pressing part serves as a fast forward key, and the left pressing part serves as a fast reverse key. When the right pressing portion is pressed once after the standard reproduction is started, fast-forward reproduction is started at 15 times speed. When pressed once more, the playback speed is switched to 30 times speed. On the other hand, when standard reproduction is being performed, if the left pressing portion is pressed once, reverse reproduction is performed. When the button is pressed once again, fast-rewind playback is performed at a playback speed of 15 times. When the button is pressed again, the playback speed is 30 times faster.
[0030]
The
[0031]
The imaging unit 11 includes a photographing
[0032]
Moving image shooting is performed when the
[0033]
The RGB analog imaging signals output from the
[0034]
The JPEG compression /
[0035]
The
[0036]
The MPEG compression /
[0037]
The MPEG compression /
[0038]
The decoded frame data (YC data) is converted into RGB data by the RGB
[0039]
As shown in FIG. 2, the MPEG compression unit 42 includes a
[0040]
The
[0041]
Each GOP 1 to n is composed of picture data composed of a plurality of frame (still image) data and a GOP header added to the head of the picture data. The picture data is composed of three types of picture data: an I (Intra) picture, a P (Predictive) picture, and a B (Bidirectionally-predictive) picture.
[0042]
An I picture is a frame that has been subjected only to intra-frame compression, and is frame data that can independently restore an original image. The P picture and the B picture are frame data in which the original image is restored with reference to other pictures including the I picture. A P picture is frame data generated using inter-frame forward prediction that refers to a previous (past) frame and predicts a temporally subsequent (future) frame. It is frame data generated using inter-frame bi-directional prediction that refers to and predicts frames between them.
[0043]
In the MPEG system, at least one I picture is included in one GOP, and the first frame of each GOP is defined to be an I picture. By ensuring the independence of each GOP in this way, decoding (decoding) can be performed in units of GOPs during moving image reproduction.
[0044]
The GOP header stores a start code indicating the start of one GOP, a time code for synchronizing with audio data, and the like. Further, according to the MPEG standard, it is allowed to secure a
[0045]
The multiplexing unit 47 multiplexes the audio stream and the video stream to generate an MPEG stream. In this multiplexing process, the audio stream is divided into sizes corresponding to the playback times of the GOPs 1 to n, and the audio data A1 to n are arranged at positions corresponding to the GOPs 1 to n.
[0046]
The GOP
[0047]
The MPEG stream output from the MPEG compression unit 42 to the
[0048]
As shown in FIG. 4, the
[0049]
In the case of GOP5, the immediately preceding GOP becomes GOP4, and the previous GOP becomes GOP3. Therefore, the relative address “ad4-ad5” with the previous GOP4 and the relative address “ad3-ad5” with the previous GOP3 are stored as the previous GOP in terms of time. On the other hand, the next GOP becomes GOP6, and the second GOP becomes GOP7. Therefore, the relative address “ad6-ad5” with the immediately subsequent GOP6 and the relative address “ad7-ad5” with the second subsequent GOP7 are stored as the temporally subsequent GOP. Similarly, the
[0050]
As shown in FIG. 5, the MPEG decompression unit 43 includes a
[0051]
The
[0052]
When GOP address information is not stored as in an MPEG stream shot with another model, the absolute addresses of the head position and end position of the captured GOP are stored in the buffer memory 53, and the absolute address is stored. The desired GOP is searched based on the above.
[0053]
The
[0054]
As shown in FIG. 6, when the standard reproduction command is received from the
[0055]
When the special reproduction command is received from the
[0056]
As shown in FIG. 7B, in the case of fast-forward playback at 30 times speed, the
[0057]
FIG. 8 shows the frame playback order of reverse playback. When reverse playback is performed, the
[0058]
The
[0059]
Hereinafter, the operation of the above configuration will be described with reference to the flowcharts of FIGS. 11 and 12. When shooting a moving image with the digital camera 10, the
[0060]
The multiplexing unit 47 multiplexes the video stream and the audio stream output from the
[0061]
When the moving image recorded on the memory card 12 is reproduced, the
[0062]
The
[0063]
When there is a special playback instruction such as fast forward playback, reverse playback, and fast reverse playback, the MPEG decompression unit 43 captures and decodes the GOP according to the contents. Since the GOP is fetched, the GOP to be decoded next can be directly accessed based on the GOP address information stored in the buffer memory 53, so that the load of the GOP search process is small. Therefore, smooth special playback can be performed even when machine resources are small.
[0064]
The GOP address information is stored in a user data area permitted by the MPEG standard. Therefore, unlike the DVD-Video format, an information file for referring to the GOP position is not required, so that handling of the MPEG stream is not complicated. Also, even when an MPEG stream storing GOP address information is played back by a playback device that does not support GOP address information, it can be played back without any problem.
[0065]
In this example, the GOP address information is stored in the user data area after the MPEG stream is once written to the RAM at the time of moving image recording. However, before the MPEG stream is written to the RAM, that is, during the generation of the MPEG stream, GOP address information may be stored in real time. In this case, for example, a GOP address
[0066]
For example, when multiplexing processing is performed such as GOP1, GOP2, and GOP3, these absolute addresses are stacked in the buffer memory 63. The GOP address
[0067]
In the above embodiment, two relative addresses are stored before and after in time, but relative addresses of two or more GOPs are stored, such as three or four each before and after. May be. Further, although a relative address is stored, an absolute address may be used. However, if an absolute address is used, if the MPEG stream is divided or combined with another stream after recording, the stored absolute address may not be usable. In consideration of such a case, it is preferable to use a relative address.
[0068]
Further, although the address value in the stream has been described as an example of the GOP address information, the number of packs in the stream may be used instead of the address value. As shown in FIG. 14A, the content data of the MPEG stream is stored in a plurality of packs having a size of 2 KB (2048 bytes). Each pack is provided with a pack header. Even if the number of packs between each GOP is used as the GOP address information instead of the address value, it can be used as information indicating the relative position of the GOP.
[0069]
When the number of packs is used, for example, about 16 bits may be secured for the address information of one GOP as the user data area. The first 14 bits of 16 bits are assigned to the number of packs, and the remaining 2 bits are assigned to GOP identification information. If 2 bits are allocated to the GOP identification information, 4 values can be represented by 2 × 2, and therefore, a total of 4 GOPs, i.e., the immediately preceding and 2 previous GOPs and the immediately following and 2 subsequent GOPs are identified. be able to. If 14 bits are assigned to the number of packs, about 16,000 packs can be represented. Since one pack is 2 KBytes, a GOP interval of about 40 MBytes can be expressed. Since the GOP interval is practically within a few MBytes at most, it is sufficient to allocate this number of bits. Of course, this is only an example, and a larger area may be secured or smaller.
[0070]
In the above-described embodiment, the examples of 15-times speed and 30-times speed have been described as examples of fast-forward reproduction and fast-rewind reproduction. However, reproduction at other speeds may be performed. For example, if every 15 frames in one GOP are played back, the playback is double speed playback, and if every other frame is played back, playback is about 4 times speed playback. If every two GOPs are skipped and fetched, and the frames in the fetched GOP are played back one frame at a time, 60 × speed playback is achieved.
[0071]
In the above-described embodiment, the MPEG stream has been described as the audio data added to the video stream, but the audio data may not be present. Further, although the digital camera has been described as an example, the present invention may be applied to various portable terminals such as a camera-equipped mobile phone and a camera-equipped PDA (Personal Digital Assistant). In light of the object of the present invention to perform smooth special reproduction using a small number of machine resources, it is particularly effective for such portable devices.
[0072]
Further, although the example in which the moving image data reproducing method and apparatus are applied to a digital camera has been described, the present invention can be applied not only to a digital camera but also to various reproducing apparatuses that reproduce moving image data such as a DVD player and a CD player. Of course, the present invention can also be applied to moving image reproduction software that runs on a personal computer. In addition, a memory card and a micro drive have been described as examples of storage media for recording moving image data. However, the present invention can be applied to various storage media such as hard disks, DVD media, CD media, and MO media. .
[0073]
【The invention's effect】
As described in detail above, the present invention stores the address information of other frame groups temporally surrounding each frame group in the group header added to the head of each frame group of the video stream, Since the desired frame group can be directly accessed with reference to the address information, the load of the frame group search process can be reduced. For this reason, smooth special playback is possible even with a small number of machine resources. In addition, since the address information is stored in the video stream, it is not necessary to use the reference data in which the storage position of the frame group is recorded separately from the video stream. Therefore, handling of data is not complicated.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an outline of an electrical configuration of a digital camera to which the present invention is applied.
FIG. 2 is a configuration diagram of an MPEG compression unit.
FIG. 3 is an explanatory diagram showing a method for fetching a GOP address into an address buffer area.
FIG. 4 is an explanatory diagram showing a method for storing a GOP address in a user data area.
FIG. 5 is a configuration diagram of an MPEG decompression unit.
FIG. 6 is an explanatory diagram showing a frame playback order of standard playback.
FIG. 7 is an explanatory diagram showing a frame playback order for fast-forward playback.
FIG. 8 is an explanatory diagram showing a frame playback order in reverse playback.
FIG. 9 is an explanatory diagram showing a GOP capturing procedure at the time of 30-times fast forward.
FIG. 10 is an explanatory diagram showing a GOP loading procedure at the time of 30 × fast reverse.
FIG. 11 is a flowchart showing a moving image recording procedure.
FIG. 12 is a flowchart showing a moving image playback procedure.
FIG. 13 is a diagram showing another embodiment of the present invention.
FIG. 14 is a diagram showing still another embodiment of the present invention.
[Explanation of symbols]
10 Digital camera
13 CPU
26 RAM
26a Address buffer area
36 MPEG compression / decompression processing circuit
42 MPEG compression section
43 MPEG decompression section
46 Video encoder
48 GOP header position detector
51 User data area
52 GOP importer
53 Buffer memory
Claims (5)
各GOPの先頭に付加されるGOPヘッダ内のユーザーデータ領域に、各GOPと時間的に前後する他のGOPとの相対位置を表すGOPアドレス情報として、各GOP間のパック数を格納して前記MPEGストリームを記録することを特徴とする動画データの記録方法。In a method for recording moving image data in which a GOP composed of a plurality of frame data is encoded as a unit and an MPEG stream in which a plurality of encoded GOPs are arranged in time series is recorded on a storage medium.
In the user data area in the GOP header added to the head of each GOP, the number of packs between each GOP is stored as GOP address information indicating the relative position between each GOP and other GOPs temporally preceding and following. A moving image data recording method, wherein an MPEG stream is recorded.
各GOPの先頭に付加されるGOPヘッダ内のユーザーデータ領域に、各GOPと時間的に前後する他のGOPの相対位置を表すGOPアドレス情報を格納するアドレス格納手段を備えており、前記GOPアドレス情報として各GOP間のパック数を使用することを特徴とする動画データの記録装置。In a moving image data recording apparatus that records a MPEG stream in which a GOP composed of a plurality of frame data is encoded as a unit and the plurality of encoded GOPs are arranged in time series on a storage medium,
Address storage means for storing GOP address information indicating the relative position of other GOPs temporally preceding and following each GOP is provided in the user data area in the GOP header added to the head of each GOP, and the GOP address A moving image data recording apparatus using the number of packs between GOPs as information.
各GOPの先頭に付加されるGOPヘッダ内のユーザーデータ領域に、各GOPと時間的に前後する他のGOPとのGOPアドレス情報として各GOP間のパック数が含まれている場合には、前記GOPアドレス情報に基づいて、次に復号化すべきGOPの格納位置へダイレクトにアクセスすることを特徴とする動画データの再生方法。Video data that is encoded with a GOP composed of a plurality of frame data as a minimum unit, and is decoded and played back by decoding the MPEG stream in which the plurality of encoded GOPs are arranged in time series. In the playback method,
When the number of packs between GOPs is included in the user data area in the GOP header added to the head of each GOP as GOP address information of each GOP and other GOPs that are temporally mixed, A method of reproducing moving image data, characterized in that, based on GOP address information, a storage location of a GOP to be decoded next is directly accessed.
各GOPの先頭に付加されるGOPヘッダ内のユーザーデータ領域に、各GOPと時間的に前後する他のGOPとGOPアドレス情報として各GOP間のパック数が含まれている場合には、前記GOPアドレス情報に基づいて、次に復号化すべきGOPの格納位置へダイレクトにアクセスするアクセス手段を備えたことを特徴とする動画データの再生装置。Video data that is encoded with a GOP composed of a plurality of frame data as a minimum unit, and is decoded and played back by decoding the MPEG stream in which the plurality of encoded GOPs are arranged in time series. In the playback device,
When the user data area in the GOP header added to the head of each GOP contains the number of packs between each GOP as GOP address information with other GOPs that are temporally mixed with each GOP, the GOP An apparatus for reproducing moving image data, comprising access means for directly accessing a storage location of a GOP to be decoded next based on address information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003063825A JP4446669B2 (en) | 2003-03-10 | 2003-03-10 | Moving image data recording method and reproducing method thereof, moving image data recording device and reproducing device thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003063825A JP4446669B2 (en) | 2003-03-10 | 2003-03-10 | Moving image data recording method and reproducing method thereof, moving image data recording device and reproducing device thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004274488A JP2004274488A (en) | 2004-09-30 |
JP4446669B2 true JP4446669B2 (en) | 2010-04-07 |
Family
ID=33125310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003063825A Expired - Fee Related JP4446669B2 (en) | 2003-03-10 | 2003-03-10 | Moving image data recording method and reproducing method thereof, moving image data recording device and reproducing device thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4446669B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4944484B2 (en) * | 2006-04-20 | 2012-05-30 | キヤノン株式会社 | Playback apparatus, playback method, and program |
CN101977326B (en) * | 2010-11-22 | 2012-05-09 | 天柏宽带网络科技(北京)有限公司 | Stunt stream generation method based on MPEG (Moving Picture Experts Group)-2 transmission stream |
CN108401110B (en) * | 2018-03-18 | 2020-09-08 | Oppo广东移动通信有限公司 | Image acquisition method and device, storage medium and electronic equipment |
-
2003
- 2003-03-10 JP JP2003063825A patent/JP4446669B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2004274488A (en) | 2004-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3632703B2 (en) | Video recording apparatus and video recording method | |
JP3912536B2 (en) | RECORDING METHOD, RECORDING DEVICE, RECORDING MEDIUM, IMAGING DEVICE, AND IMAGING METHOD | |
US20060110055A1 (en) | Recorder and method therefor, player and therefor, program, and recording medium | |
US20090154551A1 (en) | Apparatus for recording/reproducing moving picture, and recording medium thereof | |
KR20090064273A (en) | Recording apparatus, reproducing apparatus, recoding method, reproducing method and storing medium having program to perform the method | |
JP3814565B2 (en) | Recording device | |
JP2009225361A (en) | Recording device and recording method, and editing device and editing method | |
US20090153704A1 (en) | Recording and reproduction apparatus and methods, and a storage medium having recorded thereon computer program to perform the methods | |
JP5164610B2 (en) | Imaging apparatus and control method thereof | |
US20090153677A1 (en) | Recording and reproduction apparatus and methods, and a recording medium storing a computer program for executing the methods | |
JP4446669B2 (en) | Moving image data recording method and reproducing method thereof, moving image data recording device and reproducing device thereof | |
JP2001333376A (en) | Image recorder and image recording method | |
KR20090064278A (en) | Recording apparatus, replaying apparatus, recording method, replaying method and program recording medium | |
JP3683462B2 (en) | Movie display device | |
JP5290568B2 (en) | Moving picture recording apparatus, moving picture reproducing apparatus, and program | |
JP7349815B2 (en) | Imaging device and its control method and program | |
US20100195989A1 (en) | Image reproducing apparatus and image reproducing method | |
JP3902824B2 (en) | Image processing apparatus and method | |
KR101480407B1 (en) | Digital image processing apparatus, method for controlling the same and medium of recording the method | |
JP2007324663A (en) | Video camera | |
US20090040382A1 (en) | Camera apparatus and still image generating method of camera apparatus | |
JP2007318368A (en) | Apparatus and method for image processing | |
JP4159511B2 (en) | Image acquisition apparatus and imaging apparatus | |
JP4395282B2 (en) | Image and audio playback device | |
JP2012227615A (en) | Recording and reproducing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060808 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060816 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060925 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20061101 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20061204 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061213 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20070123 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20070223 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100119 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130129 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |