JP2007259492A - Information processing apparatus and method - Google Patents

Information processing apparatus and method Download PDF

Info

Publication number
JP2007259492A
JP2007259492A JP2007148247A JP2007148247A JP2007259492A JP 2007259492 A JP2007259492 A JP 2007259492A JP 2007148247 A JP2007148247 A JP 2007148247A JP 2007148247 A JP2007148247 A JP 2007148247A JP 2007259492 A JP2007259492 A JP 2007259492A
Authority
JP
Japan
Prior art keywords
data
picture
code
encoding
macroblock
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.)
Pending
Application number
JP2007148247A
Other languages
Japanese (ja)
Inventor
Takuya Kitamura
卓也 北村
Mamoru Ueda
衛 上田
Katsumi Tawara
勝己 田原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2007148247A priority Critical patent/JP2007259492A/en
Publication of JP2007259492A publication Critical patent/JP2007259492A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/23614Multiplexing of additional data and video streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4348Demultiplexing of additional data and video streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream

Abstract

<P>PROBLEM TO BE SOLVED: To transmit data so as to easily extract significant information by changing a method of superimposing data in accordance with a degree of significance of information. <P>SOLUTION: To a video data signal outputted from a history information multiplexer of a video decoding system, an encoding parameter, above a picture layer, with a high degree of necessity for a number of applications is inserted into a V Blanking region and an encoding parameter, below a slice layer, is inserted into an H Blanking region after being converted into an ancillary packet. In a video encoding system, the ancillary packet superimposed on H Blanking and the ancillary packet superimposed on V Blanking are extracted from an inputted baseband video signal. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、情報処理装置および方法に関し、特に、MPEG規格に基づいて符号化された符号化ビットストリームの構造を変更するために復号および符号化処理を繰り返したとしても画質劣化の発生しないトランスコーディングシステムにおいて、情報の重要度などによって、必要な情報を容易に取り出せるように伝送し、それを読み出すことができる情報処理装置および方法に関する。   The present invention relates to an information processing apparatus and method, and in particular, transcoding that does not cause image quality degradation even when decoding and encoding processing are repeated to change the structure of an encoded bitstream that is encoded based on the MPEG standard. The present invention relates to an information processing apparatus and method capable of transmitting and reading out necessary information easily according to the importance of information in a system.

近年、テレビジョンプログラムを制作および放送する放送局においては、ビデオデータを圧縮/符号化処理するために、MPEG(Moving Picture Experts Group)技術が一般的に使われるようになってきた。特に、ビデオデータをテープなどのランダムアクセス可能な記録媒体素材に記録する場合、およびビデオデータをケーブルや衛星を介して伝送する場合には、このMPEG技術がデファクトスタンダードになりつつある。 In recent years, MPEG (Moving Picture Experts Group) technology has been generally used in broadcasting stations that produce and broadcast television programs in order to compress / encode video data. In particular, this MPEG technology is becoming the de facto standard when recording video data on a randomly accessible recording medium material such as a tape and when transmitting video data via a cable or satellite.

放送局において制作されたビデオプログラムが各家庭に伝送されるまでの放送局における処理の一例を簡単に説明する。まず、ビデオカメラとVTR(Video Tape Recorder)が一体となったカムコーダに設けられたエンコーダによって、ソースビデオデータをエンコード処理して磁気テープ上に記録する。この際、カムコーダのエンコーダは、VTRのテープの記録フォーマットに適するように、ソースビデオデータを符号化する。例えば、この磁気テープ上に記録されるMPEGビットストリームのGOP(Group of Pictures)構造は、2フレームから1GOPが構成される構造(例えば、I,B,I,B,I,B,・・・・・・)とされる。また磁気テープ上に記録されているMPEGビットストリームのビットレートは、18Mbpsである。   An example of processing in the broadcasting station until the video program produced in the broadcasting station is transmitted to each home will be briefly described. First, source video data is encoded and recorded on a magnetic tape by an encoder provided in a camcorder in which a video camera and a VTR (Video Tape Recorder) are integrated. At this time, the encoder of the camcorder encodes the source video data so as to be suitable for the recording format of the VTR tape. For example, the GOP (Group of Pictures) structure of an MPEG bit stream recorded on the magnetic tape is a structure in which one frame is composed of two frames (for example, I, B, I, B, I, B,...). ...). The bit rate of the MPEG bit stream recorded on the magnetic tape is 18 Mbps.

次に、メイン放送局において、この磁気テープ上に記録されたビデオビットストリームを編集する編集処理を行う。そのために、磁気テープ上に記録されたビデオビットストリームのGOP構造を、編集処理に適したGOP構造に変換する。編集処理に適したGOP構造とは、1GOPが1フレームから構成され、すべてのピクチャがIピクチャであるGOP構造である。なぜなら、フレーム単位で編集を行うためには、他のピクチャと相関のないIピクチャが最も適しているからである。実際のオペレーションとしては、磁気テープ上に記録されたビデオストリームを一旦デコードしてベースバンドのビデオデータに戻す。そして、そのベースバンドのビデオ信号を、すべてのピクチャがIピクチャとなるように再エンコードする。このようにデコード処理および再エンコード処理を行うことによって、編集処理に適したGOP構造を有したビットストリームを生成することができる。   Next, in the main broadcasting station, editing processing for editing the video bit stream recorded on the magnetic tape is performed. For this purpose, the GOP structure of the video bit stream recorded on the magnetic tape is converted into a GOP structure suitable for editing processing. A GOP structure suitable for editing processing is a GOP structure in which one GOP is composed of one frame and all pictures are I pictures. This is because an I picture having no correlation with other pictures is most suitable for editing in frame units. In actual operation, the video stream recorded on the magnetic tape is once decoded and returned to the baseband video data. Then, the baseband video signal is re-encoded so that all pictures become I pictures. By performing the decoding process and the re-encoding process in this way, it is possible to generate a bitstream having a GOP structure suitable for editing processing.

次に、上述した編集処理によって生成された編集ビデオプログラムを、メイン局から地方局に伝送するために、編集ビデオプログラムのビットストリームを、伝送処理に適したGOP構造およびビットレートに変換する。放送局間の伝送に適したGOP構造とは、例えば、1GOPが15フレームから構成されているGOP構造(例えば、I,B,B,P,B,B,P・・・・)である。また、放送局間の伝送に適したビットレートは、一般的に放送局間においては、光ファイバなどの高伝送容量を有した専用線が設けられているので、50Mbps以上のハイビットレートであることが望ましい。具体的には、編集処理されたビデオプログラムのビットストリームを一旦デコードしてベースバンドのビデオデータに戻す。そして、そのベースバンドのビデオデータを上述した放送局間の伝送に適したGOP構造およびビットレートを有するように再エンコードする。   Next, in order to transmit the edited video program generated by the above-described editing process from the main station to the local station, the bit stream of the edited video program is converted into a GOP structure and a bit rate suitable for the transmission process. A GOP structure suitable for transmission between broadcast stations is, for example, a GOP structure in which 1 GOP is composed of 15 frames (for example, I, B, B, P, B, B, P,...). The bit rate suitable for transmission between broadcasting stations is generally a high bit rate of 50 Mbps or more because a dedicated line having a high transmission capacity such as an optical fiber is provided between broadcasting stations. Is desirable. Specifically, the bit stream of the edited video program is once decoded and returned to baseband video data. Then, the baseband video data is re-encoded so as to have a GOP structure and a bit rate suitable for transmission between the broadcasting stations described above.

地方局においては、メイン局から伝送されてきたビデオプログラムの中に、地方特有のコマーシャルを挿入するために編集処理が行われる。つまり、上述した編集処理と同じように、メイン局から伝送されてきたビデオストリームを一旦デコードしてベースバンドのビデオデータに戻す。そして、そのベースバンドのビデオ信号を、すべてのピクチャがIピクチャとなるように再エンコードすることによって、編集処理に適したGOP構造を有したビットストリームを生成することができる。   In the local station, editing processing is performed in order to insert a commercial unique to the local area in the video program transmitted from the main station. That is, as in the editing process described above, the video stream transmitted from the main station is once decoded and returned to the baseband video data. Then, by re-encoding the baseband video signal so that all the pictures become I pictures, a bitstream having a GOP structure suitable for editing processing can be generated.

続いて、この地方局において編集処理が行われたビデオプログラムを各家庭に、ケーブルや衛星を介して伝送するために、この伝送処理に適したGOP構造およびビットレートに変換する。例えば、各家庭に伝送するための伝送処理に適したGOP構造とは、1GOPが15フレームから構成されるGOP構造(例えば、I,B,B,P,B,B,P・・・・)であって、各家庭に伝送するための伝送処理に適したビットレートは、5Mbps程度の低ビットレートである。具体的には、編集処理されたビデオプログラムのビットストリームを一旦デコードしてベースバンドのビデオデータに戻す。そして、そのベースバンドのビデオデータを、上述した伝送処理に適したGOP構造およびビットレートを有するように再エンコードする。   Subsequently, the video program edited in the local station is converted into a GOP structure and a bit rate suitable for the transmission process to be transmitted to each home via a cable or a satellite. For example, a GOP structure suitable for transmission processing for transmission to each home is a GOP structure in which 1 GOP is composed of 15 frames (for example, I, B, B, P, B, B, P,...). The bit rate suitable for transmission processing for transmission to each home is a low bit rate of about 5 Mbps. Specifically, the bit stream of the edited video program is once decoded and returned to baseband video data. Then, the baseband video data is re-encoded so as to have a GOP structure and a bit rate suitable for the transmission processing described above.

以上の説明からも理解できるように、放送局から各家庭にビデオプログラムが伝送される間に、複数回の復号処理および符号化処理が繰り返されている。実際には、放送局における処理は上述した信号処理以外にもさまざまな信号処理が必要であり、そのたびに復号処理および符号化処理を繰り返さなければならない。   As can be understood from the above description, the decoding process and the encoding process are repeated a plurality of times while the video program is transmitted from the broadcast station to each home. Actually, the processing at the broadcasting station requires various signal processing in addition to the signal processing described above, and the decoding processing and the encoding processing must be repeated each time.

しかしながら、MPEG規格に基づく符号化処理および復号処理は、100%可逆の処理ではないことは良く知られている。つまり、エンコードされる前のベースバンドのビデオデータと、デコードされた後のビデオデータは100%同じでは無く、この符号化処理および復号処理によって画質が劣化している。つまり、上述したように、デコード処理およびエンコード処理を繰り返すと、その処理の度に、画質が劣化してしまうと言う問題があった。別の言葉で表現すると、デコード/エンコード処理を繰り返す毎に、画質の劣化が蓄積されてしまう。   However, it is well known that encoding processing and decoding processing based on the MPEG standard are not 100% reversible processing. That is, the baseband video data before being encoded and the video data after being decoded are not 100% the same, and the image quality is degraded by this encoding process and decoding process. That is, as described above, there is a problem in that when the decoding process and the encoding process are repeated, the image quality deteriorates every time the process is performed. In other words, image quality deterioration is accumulated every time decoding / encoding processing is repeated.

この問題を解決するために、符号化履歴をビデオデータとともに伝送し、それを利用して符号化および復号を実行することにより、画質の劣化を防ぐ技術がある。   In order to solve this problem, there is a technique for preventing deterioration in image quality by transmitting an encoding history together with video data and performing encoding and decoding using the transmission history.

しかしながら、画像を処理するアプリケーションによっては、デコード処理およびエンコード処理の実行にあたって、トランスコーディングシステムが全てのパラメータを必要としていない場合もある。しかしながら、必要とするデータがどの領域に位置するのかがわからないため、トランスコーディングシステムにおいては、全てのデータにアクセスできるように、ハードウェアを組む必要がある。そのため、ハードウェアが複雑になったり、装置の規模が大きくなってしまう。更に、ノイズ等の影響により、パケットが欠落すると、それ以降のデータの復帰が困難なため、多くのデータが欠落してしまう恐れがある。   However, depending on the application that processes the image, the transcoding system may not need all the parameters when executing the decoding process and the encoding process. However, since it is not known in which region the necessary data is located, in the transcoding system, it is necessary to assemble hardware so that all data can be accessed. For this reason, the hardware becomes complicated and the scale of the apparatus increases. Furthermore, if a packet is lost due to the influence of noise or the like, it is difficult to recover the data thereafter, and thus a large amount of data may be lost.

本発明は、このような状況に鑑みてなされたものであり、MPEG規格に基づいて符号化された符号化ビットストリームのGOPの構造を変更するために復号および符号化処理を繰り返したとしても画質劣化の発生しないトランスコーディングシステムにおいて、情報の重要度などによって、データの重畳方法を変更し、所定の位置(例えば、垂直ブランキング領域および水平ブランキング領域)に記述することにより、必要な情報を容易に取り出せるように伝送し、それを読み出すことができるようにするものである。   The present invention has been made in view of such a situation, and even if decoding and encoding processes are repeated to change the GOP structure of an encoded bitstream encoded based on the MPEG standard, the image quality is improved. In a transcoding system where degradation does not occur, change the data superposition method according to the importance of information, etc., and describe it in a predetermined position (for example, vertical blanking area and horizontal blanking area), so that necessary information can be It is transmitted so that it can be easily taken out, and it can be read out.

本発明の一側面の情報処理装置は、符号化ストリームを復号して得られる画像データに、符号化パラメータを挿入する情報処理装置であって、前記符号化ストリームの符号化パラメータを、前記符号化ストリームとともに取得する取得手段と、前記取得手段により取得された前記符号化パラメータに含まれるピクチャ層以上の符号化パラメータとスライス層以下の符号化パラメータとが前記符号化ストリームの再符号化処理において選択的に利用されるように、前記ピクチャ層以上の符号化パラメータを前記画像データの垂直ブランキング領域に挿入して伝送するか、前記スライス層以下の符号化パラメータを前記画像データの水平ブランキング領域に挿入して伝送するかを、選択的に行う伝送手段とを備える。   An information processing apparatus according to an aspect of the present invention is an information processing apparatus that inserts an encoding parameter into image data obtained by decoding an encoded stream, the encoding parameter of the encoded stream being the encoding In the re-encoding process of the encoded stream, an acquisition unit that is acquired together with the stream, an encoding parameter that is higher than a picture layer and an encoding parameter that is lower than a slice layer included in the encoding parameter acquired by the acquisition unit are selected. In order to be used, an encoding parameter equal to or higher than the picture layer is inserted into a vertical blanking area of the image data and transmitted, or an encoding parameter equal to or lower than the slice layer is transmitted as a horizontal blanking area of the image data. And transmission means for selectively performing transmission after insertion.

前記符号化ストリームを復号して前記画像データを生成する復号手段を更に備えさせるようにすることができる。   Decoding means for decoding the encoded stream to generate the image data can be further provided.

前記符号化パラメータは、前記符号化ストリームを生成する際に利用された現符号化パラメータを含むものとすることができる。   The encoding parameter may include a current encoding parameter used when generating the encoded stream.

前記符号化パラメータは、前記符号化ストリームに対する過去の符号化処理または復号処理において利用された履歴符号化パラメータを含むものとすることができる。   The encoding parameter may include a history encoding parameter used in a past encoding process or decoding process for the encoded stream.

前記符号化パラメータは、前記符号化ストリームに多重化されているものとすることができ、前記取得手段は、前記符号化ストリームから前記符号化パラメータを取得させるようにすることができる。   The encoding parameter may be multiplexed in the encoded stream, and the acquisition unit may acquire the encoding parameter from the encoded stream.

前記符号化ストリームは、MPEG規格に準じて符号化されているものとすることができる。   The encoded stream may be encoded according to the MPEG standard.

前記再符号化処理は、MPEG規格に準じているものとすることができる。   The re-encoding process may conform to the MPEG standard.

本発明の一側面の情報処理方法は、符号化ストリームを復号して得られる画像データに、符号化パラメータを挿入する情報処理装置の情報処理方法であって、前記符号化ストリームの符号化パラメータを、前記符号化ストリームとともに取得し、取得された前記符号化パラメータに含まれるピクチャ層以上の符号化パラメータとスライス層以下の符号化パラメータとが前記符号化ストリームの再符号化処理において選択的に利用されるように、前記ピクチャ層以上の符号化パラメータを前記画像データの垂直ブランキング領域に挿入して伝送するか、前記スライス層以下の符号化パラメータを前記画像データの水平ブランキング領域に挿入して伝送するかを、選択的に実行するステップを含む。   An information processing method according to one aspect of the present invention is an information processing method of an information processing apparatus that inserts an encoding parameter into image data obtained by decoding an encoded stream, the encoding parameter of the encoded stream being , Obtained together with the encoded stream, and selectively used in the re-encoding process of the encoded stream, the encoding parameter higher than the picture layer and the encoding parameter lower than the slice layer included in the acquired encoding parameter As described above, an encoding parameter higher than the picture layer is inserted into the vertical blanking region of the image data for transmission, or an encoding parameter lower than the slice layer is inserted into the horizontal blanking region of the image data. Or selectively executing whether to transmit.

本発明の一側面においては、符号化ストリームの符号化パラメータが、符号化ストリームとともに取得され、取得された符号化パラメータに含まれるピクチャ層以上の符号化パラメータとスライス層以下の符号化パラメータとが符号化ストリームの再符号化処理において選択的に利用されるように、ピクチャ層以上の符号化パラメータが画像データの垂直ブランキング領域に挿入されて伝送されるか、スライス層以下の符号化パラメータが画像データの水平ブランキング領域に挿入されて伝送される。   In one aspect of the present invention, an encoding parameter of an encoded stream is acquired together with the encoded stream, and an encoding parameter equal to or higher than a picture layer and an encoding parameter equal to or lower than a slice layer are included in the acquired encoding parameter. In order to be selectively used in the re-encoding process of the encoded stream, an encoding parameter higher than the picture layer is inserted and transmitted in the vertical blanking region of the image data, or an encoding parameter lower than the slice layer is transmitted. It is inserted into the horizontal blanking area of image data and transmitted.

以上のように、本発明の一側面によれば、符号化パラメータを伝送することができ、特に、後段の装置が伝送された符号化パラメータを用いることにより、画像の劣化を防ぐことができる。   As described above, according to one aspect of the present invention, it is possible to transmit an encoding parameter, and in particular, it is possible to prevent image degradation by using an encoding parameter transmitted by a subsequent apparatus.

以下、図を参照して、本発明の実施の形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明のトランスコーディングシステムを示すブロック図である。ビデオデコーディングシステム1は、ビットストリームの入力を受け、図5を用いて後述する方法で、入力された信号をデコードし、図7を用いて後述するV Blanking領域およびH Blanking領域に必要に応じた情報を記述し、ベースバンドビデオ信号に変換して出力する。ビデオエンコーディングシステム2は、ベースバンドビデオ信号の入力を受け、図7を用いて後述するV Blanking領域およびH Blanking領域から必要に応じた情報を取り出し、図12を用いて後述する方法で、入力された信号をエンコードし、ビットストリームに変換して出力する。ビデオ処理システム(VTR)3は、必要に応じて、ベースバンドビデオ信号に対する編集処理を実行する。   FIG. 1 is a block diagram showing a transcoding system of the present invention. The video decoding system 1 receives the input of the bit stream, decodes the input signal by a method to be described later with reference to FIG. 5, and if necessary, performs V blanking area and H blanking area to be described later with reference to FIG. 7. Information is described, converted into a baseband video signal and output. The video encoding system 2 receives the input of the baseband video signal, extracts necessary information from a V Blanking area and an H Blanking area, which will be described later using FIG. 7, and is input by a method described later using FIG. The encoded signal is encoded, converted into a bit stream, and output. The video processing system (VTR) 3 executes editing processing on the baseband video signal as necessary.

図2は、ビデオデコーディングシステム1の詳細な構成を示すブロック図である。   FIG. 2 is a block diagram showing a detailed configuration of the video decoding system 1.

復号装置11は、入力されたビットストリームから、ビデオ信号を取り出し、ヒストリ情報多重化装置12に出力し、1世代前の符号化パラメータ(例えば、このトランスコーディングシステムが第4世代であれば、第3世代の符号化パラメータ)を取り出し、ヒストリ情報多重化装置12およびデータ分類装置13に出力し、ビデオデコーディングシステムに入力される以前のデータの変換履歴を示すユーザデータ(すなわち、直前の世代より更に前の世代の符号化パラメータ)をヒストリデコーディング装置14に入力する。   The decoding device 11 extracts a video signal from the input bit stream, outputs the video signal to the history information multiplexing device 12, and outputs the encoding parameter one generation before (for example, if this transcoding system is the fourth generation, 3 generation encoding parameters) are extracted and output to the history information multiplexing device 12 and the data classification device 13, and the user data indicating the conversion history of the previous data input to the video decoding system (that is, from the previous generation) Further, the previous generation encoding parameter) is input to the history decoding device 14.

データ分類装置13に入力された符号化パラメータは、例えば、多くのアプリケーションで必要度の高いピクチャ層以上の符号化パラメータと、全てのパラメータで必要ではないスライス層以下の符号化パラメータとに分離され、フォーマットコンバータ15およびフォーマットコンバータ17にそれぞれ出力される。フォーマットコンバータ15およびフォーマットコンバータ17は、入力された符号化パラメータをアンシラリパケットにフォーマット変換し、V Blanking挿入装置16およびH Blanking挿入装置18にそれぞれ出力する。   The coding parameters input to the data classification device 13 are separated into, for example, coding parameters higher than the picture layer, which are highly necessary in many applications, and coding parameters below the slice layer that are not necessary for all parameters. Are output to the format converter 15 and the format converter 17, respectively. The format converter 15 and the format converter 17 convert the input encoding parameters into ancillary packets and output them to the V blanking insertion device 16 and the H blanking insertion device 18, respectively.

ヒストリデコーディング装置14は、復号装置11より供給されるユーザデータをデコードするユーザデータデコーダ21、ユーザデータデコーダ21の出力を変換するコンバータ22、およびコンバータ22の出力から履歴情報を再生するヒストリVLD(Variable Length Decoder)23により構成されている。   The history decoding device 14 includes a user data decoder 21 that decodes user data supplied from the decoding device 11, a converter 22 that converts the output of the user data decoder 21, and a history VLD that reproduces history information from the output of the converter 22 ( Variable Length Decoder) 23.

ユーザデータデコーダ21は、復号装置11より供給されるユーザデータをデコードして、コンバータ22に出力する。詳細は図28を参照して後述するが、ユーザデータ(user_data())は、user_data_start_codeとuser_dataからなり、MPEG規格においてはuser_dataの中に、連続する23ビットの”0”(start_codeと同一のコード)を発生させることを禁止している。これは、そのデータが、start_codeとして誤検出されるのを防止するためである。履歴情報(history_stream())は、ユーザデータエリアに(MPEG規格のuser_dataの一種として)記述され、その中には、このような連続する23ビット以上の”0”が存在することがあり得るので、これを、連続する23ビット以上の”0”が発生しないように、所定のタイミングで“1”を挿入処理して、converted_history_stream()(後述する図15)に変換する必要がある。この変換を行うのは、後述するヒストリエンコーディング装置のコンバータである。ヒストリデコーディング装置14のコンバータ22は、このコンバータと逆の変換処理を行う(連続する23ビット以上の”0”を発生させないために挿入された”1”を除去する)ものである。   The user data decoder 21 decodes the user data supplied from the decoding device 11 and outputs it to the converter 22. Although details will be described later with reference to FIG. 28, user data (user_data ()) is composed of user_data_start_code and user_data. In the MPEG standard, 23 bits of “0” (the same code as start_code) is included in user_data. ) Is prohibited. This is to prevent the data from being erroneously detected as start_code. The history information (history_stream ()) is described in the user data area (as a kind of user_data in the MPEG standard), and there may be such “0” of 23 bits or more in succession. Therefore, it is necessary to insert “1” at a predetermined timing and convert it into converted_history_stream () (FIG. 15 to be described later) so that consecutive “0” s of 23 bits or more do not occur. This conversion is performed by a converter of the history encoding apparatus described later. The converter 22 of the history decoding apparatus 14 performs a conversion process reverse to that of the converter (removes “1” inserted so as not to generate “0” of 23 or more consecutive bits).

ヒストリVLD23は、コンバータ22の出力から履歴情報(いまの場合、第1世代の符号化パラメータと第2世代の符号化パラメータ)を生成し、ヒストリ情報多重化装置12に出力する。   The history VLD 23 generates history information (in this case, a first generation encoding parameter and a second generation encoding parameter) from the output of the converter 22 and outputs the history information to the history information multiplexer 12.

すなわち、ヒストリデコーディング装置14は、受け取ったユーザデータのシンタックスを解析することによって、ユーザデータの中に記述されている固有のHistory_Data_Idを検出し、これによって、converted_history_stream()を抽出することができる。更に、ヒストリデコーディング装置14は、converted_history_stream()中にある所定間隔に挿入されている1ビットのマーカービット(marker_bit)を取りさることによって、history_stream()を得ることができ、そして、そのhistory_stream()のシンタックスを解析することによって、history_stream()中に記述されている第1世代および第2世代の符号化パラメータを得ることができる。   That is, the history decoding apparatus 14 can detect the unique History_Data_Id described in the user data by analyzing the syntax of the received user data, and thereby extract the converted_history_stream (). . Furthermore, the history decoding device 14 can obtain history_stream () by taking 1 marker bit (marker_bit) inserted at a predetermined interval in the converted_history_stream (), and the history_stream () The first generation and second generation encoding parameters described in history_stream () can be obtained by analyzing the syntax).

ヒストリ情報多重化装置12は、ビデオデコーディングシステムに入力される以前の全てのデータ変更履歴(例えば、これが第4世代の変更であれば、第1世代、第2世代および第3世代の符号化パラメータ)を、第4世代の符号化処理を行うビデオエンコーディングシステム2に供給するために、復号装置11においてデコードされたベースバンドのビデオデータに、これらの第1世代、第2世代および第3世代の符号化パラメータを多重化するための回路である。   The history information multiplexer 12 records all data change histories before being input to the video decoding system (for example, if this is a fourth generation change, the first generation, second generation and third generation encodings). Parameter) to the video encoding system 2 that performs the fourth generation encoding process, the baseband video data decoded by the decoding device 11 is added to the first generation, second generation, and third generation. This is a circuit for multiplexing the encoding parameters.

ヒストリ情報多重化装置12から出力された信号は、V Blanking挿入装置16に入力される。V Blanking挿入装置16は、図7を用いて後述するV Blanking領域に、フォーマットコンバータ15から入力されたピクチャ層以上の符号化パラメータを挿入し、H Blanking挿入装置18に出力する。H Blanking挿入装置18は、図7を用いて後述するH Blanking領域に、フォーマットコンバータ17から入力されたスライス層以下の符号化パラメータを挿入し、出力する。   The signal output from the history information multiplexing device 12 is input to the V Blanking insertion device 16. The V Blanking insertion device 16 inserts an encoding parameter equal to or higher than the picture layer input from the format converter 15 into a V Blanking area, which will be described later with reference to FIG. 7, and outputs it to the H Blanking insertion device 18. The H Blanking insertion device 18 inserts an encoding parameter below the slice layer input from the format converter 17 into an H Blanking area, which will be described later with reference to FIG.

図3は、ビデオエンコーディングシステム2の詳細な構成を示すブロック図である。   FIG. 3 is a block diagram showing a detailed configuration of the video encoding system 2.

H Blanking抽出装置31は、入力されたベースバンドビデオ信号から、H Blanking領域に重畳されたアンシラリパケットを抽出し、フォーマットコンバータ32に出力する。フォーマットコンバータ32は、入力されたアンシラリパケットのフォーマットを変換し、マルチプレクサ33に出力する。V Blanking抽出装置34は、入力されたベースバンドビデオ信号から、V Blanking領域に重畳されたアンシラリパケットを抽出し、フォーマットコンバータ35に出力する。フォーマットコンバータ35は、入力されたアンシラリパケットのフォーマットを変換し、マルチプレクサ33に出力する。マルチプレクサ33は、入力された信号を多重化し、パラメータ再生部36に出力する。   The H Blanking extraction device 31 extracts the ancillary packet superimposed on the H Blanking area from the input baseband video signal and outputs it to the format converter 32. The format converter 32 converts the format of the input ancillary packet and outputs it to the multiplexer 33. The V Blanking extraction device 34 extracts the ancillary packet superimposed on the V Blanking area from the input baseband video signal, and outputs it to the format converter 35. The format converter 35 converts the format of the input ancillary packet and outputs it to the multiplexer 33. The multiplexer 33 multiplexes the input signals and outputs them to the parameter reproducing unit 36.

パラメータ再生部36は、パケットが欠落していた場合、図8を用いて後述する方法で、損失したデータを修正し、修正後のデータを符号化装置39に出力する。   When the packet is missing, the parameter reproducing unit 36 corrects the lost data by a method described later with reference to FIG. 8 and outputs the corrected data to the encoding device 39.

H Blanking抽出装置31およびH Blanking抽出装置34においてアンシラリパケットが抽出された後、データは、ヒストリ情報分離装置37に入力される。ヒストリ情報分離装置37は、伝送データからベースバンドのビデオデータを抽出して、そのビデオデータを符号化装置39に供給するとともに、伝送データから第1世代、第2世代および第3世代のヒストリ情報を抽出して、符号化装置39とヒストリエンコーディング装置38にそれぞれ供給する。   After the ancillary packet is extracted by the H Blanking extraction device 31 and the H Blanking extraction device 34, the data is input to the history information separation device 37. The history information separation device 37 extracts baseband video data from the transmission data, supplies the video data to the encoding device 39, and the first generation, second generation, and third generation history information from the transmission data. Are extracted and supplied to the encoding device 39 and the history encoding device 38, respectively.

ヒストリエンコーディング装置38において、ヒストリVLC(Variable Length Coder)43は、ヒストリ情報分離装置37より供給される3世代分の(第1世代、第2世代、および第3世代の)符号化パラメータを、履歴情報のフォーマットに変換する。このフォーマットには、固定長のもの(後述する図17乃至図23)と、可変長のもの(後述する図24)とがある。これらの詳細については後述する。   In the history encoding device 38, a history VLC (Variable Length Coder) 43 records the three generations (first generation, second generation, and third generation) of encoding parameters supplied from the history information separation device 37. Convert to information format. There are a fixed length format (FIGS. 17 to 23 described later) and a variable length format (FIG. 24 described later). Details of these will be described later.

ヒストリVLC43により、フォーマット化された履歴情報は、コンバータ42において、converted_history_stream()に変換される。これは、上述したように、user_data()のstart_codeが誤検出されないようにするための処理である。すなわち、履歴情報内には連続する23ビット以上の”0”が存在するが、user_data中には連続する23ビット以上の”0”を配置することができないので、この禁止項目に触れないようにコンバータ42によりデータを変換する(“1”を所定のタイミングで挿入する)。   The history information formatted by the history VLC 43 is converted into converted_history_stream () by the converter 42. As described above, this is a process for preventing the start_code of user_data () from being erroneously detected. That is, although “0” having 23 or more consecutive bits exists in the history information, since “0” having 23 or more consecutive bits cannot be arranged in user_data, do not touch this prohibited item. Data is converted by the converter 42 ("1" is inserted at a predetermined timing).

ユーザデータフォーマッタ41は、コンバータ42より供給されるconverted_history_stream()に、後述する図15に基づいて、History_Data_IDを付加し、更に、user_data_stream_codeを付加して、video stream中に挿入できるMPEG規格のuser_dataを生成し、符号化装置39に出力する。   The user data formatter 41 adds the History_Data_ID to the converted_history_stream () supplied from the converter 42 based on FIG. 15 to be described later, and further adds the user_data_stream_code to generate user_data of the MPEG standard that can be inserted into the video stream. And output to the encoding device 39.

符号化装置39は、ヒストリ情報分離装置37から供給されたベースバンドのビデオデータを、オペレータまたはホストコンピュータから指定されたGOP構造およびビットレートを有するビットストリームになるように符号化するための装置である。なお、GOP構造を変更するとは、例えば、GOPに含まれるピクチャの数、IピクチャとIピクチャの間に存在するPピクチャの数、およびIピクチャとPピクチャ(またはIピクチャ)の間に存在するBピクチャの数を変更することを意味する。   The encoding device 39 is a device for encoding the baseband video data supplied from the history information separation device 37 into a bit stream having a GOP structure and a bit rate specified by an operator or a host computer. is there. Note that changing the GOP structure means, for example, the number of pictures included in the GOP, the number of P pictures existing between I pictures and I pictures, and between I pictures and P pictures (or I pictures). This means that the number of B pictures is changed.

この場合、供給されたベースバンドのビデオデータには、第1世代、第2世代および第3世代のヒストリ情報が重畳されているので、この符号化装置39は、再符号化処理による画質劣化が少なくなるように、これらのヒストリ情報を選択的に再利用して第4世代の符号化処理を行う。   In this case, since the history information of the first generation, the second generation, and the third generation is superimposed on the supplied baseband video data, the encoding device 39 causes image quality degradation due to re-encoding processing. The history information is selectively reused so as to reduce the fourth generation encoding process.

例えば、ピクチャ層以上のデータのみを取り扱う場合、図2および図3を用いて説明した全てのハードウェアは必要ではない。すなわち、図2において、フォーマットコンバータ17およびH Blanking挿入装置18を削除し、図3において、H Blanking抽出装置31およびフォーマットコンバータ32を削除したビデオデコーディングシステムを用いればよい。   For example, in the case of handling only data above the picture layer, not all the hardware described with reference to FIGS. 2 and 3 is necessary. That is, a video decoding system in which the format converter 17 and the H Blanking insertion device 18 are deleted in FIG. 2 and the H Blanking extraction device 31 and the format converter 32 are deleted in FIG. 3 may be used.

また、スライス層以下のデータをピクチャ層以上のデータと同様の頻度で取り扱うような場合、図4に示すように、復号装置61、ヒストリデコーディング装置62、およびヒストリ情報多重化装置63からなるビデオデコーディングシステム51、並びに、ヒストリ情報分離装置64、ヒストリエンコーディング装置65、および符号化装置66からなるビデオエンコーディングシステム52を用いてもよい。   Also, when data below the slice layer is handled with the same frequency as data above the picture layer, a video comprising a decoding device 61, a history decoding device 62, and a history information multiplexing device 63, as shown in FIG. You may use the video encoding system 52 which consists of the decoding system 51 and the history information separation apparatus 64, the history encoding apparatus 65, and the encoding apparatus 66. FIG.

復号装置61は、入力されたビットストリームから、ビデオ信号および符号化パラメータを取り出し、ヒストリ情報多重化装置63に出力するとともに、入力されたビットストリームからユーザデータを取り出し、ヒストリデコーディング装置62に出力する。ヒストリデコーディング装置62は、ヒストリデコーディング装置14と同様の方法でユーザデータをデコードし、ヒストリ情報多重化装置63に出力する。ヒストリ情報多重化装置63は、図7を用いて後述するように、指定された領域に符号化パラメータを記述し、ヒストリ情報分離装置64に出力する。   The decoding device 61 extracts a video signal and encoding parameters from the input bit stream and outputs them to the history information multiplexing device 63, and also extracts user data from the input bit stream and outputs it to the history decoding device 62. To do. The history decoding device 62 decodes the user data by the same method as the history decoding device 14 and outputs it to the history information multiplexing device 63. As will be described later with reference to FIG. 7, the history information multiplexing device 63 describes the encoding parameters in the designated area and outputs them to the history information separating device 64.

