JP2004179695A - Recording method - Google Patents
Recording method Download PDFInfo
- Publication number
- JP2004179695A JP2004179695A JP2002340084A JP2002340084A JP2004179695A JP 2004179695 A JP2004179695 A JP 2004179695A JP 2002340084 A JP2002340084 A JP 2002340084A JP 2002340084 A JP2002340084 A JP 2002340084A JP 2004179695 A JP2004179695 A JP 2004179695A
- Authority
- JP
- Japan
- Prior art keywords
- picture
- video data
- data
- mpeg
- track
- 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
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
【課題】MPEG−2規格に従ってエンコードされた2つのビデオデータをつなげて記録する際に、連結部分の画像をできるだけ乱れないようにする。
【解決手段】第2のビデオデータをつなげる場所が第1のビデオデータのIピクチャまたはPピクチャの後である場合であって、IピクチャまたはPピクチャに後続するBピクチャが存在する場合は、第2のビデオデータをつなげる場所をBピクチャの後に変更し、第2のビデオデータをつなげる場所が第1のビデオデータのIピクチャまたはPピクチャの後である場合であって、IピクチャまたはPピクチャに後続するBピクチャが存在しない場合は、第2のビデオデータをつなげる場所をIピクチャまたはPピクチャの後に変更する。
【選択図】 図1When connecting and recording two video data encoded in accordance with the MPEG-2 standard, an image of a connected portion is prevented from being disturbed as much as possible.
When a place where the second video data is connected is after an I picture or a P picture of the first video data, and a B picture following the I picture or the P picture exists, the second video data is connected. 2 is changed after the B picture, and the place where the second video data is connected is after the I picture or the P picture of the first video data. If there is no subsequent B picture, the place where the second video data is connected is changed after the I picture or P picture.
[Selection diagram] Fig. 1
Description
【0001】
【発明の属する技術分野】
本発明は、MPEG−2規格に従ってエンコードされた第1のビデオデータとMPEG−2規格に従ってエンコードされた第2のビデオデータとをつなげて記録する記録方法に関するものである。
【0002】
【従来の技術】
デジタルビデオデータをエンコードする規格の一つにMPEG−2規格がある。MPEG−2規格については、「ISO/IEC 13818−2 International Standard MPEG−2 Video (Nov. 1994)」に詳しく記載されている。
【0003】
【発明が解決しようとする課題】
しかしながら、MPEG−2規格に従ってエンコードされた2つのビデオデータをつなげて記録する場合において、2つのビデオデータをつなげる場所がGOP(Group of Pictures)内にある場合、連結部分の画像が乱れる可能性がある。
【0004】
従って、本発明の目的は、MPEG−2規格に従ってエンコードされた2つのビデオデータをつなげて記録する際に、連結部分の画像をできるだけ乱れないようにすることである。
【0005】
【課題を解決するための手段】
本発明における記録方法の一つは、MPEG−2規格に従ってエンコードされた第1のビデオデータとMPEG−2規格に従ってエンコードされた第2のビデオデータとをつなげて記録する記録方法であって、前記第2のビデオデータをつなげる場所が前記第1のビデオデータのIピクチャまたはPピクチャの後である場合であって、前記Iピクチャまたは前記Pピクチャに後続するBピクチャが存在する場合は、前記第2のビデオデータをつなげる場所を前記Bピクチャの後に変更し、前記第2のビデオデータをつなげる場所が前記第1のビデオデータのIピクチャまたはPピクチャの後である場合であって、前記Iピクチャまたは前記Pピクチャに後続するBピクチャが存在しない場合は、前記第2のビデオデータをつなげる場所を前記Iピクチャまたは前記Pピクチャの後に変更することを特徴とする。
【0006】
本発明における記録方法の一つは、MPEG−2規格に従ってエンコードされた第1のビデオデータとMPEG−2規格に従ってエンコードされた第2のビデオデータとをつなげて記録する記録方法であって、前記第2のビデオデータをつなげる場所が1つのトラックの途中にある場合は、前記第2のビデオデータを前記トラックから記録し始めることを特徴とする。
【0007】
本発明における記録方法の一つは、MPEG−2規格に従ってエンコードされた第1のビデオデータとMPEG−2規格に従ってエンコードされた第2のビデオデータとをつなげて記録する記録方法であって、前記第2のビデオデータをつなげる場所が1つのトラックの途中にある場合は、前記第2のビデオデータを前記トラックに後続するトラックから記録し始めることを特徴とする。
【0008】
【発明の実施の形態】
(第1の実施の形態)
以下、図面を参照し、本発明における第1の実施の形態を説明する。
第1の実施の形態では、MPEG−2規格に従ってエンコードされた第1のビデオデータのIピクチャまたはPピクチャの後に、MPEG−2規格に従ってエンコードされた第2のビデオデータをつなげて記録する記録方法を説明する。なお、第1のビデオデータは、B0、B1、I2、B3、B4、P5、B6、B7、P8、B9、B10、P11、B12、B13、P14からなるものとし、第2のビデオデータは、B20、B21、I22、B23、B24、P25、B26、B27、P28、B29、B30、P31、B32、B33、P34からなるものとする。BはBピクチャ、IはIピクチャ、PはPピクチャを示す。
【0009】
図1は、P8ピクチャの後に第2のビデオデータを連結する場合を説明する図である。編集予定としては、B6、B7、P8、B20、B21、I22の順に画像をつなげる予定である。第1の実施の形態では、この編集対象の画像がPピクチャであることから、メディア上のデータを書き換える場合、メディア上でP8ピクチャに後続するBピクチャを探し、それが終了する時点(すなわち次のIピクチャまたはPピクチャが現れる時点)を書き換え点とする。この例では、P8に後続するBピクチャは、B6およびB7であるから、B7以降にI22、B20、B21、P25の順に画像を連結する。結果として、メディア上では、P8、B6、B7、I22、B20、B21の順に記録され、再生画像はP5、B6、B7、P8、B20、B21、I22の順に予定した画像が再生される。
【0010】
なお、後続するBピクチャが存在しない場合は、連結先としたIピクチャまたはPピクチャが終了する時点(すなわち次のIピクチャまたはPピクチャが現れる時点)を書き換え点として、新たなビデオデータを連結すればよい。
【0011】
図2は、第1の実施の形態で、MPEGデータを記録したメディアが磁気テープであった場合に追加する処理である。この例では、トラックパターンが図3の様に作成されているとして説明する。この場合の書き換え点は、トラック番号11にある。そこでまず、図2に示すように、一旦、元トラックデータを読み取る。このトラックデータには、B7の後半のデータと、それに続くP11のデータが含まれている。このうち、B7のデータ部分を保存部分として、この後に追加記録データとなるB20のデータを接続する。これを再記録トラックデータとして、あらためてトラック番号16のトラック全体を書き換えるのである。
【0012】
このように、第1の実施の形態における記録方法によれば、第1のビデオデータのIピクチャまたはPピクチャの後に第2のビデオデータをつなげる場合には、IピクチャまたはPピクチャに後続するBピクチャの後の個所から第2のビデオデータをつなげることができるので、連結部分の画像の乱れをできるだけ少なくすることができる。
【0013】
また、第1の実施の形態における記録方法によれば、連結部分のビデオデータの再エンコードを必要としないので、2つのビデオデータを少ない負荷でつなげることができる。
【0014】
(第2の実施の形態)
以下、図面を参照し、本発明における第2の実施の形態を説明する。
第2の実施の形態では、MPEG−2規格に従ってエンコードされた第1のビデオデータのBピクチャの後に、MPEG−2規格に従ってエンコードされた第2のビデオデータをつなげて記録する記録方法を説明する。なお、第1のビデオデータは、B0、B1、I2、B3、B4、P5、B6、B7、P8、B9、B10、P11、B12、B13、P14からなるものとし、第2のビデオデータは、B20、B21、I22、B23、B24、P25、B26、B27、P28、B29、B30、P31、B32、B33、P34からなるものとする。BはBピクチャ、IはIピクチャ、PはPピクチャを示す。
【0015】
図4は、B7ピクチャの後に第2のビデオデータを連結する場合を説明する図である。編集予定としては、B6、B7、B20、B21、I22の順に画像をつなげる予定である。第1の実施の形態では、この編集対象の画像がBピクチャであることから、メディア上のデータを書き換える場合、先行するIピクチャまたはPピクチャの直後のBピクチャから連結個所のBピクチャまでのデータを一時記憶する。この例では、先行するIピクチャまたはPピクチャはB6およびB7ピクチャであるから、これを一時記憶する。
【0016】
この一時記憶した個所のBピクチャについては後方向予測を行った部分を変換する。変換はマクロブロック単位で行う。この様子を図5に示す。すなわち、マクロブロックデータを調べて、その予測方向が前方向予測、後方向予測および両方向予測のいずれを行ったかを判別する(ステップS1)。
【0017】
前方向予測の場合は、何も処理せず、次のマクロブロックの処理に移る。
後方向予測の場合は、参照画像から、参照したマクロブロックを読み出し(ステップS2)、そのデータをそのまま対象としているマクロブロックデータに置換する(ステップS3)。すなわち、後方向予測を行ったマクロブロックについては、マクロブロック全体を置換する。
【0018】
両方向予測の場合は、そのマクロブロックのマクロブロック情報から、後方向予測の動きベクトルデータを除去し(ステップS4)、さらに予測方向の表示を前方予測に変更する(ステップS5)。マクロブロックの持つDCTデータは、そのままにしておく。この結果、両方向予測を行ったマクロブロックについては、DCTデータはそのままで、マクロブロック情報の書き換えにより、前方向予測を行ったマクロブロックと同等なマクロブロックに変換する。
【0019】
一時記憶したマクロブロックの全てのマクロブロックの変換が終了した後、メディア上で先行するIピクチャまたはPピクチャの先頭から、一時記憶したデータを書き、続いて新たなMPEG画像を連結する。図4の例では、P8ピクチャが記録されていた位置から、一時記憶して変換したB6、B7を上書きし、さらに続いて、I22、B20、B21の順に書き込みを行う。結果として、メディア上では、P5、B3、B4、B6、B7、I22、B20、B21の順に記録され、再生画像はP5、B6、B7、B20、B21、I22の順に予定した画像が再生される。
【0020】
なお、第2の実施の形態でのマクロブロック単位の変換を行わなかった場合を図8に示す。メディア上のP8データを上書きにより消去した場合、B6とB7は後方向の予測画像が失われてしまうため、再生できないことになる。
【0021】
このように、第2の実施の形態では、Bピクチャのマクロブロックのうち、後方向予測および両方向予測を行っていたマクロブロックは、元のBピクチャを構成していたデータとは異なることになるが、影響は軽微である。
【0022】
まず、後方向予測を行ったマクロブロックの場合について説明する。
後方向予測で、符号化対象データCに対して、参照画像からの予測値をR、その誤差をeとすると、C=R+eの関係がある。通常はこのeをDCT変換してマクロブロックに記録している。このeが小さいことが、予測符号化の圧縮効率を高めているのである。従って、本実施形態の変換により、参照画像のマクロブロックに置き換えることは、Cの変わりにRを用いることとなり、これはR=C−eの関係を持っている。eが小さいことは、RとCの差が小さいことを意味しており、Cの換わりにRを使用しても、差は小さいことになる。すなわち、本実施形態により、後方向予測を行ったマクロブロックを参照画像のマクロブロックに置き換えた場合、画像の劣化は軽微だと考えられる。ただし、圧縮効率は悪化するので、データ量は増えると考えられる。
【0023】
次に、両方予測を行ったマクロブロックの場合について説明する。
両方向予測では、符号化対象データCに対して、前方向予測、後方向予測をそれぞれ行い、それぞれの参照画像を求め、その平均値を参照画像としている。ここで、前方予測からの予測値をRf、その誤差をef、後方予測からの予測値をRB、その誤差をeBとする。このとき、同様にC=Rf+efおよびC=Rb+ebの関係がある。さらに両方向予測を行った場合の誤差をewとすると、これはC=(Rf+Rb)/2+ewの関係がある。これから、ew=2(ef+eb)の関係がある。このとき、第2の実施の形態における変換のように前方向予測とみなすことは、RBの代わりにRBを用いて復号することになり、復号するデータは、Cnew=Rf+ewとなるが、これは元々のCに対してCnew−C=(Rf−Rb)/2だけ誤差を加えたデータとして復号される。すなわち、元の参照画像からの予測値、RfとRBの差だけ、画質劣化が生じることになる。
【0024】
Rf、RBのどちらがCに近い値であるかは、通常わからない。例えば、RfがRBに比べてはるかにCと異なる画像である場合、第2の実施の形態の変換を行って、前方向予測のみの扱いとすると、得られる画像は大きな誤差を持つことになる。しかしながら、この場合、RBのみを用いた方が予測誤差が小さいことを意味している。すなわち、後方向予測を用いる方が、予測誤差が小さく、圧縮効率が良いのである。そのため、RfがRBに比べてはるかにCと異なる場合、両方向予測が適用されることは無い。
【0025】
結局、両方向予測が適用される場合は、RfとRBが同程度にCに近い場合と考えられるので、第2の実施の形態の変換を行った場合の誤差(Rf−Rb)/2も、ある程度小さいものと考えられる。そのため、両方向予測を行ったマクロブロックに対して、第2の実施の形態における変換を行っても、画質劣化は軽微である。
【0026】
このように、第2の実施の形態におけるBピクチャの変換処理は、マクロブロック全体の置換もしくはマクロブロック情報の書き換えで済むため、画像全体を再変換するよりも、演算量などが少なくて済む。
【0027】
図6および図7は、MPEGデータを記録したメディアが磁気テープであった場合に追加する処理を説明する図である。この例では、トラックパターンが図3の様に作成されているとして説明する。この場合の書き換え点は、トラック番号8にある。そこでまず、図6に示すように、トラック番号8のトラックに対して、P8のデータが現れる個所の先頭に、トラック・スキップマーカを書き込む。続くトラック番号9の先頭から、一時記憶して変換したB6、B7を、続いて連結するI22、B20、B21の順に書き込む。この結果、第2の実施の形態の例では、作成されるトラックパターンは、図7に示すようになる。
【0028】
トラック・スキップマーカは、一定長を持つデータの集まりで、通常のMPEGデータから識別できれば良い。具体的には、特定のIDを持ったシンクブロックまたは、ギャップデータパターンを用いることができる(民生用デジタルVTR規格参照)。また、トラック・スキップマーカはこのトラックのP8のデータが現れている間に書き込まれれば良く、正確にB4とP8の間である必要は無い。一つのトラックに複数のピクチャデータが含まれている場合は、書き換え点以降の最初のピクチャ上にあればよい。
【0029】
トラックを再生する際、トラック・スキップマーカが現れた場合、このマーカの書かれたピクチャデータは無効とされ、MPEGデータは次のトラックの先頭から続くものと定義する。従って、トラック番号8を再生する場合、前半のB4のデータ部分は有効であるが、トラック・スキップマーカが現れたP8データ部分は無効である。B4のデータに続くデータは、トラック番号9の先頭から始まるものとして再生される。結果として、この磁気テープ上に記録されたデータは、図4に示したメディア上のデータと等しくなるのである。
【0030】
このように、第2の実施の形態における記録方法によれば、第1のビデオデータのBピクチャの後に第2のビデオデータをつなげる場合には、先行するIピクチャまたはPピクチャの直後から連結部分までのBピクチャの後方向予測を変換することができるので、連結部分の画像の乱れをできるだけ少なくすることができる。
【0031】
また、第2の実施の形態における記録方法によれば、連結部分のビデオデータの再エンコードを必要としないので、2つのビデオデータを少ない負荷でつなげることができる。
【0032】
図9は、本発明に係る記録方法の上記実施形態を実現するコンピュータシステムの構成を示した図である。
図9に示すように、上記コンピュータシステム1200は、CPU1201と、ROM1202と、RAM1203と、キーボード(KB)1209のキーボードコントローラ(KBC)1205と、表示部としてのCRTディスプレイ(CRT)1210のCRTコントローラ(CRTC)1206と、ハードディスク(HD)1211及びフレキシブルディスク(FD)1212のディスクコントローラ(DKC)1207と、ネットワーク1220との接続のためのネットワークインターフェースコントローラ(NIC)1208とが、システムバス1204を介して互いに通信可能に接続された構成としている。
【0033】
CPU1201は、ROM1202或いはHD1211に記憶されたソフトウェア、或いはFD1212より供給されるソフトウェアを実行することで、システムバス1204に接続された各構成部を総括的に制御する。
すなわち、CPU1201は、所定の処理シーケンスに従った処理プログラムを、ROM1202、或いはHD1211、或いはFD1212から読み出して実行することで、上記本実施の形態での動作を実現するための制御を行う。
【0034】
RAM1203は、CPU1201の主メモリ或いはワークエリア等として機能する。
KBC1205は、KB1209や図示していないポインティングデバイス等からの指示入力を制御する。
CRTC1206は、CRT1210の表示を制御する。
DKC1207は、ブートプログラム、種々のアプリケーション、編集ファイル、ユーザファイル、ネットワーク管理プログラム、及び本実施の形態における所定の処理プログラム等を記憶するHD1211及びFD1212とのアクセスを制御する。
NIC1208は、ネットワーク1220上の装置或いはシステムと双方向にデータをやりとりする。
【0035】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。
【0036】
この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、プログラムコード自体及びそのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0037】
プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
【0038】
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(基本システム或いはオペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0039】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0040】
【発明の効果】
本発明によれば、MPEG−2規格に従ってエンコードされた2つのビデオデータをつなげて記録する際に、連結部分の画像をできるだけ乱れないようにすることができる。
【図面の簡単な説明】
【図1】第1の実施の形態におけるピクチャの位置関係を説明する図である。
【図2】第1の実施の形態におけるトラックの構成を説明する図である。
【図3】第1の実施の形態における記録パターンを示す図である。
【図4】第2の実施の形態におけるピクチャの位置関係を説明する図である。
【図5】第2の実施の形態におけるマクロブロック変換を説明する図である。
【図6】第2の実施の形態におけるトラックの構成を説明する図である。
【図7】第2の実施の形態における記録パターンを示す図である。
【図8】第2の実施の形態におけるマクロブロック変換を行わない例を説明する図である。
【図9】本発明に係る記録方法の第1及び第2の実施形態を実現するコンピュータシステムの構成を示した図である。
【符号の説明】
1200 コンピュータシステム
1201 CPU
1202 ROM
1203 RAM
1204 システムバス
1205 KBC
1206 CRTC
1207 DKC
1208 NIC
1209 KB
1210 CRT
1211 HD
1212 FD
1220 ネットワーク[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard.
[0002]
[Prior art]
One of the standards for encoding digital video data is the MPEG-2 standard. The MPEG-2 standard is described in detail in "ISO / IEC 13818-2 International Standard MPEG-2 Video (Nov. 1994)".
[0003]
[Problems to be solved by the invention]
However, when two pieces of video data encoded according to the MPEG-2 standard are connected and recorded, if the place where the two pieces of video data are connected is within a GOP (Group of Pictures), the image of the connected portion may be disturbed. is there.
[0004]
Accordingly, it is an object of the present invention to minimize an image of a connected portion when two video data encoded according to the MPEG-2 standard are connected and recorded.
[0005]
[Means for Solving the Problems]
One of the recording methods in the present invention is a recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard, When the place where the second video data is connected is after the I picture or the P picture of the first video data, and there is a B picture following the I picture or the P picture, 2 is changed after the B picture, and the place where the second video data is connected is after the I picture or the P picture of the first video data, and the I picture Alternatively, if there is no B picture following the P picture, the place to connect the second video data is And changes after the picture or the P picture.
[0006]
One of the recording methods in the present invention is a recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard, When the place where the second video data is connected is in the middle of one track, the recording of the second video data is started from the track.
[0007]
One of the recording methods in the present invention is a recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard, When the place where the second video data is connected is in the middle of one track, the recording of the second video data is started from a track subsequent to the track.
[0008]
BEST MODE FOR CARRYING OUT THE INVENTION
(First Embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings.
In the first embodiment, a recording method of connecting and recording second video data encoded according to the MPEG-2 standard after an I picture or a P picture of the first video data encoded according to the MPEG-2 standard Will be described. Note that the first video data is composed of B0, B1, I2, B3, B4, P5, B6, B7, P8, B9, B10, P11, B12, B13, and P14, and the second video data is B20, B21, I22, B23, B24, P25, B26, B27, P28, B29, B30, P31, B32, B33, P34. B indicates a B picture, I indicates an I picture, and P indicates a P picture.
[0009]
FIG. 1 is a diagram illustrating a case where second video data is connected after a P8 picture. The images are scheduled to be edited in the order of B6, B7, P8, B20, B21, and I22. In the first embodiment, since the image to be edited is a P picture, when rewriting the data on the medium, a B picture following the P8 picture is searched on the medium, and the point at which the B picture ends (that is, At the point when the I picture or P picture appears). In this example, since the B pictures following P8 are B6 and B7, images are connected in the order of I22, B20, B21, and P25 after B7. As a result, on the medium, the images are recorded in the order of P8, B6, B7, I22, B20, and B21, and the reproduced images are the images scheduled in the order of P5, B6, B7, P8, B20, B21, and I22.
[0010]
If there is no succeeding B picture, new video data is connected by using the time point at which the I picture or P picture as the connection destination ends (that is, the time point at which the next I picture or P picture appears) as a rewriting point. Just fine.
[0011]
FIG. 2 shows processing to be added when the medium on which the MPEG data is recorded is a magnetic tape in the first embodiment. In this example, it is assumed that the track pattern is created as shown in FIG. The rewrite point in this case is at track number 11. Therefore, first, as shown in FIG. 2, the original track data is once read. The track data includes the latter half of the data of B7 and the data of P11 following the latter. Of these, the data portion of B7 is set as the storage portion, and the data of B20, which will be additional recording data, is connected thereafter. This is used as re-recorded track data, and the entire track of track number 16 is rewritten again.
[0012]
As described above, according to the recording method in the first embodiment, when the second video data is connected after the I picture or the P picture of the first video data, the B picture following the I picture or the P picture is used. Since the second video data can be connected from the point after the picture, the disturbance of the image of the connected portion can be reduced as much as possible.
[0013]
Further, according to the recording method of the first embodiment, it is not necessary to re-encode the video data of the connected portion, so that the two video data can be connected with a small load.
[0014]
(Second embodiment)
Hereinafter, a second embodiment of the present invention will be described with reference to the drawings.
In the second embodiment, a description will be given of a recording method in which a B picture of first video data encoded according to the MPEG-2 standard is connected to second video data encoded according to the MPEG-2 standard and then recorded. . Note that the first video data is composed of B0, B1, I2, B3, B4, P5, B6, B7, P8, B9, B10, P11, B12, B13, and P14, and the second video data is B20, B21, I22, B23, B24, P25, B26, B27, P28, B29, B30, P31, B32, B33, P34. B indicates a B picture, I indicates an I picture, and P indicates a P picture.
[0015]
FIG. 4 is a diagram illustrating a case where the second video data is connected after the B7 picture. Images are scheduled to be connected in order of B6, B7, B20, B21, and I22. In the first embodiment, since the image to be edited is a B picture, when rewriting the data on the media, the data from the B picture immediately after the preceding I picture or P picture to the B picture at the connection point is rewritten. Is temporarily stored. In this example, since the preceding I picture or P picture is a B6 or B7 picture, it is temporarily stored.
[0016]
With respect to the temporarily stored B picture, a portion subjected to backward prediction is converted. Conversion is performed on a macroblock basis. This is shown in FIG. That is, the macroblock data is examined to determine whether the prediction direction is forward prediction, backward prediction, or bidirectional prediction (step S1).
[0017]
In the case of forward prediction, no processing is performed, and processing proceeds to the next macroblock.
In the case of backward prediction, the referenced macroblock is read from the reference image (step S2), and the data is replaced as it is with the target macroblock data (step S3). That is, for a macroblock for which backward prediction has been performed, the entire macroblock is replaced.
[0018]
In the case of bidirectional prediction, the motion vector data for backward prediction is removed from the macroblock information of the macroblock (step S4), and the display of the prediction direction is changed to forward prediction (step S5). The DCT data of the macro block is left as it is. As a result, the macroblock subjected to bidirectional prediction is converted into a macroblock equivalent to the macroblock subjected to forward prediction by rewriting the macroblock information without changing the DCT data.
[0019]
After the conversion of all the temporarily stored macroblocks is completed, the temporarily stored data is written from the head of the preceding I picture or P picture on the medium, and then a new MPEG image is connected. In the example of FIG. 4, from the position where the P8 picture is recorded, the temporarily stored and converted B6 and B7 are overwritten, and subsequently, the writing is performed in the order of I22, B20 and B21. As a result, on the medium, P5, B3, B4, B6, B7, I22, B20, and B21 are recorded in this order, and as the reproduced image, images scheduled in the order of P5, B6, B7, B20, B21, and I22 are reproduced. .
[0020]
FIG. 8 shows a case where the conversion in units of macroblocks in the second embodiment is not performed. If the P8 data on the medium is erased by overwriting, B6 and B7 cannot be reproduced because the backward predicted image is lost.
[0021]
As described above, in the second embodiment, among the macroblocks of the B picture, the macroblock that has been performing the backward prediction and the bidirectional prediction is different from the data constituting the original B picture. However, the impact is minor.
[0022]
First, the case of a macroblock for which backward prediction has been performed will be described.
In the backward prediction, if the prediction value from the reference image is R and the error is e with respect to the encoding target data C, there is a relationship of C = R + e. Normally, this e is DCT-transformed and recorded in a macroblock. The fact that e is small increases the compression efficiency of predictive coding. Therefore, according to the conversion of the present embodiment, replacing with a macroblock of a reference image uses R instead of C, which has a relationship of R = C−e. A small value of e means that the difference between R and C is small. Even if R is used instead of C, the difference is small. That is, according to the present embodiment, when the macroblock for which the backward prediction has been performed is replaced with the macroblock of the reference image, the deterioration of the image is considered to be slight. However, since the compression efficiency deteriorates, the data amount is considered to increase.
[0023]
Next, a case of a macroblock for which both predictions have been performed will be described.
In the bidirectional prediction, forward prediction and backward prediction are respectively performed on the encoding target data C to obtain respective reference images, and the average value thereof is used as a reference image. Here, a prediction value from forward prediction is Rf, its error is ef, a prediction value from backward prediction is RB, and its error is eB. At this time, similarly, there is a relationship of C = Rf + ef and C = Rb + eb. Further, assuming that an error when bidirectional prediction is performed is ew, this has a relationship of C = (Rf + Rb) / 2 + ew. From this, there is a relationship of ew = 2 (ef + eb). At this time, assuming forward prediction as in the conversion in the second embodiment, decoding is performed using RBs instead of RBs, and the data to be decoded is Cnew = Rf + ew. The original C is decoded as data obtained by adding an error by Cnew-C = (Rf-Rb) / 2. That is, the image quality is deteriorated by the difference between the predicted value Rf and RB from the original reference image.
[0024]
It is not generally known which of Rf and RB is closer to C. For example, if Rf is an image far different from C compared to RB, if the conversion according to the second embodiment is performed and only forward prediction is handled, the obtained image will have a large error. . However, in this case, using only RBs means that the prediction error is smaller. That is, the use of backward prediction has a smaller prediction error and better compression efficiency. Therefore, when Rf is much different from C as compared to RB, bidirectional prediction is not applied.
[0025]
After all, when bidirectional prediction is applied, it is considered that Rf and RB are almost the same and close to C. Therefore, the error (Rf−Rb) / 2 when the conversion according to the second embodiment is performed is also: Somewhat small. Therefore, even if the conversion according to the second embodiment is performed on a macroblock on which bidirectional prediction has been performed, image quality degradation is minimal.
[0026]
As described above, since the conversion processing of the B picture in the second embodiment can be performed by replacing the entire macroblock or rewriting the macroblock information, the amount of calculation and the like can be reduced as compared with re-conversion of the entire image.
[0027]
FIGS. 6 and 7 are diagrams for explaining processing to be added when the medium on which the MPEG data is recorded is a magnetic tape. In this example, it is assumed that the track pattern is created as shown in FIG. The rewrite point in this case is at track number 8. Therefore, first, as shown in FIG. 6, a track skip marker is written at the head of the location where the data of P8 appears in the track of track number 8. From the beginning of the following track number 9, B6 and B7 temporarily stored and converted are written in the order of I22, B20 and B21 to be subsequently connected. As a result, in the example of the second embodiment, the created track pattern is as shown in FIG.
[0028]
The track skip marker is a group of data having a fixed length, and may be any data that can be identified from normal MPEG data. Specifically, a sync block having a specific ID or a gap data pattern can be used (refer to the consumer digital VTR standard). The track skip marker may be written while the data of P8 of this track appears, and need not be exactly between B4 and P8. When one track includes a plurality of picture data, it is sufficient that the data be on the first picture after the rewriting point.
[0029]
If a track skip marker appears when a track is reproduced, the picture data on which the marker is written is invalidated, and the MPEG data is defined as continuing from the beginning of the next track. Therefore, when reproducing the track number 8, the data portion of B4 in the first half is valid, but the P8 data portion in which the track skip marker appears is invalid. The data following the data of B4 is reproduced as starting from the beginning of the track number 9. As a result, the data recorded on this magnetic tape is equal to the data on the media shown in FIG.
[0030]
As described above, according to the recording method in the second embodiment, when the second video data is connected after the B picture of the first video data, the connected portion is immediately after the preceding I picture or P picture. Since the backward prediction of the B picture up to this can be converted, it is possible to minimize the disturbance of the image of the connected portion.
[0031]
Further, according to the recording method of the second embodiment, it is not necessary to re-encode the video data of the connected portion, so that the two video data can be connected with a small load.
[0032]
FIG. 9 is a diagram showing a configuration of a computer system for realizing the above embodiment of the recording method according to the present invention.
As shown in FIG. 9, the
[0033]
The
That is, the
[0034]
The
The
The
The
The
[0035]
Further, an object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and a computer (or CPU or MPU) of the system or the apparatus to store the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in the program.
[0036]
In this case, the program code itself read from the storage medium realizes the function of the above-described embodiment, and the program code itself and the storage medium storing the program code constitute the present invention.
[0037]
As a storage medium for supplying the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, and the like can be used.
[0038]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (basic system or operating system) running on the computer based on the instruction of the program code. ) Performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0039]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function is executed based on the instruction of the program code. It goes without saying that a CPU or the like provided in the expansion board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0040]
【The invention's effect】
ADVANTAGE OF THE INVENTION According to this invention, when connecting and recording two video data encoded according to the MPEG-2 standard, the image of the connection part can be made as little as possible.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a positional relationship between pictures according to a first embodiment.
FIG. 2 is a diagram illustrating a configuration of a track according to the first embodiment.
FIG. 3 is a diagram illustrating a recording pattern according to the first embodiment.
FIG. 4 is a diagram illustrating a positional relationship between pictures according to the second embodiment.
FIG. 5 is a diagram illustrating macroblock conversion according to the second embodiment.
FIG. 6 is a diagram illustrating a configuration of a track according to the second embodiment.
FIG. 7 is a diagram illustrating a recording pattern according to a second embodiment.
FIG. 8 is a diagram illustrating an example in which macroblock conversion is not performed in the second embodiment.
FIG. 9 is a diagram showing a configuration of a computer system for realizing the first and second embodiments of the recording method according to the present invention.
[Explanation of symbols]
1200
1202 ROM
1203 RAM
1204
1206 CRTC
1207 DKC
1208 NIC
1209 KB
1210 CRT
1211 HD
1212 FD
1220 Network
Claims (3)
前記第2のビデオデータをつなげる場所が前記第1のビデオデータのIピクチャまたはPピクチャの後である場合であって、前記Iピクチャまたは前記Pピクチャに後続するBピクチャが存在する場合は、前記第2のビデオデータをつなげる場所を前記Bピクチャの後に変更し、
前記第2のビデオデータをつなげる場所が前記第1のビデオデータのIピクチャまたはPピクチャの後である場合であって、前記Iピクチャまたは前記Pピクチャに後続するBピクチャが存在しない場合は、前記第2のビデオデータをつなげる場所を前記Iピクチャまたは前記Pピクチャの後に変更することを特徴とする記録方法。A recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard,
When the place where the second video data is connected is after the I picture or the P picture of the first video data, and there is a B picture following the I picture or the P picture, Changing the place where the second video data is connected after the B picture;
If the place where the second video data is connected is after an I picture or a P picture of the first video data and there is no B picture following the I picture or the P picture, A recording method, wherein a place where the second video data is connected is changed after the I picture or the P picture.
前記第2のビデオデータをつなげる場所が1つのトラックの途中にある場合は、前記第2のビデオデータを前記トラックから記録し始めることを特徴とする記録方法。A recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard,
If the place where the second video data is connected is in the middle of one track, the recording of the second video data is started from the track.
前記第2のビデオデータをつなげる場所が1つのトラックの途中にある場合は、前記第2のビデオデータを前記トラックに後続するトラックから記録し始めることを特徴とする記録方法。A recording method for connecting and recording first video data encoded according to the MPEG-2 standard and second video data encoded according to the MPEG-2 standard,
If the place where the second video data is connected is in the middle of one track, the recording of the second video data is started from a track subsequent to the track.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002340084A JP4250406B2 (en) | 2002-11-22 | 2002-11-22 | Recording method, recording system, program, and computer-readable recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002340084A JP4250406B2 (en) | 2002-11-22 | 2002-11-22 | Recording method, recording system, program, and computer-readable recording medium |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2004179695A true JP2004179695A (en) | 2004-06-24 |
| JP2004179695A5 JP2004179695A5 (en) | 2006-01-12 |
| JP4250406B2 JP4250406B2 (en) | 2009-04-08 |
Family
ID=32702846
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002340084A Expired - Fee Related JP4250406B2 (en) | 2002-11-22 | 2002-11-22 | Recording method, recording system, program, and computer-readable recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4250406B2 (en) |
-
2002
- 2002-11-22 JP JP2002340084A patent/JP4250406B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP4250406B2 (en) | 2009-04-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5332773B2 (en) | Image processing apparatus and method | |
| JP4196640B2 (en) | Data conversion method | |
| JP3244629B2 (en) | Scene change point detection method | |
| US8170120B2 (en) | Information processing apparatus and information processing method | |
| US8817873B2 (en) | Image coding/recording apparatus and image coding/recording method | |
| JP5155157B2 (en) | Video decoding device | |
| US6370276B2 (en) | Image predictive decoding method, image predictive decoding apparatus, image predictive coding method, image predictive coding apparatus, and data storage media | |
| JP4280353B2 (en) | Encoding apparatus, image processing apparatus, encoding method, and recording medium | |
| JP2010041354A (en) | Moving image coding method, coding device and coding program | |
| US7320522B2 (en) | Data processing apparatus and method and encoding device of same | |
| KR20040094441A (en) | Editing of encoded a/v sequences | |
| US6853378B2 (en) | Moving image editing apparatus and moving image editing method using intraframe encoding | |
| US9275081B2 (en) | Data management apparatus and data management method | |
| JP2004208319A (en) | Method and apparatus of decoding mpeg picture and displaying it in rewind mode, and video driver circuit incorporating such apparatus and decoder box | |
| US6882687B2 (en) | Compressed image data reproducing apparatus and method thereof | |
| US6665340B1 (en) | Moving picture encoding/decoding system, moving picture encoding/decoding apparatus, moving picture encoding/decoding method, and recording medium | |
| US8300701B2 (en) | Offspeed playback in a video editing system of video data compressed using long groups of pictures | |
| JP4250406B2 (en) | Recording method, recording system, program, and computer-readable recording medium | |
| US20090129471A1 (en) | Image decoding apparatus and method for decoding prediction encoded image data | |
| JP4366141B2 (en) | Image processing apparatus, image processing method, storage medium, and program | |
| JP3657855B2 (en) | Image decoding apparatus and image decoding method | |
| JP4208342B2 (en) | Image recording apparatus, method, and computer-readable storage medium | |
| JP4594163B2 (en) | Image coding method and image coding apparatus | |
| JP2007325119A (en) | Image processing apparatus and image processing method | |
| JP4596975B2 (en) | Image encoding method and image processing apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051118 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051118 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080227 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080304 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080422 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081007 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081208 |
|
| 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: 20090106 |
|
| 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: 20090119 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120123 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130123 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140123 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |