JP4978582B2 - Stream creation device - Google Patents
Stream creation device Download PDFInfo
- Publication number
- JP4978582B2 JP4978582B2 JP2008199859A JP2008199859A JP4978582B2 JP 4978582 B2 JP4978582 B2 JP 4978582B2 JP 2008199859 A JP2008199859 A JP 2008199859A JP 2008199859 A JP2008199859 A JP 2008199859A JP 4978582 B2 JP4978582 B2 JP 4978582B2
- Authority
- JP
- Japan
- Prior art keywords
- stream
- data
- standard
- analysis result
- analysis
- 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
本発明は、MPEGなど規格で定められたビットデータを含むビデオストリームの一部を編集した後に、規格に従った任意のストリームを作成する装置に関する。 The present invention relates to an apparatus for creating an arbitrary stream according to a standard after editing a part of a video stream including bit data defined by the standard such as MPEG.
MPEGなどの動画像圧縮の標準規格では、画像を16画素x16画素などの矩形領域に分割して、この矩形を単位に画素値の圧縮を行う。この矩形をマクロブロックと呼び、全体の画像内でのx座標、y座標をつけて、たとえば、左から4つ目、一番上のマクロブロックはMB(3,0)のようにあらわすのが一般的である。マクロブロックの圧縮手法は、今処理中の画像の情報のみを用いて画素値を圧縮するIntra手法と、時間的に隣接している画像から似ている個所を探し、現在処理中のマクロブロックと、見つかった、似ている個所の相対的な位置の差分(動きベクトル:MV)および画素値の差分を圧縮するInter手法の、大きく2つに分けられる。Inter手法においては、マクロブロック全体で1つの動きベクトルをつける1-MV(16x16MV)から、4画素x4画素の16個に分割してそれぞれに動きベクトルをつける16-MV(4x4MV)まで、さまざまな数の動きベクトルをつけることができる。 In the standard of moving picture compression such as MPEG, an image is divided into rectangular areas such as 16 pixels × 16 pixels, and pixel values are compressed in units of the rectangles. This rectangle is called a macroblock, and the x and y coordinates in the entire image are attached. For example, the fourth macro from the left, the top macroblock is represented as MB (3,0). It is common. The macroblock compression method uses the Intra method that compresses pixel values using only the information of the image currently being processed, and searches for similar parts from temporally adjacent images. These are roughly divided into two methods: a relative position difference (motion vector: MV) and a pixel value difference, which are found, and a similar position. The Inter method varies from 1-MV (16x16MV), which attaches one motion vector to the entire macroblock, to 16-MV (4x4MV), which divides it into 16 pixels of 4 x 4 pixels and attaches motion vectors to each. A number of motion vectors can be attached.
ストリームに書かれているデータには、動きベクトルそのままではなく、周辺マクロブロックの情報をもとに求められる予測ベクトル(PMV)との差分(差分ベクトル:DMV)を可変長符号化したものが書かれている。また、画像の画素値またはInter手法で求めた画素値の差分は、8画素x8画素単位のブロックに分けられ、ブロックの係数を8画素x8画素単位、または8画素x4画素、または4画素x8画素、または4画素x4画素単位に、直交変換し周波数成分に変換し、量子化係数で割る量子化を行い、1次元に変換するスキャンをして、係数(coef)列を求める。規格の性質上、この係数はほとんどが0になるため、0でない係数の数だけ、該当係数前の連続する係数値0の数(run)、該当係数の値(level)、該当係数がブロックまたは分割したサブブロックの最後の係数かどうか(last)の組を求め、この組を可変長符号化し、ストリームに書く。また、各ブロック内の全係数が0か、0以外の係数が少なくとも1つ存在するかの情報を、1マクロブロック分集めてCodedBlockPattern(CBP)としてストリーム中に書く。マクロブロック内の全係数が0か、0以外の係数が少なくとも1つ存在するかの情報が(Codedまたはnot Coded)としてストリーム中に示されていることがある。また、このCodedまたはnot Codedの情報と、前記のIntraまたはInterの種別、動きベクトルの数の情報をまとめて、マクロブロック種別(MBType)としてストリーム中に書かれている場合もある。このように、MPEGなどの動画像圧縮規格では、差分ベクトル情報や係数などのシンタックス要素が可変長符号化されて、圧縮された状態でストリームに書かれている。
The data written in the stream is not a motion vector as it is, but a variable length encoded difference (difference vector: DMV) with a prediction vector (PMV) obtained based on information of surrounding macroblocks. It is. The difference between the pixel value of the image or the pixel value obtained by the Inter method is divided into blocks of 8 pixels x 8 pixels, and the block coefficient is 8 pixels x 8 pixels, or 8 pixels x 4 pixels, or 4 pixels x 8 pixels. Alternatively, orthogonal conversion is performed in units of 4 pixels × 4 pixels, converted into frequency components, quantization is performed by dividing by a quantization coefficient, and scanning is performed to convert it to one dimension to obtain a coefficient (coef) sequence. Due to the nature of the standard, this coefficient is almost zero, so the number of non-zero coefficients, the number of
MPEGなどの標準規格に準拠した動画像圧縮・展開装置を開発するにあたり、規格で定めるシンタックス要素を全パターン網羅した検証用データが必要になる。この検証用データは、標準化団体から提供されることもあるが、必ずしも開発に必要な、十分な検証用データが入手可能であるとは限らない。そのため、既存のストリーム(ビットストリーム)の一部を編集し、検証目的に合ったストリームを作成することになる。このとき、圧縮されたバイナリデータを汎用のバイナリエディタで編集するのは困難なため、元ストリームをデコードし、シンタックス要素ごとに可読性の高いデータに変換して、その変換したデータに対して検証の意図に合うようなデータに編集し、再度ストリームデータに戻して、意図したストリームを作成するのが一般的である。 When developing a moving picture compression / decompression apparatus that complies with standards such as MPEG, verification data that covers all the syntax elements defined by the standard is required. This verification data may be provided by a standardization organization, but sufficient verification data necessary for development is not always available. Therefore, a part of the existing stream (bit stream) is edited to create a stream suitable for the verification purpose. At this time, since it is difficult to edit the compressed binary data with a general-purpose binary editor, the original stream is decoded, converted into highly readable data for each syntax element, and the converted data is verified. In general, the data is edited so as to meet the intention, and the data is returned to the stream data again to create the intended stream.
図8は、ストリーム解析装置のブロック構成図であり、図9は、従来のストリーム解析装置の処理フローである。
一般に、標準規格に準拠した圧縮・展開装置を開発するときには、ストリームをテキストデータまたは専用GUIで解析結果を出力する機能を持ったストリーム解析装置を作成する。デコーダのストリーム解析結果を出力する個所の構成を図8に示す。また、図9に従来のストリーム解析装置のフローを示す。
FIG. 8 is a block configuration diagram of the stream analysis apparatus, and FIG. 9 is a processing flow of the conventional stream analysis apparatus.
In general, when developing a compression / decompression device conforming to a standard, a stream analysis device having a function of outputting a stream analysis result using text data or a dedicated GUI is created. FIG. 8 shows a configuration of a portion for outputting the stream analysis result of the decoder. FIG. 9 shows a flow of a conventional stream analysis apparatus.
まず次シンタックス決定部11において、過去に読みだしたシンタックス要素の値から、規格によって定められた次に読み出すべきシンタックス要素を決定し、ストリーム読み出し部12に伝える。ストリーム読み出し部12は、ストリームから指定シンタックス要素の情報分のデータを読み出し、必要に応じて可変長符号テーブル10を参照し、読みだした結果を次シンタックス決定部11に返す。返ってきた結果をもとに、次シンタックス決定部はさらに次に読み出すべきシンタックス要素を決定する。これを繰り返し、ストリームをデコードする。このとき、ストリーム読み出し部において読みだした結果を解析結果出力部13に渡して、解析結果を出力する。このため、規格上データが存在するシンタックス要素のみ、解析結果が出力される。
First, the next
図8において、ストリームがストリーム読み出し部12に入力されると、ストリーム読み出し部12は、次シンタックス決定部11において得られた次シンタックスの種類に対応するデータをストリームの一部から取り出し、可変長符号テーブル10を参照して、可変長符号であるストリームを解析し、解析されたストリームに対応するシンタックスを出力する。決定されたシンタックスは、解析結果出力部13に渡され、解析結果として出力される。出力の形式は、シンタックスをそのまま出力しても良いし、あるいは、より人間が理解しやすいような記号の列として出力しても良い。
In FIG. 8, when a stream is input to the
図9において、ステップS10では、次シンタックスの種類を特定し、ステップS11において、特定された種類のストリームのデータを読み出し、ステップS12において、解析結果を出力する。ステップS10においては、特定された種類の次シンタックスが存在しないはずの場合には、ステップS11、S12をスキップし、さらに次のシンタックスの種類を特定する。 In FIG. 9, in step S10, the type of the next syntax is specified, in step S11, the data of the specified type of stream is read, and in step S12, the analysis result is output. In step S10, when the next syntax of the specified type should not exist, steps S11 and S12 are skipped, and the next syntax type is specified.
特許文献1には、MHEG(Multimedia Hypermedia Information Coding Experts Group)コンテンツの作成に当たって、手軽な編集操作によって、シェアオブジェクトを管理して扱えるようにして、多様な表示態様のMHEGシーンが容易に作成できる情報処理装置が開示されている。
特許文献2には、既存のデジタル放送データを直接編集することで、テスト用デジタル放送データを簡易に、かつ、効率よく生成することが可能なデジタル放送データ解析編集装置が開示されている。
しかし、データの種類によっては、後続のデータの有無に影響するものがあり、従来のストリーム作成手法では、編集後のストリームが規格違反になっていないかどうかは、そのストリームをデコードするまで分からず、規格に合わせるためには、編集者が規格違反の個所がなくなるまでデコードと編集を繰り返す必要があった。そのため、後続データからの依存度の高いデータを編集することは困難であった。 However, depending on the type of data, there may be an effect on the presence or absence of subsequent data. With conventional stream creation techniques, it is not known until the stream is decoded whether the stream after editing is in violation of the standard. In order to conform to the standard, it was necessary for the editor to repeat decoding and editing until there were no parts that violated the standard. For this reason, it has been difficult to edit highly dependent data from subsequent data.
図10〜図14は、従来の問題点を説明する図である。
例えば、図10のようなVC-1規格に準拠した元ストリームがあり、このストリームのMB
(2,3)のDMV(差分動きベクトル)を(-10,4)から(30,20)に変更したストリームを生成したい場合、規格に準拠するためには、編集したMB位置より後続のブロックのHybridPredの有無が変わる場合があり、それを反映する必要がある。ここで、HybridPredとは、以下のような情報を示すデータである。すなわち、デコード中のマクロブロックについて、MV(動きベクトル)を求めるときには、周囲のマクロブロックのMVから当該マクロブロックの予測動きベクトル(PMV)を求め、当該マクロブロックのDMVと加算して求める。このとき、求めたPMVと周囲のMVとの差分が閾値より大きいか否かを判断し、大きい場合には、PMVを破棄し、周囲のMVをPMVの代わりに用いて、当該マクロブロックのMVを求める。このとき、周囲のマクロブロックのうち、どのマクロブロックのMVをPMVの代わりに用いるかを示すのが、HybridPredである。したがって、周囲のマクロブロックのDMVを変更すると、当該マクロブロックのPMVが変化し、HybridPredが必要な場合が、必要でない場合になったり、必要でない場合が、必要になったりする。このように、周囲のマクロブロックのストリームの変更により、その後にデコードされるマクロブロックについてHybridPredが存在したり、存在しなかったり、存在する場合にも、HybridPredの値が異なったりするということが起こる。これは、変更により、後続のデータに影響を与えるデータ(マクロブロック種類やDMVなど)が、影響を受けるデータ(HybridPred)に変更をもたらすという関係があり、これは、デコードしてみないと、後続の影響を受けるデータの変更が、影響を受けるデータにどのような影響を与えるかは知ることが出来ないという問題を有し、従来において、何回も編集とデコードを繰り返す必要が生じた原因となっている。
10 to 14 are diagrams for explaining conventional problems.
For example, there is an original stream compliant with the VC-1 standard as shown in FIG.
If you want to generate a stream with the (2,3) DMV (differential motion vector) changed from (-10,4) to (30,20), in order to comply with the standard, the block following the edited MB position The presence / absence of HybridPred may change and needs to be reflected. Here, HybridPred is data indicating the following information. That is, when obtaining an MV (motion vector) for a macroblock being decoded, a predicted motion vector (PMV) of the macroblock is obtained from the MVs of the surrounding macroblocks and added to the DMV of the macroblock. At this time, it is determined whether or not the difference between the obtained PMV and the surrounding MV is larger than the threshold. If so, the PMV is discarded, and the surrounding MV is used instead of the PMV, and the MV of the macro block is Ask for. At this time, HybridPred indicates which macroblock of surrounding macroblocks is used instead of PMV. Therefore, when the DMV of the surrounding macroblock is changed, the PMV of the macroblock changes, and HybridPred is necessary when it is not necessary or when it is not necessary. In this way, depending on the change of the surrounding macroblock stream, HybridPred may or may not exist for the macroblock to be decoded later, and even if it exists, the value of HybridPred may differ. . This is because the data that affects subsequent data (such as the macroblock type or DMV) will change the affected data (HybridPred) due to the change. The reason why it is not possible to know how the change of the affected data will affect the affected data, and it is necessary to repeat editing and decoding in the past. It has become.
図11は、従来のストリーム編集装置の構成例であり、図12は、従来のストリーム編集装置の処理フローである。
図11において、ストリーム解析装置15がストリームを解析して、シンタックスに変換する。編集装置16を使って、ユーザが編集を行い、編集後のシンタックスから、ストリーム生成装置17を使って、編集後のストリームを生成する。
FIG. 11 is a configuration example of a conventional stream editing apparatus, and FIG. 12 is a processing flow of the conventional stream editing apparatus.
In FIG. 11, the
図12において、ステップS15で、元ストリームを入力し、ステップS16において、ストリーム解析装置でストリームをシンタックスに変換し、ステップS17において、解析結果を出力する。ステップS18において、ユーザが解析結果を編集し、ステップS19において、編集された解析結果(編集されたシンタックス)を得る。ステップS20において、編集されたシンタックスから、ストリーム作成装置でストリームを作成することにより、ステップS21において、編集されたストリームを得る。 In FIG. 12, the original stream is input in step S15, the stream is converted into syntax by the stream analyzer in step S16, and the analysis result is output in step S17. In step S18, the user edits the analysis result, and in step S19, the edited analysis result (edited syntax) is obtained. In step S20, an edited stream is obtained in step S21 by creating a stream from the edited syntax with the stream creation device.
図11に示したような構成の図12のようなフローをもった従来の手法では、出力された解析結果(図13)のMB(2,3)のDMVを編集して編集した解析結果(図14(a))から、再度ストリームを生成しても、後続のブロックのHybridPredの有無については考慮されない。 In the conventional method having the flow shown in FIG. 12 configured as shown in FIG. 11, the analysis result (edited by editing the DM (2) of the MB (2,3) in the output analysis result (FIG. 13) ( From FIG. 14A), even if the stream is generated again, the presence or absence of HybridPred of the subsequent block is not considered.
そのため、この例のようにMB(10,6)のHybridPredがなくならなければいけないような場合、生成された図14(b)のストリームは規格違反になってしまう。したがって、このような規格違反にならないようにするためには、ストリーム作成装置において、規格違反のシンタックスを自動的に判断して、削除する機能が要求されるが、このような機能をストリーム作成装置に組み込むためには、いったん作成したストリームから、規格違反を除去する機能を持ったデコーダを組み込む必要があり、デコード機能が複雑になってしまう。 Therefore, when the HybridPred of MB (10, 6) must be lost as in this example, the generated stream in FIG. 14B is in violation of the standard. Therefore, in order to prevent such a violation of the standard, the stream creation device requires a function to automatically determine and delete the syntax violation, and such a function is required to create the stream. In order to incorporate it into a device, it is necessary to incorporate a decoder having a function of removing a violation of the standard from a stream once created, and the decoding function becomes complicated.
本発明の課題は、編集後も規格違反とならない任意のストリームを簡単な構成で実現するストリーム作成装置を提供することである。 An object of the present invention is to provide a stream creation device that realizes an arbitrary stream that does not violate the standard even after editing with a simple configuration.
本発明のストリーム作成装置は、画像データを規格に従って符号化したビットからなるストリームからデータを読み、ストリームを解析して、解析結果を可読可能に出力する場合において、先行するデータの影響を受けるデータが規格上存在しない場合も、ダミーのデータを出力して解析結果を出力する第1のストリーム解析手段と、該第1のストリーム解析手段の解析結果を編集し、ストリーム化した後のストリームについて、後続のデータに影響を与えるデータに変更を加えたことによって、ダミーのデータに対応するデータが規格上存在しなくなった場合、ダミーのデータを削除して解析結果を出力する第2のストリーム解析手段と、該第1と第2のストリーム解析手段の解析結果からストリームを作成するストリーム作成手段とを備える。 The stream creation device of the present invention reads data from a stream composed of bits obtained by encoding image data according to a standard, analyzes the stream, and outputs the analysis result in a readable manner. Is not present in the standard, the first stream analyzing means for outputting dummy data and outputting the analysis result, and the stream after editing the analysis result of the first stream analyzing means and converting it into a stream, The second stream analyzing means for deleting the dummy data and outputting the analysis result when the data corresponding to the dummy data does not exist in the standard by changing the data affecting the subsequent data. And stream creation means for creating a stream from the analysis results of the first and second stream analysis means. That.
第1のストリーム解析手段でダミーのデータを含んだ状態の解析結果を出力する。これを編集する場合、ダミーのデータは残される。これをストリーム化して、第2のストリーム解析手段で、規格に沿ってストリームを解析すると、ダミーのデータのある場所にデータが必要な場合と必要でない場合が生じる。データが必要な場合は、ダミーのデータをそのまま残し、必要でない場合には、ダミーのデータを削除する。これにより、規格に従ったデータの配列をした解析結果を得られる。ダミーのデータが存在する場合には、画像データとしては間違っているが、シンタックスの配列としては正しいものとなり、規格に従ったものとなる。これをストリーム化することにより、規格にしたがった、編集後のストリームが得られる。 The first stream analysis means outputs an analysis result including dummy data. When this is edited, dummy data is left. When this is converted into a stream and the stream is analyzed in accordance with the standard by the second stream analysis means, data may or may not be necessary where dummy data exists. If the data is necessary, the dummy data is left as it is, and if it is not necessary, the dummy data is deleted. Thereby, the analysis result which arranged the data according to a standard can be obtained. When dummy data is present, the image data is incorrect, but the syntax arrangement is correct and conforms to the standard. By making this a stream, an edited stream according to the standard can be obtained.
本発明によれば、編集後も規格違反とならない任意のストリームを簡単な構成で実現するストリーム作成装置を提供することができる。 According to the present invention, it is possible to provide a stream creation device that realizes an arbitrary stream that does not violate the standard even after editing with a simple configuration.
本実施形態では、既存のデコーダを少しだけ改造し一時的に規格違反のデータを作成させることで、ストリーム作成ツールに複雑なデコード機能を入れることなく、規格に沿ったストリームを作成することを可能とする。 In this embodiment, it is possible to create a stream that conforms to the standard without adding a complicated decoding function to the stream creation tool by slightly modifying the existing decoder and temporarily creating data that violates the standard. And
図1〜図7は、本発明の実施形態を説明する図である。
本実施形態では、以下の2つの機能を新たに設ける。
・次シンタックス決定部を、規格上データが存在しない場合にも(HybridPredが存在しない場合にも)、ストリーム読み出し部に対して、ダミーでシンタックス要素を指示できるようにする(ダミーでHybridPredを指定するようにする)。また、ストリーム読み出し部は、ダミーのシンタックス要素を指示された場合、ストリームから実際にデータを読まずに、次シンタックス決定部および解析結果出力部に対してダミーの結果を返すようにする(HybridPredを出力する)。規格上存在する場合の動作は変更しない。すなはち、規格上通りにデータを読み、規格上データが存在しない場合も常に解析結果を出力するストリーム解析装置20を設ける。
・次シンタックス決定部を、規格上データが存在しない場合にも(HybridPredが存在しない場合にも)、ストリーム読み出し部に対して、ダミーでシンタックス要素を指示できるようにする(HybridPredを指定出来るようにする)。また、ストリーム読み出し部は、ダミーのシンタックス要素を指示された場合も、ストリームから実際にデータを読み、次シンタックス決定部に対してダミーの結果を返すようにする。ダミーの場合には、ストリーム読み出し部から解析結果出力部には、出力指示は出さない(HybridPredを出力しない)。すなはち、規格上データが存在しない場合も常にデータを読み、規格通りに解析結果を出力するストリーム解析装置23を設ける。
図1および図2に本実施形態の装置の構成およびフローを示す。
1-7 is a figure explaining embodiment of this invention.
In the present embodiment, the following two functions are newly provided.
-The next syntax determining unit can specify a syntax element with a dummy to the stream reading unit even when there is no data according to the standard (even when HybridPred does not exist). To be specified). Also, when a dummy syntax element is instructed, the stream reading unit returns a dummy result to the next syntax determining unit and the analysis result output unit without actually reading data from the stream ( HybridPred is output). The behavior when existing in the standard is not changed. In other words, a
-The next syntax determining unit can specify a syntax element in a dummy manner to the stream reading unit even when no data exists in the standard (even when HybridPred does not exist) (HybridPred can be specified) ). Further, even when a dummy syntax element is instructed, the stream reading unit actually reads data from the stream and returns a dummy result to the next syntax determination unit. In the case of a dummy, no output instruction is issued from the stream reading unit to the analysis result output unit (HybridPred is not output). In other words, a
1 and 2 show the configuration and flow of the apparatus of this embodiment.
本実施形態では、まず、元のストリーム(図10)をストリーム解析装置20にかけ、ス
トリームの解析結果(図5)を出力させる。ここで、MBTypeは、マクロブロック種類で、マクロブロックの符号化方法の種類を指定する。このデータは、後のデータに影響を与えるデータである。DMVは、差分動きベクトルであり、予測動きベクトル(PMV)と加算されることにより、処理対照のマクロブロックの動きベクトルを算出する基となるものである。このデータも、後のデータに影響を与えるデータである。CBPは、後に、処理対象のマクロブロックにおける係数があるか否かを示す情報である。Blockは、係数値をブロックごとにまとめて記述する部分である。この解析結果には、ストリーム上存在しなかった場合もHybridPredが必ず存在する(2個目のHybridPred:0が規格上は存在しないはずのものであるが、解析結果に出力されているものである)。
In the present embodiment, first, the original stream (FIG. 10) is applied to the
この解析結果を検証項目にあうように編集する(図6(a))。ここでは、最初のDMVの値を変更している。次に、編集後の解析結果をストリーム作成装置にかけて、中間ストリーム(図6(b))を作成する。下線部分が編集した部分である。ここでは、規格上のHybridPredの有無に関わらず、必ずHybridがあるために、規格違反のストリームになっている。この中間ストリームをさらにストリーム解析装置23にかけて、中間解析結果(図7(a))を作成する。ストリーム解析結果23では、必ずHybridPredをストリームから読み、規格上必要な場合のみ解析結果として出力するため、規格に準拠した解析結果になっている。ここでは、2つめのHybridPred:0がなくなっている。最後にこの中間解析結果をストリーム作成装置22にかけて、ストリーム(図7(b))を作成する。下線部分が、編集された部分である。このストリームは規格準拠した解析結果から作成されたものなので、規格準拠している。
The analysis result is edited to match the verification item (FIG. 6A). Here, the value of the first DMV is changed. Next, the edited analysis result is applied to the stream creation device to create an intermediate stream (FIG. 6B). The underlined part is the edited part. Here, regardless of the presence / absence of HybridPred in the standard, there is always Hybrid, so the stream is in violation of the standard. This intermediate stream is further applied to the
以上のように、本特許の装置で後続のシンタックス要素の有無に影響のあるような編集をしても、規格準拠のストリームが作成することができる。
図1の本実施形態のストリーム編集装置においては、入力ストリームをストリーム解析装置20が解析してシンタックスとし、解析結果を編集装置に入力する。このとき、HybridPredが存在しない場合にも、ダミーでHybridPredを出力する。編集装置21で解析結果をユーザが編集して、ストリーム生成装置22に入力する。編集後の解析結果は、まず、ストリームに変換される。このストリームは、本来HybridPredの存在しない部分にもHybridPredが含まれるシンタックスをストリーム化したものであるので、規格違反となっている。この、規格違反を含んだストリーム(中間ストリーム)をストリーム解析装置23に入力する。ストリーム解析装置23は、規格どおりに、規格違反を含んだストリームを解析する。すると、本来HybridPredがあってはならない部分にもHybridPredが含まれていることがわかる。そこで、その場合には、HybridPredを出力しないで、これを削除したものを解析結果として出力する。これにより、解析結果は、不要なHybridPredを含まない、規格違反のない解析結果となる。そして、この解析結果をストリーム生成装置22でストリーム化することにより、規格に従った、編集後のストリームを得ることが出来る。
As described above, a standard-compliant stream can be created even by editing that affects the presence or absence of the subsequent syntax element in the apparatus of this patent.
In the stream editing apparatus of this embodiment shown in FIG. 1, the
図2は、ストリーム解析装置20の処理フローである。
ステップS30において、前のストリームの処理結果より次のシンタックスの種類を決定する。このシンタックスの種類が本来存在するシンタックスである場合には、ステップS31において、ストリームを読み出し、ステップS32において、ストリームの内容に従った解析結果のシンタックスを出力して、ステップS30に戻る。ステップS30で、シンタックスの要素が、規格に従った場合に存在しない(HybridPredが存在しない)ことを示している場合には、ステップS33において、ストリームをダミー読み出しし(実際には、何も読みださない)、ステップS32において、本来存在しないシンタックスを(HybridPredを)解析結果として出力し、ステップS30に戻る。これをストリーム全体について行う。
FIG. 2 is a processing flow of the
In step S30, the next syntax type is determined from the processing result of the previous stream. If the syntax type is a syntax that originally exists, the stream is read out in step S31, the syntax of the analysis result according to the contents of the stream is output in step S32, and the process returns to step S30. In step S30, if the syntax element indicates that it does not exist in accordance with the standard (HybridPred does not exist), the stream is dummy read in step S33 (actually nothing is read). In step S32, syntax that does not originally exist (HybridPred) is output as an analysis result, and the process returns to step S30. This is done for the entire stream.
図3は、ストリーム解析装置23の処理フローである。
規格違反を含むストリームを受け取ると、ステップS35において、次のシンタックスの種類を決定する。前のストリームの処理から、シンタックスの種類が決定すると、ステップS36において、ストリームを読み出し、ステップS37において、解析結果を出力して、ステップS35に戻る。ステップS35で、前のストリームの処理から、次には、シンタックスの要素は存在しないと決定された場合には、ステップS38において、ストリームを読み出し(ダミーのHybridPredを読み出し)、何もせずにステップS35に戻る。
FIG. 3 is a processing flow of the
When a stream including a violation of the standard is received, the next syntax type is determined in step S35. When the syntax type is determined from the previous stream processing, the stream is read in step S36, the analysis result is output in step S37, and the process returns to step S35. In step S35, if it is determined from the processing of the previous stream that the syntax element does not exist next, the stream is read (reads dummy HybridPred) in step S38, and nothing is performed. Return to S35.
図4は、本実施形態の全体の処理フローである。
ステップS40において、元ストリームを入力する。ステップS41において、ストリーム解析装置20において、ダミーのシンタックス要素を含むように解析結果を生成し、ステップS42において、コンピュータのディスプレイ上等に解析結果を出力する。ステップS43において、ユーザが解析結果を編集し、ステップS44において、編集された解析結果をストリーム作成装置に入力する。ステップS45において、ストリーム作成装置は、入力された解析結果をストリーム化して、ステップS46において、中間ストリームを出力する。ステップS47において、中間ストリームをストリーム解析装置23において解析し、ダミーのシンタックス要素を見つけた場合には、解析結果として出力しないようにして、ステップS48の中間解析結果を得る。この中間解析結果を、ステップS49において、ストリーム作成装置に入力し、ストリーム化することによって、ステップS50において、規格に従った編集されたストリームを得る。
FIG. 4 is an overall processing flow of the present embodiment.
In step S40, the original stream is input. In step S41, the
このように、ダミーのシンタックス要素を最初の解析で含めておき、編集後、いったん編集した解析結果をビットストリーム化し、これをもう一度解析して、いらないシンタックス要素(ダミーであると否とにかかわらず)を取り除くことで、規格に従ったビットストリームを作ることが出来る。ダミーのシンタックス要素の場所に、編集の結果、別のシンタックス要素を入れる必要が生じた場合には、2回目の解析処理において、ダミーのシンタックス要素を残しておくようにする。ダミーのシンタックス要素は、変数値としてでたらめな値持っているので、出来上がったストリームを、画像を符号化したビットストリームとしてみた場合、画像が壊れることになるが、本来必要なところにシンタックス要素が含まれているので、規格違反にはならない。 In this way, dummy syntax elements are included in the first analysis, and after editing, the edited analysis result is converted into a bitstream, and this is analyzed once again. Regardless of (), you can create a bitstream that conforms to the standard. If it is necessary to put another syntax element in the place of the dummy syntax element as a result of editing, the dummy syntax element is left in the second analysis process. The dummy syntax element has a random value as a variable value, so if you look at the resulting stream as a bitstream that encodes an image, the image will be corrupted, but the syntax element is where you originally needed it. Is included, so it does not violate the standard.
このように、本実施形態は、検証用のストリームとして、画像としてはでたらめであっても、データの構成として、規格違反にならないビットストリームを作るのに非常に便利である。 As described above, this embodiment is very convenient for creating a bit stream that does not violate the standard as a data structure, even if it is random as an image as a verification stream.
上記実施形態のほかに、以下の付記を開示する。
(付記1)
画像データを規格に従って符号化したビットを含む第1ストリームからデータを読み、前記第1ストリームを解析して、解析結果を出力する場合において、先行するデータの影響を受けるデータが規格上存在しない場合は、ダミーのデータを出力して解析結果を出力する第1のストリーム解析手段と、
該第1のストリーム解析手段の解析結果を編集し、ストリーム化した後の第2ストリームについて、後続のデータに影響を与えるデータに変更を加えたことによって、ダミーのデータに対応するデータが規格上存在しなくなった場合、ダミーのデータを削除して解析結果を出力する第2のストリーム解析手段と、
該第1と第2のストリーム解析手段の解析結果から第3ストリームを作成するストリーム作成手段と、
を備えることを特徴とするストリーム作成装置。
(付記2)
前記第2のストリーム解析手段は、前記後続のデータに影響を与えるデータを変更して
も、規格上ダミーのデータに対応するデータが存在する場合には、ダミーのデータをそのまま解析結果として出力することを特徴とする付記1に記載のストリーム作成装置。
(付記3)
前記後続のデータに影響を与えるデータは、画像の符号化単位のブロックの種別を示すデータ、あるいは、動きベクトルと予測動きベクトルの差分である差分動きベクトルであることを特徴とする付記1に記載のストリーム作成装置。
(付記4)
前記先行するデータの影響を受けるデータは、前記予測動きベクトルの代わりに、隣接するブロックの動きベクトルを使用することを指示するデータであることを特徴とする付記3に記載のストリーム作成装置。
(付記5)
前記画像データを符号化する際の規格は、MPEGあるいはVC-1であることを特徴とする付記1に記載のストリーム作成装置。
(付記6)
前記第1のストリーム解析手段の解析結果を編集するための編集手段をさらに備えることを特徴とする付記1に記載のストリーム作成装置。
(付記7)
画像データを規格に従って符号化したビットからなる第1ストリームからデータを読み、前記第1ストリームを解析して、解析結果を可読可能に出力する場合において、先行するデータの影響を受けるデータが規格上存在しない場合も、ダミーのデータを出力して第1の解析結果を出力し、
該第1の解析結果を編集し、
該編集された第1の解析結果から第2ストリームを作成し、
該第1の解析結果をストリーム化した後の前記第2ストリームについて、後続のデータに影響を与えるデータに変更を加えたことによって、ダミーのデータに対応するデータが規格上存在しなくなった場合、ダミーのデータを削除して第2の解析結果を出力し、
該第2の解析結果から第3ストリームを作成する、
を備えることを特徴とするストリーム作成方法。
In addition to the above embodiment, the following supplementary notes are disclosed.
(Appendix 1)
When data is read from a first stream including bits obtained by encoding image data according to a standard, the first stream is analyzed, and an analysis result is output, the data affected by the preceding data does not exist in the standard Includes first stream analysis means for outputting dummy data and outputting an analysis result;
By editing the analysis result of the first stream analyzing means and changing the data affecting the subsequent data in the second stream after being streamed, the data corresponding to the dummy data conforms to the standard. A second stream analysis unit that deletes dummy data and outputs an analysis result when it no longer exists;
Stream creation means for creating a third stream from the analysis results of the first and second stream analysis means;
A stream creation apparatus comprising:
(Appendix 2)
If the data corresponding to the dummy data exists in the standard even if the data affecting the subsequent data is changed, the second stream analyzing means outputs the dummy data as it is as an analysis result. The stream creation device according to
(Appendix 3)
The data that affects the subsequent data is data indicating the type of block in a coding unit of an image, or a differential motion vector that is a difference between a motion vector and a predicted motion vector. Stream creation device.
(Appendix 4)
The stream creation device according to
(Appendix 5)
The stream creation apparatus according to
(Appendix 6)
The stream creation apparatus according to
(Appendix 7)
When data is read from a first stream consisting of bits encoded with image data according to a standard, the first stream is analyzed, and the analysis result is output in a readable manner, the data affected by the preceding data is in accordance with the standard. Even if it does not exist, output dummy data and output the first analysis result,
Edit the first analysis result,
Creating a second stream from the edited first analysis result;
When the data corresponding to the dummy data does not exist in the standard by changing the data affecting the subsequent data for the second stream after the first analysis result is streamed, Delete the dummy data and output the second analysis result,
Creating a third stream from the second analysis result;
A stream creation method comprising:
10 可変長符号テーブル
11 次シンタックス決定部
12 ストリーム読み出し部
13 解析結果出力部
15 ストリーム解析装置
16 編集装置
17 ストリーム生成装置
20 ストリーム解析装置
21 編集装置
22 ストリーム生成装置
23 ストリーム解析装置
DESCRIPTION OF
Claims (5)
該第1のストリーム解析手段の解析結果を編集し、ストリーム化した後の第2ストリームについて、後続のデータに影響を与えるデータに変更を加えたことによって、ダミーのデータに対応するデータが規格上存在しなくなった場合、ダミーのデータを削除して解析結果を出力する第2のストリーム解析手段と、
該第1と第2のストリーム解析手段の解析結果から第3ストリームを作成するストリーム作成手段と、
を備えることを特徴とするストリーム作成装置。 When data is read from a first stream including bits obtained by encoding image data according to a standard, the first stream is analyzed, and an analysis result is output, the data affected by the preceding data does not exist in the standard Includes first stream analysis means for outputting dummy data and outputting an analysis result;
By editing the analysis result of the first stream analyzing means and changing the data affecting the subsequent data in the second stream after being streamed, the data corresponding to the dummy data conforms to the standard. A second stream analysis unit that deletes dummy data and outputs an analysis result when it no longer exists;
Stream creation means for creating a third stream from the analysis results of the first and second stream analysis means;
A stream creation apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008199859A JP4978582B2 (en) | 2008-08-01 | 2008-08-01 | Stream creation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008199859A JP4978582B2 (en) | 2008-08-01 | 2008-08-01 | Stream creation device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010041216A JP2010041216A (en) | 2010-02-18 |
JP4978582B2 true JP4978582B2 (en) | 2012-07-18 |
Family
ID=42013316
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008199859A Expired - Fee Related JP4978582B2 (en) | 2008-08-01 | 2008-08-01 | Stream creation device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4978582B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0984011A (en) * | 1995-09-14 | 1997-03-28 | Hitachi Ltd | Moving image coding system converter |
JP3586235B2 (en) * | 2001-11-09 | 2004-11-10 | 株式会社東芝 | MPEG stream data recording apparatus, MPEG stream data recording method, and MPEG stream data editing method |
JP4148679B2 (en) * | 2001-12-27 | 2008-09-10 | 株式会社東芝 | Image editing apparatus and method |
-
2008
- 2008-08-01 JP JP2008199859A patent/JP4978582B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010041216A (en) | 2010-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2659748C2 (en) | Syntax and semantics for buffering information to simplify video concatenation | |
TWI521890B (en) | Image coding apparatus, method and program, and image decoding apparatus, method and program | |
JP7357684B2 (en) | Methods, apparatus and computer programs for video decoding | |
TWI496438B (en) | Image coding apparatus, method and program, and image decoding apparatus, method and program | |
JP4114885B2 (en) | Image encoding apparatus, method, and program | |
JP4870170B2 (en) | Apparatus and method for encoding / decoding video data | |
US20230308663A1 (en) | Device and method of video decoding with first and second decoding code | |
AU2005201366A1 (en) | Predictive lossless coding of images and video | |
KR102267770B1 (en) | Method and device for determining a set of modifiable elements in a group of pictures | |
KR102589712B1 (en) | Video decoding methods and devices, storage media | |
KR20130016289A (en) | Moving image prediction encoding device, moving image prediction encoding method, moving image prediction encoding program, moving image prediction decoding device, movign image prediction decoding method, and moving image prediction decoding program | |
JPWO2006114954A1 (en) | VIDEO INFORMATION RECORDING DEVICE, VIDEO INFORMATION RECORDING METHOD, VIDEO INFORMATION RECORDING PROGRAM, AND RECORDING MEDIUM CONTAINING VIDEO INFORMATION RECORDING PROGRAM | |
US8320691B2 (en) | Image coding apparatus, image decoding apparatus, and image decoding method | |
KR20160057311A (en) | Picture encoding program, picture encoding method and picture encoding apparatus, and picture decoding program | |
CN110944173B (en) | Video decoding method, device, electronic equipment and storage medium | |
JP2009152990A (en) | Image encoding device and image decoding device | |
JP4274653B2 (en) | Moving picture composition apparatus and moving picture composition method | |
KR101490686B1 (en) | Apparatus and Method for Encoding Video | |
JP4978582B2 (en) | Stream creation device | |
CN113678378B (en) | Video decoding method, video decoder, and non-volatile computer readable medium | |
JP4415186B2 (en) | Moving picture coding apparatus, moving picture decoding apparatus, codec apparatus, and program | |
KR101171373B1 (en) | Decoding device and method for analyzing syntax to decode bit-stream | |
CN116868569A (en) | Method and apparatus for improved intra mode coding | |
JP2004350030A (en) | Telop superimposing device, telop superimposing method, and telop superimposing program | |
US20130215965A1 (en) | Video encoding and decoding using an epitome |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110513 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120215 |
|
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: 20120321 |
|
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: 20120403 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150427 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 |