ヒストリ情報分離装置64は、入力されたデータからベースバンドのビデオデータを抽出して、そのビデオデータを符号化装置66に供給するとともに、入力されたデータの所定の位置に記述されている、第1世代、第2世代および第3世代のヒストリ情報を抽出して、符号化装置66とヒストリエンコーディング装置65にそれぞれ供給する。ヒストリエンコーディング装置65は、ヒストリエンコーディング装置38と同様の処理により、入力されたヒストリ情報をエンコードし、符号化装置66に出力する。符号化装置66は、入力されたデータが、所定のGOP構造およびビットレートを有するビットストリームになるように符号化する。   The history information separation device 64 extracts baseband video data from the input data, supplies the video data to the encoding device 66, and is described at a predetermined position of the input data. The 1st generation, 2nd generation, and 3rd generation history information is extracted and supplied to the encoding device 66 and the history encoding device 65, respectively. The history encoding device 65 encodes the input history information by the same process as the history encoding device 38 and outputs the encoded history information to the encoding device 66. The encoding device 66 encodes the input data so as to be a bit stream having a predetermined GOP structure and bit rate.

図5は、図2を用いて説明した復号装置11(もしくは、図4を用いて説明した復号装置61)に含まれるデコーダ81の詳細な構成を示すブロック図である。   FIG. 5 is a block diagram showing a detailed configuration of the decoder 81 included in the decoding device 11 described with reference to FIG. 2 (or the decoding device 61 described with reference to FIG. 4).

デコーダ81は、供給されたビットストリームをバッファリングするための受信バッファ91、符号化ビットストリームを可変長復号するための可変長復号回路92、可変長復号されたデータを可変長復号回路92から供給された量子化スケールに従って逆量子化する逆量子化回路93、逆量子化されたDCT(離散コサイン変換)係数を逆離散コサイン変換するIDCT回路94、および動き補償処理を行うための演算器95、フレームメモリ96および動き補償回路97を備えている。   The decoder 81 receives a received buffer 91 for buffering the supplied bit stream, a variable length decoding circuit 92 for variable length decoding of the encoded bit stream, and supplies variable length decoded data from the variable length decoding circuit 92. An inverse quantization circuit 93 that performs inverse quantization according to the quantized scale, an IDCT circuit 94 that performs inverse discrete cosine transform on the inversely quantized DCT (discrete cosine transform) coefficient, and an arithmetic unit 95 for performing motion compensation processing; A frame memory 96 and a motion compensation circuit 97 are provided.

可変長復号回路92は、直前の世代(この場合、第3世代)の符号化ビットストリームを復号処理するために、この符号化ビットストリームのピクチャ層、スライス層およびマクロブロック層に記述されている符号化パラメータを抽出する。抽出された符号化パラメータは、図2を用いて説明したように、データ分類装置13にも供給され、ピクチャ層以上とスライス層以下に分類される。   The variable length decoding circuit 92 is described in the picture layer, slice layer, and macroblock layer of this encoded bitstream in order to decode the encoded bitstream of the immediately previous generation (in this case, the third generation). Extract encoding parameters. The extracted encoding parameters are also supplied to the data classification device 13 as described with reference to FIG. 2, and are classified into the picture layer and the slice layer.

例えば、この可変長復号回路92において抽出される第3世代の符号化パラメータは、ピクチャタイプを示すpicture_coding_type、量子化スケールステップサイズを示すquantiser_scale_code、予測モードを示すmacroblock_type、動きベクトルを示すmotion_vector、フレーム予測モードかフィールド予測モードかを示すframe/field_motion_type、およびフレームDCTモードかフィールドDCTモードかを示すdct_type等である。この可変長復号回路92において抽出されたquatntiser_scale_codeは、逆量子化回路93に供給され、picture_coding_type、quatntiser_scale_code、macroblock_type、motion_vector、frame/field_motion_type、dct_type等のパラメータは、動き補償回路97に供給される。   For example, the third generation encoding parameters extracted in the variable length decoding circuit 92 are picture_coding_type indicating the picture type, quantizer_scale_code indicating the quantization scale step size, macroblock_type indicating the prediction mode, motion_vector indicating the motion vector, and frame prediction. Frame / field_motion_type indicating the mode or field prediction mode, and dct_type indicating the frame DCT mode or the field DCT mode. The quatntiser_scale_code extracted by the variable length decoding circuit 92 is supplied to the inverse quantization circuit 93, and parameters such as picture_coding_type, quatntiser_scale_code, macroblock_type, motion_vector, frame / field_motion_type, and dct_type are supplied to the motion compensation circuit 97.

可変長復号回路92は、第3世代の符号化ビットストリームを復号処理するために必要なこれらの符号化パラメータだけではなく、後段の第5世代のトランスコーディングシステムに第3世代のヒストリ情報として伝送されるべき符号化パラメータを、第3世代の符号化ビットストリームのシーケンス層、GOP層、ピクチャ層、スライス層、およびマクロブロック層から抽出する。もちろん、第3世代の復号処理に使用されたpicture_coding_type、quatntiser_scale_code、macroblock_type、motion_vector、frame/field_motion_type、dct_type等の第3世代の符号化パラメータは、この第3世代のヒストリ情報に含まれている。ヒストリ情報としてどのような符号化パラメータを抽出するかについては、伝送容量などに応じてオペレータやホストコンピュータ側から予め設定されている。   The variable length decoding circuit 92 transmits not only these encoding parameters necessary for decoding the third generation encoded bitstream but also the third generation history information to the subsequent fifth generation transcoding system. The encoding parameters to be performed are extracted from the sequence layer, GOP layer, picture layer, slice layer, and macroblock layer of the third generation encoded bitstream. Of course, third-generation encoding parameters such as picture_coding_type, quatntiser_scale_code, macroblock_type, motion_vector, frame / field_motion_type, and dct_type used for the third-generation decoding process are included in the third-generation history information. The encoding parameters to be extracted as history information are set in advance by the operator or the host computer according to the transmission capacity.

更に、可変長復号回路92は、第3世代の符号化ビットストリームのピクチャ層のユーザデータエリアに記述されているユーザデータを抽出し、そのユーザデータをヒストリデコーディング装置14に供給する。   Further, the variable length decoding circuit 92 extracts user data described in the user data area of the picture layer of the third generation encoded bit stream, and supplies the user data to the history decoding device 14.

このヒストリデコーディング装置14は、前述したように、第3世代の符号化ビットストリームのピクチャ層に記述されていたユーザデータから、ヒストリ情報として記述されている第1世代の符号化パラメータおよび第2世代の符号化パラメータ(直前の世代より更に前の世代の符号化パラメータ)を抽出するための回路である。   As described above, the history decoding device 14 uses the first generation encoding parameters described in the history information and the second information from the user data described in the picture layer of the third generation encoded bitstream. This is a circuit for extracting the encoding parameter of the generation (the encoding parameter of the generation before the previous generation).

また、可変長復号回路92は、受信バッファ91より供給されたデータを可変長復号し、動きベクトル、予測モード、予測フラグ、およびDCTフラグを動き補償回路97に出力し、量子化スケールを逆量子化回路93に出力するとともに、復号された画像データを逆量子化回路93に出力する。   The variable length decoding circuit 92 performs variable length decoding on the data supplied from the reception buffer 91, outputs the motion vector, the prediction mode, the prediction flag, and the DCT flag to the motion compensation circuit 97, and sets the quantization scale to the inverse quantum. And outputs the decoded image data to the inverse quantization circuit 93.

逆量子化回路93は、可変長復号回路92より供給された画像データを、同じく可変長復号回路92より供給された量子化スケールに従って逆量子化し、IDCT回路94に出力する。逆量子化回路93より出力されたデータ(DCT係数)は、IDCT回路94により、逆離散コサイン変換処理が施され、演算器95に供給される。   The inverse quantization circuit 93 inversely quantizes the image data supplied from the variable length decoding circuit 92 according to the quantization scale supplied from the variable length decoding circuit 92 and outputs the result to the IDCT circuit 94. The data (DCT coefficient) output from the inverse quantization circuit 93 is subjected to inverse discrete cosine transform processing by the IDCT circuit 94 and supplied to the computing unit 95.

IDCT回路94より演算器95に供給された画像データが、Iピクチャのデータである場合、そのデータは演算器95より出力され、演算器95に後に入力される画像データ(PまたはBピクチャのデータ)の予測画像データ生成のために、フレームメモリ96の前方予測画像部96aに供給されて記憶される。   When the image data supplied from the IDCT circuit 94 to the computing unit 95 is I picture data, the data is output from the computing unit 95, and image data (P or B picture data) to be input later to the computing unit 95. ) Is supplied to and stored in the forward predicted image unit 96a of the frame memory 96.

IDCT回路94より供給された画像データが、その1フレーム前の画像データを予測画像データとするPピクチャのデータであり、前方予測モードのデータである場合、フレームメモリ96の前方予測画像部96aに記憶されている、1フレーム前の画像データ(Iピクチャのデータ)が読み出され、動き補償回路97で可変長復号回路92より出力された動きベクトルに対応する動き補償が施される。そして、演算器95において、IDCT回路94より供給された画像データ(差分のデータ)と加算され、出力される。この加算されたデータ、すなわち、復号されたPピクチャのデータは、演算器95に後に入力される画像データ(BピクチャまたはPピクチャのデータ)の予測画像データ生成のために、フレームメモリ96の後方予測画像部96bに供給されて記憶される。   When the image data supplied from the IDCT circuit 94 is P picture data having the image data of the previous frame as predicted image data and is data in the forward prediction mode, the image data is stored in the forward predicted image unit 96a of the frame memory 96. The stored image data of the previous frame (I picture data) is read out, and motion compensation corresponding to the motion vector output from the variable length decoding circuit 92 is performed by the motion compensation circuit 97. The arithmetic unit 95 adds the image data (difference data) supplied from the IDCT circuit 94 and outputs the result. The added data, that is, the decoded P picture data is stored in the rear of the frame memory 96 in order to generate predicted picture data of picture data (B picture or P picture data) to be input later to the arithmetic unit 95. The predicted image unit 96b is supplied and stored.

このように、Pピクチャのデータであっても、画像内予測モードのデータは、Iピクチャのデータと同様に、演算器95において処理は行われず、そのまま後方予測画像部96bに記憶される。   In this way, even in the case of P picture data, the intra prediction mode data is not processed in the computing unit 95 and stored in the backward predicted image unit 96b as it is in the I picture data.

IDCT回路94より供給された画像データが、Bピクチャのデータである場合、可変長復号回路92より供給された予測モードに対応して、フレームメモリ96の前方予測画像部96aに記憶されているIピクチャの画像データ(前方予測モードの場合)、後方予測画像部96bに記憶されているPピクチャの画像データ(後方予測モードの場合)、または、その両方の画像データ(両方向予測モードの場合)が読み出され、動き補償回路97において、可変長復号回路92より出力された動きベクトルに対応する動き補償が施されて、予測画像が生成される。ただし、動き補償を必要としない場合(画像内予測モードの場合)、予測画像は生成されない。   When the image data supplied from the IDCT circuit 94 is B-picture data, I corresponding to the prediction mode supplied from the variable length decoding circuit 92 is stored in the forward predicted image unit 96a of the frame memory 96. Image data of a picture (in the case of forward prediction mode), image data of a P picture stored in the backward prediction image unit 96b (in the case of backward prediction mode), or both of them (in the case of bidirectional prediction mode) The motion compensation circuit 97 reads out and performs motion compensation corresponding to the motion vector output from the variable length decoding circuit 92, thereby generating a predicted image. However, when motion compensation is not required (in the case of intra-picture prediction mode), a predicted image is not generated.

このようにして、動き補償回路97において動き補償が施されたデータは、演算器95において、IDCT回路94の出力と加算され、出力される。ただし、この加算出力はBピクチャのデータであり、他の画像の予測画像生成のために利用されることがないため、フレームメモリ96には記憶されない。また、動き補償回路97においては、奇数フィールドと偶数フィールドのラインの信号が分離された構成を元の構成に必要に応じて戻す処理も実行される。   In this way, the data subjected to motion compensation in the motion compensation circuit 97 is added to the output of the IDCT circuit 94 in the computing unit 95 and output. However, since this addition output is B picture data and is not used for generating a predicted image of another image, it is not stored in the frame memory 96. Further, in the motion compensation circuit 97, processing for returning the configuration in which the signals of the odd-numbered field and even-numbered line lines are separated to the original configuration is performed as necessary.

Bピクチャの画像が出力された後、後方予測画像部96bに記憶されているPピクチャの画像データが読み出され、動き補償回路97を介して演算器95に供給される。ただし、このとき、動き補償は行われない。   After the B picture image is output, the P picture image data stored in the backward predicted image unit 96 b is read and supplied to the computing unit 95 via the motion compensation circuit 97. However, motion compensation is not performed at this time.

そして、デコーダ81からの出力は、ヒストリ情報多重化装置12に入力される。具体的には、ヒストリ情報多重化装置12は、デコーダ81の演算器95から出力されたベースバンドのビデオデータ、デコーダ81の可変長復号回路92から出力された第3世代の符号化パラメータ、並びに、ヒストリデコーディング装置14から出力された第1世代の符号化パラメータと第2世代の符号化パラメータとを受け取り、このベースバンドのビデオデータに、これらの第1世代、第2世代および第3世代の符号化パラメータを多重化し、その後、図7を用いて後述するように、H Blanking領域およびV Blanking領域に符号化パラメータが記述され、出力データが生成される。   The output from the decoder 81 is input to the history information multiplexer 12. Specifically, the history information multiplexing device 12 includes baseband video data output from the arithmetic unit 95 of the decoder 81, a third generation encoding parameter output from the variable length decoding circuit 92 of the decoder 81, and The first generation encoding parameter and the second generation encoding parameter output from the history decoding device 14 are received, and the first generation, second generation, and third generation are included in the baseband video data. Then, as will be described later with reference to FIG. 7, the encoding parameters are described in the H Blanking area and the V Blanking area, and output data is generated.

次に、これらの第1世代、第2世代および第3世代の符号化パラメータのベースバンドビデオデータへの多重化の方法について、図6乃至図11を参照して説明する。   Next, a method of multiplexing these first generation, second generation, and third generation encoding parameters into baseband video data will be described with reference to FIGS.

図6は、MPEG規格において定義されている、16ピクセル×16ピクセルからなる1つのマクロブロックを示している。この16ピクセル×16ピクセルのマクロブロックは、輝度信号に関しては4つの8ピクセル×8ピクセルからなるサブブロック(Y[0],[1],[2]およびY[3])と、色差信号に関しては4つの8ピクセル×8ピクセルからなるサブブロック(Cr[0],r[1],b[0],およびCb[1])から構成されている。   FIG. 6 shows one macro block of 16 pixels × 16 pixels defined in the MPEG standard. This macro block of 16 pixels × 16 pixels has four sub-blocks (Y [0], [1], [2] and Y [3]) consisting of four 8 pixels × 8 pixels with respect to the luminance signal, and with respect to the color difference signal. Consists of four sub-blocks (Cr [0], r [1], b [0], and Cb [1]) each consisting of 8 pixels × 8 pixels.

そして、図7に示されるように、例えば、多くのアプリケーションで必要度の高い、ピクチャ層以上の符号化パラメータがV Blanking領域に記述され、全てのアプリケーションでは必要とされない、スライス層以下の符号化パラメータがH Blanking領域に記述されるように、前述したV Blanking挿入装置16、およびH Blanking挿入装置18によって挿入される。   Then, as shown in FIG. 7, for example, encoding parameters higher than the picture layer, which are highly necessary in many applications, are described in the V Blanking area, and are not required in all applications. The parameters are inserted by the above-described V Blanking insertion device 16 and H Blanking insertion device 18 so as to be described in the H Blanking area.

また、前述したパラメータ再生部における欠落パケットの修正において、例えば、以前のデータを格納しておき、欠落パケットの個所に相当するデータを補充するなどの方法がある。ここで、図8(A)に示されるように、パケットの区切りにかかわりなく、各データのスタートにstart_codeが書き込まれた場合、全てのデータを読み込んでstart_codeを探さなくてはいけない。従って、V Blanking領域に含まれるピクチャ層以上の情報においては、図8(B)に示されるように、1マクロブロックの情報は、1ストライプのアンシラリパケット内で閉じるようにし、start_codeを常にパケットの先頭に書き込むことにより、欠落パケットの修正を容易にする。   Further, in the correction of the missing packet in the parameter reproducing unit described above, for example, there is a method of storing previous data and supplementing data corresponding to the location of the missing packet. Here, as shown in FIG. 8A, when start_code is written at the start of each data regardless of packet delimitation, all data must be read to find start_code. Therefore, in the information above the picture layer included in the V Blanking area, as shown in FIG. 8B, the information of 1 macroblock is closed within an ancillary packet of 1 stripe, and the start_code is always a packet. By writing at the head of the packet, it is easy to correct the missing packet.

また、図6を用いて説明したマクロブロックにおいて、垂直方向に分解してできる帯単位の情報をストライプという。MPEG2では、インタレース形式の画像を処理する場合、図9に示されるフィールドストラクチャとフレームストラクチャを適宜切り替えて用いている。フィールドストラクチャは、フィールド単位で画像を処理するのに対して、フレームストラクチャでは、2つのフィールドからフレームを構成し、フレーム単位で画像を処理する。そのため、フィールドストラクチャでは、16ラインごとにストライプが形成されるが、フレームストラクチャでは、8ラインごとにストライプが形成される。   Further, in the macro block described with reference to FIG. 6, the information in band units that is decomposed in the vertical direction is called a stripe. In MPEG2, when processing an interlaced image, the field structure and the frame structure shown in FIG. 9 are appropriately switched and used. In the field structure, an image is processed in units of fields, whereas in a frame structure, a frame is composed of two fields, and an image is processed in units of frames. Therefore, in the field structure, a stripe is formed every 16 lines, whereas in the frame structure, a stripe is formed every 8 lines.

それぞれのストライプを形成するスライス層以下の符号化パラメータは、そのストライプのH Blanking領域に閉じた形で伝送する。これにより、各ストライプのビデオデータが得られるのと同時に符号化パラメータも得られるため、時間を合わせるためのバッファなどの機構をもつ必要がなくなる。また、パケットのペイロード内にstart_codeが存在する場合、パケット欠落時の復帰を容易にするため、図10に示すように、start_codeは常にパケットの先頭に書き込まれるようにする。   The encoding parameters below the slice layer forming each stripe are transmitted in a closed form in the H blanking area of the stripe. Thus, since the video data of each stripe can be obtained and the encoding parameter can be obtained at the same time, it is not necessary to have a mechanism such as a buffer for adjusting the time. When start_code exists in the payload of the packet, start_code is always written at the head of the packet as shown in FIG. 10 in order to facilitate recovery when the packet is lost.

図11に示されるように、データブロックは、各サブブロック(Y[0],Y[1],Y[2],Y[3],Cr[0],Cr[1],Cb[0],Cb[1])における1ピクセルを伝送するためのデータブロックであるので、1マクロブロックのデータを伝送するためには、この図11に示されているデータブロックが64個伝送される。下位2ビット(D1とD0)を使用すれば、1マクロブロックのビデオデータに対して、合計で1024(=16×64)ビットのヒストリ情報を伝送できる。従って、1世代分のヒストリ情報は、256ビットとなるように生成されているので、過去の4(=1024/256)世代分のヒストリ情報を1マクロブロックのビデオデータに対して重畳することができる。図11に示した例では、第1世代のヒストリ情報、第2世代のヒストリ情報、並びに、第3世代のヒストリ情報が重畳されている。   As shown in FIG. 11, the data block includes sub-blocks (Y [0], Y [1], Y [2], Y [3], Cr [0], Cr [1], Cb [0]). , Cb [1]) is a data block for transmitting one pixel, 64 data blocks shown in FIG. 11 are transmitted to transmit one macroblock data. If the lower 2 bits (D1 and D0) are used, a total of 1024 (= 16 × 64) bits of history information can be transmitted for one macroblock of video data. Accordingly, since history information for one generation is generated to be 256 bits, history information for the past 4 (= 1024/256) generations may be superimposed on video data of one macroblock. it can. In the example shown in FIG. 11, the first generation history information, the second generation history information, and the third generation history information are superimposed.

図12は、図3を用いて説明した符号化装置39(もしくは、図4を用いて説明した符号化装置66)に設けられているエンコーダ101の具体的な構成を示している図である。このエンコーダ101は、コントローラ125、動きベクトル検出回路111、フレームメモリ112、フレーム/フィールド予測モード切り替え回路113、演算器114、DCTモード切り替え回路115、DCT回路116、量子化回路117、可変長符号化回路118、送信バッファ119、逆量子化回路120、逆DCT(IDCT)回路121、演算器122、フレームメモリ123、および動き補償回路124を備えている。   FIG. 12 is a diagram illustrating a specific configuration of the encoder 101 provided in the encoding device 39 described with reference to FIG. 3 (or the encoding device 66 described with reference to FIG. 4). The encoder 101 includes a controller 125, a motion vector detection circuit 111, a frame memory 112, a frame / field prediction mode switching circuit 113, a calculator 114, a DCT mode switching circuit 115, a DCT circuit 116, a quantization circuit 117, and a variable length coding. A circuit 118, a transmission buffer 119, an inverse quantization circuit 120, an inverse DCT (IDCT) circuit 121, an arithmetic unit 122, a frame memory 123, and a motion compensation circuit 124 are provided.

このエンコーダ101は、上述した各回路の動作および機能を制御するためのコントローラ125を有している。このコントローラ125は、オペレータまたはホストコンピュータからGOP構造に関するインストラクションを受け取って、そのGOP構造に対応するように各ピクチャのピクチャタイプを決定する。また、このコントローラ125は、オペレータまたはホストコンピュータからタ−ゲットビットレートの情報を受け取り、このエンコーダ101から出力されるビットレートが、オペレータまたはホストコンピュータから指定されたターゲットビットレートになるように、量子化回路117を制御する。   The encoder 101 has a controller 125 for controlling the operation and function of each circuit described above. The controller 125 receives an instruction regarding the GOP structure from an operator or a host computer, and determines the picture type of each picture so as to correspond to the GOP structure. Further, the controller 125 receives target bit rate information from the operator or the host computer, and makes the quantum rate so that the bit rate output from the encoder 101 becomes the target bit rate specified by the operator or the host computer. The control circuit 117 is controlled.

更に、このコントローラ125は、ヒストリ情報分離装置37から出力された複数世代のヒストリ情報を受け取り、これらのヒストリ情報を再利用して参照ピクチャの符号化処理を行う。以下に詳しく説明する。   Further, the controller 125 receives a plurality of generations of history information output from the history information separation device 37, and performs a reference picture encoding process by reusing these history information. This will be described in detail below.

まず、このコントローラ125は、オペレータによって指定されたGOP構造から決定された参照ピクチャのピクチャタイプと、ヒストリ情報に含まれるピクチャタイプが一致するか否かを判断する。つまり、指定されたピクチャタイプと同じピクチャタイプでこの参照ピクチャが過去において符号化されたことがあるか否かを判断する。すなわち、このコントローラ125は、第4世代の符号化処理としてこの参照ピクチャにアサインされたピクチャタイプが、第1世代の符号化処理おけるこの参照ピクチャのピクチャタイプ、第2世代の符号化処理おけるこの参照ピクチャのピクチャタイプ、または第3世代の符号化処理おけるこの参照ピクチャのピクチャタイプのいずれかと一致するか否かを判断する。   First, the controller 125 determines whether or not the picture type of the reference picture determined from the GOP structure designated by the operator matches the picture type included in the history information. That is, it is determined whether or not this reference picture has been encoded in the past with the same picture type as the designated picture type. That is, the controller 125 determines that the picture type assigned to the reference picture as the fourth generation encoding process is the picture type of the reference picture in the first generation encoding process and the picture type assigned to the reference picture in the second generation encoding process. It is determined whether the picture type of the reference picture matches the picture type of the reference picture in the third generation encoding process.

もし、第4世代の符号化処理としてこの参照ピクチャに指定されたピクチャタイプが、過去の符号化処理におけるどのピクチャタイプとも一致しないのであれは、このコントローラ125は、「通常符号化処理」を行う。つまり、この場合には、第1世代、第2世代または第3世代のどの世代の符号化処理においても、第4世代の符号化処理としてアサインされたピクチャタイプで、この参照ピクチャが符号化処理されたことがないということになる。一方、もし、第4世代の符号化処理としてこの参照ピクチャに指定されたピクチャタイプが、過去の符号化処理におけるいずれかのピクチャタイプと一致するのであれば、このコントローラ125は、「パラメータ再利用符号化処理」を行う。つまり、この場合には、第1世代、第2世代または第3世代のいずれかの世代の符号化処理において、第4世代の符号化処理としてアサインされたピクチャタイプで、この参照ピクチャが符号化処理されたことがあるということになる。   If the picture type specified for the reference picture as the fourth generation encoding process does not match any picture type in the past encoding process, the controller 125 performs the “normal encoding process”. . That is, in this case, in any of the first generation, second generation, or third generation encoding processing, this reference picture is encoded using the picture type assigned as the fourth generation encoding processing. It has never been done. On the other hand, if the picture type specified in the reference picture as the fourth generation encoding process matches any picture type in the past encoding process, the controller 125 will execute “parameter reuse”. Encoding process "is performed. In other words, in this case, the reference picture is encoded with the picture type assigned as the fourth generation encoding process in the first generation, second generation, or third generation encoding process. It means that it has been processed.

まず、最初にコントローラ125の通常符号化処理について説明する。   First, the normal encoding process of the controller 125 will be described.

符号化される画像データは、マクロブロック単位で動きベクトル検出回路111に入力される。動きベクトル検出回路111は、予め設定されている所定のシーケンスに従って、各フレームの画像データを、Iピクチャ、Pピクチャ、またはBピクチャとして処理する。シーケンシャルに入力される各フレームの画像を、I,P、またはBのいずれのピクチャとして処理するかは、予め定められている。   The encoded image data is input to the motion vector detection circuit 111 in units of macroblocks. The motion vector detection circuit 111 processes the image data of each frame as an I picture, P picture, or B picture according to a predetermined sequence set in advance. It is determined in advance whether the image of each frame that is sequentially input is processed as an I, P, or B picture.

Iピクチャとして処理されるフレームの画像データは、動きベクトル検出回路111からフレームメモリ112の前方原画像部112aに転送、記憶され、Bピクチャとして処理されるフレームの画像データは、原画像部112bに転送、記憶され、Pピクチャとして処理されるフレームの画像データは、後方原画像部112cに転送、記憶される。   Image data of a frame processed as an I picture is transferred and stored from the motion vector detection circuit 111 to the front original image unit 112a of the frame memory 112, and image data of a frame processed as a B picture is stored in the original image unit 112b. The image data of the frame transferred and stored and processed as the P picture is transferred and stored in the rear original image unit 112c.

また、次のタイミングにおいて、更にBピクチャまたはPピクチャとして処理すべきフレームの画像が入力されたとき、それまで後方原画像部112cに記憶されていた最初のPピクチャの画像データが、前方原画像部112aに転送され、次のBピクチャの画像データが、参照原画像部112bに記憶(上書き)され、次のPピクチャの画像データが、後方原画像部112cに記憶(上書き)される。このような動作が順次繰り返される。   At the next timing, when an image of a frame to be further processed as a B picture or a P picture is input, the image data of the first P picture that has been stored in the rear original image unit 112c until then is the front original image. The image data of the next B picture is stored (overwritten) in the reference original image unit 112b, and the image data of the next P picture is stored (overwritten) in the rear original image unit 112c. Such an operation is sequentially repeated.

フレームメモリ112に記憶された各ピクチャの信号は、そこから読み出され、予測モード切り替え回路113において、フレーム予測モード処理、またはフィールド予測モード処理が行なわれる。   The signal of each picture stored in the frame memory 112 is read therefrom, and the prediction mode switching circuit 113 performs frame prediction mode processing or field prediction mode processing.

動きベクトル検出回路111は、フレーム予測モードまたはフィールド予測モードのどちらが選択されるべきかを判断するために、フレーム予測モードにおける予測誤差とフィールド予測モードおける予測誤差をそれぞれ検出し、その予測誤差の値をコントローラ125に供給する。   The motion vector detection circuit 111 detects a prediction error in the frame prediction mode and a prediction error in the field prediction mode in order to determine whether the frame prediction mode or the field prediction mode should be selected, and the value of the prediction error Is supplied to the controller 125.

すなわち、動きベクトル検出回路111は、画像内予測の予測誤差の絶対値和として、参照画像のマクロブロックの信号Aijの総和ΣAijの絶対値|ΣAij|と、マクロブロックの信号Aijの絶対値|Aij|の総和Σ|Aij|の差を求める。また、前方予測の予測誤差の絶対値和として、参照画像のマクロブロックの信号Aijと、予測画像のマクロブロックの信号Bijの差Aij−Bijの絶対値|Aij−Bij|の総和Σ|Aij−Bij|を求める。また、後方予測と両方向予測の予測誤差の絶対値和も、前方予測における場合と同様に(その予測画像を前方予測における場合と異なる予測画像に変更して)求める。   That is, the motion vector detection circuit 111 calculates the absolute value sum of the prediction errors of the intra-picture prediction as the absolute value sum of the macroblock signals Aij of the reference image | ΣAij | and the absolute value | Aij of the macroblock signal Aij. Find the difference of the sum Σ | Aij | Further, as the absolute value sum of the prediction errors of the forward prediction, the sum Σ | Aij− of the absolute value | Aij−Bij | of the difference Aij−Bij between the macroblock signal Aij of the reference image and the macroblock signal Bij of the predicted image Bij | is obtained. Also, the absolute value sum of the prediction errors of the backward prediction and the bidirectional prediction is obtained in the same manner as in the forward prediction (by changing the prediction image to a prediction image different from that in the forward prediction).

これらの絶対値和は、コントローラ125に供給される。更に、コントローラ125は、この予測の予測誤差の絶対値和と、画像内予測の予測誤差の絶対値和とを比較し、その小さい方を選択し、この選択した絶対値和に対応するモードを予測モードとして選択する。すなわち、画像内予測の予測誤差の絶対値和の方が小さければ、画像内予測モードが設定される。予測の予測誤差の絶対値和の方が小さければ、前方予測、後方予測または両方向予測モードのうちの対応する絶対値和が最も小さかったモードが設定される。   These absolute value sums are supplied to the controller 125. Further, the controller 125 compares the absolute value sum of the prediction errors of the prediction and the absolute value sum of the prediction errors of the intra prediction, selects the smaller one, and selects a mode corresponding to the selected absolute value sum. Select as prediction mode. That is, if the sum of the absolute values of the prediction errors of intra prediction is smaller, the intra prediction mode is set. If the absolute value sum of the prediction errors of the prediction is smaller, the mode in which the corresponding absolute value sum of the forward prediction, backward prediction, or bidirectional prediction mode is the smallest is set.

予測モード切り替え回路113は、コントローラ125によって選択された予測モードに対応するように信号処理を行い、それを演算器114に供給する。具体的には、予測モード切り替え回路113は、フレーム予測モードが選択された場合には、輝度信号に関しては、入力された状態のまま演算器114に出力するように信号処理を行い、色差信号に関しては、奇数フィールドラインと偶数フィールドラインとが混在するように信号処理する。一方、フィールド予測モードが選択された場合には、4個の輝度ブロックのうち、2つの輝度ブロックを、例えば奇数フィールドのラインのドットだけで構成させ、他の2個の輝度ブロックを、偶数フィールドのラインのドットだけで構成させて、演算器114に出力する。色差信号に関しては、上4ラインを奇数フィールドラインで構成し、下4ラインを偶数フィールドラインで構成するように信号処理する。   The prediction mode switching circuit 113 performs signal processing so as to correspond to the prediction mode selected by the controller 125 and supplies it to the computing unit 114. Specifically, when the frame prediction mode is selected, the prediction mode switching circuit 113 performs signal processing so that the luminance signal is output to the calculator 114 in the input state, and the color difference signal is output. Performs signal processing so that odd field lines and even field lines are mixed. On the other hand, when the field prediction mode is selected, of the four luminance blocks, two luminance blocks are composed of, for example, only the dots of the odd field lines, and the other two luminance blocks are the even field. Are composed of only the dots in the line and output to the computing unit 114. With respect to the color difference signal, signal processing is performed so that the upper four lines are constituted by odd field lines and the lower four lines are constituted by even field lines.

更に、動きベクトル検出回路111は、画像内予測モード、前方予測モード、後方予測モード、または両方向予測モードのうちのいずれの予測モードを選択するかを決定するために、各予測モードにおける予測誤差を生成し、各予測モードにおける予測誤差をコントローラ125にそれぞれ供給する。コントローラ125は、前方予測、後方予測および両方向予測の予測誤差のうちの最も小さいものを、インタ予測の予測誤差として選択する。更に、このインタ予測の予測誤差と、画像内予測の予測誤差とを比較し、その小さい方を選択し、この選択した予測誤差に対応するモードを予測モードとして選択する。すなわち、画像内予測の予測誤差の方が小さければ、画像内予測モードが設定される。予測の予測誤差の方が小さければ、前方予測、後方予測または両方向予測モードのうちの対応する予測誤差が最も小さかったモードが設定される。コントローラ125は、選択した予測モードに対応するように、演算器114および動き補償回路124を制御する。これにより、Iピクチャの画像データが、DCTモード切替回路に入力される。   Further, the motion vector detection circuit 111 determines the prediction error in each prediction mode in order to determine which prediction mode is selected from the intra-picture prediction mode, the forward prediction mode, the backward prediction mode, or the bidirectional prediction mode. The prediction error in each prediction mode is supplied to the controller 125. The controller 125 selects the smallest prediction error of forward prediction, backward prediction, and bidirectional prediction as the prediction error of inter prediction. Further, the prediction error of the inter prediction and the prediction error of the intra-picture prediction are compared, the smaller one is selected, and the mode corresponding to the selected prediction error is selected as the prediction mode. That is, if the prediction error of intra prediction is smaller, the intra prediction mode is set. If the prediction error of the prediction is smaller, the mode in which the corresponding prediction error is the smallest of the forward prediction, backward prediction or bidirectional prediction mode is set. The controller 125 controls the calculator 114 and the motion compensation circuit 124 so as to correspond to the selected prediction mode. Thereby, the image data of the I picture is input to the DCT mode switching circuit.

DCTモード切り替え回路115は、フレームDCTモードまたはフィールドDCTモードのいずれかを選択するために、4個の輝度ブロックのデータを、奇数フィールドラインと偶数フィールドラインが混在するような信号形態(フレームDCTモード)に変換するとともに、奇数フィールドラインと偶数フィールドラインが分離された信号形態(フィールドDCTモード)に変換して、それぞれの信号をDCT回路116に供給する。DCT回路116は、奇数フィールドと偶数フィールドを混在してDCT処理した場合における符号化効率と、奇数フィールドと偶数フィールドを分離した状態においてDCT処理した場合の符号化効率を計算し、その結果をコントローラ125に供給する。コントローラ125は、DCT回路116から供給されたそれぞれの符号化効率を比較し、符号化効率の良い方のDCTモードを選択し、その選択したDCTモードとなるようにDCTモード切り替え回路115を制御する。   The DCT mode switching circuit 115 selects the frame DCT mode or the field DCT mode by using the signal format (frame DCT mode) in which the data of the four luminance blocks are mixed in the odd and even field lines. ) And a signal form (field DCT mode) in which the odd and even field lines are separated, and each signal is supplied to the DCT circuit 116. The DCT circuit 116 calculates the coding efficiency when the odd-numbered field and the even-numbered field are mixed and DCT processing is performed, and the coding efficiency when the odd-numbered field and the even-numbered field are separated and the DCT processing is performed. 125. The controller 125 compares the coding efficiencies supplied from the DCT circuit 116, selects the DCT mode with the better coding efficiency, and controls the DCT mode switching circuit 115 so as to be in the selected DCT mode. .

そして、DCTモード切り替え回路115は、選択したDCTモードに対応する構成のデータをDCT回路116に出力するとともに、選択したDCTモードを示すDCTフラグを、可変長符号化回路118、および動き補償回路124に出力する。   The DCT mode switching circuit 115 outputs data having a configuration corresponding to the selected DCT mode to the DCT circuit 116, and outputs a DCT flag indicating the selected DCT mode to the variable length encoding circuit 118 and the motion compensation circuit 124. Output to.

予測モード切り替え回路113における予測モード(すなわち、フィールド予測モードもしくはフレーム予測モード)と、このDCTモード切り替え回路115におけるDCTモード(すなわち、フィールドDCTモードもしくはフレームDCTモード)を比較して明らかなように、輝度ブロックに関しては、両者の各モードにおけるデータ構造は実質的に同一である。   As is apparent from a comparison between the prediction mode in the prediction mode switching circuit 113 (that is, the field prediction mode or the frame prediction mode) and the DCT mode in the DCT mode switching circuit 115 (that is, the field DCT mode or the frame DCT mode), Regarding the luminance block, the data structure in each mode is substantially the same.

予測モード切り替え回路113において、フレーム予測モード(奇数ラインと偶数ラインが混在するモード)が選択された場合、DCTモード切り替え回路115においても、フレームDCTモード(奇数ラインと偶数ラインが混在するモード)が選択される可能性が高く、また予測モード切り替え回路113において、フィールド予測モード(奇数フィールドと偶数フィールドのデータが分離されたモード)が選択された場合、DCTモード切り替え回路115において、フィールドDCTモード(奇数フィールドと偶数フィールドのデータが分離されたモード)が選択される可能性が高い。   When the frame prediction mode (a mode in which odd lines and even lines are mixed) is selected in the prediction mode switching circuit 113, the frame DCT mode (a mode in which odd lines and even lines are mixed) also in the DCT mode switching circuit 115. When the prediction mode switching circuit 113 selects the field prediction mode (the mode in which the data of the odd field and the even field are separated), the DCT mode switching circuit 115 selects the field DCT mode ( There is a high possibility that the mode in which the data of the odd field and the even field are separated is selected.

しかしながら、必ずしも常にこのようにモードが選択されるわけではなく、予測モード切り替え回路113においては、予測誤差の絶対値和が小さくなるようにモードが決定され、DCTモード切り替え回路115においては、符号化効率が良好となるようにモードが決定される。   However, the mode is not always selected in this manner. In the prediction mode switching circuit 113, the mode is determined so that the absolute value sum of the prediction errors becomes small. In the DCT mode switching circuit 115, the encoding is performed. The mode is determined so that the efficiency is good.

DCTモード切り替え回路115より出力されたIピクチャの画像データは、DCT回路116に入力されてDCT処理され、DCT係数に変換される。このDCT係数は、量子化回路117に入力され、送信バッファ119のデータ蓄積量(バッファ蓄積量)に対応した量子化スケールで量子化された後、可変長符号化回路118に入力される。   The image data of the I picture output from the DCT mode switching circuit 115 is input to the DCT circuit 116, subjected to DCT processing, and converted into DCT coefficients. The DCT coefficient is input to the quantization circuit 117, quantized with a quantization scale corresponding to the data storage amount (buffer storage amount) of the transmission buffer 119, and then input to the variable length encoding circuit 118.

すなわち、コントローラ125は、オペレータまたはホストコンピュータから供給された目標ビットレートを示すターゲットビットレートと、送信バッファ119にバッファリングされているビット量を示す信号、つまり、バッファ残量を示す信号を受け取り、このターゲットビットレートとバッファ残量に基づいて、量子化回路117の量子化ステップサイズをコントロールするためのfeedback_q_scale_code を生成する。このfeedback_q_scale_codeは、この送信バッファ119がオーバーフローまたはアンダーフローしないように、この送信バッファ119のバッファ残量に応じて生成される制御信号であって、また、送信バッファ119から出力されるビットストリームのビットレートが、ターゲットビットレートになるように制御する信号でもある。   That is, the controller 125 receives a target bit rate indicating the target bit rate supplied from the operator or the host computer, and a signal indicating the bit amount buffered in the transmission buffer 119, that is, a signal indicating the remaining buffer capacity, Based on this target bit rate and the remaining buffer capacity, feedback_q_scale_code for controlling the quantization step size of the quantization circuit 117 is generated. This feedback_q_scale_code is a control signal generated in accordance with the remaining buffer capacity of the transmission buffer 119 so that the transmission buffer 119 does not overflow or underflow, and the bits of the bit stream output from the transmission buffer 119 It is also a signal that controls the rate to be the target bit rate.

具体的には、例えば、送信バッファ119にバッファリングされているビット量が少なくなってしまった場合には、次に符号化するピクチャの発生ビット量が増えるように、量子化ステップサイズを小さくし、一方、送信バッファ119にバッファリングされているビット量が多くなってしまった場合には、次に符号化するピクチャの発生ビット量が少なくなるように、量子化ステップサイズを大きくする。なお、feedback_q_scale_codeと量子化ステップサイズは比例し、feedback_q_scale_codeを大きくすると、量子化ステップサイズは大きくなり、feedback_q_scale_codeを小さくすると、量子化ステップサイズは小さくなる。   Specifically, for example, when the bit amount buffered in the transmission buffer 119 has decreased, the quantization step size is reduced so that the generated bit amount of the picture to be encoded next increases. On the other hand, when the bit amount buffered in the transmission buffer 119 increases, the quantization step size is increased so that the generated bit amount of the next picture to be encoded is reduced. Note that feedback_q_scale_code and the quantization step size are proportional to each other. When feedback_q_scale_code is increased, the quantization step size is increased, and when feedback_q_scale_code is decreased, the quantization step size is decreased.

次に、このエンコーダ101の特徴の1つでもある、パラメータ再利用符号化処理について、上述した通常符号化処理と異なる点を中心に説明する。この処理をより分かりやすく説明するために、参照ピクチャは、第1世代の符号化処理においてPピクチャとして符号化され、第2世代の符号化処理においてIピクチャとして符号化処理され、第3世代の符号化処理においてBピクチャとして符号化されていたものとし、今回の第4世代の符号化処理において、この参照ピクチャをPピクチャとして符号化しなければいけないものとする。   Next, parameter reuse encoding processing, which is one of the features of the encoder 101, will be described focusing on differences from the above-described normal encoding processing. In order to explain this process more clearly, the reference picture is encoded as a P picture in the first generation encoding process, encoded as an I picture in the second generation encoding process, It is assumed that the B picture was encoded in the encoding process, and this reference picture must be encoded as a P picture in the current fourth generation encoding process.

この場合には、この参照ピクチャは、第4世代のピクチャタイプとしてアサインされたピクチャタイプと同じピクチャタイプ(Pピクチャ)で、第1世代の符号化処理において符号化されているので、コントローラ125は、供給されたビデオデータから符号化パラメータを新しく作成するのではなく、第1世代の符号化パラメータを使用して符号化処理を行う。この第4の符号化処理において再利用する符号化パラメータは、代表的なパラメータとしては、量子化スケールステップサイズを示すquantiser_scale_code、予測方向モードを示すmacroblock_type、動きベクトルを示すmotion_vector、フレーム予測モードかフィールド予測モードかを示すframe/field_motion_type、およびFrameDCTモードかField DCTモードかを示すdct_type等である。   In this case, since this reference picture is the same picture type (P picture) as the picture type assigned as the fourth generation picture type and is encoded in the first generation encoding process, the controller 125 Instead of creating a new encoding parameter from the supplied video data, the encoding process is performed using the first generation encoding parameter. Typical encoding parameters to be reused in the fourth encoding process include quantizer_scale_code indicating the quantization scale step size, macroblock_type indicating the prediction direction mode, motion_vector indicating the motion vector, frame prediction mode or field. Frame / field_motion_type indicating the prediction mode, dct_type indicating the Frame DCT mode or Field DCT mode, and the like.

すなわち、コントローラ125は、ヒストリ情報として伝送されたすべての符号化パラメータを再利用するわけではなく、再利用した方が望ましいと想定される上述したような符号化パラメータについては再利用し、再利用しない方が望ましいと考えられる符号化パラメータについては、再利用せずに、新しく生成する。   That is, the controller 125 does not reuse all the encoding parameters transmitted as history information, but reuses and reuses the encoding parameters as described above that are expected to be reused. Encoding parameters that are considered to be preferable are not generated and are newly generated.

動きベクトル検出回路111は、上述した通常符号化処理においては、参照ピクチャの動きベクトルの検出を行ったが、このパラメータ再利用符号化処理においては、動きベクトルmotion_vectorの検出処理は行わずに、第1世代のヒストリ情報として供給された動きベクトルmotion_vectorを再利用する。その理由について説明する。   The motion vector detection circuit 111 detects the motion vector of the reference picture in the normal encoding process described above, but does not perform the detection process of the motion vector motion_vector in the parameter reuse encoding process. The motion vector motion_vector supplied as history information of one generation is reused. The reason will be described.

第3世代の符号化ストリームを復号したベースバンドのビデオデータは、少なくとも3回の復号および符号化処理が行われているので、オリジナルビデオデータに比べると、明らかに画質が劣化している。画質が劣化しているビデオデータから動きベクトルを検出したとしても、正確な動きベクトルは検出できない。つまり、第4世代の符号化処理において検出された動きベクトルよりも、第1世代のヒストリ情報として供給されている動きベクトルの方が、明らかに、精度の高い動きベクトルである。つまり、第1世代の符号化パラメータとして伝送された動きベクトルを再利用することによって、第4世代の符号化処理を行ったとしても画質が劣化しない。コントローラ125は、この第1世代のヒストリ情報として供給された動きベクトルmotion_vectorを、第4世代の符号化処理において符号化されるこの参照ピクチャの動きベクトル情報として、動き補償回路124および可変長符号化回路118に供給する。   Since the baseband video data obtained by decoding the third generation encoded stream is subjected to at least three decoding and encoding processes, the image quality is clearly degraded as compared with the original video data. Even if a motion vector is detected from video data with degraded image quality, an accurate motion vector cannot be detected. That is, the motion vector supplied as the first generation history information is clearly a more accurate motion vector than the motion vector detected in the fourth generation encoding process. That is, by reusing the motion vector transmitted as the first generation encoding parameter, the image quality does not deteriorate even if the fourth generation encoding process is performed. The controller 125 uses the motion compensation circuit 124 and variable length coding as the motion vector information of this reference picture encoded in the fourth generation encoding process, using the motion vector motion_vector supplied as the first generation history information. Supply to circuit 118.

更に、動きベクトル検出回路111は、フレーム予測モードとフィールド予測モードのどちらが選択されるかを判断するために、フレーム予測モードにおける予測誤差とフィールド予測モードおける予測誤差をそれぞれ検出したが、このパラメータ再利用符号化処理においては、このフレーム予測モードにおける予測誤差とフィールド予測モードおける予測誤差を検出する処理は行わずに、第1世代のヒストリ情報として供給されているフレーム予測モードかフィールド予測モードかを示すframe/field_motion_typeを再利用する。なぜなら、第4世代の符号化処理において検出された各予測モードにおける予測誤差よりも、第1世代において検出された各予測モードにおける予測誤差の方が精度が高いので、精度の高い予測誤差によって決定された予測モードを選択した方がより最適な符号化処理が行うことができるからである。   Furthermore, the motion vector detection circuit 111 detects the prediction error in the frame prediction mode and the prediction error in the field prediction mode in order to determine whether the frame prediction mode or the field prediction mode is selected. In the use encoding process, the process of detecting the prediction error in the frame prediction mode and the prediction error in the field prediction mode is not performed, and whether the frame prediction mode or the field prediction mode supplied as the first generation history information is determined. Reuse the indicated frame / field_motion_type. This is because the prediction error in each prediction mode detected in the first generation is higher in accuracy than the prediction error in each prediction mode detected in the fourth generation encoding process. This is because a more optimal encoding process can be performed when the selected prediction mode is selected.

具体的には、コントローラ125は、この第1世代のヒストリ情報として供給されているframe/field_motion_typeに対応する制御信号を予測モード切り替え回路113に供給し、予測モード切り替え回路113は、この再利用されたframe/field_motion_typeに対応した信号処理を行う。   Specifically, the controller 125 supplies a control signal corresponding to the frame / field_motion_type supplied as the first generation history information to the prediction mode switching circuit 113, and the prediction mode switching circuit 113 is reused. Signal processing corresponding to frame / field_motion_type is performed.

更に、動きベクトル検出回路111は、通常符号化処理においては、画像内予測モード、前方予測モード、後方予測モード、または両方向予測モードのうちのいずれの予測モード(以下、この予測モードを、予測方向モードとも称する)を選択するかを決定するために、各予測方向モードにおける予測誤差を計算していたが、このパラメータ再利用符号化処理においては、各予測方向モードにおける予測誤差の計算は行わず、第1世代のヒストリ情報として供給されたmacroblock_typeに基づいて予測方向モードを決定する。なぜなら、第4世代の符号化処理における各予測方向モードにおける予測誤差よりも、第1世代の符号化処理における各予測方向モードにおける予測誤差の方がより精度が高いので、より精度の高い予測誤差によって決定された予測方向モードを選択した方が、より効率の良い符号化処理が行えるからである。具体的には、コントローラ125は、第1世代のヒストリ情報に含まれているmacroblock_typeによって示される予測方向モードを選択し、その選択した予測方向モードに対応するように、演算器114および動き補償回路124をコントロールする。   Furthermore, in the normal encoding process, the motion vector detection circuit 111 uses any prediction mode (hereinafter referred to as prediction direction) of the intra-picture prediction mode, the forward prediction mode, the backward prediction mode, or the bidirectional prediction mode. The prediction error in each prediction direction mode is calculated in order to determine whether to select a mode), but in this parameter reuse encoding process, the prediction error in each prediction direction mode is not calculated. The prediction direction mode is determined based on the macroblock_type supplied as the first generation history information. This is because the prediction error in each prediction direction mode in the first generation encoding process is more accurate than the prediction error in each prediction direction mode in the fourth generation encoding process. This is because a more efficient encoding process can be performed by selecting the prediction direction mode determined by the above. Specifically, the controller 125 selects the prediction direction mode indicated by the macroblock_type included in the first generation history information, and the calculator 114 and the motion compensation circuit so as to correspond to the selected prediction direction mode. 124 is controlled.

DCTモード切り替え回路115は、通常符号化処理においては、フレームDCTモードの符号化効率と、フィールドDCTモードの符号化効率を比較するために、フレームDCTモードの信号形態に変換した信号と、フィールドDCTモードの信号形態に変換した信号の両方をDCT回路116に供給していたが、このパラメータ再利用符号化処理では、フレームDCTモードの信号形態に変換した信号と、フィールドDCTモードの信号形態に変換した信号の両方を生成する処理は行っておらず、第1世代のヒストリ情報に含まれれているdct_typeによって示されたDCTモードに対応する処理のみを行っている。具体的には、コントローラ125は、第1世代のヒストリ情報に含まれているdct_typeを再利用し、DCTモード切り替え回路115がこのdct_typeによって示されるDCTモードに対応した信号処理を行うように、DCTモード切り替え回路115をコントロールする。   In the normal encoding process, the DCT mode switching circuit 115 compares the frame DCT mode encoding efficiency with the field DCT mode encoding efficiency, the field DCT mode signal format, and the field DCT mode Both of the signals converted to the signal format of the mode were supplied to the DCT circuit 116, but in this parameter reuse encoding process, the signal converted to the signal format of the frame DCT mode and the signal format of the field DCT mode are converted. The processing for generating both signals is not performed, and only the processing corresponding to the DCT mode indicated by dct_type included in the history information of the first generation is performed. Specifically, the controller 125 reuses the dct_type included in the first generation history information, so that the DCT mode switching circuit 115 performs signal processing corresponding to the DCT mode indicated by the dct_type. The mode switching circuit 115 is controlled.

コントローラ125は、通常符号化処理では、オペレータによって指定されたターゲットビットレートと送信バッファ残量に基づいて、量子化回路117の量子化ステップサイズをコントロールしていたが、このパラメータ再利用符号化処理では、ターゲットビットレート、送信バッファ残量およびヒストリ情報に含まれている過去の量子化スケールに基づいて、量子化回路117の量子化ステップサイズをコントロールする。なお、以下の説明において、ヒストリ情報に含まれている過去の量子化スケールをhistory_q_scale_code と記述することにする。また、後述するヒストリストリームにおいては、この量子化スケールを、quantiser_scale_codeと記述している。   In the normal encoding process, the controller 125 controls the quantization step size of the quantization circuit 117 based on the target bit rate specified by the operator and the remaining amount of transmission buffer. This parameter reuse encoding process Then, the quantization step size of the quantization circuit 117 is controlled based on the target bit rate, the remaining transmission buffer capacity, and the past quantization scale included in the history information. In the following description, the past quantization scale included in the history information is described as history_q_scale_code. Further, in the history stream described later, this quantization scale is described as quantizer_scale_code.

まず、コントローラ125は、通常符号化処理と同じように、現在の量子化スケールfeedback_q_scale_code を生成する。このfeedback_q_scale_codeは、この送信バッファ119がオーバーフローおよびアンダーフローしないように、この送信バッファ119のバッファ残量に応じて決定される値である。続いて、第1世代のヒストリストリームに含まれている過去の量子化スケールhistory_q_scale_codeの値と、この現在の量子化スケールfeedback_q_scale_codeの値を比較し、どちらの量子化スケールの方が大きいかを判断する。量子化スケールが大きいとは、量子化ステップが大きいことを意味する。もし、現在の量子化スケールfeedback_q_scale_codeが、過去の量子化スケールhistory_q_scale_codeよりも大きいのであれば、コントローラ125は、この現在の量子化スケールfeedback_q_scale_codeを量子化回路117に供給する。一方、過去の量子化スケールhistory_q_scale_codeが、現在の量子化スケールfeedback_q_scale_codeよりも大きいのであれば、コントローラ125は、この過去の量子化スケールhistory_q_scale_codeを量子化回路117に供給する。   First, the controller 125 generates the current quantization scale feedback_q_scale_code as in the normal encoding process. The feedback_q_scale_code is a value determined according to the remaining buffer capacity of the transmission buffer 119 so that the transmission buffer 119 does not overflow and underflow. Subsequently, the previous quantization scale history_q_scale_code value included in the first generation history stream is compared with the current quantization scale feedback_q_scale_code value to determine which quantization scale is larger. . A large quantization scale means a large quantization step. If the current quantization scale feedback_q_scale_code is larger than the past quantization scale history_q_scale_code, the controller 125 supplies the current quantization scale feedback_q_scale_code to the quantization circuit 117. On the other hand, if the past quantization scale history_q_scale_code is larger than the current quantization scale feedback_q_scale_code, the controller 125 supplies the past quantization scale history_q_scale_code to the quantization circuit 117.

つまり、コントローラ125は、ヒストリ情報に含まれている複数の過去の量子化スケールと、送信バッファ119の残量から計算された現在の量子化スケールの中で、最も大きい量子化スケールコードを選択する。また、別の言葉で説明するのであれば、コントローラ125は、過去(第1、第2および第3世代)の符号化処理における量子化ステップまたは現在(第4世代)の符号化処理において使用された量子化ステップの中で、最も大きい量子化ステップを使用して量子化を行うように量子化回路117を制御する。この理由を以下に説明する。   That is, the controller 125 selects the largest quantization scale code among the plurality of past quantization scales included in the history information and the current quantization scale calculated from the remaining amount of the transmission buffer 119. . In other words, the controller 125 is used in the quantization step in the past (first, second, and third generation) encoding process or in the current (fourth generation) encoding process. The quantization circuit 117 is controlled to perform quantization using the largest quantization step among the quantization steps. The reason for this will be described below.

例えば、第3世代の符号化処理において生成されたストリームのビットレートが4[Mbps]であって、この第4世代の符号化処理を行うエンコーダ101に対して設定されたターゲットビットレートが15[Mbps]であったとする。このときに、ターゲットビットレートが上がっているので、単純に量子化ステップを小さくすれば良いかというと、実際にはそうではない。過去の符号化処理において大きい量子化ステップで符号化処理されたピクチャを、現在の符号化処理において、量子化ステップを小さくして符号化処理を行ったとしても、このピクチャの画質は向上することはない。つまり、過去の符号化処理における量子化ステップよりも小さい量子化ステップで符号化することは、単にビット量が増えるだけであって、画質を向上させることにはならない。よって、過去(第1、第2および第3世代)の符号化処理における量子化ステップまたは現在(第4世代)の符号化処理において使用された量子化ステップの中で、最も大きい量子化ステップを使用して量子化を行うと、最も効率の良い符号化処理が行える。   For example, the bit rate of the stream generated in the third generation encoding process is 4 [Mbps], and the target bit rate set for the encoder 101 that performs the fourth generation encoding process is 15 [ Mbps]. At this time, since the target bit rate is increased, it is not actually the case that the quantization step should be simply reduced. Even if a picture encoded with a large quantization step in the past encoding process is encoded with a smaller quantization step in the current encoding process, the picture quality of this picture is improved. There is no. That is, encoding with a quantization step smaller than the quantization step in the past encoding process simply increases the bit amount and does not improve the image quality. Therefore, the largest quantization step in the quantization step used in the past (first, second, and third generation) encoding process or the quantization step used in the current (fourth generation) encoding process is selected. When used for quantization, the most efficient encoding process can be performed.

以上のようにして、通常符号化処理、もしくはパラメータ再利用符号化処理されたデータを入力された可変長符号化回路118は、量子化回路117より供給される量子化スケールに対応して、量子化回路117より供給される画像データ(いまの場合、Iピクチャのデータ)を、例えばハフマン符号などの可変長符号に変換し、送信バッファ119に出力する。   As described above, the variable length encoding circuit 118 to which the data that has been subjected to the normal encoding process or the parameter reuse encoding process is input corresponds to the quantization scale supplied from the quantization circuit 117, The image data (in this case, I picture data) supplied from the conversion circuit 117 is converted into a variable-length code such as a Huffman code and output to the transmission buffer 119.

また、可変長符号化回路118には、量子化回路117より量子化スケール、コントローラ125より予測モード(画像内予測、前方予測、後方予測、または両方向予測のいずれが設定されたかを示すモード)、動きベクトル検出回路111より動きベクトル、予測モード切り替え回路113より予測フラグ(フレーム予測モードまたはフィールド予測モードのいずれが設定されたかを示すフラグ)、およびDCTモード切り替え回路115が出力するDCTフラグ(フレームDCTモードまたはフィールドDCTモードのいずれが設定されたかを示すフラグ)が入力されており、これらも可変長符号化される。   In addition, the variable length coding circuit 118 has a quantization scale from the quantization circuit 117, and a prediction mode (a mode indicating whether intra prediction, forward prediction, backward prediction, or bidirectional prediction is set) from the controller 125, A motion vector is detected by the motion vector detection circuit 111, a prediction flag (a flag indicating whether the frame prediction mode or the field prediction mode is set) is set by the prediction mode switching circuit 113, and a DCT flag (frame DCT) output by the DCT mode switching circuit 115. A flag indicating whether the mode or the field DCT mode is set) is input, and these are also variable-length encoded.

送信バッファ119は、入力されたデータを一時蓄積し、バッファフィードバックをコントローラ125に出力する。コントローラ125は、蓄積量に対応するデータを、量子化回路117に出力する。送信バッファ119のデータ残量が許容上限値まで増量すると、コントローラ125からの量子化制御信号によって量子化回路117の量子化スケールが大きくなり、量子化データのデータ量が低下される。また、これとは逆に、送信バッファ119のデータ残量が許容下限値まで減少すると、量子化制御信号によって量子化回路117の量子化スケールを小さくさせることより、量子化データのデータ量を増大させる。このようにして、送信バッファ119のオーバーフローまたはアンダーフローが防止される。   The transmission buffer 119 temporarily stores the input data and outputs buffer feedback to the controller 125. The controller 125 outputs data corresponding to the accumulation amount to the quantization circuit 117. When the remaining amount of data in the transmission buffer 119 is increased to the allowable upper limit value, the quantization scale of the quantization circuit 117 is increased by the quantization control signal from the controller 125, and the data amount of the quantized data is reduced. On the contrary, when the remaining data amount of the transmission buffer 119 decreases to the allowable lower limit value, the quantization scale of the quantization circuit 117 is reduced by the quantization control signal, thereby increasing the amount of quantized data. Let In this way, overflow or underflow of the transmission buffer 119 is prevented.

そして、送信バッファ119に蓄積されたデータは、所定のタイミングで読み出され、出力される。   Then, the data accumulated in the transmission buffer 119 is read and output at a predetermined timing.

一方、量子化回路117より出力されたIピクチャのデータは、逆量子化回路120に入力され、量子化回路117より供給される量子化スケールに対応して逆量子化される。逆量子化回路120の出力は、IDCT(逆離散コサイン変換)回路121に入力され、逆離散コサイン変換処理された後、演算器122を介してフレームメモリ123の前方予測画像部123a供給されて記憶される。   On the other hand, the I picture data output from the quantization circuit 117 is input to the inverse quantization circuit 120 and inversely quantized in accordance with the quantization scale supplied from the quantization circuit 117. The output of the inverse quantization circuit 120 is input to an IDCT (Inverse Discrete Cosine Transform) circuit 121, subjected to inverse discrete cosine transform processing, and then supplied to and stored in the forward prediction image unit 123a of the frame memory 123 via the arithmetic unit 122. Is done.

動きベクトル検出回路111は、シーケンシャルに入力される各フレームの画像データを、例えば、I,B,P,B,P,B・・・のピクチャとしてそれぞれ処理する場合、最初に入力されたフレームの画像データをIピクチャとして処理した後、次に入力されたフレームの画像をBピクチャとして処理する前に、更にその次に入力されたフレームの画像データをPピクチャとして処理する。Bピクチャは、後方予測を伴うため、後方予測画像としてのPピクチャが先に用意されていないと、復号することができないからである。   When the motion vector detection circuit 111 processes the image data of each frame sequentially input as, for example, pictures of I, B, P, B, P, B,..., The motion vector detection circuit 111 After the image data is processed as an I picture, the image data of the next input frame is further processed as a P picture before the image of the next input frame is processed as a B picture. This is because a B picture is accompanied by backward prediction, and therefore cannot be decoded unless a P picture as a backward predicted image is prepared first.

そこで動きベクトル検出回路111は、Iピクチャの処理の次に、後方原画像部112cに記憶されているPピクチャの画像データの処理を開始する。そして、上述した場合と同様に、マクロブロック単位でのフレーム間差分(予測誤差)の絶対値和が、動きベクトル検出回路111から予測モード切り替え回路113とコントローラ125に供給される。予測モード切り替え回路113とコントローラ125は、このPピクチャのマクロブロックの予測誤差の絶対値和に対応して、フレーム/フィールド予測モード、または画像内予測、前方予測、後方予測、もしくは両方向予測の予測モードを設定する。   Therefore, the motion vector detection circuit 111 starts processing the image data of the P picture stored in the rear original image unit 112c after the processing of the I picture. As in the case described above, the absolute value sum of the inter-frame difference (prediction error) in units of macroblocks is supplied from the motion vector detection circuit 111 to the prediction mode switching circuit 113 and the controller 125. The prediction mode switching circuit 113 and the controller 125 correspond to the prediction of the frame / field prediction mode or intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction in accordance with the absolute value sum of the prediction errors of the macroblock of the P picture. Set the mode.

演算器114は、画像内予測モードが設定されたとき、スイッチ114dを上述したように接点a側に切り替える。従って、このデータは、Iピクチャのデータと同様に、DCTモード切り替え回路115、DCT回路116、量子化回路117、可変長符号化回路118、および送信バッファ119を介して伝送路に伝送される。また、このデータは、逆量子化回路120、IDCT回路121、および演算器122を介してフレームメモリ123の後方予測画像部123bに供給されて記憶される。   The computing unit 114 switches the switch 114d to the contact a side as described above when the intra-picture prediction mode is set. Accordingly, this data is transmitted to the transmission line via the DCT mode switching circuit 115, the DCT circuit 116, the quantization circuit 117, the variable length coding circuit 118, and the transmission buffer 119, similarly to the I picture data. Further, this data is supplied to and stored in the backward predicted image unit 123b of the frame memory 123 via the inverse quantization circuit 120, the IDCT circuit 121, and the calculator 122.

また、前方予測モードが設定された場合、スイッチ114dが接点bに切り替えられるとともに、フレームメモリ123の前方予測画像部123aに記憶されている画像(いまの場合、Iピクチャの画像)データが読み出され、動き補償回路124により、動きベクトル検出回路111が出力する動きベクトルに対応して動き補償される。すなわち、動き補償回路124は、コントローラ125より前方予測モードの設定が指令されたとき、前方予測画像部123aの読み出しアドレスを、動きベクトル検出回路111が、現在、出力しているマクロブロックの位置に対応する位置から動きベクトルに対応する分だけずらしてデータを読み出し、予測画像データを生成する。   When the forward prediction mode is set, the switch 114d is switched to the contact point b, and image (in this case, an I picture image) data stored in the forward prediction image portion 123a of the frame memory 123 is read. Then, the motion compensation circuit 124 performs motion compensation corresponding to the motion vector output from the motion vector detection circuit 111. That is, when the controller 125 instructs the motion compensation circuit 124 to set the forward prediction mode, the motion compensation circuit 124 sets the read address of the forward prediction image unit 123a to the position of the macroblock currently output by the motion vector detection circuit 111. Data is read out from the corresponding position by the amount corresponding to the motion vector, and predicted image data is generated.

動き補償回路124より出力された予測画像データは、演算器114aに供給される。演算器114aは、予測モード切り替え回路113より供給された参照画像のマクロブロックのデータから、動き補償回路124より供給された、このマクロブロックに対応する予測画像データを減算し、その差分(予測誤差)を出力する。この差分データは、DCTモード切り替え回路115、DCT回路116、量子化回路117、可変長符号化回路118、および送信バッファ119を介して伝送路に伝送される。また、この差分データは、逆量子化回路120、およびIDCT回路121により局所的に復号され、演算器122に入力される。   The predicted image data output from the motion compensation circuit 124 is supplied to the calculator 114a. The computing unit 114a subtracts the prediction image data corresponding to the macroblock supplied from the motion compensation circuit 124 from the macroblock data of the reference image supplied from the prediction mode switching circuit 113, and the difference (prediction error). ) Is output. The difference data is transmitted to the transmission line via the DCT mode switching circuit 115, the DCT circuit 116, the quantization circuit 117, the variable length coding circuit 118, and the transmission buffer 119. The difference data is locally decoded by the inverse quantization circuit 120 and the IDCT circuit 121 and input to the computing unit 122.

この演算器122にはまた、演算器114aに供給されている予測画像データと同一のデータが供給されている。演算器122は、IDCT回路121が出力する差分データに、動き補償回路124が出力する予測画像データを加算する。これにより、元の(復号した)Pピクチャの画像データが得られる。このPピクチャの画像データは、フレームメモリ123の後方予測画像部123bに供給されて記憶される。   The calculator 122 is also supplied with the same data as the predicted image data supplied to the calculator 114a. The calculator 122 adds the predicted image data output from the motion compensation circuit 124 to the difference data output from the IDCT circuit 121. As a result, image data of the original (decoded) P picture is obtained. The image data of the P picture is supplied to and stored in the backward predicted image unit 123b of the frame memory 123.

動きベクトル検出回路111は、このように、IピクチャとPピクチャのデータが前方予測画像部123aと後方予測画像部123bにそれぞれ記憶された後、次にBピクチャの処理を実行する。予測モード切り替え回路113とコントローラ125は、マクロブロック単位でのフレーム間差分の絶対値和の大きさに対応して、フレーム/フィールドモードを設定し、また、予測モードを画像内予測モード、前方予測モード、後方予測モード、または両方向予測モードのいずれかに設定する。   In this way, the motion vector detection circuit 111 stores the data of the I picture and the P picture in the forward predicted image unit 123a and the backward predicted image unit 123b, respectively, and then executes the process of the B picture. The prediction mode switching circuit 113 and the controller 125 set the frame / field mode corresponding to the magnitude of the absolute value of the inter-frame difference in units of macroblocks, and the prediction mode is set to the intra prediction mode and the forward prediction. Set to either mode, backward prediction mode, or bidirectional prediction mode.

上述したように、画像内予測モードまたは前方予測モードの時、スイッチ114dは接点aまたはbに切り替えられる。このとき、Pピクチャにおける場合と同様の処理が行われ、データが伝送される。   As described above, in the intra prediction mode or the forward prediction mode, the switch 114d is switched to the contact point a or b. At this time, the same processing as in the case of the P picture is performed, and data is transmitted.

これに対して、後方予測モードまたは両方向予測モードが設定された時、スイッチ114dは、接点cまたはdにそれぞれ切り替えられる。   On the other hand, when the backward prediction mode or the bidirectional prediction mode is set, the switch 114d is switched to the contact c or d, respectively.

スイッチ114dが接点cに切り替えられている後方予測モードの時、後方予測画像部123bに記憶されている画像(いまの場合、Pピクチャの画像)データが読み出され、動き補償回路124により、動きベクトル検出回路111が出力する動きベクトルに対応して動き補償される。すなわち、動き補償回路124は、コントローラ125より後方予測モードの設定が指令されたとき、後方予測画像部123bの読み出しアドレスを、動きベクトル検出回路111が、現在、出力しているマクロブロックの位置に対応する位置から動きベクトルに対応する分だけずらしてデータを読み出し、予測画像データを生成する。   In the backward prediction mode in which the switch 114d is switched to the contact c, image data (in this case, a P picture image) data stored in the backward prediction image unit 123b is read out, and the motion compensation circuit 124 Motion compensation is performed corresponding to the motion vector output from the vector detection circuit 111. That is, when the controller 125 is instructed to set the backward prediction mode, the motion compensation circuit 124 sets the readout address of the backward prediction image unit 123b to the position of the macroblock currently being output by the motion vector detection circuit 111. Data is read out from the corresponding position by the amount corresponding to the motion vector, and predicted image data is generated.

動き補償回路124より出力された予測画像データは、演算器114bに供給される。演算器114bは、予測モード切り替え回路113より供給された参照画像のマクロブロックのデータから、動き補償回路124より供給された予測画像データを減算し、その差分を出力する。この差分データは、DCTモード切り替え回路115、DCT回路116、量子化回路117、可変長符号化回路118、および送信バッファ119を介して伝送路に伝送される。   The predicted image data output from the motion compensation circuit 124 is supplied to the calculator 114b. The computing unit 114b subtracts the predicted image data supplied from the motion compensation circuit 124 from the macroblock data of the reference image supplied from the prediction mode switching circuit 113, and outputs the difference. The difference data is transmitted to the transmission line via the DCT mode switching circuit 115, the DCT circuit 116, the quantization circuit 117, the variable length coding circuit 118, and the transmission buffer 119.

スイッチ114dが接点dに切り替えられている両方向予測モードの時、前方予測画像部123aに記憶されている画像(いまの場合、Iピクチャの画像)データと、後方予測画像部123bに記憶されている画像(いまの場合、Pピクチャの画像)データが読み出され、動き補償回路124により、動きベクトル検出回路111が出力する動きベクトルに対応して動き補償される。   In the bidirectional prediction mode in which the switch 114d is switched to the contact point d, image data (in this case, an I picture image) data stored in the forward predicted image unit 123a and stored in the backward predicted image unit 123b. Image (in this case, an image of a P picture) data is read out, and motion compensation is performed by the motion compensation circuit 124 corresponding to the motion vector output from the motion vector detection circuit 111.

すなわち、動き補償回路124は、コントローラ125より両方向予測モードの設定が指令されたとき、前方予測画像部123aと後方予測画像部123bの読み出しアドレスを、動きベクトル検出回路111がいま出力しているマクロブロックの位置に対応する位置から動きベクトル(この場合の動きベクトルは、前方予測画像用と後方予測画像用の2つとなる)に対応する分だけずらしてデータを読み出し、予測画像データを生成する。   That is, the motion compensation circuit 124, when the controller 125 is instructed to set the bidirectional prediction mode, the macro that the motion vector detection circuit 111 is currently outputting the read addresses of the forward prediction image unit 123a and the backward prediction image unit 123b. Data is read out from the position corresponding to the position of the block by the amount corresponding to the motion vector (the motion vectors in this case are two for the forward prediction image and the backward prediction image), and prediction image data is generated.

動き補償回路124より出力された予測画像データは、演算器114cに供給される。演算器114cは、動きベクトル検出回路111より供給された参照画像のマクロブロックのデータから、動き補償回路124より供給された予測画像データの平均値を減算し、その差分を出力する。この差分データは、DCTモード切り替え回路115、DCT回路116、量子化回路117、可変長符号化回路118、および送信バッファ119を介して伝送路に伝送される。   The predicted image data output from the motion compensation circuit 124 is supplied to the calculator 114c. The computing unit 114c subtracts the average value of the predicted image data supplied from the motion compensation circuit 124 from the macroblock data of the reference image supplied from the motion vector detection circuit 111, and outputs the difference. The difference data is transmitted to the transmission line via the DCT mode switching circuit 115, the DCT circuit 116, the quantization circuit 117, the variable length coding circuit 118, and the transmission buffer 119.

Bピクチャの画像は、他の画像の予測画像とされることがないため、フレームメモリ123には記憶されない。   The B picture image is not stored in the frame memory 123 because it is not a predicted image of another image.

なお、フレームメモリ123において、前方予測画像部123aと後方予測画像部123bは、必要に応じてバンク切り替えが行われ、所定の参照画像に対して、一方または他方に記憶されているものを、前方予測画像あるいは後方予測画像として切り替えて出力することができる。   Note that, in the frame memory 123, the forward predicted image unit 123a and the backward predicted image unit 123b are subjected to bank switching as necessary, and those stored in one or the other with respect to a predetermined reference image It can be switched and output as a predicted image or a backward predicted image.

上述した説明においては、輝度ブロックを中心として説明をしたが、色差ブロックについても同様に、図6に示すマクロブロックを単位として処理されて伝送される。なお、色差ブロックを処理する場合の動きベクトルは、対応する輝度ブロックの動きベクトルを垂直方向と水平方向に、それぞれ1/2にしたものが用いられる。   In the above description, the luminance block is mainly described, but the color difference block is also processed and transmitted in units of macroblocks shown in FIG. Note that the motion vector when processing the color difference block is obtained by halving the motion vector of the corresponding luminance block in the vertical direction and the horizontal direction, respectively.

図13は、例えば映像編集スタジオにおいて、複数のトランスコーディングシステムが直列に接続されて使用される状態を示している。各ビデオデコーディングシステム51−i(i=1乃至N)のヒストリ情報多重化装置63−iは、上述した符号化パラメータ用の領域の最も古い符号化パラメータが記録されている区画に、自己が用いた最新の符号化パラメータを上書きする。このことにより、図11を用いて説明したように、ベースバンドの画像データには、同一のマクロブロックに対応する直近の4世代分の符号化パラメータ(世代履歴情報)が記録されることになる。   FIG. 13 shows a state where a plurality of transcoding systems are connected in series and used in a video editing studio, for example. The history information multiplexing device 63-i of each video decoding system 51-i (i = 1 to N) is set in the section in which the oldest encoding parameter in the above-described encoding parameter area is recorded. Overwrite the latest encoding parameters used. As a result, as described with reference to FIG. 11, encoding parameters (generation history information) for the four most recent generations corresponding to the same macroblock are recorded in the baseband image data. .

図13においては、図4を用いて説明したトランスコーディングシステムのビデオデコーディングシステム51およびビデオエンコーディングシステム52を用いて説明しているが、ビデオデコーディングシステム51およびビデオエンコーディングシステム52に変わって、図2および図3を用いて説明したビデオデコーディングシステム1およびビデオエンコーディングシステム2を用いてもよいことは言うまでもない。   In FIG. 13, the video decoding system 51 and the video encoding system 52 of the transcoding system described with reference to FIG. 4 are described. However, instead of the video decoding system 51 and the video encoding system 52, FIG. Needless to say, the video decoding system 1 and the video encoding system 2 described with reference to FIGS. 2 and 3 may be used.

なお、本実施の形態におけるトランスコーディングシステムの内部においては、上述したように、復号(ビデオデコーディングシステム1もしくはビデオデコーディングシステム51)側と符号側(ビデオエンコーディングシステム2もしくはビデオエンコーディングシステム52)が粗結合されており、符号化パラメータを画像データに多重化させて伝送させたが、図14に示すように、復号装置と符号化装置を直接接続する(密結合する)ようにしてもよい。   In the transcoding system in the present embodiment, as described above, the decoding (video decoding system 1 or video decoding system 51) side and the code side (video encoding system 2 or video encoding system 52) are provided. Coarse coupling is performed and the encoding parameters are multiplexed with the image data and transmitted. However, as shown in FIG. 14, the decoding apparatus and the encoding apparatus may be directly connected (tightly coupled).

すなわち、復号装置61の可変長復号回路92は、第3世代の符号化ストリームのシーケンス層、GOP層、ピクチャ層、スライス層およびマクロブロック層から、第3世代の符号化パラメータを抽出し、それを、ヒストリエンコーディング装置65に供給するとともに、ピクチャ層以上の符号化パラメータをV Blanking領域に挿入し、スライス層以下の符号化パラメータをH Blanking領域に挿入したベースバンドビデオ信号を、符号化装置66のコントローラ125に供給する。ヒストリエンコーディング装置65は、受け取った第3世代の符号化パラメータをピクチャ層のユーザデータエリアに記述できるようにconverted_history_stream()に変換し、converted_history_stream()をユーザデータとして、符号化装置66の可変長符号化回路118に供給する。   That is, the variable length decoding circuit 92 of the decoding device 61 extracts the third generation encoding parameter from the sequence layer, GOP layer, picture layer, slice layer, and macroblock layer of the third generation encoded stream, Is supplied to the history encoding device 65, and the baseband video signal in which the encoding parameter of the picture layer or higher is inserted in the V Blanking region and the encoding parameter of the slice layer or lower is inserted in the H Blanking region is converted into the encoding device 66. The controller 125 is supplied. The history encoding device 65 converts the received third-generation encoding parameter into converted_history_stream () so that it can be described in the user data area of the picture layer, and converts the converted_history_stream () as user data into the variable length code of the encoding device 66. To the circuit 118.

更に可変長復号回路92は、第3世代の符号化ストリームのピクチャ層のユーザデータエリアから、第1世代の符号化パラメータおよび第2世代の符号化パラメータを含んでいるユーザデータuser_data を抽出し、ヒストリデコーディング装置62に供給する。ヒストリデコーディング装置62は、ユーザデータエリアにconverted_history_stream()として記述されたヒストリストリームから、第1世代の符号化パラメータおよび第2世代の符号化パラメータを抽出し、それを符号化装置66のコントローラ125に供給する。   Further, the variable length decoding circuit 92 extracts user data user_data including the first generation encoding parameter and the second generation encoding parameter from the user data area of the picture layer of the third generation encoded stream, This is supplied to the history decoding device 62. The history decoding device 62 extracts the first generation encoding parameter and the second generation encoding parameter from the history stream described as converted_history_stream () in the user data area, and extracts it from the controller 125 of the encoding device 66. To supply.

符号化装置66のコントローラ125は、ヒストリデコーディング装置62から受け取った第1世代および第2世代の符号化パラメータと、復号装置61から受け取った、V Blanking領域およびH blanking領域に記述されている符号化パラメータとに基づいて、符号化装置66の符号化処理をコントロールする。   The controller 125 of the encoding device 66 includes the first generation and second generation encoding parameters received from the history decoding device 62 and the codes described in the V Blanking region and the H blanking region received from the decoding device 61. The encoding process of the encoding device 66 is controlled based on the encoding parameter.

符号化装置66の可変長符号化回路118は、復号装置61から入力されたデータに含まれる符号化パラメータを受け取るとともに、ヒストリエンコーディング装置65から第3世代の符号化パラメータを含んでいるユーザデータを受け取り、それらのユーザデータをヒストリ情報として、第4世代の符号化ストリームのピクチャ層のユーザデータエリアに記述し、出力する。   The variable length encoding circuit 118 of the encoding device 66 receives the encoding parameters included in the data input from the decoding device 61 and receives user data including the third generation encoding parameters from the history encoding device 65. The received user data is described as history information in the user data area of the picture layer of the fourth generation encoded stream and output.

図15は、MPEGのビデオストリームをデコードするためのシンタックスを表わした図である。デコーダは、このシンタックスに従ってMPEGビットストリームをデコードすることによって、ビットストリームから意味のある複数のデータ項目(データエレメント)を抽出する。以下に説明するシンタックスは、図において、その関数や条件文は細活字で表わされ、そのデータエレメントは、太活字で表されている。データ項目は、その名称、ビット長、およびそのタイプと伝送順序を示すニーモニック(Mnemonic)で記述されている。   FIG. 15 is a diagram showing a syntax for decoding an MPEG video stream. The decoder extracts a plurality of meaningful data items (data elements) from the bit stream by decoding the MPEG bit stream according to this syntax. In the drawing, the syntax described below has functions and conditional statements expressed in small letters, and data elements are shown in bold letters. The data item is described in mnemonic (Mnemonic) indicating its name, bit length, its type and transmission order.

まず、この図15に示されているシンタックスにおいて使用されている関数について説明する。   First, functions used in the syntax shown in FIG. 15 will be described.

next_start_code()関数は、ビットストリーム中に記述されているスタートコードを探すための関数である。この図15に示されたシンタックスにおいて、このnext_start_code()関数の次に、sequence_header()関数とsequence_extension()関数とが順に配置されているので、このビットストリームには、このsequence_header()関数とsequence_extension()関数によって定義されたデータエレメントが記述されている。従って、ビットストリームのデコード時には、このnext_start_code()関数によって、sequence_header()関数とsequence_extension()関数の先頭に記述されているスタートコード(データエレメントの一種)がビットストリーム中から見つけられ、それを基準にして、 sequence_header()関数とsequence_extension()関数が、さらに見つけられ、それらによって定義された各データエレメントがデコードされる。   The next_start_code () function is a function for searching for a start code described in the bitstream. In the syntax shown in FIG. 15, the sequence_header () function and the sequence_extension () function are arranged in this order after the next_start_code () function. Data elements defined by the sequence_extension () function are described. Therefore, when decoding the bitstream, the next_start_code () function finds the start code (a type of data element) described at the beginning of the sequence_header () function and sequence_extension () function from the bitstream, and uses it as a reference Thus, the sequence_header () function and the sequence_extension () function are further found, and each data element defined by them is decoded.

なお、sequence_header()関数は、MPEGビットストリームのシーケンス層のヘッダデータを定義するための関数であって、sequence_extension()関数は、MPEGビットストリームのシーケンス層の拡張データを定義するための関数である。   The sequence_header () function is a function for defining header data of the sequence layer of the MPEG bit stream, and the sequence_extension () function is a function for defining extension data of the sequence layer of the MPEG bit stream. .

sequence_extension()関数の次に配置されている do{ }while構文は、while文によって定義されている条件が真である間、do文の{ }内の関数に基いて記述されたデータエレメントをデータストリーム中から抽出するための構文である。すなわち、 do{ }while構文によって、while文によって定義されている条件が真である間、ビットストリーム中から、do文内の関数に基いて記述されたデータエレメントを抽出するデコード処理が行われる。   The do {} while syntax placed next to the sequence_extension () function is a data element written based on the function in {} of the do statement while the condition defined by the while statement is true. This is a syntax for extracting from the stream. That is, with the do {} while syntax, while the condition defined by the while statement is true, a decoding process is performed to extract the data element described based on the function in the do statement from the bit stream.

このwhile文に使用されているnextbits()関数は、ビットストリーム中に現れるビット又はビット列と、次にデコードされるデータエレメントとを比較するための関数である。この図15のシンタックスの例では、nextbits()関数は、ビットストリーム中のビット列とビデオシーケンスの終わりを示すsequence_end_codeとを比較し、ビットストリーム中のビット列とsequence_end_codeとが一致しないときに、このwhile文の条件が真となる。従って、sequence_extension()関数の次に配置されている do{ }while構文は、ビットストリーム中に、ビデオシーケンスの終わりを示すsequence_end_codeが現れない間、do文中の関数によって定義されたデータエレメントがビットストリーム中に記述されていることを示している。   The nextbits () function used in the while statement is a function for comparing a bit or a bit string appearing in the bit stream with a data element to be decoded next. In the syntax example of FIG. 15, the nextbits () function compares the bit string in the bitstream with sequence_end_code indicating the end of the video sequence, and when the bit string in the bitstream does not match sequence_end_code, The sentence condition is true. Therefore, the do {} while syntax arranged next to the sequence_extension () function indicates that the data element defined by the function in the do statement is not included in the bitstream while the sequence_end_code indicating the end of the video sequence does not appear in the bitstream. It shows that it is described in.

ビットストリーム中には、sequence_extension()関数によって定義された各データエレメントの次に、extension_and_user_data(0)関数によって定義されたデータエレメントが記述されている。このextension_and_user_data(0)関数は、MPEGビットストリームのシーケンス層の拡張データとユーザデータを定義するための関数である。   In the bitstream, data elements defined by the extension_and_user_data (0) function are described after each data element defined by the sequence_extension () function. The extension_and_user_data (0) function is a function for defining extension data and user data of the sequence layer of the MPEG bit stream.

このextension_and_user_data(0)関数の次に配置されている do{ }while構文は、while文によって定義されている条件が真である間、do文の{ }内の関数に基いて記述されたデータエレメントを、ビットストリーム中から抽出するための関数である。このwhile文において使用されているnextbits()関数は、ビットストリーム中に現れるビット又はビット列と、picture_start_code又はgroup_start_codeとの一致を判断するための関数であって、ビットストリーム中に現れるビット又はビット列と、picture_start_code又はgroup_start_codeとが一致する場合には、while文によって定義された条件が真となる。よって、このdo{ }while構文は、ビットストリーム中において、picture_start_code又はgroup_start_codeが現れた場合には、そのスタートコードの次に、do文中の関数によって定義されたデータエレメントのコードが記述されているので、このpicture_start_code又はgroup_start_codeによって示されるスタートコードを探し出すことによって、ビットストリーム中からdo文中に定義されたデータエレメントを抽出することができる。   The do {} while syntax placed next to this extension_and_user_data (0) function is a data element written based on the function in {} of the do statement while the condition defined by the while statement is true. Is a function for extracting from the bitstream. The nextbits () function used in the while statement is a function for determining a match between a bit or a bit string appearing in the bit stream and picture_start_code or group_start_code, and the bit or bit string appearing in the bit stream, If picture_start_code or group_start_code matches, the condition defined by the while statement is true. Therefore, in this do {} while syntax, when picture_start_code or group_start_code appears in the bitstream, the code of the data element defined by the function in the do statement is described next to the start code. By searching for the start code indicated by this picture_start_code or group_start_code, the data element defined in the do statement can be extracted from the bitstream.

このdo文の最初に記述されているif文は、ビットストリーム中にgroup_start_codeが現れた場合、という条件を示している。このif文による条件が真である場合には、ビットストリーム中に、このgroup_start_codeの次にgroup_of_picture_header(1)関数およびextension_and_user_data(1)関数によって定義されているデータエレメントが順に記述されている。   The if statement described at the beginning of the do statement indicates a condition that group_start_code appears in the bitstream. When the condition by this if statement is true, the data elements defined by the group_of_picture_header (1) function and the extension_and_user_data (1) function are described in order in the bitstream after the group_start_code.

このgroup_of_picture_header(1)関数は、MPEGビットストリームのGOP層のヘッダデータを定義するための関数であって、 extension_and_user_data(1)関数は、MPEGビットストリームのGOP層の拡張データ(extension_data)およびユーザデータ(user_data)を定義するための関数である。   The group_of_picture_header (1) function is a function for defining the header data of the GOP layer of the MPEG bit stream. The extension_and_user_data (1) function is the extension data (extension_data) and user data (extension_data) of the MPEG bit stream. This is a function for defining (user_data).

更に、このビットストリーム中には、group_of_picture_header(1)関数およびextension_and_user_data(1)関数によって定義されているデータエレメントの次に、picture_header()関数とpicture_coding_extension()関数によって定義されたデータエレメントが記述されている。もちろん、先に説明したif文の条件が真とならない場合には、 group_of_picture_header(1)関数およびextension_and_user_data(1)関数によって定義されているデータエレメントは記述されていないので、 extension_and_user_data(0)関数によって定義されているデータエレメントの次に、 picture_header()関数とpicture_coding_extension()関数によって定義されたデータエレメントが記述されている。   Furthermore, in this bitstream, data elements defined by the picture_header () function and the picture_coding_extension () function are described after the data elements defined by the group_of_picture_header (1) function and the extension_and_user_data (1) function. Yes. Of course, if the condition of the if statement described above is not true, the data element defined by the group_of_picture_header (1) function and the extension_and_user_data (1) function is not described, so it is defined by the extension_and_user_data (0) function. The data element defined by the picture_header () function and the picture_coding_extension () function is described after the data element.

このpicture_header()関数は、 MPEGビットストリームのピクチャ層のヘッダデータを定義するための関数であって、 picture_coding_extension()関数は、MPEGビットストリームのピクチャ層の第1の拡張データを定義するための関数である。   The picture_header () function is a function for defining header data of the picture layer of the MPEG bit stream, and the picture_coding_extension () function is a function for defining first extension data of the picture layer of the MPEG bit stream It is.

次のwhile文は、このwhile文によって定義されている条件が真である間、次のif文の条件判断を行うための関数である。このwhile文において使用されているnextbits()関数は、ビットストリーム中に現れるビット列と、extension_start_code又はuser_data_start_codeとの一致を判断するための関数であって、ビットストリーム中に現れるビット列と、 extension_start_code又はuser_data_start_codeとが一致する場合には、このwhile文によって定義された条件が真となる。   The next while statement is a function for determining the condition of the next if statement while the condition defined by the while statement is true. The nextbits () function used in this while statement is a function for determining whether the bit string appearing in the bit stream matches extension_start_code or user_data_start_code, and the bit string appearing in the bit stream, extension_start_code or user_data_start_code, If they match, the condition defined by this while statement is true.

第1のif文は、ビットストリーム中に現れるビット列とextension_start_codeとの一致を判断するための関数である。ビットストリーム中に現れるビット列と32ビットのextension_ start_codeとが一致する場合には、ビットストリーム中において、extension_start_codeの次にextension_data(2)関数によって定義されるデータエレメントが記述されている。   The first if statement is a function for determining whether the bit string appearing in the bitstream matches extension_start_code. When the bit string appearing in the bitstream matches the 32-bit extension_start_code, the data element defined by the extension_data (2) function is described next to the extension_start_code in the bitstream.

第2のif文は、ビットストリーム中に現れるビット列とuser_data_start_codeとの一致を判断するための構文であって、ビットストリーム中に現れるビット列と32ビットのuser_data_start_codeとが一致する場合には、第3のif文の条件判断が行われる。このuser_data_start_codeは、MPEGビットストリームのピクチャ層のユーザデータエリアの開始を示すためのスタートコードである。   The second if statement is a syntax for determining a match between the bit string appearing in the bitstream and user_data_start_code. If the bit string appearing in the bitstream matches the 32-bit user_data_start_code, the third if statement Condition judgment of if statement is performed. This user_data_start_code is a start code for indicating the start of the user data area of the picture layer of the MPEG bit stream.

第3のif文は、ビットストリーム中に現れるビット列とHistory_Data_IDとの一致を判断するための構文である。ビットストリーム中に現れるビット列と、この32ビットのHistory_Data_IDとが一致する場合には、このMPEGビットストリームのピクチャ層のユーザデータエリアにおいて、この32ビットのHistory_Data_IDによって示されるコードの次に、converted_history_stream()関数によって定義されるデータエレメントが記述されている。   The third if statement is a syntax for determining whether the bit string appearing in the bitstream matches History_Data_ID. If the bit string appearing in the bitstream matches this 32-bit History_Data_ID, then in the user data area of the picture layer of this MPEG bitstream, the converted_history_stream () is next to the code indicated by this 32-bit History_Data_ID. Describes a data element defined by a function.

converted_history_stream()関数は、MPEG符号化時に使用したあらゆる符号化パラメータを伝送するための履歴情報および履歴データを記述するための関数である。このconverted_history_stream()関数によって定義されているデータエレメントの詳細は、図17乃至図24を参照して、history_stream()として後述する。また、このHistory_Data_IDは、MPEGビットストリームのピクチャ層のユーザデータエリアに記述されたこの履歴情報および履歴データが記述されている先頭を示すためのスタートコードである。   The converted_history_stream () function is a function for describing history information and history data for transmitting all the encoding parameters used at the time of MPEG encoding. Details of the data element defined by the converted_history_stream () function will be described later as history_stream () with reference to FIGS. 17 to 24. The History_Data_ID is a start code indicating the history information and history data described in the user data area of the picture layer of the MPEG bit stream.

else文は、第3のif文において、条件が非真であることを示すための構文である。従って、このMPEGビットストリームのピクチャ層のユーザデータエリアにおいて、converted_history_stream()関数によって定義されたデータエレメントが記述されていない場合には、user_data()関数によって定義されたデータエレメントが記述されている。   The else statement is a syntax for indicating that the condition is not true in the third if statement. Therefore, when the data element defined by the converted_history_stream () function is not described in the user data area of the picture layer of the MPEG bit stream, the data element defined by the user_data () function is described.

図15において、履歴情報は、converted_history_stream()に記述され、user_data()に記述される訳ではないが、このconverted_history_stream()は、MPEG規格のuser_dataの一種として記述される。そこで、本明細書中においては、場合によって、履歴情報がuser_dataに記述されるとも説明するが、それは、MPEG規格のuser_dataの一種として記述されるということを意味する。   In FIG. 15, the history information is described in converted_history_stream () and not described in user_data (), but this converted_history_stream () is described as a kind of user_data in the MPEG standard. Therefore, in this specification, it is also described that history information is described in user_data depending on the case, but this means that it is described as a kind of user_data of the MPEG standard.

picture_data()関数は、MPEGビットストリームのピクチャ層のユーザデータの次に、スライス層およびマクロブロック層に関するデータエレメントを記述するための関数である。通常は、このpicture_data()関数によって示されるデータエレメントは、ビットストリームのピクチャ層のユーザデータエリアに記述されたconverted_history_stream()関数によって定義されるデータエレメント、またはuser_data()関数によって定義されたデータエレメントの次に記述されているが、ピクチャ層のデータエレメントを示すビットストリーム中に、extension_start_code、またはuser_data_start_code が存在しない場合には、このpicture_data()関数によって示されるデータエレメントは、 picture_coding_extension()関数によって定義されるデータエレメントの次に記述されている。   The picture_data () function is a function for describing data elements related to the slice layer and the macroblock layer next to the user data of the picture layer of the MPEG bit stream. Normally, the data element indicated by the picture_data () function is a data element defined by the converted_history_stream () function described in the user data area of the picture layer of the bitstream, or a data element defined by the user_data () function If there is no extension_start_code or user_data_start_code in the bitstream indicating the data element of the picture layer, the data element indicated by this picture_data () function is defined by the picture_coding_extension () function. Is described next to the data element to be processed.

このpicture_data()関数によって示されるデータエレメントの次には、sequence_header()関数とsequence_extension()関数とによって定義されたデータエレメントが順に配置されている。このsequence_header()関数とsequence_extension()関数によって記述されたデータエレメントは、ビデオストリームのシーケンスの先頭に記述されたsequence_header()関数とsequence_extension()関数によって記述されたデータエレメントと全く同じである。このように同じデータをストリーム中に記述する理由は、ビットストリーム受信装置側でデータストリームの途中(例えばピクチャ層に対応するビットストリーム部分)から受信が開始された場合に、シーケンス層のデータを受信できなくなり、ストリームをデコード出来なくなることを防止するためである。   Next to the data element indicated by the picture_data () function, data elements defined by the sequence_header () function and the sequence_extension () function are arranged in order. The data elements described by the sequence_header () function and the sequence_extension () function are exactly the same as the data elements described by the sequence_header () function and the sequence_extension () function described at the beginning of the video stream sequence. The reason why the same data is described in the stream in this way is that the data of the sequence layer is received when the reception starts from the middle of the data stream (for example, the bit stream portion corresponding to the picture layer) on the bit stream receiver side. This is to prevent the stream from being able to be decoded and the stream from being decoded.

この最後のsequence_header()関数とsequence_extension()関数とによって定義されたデータエレメントの次、つまり、データストリームの最後には、シーケンスの終わりを示す32ビットのsequence_end_codeが記述されている。   Following the data element defined by the last sequence_header () function and sequence_extension () function, that is, at the end of the data stream, 32-bit sequence_end_code indicating the end of the sequence is described.

以上のシンタックスの基本的な構成の概略を示すと、図16に示すようになる。   An outline of the basic structure of the above syntax is as shown in FIG.

次に、converted_history_stream()関数によって定義されたヒストリストリームに関して説明する。   Next, a history stream defined by the converted_history_stream () function will be described.

このconverted_history_stream()は、MPEGのピクチャ層のユーザデータエリアに履歴情報を示すヒストリストリームを挿入するための関数である。なお、「converted」の意味は、スタートエミュレーションを防止するために、ユーザエリアに挿入すべき履歴データから構成される履歴ストリームの少なくとも22ビット毎にマーカービット(1ビット)を挿入する変換処理を行ったストリームであることを意味している。   This converted_history_stream () is a function for inserting a history stream indicating history information into the user data area of the MPEG picture layer. The meaning of “converted” is a conversion process that inserts a marker bit (1 bit) at least every 22 bits of a history stream composed of history data to be inserted into the user area in order to prevent start emulation. It means that it is a stream.

このconverted_history_stream()は、以下に説明する固定長の履歴ストリーム(図17乃至図23)又は可変長の履歴ストリーム(図24)のいずれかの形式で記述される。エンコーダ側において固定長の履歴ストリームを選択した場合には、デコーダ側において履歴ストリームから各データエレメントをデコードするための回路およびソフトウエアが簡単になるというメリットがある。一方、エンコーダ側において可変長の履歴ストリームを選択した場合には、エンコーダにおいてピクチャ層のユーザエリアに記述される履歴情報(データエレメント)を必要に応じて任意に選択することができるので、履歴ストリームのデータ量を少なくすることができ、その結果、符号化されたビットストリーム全体のデータレートを低減することができる。   The converted_history_stream () is described in either a fixed-length history stream (FIGS. 17 to 23) or a variable-length history stream (FIG. 24) described below. When a fixed-length history stream is selected on the encoder side, there is an advantage that a circuit and software for decoding each data element from the history stream on the decoder side are simplified. On the other hand, when a variable length history stream is selected on the encoder side, history information (data elements) described in the user area of the picture layer can be arbitrarily selected in the encoder as needed. Can be reduced, and as a result, the data rate of the entire encoded bitstream can be reduced.

本発明において説明する「履歴ストリーム」、「ヒストリストリーム」、「履歴情報」、「ヒストリ情報」、「履歴データ」、「ヒストリデータ」、「履歴パラメータ」、「ヒストリパラメータ」とは、過去の符号化処理において使用した符号化パラメータ(又はデータエレメント)を意味し、現在の(最終段の)符号化処理において使用した符号化パラメータを意味するものではない。例えば、第1世代の符号化処理において、あるピクチャをIピクチャで符号化して伝送し、次なる第2世代の符号化処理において、このピクチャを今度はPピクチャとして符号化して伝送し、更に、第3世代の符号化処理において、このピクチャをBピクチャで符号化して伝送する例をあげて説明する。   The “history stream”, “history stream”, “history information”, “history information”, “history data”, “history data”, “history parameter”, and “history parameter” described in the present invention are past codes. It means the encoding parameter (or data element) used in the encoding process, and does not mean the encoding parameter used in the current (final stage) encoding process. For example, in the first generation encoding process, a picture is encoded and transmitted with an I picture, and in the next second generation encoding process, this picture is encoded and transmitted as a P picture. In the third generation encoding process, an example will be described in which this picture is encoded with a B picture and transmitted.

第3世代の符号化処理において使用した符号化パラメータは、第3世代の符号化処理において生成された符号化ビットストリームのシーケンス層、GOP層、ピクチャ層、スライス層およびマクロブロック層の所定位置に記述されている。一方、過去の符号化処理である第1世代および第2世代の符号化処理において使用した符号化パラメータは、第3世代の符号化処理において使用した符号化パラメータが記述されるシーケンス層やGOP層に記述されるのでは無く、既に説明したシンタックスに従って、符号化パラメータの履歴情報として、ピクチャ層のユーザデータエリアに記述される。   The encoding parameters used in the third generation encoding process are set at predetermined positions in the sequence layer, GOP layer, picture layer, slice layer, and macroblock layer of the encoded bitstream generated in the third generation encoding process. is described. On the other hand, the encoding parameters used in the first generation and second generation encoding processes, which are past encoding processes, are sequence layers and GOP layers in which the encoding parameters used in the third generation encoding process are described. Is described in the user data area of the picture layer as the history information of the encoding parameter according to the syntax described above.

まず、固定長の履歴ストリームシンタックスについて図17乃至図23を参照して説明する。   First, the fixed-length history stream syntax will be described with reference to FIGS.

最終段(例えば第3世代)の符号化処理において生成されたビットストリームのピクチャ層のユーザデータエリアには、まず最初に、過去(例えば第1世代および第2世代)の符号化処理において使用されていたシーケンス層のシーケンスヘッダに含められる符号化パラメータが、履歴ストリームとして挿入される。なお、過去の符号化処理において生成されたビットストリームのシーケンス層のシーケンスヘッダ等の履歴情報は、最終段の符号化処理において生成されたビットストリームのシーケンス層のシーケンスヘッダに挿入されることは無いという点に注意すべきである。   The user data area in the picture layer of the bitstream generated in the final stage (for example, third generation) encoding process is first used in the past (for example, first generation and second generation) encoding processes. The encoding parameter included in the sequence header of the sequence layer that has been stored is inserted as a history stream. Note that history information such as the sequence header of the sequence layer of the bit stream generated in the past encoding process is not inserted into the sequence header of the sequence layer of the bit stream generated in the encoding process of the final stage. It should be noted that.

過去の符号化処理で使用したシーケンスヘッダ(sequence_header)に含められるデータエレメントは、sequence_header_code、sequence_header_present_flag、horizontal_size_value、marker_bit、vertical_size_value、aspect_ratio_information、frame_rate_code、bit_rate_value、VBV_buffer_size_value、constrained_parameter_flag、load_intra_quantiser_matrix、load_non_intra_quantiser_matrix、intra_quantiser_matrix、およびnon_intra_quantiser_matrix等から構成される。   The data elements included in the sequence header (sequence_header) used in the past encoding process are sequence_header_code, sequence_header_present_flag, horizontal_size_value, marker_bit, vertical_size_value, aspect_ratio_information, frame_rate_code, bit_rate_value, VBV_buffer_size_value, constant_in_traiter, Composed.

sequence_header_codeは、シーケンス層のスタート同期コードを表すデータである。sequence_header_present_flagは、sequence_header内のデータが有効か無効かを示すデータである。 horizontal_size_valueは、画像の水平方向の画素数の下位12ビットから成るデータである。marker_bitは、スタートコードエミュレーションを防止するために挿入されるビットデータである。vertical_size_valueは、画像の縦のライン数の下位12ビットからなるデータである。aspect_ratio_informationは、画素のアスペクト比(縦横比)または表示画面アスペクト比を表すデータである。frame_rate_codeは、画像の表示周期を表すデータである。   The sequence_header_code is data representing the start synchronization code of the sequence layer. The sequence_header_present_flag is data indicating whether the data in the sequence_header is valid or invalid. horizontal_size_value is data consisting of the lower 12 bits of the number of pixels in the horizontal direction of the image. The marker_bit is bit data inserted to prevent start code emulation. vertical_size_value is data consisting of the lower 12 bits of the number of vertical lines of the image. Aspect_ratio_information is data representing the pixel aspect ratio (aspect ratio) or display screen aspect ratio. The frame_rate_code is data representing an image display cycle.

bit_rate_valueは、発生ビット量に対する制限のためのビットレートの下位18ビット(400bsp単位で切り上げる)データである。VBV_buffer_size_valueは、発生符号量制御用の仮想バッファ(ビデオバッファベリファイヤー)の大きさを決める値の下位10ビットデータである。constrained_parameter_flagは、各パラメータが制限以内であることを示すデータである。load_intra_quantiser_matrixは、イントラMB用量子化マトリックス・データの存在を示すデータである。load_non_intra_quantiser_matrixは、非イントラMB用量子化マトリックス・データの存在を示すデータである。intra_quantiser_matrixは、イントラMB用量子化マトリックスの値を示すデータである。non_intra_quantiser_matrixは、非イントラMB用量子化マトリックスの値を表すデータである。   bit_rate_value is lower 18 bits (rounded up in units of 400 bsp) of the bit rate for limiting the amount of generated bits. VBV_buffer_size_value is lower 10-bit data of a value that determines the size of the generated code amount control virtual buffer (video buffer verifier). constrained_parameter_flag is data indicating that each parameter is within the limit. The load_intra_quantiser_matrix is data indicating the presence of intra MB quantization matrix data. load_non_intra_quantiser_matrix is data indicating the presence of non-intra MB quantization matrix data. intra_quantiser_matrix is data indicating the value of the intra MB quantization matrix. non_intra_quantiser_matrix is data representing a value of a non-intra MB quantization matrix.

最終段の符号化処理において生成されたビットストリームのピクチャ層のユーザデータエリアには、過去の符号化処理において使用されたシーケンス層のシーケンスエクステンションを表わすデータエレメントが、履歴ストリームとして記述される。   In the user data area of the picture layer of the bit stream generated in the encoding process at the final stage, a data element representing a sequence extension of the sequence layer used in the past encoding process is described as a history stream.

この過去の符号化処理で使用したシーケンスエクステンション(sequence_extension)を表わすデータエレメントは、 extension_start_code、extension_start_code_identifier、sequence_extension_present_flag、profile_and_level_indication、progressive_sequence、chroma_format、horizontal_size_extension、vertical_size_extension、bit_rate_extension、vbv_buffer_size_extension、low_delay、frame_rate_extension_n 、および frame_rate_extension_d等のデータエレメントである。   The data elements representing the sequence extensions (sequence_extension) used in the past encoding process are extension_start_code, extension_start_code_identifier, sequence_extension_present_flag, profile_and_level_indication, progressive_sequence, chroma_format, horizontal_size_extension, vertical_size_ext_, extension_delay_frame_extension_, It is.

extension_start_codeは、エクステンションデータのスタート同期コードを表すデータである。extension_start_code_identifierは、どの拡張データが送られるかを示すデータである。sequence_extension_present_flagは、シーケンスエクステンション内のデータが有効であるか無効であるかを示すデータである。profile_and_level_indicationは、ビデオデータのプロファイルとレベルを指定するためのデータである。progressive_sequenceは、ビデオデータが順次走査であることを示すデータである。chroma_formatは、ビデオデータの色差フォーマットを指定するためのデータである。   extension_start_code is data representing a start synchronization code of extension data. extension_start_code_identifier is data indicating which extension data is sent. The sequence_extension_present_flag is data indicating whether the data in the sequence extension is valid or invalid. Profile_and_level_indication is data for designating the profile and level of video data. progressive_sequence is data indicating that the video data is sequentially scanned. chroma_format is data for designating the color difference format of the video data.

horizontal_size_extensionは、シーケンスヘッダのhorizntal_size_valueに加える上位2ビットのデータである。vertical_size_extensionは、シーケンスヘッダのvertical_size_valueに加える上位2ビットのデータである。bit_rate_extensionは、シーケンスヘッダのbit_rate_valueに加える上位12ビットのデータである。vbv_buffer_size_extensionは、シーケンスヘッダのvbv_buffer_size_valueに加える上位8ビットのデータである。low_delayは、Bピクチャを含まないことを示すデータである。frame_rate_extension_nは、シーケンスヘッダのframe_rate_codeと組み合わせてフレームレートを得るためのデータである。frame_rate_extension_dは、シーケンスヘッダのframe_rate_codeと組み合わせてフレームレートを得るためのデータである。   The horizontal_size_extension is upper 2 bits data added to the horizntal_size_value of the sequence header. vertical_size_extension is upper 2 bits of data to be added to the vertical_size_value of the sequence header. bit_rate_extension is upper 12-bit data added to bit_rate_value of the sequence header. vbv_buffer_size_extension is upper 8-bit data to be added to vbv_buffer_size_value of the sequence header. low_delay is data indicating that a B picture is not included. Frame_rate_extension_n is data for obtaining a frame rate in combination with frame_rate_code of the sequence header. Frame_rate_extension_d is data for obtaining a frame rate in combination with frame_rate_code of the sequence header.

続いて、ビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用されたシーケンス層のシーケンスディスプレイエクステンションを表わすデータエレメントが、履歴ストリームとして記述される。   Subsequently, in the user area of the picture layer of the bit stream, a data element representing a sequence layer sequence display extension used in the past encoding process is described as a history stream.

このシーケンスディスプレイエクステンション(sequence_display_extension)として記述されているデータエレメントは、extension_start_code、extension_start_code_identifier、sequence_display_extension_present_flag、video_format、colour_description、colour_primaries、transfer_characteristics、matrix_coeffients、display_horizontal_size、およびdisplay_vertical_sizeから構成される。   A data element described as this sequence display extension (sequence_display_extension) is composed of extension_start_code, extension_start_code_identifier, sequence_display_extension_present_flag, video_format, colour_description, colour_primaries, transfer_characteristics, matrix_coeffients, display_horizontal_size, and display_vertical_size.

extension_start_codeは、エクステンションデータのスタート同期コードを表すデータである。extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。sequence_display_extension_present_flagは、シーケンスディスプレイエクステンション内のデータエレメントが有効か無効かを示すデータである。video_formatは、原信号の映像フォーマットを表すデータである。color_descriptionは、色空間の詳細データがあることを示すデータである。color_primariesは、原信号の色特性の詳細を示すデータである。transfer_characteristicsは、光電変換がどのように行われたのかの詳細を示すデータである。matrix_coeffientsは、原信号が光の三原色からどのように変換されたかの詳細を示すデータである。display_horizontal_sizeは、意図するディスプレイの活性領域(水平サイズ)を表すデータである。display_vertical_sizeは、意図するディスプレイの活性領域(垂直サイズ)を表すデータである。   extension_start_code is data representing a start synchronization code of extension data. extension_start_code_identifier is a code indicating which extension data is sent. The sequence_display_extension_present_flag is data indicating whether the data element in the sequence display extension is valid or invalid. video_format is data representing the video format of the original signal. color_description is data indicating that there is detailed data of the color space. color_primaries is data indicating details of the color characteristics of the original signal. transfer_characteristics is data indicating details of how photoelectric conversion is performed. Matrix_coeffients is data indicating details of how the original signal is converted from the three primary colors of light. display_horizontal_size is data representing the active area (horizontal size) of the intended display. display_vertical_size is data representing the active area (vertical size) of the intended display.

続いて、最終段の符号化処理において生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において生成されたマクロブロックの位相情報を示すマクロブロックアサイメントデータ(macroblock_assignment_in_user_data)が、履歴ストリームとして記述される。   Subsequently, macroblock assignment data (macroblock_assignment_in_user_data) indicating the phase information of the macroblock generated in the past encoding process is stored in the user area of the picture layer of the bitstream generated in the final stage encoding process. It is described as a history stream.

このマクロブロックの位相情報を示すmacroblock_assignment_in_user_dataは、macroblock_assignment_present_flag、v_phase、h_phase等のデータエレメントから構成される。   Macroblock_assignment_in_user_data indicating the phase information of the macroblock is composed of data elements such as macroblock_assignment_present_flag, v_phase, and h_phase.

このmacroblock_assignment_present_flagは、macroblock_assignment_in_user_data内のデータエレメントが有効か無効かを示すデータである。 v_phaseは、画像データからマクロブロックを切り出す際の垂直方向の位相情報を示すデータである。 h_phaseは、画像データからマクロブロックを切り出す際の水平方向の位相情報を示すデータである。   This macroblock_assignment_present_flag is data indicating whether the data element in macroblock_assignment_in_user_data is valid or invalid. v_phase is data indicating vertical phase information when a macroblock is cut out from image data. h_phase is data indicating horizontal phase information when a macroblock is cut out from image data.

続いて、最終段の符号化処理によって生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用されたGOP層のGOPヘッダを表わすデータエレメントが、履歴ストリームとして記述されている。   Subsequently, in the user area of the picture layer of the bitstream generated by the encoding process at the final stage, a data element representing the GOP header of the GOP layer used in the past encoding process is described as a history stream. Yes.

このGOPヘッダ(group_of_picture_header)を表わすデータエレメントは、group_start_code、group_of_picture_header_present_flag、time_code、closed_gop、およびbroken_linkから構成される。   A data element representing this GOP header (group_of_picture_header) is composed of group_start_code, group_of_picture_header_present_flag, time_code, closed_gop, and broken_link.

group_start_codeは、GOP層の開始同期コードを示すデータである。 group_of_picture_header_present_flagは、 group_of_picture_header内のデータエレメントが有効であるか無効であるかを示すデータである。 time_codeは、GOPの先頭ピクチャのシーケンスの先頭からの時間を示すタイムコードである。closed_gopは、GOP内の画像が他のGOPから独立再生可能なことを示すフラグデータである。broken_linkは、編集などのためにGOP内の先頭のBピクチャが正確に再生できないことを示すフラグデータである。   group_start_code is data indicating the start synchronization code of the GOP layer. group_of_picture_header_present_flag is data indicating whether a data element in group_of_picture_header is valid or invalid. time_code is a time code indicating the time from the beginning of the sequence of the first picture of the GOP. closed_gop is flag data indicating that an image in a GOP can be reproduced independently from other GOPs. Broken_link is flag data indicating that the first B picture in the GOP cannot be accurately reproduced for editing or the like.

続いて、最終段の符号化処理によって生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用されたピクチャ層のピクチャヘッダを表わすデータエレメントが、履歴ストリームとして記述されている。   Subsequently, in the user area of the picture layer of the bitstream generated by the encoding process at the final stage, a data element representing the picture header of the picture layer used in the past encoding process is described as a history stream. Yes.

このピクチャヘッダ(picture_header)に関するデータエレメントは、picture_start_code、temporal_reference、picture_coding_type、vbv_delay、full_pel_forward_vector、forward_f_code、full_pel_backward_vector、および backward_f_codeから構成される。   Data elements relating to this picture header (picture_header) are composed of picture_start_code, temporal_reference, picture_coding_type, vbv_delay, full_pel_forward_vector, forward_f_code, full_pel_backward_vector, and backward_f_code.

具体的には、picture_start_codeは、ピクチャ層の開始同期コードを表すデータである。temporal_referenceは、ピクチャの表示順を示す番号でGOPの先頭でリセットされるデータである。picture_coding_typeは、ピクチャタイプを示すデータである。vbv_delayは、ランダムアクセス時の仮想バッファの初期状態を示すデータである。full_pel_forward_vectorは、順方向動きベクトルの精度が整数単位か半画素単位かを示すデータである。forward_f_codeは、順方向動きベクトル探索範囲を表すデータである。full_pel_backward_vectorは、逆方向動きベクトルの精度が整数単位か半画素単位かを示すデータである。backward_f_codeは、逆方向動きベクトル探索範囲を表すデータである。   Specifically, picture_start_code is data representing the start synchronization code of the picture layer. temporal_reference is a number indicating the display order of pictures and is data to be reset at the top of the GOP. picture_coding_type is data indicating a picture type. vbv_delay is data indicating the initial state of the virtual buffer at the time of random access. full_pel_forward_vector is data indicating whether the accuracy of the forward motion vector is an integer unit or a half pixel unit. forward_f_code is data representing the forward motion vector search range. full_pel_backward_vector is data indicating whether the accuracy of the backward motion vector is an integer unit or a half pixel unit. backward_f_code is data representing the backward motion vector search range.

続いて、最終段の符号化処理によって生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用されたピクチャ層のピクチャコーディングエクステンションが、履歴ストリームとして記述されている。   Subsequently, in the user area of the picture layer of the bit stream generated by the encoding process at the final stage, the picture coding extension of the picture layer used in the past encoding process is described as a history stream.

このピクチャコーディングエクステンション(picture_coding_extension)に関するデータエレメントは、extension_start_code、extension_start_code_identifier、f_code[0][0]、f_code[0][1]、f_code[1][0]、f_code[1][1]、intra_dc_precision、picture_structure、top_field_first、frame_predictive_frame_dct、concealment_motion_vectors、q_scale_type、intra_vlc_format、alternate_scan、repeat_firt_field、chroma_420_type、progressive_frame、composite_display_flag、v_axis、field_sequence、sub_carrier、burst_amplitude、およびsub_carrier_phaseから構成される。   The data elements for this picture coding extension (picture_coding_extension) are extension_start_code, extension_start_code_identifier, f_code [0] [0], f_code [0] [1], f_code [1] [0], f_code [1] [1], intra_dc_precision, picture_structure, top_field_first, frame_predictive_frame_dct, concealment_motion_vectors, q_scale_type, intra_vlc_format, alternate_scan, repeat_firt_field, chroma_420_type, progressive_frame, composite_display_flag, v_axis, field_sequence, sub_carrier, burst_amplitude, burst_amplitude

extension_start_codeは、ピクチャ層のエクステンションデータのスタートを示す開始コードである。extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。 f_code[0][0]は、フォワード方向の水平動きベクトル探索範囲を表すデータである。f_code[0][1]は、フォワード方向の垂直動きベクトル探索範囲を表すデータである。f_code[1][0]は、バックワード方向の水平動きベクトル探索範囲を表すデータである。f_code[1][1]は、バックワード方向の垂直動きベクトル探索範囲を表すデータである。   extension_start_code is a start code indicating the start of extension data of the picture layer. extension_start_code_identifier is a code indicating which extension data is sent. f_code [0] [0] is data representing the horizontal motion vector search range in the forward direction. f_code [0] [1] is data representing a vertical motion vector search range in the forward direction. f_code [1] [0] is data representing the horizontal motion vector search range in the backward direction. f_code [1] [1] is data representing a vertical motion vector search range in the backward direction.

intra_dc_precisionは、DC係数の精度を表すデータである。picture_structureは、フレームストラクチャかフィールドストラクチャかを示すデータである。フィールドストラクチャの場合は、上位フィールドか下位フィールドかもあわせて示すデータである。top_field_firstは、フレームストラクチャの場合、最初のフィールドが上位か下位かを示すデータである。frame_predictive_frame_dctは、フレームストラクチャの場合、フレーム・モードDCTの予測がフレーム・モードだけであることを示すデータである。concealment_motion_vectorsは、イントラマクロブロックに伝送エラーを隠蔽するための動きベクトルがついていることを示すデータである。   intra_dc_precision is data representing the precision of the DC coefficient. Picture_structure is data indicating a frame structure or a field structure. In the case of a field structure, the data indicates whether the upper field or the lower field. top_field_first is data indicating whether the first field is upper or lower in the case of a frame structure. In the case of a frame structure, frame_predictive_frame_dct is data indicating that the prediction of the frame mode DCT is only the frame mode. concealment_motion_vectors is data indicating that a motion vector for concealing a transmission error is attached to an intra macroblock.

q_scale_typeは、線形量子化スケールを利用するか、非線形量子化スケールを利用するかを示すデータである。intra_vlc_formatは、イントラマクロブロックに、別の2次元VLCを使うかどうかを示すデータである。alternate_scanは、ジグザグスキャンを使うか、オルタネート・スキャンを使うかの選択を表すデータである。repeat_firt_fieldは、2:3プルダウンの際に使われるデータである。chroma_420_typeは、信号フォーマットが4:2:0の場合、次のprogressive_frame と同じ値、そうでない場合は0を表すデータである。progressive_frameは、このピクチャが、順次走査できているかどうかを示すデータである。composite_display_flagは、ソース信号がコンポジット信号であったかどうかを示すデータである。v_axis、field_sequence、sub_carrier、burst_amplitude、およびsub_carrier_phaseは、ソース信号が、PALの場合に使われるデータである。   q_scale_type is data indicating whether to use a linear quantization scale or a nonlinear quantization scale. The intra_vlc_format is data indicating whether another two-dimensional VLC is used for the intra macroblock. The alternate_scan is data representing a selection between using a zigzag scan or an alternate scan. repeat_firt_field is data used for 2: 3 pull-down. The chroma_420_type is data representing the same value as the next progressive_frame when the signal format is 4: 2: 0, and 0 otherwise. progressive_frame is data indicating whether or not this picture can be sequentially scanned. composite_display_flag is data indicating whether the source signal is a composite signal. v_axis, field_sequence, sub_carrier, burst_amplitude, and sub_carrier_phase are data used when the source signal is PAL.

続いて、最終段の符号化処理によって生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用された量子化マトリックスエクステンションが、履歴ストリームとして記述されている。   Subsequently, the quantization matrix extension used in the past encoding process is described as a history stream in the user area of the picture layer of the bit stream generated by the encoding process at the final stage.

この量子化マトリックスエクステンション(quant_matrix_extension)に関するデータエレメントは、extension_start_code、extension_start_code_identifier、quant_matrix_extension_present_flag、load_intra_quantiser_matrix、intra_quantiser_matrix[64]、load_non_intra_quantiser_matrix、non_intra_quantiser_matrix[64]、load_chroma_intra_quantiser_matrix、chroma_intra_quantiser_matrix[64]、load_chroma_non_intra_quantiser_matrix、およびchroma_non_intra_quantiser_matrix[64] から構成される。   Data elements related to the quantization matrix extension (quant_matrix_extension) are, extension_start_code, extension_start_code_identifier, quant_matrix_extension_present_flag, load_intra_quantiser_matrix, intra_quantiser_matrix [64], load_non_intra_quantiser_matrix, non_intra_quantiser_matrix [64], load_chroma_intra_quantiser_matrix, chroma_intra_quantiser_matrix [64], is composed of Load_chroma_non_intra_quantiser_matrix, and chroma_non_intra_quantiser_matrix [64] The

extension_start_codeは、この量子化マトリックスエクステンションのスタートを示す開始コードである。extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。 quant_matrix_extension_present_flagは、この量子化マトリックスエクステンション内のデータエレメントが有効か無効かを示すためのデータである。load_intra_quantiser_matrixは、イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。intra_quantiser_matrixは、イントラマクロブロック用の量子化マトリックスの値を示すデータである。   extension_start_code is a start code indicating the start of the quantization matrix extension. extension_start_code_identifier is a code indicating which extension data is sent. quant_matrix_extension_present_flag is data for indicating whether the data element in the quantization matrix extension is valid or invalid. load_intra_quantiser_matrix is data indicating the presence of quantization matrix data for intra macroblocks. Intra_quantiser_matrix is data indicating the value of a quantization matrix for an intra macroblock.

load_non_intra_quantiser_matrixは、非イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。non_intra_quantiser_matrixは、非イントラマクロブロック用の量子化マトリックスの値を表すデータである。load_chroma_intra_quantiser_matrixは、色差イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。chroma_intra_quantiser_matrixは、色差イントラマクロブロック用の量子化マトリックスの値を示すデータである。load_chroma_non_intra_quantiser_matrixは、色差非イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。chroma_non_intra_quantiser_matrixは、色差非イントラマクロブロック用の量子化マトリックスの値を示すデータである。   load_non_intra_quantiser_matrix is data indicating the presence of quantization matrix data for non-intra macroblocks. non_intra_quantiser_matrix is data representing the value of a quantization matrix for a non-intra macroblock. load_chroma_intra_quantiser_matrix is data indicating the presence of quantization matrix data for the color difference intra macroblock. chroma_intra_quantiser_matrix is data indicating the value of the quantization matrix for the color difference intra macroblock. load_chroma_non_intra_quantiser_matrix is data indicating the presence of quantization matrix data for color difference non-intra macroblocks. chroma_non_intra_quantiser_matrix is data indicating the value of the quantization matrix for the chrominance non-intra macroblock.

続いて、最終段の符号化処理によって生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用されたコピーライトエクステンションが、履歴ストリームとして記述されている。   Subsequently, the copyright extension used in the past encoding process is described as the history stream in the user area of the picture layer of the bit stream generated by the encoding process in the final stage.

このコピーライトエクステンション(copyright_extension)に関するデータエレメントは、extension_start_code、extension_start_code_itentifier、copyright_extension_present_flag、copyright_flag、copyright_identifier、original_or_copy、copyright_number_1、copyright_number_2、および copyright_number_3から構成される。   Data elements related to this copyright extension (copyright_extension) are composed of extension_start_code, extension_start_code_itentifier, copyright_extension_present_flag, copyright_flag, copyright_identifier, original_or_copy, copyright_number_1, copyright_number_2, and copyright_number_3.

extension_start_codeは、コピーライトエクステンションのスタート示す開始コードである。extension_start_code_itentifierのどのエクステンションデータが送られるかを示すコードである。 copyright_extension_present_flagは、このコピーライトエクステンション内のデータエレメントが有効か無効かを示すためのデータである。copyright_flagは、次のコピーライトエクステンション又はシーケンスエンドまで、符号化されたビデオデータに対してコピー権が与えられているか否かを示す。   extension_start_code is a start code indicating the start of the copyright extension. This code indicates which extension data of extension_start_code_itentifier is sent. The copyright_extension_present_flag is data for indicating whether the data element in this copyright extension is valid or invalid. copyright_flag indicates whether or not a copy right is given to the encoded video data until the next copyright extension or sequence end.

copyright_identifierは、ISO/IEC JTC/SC29によって指定されたコピー権の登録機関を識別するためのデータである。original_or_copyは、ビットストリーム中のデータが、オリジナルデータであるかコピーデータであるかを示すデータである。copyright_number_1は、コピーライトナンバーのビット44から63を表わすデータである。copyright_number_2は、コピーライトナンバーのビット22から43を表わすデータである。copyright_number_3は、コピーライトナンバーのビット0から21を表わすデータである。   The copyright_identifier is data for identifying the registration organization of the copy right specified by ISO / IEC JTC / SC29. original_or_copy is data indicating whether the data in the bitstream is original data or copy data. copyright_number_1 is data representing bits 44 to 63 of the copyright number. copyright_number_2 is data representing bits 22 to 43 of the copyright number. copyright_number_3 is data representing bits 0 to 21 of the copyright number.

続いて、最終段の符号化処理によって生成されたビットストリームのピクチャ層のユーザエリアには、過去の符号化処理において使用されたピクチャディスプレイエクステンション( picture_display_extension )が、履歴ストリームとして記述されている。   Subsequently, the picture display extension (picture_display_extension) used in the past encoding process is described as a history stream in the user area of the picture layer of the bitstream generated by the encoding process at the final stage.

このピクチャディスプレイエクステンションを表わすデータエレメントは、extension_start_code、extension_start_code_identifier、picture_display_extension_present_flag、frame_center_horizontal_offset_1、frame_center_vertical_offset_1、frame_center_horizontal_offset_2、frame_center_vertical_offset_2、frame_center_horizontal_offset_3、およびframe_center_vertical_offset_3から構成される。   Data elements representing this picture display extension are composed of extension_start_code, extension_start_code_identifier, picture_display_extension_present_flag, frame_center_horizontal_offset_1, frame_center_vertical_offset_1, frame_center_horizontal_offset_2, frame_center_vertical_offset_2, frame_center_horizontal_offset_3, and _offcenter_3.

extension_start_codeは、ピクチャディスプレイエクステンションのスタートを示すための開始コードである。extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。picture_display_extension_present_flagは、ピクチャディスプレイエクステンション内のデータエレメントが有効か無効かを示すデータである。frame_center_horizontal_offsetは、表示エリアの水平方向のオフセットを示すデータであって、3つのオフセット値まで定義することができる。frame_center_vertical_offsetは、表示エリアを垂直方向のオフセットを示すデータであって、3つのオフセット値まで定義することができる。   extension_start_code is a start code for indicating the start of the picture display extension. extension_start_code_identifier is a code indicating which extension data is sent. picture_display_extension_present_flag is data indicating whether a data element in the picture display extension is valid or invalid. The frame_center_horizontal_offset is data indicating a horizontal offset of the display area, and can be defined up to three offset values. The frame_center_vertical_offset is data indicating the vertical offset of the display area, and can be defined up to three offset values.

最終段の符号化処理において生成されたビットストリームのピクチャ層のユーザエリアには、既に説明したピクチャディスプレイエクステンションを表わす履歴情報の次に、過去の符号化処理において使用されたユーザデータ(user_data)が、履歴ストリームとして記述されている。   In the user area of the picture layer of the bitstream generated in the encoding process of the final stage, user data (user_data) used in the past encoding process is next to the history information indicating the picture display extension described above. , Described as a history stream.

このユーザデータの次には、過去の符号化処理において使用されたマクロブロック層に関する情報が、履歴ストリームとして記述されている。   Next to the user data, information on the macroblock layer used in the past encoding process is described as a history stream.

このマクロブロック層に関する情報は、macroblock_address_h、macroblock_address_v、slice_header_present_flag、skipped_macroblock_flag等のマクロブロック(macroblock)の位置に関するデータエレメントと、macroblock_quant、macroblock_motion_forward、macroblock_motion_backward、mocroblock_pattern、macroblock_intra、spatial_temporal_weight_code_flag、frame_motion_type、およびdct_type等のマクロブロックモード(macroblock_modes[])に関するデータエレメントと、quantiser_scale_code等の量子化ステップ制御に関するデータエレメントと、PMV[0][0][0]、PMV[0][0][1]、motion_vertical_field_select[0][0]、PMV[0][1][0]、PMV[0][1][1]、motion_vertical_field_select[0][1]、PMV[1][0][0]、PMV[1][0][1]、motion_vertical_field_select[1][0]、PMV[1][1][0]、PMV[1][1][1]、motion_vertical_field_select[1][1]等の動き補償に関するデータエレメントと、coded_block_pattern等のマクロブロックパターンに関するデータエレメントと、num_mv_bits、num_coef_bits、およびnum_other_bits等の発生符号量に関するデータエレメントから構成されている。   Information about the macroblock layer includes data elements related to macroblock (macroblock) positions such as macroblock_address_h, macroblock_address_v, slice_header_present_flag, skipped_macroblock_flag, macroblock_quant, macroblock_motion_forward, macroblock_motion_backward, macroblock_pattern, macro_block_frame, (Macroblock_modes []), data elements related to quantization step control such as quantizer_scale_code, PMV [0] [0] [0], PMV [0] [0] [1], motion_vertical_field_select [0] [0 ], PMV [0] [1] [0], PMV [0] [1] [1], motion_vertical_field_select [0] [1], PMV [1] [0] [0], PMV [1] [0] Motion compensation data elements such as [1], motion_vertical_field_select [1] [0], PMV [1] [1] [0], PMV [1] [1] [1], motion_vertical_field_select [1] [1] Macro block such as coded_block_pattern And data elements related to the pattern, num_mv_bits, is configured Num_coef_bits, and the data elements relating to the generated code amount of such Num_other_bits.

以下にマクロブロック層に関するデータエレメントについて詳細に説明する。   Hereinafter, data elements related to the macroblock layer will be described in detail.

macroblock_address_hは、現在のマクロブロックの水平方向の絶対位置を定義するためのデータである。macroblock_address_vは、現在のマクロブロックの垂直方向の絶対位置を定義するためのデータである。slice_header_present_flagは、このマクロブロックがスライス層の先頭であり、スライスヘッダを伴なうか否かを示すデータである。skipped_macroblock_flagは、復号処理においてこのマクロブロックをスキップするか否かを示すデータである。   macroblock_address_h is data for defining the absolute position of the current macroblock in the horizontal direction. macroblock_address_v is data for defining the absolute position of the current macroblock in the vertical direction. The slice_header_present_flag is data indicating whether or not this macroblock is the head of the slice layer and is accompanied by a slice header. skipped_macroblock_flag is data indicating whether or not to skip this macroblock in the decoding process.

macroblock_quantは、後述する図38と図39に示されたマクロブロックタイプ( macroblock_type )から導かれるデータであって、quantiser_scale_codeがビットストリーム中に現れるか否かを示すデータである。macroblock_motion_forwardおよびmacroblock_motion_backwardは、図38と図39に示されたマクロブロックタイプから導かれるデータであって、復号処理で使用されるデータである。mocroblock_patternは、図38と図39に示されたマクロブロックタイプから導かれるデータであって、coded_block_patternがビットストリーム中に現れるか否かを示すデータである。   The macroblock_quant is data derived from a macroblock type (macroblock_type) shown in FIGS. 38 and 39, which will be described later, and indicates whether quantizer_scale_code appears in the bitstream. Macroblock_motion_forward and macroblock_motion_backward are data derived from the macroblock types shown in FIGS. 38 and 39, and are used in the decoding process. mocroblock_pattern is data derived from the macroblock type shown in FIGS. 38 and 39, and indicates whether coded_block_pattern appears in the bitstream.

macroblock_intraは、図38と図39に示されたマクロブロックタイプから導かれるデータであって、復号処理で使用されるデータである。spatial_temporal_weight_code_flagは、図38と図39に示されたマクロブロックタイプから導かれるデータであって、時間スケーラビリティで下位レイヤ画像のアップサンプリング方法を示すspatial_temporal_weight_codeは、ビットストリーム中に存在するか否かを示すデータである。   The macroblock_intra is data derived from the macroblock type shown in FIGS. 38 and 39, and is used in the decoding process. spatial_temporal_weight_code_flag is data derived from the macroblock type shown in FIG. 38 and FIG. 39, and spatial_temporal_weight_code indicating the upsampling method of the lower layer image with temporal scalability is data indicating whether or not the bitstream exists. It is.

frame_motion_typeは、フレームのマクロブロックの予測タイプを示す2ビットのコードである。予測ベクトルが2個でフィールドベースの予測タイプであれば「00」であって、予測ベクトルが1個でフィールドベースの予測タイプであれば「01」であって、予測ベクトルが1個でフレームベースの予測タイプであれば「10」であって、予測ベクトルが1個でディアルプライムの予測タイプであれば「11」である。field_motion_typeは、フィールドのマクロブロックの動き予測を示す2ビットのコードである。予測ベクトルが1個でフィールドベースの予測タイプであれば「01」であって、予測ベクトルが2個で18×8マクロブロックベースの予測タイプであれば「10」であって、予測ベクトルが1個でディアルプライムの予測タイプであれば「11」である。dct_typeは、DCTがフレームDCTモードか、フィールドDCTモードかを示すデータである。quantiser_scale_codeはマクロブロックの量子化ステップサイズを示すデータである。   frame_motion_type is a 2-bit code indicating the prediction type of the macroblock of the frame. If the number of prediction vectors is two and the field-based prediction type is “00”, if the number of prediction vectors is one and the field-based prediction type is “01”, the number of prediction vectors is one and the frame base The prediction type is “10”, and if the prediction type is one and the prime prediction type is “11”. field_motion_type is a 2-bit code indicating motion prediction of a macroblock in a field. If the prediction vector is one and the field-based prediction type is “01”, if the prediction vector is two and the 18 × 8 macroblock-based prediction type is “10”, the prediction vector is 1 It is “11” if the prediction type is individual and prime prime. dct_type is data indicating whether the DCT is a frame DCT mode or a field DCT mode. quantiser_scale_code is data indicating the quantization step size of the macroblock.

次に動きベクトルに関するデータエレメントについて説明する。動きベクトルは、復号時に必要な動きベクトルを減少させるために、先に符号化されたベクトルに関し、差分として符号化される。動きベクトルの復号を行うために、復号器は、4個の動きベクトル予測値(それぞれ水平および垂直成分を伴なう)を維持しなければいけない。この予測動きベクトルをPMV[r][s][v]と表わすことにしている。[r]は、マクロブロックにおける動きベクトルが第1のベクトルであるのか、第2のベクトルであるのかを示すフラグであって、マクロブロックにおけるベクトルが第1のベクトルである場合には「0」、マクロブロックにおけるベクトルが第2のベクトルである場合には「1」となる。[s]は、マクロブロックにおける動きベクトルの方向が、前方向であるのか後方向であるのかを示すフラグであって、前方向動きベクトルの場合には「0」、後方向動きベクトルの場合には「1」となる。[v]は、マクロブロックにおけるベクトルの成分が、水平方向であるのか垂直方向であるのかを示すフラグであって、水平方向成分の場合には「0」、垂直方向成分の場合には「1」となる。   Next, data elements relating to motion vectors will be described. The motion vector is encoded as a difference with respect to the previously encoded vector in order to reduce the motion vector required during decoding. In order to perform motion vector decoding, the decoder must maintain four motion vector prediction values (with horizontal and vertical components, respectively). This predicted motion vector is expressed as PMV [r] [s] [v]. [r] is a flag indicating whether the motion vector in the macroblock is the first vector or the second vector, and “0” when the vector in the macroblock is the first vector. When the vector in the macroblock is the second vector, “1” is set. [s] is a flag indicating whether the direction of the motion vector in the macroblock is the forward direction or the backward direction, and is “0” in the case of the forward motion vector, and in the case of the backward motion vector. Becomes “1”. [v] is a flag indicating whether the vector component in the macroblock is in the horizontal direction or the vertical direction, and is “0” for the horizontal component and “1” for the vertical component. "

従って、PMV[0][0][0]は、第1のベクトルの前方向の動きベクトルの水平方向成分のデータを表わし、PMV[0][0][1]は、第1のベクトルの前方向の動きベクトルの垂直方向成分のデータを表わし、PMV[0][1][0]は、第1のベクトルの後方向の動きベクトルの水平方向成分のデータを表わし、PMV[0][1][1]は、第1のベクトルの後方向の動きベクトルの垂直方向成分のデータを表わし、 PMV[1][0][0]は、第2のベクトルの前方向の動きベクトルの水平方向成分のデータを表わし、PMV[1][0][1]は、第2のベクトルの前方向の動きベクトルの垂直方向成分のデータを表わし、 PMV[1][1][0]は、第2のベクトルの後方向の動きベクトルの水平方向成分のデータを表わし、そして、PMV[1][1][1] は、第2のベクトルの後方向の動きベクトルの垂直方向成分のデータを表わしている。   Therefore, PMV [0] [0] [0] represents the horizontal component data of the forward motion vector of the first vector, and PMV [0] [0] [1] represents the first vector. PMV [0] [1] [0] represents the vertical component data of the forward motion vector, PMV [0] [1] [0] represents the horizontal component data of the backward motion vector of the first vector, and PMV [0] [ 1] [1] represents the data of the vertical component of the backward motion vector of the first vector, and PMV [1] [0] [0] represents the horizontal of the forward motion vector of the second vector. Represents the direction component data, PMV [1] [0] [1] represents the vertical component data of the forward motion vector of the second vector, and PMV [1] [1] [0] PMV [1] [1] [1] represents the data of the vertical component of the backward motion vector of the second vector, and represents the data of the horizontal component of the backward motion vector of the second vector. It represents.

motion_vertical_field_select[r][s]は、予測の形式にいずれの参照フィールドを使用するのかを示すデータである。このmotion_vertical_field_select[r][s]が「0」の場合には、トップ参照フィールドを使用し、「1」の場合には、ボトム参照フィールドを使用することを示している。   motion_vertical_field_select [r] [s] is data indicating which reference field is used for the prediction format. When the motion_vertical_field_select [r] [s] is “0”, the top reference field is used, and when it is “1”, the bottom reference field is used.

よって、motion_vertical_field_select[0][0]は、第1のベクトルの前方向の動きベクトルを生成する際の参照フィールドを示し、motion_vertical_field_select[0][1]は、第1のベクトルの後方向の動きベクトルを生成する際の参照フィールドを示し、motion_vertical_field_select[1][0]は、第2のベクトルの前方向の動きベクトルを生成する際の参照フィールドを示し、そして、motion_vertical_field_select[1][1]は、第2ベクトルの後方向の動きベクトルを生成する際の参照フィールドを示している。   Therefore, motion_vertical_field_select [0] [0] indicates a reference field for generating a forward motion vector of the first vector, and motion_vertical_field_select [0] [1] indicates a backward motion vector of the first vector. , Motion_vertical_field_select [1] [0] indicates a reference field for generating a forward motion vector of the second vector, and motion_vertical_field_select [1] [1] A reference field for generating a backward motion vector of the second vector is shown.

coded_block_patternは、DCT係数を格納する複数のDCTブロックのうち、どのDCTブロックに、有意係数(非0係数)があるかを示す可変長のデータである。num_mv_bitsは、マクロブロック中の動きベクトルの符号量を示すデータである。num_coef_bitsは、マクロブロック中のDCT係数の符号量を示すデータである。num_other_bitsは、マクロブロックの符号量で、動きベクトルおよびDCT係数以外の符号量を示すデータである。   The coded_block_pattern is variable length data indicating which DCT block has a significant coefficient (non-zero coefficient) among a plurality of DCT blocks storing DCT coefficients. num_mv_bits is data indicating the code amount of the motion vector in the macroblock. num_coef_bits is data indicating the code amount of the DCT coefficient in the macroblock. num_other_bits is data indicating the code amount of the macroblock and the code amount other than the motion vector and the DCT coefficient.

次に、可変長の履歴ストリームから各データエレメントをデコードするためのシンタックスについて、図24乃至図44を参照して説明する。   Next, a syntax for decoding each data element from a variable-length history stream will be described with reference to FIGS.

図24に示される可変長の履歴ストリームは、next_start_code()関数、sequence_header()関数、sequence_extension()関数、extension_and_user_data(0)関数、group_of_picture_header()関数、extension_and_user_data(1)関数、picture_header()関数、picture_coding_extension()関数、re_coding_stream_info()関数、extension_and_user_data(2)関数、およびpicture_data()関数によって定義されたデータエレメントによって構成される。   The variable-length history stream shown in FIG. 24 includes a next_start_code () function, a sequence_header () function, a sequence_extension () function, an extension_and_user_data (0) function, a group_of_picture_header () function, an extension_and_user_data (1) function, a picture_header () function, and a picture_coding_extension The data element is defined by the () function, the re_coding_stream_info () function, the extension_and_user_data (2) function, and the picture_data () function.

next_start_code()関数は、ビットストリーム中に存在するスタートコードを探すための関数であるので、履歴ストリームの最も先頭には、図25に示すような、過去の符号化処理において使用されたデータエレメントであってsequence_header()関数によって定義されたデータエレメントが記述されている。   Since the next_start_code () function is a function for searching for a start code existing in the bit stream, the top of the history stream is a data element used in the past encoding process as shown in FIG. A data element defined by the sequence_header () function is described.

図25に示されるsequence_header()関数によって定義されたデータエレメントは、sequence_header_code、sequence_header_present_flag、horizontal_size_value、vertical_size_value、aspect_ratio_information、frame_rate_code、bit_rate_value、marker_bit、VBV_buffer_size_value、constrained_parameter_flag、load_intra_quantiser_matrix、intra_quantiser_matrix、load_non_intra_quantiser_matrix、およびnon_intra_quantiser_matrix等である。   The data elements defined by the sequence_header () function shown in Fig. 25 are sequence_header_code, sequence_header_present_flag, horizontal_size_value, vertical_size_value, aspect_ratio_information, frame_rate_code, bit_rate_value, marker_bit, VBV_buffer_size_value, constrained_parameter_trait_intra

sequence_header_codeは、シーケンス層のスタート同期コードを表すデータである。sequence_header_present_flagは、sequence_header内のデータが有効か無効かを示すデータである。 horizontal_size_valueは、画像の水平方向の画素数の下位12ビットから成るデータである。vertical_size_valueは、画像の縦のライン数の下位12ビットからなるデータである。aspect_ratio_informationは、画素のアスペクト比(縦横比)または表示画面アスペクト比を表すデータである。frame_rate_codeは、画像の表示周期を表すデータである。bit_rate_valueは、発生ビット量に対する制限のためのビットレートの下位18ビット(400bsp単位で切り上げる)データである。   The sequence_header_code is data representing the start synchronization code of the sequence layer. The sequence_header_present_flag is data indicating whether the data in the sequence_header is valid or invalid. horizontal_size_value is data consisting of the lower 12 bits of the number of pixels in the horizontal direction of the image. vertical_size_value is data consisting of the lower 12 bits of the number of vertical lines of the image. Aspect_ratio_information is data representing the pixel aspect ratio (aspect ratio) or display screen aspect ratio. The frame_rate_code is data representing an image display cycle. bit_rate_value is lower 18 bits (rounded up in units of 400 bsp) of the bit rate for limiting the amount of generated bits.

marker_bitは、スタートコードエミュレーションを防止するために挿入されるビットデータである。VBV_buffer_size_valueは、発生符号量制御用の仮想バッファ(ビデオバッファベリファイヤー)の大きさを決める値の下位10ビットデータである。constrained_parameter_flagは、各パラメータが制限以内であることを示すデータである。load_intra_quantiser_matrixは、イントラMB用量子化マトリックス・データの存在を示すデータである。intra_quantiser_matrixは、イントラMB用量子化マトリックスの値を示すデータである。load_non_intra_quantiser_matrixは、非イントラMB用量子化マトリックス・データの存在を示すデータである。non_intra_quantiser_matrixは、非イントラMB用量子化マトリックスの値を表すデータである。   The marker_bit is bit data inserted to prevent start code emulation. VBV_buffer_size_value is lower 10-bit data of a value that determines the size of the generated code amount control virtual buffer (video buffer verifier). constrained_parameter_flag is data indicating that each parameter is within the limit. The load_intra_quantiser_matrix is data indicating the presence of intra MB quantization matrix data. intra_quantiser_matrix is data indicating the value of the intra MB quantization matrix. load_non_intra_quantiser_matrix is data indicating the presence of non-intra MB quantization matrix data. non_intra_quantiser_matrix is data representing a value of a non-intra MB quantization matrix.

sequence_header()関数によって定義されたデータエレメントの次には、図26で示すような、sequence_extension()関数によって定義されたデータエレメントが、履歴ストリームとして記述されている。   Next to the data element defined by the sequence_header () function, the data element defined by the sequence_extension () function as shown in FIG. 26 is described as a history stream.

sequence_extension()関数によって定義されたデータエレメントとは、extension_start_code、extension_start_code_identifier、sequence_extension_present_flag、profile_and_level_indication、progressive_sequence、chroma_format、horizontal_size_extension、vertical_size_extension、bit_rate_extension、vbv_buffer_size_extension、low_delay、frame_rate_extension_n 、および frame_rate_extension_d等のデータエレメントである。   Data elements defined by the sequence_extension () function are extension_start_code, extension_start_code_identifier, sequence_extension_present_flag, profile_and_level_indication, progressive_sequence, chroma_format, horizontal_size_extension, vertical_size_extension, bit_rate_extension, _delay_rate_rate_delay_rate_delay_rate

extension_start_codeは、エクステンションデータのスタート同期コードを表すデータである。extension_start_code_identifierは、どの拡張データが送られるかを示すデータである。sequence_extension_present_flagは、シーケンスエクステンション内のデータが有効であるか無効であるかを示すデータである。profile_and_level_indicationは、ビデオデータのプロファイルとレベルを指定するためのデータである。progressive_sequenceは、ビデオデータが順次走査であることを示すデータである。chroma_formatは、ビデオデータの色差フォーマットを指定するためのデータである。horizontal_size_extensionは、シーケンスヘッダのhorizntal_size_valueに加える上位2ビットのデータである。vertical_size_extensionは、シーケンスヘッダのvertical_size_value加える上位2ビットのデータである。bit_rate_extensionは、シーケンスヘッダのbit_rate_valueに加える上位12ビットのデータである。vbv_buffer_size_extensionは、シーケンスヘッダのvbv_buffer_size_valueに加える上位8ビットのデータである。   extension_start_code is data representing a start synchronization code of extension data. extension_start_code_identifier is data indicating which extension data is sent. The sequence_extension_present_flag is data indicating whether the data in the sequence extension is valid or invalid. Profile_and_level_indication is data for designating the profile and level of video data. progressive_sequence is data indicating that the video data is sequentially scanned. chroma_format is data for designating the color difference format of the video data. The horizontal_size_extension is upper 2 bits data added to the horizntal_size_value of the sequence header. vertical_size_extension is upper 2 bits of data added to vertical_size_value of the sequence header. bit_rate_extension is upper 12-bit data added to bit_rate_value of the sequence header. vbv_buffer_size_extension is upper 8-bit data to be added to vbv_buffer_size_value of the sequence header.

low_delayは、Bピクチャを含まないことを示すデータである。frame_rate_extension_nは、シーケンスヘッダのframe_rate_codeと組み合わせてフレームレートを得るためのデータである。frame_rate_extension_dは、シーケンスヘッダのframe_rate_codeと組み合わせてフレームレートを得るためのデータである。   low_delay is data indicating that a B picture is not included. Frame_rate_extension_n is data for obtaining a frame rate in combination with frame_rate_code of the sequence header. Frame_rate_extension_d is data for obtaining a frame rate in combination with frame_rate_code of the sequence header.

sequence_extension()関数によって定義されたデータエレメントの次には、図27に示すようなextension_and_user_data(0)関数によって定義されたデータエレメントが、履歴ストリームとして記述されている。 extension_and_user_data(i)関数は、「i」が1以外のときは、extension_data()関数によって定義されるデータエレメントは記述せずに、user_data()関数によって定義されるデータエレメントのみを履歴ストリームとして記述する。よって、 extension_and_user_data(0)関数は、 user_data()関数によって定義されるデータエレメントのみを履歴ストリームとして記述する。   Next to the data element defined by the sequence_extension () function, the data element defined by the extension_and_user_data (0) function as shown in FIG. 27 is described as a history stream. The extension_and_user_data (i) function describes only the data element defined by the user_data () function as a history stream without describing the data element defined by the extension_data () function when “i” is other than 1. . Therefore, the extension_and_user_data (0) function describes only the data element defined by the user_data () function as a history stream.

user_data()関数は、図28に示されたようなシンタックスに基いて、ユーザデータを履歴ストリームとして記述する。   The user_data () function describes user data as a history stream based on the syntax as shown in FIG.

extension_and_user_data(0)関数によって定義されたデータエレメントの次には、図29に示すようなgroup_of_picture_header()関数によって定義されたデータエレメント、およびextension_and_user_data(1)関数によって定義されるデータエレメントが、履歴ストリームとして記述されている。ただし、履歴ストリーム中に、GOP層のスタートコードを示すgroup_start_codeが記述されている場合にのみ、 group_of_picture_header()関数によって定義されたデータエレメント、およびextension_and_user_data(1)関数によって定義されるデータエレメントが記述されている。   Next to the data element defined by the extension_and_user_data (0) function, the data element defined by the group_of_picture_header () function as shown in FIG. 29 and the data element defined by the extension_and_user_data (1) function are used as a history stream. is described. However, the data element defined by the group_of_picture_header () function and the data element defined by the extension_and_user_data (1) function are described only when group_start_code indicating the GOP layer start code is described in the history stream. ing.

group_of_picture_header()関数によって定義されたデータエレメントは、group_start_code、group_of_picture_header_present_flag、time_code、closed_gop、およびbroken_linkから構成される。   The data element defined by the group_of_picture_header () function is composed of group_start_code, group_of_picture_header_present_flag, time_code, closed_gop, and broken_link.

group_start_codeは、GOP層の開始同期コードを示すデータである。 group_of_picture_header_present_flagは、 group_of_picture_header内のデータエレメントが有効であるか無効であるかを示すデータである。 time_codeは、GOPの先頭ピクチャのシーケンスの先頭からの時間を示すタイムコードである。closed_gopは、GOP内の画像が他のGOPから独立再生可能なことを示すフラグデータである。broken_linkは、編集などのためにGOP内の先頭のBピクチャが正確に再生できないことを示すフラグデータである。   group_start_code is data indicating the start synchronization code of the GOP layer. group_of_picture_header_present_flag is data indicating whether a data element in group_of_picture_header is valid or invalid. time_code is a time code indicating the time from the beginning of the sequence of the first picture of the GOP. closed_gop is flag data indicating that an image in a GOP can be reproduced independently from other GOPs. Broken_link is flag data indicating that the first B picture in the GOP cannot be accurately reproduced for editing or the like.

extension_and_user_data(1)関数は、 extension_and_user_data(0)関数と同じように、user_data()関数によって定義されるデータエレメントのみを履歴ストリームとして記述する。   Similar to the extension_and_user_data (0) function, the extension_and_user_data (1) function describes only the data element defined by the user_data () function as a history stream.

もし、履歴ストリーム中に、GOP層のスタートコードを示すgroup_start_codeが存在しない場合には、これらのgroup_of_picture_header()関数およびextension_and_user_data(1)関数によって定義されるデータエレメントは、履歴ストリーム中には記述されていない。その場合には、 extension_and_user_data(0)関数によって定義されたデータエレメントの次に、picture_headr()関数によって定義されたデータエレメントが履歴ストリームとして記述されている。   If group_start_code indicating the GOP layer start code does not exist in the history stream, the data elements defined by these group_of_picture_header () and extension_and_user_data (1) functions are described in the history stream. Absent. In that case, after the data element defined by the extension_and_user_data (0) function, the data element defined by the picture_headr () function is described as a history stream.

picture_headr()関数によって定義されたデータエレメントは、図30に示すように、picture_start_code、temporal_reference、picture_coding_type、vbv_delay、full_pel_forward_vector、forward_f_code、full_pel_backward_vector、backward_f_code、extra_bit_picture、およびextra_information_pictureである。   Data elements defined by the picture_headr () function are picture_start_code, temporal_reference, picture_coding_type, vbv_delay, full_pel_forward_vector, forward_f_code, full_pel_backward_vector, backward_f_code, extra_bit_picture, and extra_information_picture, as shown in FIG.

具体的には、picture_start_codeは、ピクチャ層の開始同期コードを表すデータである。temporal_referenceは、ピクチャの表示順を示す番号でGOPの先頭でリセットされるデータである。picture_coding_typeは、ピクチャタイプを示すデータである。vbv_delayは、ランダムアクセス時の仮想バッファの初期状態を示すデータである。full_pel_forward_vectorは、順方向動きベクトルの精度が整数単位か半画素単位かを示すデータである。forward_f_codeは、順方向動きベクトル探索範囲を表すデータである。full_pel_backward_vectorは、逆方向動きベクトルの精度が整数単位か半画素単位かを示すデータである。backward_f_codeは、逆方向動きベクトル探索範囲を表すデータである。 extra_bit_pictureは、後続する追加情報の存在を示すフラグである。このextra_bit_pictureが「1」の場合には、次にextra_information_pictureが存在し、extra_bit_pictureが「0」の場合には、これに続くデータが無いことを示している。extra_information_pictureは、規格において予約された情報である。   Specifically, picture_start_code is data representing the start synchronization code of the picture layer. temporal_reference is a number indicating the display order of pictures and is data to be reset at the top of the GOP. picture_coding_type is data indicating a picture type. vbv_delay is data indicating the initial state of the virtual buffer at the time of random access. full_pel_forward_vector is data indicating whether the accuracy of the forward motion vector is an integer unit or a half pixel unit. forward_f_code is data representing the forward motion vector search range. full_pel_backward_vector is data indicating whether the accuracy of the backward motion vector is an integer unit or a half pixel unit. backward_f_code is data representing the backward motion vector search range. extra_bit_picture is a flag indicating the presence of subsequent additional information. When this extra_bit_picture is “1”, there is next extra_information_picture, and when extra_bit_picture is “0”, it indicates that there is no subsequent data. extra_information_picture is information reserved in the standard.

picture_headr()関数によって定義されたデータエレメントの次には、図31に示すようなpicture_coding_extension()関数によって定義されたデータエレメントが、履歴ストリームとして記述されている。   Next to the data element defined by the picture_headr () function, the data element defined by the picture_coding_extension () function as shown in FIG. 31 is described as a history stream.

このpicture_coding_extension()関数によって定義されたデータエレメントとは、extension_start_code、extension_start_code_identifier、f_code[0][0]、f_code[0][1]、f_code[1][0]、f_code[1][1]、intra_dc_precision、picture_structure、top_field_first、frame_predictive_frame_dct、concealment_motion_vectors、q_scale_type、intra_vlc_format、alternate_scan、repeat_firt_field、chroma_420_type、progressive_frame、composite_display_flag、v_axis、field_sequence、sub_carrier、burst_amplitude、およびsub_carrier_phaseから構成される。   Data elements defined by this picture_coding_extension () function include extension_start_code, extension_start_code_identifier, f_code [0] [0], f_code [0] [1], f_code [1] [0], f_code [1] [1], intra_dc_precision, picture_structure, top_field_first, frame_predictive_frame_dct, concealment_motion_vectors, q_scale_type, intra_vlc_format, alternate_scan, repeat_firt_field, chroma_420_type, progressive_frame, composite_display_flag, v_axis, field_sequence, sub_mplitude, phase_st, sub_mpl,

extension_start_codeは、ピクチャ層のエクステンションデータのスタートを示す開始コードである。extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。 f_code[0][0]は、フォワード方向の水平動きベクトル探索範囲を表すデータである。f_code[0][1]は、フォワード方向の垂直動きベクトル探索範囲を表すデータである。f_code[1][0]は、バックワード方向の水平動きベクトル探索範囲を表すデータである。f_code[1][1]は、バックワード方向の垂直動きベクトル探索範囲を表すデータである。intra_dc_precisionは、DC係数の精度を表すデータである。   extension_start_code is a start code indicating the start of extension data of the picture layer. extension_start_code_identifier is a code indicating which extension data is sent. f_code [0] [0] is data representing the horizontal motion vector search range in the forward direction. f_code [0] [1] is data representing a vertical motion vector search range in the forward direction. f_code [1] [0] is data representing the horizontal motion vector search range in the backward direction. f_code [1] [1] is data representing a vertical motion vector search range in the backward direction. intra_dc_precision is data representing the precision of the DC coefficient.

picture_structureは、フレームストラクチャかフィールドストラクチャかを示し、更に、フィールドストラクチャの場合は、上位フィールドか下位フィールドかもあわせて示すデータである。top_field_firstは、フレームストラクチャの場合、最初のフィールドが、上位か下位かを示すデータである。frame_predictive_frame_dctは、フレームストラクチャの場合、フレーム・モードDCTの予測がフレーム・モードだけであることを示すデータである。concealment_motion_vectorsは、イントラマクロブロックに伝送エラーを隠蔽するための動きベクトルがついていることを示すデータである。q_scale_typeは、線形量子化スケールを利用するか、非線形量子化スケールを利用するかを示すデータである。intra_vlc_formatは、イントラマクロブロックに、別の2次元VLCを使うかどうかを示すデータである。   The picture_structure indicates whether it is a frame structure or a field structure, and in the case of a field structure, it is data indicating whether it is an upper field or a lower field. In the case of a frame structure, top_field_first is data indicating whether the first field is upper or lower. In the case of a frame structure, frame_predictive_frame_dct is data indicating that the prediction of the frame mode DCT is only the frame mode. concealment_motion_vectors is data indicating that a motion vector for concealing a transmission error is attached to an intra macroblock. q_scale_type is data indicating whether to use a linear quantization scale or a nonlinear quantization scale. The intra_vlc_format is data indicating whether another two-dimensional VLC is used for the intra macroblock.

alternate_scanは、ジグザグスキャンを使うか、オルタネート・スキャンを使うかの選択を表すデータである。repeat_firt_fieldは、2:3プルダウンの際に使われるデータである。chroma_420_typeは、信号フォーマットが4:2:0の場合、次のprogressive_frame と同じ値、そうでない場合は0を表すデータである。progressive_frameは、このピクチャが、順次走査できているかどうかを示すデータである。composite_display_flagは、ソース信号がコンポジット信号であったかどうかを示すデータである。v_axis、field_sequence、sub_carrier、burst_amplitude、およびsub_carrier_phaseは、ソース信号が、PALの場合に使われるデータである。   The alternate_scan is data representing a selection between using a zigzag scan or an alternate scan. repeat_firt_field is data used for 2: 3 pull-down. The chroma_420_type is data representing the same value as the next progressive_frame when the signal format is 4: 2: 0, and 0 otherwise. progressive_frame is data indicating whether or not this picture can be sequentially scanned. composite_display_flag is data indicating whether the source signal is a composite signal. v_axis, field_sequence, sub_carrier, burst_amplitude, and sub_carrier_phase are data used when the source signal is PAL.

picture_coding_extension()関数によって定義されたデータエレメントの次には、re_coding_stream_info()関数によって定義されたデータエレメントが履歴ストリームとして記述されている。このre_coding_stream_info()関数は、主に履歴情報の組み合わせを記述する場合に用いられるものであり、その詳細については、図48を参照して後述する。   Next to the data element defined by the picture_coding_extension () function, the data element defined by the re_coding_stream_info () function is described as a history stream. The re_coding_stream_info () function is mainly used when describing a combination of history information, and details thereof will be described later with reference to FIG.

re_coding_stream_info()関数によって定義されたデータエレメントの次には、extensions_and_user_data(2)によって定義されたデータエレメントが、履歴ストリームとして記述されている。このextension_and_user_data(2)関数は、図27に示したように、ビットストリーム中にエクステンションスタートコード(extension_start_code)が存在する場合には、extension_data()関数によって定義されるデータエレメントが記述されている。このデータエレメントの次には、ビットストリーム中にユーザデータスタートコード(user_data_start_code)が存在する場合には、user_data()関数によって定義されるデータエレメントが記述されている。ただし、ビットストリーム中にエクステンションスタートコードおよびユーザデータスタートコードが存在しない場合には extension_data()関数 およびuser_data()関数によって定義されるデータエレメントはビットトリーム中には記述されていない。   Next to the data element defined by the re_coding_stream_info () function, the data element defined by extensions_and_user_data (2) is described as a history stream. As shown in FIG. 27, the extension_and_user_data (2) function describes data elements defined by the extension_data () function when an extension start code (extension_start_code) exists in the bitstream. Next to this data element, when a user data start code (user_data_start_code) exists in the bit stream, a data element defined by the user_data () function is described. However, when the extension start code and the user data start code do not exist in the bit stream, the data elements defined by the extension_data () function and the user_data () function are not described in the bit stream.

extension_data()関数は、図32に示すように、extension_start_codeを示すデータエレメントと、quant_matrix_extension()関数、copyright_extension()関数、およびpicture_display_extension()関数によって定義されるデータエレメンエトとを、ビットストリーム中に履歴ストリームとして記述するための関数である。   As shown in FIG. 32, the extension_data () function records a data element indicating extension_start_code and data elements defined by the quant_matrix_extension () function, copyright_extension () function, and picture_display_extension () function in the bitstream. This is a function to describe as a stream.

quant_matrix_extension()関数によって定義されるデータエレメントは、図33に示すように、extension_start_code、extension_start_code_identifier、quant_matrix_extension_present_flag、load_intra_quantiser_matrix、intra_quantiser_matrix[64]、load_non_intra_quantiser_matrix、non_intra_quantiser_matrix[64]、load_chroma_intra_quantiser_matrix、chroma_intra_quantiser_matrix[64]、load_chroma_non_intra_quantiser_matrix、およびchroma_non_intra_quantiser_matrix[64] である。   Data elements defined by the quant_matrix_extension () function, as shown in FIG. 33, extension_start_code, extension_start_code_identifier, quant_matrix_extension_present_flag, load_intra_quantiser_matrix, intra_quantiser_matrix [64], load_non_intra_quantiser_matrix, non_intra_quantiser_matrix [64], load_chroma_intra_quantiser_matrix, chroma_intra_quantiser_matrix [64], load_chroma_non_intra_quantiser_matrix, and chroma_non_intra_quantiser_matrix [64].

extension_start_codeは、この量子化マトリックスエクステンションのスタートを示す開始コードである。extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。 quant_matrix_extension_present_flagは、この量子化マトリックスエクステンション内のデータエレメントが有効か無効かを示すためのデータである。load_intra_quantiser_matrixは、イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。intra_quantiser_matrixは、イントラマクロブロック用の量子化マトリックスの値を示すデータである。   extension_start_code is a start code indicating the start of the quantization matrix extension. extension_start_code_identifier is a code indicating which extension data is sent. quant_matrix_extension_present_flag is data for indicating whether the data element in the quantization matrix extension is valid or invalid. load_intra_quantiser_matrix is data indicating the presence of quantization matrix data for intra macroblocks. Intra_quantiser_matrix is data indicating the value of a quantization matrix for an intra macroblock.

load_non_intra_quantiser_matrixは、非イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。non_intra_quantiser_matrixは、非イントラマクロブロック用の量子化マトリックスの値を表すデータである。load_chroma_intra_quantiser_matrixは、色差イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。chroma_intra_quantiser_matrixは、色差イントラマクロブロック用の量子化マトリックスの値を示すデータである。load_chroma_non_intra_quantiser_matrixは、色差非イントラマクロブロック用の量子化マトリックス・データの存在を示すデータである。chroma_non_intra_quantiser_matrixは、色差非イントラマクロブロック用の量子化マトリックスの値を示すデータである。   load_non_intra_quantiser_matrix is data indicating the presence of quantization matrix data for non-intra macroblocks. non_intra_quantiser_matrix is data representing the value of a quantization matrix for a non-intra macroblock. load_chroma_intra_quantiser_matrix is data indicating the presence of quantization matrix data for the color difference intra macroblock. chroma_intra_quantiser_matrix is data indicating the value of the quantization matrix for the color difference intra macroblock. load_chroma_non_intra_quantiser_matrix is data indicating the presence of quantization matrix data for color difference non-intra macroblocks. chroma_non_intra_quantiser_matrix is data indicating the value of the quantization matrix for the chrominance non-intra macroblock.

copyright_extension()関数によって定義されるデータエレメントは、図34に示すように、 extension_start_code、extension_start_code_itentifier、copyright_extension_present_flag、copyright_flag、copyright_identifier、original_or_copy、copyright_number_1、copyright_number_2、および copyright_number_3から構成される。   As shown in FIG. 34, the data element defined by the copyright_extension () function includes extension_start_code, extension_start_code_itentifier, copyright_extension_present_flag, copyright_flag, copyright_identifier, original_or_copy, copyright_number_1, copyright_number_2, and copyright_number_3.

extension_start_codeは、コピーライトエクステンションのスタート示す開始コードである。extension_start_code_itentifierどのエクステンションデータが送られるかを示すコードである。 copyright_extension_present_flagは、このコピーライトエクステンション内のデータエレメントが有効か無効かを示すためのデータである。   extension_start_code is a start code indicating the start of the copyright extension. extension_start_code_itentifier This code indicates which extension data is sent. The copyright_extension_present_flag is data for indicating whether the data element in this copyright extension is valid or invalid.

copyright_flagは、次のコピーライトエクステンション又はシーケンスエンドまで、符号化されたビデオデータに対してコピー権が与えられているか否かを示す。copyright_identifierは、ISO/IEC JTC/SC29によって指定されたコピー権の登録機関を識別するためのデータである。original_or_copyは、ビットストリーム中のデータが、オリジナルデータであるかコピーデータであるかを示すデータである。copyright_number_1は、コピーライトナンバーのビット44から63を表わすデータである。copyright_number_2は、コピーライトナンバーのビット22から43を表わすデータである。copyright_number_3は、コピーライトナンバーのビット0から21を表わすデータである。   copyright_flag indicates whether or not a copy right is given to the encoded video data until the next copyright extension or sequence end. The copyright_identifier is data for identifying the registration organization of the copy right specified by ISO / IEC JTC / SC29. original_or_copy is data indicating whether the data in the bitstream is original data or copy data. copyright_number_1 is data representing bits 44 to 63 of the copyright number. copyright_number_2 is data representing bits 22 to 43 of the copyright number. copyright_number_3 is data representing bits 0 to 21 of the copyright number.

picture_display_extension()関数によって定義されるデータエレメントは、図35に示すように、extension_start_code_identifier、frame_center_horizontal_offset、frame_center_vertical_offset等である。   Data elements defined by the picture_display_extension () function are extension_start_code_identifier, frame_center_horizontal_offset, frame_center_vertical_offset, etc., as shown in FIG.

extension_start_code_identifierは、どの拡張データが送られるかを示すコードである。 frame_center_horizontal_offsetは、表示エリアの水平方向のオフセットを示すデータであって、number_of_frame_center_offsetsによって定義される数のオフセット値を定義することができる。frame_center_vertical_offsetは、表示エリアを垂直方向のオフセットを示すデータであって、 number_of_frame_center_offsetsによって定義される数のオフセット値を定義することができる。   extension_start_code_identifier is a code indicating which extension data is sent. The frame_center_horizontal_offset is data indicating the horizontal offset of the display area, and the number of offset values defined by number_of_frame_center_offsets can be defined. The frame_center_vertical_offset is data indicating the vertical offset of the display area, and the number of offset values defined by number_of_frame_center_offsets can be defined.

再び図24に戻って、extension_and_user_data(2)関数によって定義されるデータエレメントの次には、picture_data()関数によって定義されるデータエレメントが、履歴ストリームとして記述されている。ただし、このpicture_data()関数は、red_bw_flagが1ではないか、または、red_bw_indicatorが2以下である場合に存在する。このred_bw_flagとred_bw_indicatorは、re_coding_stream_info()関数に記述されており、これらについては、図48と図49を参照して後述する。   Returning to FIG. 24 again, after the data element defined by the extension_and_user_data (2) function, the data element defined by the picture_data () function is described as a history stream. However, this picture_data () function exists when red_bw_flag is not 1 or red_bw_indicator is 2 or less. The red_bw_flag and red_bw_indicator are described in the re_coding_stream_info () function, which will be described later with reference to FIGS. 48 and 49.

picture_data()関数によって定義されるデータエレメントは、図36に示すように、slice()関数によって定義されるデータエレメントである。このslice()関数によって定義されるデータエレメントはビットストリーム中に少なくとも1個記述されている。   The data element defined by the picture_data () function is a data element defined by the slice () function as shown in FIG. At least one data element defined by the slice () function is described in the bit stream.

slice()関数は、図37に示されるように、slice_start_code、slice_quantiser_scale_code、intra_slice_flag、intra_slice、reserved_bits、extra_bit_slice、extra_information_slice、およびextra_bit_slice 等のデータエレメントと、macroblock()関数によって定義されるデータエレメントを、履歴ストリームとして記述するための関数である。   As shown in FIG. 37, the slice () function includes data elements such as slice_start_code, slice_quantiser_scale_code, intra_slice_flag, intra_slice, reserved_bits, extra_bit_slice, extra_information_slice, and extra_bit_slice, as well as data elements defined by the macroblock () function. It is a function to describe as.

slice_start_codeは、slice()関数によって定義されるデータエレメントのスタートを示すスタートコードである。slice_quantiser_scale_codeは、このスライス層に存在するマクロブロックに対して設定された量子化ステップサイズを示すデータである。しかし、各マクロブロック毎に、quantiser_scale_codeが設定されている場合には、各マクロブロックに対して設定されたmacroblock_quantiser_scale_codeのデータが優先して使用される。   slice_start_code is a start code indicating the start of the data element defined by the slice () function. The slice_quantiser_scale_code is data indicating the quantization step size set for the macroblock existing in this slice layer. However, when quantiser_scale_code is set for each macroblock, the macroblock_quantiser_scale_code data set for each macroblock is used preferentially.

intra_slice_flagは、ビットストリーム中にintra_sliceおよびreserved_bitsが存在するか否かを示すフラグである。intra_sliceは、スライス層中にノンイントラマクロブロックが存在するか否かを示すデータである。スライス層におけるマクロブロックのいずれかがノンイントラマクロブロックである場合には、intra_sliceは「0」となり、スライス層におけるマクロブロックの全てがノンイントラマクロブロックである場合には、intra_sliceは「1」となる。reserved_bitsは、7ビットのデータであって「0」の値を取る。extra_bit_sliceは、履歴ストリームとして追加の情報が存在することを示すフラグであって、次にextra_information_sliceが存在する場合には「1」に設定される。追加の情報が存在しない場合には「0」に設定される。   intra_slice_flag is a flag indicating whether or not intra_slice and reserved_bits exist in the bitstream. intra_slice is data indicating whether or not a non-intra macroblock exists in the slice layer. If any of the macroblocks in the slice layer is a non-intra macroblock, intra_slice is “0”, and if all of the macroblocks in the slice layer are non-intra macroblocks, intra_slice is “1”. Become. reserved_bits is 7-bit data and takes a value of “0”. extra_bit_slice is a flag indicating that additional information exists as a history stream, and is set to “1” when extra_information_slice exists next. If there is no additional information, it is set to “0”.

これらのデータエレメントの次には、macroblock()関数によって定義されたデータエレメントが、履歴ストリームとして記述されている。   Next to these data elements, data elements defined by the macroblock () function are described as a history stream.

macroblock()関数は、図38に示すように、macroblock_escape、macroblock_address_increment、およびmacroblock_quantiser_scale_code、およびmarker_bit等のデータエレメントと、macroblock_modes()関数、motion_vectors(s)関数、およびcode_block_pattern()関数によって定義されたデータエレメントを記述するための関数である。   As shown in FIG. 38, the macroblock () function includes data elements such as macroblock_escape, macroblock_address_increment, macroblock_quantiser_scale_code, and marker_bit, and data elements defined by the macroblock_modes () function, motion_vectors (s) function, and code_block_pattern () function. Is a function for describing

macroblock_escapeは、参照マクロブロックと前のマクロブロックとの水平方向の差が34以上であるか否かを示す固定ビット列である。参照マクロブロックと前のマクロブロックとの水平方向の差が34以上の場合には、macroblock_address_incrementの値に33をプラスする。macroblock_address_incrementは、参照マクロブロックと前のマクロブロックとの水平方向の差を示すデータである。もし、このmacroblock_address_incrementの前にmacroblock_escapeが1つ存在するのであれば、このmacroblock_address_incrementの値に33をプラスした値が、実際の参照マクロブロックと前のマクロブロックとの水平方向の差分を示すデータとなる。   macroblock_escape is a fixed bit string indicating whether or not the horizontal difference between the reference macroblock and the previous macroblock is 34 or more. If the horizontal difference between the reference macroblock and the previous macroblock is 34 or more, 33 is added to the value of macroblock_address_increment. The macroblock_address_increment is data indicating a horizontal difference between the reference macroblock and the previous macroblock. If there is one macroblock_escape before this macroblock_address_increment, the value obtained by adding 33 to the value of the macroblock_address_increment is the data indicating the horizontal difference between the actual reference macroblock and the previous macroblock. .

macroblock_quantiser_scale_codeは、各マクロブロック毎に設定された量子化ステップサイズを示すデータであり、macroblock_quantが「1」のときだけ存在する。各スライス層には、スライス層の量子化ステップサイズを示すslice_quantiser_scale_codeが設定されているが、参照マクロブロックに対してmacroblock_quantiser_scale_codeが設定されている場合には、この量子化ステップサイズを選択する。   The macroblock_quantiser_scale_code is data indicating the quantization step size set for each macroblock, and exists only when the macroblock_quant is “1”. In each slice layer, slice_quantiser_scale_code indicating the quantization step size of the slice layer is set. When macroblock_quantiser_scale_code is set for the reference macroblock, this quantization step size is selected.

macroblock_address_incrementの次には、macroblock_modes()関数によって定義されるデータエレメントが記述されている。macroblock_modes()関数は、図39に示すように、macroblock_type、frame_motion_type、field_motion_type、dct_type等のデータエレメントを、履歴ストリームとして記述するための関数である。   Next to macroblock_address_increment, a data element defined by a macroblock_modes () function is described. As shown in FIG. 39, the macroblock_modes () function is a function for describing data elements such as macroblock_type, frame_motion_type, field_motion_type, and dct_type as a history stream.

macroblock_typeは、マクログブロックの符号化タイプを示すデータである。その詳細は、図42乃至図44を参照して後述する。   macroblock_type is data indicating the coding type of the macroblock. Details thereof will be described later with reference to FIGS.

もし、macroblock_motion_forward又はmacroblock_motion_backwardが「1」であり、ピクチャ構造がフレームであり、更にframe_pred_frame_dctが「0」である場合には、macroblock_typeを表わすデータエレメントの次にframe_motion_typeを表わすデータエレメントが記述されている。なお、このframe_pred_frame_dctは、 frame_motion_typeがビットストリーム中に存在するか否かを示すフラグである。   If macroblock_motion_forward or macroblock_motion_backward is “1”, the picture structure is a frame, and frame_pred_frame_dct is “0”, a data element representing frame_motion_type is described next to the data element representing macroblock_type. This frame_pred_frame_dct is a flag indicating whether or not frame_motion_type exists in the bitstream.

frame_motion_typeは、フレームのマクロブロックの予測タイプを示す2ビットのコードである。予測ベクトルが2個でフィールドベースの予測タイプであれば「00」であって、予測ベクトルが1個でフィールドベースの予測タイプであれば「01」であって、予測ベクトルが1個でフレームベースの予測タイプであれば「10」であって、予測ベクトルが1個でディアルプライムの予測タイプであれば「11」である。   frame_motion_type is a 2-bit code indicating the prediction type of the macroblock of the frame. If the number of prediction vectors is two and the field-based prediction type is “00”, if the number of prediction vectors is one and the field-based prediction type is “01”, the number of prediction vectors is one and the frame base The prediction type is “10”, and if the prediction type is one and the prime prediction type is “11”.

frame_motion_typeを記述する条件が満足されない場合には、macroblock_typeを表わすデータエレメントの次にfield_motion_typeを表わすデータエレメントが記述されている。   If the condition describing the frame_motion_type is not satisfied, the data element representing the field_motion_type is described next to the data element representing the macroblock_type.

field_motion_typeは、フィールドのマクロブロックの動き予測を示す2ビットのコードである。予測ベクトルが1個でフィールドベースの予測タイプであれば「01」であって、予測ベクトルが2個で18×8マクロブロックベースの予測タイプであれば「10」であって、予測ベクトルが1個でディアルプライムの予測タイプであれば「11」である。   field_motion_type is a 2-bit code indicating motion prediction of a macroblock in a field. If the prediction vector is one and the field-based prediction type is “01”, if the prediction vector is two and the 18 × 8 macroblock-based prediction type is “10”, the prediction vector is 1 It is “11” if the prediction type is individual and prime prime.

もし、ピクチャ構造がフレームで、 frame_pred_frame_dctがframe_motion_typeがビットストリーム中に存在することを示し、かつ、frame_pred_frame_dctがdct_typeがビットストリーム中に存在することを示している場合には、macroblock_typeを表わすデータエレメントの次にdct_typeを表わすデータエレメントが記述されている。なお、dct_typeは、DCTがフレームDCTモードか、フィールドDCTモードかを示すデータである。   If the picture structure is a frame, frame_pred_frame_dct indicates that frame_motion_type is present in the bitstream, and frame_pred_frame_dct indicates that dct_type is present in the bitstream, then the data element representing the macroblock_type Describes a data element representing dct_type. Dct_type is data indicating whether the DCT is a frame DCT mode or a field DCT mode.

再び図38に戻って、もし、参照マクロブロックが前方予測マクロブロックであるか、または、参照マクロブロックがイントラマクロブロックであって、かつ、コンシール処理のマクロブロックのいずれかの場合には、motion_vectors(0)関数によって定義されるデータエレメントが記述される。また、参照マクロブロックが後方予測マクロブロックである場合には、motion_vectors(1)関数によって定義されるデータエレメントが記述される。なお、 motion_vectors(0)関数は、第1番目の動きベクトルに関するデータエレメントを記述するための関数であって、motion_vectors(1)関数は、第2番目の動きベクトルに関するデータエレメントを記述するための関数である。   Returning again to FIG. 38, if the reference macroblock is a forward prediction macroblock or the reference macroblock is an intra macroblock and is a concealing macroblock, motion_vectors (0) A data element defined by a function is described. If the reference macroblock is a backward prediction macroblock, a data element defined by the motion_vectors (1) function is described. The motion_vectors (0) function is a function for describing the data elements related to the first motion vector, and the motion_vectors (1) function is a function for describing the data elements related to the second motion vector. It is.

motion_vectors(s)関数は、図40に示されるように、動きベクトルに関するデータエレメントを記述するための関数である。   The motion_vectors (s) function is a function for describing data elements relating to motion vectors, as shown in FIG.

もし、動きベクトルが1個でディアルプライム予測モードを使用していない場合には、motion_vertical_field_select[0][s]とmotion_vector(0,s)によって定義されるデータエレメントが記述される。   If there is one motion vector and the dial prime prediction mode is not used, a data element defined by motion_vertical_field_select [0] [s] and motion_vector (0, s) is described.

このmotion_vertical_field_select[r][s]は、第1番目の動きベクトル(前方又は後方のどちらのベクトルであっても良い)が、ボトムフィールドを参照して作られたベクトルであるか、トップフィールドを参照して作られたベクトルであるかを示すフラグである。この指標“r”は、第1番めのベクトル又は第2番めのベクトルのいずれのベクトルであるかを示す指標であって、“s”は、予測方向が前方又は後方予測のいずれであるかを示す指標である。   In this motion_vertical_field_select [r] [s], the first motion vector (which may be either forward or backward vector) is a vector created by referring to the bottom field, or refers to the top field It is a flag indicating whether the vector is created as a result. The index “r” is an index indicating whether the vector is the first vector or the second vector, and “s” is the prediction direction of forward or backward prediction. It is an indicator that shows.

motion_vector(r,s)関数は、図41に示されるように、motion_code[r][s][t]に関するデータ列と、motion_residual[r][s][t]に関するデータ列と、dmvector[t]を表わすデータとを記述するための関数である。   As shown in FIG. 41, the motion_vector (r, s) function includes a data string related to motion_code [r] [s] [t], a data string related to motion_residual [r] [s] [t], and dmvector [t ] Is a function for describing the data representing [].

motion_code[r][s][t]は、動きベクトルの大きさを−16〜+16の範囲で表わす可変長のデータである。 motion_residual[r][s][t]は、動きベクトルの残差を表わす可変長のデータである。よって、このmotion_code[r][s][t]と motion_residual[r][s][t]との値によって詳細な動きベクトルを記述することができる。 dmvector[t]は、ディアルプライム予測モードのときに、一方のフィールド(例えばボトムフィールドに対してトップフィールドを一方のフィールドとする)における動きベクトルを生成するために、時間距離に応じて既存の動きベクトルがスケールされるとともに、トップフィールドとボトムフィールドとのライン間の垂直方向のずれを反映させるために垂直方向に対して補正を行うデータである。この指標“r”は、第1番めのベクトル又は第2番めのベクトルのいずれのベクトルであるかを示す指標であって、“s”は、予測方向が前方又は後方予測のいずれであるかを示す指標である。“s”は、動きベクトルが垂直方向の成分であるか水平方向の成分であるかを示すデータである。   motion_code [r] [s] [t] is variable-length data representing the magnitude of the motion vector in the range of −16 to +16. motion_residual [r] [s] [t] is variable-length data representing the residual of the motion vector. Therefore, a detailed motion vector can be described by the values of motion_code [r] [s] [t] and motion_residual [r] [s] [t]. dmvector [t] is an existing motion depending on the time distance to generate a motion vector in one field (for example, the top field is one field with respect to the bottom field) in the dial prime prediction mode. This is data for correcting the vertical direction in order to reflect the vertical shift between the lines of the top field and the bottom field as the vector is scaled. The index “r” is an index indicating whether the vector is the first vector or the second vector, and “s” is the prediction direction of forward or backward prediction. It is an indicator that shows. “S” is data indicating whether the motion vector is a vertical component or a horizontal component.

図41に示されるmotion_vector(r,s)関数によって、まず、水平方向のmotion_coder[r][s][0]を表わすデータ列が、履歴ストリームとして記述される。motion_residual[0][s][t]およびmotion_residual[1][s][t]の双方のビット数は、f_code[s][t]で示されるので、 f_code[s][t]が1ではない場合には、 motion_residual[r][s][t] がビットストリーム中に存在することを示すことになる。水平方向成分のmotion_residual[r][s][0]が「1」ではなくて、水平方向成分のmotion_code[r][s][0]が「0」ではないということは、ビットストリーム中にmotion_residual[r][s][0]を表わすデータエレメントが存在し、動きベクトルの水平方向成分が存在するということを意味しているので、その場合には、水平方向成分のmotion_residual[r][s][0]を表わすデータエレメントが記述されている。   With the motion_vector (r, s) function shown in FIG. 41, first, a data string representing horizontal motion_coder [r] [s] [0] is described as a history stream. The number of bits of both motion_residual [0] [s] [t] and motion_residual [1] [s] [t] is indicated by f_code [s] [t], so f_code [s] [t] is 1 If not, it indicates that motion_residual [r] [s] [t] is present in the bitstream. The motion_residual [r] [s] [0] of the horizontal component is not “1” and the motion_code [r] [s] [0] of the horizontal component is not “0”. This means that there is a data element representing motion_residual [r] [s] [0] and there is a horizontal component of the motion vector. In this case, motion_residual [r] [ A data element representing s] [0] is described.

続いて、垂直方向のmotion_coder[r][s][1]を表わすデータ列が、履歴ストリームとして記述される。同じようにmotion_residual[0][s][t]およびmotion_residual[1][s][t]の双方のビット数は、f_code[s][t]で示されるので、 f_code[s][t]が1ではない場合には、 motion_residual[r][s][t] がビットストリーム中に存在することを表わすことになる。motion_residual[r][s][1]が「1」でなくて、motion_code[r][s][1]が「0」ではないということは、ビットストリーム中にmotion_residual[r][s][1]を表わすデータエレメントが存在し、動きベクトルの垂直方向成分が存在するということを意味しているので、その場合には、垂直方向成分のmotion_residual[r][s][1]を表わすデータエレメントが記述されている。   Subsequently, a data string representing vertical motion_coder [r] [s] [1] is described as a history stream. Similarly, the number of bits of both motion_residual [0] [s] [t] and motion_residual [1] [s] [t] is indicated by f_code [s] [t], so f_code [s] [t] Is not 1, it indicates that motion_residual [r] [s] [t] is present in the bitstream. motion_residual [r] [s] [1] is not “1” and motion_code [r] [s] [1] is not “0”. This means that motion_residual [r] [s] [1] [ This means that there is a data element representing 1] and that there is a vertical component of the motion vector. In this case, data representing motion_residual [r] [s] [1] of the vertical component The element is described.

次に、図42乃至図44を参照して、macroblock_typeについて説明する。macroblock_typeは、macroblock_quant、dct_type_flag、macroblock_motion_forward、およびmacroblock_motion_backwardなどのフラグから生成された可変長データである。 macroblock_quantは、マクロブロックに対して量子化ステップサイズを設定するためのmacroblock_quantiser_scale_codeが設定されているか否かを示すフラグあって、ビットストリーム中にmacroblock_quantiser_scale_codeが存在する場合には、 macroblock_quantは「1」の値を取る。   Next, macroblock_type will be described with reference to FIGS. The macroblock_type is variable length data generated from flags such as macroblock_quant, dct_type_flag, macroblock_motion_forward, and macroblock_motion_backward. macroblock_quant is a flag indicating whether or not macroblock_quantiser_scale_code for setting the quantization step size for the macroblock is set. When macroblock_quantiser_scale_code exists in the bitstream, macroblock_quant is a value of “1”. I take the.

dct_type_flagは、参照マクロブロックがフレームDCT又はフィールドDCTで符号化されているかを示すdct_typeが存在するか否かを示すためのフラグ(言い換えるとDCTされているか否かを示すフラグ)であって、ビットストリーム中にdct_typeが存在する場合には、このdct_type_flagは「1」の値を取る。 macroblock_motion_forwardは、参照マクロブロックが前方予測されているか否かを示すフラグであって、前方予測されている場合には「1」の値を取る。macroblock_motion_backwardは、参照マクロブロックが後方予測されているか否かを示すフラグであって、後方予測されている場合には「1」の値を取る。   dct_type_flag is a flag for indicating whether or not dct_type indicating whether the reference macroblock is encoded by the frame DCT or the field DCT exists (in other words, a flag indicating whether or not the DCT is DCT), and is a bit. When dct_type exists in the stream, this dct_type_flag takes a value of “1”. The macroblock_motion_forward is a flag indicating whether or not the reference macroblock is predicted forward, and takes a value of “1” when the reference macroblock is predicted forward. macroblock_motion_backward is a flag indicating whether or not the reference macroblock is predicted backward, and takes a value of “1” when backward prediction is performed.

なお、可変長フォーマットにおいては、伝送するビットレートを減少させるために、履歴情報を削減することができる。   In the variable length format, history information can be reduced in order to reduce the transmission bit rate.

すなわち、macroblock_typeとmotion_vectors()は転送するが、quantiser_scale_codeを転送しない場合には、slice_quantiser_scale_codeを”00000”とすることで、ビットレートを減少させることができる。   That is, when macroblock_type and motion_vectors () are transferred but quantizer_scale_code is not transferred, the bit rate can be reduced by setting slice_quantiser_scale_code to “00000”.

また、macroblock_typeのみ転送し、motion_vectors()、quantiser_scale_code、およびdct_typeを転送しない場合には、macroblock_typeとして、”not coded”を使用することで、ビットレートを減少することができる。   Further, when only macroblock_type is transferred and motion_vectors (), quantizer_scale_code, and dct_type are not transferred, the bit rate can be reduced by using “not coded” as macroblock_type.

更に、また、picture_coding_typeのみ転送し、slice()以下の情報は全て転送しない場合には、slice_start_codeを持たないpicture_data()を使用することで、ビットレートを減少させることができる。   Furthermore, when only picture_coding_type is transferred and all information below slice () is not transferred, the bit rate can be reduced by using picture_data () without slice_start_code.

以上においては、user_data内の23ビットの連続する”0”が出ないようにする場合に、22ビット毎に”1”を挿入するようにしたが、22ビット毎でなくてもよい。また、連続する”0”の個数を数えて”1”を挿入するのではなく、Byte_allignを調べて挿入するようにすることも可能である。   In the above, “1” is inserted every 22 bits in order to prevent the continuous “0” of 23 bits in user_data from being output. However, it may not be every 22 bits. Further, instead of counting the number of consecutive “0” s and inserting “1”, it is possible to check and insert Byte_allign.

更に、MPEGにおいては、23ビットの連続する”0”の発生を禁止しているが、実際には、バイトの先頭から23ビット連続する場合だけが問題とされ、バイトの先頭ではなく、途中から0が23ビット連続する場合は、問題とされない。従って、例えば24ビット毎に、LSB以外の位置に”1”を挿入するようにしてもよい。   Furthermore, in MPEG, the generation of 23 bits of continuous “0” is prohibited, but in practice, only the case where 23 bits are continued from the beginning of the byte is a problem. If 0 continues for 23 bits, this is not a problem. Therefore, for example, “1” may be inserted at a position other than the LSB every 24 bits.

また、以上においては、履歴情報を、video elementary streamに近い形式にしたが、packetized elementary streamやtransport streamに近い形式にしてもよい。また、Elementary Streamのuser_dataの場所を、picture_dataの前としたが、他の場所にすることもできる。   In the above description, the history information is in a format close to a video elementary stream, but may be in a format close to a packetized elementary stream or a transport stream. In addition, although the location of user_data in Elementary Stream is in front of picture_data, it can be other locations.

図4のトランスコーディングシステムにおいては、4世代分の符号化パラメータを履歴情報として後段に出力するようにしたが、実際には、履歴情報の全てが必要となるわけではなく、アプリケーション毎に必要な履歴情報は異なってくる。また、実際の伝送路あるいは記録媒体(伝送メディア)には、容量に制限があり、圧縮しているとはいえ、全ての履歴情報を伝送するようにすると、容量的に負担となり、結果的に画像ビットストリームのビットレートを抑圧してしまい、履歴情報伝送の有効性が損なわれることになる。   In the transcoding system of FIG. 4, encoding parameters for four generations are output to the subsequent stage as history information. However, not all of the history information is actually required, and it is necessary for each application. History information will be different. In addition, the actual transmission path or recording medium (transmission medium) has a limited capacity, and although it is compressed, if all history information is transmitted, it will be a burden on capacity, and as a result The bit rate of the image bit stream is suppressed, and the effectiveness of history information transmission is impaired.

そこで、履歴情報として伝送する項目の組み合わせを記述する記述子を履歴情報に組み込んで後段に送信するようにし、全ての履歴情報を伝送するのではなく、さまざまなアプリケーションに対応した情報を伝送するようにすることができる。図45は、このような場合のトランスコーディングシステムの構成例を表している。   Therefore, a descriptor describing a combination of items to be transmitted as history information is incorporated into the history information and transmitted to the subsequent stage so that information corresponding to various applications is transmitted instead of transmitting all history information. Can be. FIG. 45 shows a configuration example of the transcoding system in such a case.

図45において、図4における場合と対応する部分には同一の符号を付してあり、その説明は適宜省略する。図45の構成例においては、ヒストリ情報分離装置64と符号化装置66の間、およびヒストリエンコーディング装置65と符号化装置66の間に、符号化パラメータ選択回路151が挿入されている。   In FIG. 45, portions corresponding to those in FIG. 4 are denoted by the same reference numerals, and description thereof will be omitted as appropriate. In the configuration example of FIG. 45, an encoding parameter selection circuit 151 is inserted between the history information separation device 64 and the encoding device 66 and between the history encoding device 65 and the encoding device 66.

符号化パラメータ選択回路151は、ヒストリ情報分離装置64が出力するベースバンドビデオ信号から符号化パラメータを算出する符号化パラメータ算出部162、ヒストリ情報分離装置64が出力する、このビデオエンコーディングシステム141において符号化するのに最適と判定された符号化パラメータ(例えば、第2世代の符号化パラメータ)に関する情報から、符号化パラメータと記述子(red_bw_flag,red_bw_indicator)(図49を参照して後述する)を分離する組み合わせ記述子分離部161、並びに符号化パラメータ算出部162が出力する符号化パラメータと、組み合わせ記述子分離部161が出力する符号化パラメータのうち、いずれか一方を、組み合わせ記述子分離部161で分離された記述子に対応して選択し、符号化装置66に出力するスイッチ163を有している。その他の構成は、図4における場合と同様である。   The encoding parameter selection circuit 151 includes an encoding parameter calculation unit 162 that calculates an encoding parameter from the baseband video signal output from the history information separation device 64, and an encoding code in the video encoding system 141 output from the history information separation device 64. Coding parameters and descriptors (red_bw_flag, red_bw_indicator) (described later with reference to FIG. 49) are separated from information on coding parameters determined to be optimal (for example, second generation coding parameters) The combination descriptor separation unit 161 selects one of the encoding parameter output from the combination descriptor separation unit 161 and the encoding parameter calculation unit 162 and the encoding parameter output from the combination descriptor separation unit 161. Select and encode according to the separated descriptor A switch 163 to be output to 66. Other configurations are the same as those in FIG.

ここで、履歴情報として伝送する項目の組み合わせについて説明する。履歴情報は、分類すると、picture単位の情報と、macroblock単位の情報に分けることができる。slice単位の情報は、それに含まれるmacroblockの情報を収集することで得ることができ、GOP単位の情報は、それに含まれるpicture単位の情報を収集することで得ることができる。   Here, combinations of items to be transmitted as history information will be described. The history information can be divided into information in picture units and information in macroblock units. Information in units of slices can be obtained by collecting information on macroblocks included therein, and information in units of GOPs can be obtained by collecting information in units of pictures included therein.

picture単位の情報(すなわち、図7のV Blanking領域に記述される情報)は、1フレーム毎に1回伝送されるだけなので、情報伝送に占めるビットレートは、それほど大きくはない。これに対して、macroblock単位の情報(すなわち、図7のH Blanking領域に記述される情報)は、各macroblock毎に伝送されるため、例えば1フレームの走査線数が525本で、フィールドレートが60フィールド/秒のビデオシステムの場合、1フレームの画素数を720×480とすると、macroblock単位の情報は、1フレームあたり1350(=(720/16)×(480/16))回伝送することが必要となる。このため、履歴情報の相当の部分がmacroblock毎の情報で占められることになる。そこで、履歴情報としては、少なくともpicture単位の情報は常に伝送するが、macroblock単位の情報は、アプリケーションに応じて選択して伝送するようにすることで、伝送する情報量を抑制することができる。   Since information in picture units (that is, information described in the V Blanking area in FIG. 7) is transmitted only once per frame, the bit rate occupied in information transmission is not so large. On the other hand, since information in macroblock units (that is, information described in the H Blanking area in FIG. 7) is transmitted for each macroblock, for example, the number of scanning lines in one frame is 525, and the field rate is In the case of a video system of 60 fields / second, if the number of pixels in one frame is 720 × 480, information in macroblock units is transmitted 1350 (= (720/16) × (480/16)) times per frame. Is required. For this reason, a considerable part of the history information is occupied by information for each macroblock. Therefore, as history information, at least information in units of pictures is always transmitted, but information in units of macroblocks can be selected and transmitted according to the application, thereby suppressing the amount of information to be transmitted.

履歴情報として転送されるmacroblock単位の情報には、例えばnum_coef_bits,num_mv_bits,num_other_bits,q_scale_code,q_scale_type,motion_type,mv_vert_field_sel[][],mv[][][],mb_mfwd,mb_mbwd,mb_pattern,coded_block_pattern,mb_intra,slice_start,dct_type,mb_quant,skipped_mbなどがある。これらは、macroblock rate informationの要素を用いて表現されたものである。   The macroblock unit information transferred as history information includes, for example, num_coef_bits, num_mv_bits, num_other_bits, q_scale_code, q_scale_type, motion_type, mv_vert_field_sel [] [], mv [] [] [], mb_mfwd, mb_mbwd, mb_pattern, _coded_block_pattern, There are slice_start, dct_type, mb_quant, skipped_mb, etc. These are expressed using the element of macroblock rate information.

num_coef_bitsは、macroblockの符号量のうち、DCT係数に要した符号量を表す。num_mv_bitsは、macroblockの符号量のうち、動きベクトルに要した符号量を表す。num_other_bitsは、macroblockの符号量のうち、num_coef_bitsおよびnum_mv_bits以外の符号量を表す。   num_coef_bits represents the code amount required for the DCT coefficient among the code amounts of the macroblock. num_mv_bits represents the code amount required for the motion vector among the code amounts of the macroblock. num_other_bits represents a code amount other than num_coef_bits and num_mv_bits among the code amounts of the macroblock.

q_scale_codeは、macroblockに適用されたq_scale_codeを表す。motion_typeは、macroblockに適用された動きベクトルのtypeを表す。mv_vert_field_sel[][]は、macroblockに適用された動きベクトルのfield selectを表す。   q_scale_code represents q_scale_code applied to the macroblock. motion_type represents the type of motion vector applied to the macroblock. mv_vert_field_sel [] [] represents a field select of a motion vector applied to a macroblock.

mv[][][]は、macroblockに適用された動きベクトルを表す。mb_mfwdは、macroblockの予測モードが前方向予測であることを示すフラグである。mb_mbwdは、macroblockの予測モードが後方向予測であることを示すフラグである。mb_patternは、macroblockのDCT係数の非0のものの有無を示すフラグである。   mv [] [] [] represents a motion vector applied to a macroblock. mb_mfwd is a flag indicating that the prediction mode of the macroblock is forward prediction. mb_mbwd is a flag indicating that the prediction mode of the macroblock is backward prediction. The mb_pattern is a flag indicating whether or not there is a non-zero DCT coefficient of the macroblock.

coded_block_patternは、macroblockのDCT係数の非0のものの有無をDCTブロック毎に示すフラグである。mb_intraは、macroblockがintra_macroかそうでないかを示すフラグである。slice_startは、macroblockがsliceの先頭であるか否かを示すフラグである。dct_typeは、macroblockがfield_dctかflame_dctかを示すフラグである。   The coded_block_pattern is a flag indicating the presence or absence of non-zero macroblock DCT coefficients for each DCT block. mb_intra is a flag indicating whether the macroblock is intra_macro or not. slice_start is a flag indicating whether or not the macroblock is the head of the slice. dct_type is a flag indicating whether the macroblock is field_dct or flame_dct.

mb_quantは、macroblockがquantiser_scale_codeを伝送するか否かを示すフラグである。skipped_mbは、macroblockがskipped macroblockであるか否かを示すフラグである。   mb_quant is a flag indicating whether or not the macroblock transmits quantizer_scale_code. skipped_mb is a flag indicating whether or not the macroblock is a skipped macroblock.

これらの項目は、常に全て必要であるわけではなく、アプリケーションに応じて必要となる項目が変化する。例えば、num_coef_bitsやslice_startといった項目は、再エンコードした際のビットストリームをできる限り元の形に戻したいというtransparentという要求を有するアプリケーションにおいて必要となる。換言すれば、ビットレートを変更するようなアプリケーションにおいては、これらの項目は必要ではない。また、非常に伝送路の制限が厳しい場合には、各ピクチャの符号化タイプが判るだけでもよいようなアプリケーションも存在する。このような状況から、履歴情報を伝送する項目の組み合わせの例として、例えば図46に示すような組み合わせが考えられる。   All of these items are not always necessary, and the necessary items vary depending on the application. For example, items such as num_coef_bits and slice_start are necessary in an application having a request for transparent to restore the bitstream at the time of re-encoding as much as possible. In other words, these items are not necessary in an application that changes the bit rate. In addition, there are applications in which it is only necessary to know the coding type of each picture when the transmission path is extremely limited. From such a situation, for example, a combination shown in FIG. 46 can be considered as an example of a combination of items for transmitting history information.

図46において、各組み合わせの中の項目に対応する値「2」は、その情報が存在し、利用可能であることを意味し、「0」は、その情報が存在しないことを意味する。「1」は、他の情報の存在を補助する目的のため、あるいは、構文上存在するが、元のビットストリーム情報とは関係がないなど、その情報自身には意味がないことを表している。例えば、slice_startは、履歴情報を伝送する際のsliceの先頭のmacroblockにおいて、「1」になるが、本来のビットストリームに対して、sliceが必ずしも同一位置関係にあるわけではない場合には、履歴情報としては無意味になる。   In FIG. 46, the value “2” corresponding to the item in each combination means that the information exists and can be used, and “0” means that the information does not exist. “1” indicates that the information itself has no meaning, for example, for the purpose of assisting the existence of other information, or syntactically, but not related to the original bitstream information. . For example, slice_start is “1” in the first macroblock of the slice when transmitting history information, but if the slice is not necessarily in the same positional relationship with the original bitstream, It becomes meaningless as information.

図46の例においては、(num_coef_bits,num_mv_bits,num_other_bits),(q_scale_code,q_scale_type),(motion_type,mv_vert_field_sel[][],mv[][][]),(mb_mfwd,mb_mbwd),(mb_pattern),(coded_block_pattern),(mb_intra),(slice_start),(dct_type),(mb_quant),(skipped_mb)の各項目の有無により、組み合わせ1乃至組み合わせ5の5つの組み合わせが用意されている。   In the example of FIG. 46, (num_coef_bits, num_mv_bits, num_other_bits), (q_scale_code, q_scale_type), (motion_type, mv_vert_field_sel [] [], mv [] [] []), (mb_mfwd, mb_mbwd), (mb_pattern), (mb_pattern), Depending on the presence or absence of each item of coded_block_pattern), (mb_intra), (slice_start), (dct_type), (mb_quant), and (skipped_mb), five combinations of combinations 1 to 5 are prepared.

組み合わせ1は、完全にtransparentなビットストリームを再構成することを目的とした組み合わせである。この組み合わせによれば、発生符号量情報を用いることによる精度の高いトランスコーディングが実現できる。組み合わせ2も、完全にtransparentなビットストリームを再構成することを目的とした組み合わせである。組み合わせ3は、完全にtransparentなビットストリームを再構成することはできないが、視覚的にほぼtransparentなビットストリームを再構成できるようにするための組み合わせである。組み合わせ4は、transparentという観点からは組み合わせ3よりも劣るが、視覚上問題がないビットストリームの再構成ができる組み合わせである。組み合わせ5は、transparentという観点からは組み合わせ4よりも劣るが、少ない履歴情報でビットストリームの完全ではない再構成ができる組み合わせである。   Combination 1 is a combination intended to reconstruct a completely transparent bit stream. According to this combination, highly accurate transcoding can be realized by using the generated code amount information. Combination 2 is also a combination intended to reconstruct a completely transparent bit stream. The combination 3 is a combination for allowing a completely transparent bit stream to be visually reconstructed although a completely transparent bit stream cannot be reconstructed. Combination 4 is inferior to combination 3 from the viewpoint of transparent, but is a combination that can reconstruct a bitstream with no visual problem. The combination 5 is inferior to the combination 4 from the viewpoint of transparent, but is a combination capable of incomplete reconstruction of the bitstream with a small amount of history information.

これらの組み合わせのうち、組み合わせの番号の数字が小さいものほど、機能的には上位であるが、履歴を転送するのに必要となる容量が多くなる。従って、想定するアプリケーションと履歴に使用できる容量を考慮することによって、伝送する組み合わせを決定する必要がある。   Of these combinations, the smaller the combination number, the higher the function, but the larger the capacity required to transfer the history. Therefore, it is necessary to determine the combination to be transmitted by considering the assumed application and the capacity available for the history.

次に、図47のフローチャートを参照して、図45のトランスコーディングシステムの動作について説明する。   Next, the operation of the transcoding system of FIG. 45 will be described with reference to the flowchart of FIG.

ステップS1において、ビデオデコーディングシステム51の復号装置61は、入力されたビットストリームを復号し、そのビットストリームを符号化する際に使用された符号化パラメータ(第4世代)を抽出し、その符号化パラメータ(第4世代)をヒストリ情報多重化装置63に出力するとともに、復号したビデオデータを、やはりヒストリ情報多重化装置63に出力する。ステップS2において、復号装置61は、入力されたビットストリームからuser_dataを抽出し、ヒストリデコーディング装置62に出力する。ステップS3において、ヒストリデコーディング装置62は入力されたuser_dataから、組み合わせ情報(記述子)を抽出し、更にそれを用いて、履歴情報としての符号化パラメータ(第2世代乃至第3世代)を抽出し、ヒストリ情報多重化装置63に出力する。   In step S1, the decoding device 61 of the video decoding system 51 decodes the input bit stream, extracts the encoding parameter (fourth generation) used when encoding the bit stream, and extracts the code And the decoded video data are also output to the history information multiplexer 63. In step S <b> 2, the decoding device 61 extracts user_data from the input bitstream and outputs the user_data to the history decoding device 62. In step S3, the history decoding device 62 extracts combination information (descriptor) from the input user_data, and further uses it to extract encoding parameters (second generation to third generation) as history information. To the history information multiplexer 63.

ステップS4において、ヒストリ情報多重化装置63は、ステップS1で取り出された復号装置51から供給される現在の符号化パラメータ(第4世代)と、ステップS3でヒストリデコーディング装置62が出力した過去の符号化パラメータ(第2世代乃至第3世代)とを、復号装置61から供給されるベースバンドのビデオデータに、図7および図11に示すようなフォーマットに従って多重化し、ヒストリ情報分離装置64に出力する。   In step S4, the history information multiplexing device 63 uses the current encoding parameter (fourth generation) supplied from the decoding device 51 extracted in step S1 and the past output from the history decoding device 62 in step S3. The encoding parameters (second generation to third generation) are multiplexed with the baseband video data supplied from the decoding device 61 according to the format shown in FIGS. 7 and 11, and output to the history information separation device 64. To do.

ヒストリ情報分離装置64は、ステップS5において、ヒストリ情報多重化装置63より供給されたベースバンドのビデオデータから、符号化パラメータを抽出し、その中から今回の符号化に最も適している符号化パラメータ(例えば、第2世代の符号化パラメータ)を選択し、記述子とともに、組み合わせ記述子分離部161に出力する。また、ヒストリ情報分離装置64は、今回の符号化に最適と判定された符号化パラメータ以外の符号化パラメータ(例えば、最適な符号化パラメータが第2世代の符号化パラメータであると判定された場合には、それ以外の第1世代、第3世代、および第4世代の符号化パラメータ)をヒストリエンコーディング装置65に出力する。   In step S5, the history information separating device 64 extracts coding parameters from the baseband video data supplied from the history information multiplexing device 63, and among them, the coding parameters most suitable for the current coding are extracted. (For example, the second generation encoding parameter) is selected and output to the combination descriptor separating unit 161 together with the descriptor. In addition, the history information separation device 64 determines an encoding parameter other than the encoding parameter determined to be optimal for the current encoding (for example, when the optimal encoding parameter is determined to be the second generation encoding parameter). Are output to the history encoding device 65 (the other first generation, third generation, and fourth generation encoding parameters).

ステップS6において、ヒストリエンコーディング装置65は、ヒストリ情報分離装置54より入力された符号化パラメータをuser_dataに記述し、そのuser_data(converted_history_stream())を符号化装置66に出力する。   In step S <b> 6, the history encoding device 65 describes the encoding parameters input from the history information separation device 54 in user_data, and outputs the user_data (converted_history_stream ()) to the encoding device 66.

ステップS7において、組み合わせ記述子分離部161は、ヒストリ情報分離装置64より供給されたデータから、符号化パラメータと記述子を分離し、符号化パラメータ(第2世代)を、スイッチ163の一方の接点に供給する。スイッチ163の他方の接点には、符号化パラメータ算出部162が、ヒストリ情報分離装置64が出力するベースバンドのビデオデータから、符号化パラメータを算出し、供給している。   In step S 7, the combination descriptor separation unit 161 separates the encoding parameter and the descriptor from the data supplied from the history information separation device 64, and sets the encoding parameter (second generation) as one contact point of the switch 163. To supply. The encoding parameter calculation unit 162 calculates and supplies encoding parameters from the baseband video data output by the history information separation device 64 to the other contact of the switch 163.

ステップS8において、スイッチ163は、組み合わせ記述子分離部161が出力した記述子に対応して、組み合わせ記述子分離部161が出力した符号化パラメータ、または符号化パラメータ算出部162が出力した符号化パラメータのいずれかを選択し、符号化装置66に出力する。すなわち、スイッチ163では、組み合わせ記述子分離部161から供給された符号化パラメータが有効である場合には、組み合わせ記述子分離部161が出力する符号化パラメータが選択されるが、組み合わせ記述子分離部161が出力する符号化パラメータが無効である場合には、符号化パラメータ算出部162がベースバンドビデオを処理することで算出した符号化パラメータが選択される。この選択は、伝送メディアの容量に対応して行われる。   In step S8, the switch 163 corresponds to the descriptor output from the combination descriptor separation unit 161, or the encoding parameter output from the combination descriptor separation unit 161 or the encoding parameter output from the coding parameter calculation unit 162. Is selected and output to the encoding device 66. That is, in the switch 163, when the encoding parameter supplied from the combination descriptor separation unit 161 is valid, the encoding parameter output from the combination descriptor separation unit 161 is selected. When the encoding parameter output from 161 is invalid, the encoding parameter calculated by the encoding parameter calculation unit 162 processing the baseband video is selected. This selection is performed according to the capacity of the transmission medium.

ステップS9において、符号化装置66は、スイッチ163から供給された符号化パラメータに基づいて、ヒストリ情報分離装置105より供給されたベースバンドビデオ信号を符号化する。   In step S <b> 9, the encoding device 66 encodes the baseband video signal supplied from the history information separation device 105 based on the encoding parameter supplied from the switch 163.

ステップS10において、符号化装置66は、符号化したビットストリームに、ヒストリエンコーディング装置65より供給されたuser_dataを多重化し、出力して、処理が終了される。   In step S10, the encoding device 66 multiplexes and outputs the user_data supplied from the history encoding device 65 to the encoded bit stream, and the process ends.

このようにして、各履歴によって得られる符号化パラメータの組み合わせが異なっているような場合でも、支障なくトランスコーディングすることが可能となる。   In this way, even when the combination of encoding parameters obtained by each history is different, transcoding can be performed without any trouble.

このように、履歴情報は、図15に示したように、ビデオストリームのuser_data()関数の一種としてのhistory_stream()(より正確には、converted_history_stream())で伝送される。そのhistory_stream()のシンタックスは、図24に示した通りである。履歴情報の項目の組み合わせを表す記述子(red_bw_flag,red_bw_indicator)、およびMPEGのストリームではサポートされていない項目(num_other_bits,num_mv_bits,num_coef_bits)は、この図24の中のre_coding_stream_info()関数により伝送される。   As described above, the history information is transmitted by history_stream () (more precisely, converted_history_stream ()) as a kind of user_data () function of the video stream, as shown in FIG. The syntax of the history_stream () is as shown in FIG. A descriptor (red_bw_flag, red_bw_indicator) representing a combination of items of history information and items (num_other_bits, num_mv_bits, num_coef_bits) not supported in the MPEG stream are transmitted by the re_coding_stream_info () function in FIG.

re_coding_stream_info()関数は、図48に示すように、user_data_start_code,re_coding_stream_info_ID,red_bw_flag,red_bw_indicator,marker_bit,num_other_bits,num_mv_bits,num_coef_bitsなどのデータエレメントより構成される。   As shown in FIG. 48, the re_coding_stream_info () function includes data elements such as user_data_start_code, re_coding_stream_info_ID, red_bw_flag, red_bw_indicator, marker_bit, num_other_bits, num_mv_bits, and num_coef_bits.

user_data_start_codeは、user_dataが開始することを表すスタートコードである。re_coding_stream_info_IDは、16ビットの整数であり、re_coding_stream_info()関数の識別のために用いられる。その値は、具体的には、”1001 0001 1110 1100”(0x91ec)とされる。   user_data_start_code is a start code indicating that user_data starts. The re_coding_stream_info_ID is a 16-bit integer and is used for identifying the re_coding_stream_info () function. Specifically, the value is “1001 0001 1110 1100” (0x91ec).

red_bw_flagは、1ビットのフラグであり、履歴情報が全ての項目を伝送する場合には0とされ、このフラグの値が1である場合、このフラグに続くred_bw_indicatorを調べることにより、図46に示した5個の組み合わせのうち、どの組み合わせで項目が送られているのかを決定することができる。   The red_bw_flag is a 1-bit flag, and is set to 0 when the history information transmits all items. When the value of this flag is 1, the red_bw_indicator following this flag is checked, as shown in FIG. Of the five combinations, it is possible to determine which combination is sending the item.

red_bw_indicatorは、2ビットの整数であり、項目の組み合わせを図49に示すように記述する。   red_bw_indicator is a 2-bit integer and describes a combination of items as shown in FIG.

即ち、図46に示した5つの組み合わせのうち、組み合わせ1の場合、red_bw_flagは0とされ、組み合わせ2乃至組み合わせ5のとき、red_bw_flagは1とされる。これに対して、red_bw_indicatorは、組み合わせ2の場合0とされ、組み合わせ3の場合1とされ、組み合わせ4の場合2とされ、組み合わせ5の場合3とされる。   That is, among the five combinations shown in FIG. 46, red_bw_flag is 0 in the case of combination 1, and red_bw_flag is 1 in the case of combinations 2 to 5. On the other hand, red_bw_indicator is 0 for combination 2, 1 for combination 3, 2 for combination 4, and 3 for combination 5.

従って、red_bw_indicatorは、red_bw_flagが1の場合に(組み合わせ2乃至組み合わせ5の場合に)規定される。   Therefore, red_bw_indicator is defined when red_bw_flag is 1 (in the case of combination 2 to combination 5).

更に、図49の組み合わせ1の場合(red_bw_flagが0である場合)、マクロブロック毎に、marker_bit,num_other_bits,num_mv_bits,num_coef_bitsが記述される。これら4つのデータエレメントは、組み合わせ2乃至組み合わせ5の場合(red_bw_flagが1の場合)規定されない。   Further, in the case of the combination 1 in FIG. 49 (when red_bw_flag is 0), marker_bit, num_other_bits, num_mv_bits, and num_coef_bits are described for each macroblock. These four data elements are not defined for combinations 2 to 5 (when red_bw_flag is 1).

図36に示したように、picture_data()関数は、1個以上のslice()関数から構成される。しかしながら、組み合わせ5の場合、picture_data()関数を含めて、それ以下のシンタックス要素は伝送されない。この場合、履歴情報は、picture_typeなどのpicture単位の情報の伝送を意図したものとなる。   As shown in FIG. 36, the picture_data () function is composed of one or more slice () functions. However, in the case of the combination 5, the syntax elements below it including the picture_data () function are not transmitted. In this case, the history information is intended to transmit information in units of picture such as picture_type.

組み合わせ1乃至組み合わせ4の場合、図37に示したslice()関数が存在する。しかしながら、このslice()関数によって決定されるsliceの位置情報と、元のビットストリームのsliceの位置情報は、履歴情報の項目の組み合わせに依存する。組み合わせ1または組み合わせ2の場合、履歴情報の元となったビットストリームのsliceの位置情報と、slice()関数によって決定されるsliceの位置情報とは、同一である必要がある。   In the case of the combination 1 to the combination 4, the slice () function shown in FIG. 37 exists. However, the position information of the slice determined by the slice () function and the position information of the slice of the original bitstream depend on the combination of items of history information. In the case of the combination 1 or the combination 2, the position information of the slice of the bit stream that is the source of the history information and the position information of the slice determined by the slice () function need to be the same.

図38に示すmacroblock()関数のシンタックス要素は、履歴情報の項目の組み合わせに依存する。macroblock_escape,macroblock_address_increment,macroblock_modes()関数は、常に存在する。しかしながら、macroblock_escapeとmacroblock_address_incrementの情報としての有効性は、組み合わせによって決定される。履歴情報の項目の組み合わせが、組み合わせ1または組み合わせ2の場合、元のビットストリームのskipped_mb情報と同じものが伝送される必要がある。   The syntax element of the macroblock () function shown in FIG. 38 depends on the combination of history information items. The macroblock_escape, macroblock_address_increment, and macroblock_modes () functions are always present. However, the effectiveness of macroblock_escape and macroblock_address_increment as information is determined by the combination. When the combination of history information items is combination 1 or combination 2, the same information as the skipped_mb information of the original bitstream needs to be transmitted.

組み合わせ4の場合、motion_vectors()関数は存在しない。組み合わせ1乃至組み合わせ3の場合、macroblock_modes()関数のmacroblock_typeによって、motion_vectors()関数の存在が決定される。組み合わせ3または組み合わせ4の場合には、coded_block_pattern()関数は存在しない。組み合わせ1と組み合わせ2の場合、macroblock_modes()関数のmacroblock_typeによって、coded_block_pattern()関数の存在が決定される。   In the case of the combination 4, there is no motion_vectors () function. In the case of the combination 1 to the combination 3, the presence of the motion_vectors () function is determined by the macroblock_type of the macroblock_modes () function. In the case of combination 3 or combination 4, there is no coded_block_pattern () function. In the case of the combination 1 and the combination 2, the presence of the coded_block_pattern () function is determined by the macroblock_type of the macroblock_modes () function.

図39に示したmacroblock_modes()関数のシンタックス要素は、履歴情報の項目の組み合わせに依存する。macroblock_typeは、常に存在する。組み合わせが組み合わせ4である場合、flame_motion_type,field_motion_type,dct_typeは存在しない。   The syntax elements of the macroblock_modes () function shown in FIG. 39 depend on the combination of history information items. macroblock_type is always present. When the combination is combination 4, flame_motion_type, field_motion_type, and dct_type do not exist.

macroblock_typeより得られるパラメータの情報としての有効性は、履歴情報の項目の組み合わせによって決定される。   The effectiveness of the parameter obtained from macroblock_type as information is determined by a combination of items of history information.

履歴情報の項目の組み合わせが組み合わせ1または組み合わせ2である場合、macroblock_quantは、元のビットストリームと同じである必要がある。組み合わせ3または組み合わせ4の場合、macroblock_quantは、macroblock()関数内のquantiser_scale_codeの存在を表し、元のビットストリームと同じである必要はない。   When the combination of history information items is combination 1 or combination 2, macroblock_quant needs to be the same as the original bitstream. For combination 3 or combination 4, macroblock_quant represents the presence of quantizer_scale_code in the macroblock () function and need not be the same as the original bitstream.

組み合わせが組み合わせ1乃至組み合わせ3である場合、macroblock_motion_forwardとmacroblock_motion_backwardは、元のビットストリームと同一である必要がある。組み合わせが組み合わせ4または組み合わせ5である場合、その必要はない。   When the combination is combination 1 to combination 3, macroblock_motion_forward and macroblock_motion_backward need to be the same as the original bitstream. If the combination is combination 4 or combination 5, this is not necessary.

組み合わせが組み合わせ1または組み合わせ2である場合、macroblock_patternは、元のビットストリームと同一である必要がある。組み合わせ3の場合、macroblock_patternは、dct_typeの存在を示すのに用いられる。組み合わせが組み合わせ4である場合、組み合わせ1乃至組み合わせ3における場合のような関係は成立しない。   When the combination is combination 1 or combination 2, macroblock_pattern needs to be the same as the original bitstream. For combination 3, macroblock_pattern is used to indicate the presence of dct_type. When the combination is combination 4, the relationship as in combination 1 to combination 3 is not established.

履歴情報の項目の組み合わせが組み合わせ1乃至組み合わせ3の場合、macroblock_intraは、元のビットストリームと同一である必要がある。組み合わせ4の場合には、その限りでない。   When the combination of history information items is combination 1 to combination 3, macroblock_intra needs to be the same as the original bitstream. In the case of combination 4, this is not the case.

図24のhistory_stream()は、履歴情報を可変長とする場合のシンタックスであるが、図17乃至図23に示すように、固定長のシンタックスとする場合、固定長の履歴情報内に、伝送される項目中のどれが有効であるかを示す情報としての記述子(red_bw_flagとred_bw_indicator)をベースバンド画像に重畳し、伝送するようにする。その結果、この記述子を調べることにより、フィールドとして存在するが、その内容は無効であるといった判断をすることが可能となる。   The history_stream () in FIG. 24 has a syntax when the history information has a variable length. However, as shown in FIGS. 17 to 23, when the history information has a fixed length, Descriptors (red_bw_flag and red_bw_indicator) as information indicating which of the items to be transmitted are valid are superimposed on the baseband image and transmitted. As a result, by examining this descriptor, it is possible to determine that it exists as a field but its contents are invalid.

このため、図21に示すように、re_coding_stream_informationとして、user_data_start_code,re_coding_stream_info_ID,red_bw_flag,red_bw_indicator,marker_bitが配置されている。それぞれの意味は、図48における場合と同様である。   For this reason, as shown in FIG. 21, user_data_start_code, re_coding_stream_info_ID, red_bw_flag, red_bw_indicator, and marker_bit are arranged as re_coding_stream_information. Each meaning is the same as in FIG.

このように履歴として伝送する符号化パラメータの要素をアプリケーションに応じた組み合わせで伝送するようにすることで、アプリケーションに応じた履歴を適当なデータ量で伝送するようにすることができる。   Thus, by transmitting the elements of the encoding parameter transmitted as the history in a combination according to the application, it is possible to transmit the history according to the application with an appropriate amount of data.

以上のように、履歴情報を可変長符号として伝送する場合、re_coding_stream_info()関数は、図48に示すように構成され、図24に示すように、history_stream()関数の一部として伝送される。これに対して、履歴情報を固定長符号として伝送する場合には、図21に示したように、history_stream()関数の一部として、re_coding_stream_information()が伝送される。図21の例では、re_coding_stream_informationとして、user_data_start_code,re_coding_stream_info_ID,red_bw_flag,red_bw_indicatorが伝送される。   As described above, when history information is transmitted as a variable length code, the re_coding_stream_info () function is configured as shown in FIG. 48 and is transmitted as part of the history_stream () function as shown in FIG. On the other hand, when history information is transmitted as a fixed-length code, re_coding_stream_information () is transmitted as part of the history_stream () function, as shown in FIG. In the example of FIG. 21, user_data_start_code, re_coding_stream_info_ID, red_bw_flag, and red_bw_indicator are transmitted as re_coding_stream_information.

また、図45のヒストリ情報多重化装置63が出力するベースバンドの信号中における履歴情報の伝送のために、図50に示すようなRe_Coding information Bus macroblock formatが規定される。このマクロブロックは、16×16(=256)ビットで構成される。そして、そのうちの図50において上から3行目と4行目に示す32ビットが、picrate_elementとされる。このpicrate_elementには、図51乃至図53に示すPicture rate elementsが記述される。図51の上から2行目に1ビットのred_bw_flagが規定されており、また、3行目に3ビットのred_bw_indicatorが規定されている。即ち、これらのフラグred_bw_flag,red_bw_indicatorは、図50のpicrate_elementとして伝送される。   In addition, a Re_Coding information Bus macroblock format as shown in FIG. 50 is defined for transmission of history information in a baseband signal output from the history information multiplexing apparatus 63 in FIG. This macro block is composed of 16 × 16 (= 256) bits. Then, 32 bits shown in the third and fourth rows from the top in FIG. 50 are picrate_element. In this picrate_element, picture rate elements shown in FIGS. 51 to 53 are described. In the second line from the top of FIG. 51, 1-bit red_bw_flag is defined, and in the third line, 3-bit red_bw_indicator is defined. That is, these flags red_bw_flag and red_bw_indicator are transmitted as picrate_element in FIG.

図50のその他のデータについて説明すると、SRIB_sync_codeは、このフォーマットのマクロブロックの最初の行が左詰めにアライメントされていることを表すコードであり、具体的には、”11111”に設定される。fr_fl_SRIBは、picture_structureがフレームピクチャ構造の場合(その値が”11”である場合)、1に設定され、Re_Coding Information Bus macroblockが16ラインを超えて伝送されることを表し、picture_structureがフレーム構造ではない場合、0に設定され、Re_Coding Information Busが16ラインを超えて伝送されることを意味する。この機構により、Re_Coding Information Busが、空間的かつ時間的にデコードされたビデオフレームまたはフィールドの対応する画素にロックされる。   The other data in FIG. 50 will be described. SRIB_sync_code is a code indicating that the first row of the macro block of this format is aligned left-justified, and is specifically set to “11111”. fr_fl_SRIB is set to 1 when picture_structure has a frame picture structure (when its value is “11”), indicating that Re_Coding Information Bus macroblock is transmitted over 16 lines, and picture_structure is not a frame structure In this case, it is set to 0, which means that Re_Coding Information Bus is transmitted over 16 lines. This mechanism locks the Re_Coding Information Bus to the corresponding pixel of the video frame or field decoded spatially and temporally.

SRIB_top_field_firstは、元のビットストリームに保持されているtop_field_firstと同じ値に設定され、関連するビデオのRe_Coding Information Busの時間的アライメントをrepeat_first_fieldとともに表している。SRIB_repeat_first_fieldは、元のビットストリームに保持されているrepeat_first_fieldと同じ値に設定される。first fieldのRe_Coding Information Busの内容は、このフラグに示されるように繰り返される必要がある。   SRIB_top_field_first is set to the same value as top_field_first held in the original bitstream, and represents the temporal alignment of Re_Coding Information Bus of the related video together with repeat_first_field. SRIB_repeat_first_field is set to the same value as repeat_first_field held in the original bitstream. The content of Re_Coding Information Bus in the first field needs to be repeated as indicated by this flag.

422_420_chromaは、元のビットストリームが4:2:2または4:2:0のいずれであるかを表す。その値の0は、ビットストリームが4:2:0であり、色差信号のアップサンプリングが、4:2:2のビデオが出力されるように行われたことを表す。その値の0は、色差信号のフィルタリング処理が実行されていないことを表す。   422_420_chroma represents whether the original bit stream is 4: 2: 2 or 4: 2: 0. The value of 0 indicates that the bitstream is 4: 2: 0 and that the upsampling of the color difference signal is performed so that 4: 2: 2 video is output. The value 0 indicates that the color difference signal filtering process is not executed.

rolling_SRIB_mb_refは、16ビットのモジュロ65521を表し、この値は、毎マクロブロック毎にインクリメントされる。この値は、フレームピクチャ構造のフレームに渡って連続している必要がある。さもなくば、この値は、フィールドに渡って連続している必要がある。この値は、0から65520の間の所定の値に初期化される。これにより、レコーダのシステムに、ユニークなRe_Coding Information Busの識別子を組み込むことが許容される。   rolling_SRIB_mb_ref represents a 16-bit modulo 65521, and this value is incremented for each macroblock. This value must be continuous across frames of the frame picture structure. Otherwise, this value must be continuous across the field. This value is initialized to a predetermined value between 0 and 65520. This allows the incorporation of a unique Re_Coding Information Bus identifier into the recorder system.

Re_Coding Information Bus macroblockのその他のデータの意味は、上述した通りであるので、ここでは省略する。   The meaning of the other data of the Re_Coding Information Bus macroblock is as described above, and is omitted here.

図54に示すように、図50の256ビットのRe_Coding Information Busのデータは、1ビットずつ、色差データのLSBであるCb[0][0],Cr[0][0],Cb[1][0],Cr[1][0]に配置される。図54に示すフォーマットにより、4ビットのデータを送ることができるので、図50の256ビットのデータは、図54のフォーマットを64(=256/4)個送ることで伝送することができる。   As shown in FIG. 54, the 256-bit Re_Coding Information Bus data in FIG. 50 is Cb [0] [0], Cr [0] [0], Cb [1] which are LSBs of color difference data bit by bit. [0], Cr [1] [0]. Since the 4-bit data can be sent with the format shown in FIG. 54, the 256-bit data in FIG. 50 can be transmitted by sending 64 (= 256/4) formats in FIG.

このように、復号処理および符号化処理の繰り返しによる画質劣化の蓄積を低減することができる本発明のトランスコーディングシステムにおいて、過去の符号化処理において生成された符号化パラメータを、情報の使用頻度に応じてV Blanking領域およびH Blanking領域に記述するようにしたので、必要に応じた情報を容易に取り出すことができる。また、利用したい情報によって、必要に応じたハードウェアを選択する(あるいは、必要に応じて、ハードウェアを削除する)ことが可能である。   In this way, in the transcoding system of the present invention that can reduce the accumulation of image quality deterioration due to repetition of decoding processing and encoding processing, the encoding parameters generated in the past encoding processing are used as information usage frequency. Accordingly, the information is described in the V Blanking area and the H Blanking area, so that it is possible to easily extract information as necessary. Further, it is possible to select hardware as needed according to information desired to be used (or to delete hardware as necessary).

更に、本発明のトランスコーディングシステムは、ビデオデコーディングシステムで、同期符号(start_code)を、常にパケットの先頭に位置するように記述するようにしたので、ベースバンドビデオ信号を入力されたビデオエンコーディングシステムは、入力されたパケットが欠落していた場合の復帰を、容易に実行することができる。   Furthermore, the transcoding system of the present invention is a video decoding system in which the synchronization code (start_code) is always written at the head of the packet, so that the video encoding system to which the baseband video signal is input is described. Can easily perform recovery when an input packet is missing.

また、以上の説明では、符号化パラメータを圧縮して伝送する例について説明したが、圧縮せずに伝送するものであっても本発明を適応することができる。   In the above description, the example in which the encoding parameter is compressed and transmitted has been described. However, the present invention can be applied even if the encoding parameter is transmitted without being compressed.

なお、上記各処理を行うコンピュータプログラムは、磁気ディスク、光ディスク、光磁気ディスク、半導体メモリなどの記録媒体に記録して提供するほか、インターネット、デジタル衛星などのネットワークを介して伝送し、ユーザの記録媒体に記録させることで提供することができる。   The computer program for performing each of the above processes is provided by being recorded on a recording medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. It can be provided by recording on a medium.

また、本明細書において、媒体により提供されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   Further, in this specification, the steps for describing the program provided by the medium may be performed in parallel or individually even if not necessarily performed in time series, as well as processes performed in time series in the order described. This includes the processing to be executed.

なお、本明細書において、システムとは、複数の装置により構成される装置全体を表わすものである。 In the present specification, the term “system” represents the entire apparatus constituted by a plurality of apparatuses.

本発明におけるトランスコーディングシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the transcoding system in this invention. 図1のビデオデコーディングシステムの詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the video decoding system of FIG. 図1のビデオエンコーディングシステムの詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the video encoding system of FIG. トランスコーディングシステムの他の構成を示すブロック図である。It is a block diagram which shows the other structure of a transcoding system. 図2の復号装置に内蔵されるデコーダの詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the decoder incorporated in the decoding apparatus of FIG. マクロブロックの画素を説明するための図である。It is a figure for demonstrating the pixel of a macroblock. V BlankingおよびH Blankingを説明するための図である。It is a figure for demonstrating V Blanking and H Blanking. start_cordの位置を説明するための図である。It is a figure for demonstrating the position of start_cord. フィールドストラクチャおよびフレームストラクチャを説明するための図である。It is a figure for demonstrating a field structure and a frame structure. start_cordの位置を説明するための図である。It is a figure for demonstrating the position of start_cord. 符号化パラメータが記録される領域を説明する図である。It is a figure explaining the area | region where an encoding parameter is recorded. 図3の符号化装置に内蔵されるエンコーダの詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the encoder incorporated in the encoding apparatus of FIG. 図4のトランスコーディングシステムが実際に使用される状態を示す図である。FIG. 5 is a diagram illustrating a state in which the transcoding system of FIG. 4 is actually used. 密結合されたトランスコーディングシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the tightly coupled transcoding system. ビデオシーケンスのストリームのシンタックスを説明する図である。It is a figure explaining the syntax of the stream of a video sequence. 図15のシンタックスの構成を説明する図である。It is a figure explaining the structure of the syntax of FIG. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 固定長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records history information of fixed length. 可変長の履歴情報を記録するhistory_stream()のシンタックスを説明する図である。It is a figure explaining the syntax of history_stream () which records variable length history information. sequence_header()のシンタックスを説明する図である。It is a figure explaining the syntax of sequence_header (). sequence_extension()のシンタックスを説明する図である。It is a figure explaining the syntax of sequence_extension (). extension_and_user_data()のシンタックスを説明する図である。It is a figure explaining the syntax of extension_and_user_data (). user_data()のシンタックスを説明する図である。It is a figure explaining the syntax of user_data (). group_of_pictures_header()のシンタックスを説明する図である。It is a figure explaining the syntax of group_of_pictures_header (). picture_header()のシンタックスを説明する図である。It is a figure explaining the syntax of picture_header (). picture_coding_extension()のシンタックスを説明する図である。It is a figure explaining the syntax of picture_coding_extension (). extension_data()のシンタックスを説明する図である。It is a figure explaining the syntax of extension_data (). quant_matrix_extension()のシンタックスを説明する図である。It is a figure explaining the syntax of quant_matrix_extension (). copyright_extension()のシンタックスを説明する図である。It is a figure explaining the syntax of copyright_extension (). picture_display_extension()のシンタックスを説明する図である。It is a figure explaining the syntax of picture_display_extension (). picture_data()のシンタックスを説明する図である。It is a figure explaining the syntax of picture_data (). slice()のシンタックスを説明する図である。It is a figure explaining the syntax of slice (). macroblock()のシンタックスを説明する図である。It is a figure explaining the syntax of macroblock (). macroblock_modes()のシンタックスを説明する図である。It is a figure explaining the syntax of macroblock_modes (). motion_vectors(s)のシンタックスを説明する図である。It is a figure explaining the syntax of motion_vectors (s). motion_vector(r,s)のシンタックスを説明する図である。It is a figure explaining the syntax of motion_vector (r, s). Iピクチャに対するmacroblock_typeの可変長符号を説明する図である。It is a figure explaining the variable length code of macroblock_type with respect to I picture. Pピクチャに対するmacroblock_typeの可変長符号を説明する図である。It is a figure explaining the variable length code of macroblock_type with respect to P picture. Bピクチャに対するmacroblock_typeの可変長符号を説明する図である。It is a figure explaining the variable length code of macroblock_type with respect to B picture. トランスコーディングシステムの他の構成を示すブロック図である。It is a block diagram which shows the other structure of a transcoding system. 履歴情報の項目の組み合わせを説明する図である。It is a figure explaining the combination of the item of history information. 図45のトランスコーディングシステムの動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the transcoding system of FIG. re_coding_stream_info()のシンタックスを説明する図である。It is a figure explaining the syntax of re_coding_stream_info (). red_bw_flag,red_bw_indicatorを説明する図である。It is a figure explaining red_bw_flag and red_bw_indicator. Re_Coding Information Bus macroblock formationを説明する図である。It is a figure explaining Re_Coding Information Bus macroblock formation. Picture rate elementsを説明する図である。It is a figure explaining Picture rate elements. Picture rate elementsを説明する図である。It is a figure explaining Picture rate elements. Picture rate elementsを説明する図である。It is a figure explaining Picture rate elements. Re_Coding Information Busが記録される領域を説明する図である。It is a figure explaining the area | region where Re_Coding Information Bus is recorded.

符号の説明Explanation of symbols

1 ビデオデコーディングシステム, 2 ビデオエンコーディングシステム, 11 復号装置, 12 ヒストリ情報多重化装置, 13 データ分類装置, 14 ヒストリデコーディング装置, 15 フォーマットコンバータ, 16 V Blanking挿入装置, 17 フォーマットコンバータ, 18 H Blanking挿入装置, 21 ユーザデータデコーダ, 22 コンバータ, 23 ヒストリVLD, 31 H Blanking抽出装置, 32 フォーマットコンバータ 33 マルチプレクサ, 34 V Blanking抽出装置, 35 フォーマットコンバータ, 36 パラメータ再生部, 37 ヒストリ情報分離化装置, 38 ヒストリエンコーディング装置, 39 符号化装置, 41 ユーザデータフォーマッタ, 42 コンバータ, 43ヒストリVLC, 51 ビデオデコーディングシステム, 52 ビデオエンコーディングシステム, 61 復号装置, 62 ヒストリデコーディング装置, 63 ヒストリ情報多重化装置, 64 ヒストリ情報分離装置 ,65 ヒストリエンコーディング装置, 66 符号化装置, 71 ユーザデータデコーダ, 72 コンバータ, 73 ヒストリVLD, 64 ヒストリ情報分離化装置, 65 ヒストリエンコーディング装置, 66 符号化装置, 74 ユーザデータフォーマッタ, 75 コンバータ, 76ヒストリVLC, 81 デコーダ, 101 エンコーダ, 151 符号化パラメータ選択回路, 161 組み合わせ記述子分離部, 162 符号化パラメータ算出部, 163 スイッチ   DESCRIPTION OF SYMBOLS 1 Video decoding system, 2 Video encoding system, 11 Decoding apparatus, 12 History information multiplexing apparatus, 13 Data classification apparatus, 14 History decoding apparatus, 15 Format converter, 16 V Blanking insertion apparatus, 17 Format converter, 18 H Blanking Insertion device, 21 User data decoder, 22 Converter, 23 History VLD, 31 H Blanking extraction device, 32 Format converter 33 Multiplexer, 34 V Blanking extraction device, 35 Format converter, 36 Parameter playback unit, 37 History information separation device, 38 History encoding device, 39 encoding device, 41 user data formatter, 42 converter, 43 history VLC, 51 video Odecoding system, 52 video encoding system, 61 decoding device, 62 history decoding device, 63 history information multiplexing device, 64 history information separating device, 65 history encoding device, 66 encoding device, 71 user data decoder, 72 converter, 73 history VLD, 64 history information separation device, 65 history encoding device, 66 encoding device, 74 user data formatter, 75 converter, 76 history VLC, 81 decoder, 101 encoder, 151 encoding parameter selection circuit, 161 combination descriptor Separator, 162 Coding parameter calculator, 163 switch

Claims (8)

符号化ストリームを復号して得られる画像データに、符号化パラメータを挿入する情報処理装置において、
前記符号化ストリームの符号化パラメータを、前記符号化ストリームとともに取得する取得手段と、
前記取得手段により取得された前記符号化パラメータに含まれるピクチャ層以上の符号化パラメータとスライス層以下の符号化パラメータとが前記符号化ストリームの再符号化処理において選択的に利用されるように、前記ピクチャ層以上の符号化パラメータを前記画像データの垂直ブランキング領域に挿入して伝送するか、前記スライス層以下の符号化パラメータを前記画像データの水平ブランキング領域に挿入して伝送するかを、選択的に行う伝送手段と
を備える情報処理装置。
In an information processing apparatus that inserts an encoding parameter into image data obtained by decoding an encoded stream,
Obtaining means for obtaining an encoding parameter of the encoded stream together with the encoded stream;
In order that the encoding parameter of the picture layer or more and the encoding parameter of the slice layer or less included in the encoding parameter acquired by the acquisition unit are selectively used in the re-encoding process of the encoded stream, Whether the encoding parameter of the picture layer or higher is inserted into the vertical blanking region of the image data for transmission or whether the encoding parameter of the slice layer or lower is inserted into the horizontal blanking region of the image data for transmission An information processing apparatus comprising: a selectively performing transmission means.
前記符号化ストリームを復号して前記画像データを生成する復号手段
を更に備える請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, further comprising decoding means for decoding the encoded stream to generate the image data.
前記符号化パラメータは、前記符号化ストリームを生成する際に利用された現符号化パラメータを含む
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the encoding parameter includes a current encoding parameter used when generating the encoded stream.
前記符号化パラメータは、前記符号化ストリームに対する過去の符号化処理または復号処理において利用された履歴符号化パラメータを含む
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the encoding parameter includes a history encoding parameter used in a past encoding process or decoding process for the encoded stream.
前記符号化パラメータは、前記符号化ストリームに多重化されており、
前記取得手段は、前記符号化ストリームから前記符号化パラメータを取得する
請求項1に記載の情報処理装置。
The encoding parameters are multiplexed into the encoded stream;
The information processing apparatus according to claim 1, wherein the acquisition unit acquires the encoding parameter from the encoded stream.
前記符号化ストリームは、MPEG規格に準じて符号化されている
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the encoded stream is encoded according to an MPEG standard.
前記再符号化処理は、MPEG規格に準じている
請求項1に記載の情報処理装置。
The information processing apparatus according to claim 1, wherein the re-encoding process conforms to an MPEG standard.
符号化ストリームを復号して得られる画像データに、符号化パラメータを挿入する情報処理装置の情報処理方法において、
前記符号化ストリームの符号化パラメータを、前記符号化ストリームとともに取得し、
取得された前記符号化パラメータに含まれるピクチャ層以上の符号化パラメータとスライス層以下の符号化パラメータとが前記符号化ストリームの再符号化処理において選択的に利用されるように、前記ピクチャ層以上の符号化パラメータを前記画像データの垂直ブランキング領域に挿入して伝送するか、前記スライス層以下の符号化パラメータを前記画像データの水平ブランキング領域に挿入して伝送するかを、選択的に実行する
ステップを含む情報処理方法。
In an information processing method of an information processing apparatus for inserting an encoding parameter into image data obtained by decoding an encoded stream,
Obtaining the encoding parameters of the encoded stream together with the encoded stream;
More than the picture layer so that the encoding parameter of the picture layer or higher and the encoding parameter of the slice layer or lower included in the acquired encoding parameter are selectively used in the re-encoding process of the encoded stream. Is selectively inserted into the vertical blanking region of the image data for transmission, or the encoding parameter below the slice layer is inserted into the horizontal blanking region of the image data for transmission. An information processing method including executing steps.
JP2007148247A 2007-06-04 2007-06-04 Information processing apparatus and method Pending JP2007259492A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007148247A JP2007259492A (en) 2007-06-04 2007-06-04 Information processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007148247A JP2007259492A (en) 2007-06-04 2007-06-04 Information processing apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005143082A Division JP2005304065A (en) 2005-05-16 2005-05-16 Decoding device and method, coding device and method, information processing device and method, and recording medium

Publications (1)

Publication Number Publication Date
JP2007259492A true JP2007259492A (en) 2007-10-04

Family

ID=38633161

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007148247A Pending JP2007259492A (en) 2007-06-04 2007-06-04 Information processing apparatus and method

Country Status (1)

Country Link
JP (1) JP2007259492A (en)

Similar Documents

Publication Publication Date Title
JP3694888B2 (en) Decoding device and method, encoding device and method, information processing device and method, and recording medium
JP3672185B2 (en) CODING SYSTEM, DEVICE USING THE SAME, AND RECORDING MEDIUM
KR100729541B1 (en) Transcoding system using encoding history information
JP3724205B2 (en) Decoding device and method, and recording medium
JP2005304065A (en) Decoding device and method, coding device and method, information processing device and method, and recording medium
JP3874153B2 (en) Re-encoding device and re-encoding method, encoding device and encoding method, decoding device and decoding method, and recording medium
JP3724204B2 (en) Encoding apparatus and method, and recording medium
JP3724203B2 (en) Encoding apparatus and method, and recording medium
JP3890838B2 (en) Encoded stream conversion apparatus, encoded stream conversion method, and recording medium
JP4139983B2 (en) Encoded stream conversion apparatus, encoded stream conversion method, stream output apparatus, and stream output method
JP4016290B2 (en) Stream conversion device, stream conversion method, encoding device, encoding method, and recording medium
JP4543321B2 (en) Playback apparatus and method
JP4539637B2 (en) Stream recording apparatus and stream recording method, stream reproduction apparatus and stream reproduction method, stream transmission apparatus and stream transmission method, and program storage medium
JP4482811B2 (en) Recording apparatus and method
JP3817951B2 (en) Stream transmission apparatus and method, and recording medium
JP4478630B2 (en) Decoding device, decoding method, program, and recording medium
JP4016294B2 (en) Encoding apparatus and encoding method, stream conversion apparatus and stream conversion method, and recording medium
JP3817952B2 (en) Re-encoding device and method, encoding device and method, and recording medium
JP2007259492A (en) Information processing apparatus and method
JP3724202B2 (en) Image data processing apparatus and method, and recording medium
JP4016349B2 (en) Stream conversion apparatus, stream conversion method, and recording medium
JP4016348B2 (en) Stream conversion apparatus, stream conversion method, and recording medium
JP4016293B2 (en) Encoding apparatus, encoding method, and recording medium
JP4016347B2 (en) Stream conversion apparatus, stream conversion method, and recording medium
JP2007124703A (en) Decoder and decoding method, transmitter and transmitting method, and recording medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070731

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20071120