JPH08251582A - Encoded data editing device - Google Patents

Encoded data editing device

Info

Publication number
JPH08251582A
JPH08251582A JP4736295A JP4736295A JPH08251582A JP H08251582 A JPH08251582 A JP H08251582A JP 4736295 A JP4736295 A JP 4736295A JP 4736295 A JP4736295 A JP 4736295A JP H08251582 A JPH08251582 A JP H08251582A
Authority
JP
Japan
Prior art keywords
encoding
image
encoded
encoded data
code amount
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
JP4736295A
Other languages
Japanese (ja)
Inventor
Shunji Ui
俊司 宇井
Teiichi Ichikawa
禎一 伊知川
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP4736295A priority Critical patent/JPH08251582A/en
Publication of JPH08251582A publication Critical patent/JPH08251582A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE: To edit encoded data excellently without causing the input buffer of a decoder to overflow or underflow when the encoded data after editing are decoded. CONSTITUTION: An encoding part 2 generates 1st encoded data by compressing and encoding an input moving picture signal. Further, the encoding part 2 when replacing part of the 1st encoded data generates 2nd encoded data by re- encoding the input moving picture signal corresponding to the replacement place. At this time, a control part 3 makes the encoding part 2 perform the encoding by regarding a VBV(video buffering verifier) buffer occupation amount as an initial value and also controls the re-encoding by the encoding part 2 by adding dummy data, etc., for compensation so that the code amount of the 2nd encoded data matches the code amount of a substitution part 6 when the code amount of the 2nd encoded data does not exceeds the code amount of the substitution part 6 and is small. Therefore, VBV control can be performed continuously, so the data can be edited excellently without causing the decoding- side input buffer to overflow or underflow.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、動画像信号を圧縮符号
化する動画像符号化装置を用いて符号化したデータを編
集するのに好適の符号化データ編集装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coded data editing apparatus suitable for editing data coded by a moving picture coding apparatus for compressing and coding a moving picture signal.

【0002】[0002]

【従来の技術】近年、画像をディジタル圧縮が検討され
ている。特に、DCT(離散コサイン変換)を用いた高
能率符号化については、各種標準化案が提案されてい
る。DCTは、1フレームを複数のブロック(m画素×
水平走査線)に分割し、このブロック単位で映像信号を
周波数成分に変換することにより、空間軸方向の冗長度
を削減するものである。ところで、テレビジョン信号の
動画用の高能率符号化方式として、CCITT(Intern
ational Telegraph and Telephone Consultative Commi
ttee)は周知のようにMPEG(Moving Picture Exper
ts Group)方式を提案した。この方式においては、1フ
レーム内てDCTによる圧縮(フレーム内圧縮)を行う
だけでなく、フレーム間の相関を利用して時間軸方向の
冗長度を削減するフレーム間圧縮も採用する。フレーム
間圧縮は、一般の動画像が前後のフレームでよく似てい
るという性質を利用して、前後のフレームの差分を求め
差分値を符号化することによって、ビットレートを一層
低減させるものである。特に、画像の動きを予測してフ
レーム間差を求めることにより予測誤差を低減する動き
補償フレーム間予測符号化が有効である。
2. Description of the Related Art In recent years, digital compression of images has been studied. In particular, various standardization proposals have been proposed for high-efficiency coding using DCT (discrete cosine transform). In the DCT, one frame is divided into a plurality of blocks (m pixels x
By dividing the video signal into frequency components in units of blocks, the redundancy in the spatial axis direction is reduced. By the way, CCITT (Intern) is used as a high-efficiency coding method for moving pictures of television signals.
ational Telegraph and Telephone Consultative Commi
As is well known, MPEG (Moving Picture Exper)
ts Group) method was proposed. In this method, not only compression by DCT (intra-frame compression) is performed within one frame, but also inter-frame compression for reducing redundancy in the time axis direction by utilizing correlation between frames is adopted. The inter-frame compression is to further reduce the bit rate by taking advantage of the fact that a general moving image is very similar to the frames before and after, and obtaining the difference between the frames before and after and encoding the difference value. . In particular, motion-compensated interframe predictive coding that reduces the prediction error by predicting the motion of an image and obtaining the interframe difference is effective.

【0003】この動き補償フレーム間予測符号化におい
ては、現フレームの画像データD(n)と1フレーム前
の画像データD(n−1)との間で動きベクトルを求め
る。前フレームの符号化データを復号して得た画像デー
タを動きベクトルによって動き補償して、動き補償した
前フレームの参照画像データD′(n−1)と現フレー
ムの画像データD(n)との間で差分をとり、この差分
値(動き予測による誤差成分)を符号化して出力する。
In this motion compensation interframe predictive coding, a motion vector is obtained between the image data D (n) of the current frame and the image data D (n-1) of the previous frame. The image data obtained by decoding the encoded data of the previous frame is motion-compensated by the motion vector, and the motion-compensated reference image data D ′ (n−1) of the previous frame and the image data D (n) of the current frame are obtained. The difference value (error component due to motion prediction) is encoded and output.

【0004】また、最近では、上述のMPEG方式を更
に、相互運用性、分解能可変性及び拡張性等の面で満足
するように改良がなされたMPEG2方式と呼ばれる動
画像圧縮方式も提案されており、既にISO/IEC標
準13818−2に規格化されている。MPEG2方式
は前述したMPEG方式(通称MPEG1という)を包
合する動画像圧縮符号化方式である。即ち、コンピュー
タ・放送・通信の3つの分野で使用されるアプリケーシ
ョンのすべてを満足するように考慮されている。 MP
EG2方式による動画像圧縮符号化については、例え
ば、「ISO/IEC 13818−2 Draft Intern
ational Standard」の文献等に記述されている。即ち、
この動画像圧縮方式においては、画像間の動き補償予測
(MC:Motion Copensation)と8×8画素のDCTを
組み合わせたハイブリッド方式の変換とを行い、これに
より得られる信号に対して更に量子化及び可変長符号化
を施す。MC予測の種類については、過去の画像を参照
画像とする前方予測、未来の画像を参照画像とする後方
予測、過去及び未来両方の画像を参照画像とする双方向
(内挿)予測及び予測を用いないイントラの各モードが
ある。
Recently, a moving image compression method called MPEG2 method has been proposed which is further improved to satisfy the above-mentioned MPEG method in terms of interoperability, resolution variability and expandability. , Has already been standardized to ISO / IEC standard 13818-2. The MPEG2 system is a moving image compression coding system that incorporates the above-mentioned MPEG system (commonly referred to as MPEG1). That is, it is considered to satisfy all the applications used in the three fields of computer, broadcasting, and communication. MP
For moving picture compression encoding by the EG2 system, for example, see "ISO / IEC 13818-2 Draft Intern.
It is described in documents such as "ational Standard". That is,
In this moving image compression method, a motion compensation prediction (MC: Motion Copensation) between images and a conversion of a hybrid method in which a DCT of 8 × 8 pixels is combined are performed, and a signal obtained by this is further quantized and Apply variable length coding. Regarding types of MC prediction, forward prediction using a past image as a reference image, backward prediction using a future image as a reference image, and bidirectional (interpolation) prediction and prediction using both past and future images as reference images. There are intra modes that are not used.

【0005】このMC予測モードは、16×16画素の
マクロブック毎に設定可能であるが、符号化(ピクチ
ャ)の種類により使用可能なモードが決められている。
このピクチャの種類には、インストラマクロブックのみ
で構成されるピクチャをIピクチャ、イントラ及び前方
予測マクロブックで構成されるPピクチャ及び全てのM
C予測モードが許されるBピクチャがあり、即ち3種類
のピクチャがある。
This MC prediction mode can be set for each 16 × 16 pixel macrobook, but the usable mode is determined by the type of coding (picture).
The types of this picture include a picture composed only of Intra macrobooks, an I picture, a P picture composed of intra and forward prediction macrobooks, and all M pictures.
There are B pictures that allow C prediction mode, that is, there are three types of pictures.

【0006】Iピクチャは予測を用いず、原画像自体を
DCT変換し、量子化及び可変長符号化を行うものであ
る。したがって、Iピクチャは単独の符号化データで複
合化可能であるのに対し、Pピクチャは入力画像順で過
去のすでに符号化されたIまたはPピクチャとのMC予
測誤差信号をDCT変換、量子化及び可変長符号化を行
う。そしてBピクチャでは、過去及び未来における既に
符号化されたIまたはPピクチャとのDCT予測誤差信
号をDCT変換、量子化及び可変長符号化を行う。この
ため、P及びBピクチャの復号はこれに先行してIピク
チャより始まる参照画像の復号を行う必要がある。
[0006] The I picture does not use prediction but performs DCT conversion on the original image itself, and performs quantization and variable length coding. Therefore, an I picture can be composited with a single piece of encoded data, whereas a P picture can be DCT-transformed and quantized with respect to the MC prediction error signal with the past already encoded I or P picture in input image order. And variable length coding. Then, in the B picture, the DCT prediction error signal with the already coded I or P picture in the past and the future is subjected to DCT transform, quantization and variable length coding. For this reason, decoding of P and B pictures must be preceded by decoding of the reference image starting from the I picture.

【0007】MPEG2方式では、任意の数の上記タイ
プのピクチャより構成されるGOP(GROUP OF PICTURE
S )という階層を有している。また周知のように上述の
MPEG1についても同様にGOPを備え、GOP単位
に画像編集を行うことが可能である。即ち、MPEG2
においてもMPEG1と同様にGOP単位で画像編集を
行うことが可能である。MPEG2では、GOPで最初
に符号化されるピクチャはIピクチャと定めされてお
り、Iピクチャの前にはGOPの先頭であることを示す
GOPヘッダを挿入するようになっている。このGOP
ヘッダ中には、タイムコード及びそのGOPを構成する
符号化データがGOP内のデータのみで符号可能、即ち
前のGOPの画像データを参照しない独立したGOP
(以下、クローズドGOPと称す)であるかどうかを示
すクローズド(closed)GOPフラグを設けている。ま
た、本来前のGOPの画像データを参照する必要がある
が、編集によりこれが出来なくなったことを示すブロー
クン・リンク(broken Link)フラグも設けられてい
る。このようにMPEG2の動画像圧縮方式では、GO
Pを単位として編集が行えるように工夫がなされてい
る。
In the MPEG2 system, a GOP (GROUP OF PICTURE) composed of an arbitrary number of pictures of the above type.
S)). Further, as is well known, the MPEG1 described above is also provided with a GOP, and image editing can be performed in GOP units. That is, MPEG2
In the same manner as in MPEG1, image editing can be performed in GOP units. In MPEG2, the picture coded first in a GOP is defined as an I picture, and a GOP header indicating the beginning of the GOP is inserted before the I picture. This GOP
In the header, the time code and the encoded data forming the GOP can be encoded only by the data in the GOP, that is, an independent GOP that does not refer to the image data of the previous GOP.
A closed GOP flag indicating whether or not (hereinafter, referred to as a closed GOP) is provided. Further, a broken link (broken Link) flag indicating that the GOP image data of the previous GOP must be referred to but cannot be edited is provided. In this way, in the moving image compression method of MPEG2, GO
The device is designed so that editing can be performed in units of P.

【0008】図8はこのようなMPEG2方式の符号化
部を備えた従来の符号化データ編集装置の一例を示すブ
ロック図である。
FIG. 8 is a block diagram showing an example of a conventional coded data editing apparatus provided with such an MPEG2 system coding section.

【0009】入力端子1には原動画像信号を入力する。
原動画像信号はMPEG2の圧縮符号化方式の符号化部
2に与える。符号化部2は制御部3からのピクチャタイ
プ及び量子化ステップなどの符号化パラメータ制御信号
に基づき原動画像信号の符号化処理を行う。また符号化
部2は符号量制御を行うための発生符号量等の符号化情
報を制御部3に与える。符号化部2によって符号化され
た符号化データはディジタル信号記録部4及び5に与え
る。
A moving image signal is input to the input terminal 1.
The moving image signal is given to the encoding unit 2 of the MPEG2 compression encoding system. The encoding unit 2 performs the encoding process of the moving image signal based on the encoding parameter control signal such as the picture type and the quantization step from the control unit 3. The encoding unit 2 also provides the control unit 3 with encoding information such as a generated code amount for controlling the code amount. The encoded data encoded by the encoding unit 2 is given to the digital signal recording units 4 and 5.

【0010】制御部3はそれぞれディジタル信号記録部
4及び5に記録制御信号を与えて、ディジタル信号記録
部4及び5の内、一方のディジタル信号記録部に符号化
データを記録させるように制御する。置換部6は各ディ
ジタル信号記録部4、5におけるデータの読み出し及び
書き込みを行うことができる。例えば、両者のディジタ
ル信号記録部4、5を用いて符号化データを置換する場
合には、置換部6は制御部3からの置換箇所を制御する
信号に基づき、ディジタル信号記録部4及び5に記録さ
れている一方の符号化データの一部を他方の符号化デー
タの一部に置換する。
The control unit 3 gives a recording control signal to the digital signal recording units 4 and 5, respectively, and controls so that one of the digital signal recording units 4 and 5 records the encoded data. . The replacing unit 6 can read and write data in the digital signal recording units 4 and 5. For example, when the encoded data is replaced by using both digital signal recording units 4 and 5, the replacing unit 6 causes the digital signal recording units 4 and 5 to perform the replacement based on the signal from the control unit 3 which controls the replacement location. A part of the recorded one encoded data is replaced with a part of the other encoded data.

【0011】図9は上記符号化部2の具体例を示すブロ
ック図である。図9において、入力端子11に入力され
た原動画信号は、符号化順変換回路12に与える。符号
化順変換回路12は、図10に示すように原画像入力
順、符号化画像順変換を行うと共に、走査順、ブロック
/マクロブロック順変換を行って符号化順画像信号を出
力する。
FIG. 9 is a block diagram showing a concrete example of the encoding unit 2. In FIG. 9, the original moving image signal input to the input terminal 11 is given to the coding order conversion circuit 12. The coding order conversion circuit 12 performs the original image input order and the coded image order conversion as shown in FIG. 10, and also performs the scanning order and the block / macroblock order conversion to output the coding order image signal.

【0012】図10は上述の符号化順変換回路12によ
る処理を説明するための説明図であり、GOPの構成例
及び各ピクチャの予測方向を示している。尚、図中上段
に示すGOP構成は原画像データの入力順、即ち画像表
示順を示し、図中下段には符号化順変換後の符号化順に
変換されたGOP構成を示している。また、図中の矢印
は各ピクチャの予測方向を示している。
FIG. 10 is an explanatory diagram for explaining the processing by the coding order conversion circuit 12 described above, and shows a structural example of the GOP and the prediction direction of each picture. The GOP structure shown in the upper part of the figure shows the input order of the original image data, that is, the image display order, and the lower part of the figure shows the GOP structure converted into the coding order after the coding order conversion. The arrows in the figure indicate the prediction direction of each picture.

【0013】本例では、1つのGOPは例えば1つのI
ピクチャ、1つのPピクチャ及び4つのBピクチャによ
り構成している。そして、図中上段に示すように各ピク
チャにおける原動画像信号が順に入力する。この場合、
符号化順変換を行うと、同図下段に示すように符号化順
に変化してGOPを構成する。このとき、Iピクチャと
Pピクチャとの周期は3ピクチャであり、また符号化し
た最初のGOPをGOP0とすると、GOP3はクロー
ズドGOP(closed GOP)となる。このように符号化順
変換回路12は原動画像信号に各変換処理を施して、各
ピクチャの原動画像信号をマクロブロック単位で構成さ
れる符号化順画像信号を得、この符号化順画像信号を減
算手段13に与える。
In this example, one GOP is, for example, one I
It is composed of a picture, one P picture and four B pictures. Then, as shown in the upper part of the figure, the moving image signal in each picture is sequentially input. in this case,
When the coding order conversion is performed, the coding order is changed as shown in the lower part of FIG. At this time, the period between the I picture and the P picture is 3 pictures, and if the first coded GOP is GOP0, GOP3 becomes a closed GOP. In this way, the encoding order conversion circuit 12 performs each conversion process on the moving image signal to obtain the encoding order image signal composed of the moving image signal of each picture in macroblock units, and obtains this encoding order image signal. It is given to the subtraction means 13.

【0014】減算手段13は符号化順画像信号を用いて
予測画像信号の予測を行い、これにより予測誤差信号を
得る。この予測誤差信号はDCT回路14に与える。
The subtracting means 13 predicts the predicted image signal by using the coding order image signal, thereby obtaining a prediction error signal. This prediction error signal is given to the DCT circuit 14.

【0015】DCT回路14はブロック毎に二次元DC
T処理を施すことによって、入力信号を周波数成分に変
換する。これにより、空間的な相関成分を削減可能とな
る。即ち、DCT回路14の出力(DCT変換係数)は
量子化回路15に与え、量子化回路15はDCT変換係
数を符号化制御回路26からの量子化制御信号により設
定される量子化ステップに基づき量子化を施すことによ
って、1ブロックの信号の冗長度を低減する。量子化回
路15により得られる信号は、VLC・文法生成手段1
6及び局部復号化手段29の逆量子化回路19に与え
る。
The DCT circuit 14 is a two-dimensional DC for each block.
The input signal is converted into frequency components by performing T processing. This makes it possible to reduce spatial correlation components. That is, the output of the DCT circuit 14 (DCT transform coefficient) is given to the quantizing circuit 15, and the quantizing circuit 15 quantizes the DCT transform coefficient based on the quantizing step set by the quantizing control signal from the coding control circuit 26. The redundancy of the signal of one block is reduced by applying the conversion. The signal obtained by the quantization circuit 15 is VLC / grammar generating means 1.
6 and the dequantization circuit 19 of the local decoding means 29.

【0016】VLC・文法生成回路16は与えられた量
子化信号に可変長符号化を施すと共に、符号化制御回路
26で生成されるヘッダデータ等の付加信号をこれに多
重して所定のフォーマットのMPEG2符号化データを
生成し出力する。この出力符号化データはバッファメモ
リ17及び出力端子18を介して最終出力信号として出
力することになる。また、VLC・文法生成回路16
は、生成した符号化データの符号量を信号により符号化
制御回路26に供給する。
The VLC / grammar generating circuit 16 performs variable-length coding on the supplied quantized signal, and multiplexes an additional signal such as header data generated by the coding control circuit 26 with this to a predetermined format. Generates and outputs MPEG2 encoded data. This output encoded data is output as a final output signal via the buffer memory 17 and the output terminal 18. In addition, the VLC / grammar generation circuit 16
Supplies the code amount of the generated encoded data to the encoding control circuit 26 by a signal.

【0017】一方、局部復号化手段29の逆量子化回路
19は量子化回路15からの出力信号に対し、前記符号
化制御回路26からの量子化制御信号により設定される
量子化ステップに基づき逆量子化を行う。即ち、この処
理は量子化回路15による量子化の逆の処理である。そ
の後、逆量子化回路19により得られるDCT変換係数
は逆DCT回路20に与える。逆DCT回路20は、D
CT回路14の二次元DCT変換とは逆の二次元DCT
変換を行い、これにより得る信号を加算手段21に与え
る。加算手段21は、逆DCT回路29による出力信号
と後述する動き補償された予測画像信号とを加算して復
号画像信号を得、この復号画像信号をスイッチ22に与
える。即ち、局部復号化手段29は復号画像信号を出力
信号としてスイッチ22に出力する。
On the other hand, the inverse quantization circuit 19 of the local decoding means 29 inverses the output signal from the quantization circuit 15 based on the quantization step set by the quantization control signal from the encoding control circuit 26. Quantize. That is, this process is the reverse of the quantization performed by the quantization circuit 15. After that, the DCT transform coefficient obtained by the inverse quantization circuit 19 is given to the inverse DCT circuit 20. The inverse DCT circuit 20 has a D
A two-dimensional DCT that is the reverse of the two-dimensional DCT transformation of the CT circuit 14.
The conversion is performed, and the signal obtained by the conversion is given to the adding means 21. The adding means 21 adds the output signal from the inverse DCT circuit 29 and a motion-compensated predicted image signal described later to obtain a decoded image signal, and supplies this decoded image signal to the switch 22. That is, the local decoding means 29 outputs the decoded image signal to the switch 22 as an output signal.

【0018】スイッチ22は符号化制御回路26からの
ピクチャタイプの種類に基づいて切換制御するための制
御信号(以下、ピクチャタイプ信号)によりオン/オフ
する。この場合、スイッチ22はI及びPピクチャのと
きのみにオフするように動作する。即ち、I及びPピク
チャのときのみに復号画像信号はスイッチ22を介して
参照画像メモリ23に与える。このとき、参照画像メモ
リ23は与えられた復号画像信号を書き込む。また、参
照画像メモリ23は常に過去に符号化された2フレーム
分の復号画像を保持するようになっている。
The switch 22 is turned on / off by a control signal (hereinafter, picture type signal) for switching control based on the type of picture type from the encoding control circuit 26. In this case, the switch 22 operates so as to be turned off only for I and P pictures. That is, the decoded image signal is given to the reference image memory 23 via the switch 22 only for I and P pictures. At this time, the reference image memory 23 writes the given decoded image signal. Further, the reference image memory 23 always holds the decoded images of two frames encoded in the past.

【0019】参照画像メモリ23は、符号化制御回路2
6によって前記復号画像信号、即ち参照画像信号の読み
出しが制御されることにより、格納された参照画像信号
を読み出して出力する。このとき、参照画像メモリ23
は格納している参照画像信号の内、入力順で過去、未来
の参照画像信号を動き検出回路24に与える。動き検出
回路24はこの参照画像信号と前記符号化順画像信号と
により動きベクトル及び最適な予測モードをマクロブロ
ック毎に検出する。このとき、動き検出回路24はピク
チャタイプ信号に基づいて検出することにより、予測モ
ードを制限する。動き検出回路24により得た予測モー
ド信号は、参照画像メモリ23、動き補償回路25及び
符号化制御回路26に与える。同時に動き検出回路24
は前記予測モードに対応する動きベクトル信号を、動き
補償回路25及び符号化制御回路26に与える。
The reference image memory 23 includes an encoding control circuit 2
The decoded image signal, that is, the reference image signal is controlled by 6 to read and output the stored reference image signal. At this time, the reference image memory 23
Of the reference image signals stored therein, the past and future reference image signals in the input order are given to the motion detection circuit 24. The motion detection circuit 24 detects the motion vector and the optimum prediction mode for each macroblock based on the reference image signal and the coding order image signal. At this time, the motion detection circuit 24 limits the prediction mode by detecting based on the picture type signal. The prediction mode signal obtained by the motion detection circuit 24 is given to the reference image memory 23, the motion compensation circuit 25, and the coding control circuit 26. At the same time, the motion detection circuit 24
Gives a motion vector signal corresponding to the prediction mode to the motion compensation circuit 25 and the coding control circuit 26.

【0020】参照画像メモリ23は、与えられた予測モ
ード信号に基づいて予測に用いる参照画像信号を動き補
償回路25に与える。動き補償回路25は予測モード信
号及び動きベクトル信号により参照画像信号の動き補償
処理を行い、また予測モードによっては時間方向の内挿
処理を行うことによって、最終的な予測画像信号を得
る。その後、この予測画像信号は減算手段13及び加算
手段21に与える。尚、予測モード信号がイントラモー
ドである場合には、この予測画像信号は“0”となる。
このため、DCT回路14の入力信号は符号化順画像信
号であることから、予測を用いずに原動画像信号そのも
のを符号化する。このようにして、図10に示す符号化
手段は、MPEG2方式による動画像信号の圧縮符号化
を行う。
The reference image memory 23 supplies a reference image signal used for prediction to the motion compensation circuit 25 based on the supplied prediction mode signal. The motion compensation circuit 25 performs motion compensation processing of the reference image signal with the prediction mode signal and the motion vector signal, and also performs interpolation processing in the time direction depending on the prediction mode to obtain a final predicted image signal. After that, this predicted image signal is given to the subtracting means 13 and the adding means 21. When the prediction mode signal is the intra mode, this prediction image signal is "0".
Therefore, since the input signal of the DCT circuit 14 is a coding order image signal, the driving image signal itself is coded without using prediction. In this way, the encoding means shown in FIG. 10 performs compression encoding of the moving image signal according to the MPEG2 system.

【0021】尚、量子化ステップやピクチャタイプなど
のパラメータは、図8に示す制御部3より入力端子27
を介して符号化制御回路26に与えるようになってい
る。また符号化制御回路26は符号化の際に得た予測モ
ードや発生符号量などの符号化生成情報を出力端子28
を介して前記制御部3(図8参照)に与えるようにして
いる。
Parameters such as the quantization step and the picture type are input from the control unit 3 shown in FIG.
Is supplied to the encoding control circuit 26 via. Further, the coding control circuit 26 outputs the coding generation information such as the prediction mode and the generated code amount obtained at the time of coding to the output terminal 28.
It is given to the control unit 3 (see FIG. 8) via the.

【0022】ところで、図8に示す制御部3は、符号化
部2(図10参照)に与える量子化ステップなどのパラ
メータを変更することにより符号量の制御を行うように
している。この符号量制御においては、1つにMPEG
2で規定されるVBV(Video Buffering Verifier)に
よるものがある。通常、符号化データは異なったピクチ
ャタイプまたはその原画像の性質により大きく異なるた
め、一定ビットレートのチャネルに符号化データを蓄積
または伝送しようとすると、必然的に符号化器及び復号
化器においてバッファを備える必要がある。つまり、符
号化器側のバッファ容量に基づいて符号化部による発生
符号量を制御することで、符号化器側のバッファから出
力される符号化データの符号量を一定のビットレートに
する。この場合、各GOP毎の先頭部(シーケンスヘッ
ダ)には、バッファ容量に基づく制御(VBV制御)で
符号化する情報を付加する。この情報はVBVとして符
号器が符号化時に想定する復号器側のバッファ容量を示
すものとなる。このように、VBV等の符号化情報に基
づいて発生符号量を制御することにより、符号化器及び
復号化器側のバッファにおけるオーバーフローやアンダ
ーフローを防止して、実際の想定する復号器が正しく動
作することを保障するようにしている。
By the way, the control unit 3 shown in FIG. 8 controls the code amount by changing parameters such as the quantization step given to the encoding unit 2 (see FIG. 10). In this code amount control, one is MPEG
Some are based on VBV (Video Buffering Verifier) specified in 2. Usually, coded data greatly differs depending on the characteristics of different picture types or their original images. Therefore, when the coded data is stored or transmitted in a channel having a constant bit rate, it is inevitably buffered in the encoder and the decoder. Must be provided. That is, by controlling the generated code amount by the encoding unit based on the buffer capacity on the encoder side, the code amount of the encoded data output from the buffer on the encoder side becomes a constant bit rate. In this case, information to be encoded by control based on the buffer capacity (VBV control) is added to the head portion (sequence header) of each GOP. This information is VBV and indicates the buffer capacity on the decoder side assumed by the encoder at the time of encoding. In this way, by controlling the generated code amount based on the coding information such as VBV, overflow and underflow in the buffers of the encoder and the decoder are prevented, and the actually assumed decoder is correctly I try to guarantee that it works.

【0023】上述したように図8に示す符号化データ編
集装置では、符号化部2により得られる符号化データは
ディジタル信号記録部4及び5に与えて、制御部3から
の記録制御信号に基づき前記ディジタル信号記録部4及
び5の内の一方に記録するようになっている。
As described above, in the coded data editing apparatus shown in FIG. 8, the coded data obtained by the coding section 2 is given to the digital signal recording sections 4 and 5, and based on the recording control signal from the control section 3. It is adapted to be recorded in one of the digital signal recording sections 4 and 5.

【0024】例えば、前記符号化部2(図8参照)によ
り異なる符号化データが生成され且つディジタル信号記
録部4及び5に異なる符号化データがそれぞれ記録され
た場合に、これら2つの符号化データ間で編集を行うも
のとする。すると、ディジタル信号記録部4及び5は、
それぞれ制御信号を置換部6に与える。また同時に置換
部6はディジタル信号記録部4及び5に記録を制御する
ための制御信号をそれぞれ与える。即ち、置換部6は両
者のディジタル信号記録部のデータの読み出し及び書き
込みを制御することができる。この場合、置換部6は制
御部3から供給される置換箇所を制御する制御信号に基
づき、ディジタル信号記録部4及び5に記録されている
一方の符号化データの一部のGOPを、他方の符号化デ
ータの一部のGOPに置換する。また置換部6では必要
に応じてGOPヘッダ中のブロークン・リンク・フラグ
を変更する。
For example, when different encoded data is generated by the encoding unit 2 (see FIG. 8) and different encoded data is recorded in the digital signal recording units 4 and 5, respectively, these two encoded data It shall be edited between. Then, the digital signal recording units 4 and 5
Control signals are applied to the replacement unit 6, respectively. At the same time, the replacing section 6 gives control signals for controlling recording to the digital signal recording sections 4 and 5, respectively. That is, the replacement unit 6 can control the reading and writing of data in both digital signal recording units. In this case, the replacement unit 6 uses the control signal supplied from the control unit 3 to control the replacement location and replaces a part of the GOP of one encoded data recorded in the digital signal recording units 4 and 5 with the other. Replace with a part of GOP of encoded data. Further, the replacing unit 6 changes the broken link flag in the GOP header as needed.

【0025】次に、このような図8に示す符号化データ
編集装置を用いて、一度符号化した原動画像信号の一部
分だけを異なった符号化パラメータにより再符号化し、
元の符号化データと置換する場合の動作例を図11を参
照しながら説明する。通常このような再符号化は、最初
に行った符号化の結果に得られる符号化データを復号す
ると、画質の劣化が大きくなる場合がある。そこで、こ
のような場合に劣化した部分の量子化ステップを小さく
するなどして画質の向上を目的として行われている。
Next, using the coded data editing apparatus shown in FIG. 8, only a part of the once-coded original image signal is re-encoded by different encoding parameters,
An operation example when replacing the original encoded data will be described with reference to FIG. Usually, in such re-encoding, when the encoded data obtained as the result of the first encoding is decoded, the image quality may be greatly deteriorated. Therefore, in this case, the image quality is improved by reducing the quantization step of the deteriorated part.

【0026】図11は図8の動作を説明するための説明
図であり、最初に動画像信号を符号化した符号化データ
を符号化データAとし、前記動画像信号中の一部を再符
号化した符号化データを符号化データBとし、最終的に
編集により得られる符号化データを符号化データCと示
されている。
FIG. 11 is an explanatory diagram for explaining the operation of FIG. 8, in which the encoded data obtained by first encoding the moving image signal is the encoded data A, and a part of the moving image signal is re-encoded. The encoded data that has been encoded is referred to as encoded data B, and the encoded data that is finally obtained by editing is referred to as encoded data C.

【0027】いま、ある動画像信号を入力端子1に入力
したものとする。すると、入力動画像信号は符号化部2
(図8参照)により上述したような処理を施して符号化
が行われる。このとき、符号化したデータは図11に示
すように符号化データAとなる。その後、符号化データ
Aはディジタル信号記録部4に与えられて記録する。次
に、前記符号化データAの内、再度符号化を行いたい部
分を含むGOPを、例えばGOP1乃至GOP3とする
と、符号化部2はこのGOP1乃至GOP3に対応する
原動画像信号を、最初の符号化と異なった符号化パラメ
ータを用いて符号化を行い出力する。このとき、最初の
GOPであるGOP1′は、前のGOPの画像に対し参
照することができないため、クローズドGOP(closed
GOP)となる。これにより得られる符号化データは、図
11の中段に示すようにGOP1′乃至GOP3′より
構成される符号化データBとなり、その後この符号化デ
ータBはディジタル信号記録部5に与えられて記録す
る。そして、置換部6は符号化データA中のGOP1乃
至GOP3を符号化データBと置換すると共に、GOP
4のGOPヘッダ中のブロークン・リンク・フラグ を
“1”とする。こうして置換された後のデータ、即ち再
符号化を行ったデータは、図11下段に示すような符号
化データCとなる。つまり、符号化データAのGOP1
乃至GOP3の再符号化を行った結果である符号化デー
タCを得ることができる。そして、この符号化データC
はディジタル信号記録部4によって再度記録され、符号
化データ編集装置の動作を完了する。
It is assumed that a moving image signal is input to the input terminal 1. Then, the input moving image signal is transmitted to the encoding unit 2
(See FIG. 8), the above-described processing is performed and encoding is performed. At this time, the encoded data becomes the encoded data A as shown in FIG. Thereafter, the encoded data A is given to the digital signal recording unit 4 and recorded. Next, if the GOP including the portion to be re-encoded in the encoded data A is, for example, GOP1 to GOP3, the encoding unit 2 outputs the moving image signal corresponding to the GOP1 to GOP3 as the first encoded signal. Encoding is performed using an encoding parameter different from the encoding and output. At this time, since the first GOP GOP1 'cannot refer to the image of the previous GOP, the closed GOP (closed
GOP). The coded data thus obtained becomes coded data B composed of GOP1 'to GOP3' as shown in the middle part of FIG. 11, and thereafter this coded data B is given to the digital signal recording unit 5 and recorded. . Then, the replacing unit 6 replaces GOP1 to GOP3 in the encoded data A with the encoded data B, and
The broken link flag in the GOP header of No. 4 is set to "1". The data after the replacement in this way, that is, the data that has been re-encoded becomes the encoded data C as shown in the lower part of FIG. That is, GOP1 of encoded data A
It is possible to obtain encoded data C which is a result of re-encoding GOP3. Then, this encoded data C
Is recorded again by the digital signal recording unit 4, and the operation of the encoded data editing device is completed.

【0028】しかしながら、このような符号化データ編
集装置では、編集箇所の再符号化時において、符号化デ
ータBの先頭部直前のVBVバッファ占有量は最初に符
号化された符号化データAの先頭部直前のVBVバッフ
ァ占有量とは必ずしも同一なものであるとは限らない。
この場合、符号化データBの符号量は符号化データAの
置換部分に対応するGOP1乃至GOP3の符号量とは
一致しないこともある。また、前記符号化データBを元
の符号化データAの置換部分と置換して符号化データC
を生成した場合においても、置換箇所以降、即ちGOP
4以降の符号量も元の符号化データAに対応する符号量
と一致しない。つまり、従来の装置では、VBVバッフ
ァから一定のビットレートで符号化データを出力するた
めに符号化時の発生符号量をVBVに基づく情報により
制御しているが、置換作業に伴う再符号処理を行うと、
このVBV制御が正常に行うことが出来なくなってしま
う。編集箇所以降のGOPを全て置換する場合には問題
はないが、編集箇所部分のみ置換した場合には、VBV
制御を連続して行うことが出来ない場合もある。このた
め、復号時において、想定する復号器の入力バッファが
オーバーフローまたはアンダーフローを起こしてしまう
という虞れがある。
However, in such a coded data editing apparatus, the VBV buffer occupancy immediately before the head of the coded data B is the head of the coded data A coded first when the coded data is recoded. The VBV buffer occupancy immediately before the copy is not always the same.
In this case, the code amount of the encoded data B may not match the code amount of GOP1 to GOP3 corresponding to the replacement portion of the encoded data A. Further, the encoded data B is replaced with the replacement portion of the original encoded data A to obtain the encoded data C.
Even when is generated, after the replacement part, that is, GOP
The code amount after 4 does not match the code amount corresponding to the original encoded data A. That is, in the conventional device, the amount of generated code at the time of encoding is controlled by the information based on VBV in order to output the encoded data from the VBV buffer at a constant bit rate, but the re-encoding process accompanying the replacement work is performed. When you do
This VBV control cannot be performed normally. There is no problem when replacing all GOPs after the edited part, but when replacing only the edited part, VBV
In some cases, control cannot be performed continuously. Therefore, at the time of decoding, the input buffer of the assumed decoder may overflow or underflow.

【0029】また、上述したように符号化データの一部
分に対応する原動画像信号の符号化を行う際、再符号化
を行う最初のGOPの最初のIピクチャに続くBピクチ
ャが過去の画像との相関性が高く、またこのBピクチャ
内の多くのマクロブロックのMC予測モードが前方予測
あるいは双方向予測モードのものである場合、このGO
PをクローズドGOPとして再符号化することから、元
の符号量よりも符号量が増加してしまい、または復号時
の画質が劣化してしまう場合もある。
Further, as described above, when the moving picture signal corresponding to a part of the coded data is coded, the B picture following the first I picture of the first GOP to be recoded is regarded as a past picture. This GO is highly correlated and the MC prediction mode of many macroblocks in this B picture is the forward prediction or bidirectional prediction mode.
Since P is re-encoded as a closed GOP, the code amount may increase from the original code amount, or the image quality at the time of decoding may deteriorate.

【0030】更に、編集により生じたブロークン・リン
ク・フラグが“1”であるGOPにおける最初のIピク
チャに続くBピクチャは、復号器により正しく復号され
ないが、このフラグがたっているGOPが復号器に入力
されたときの復号器の動作は規定されておらず、このた
め再生画像は復号器の構成により異なるものとなってし
まうという問題点もあった。
Further, a B picture following the first I picture in a GOP having a broken link flag of "1" generated by editing is not correctly decoded by the decoder, but the GOP having this flag is transmitted to the decoder. There is also a problem that the operation of the decoder when input is not specified, and thus the reproduced image varies depending on the configuration of the decoder.

【0031】[0031]

【発明が解決しようとする課題】上記の如く、従来の符
号化データ編集装置では、動画像信号の符号化データの
一部を再符号化して編集した場合に、編集した符号化デ
ータにおける編集箇所以降の部分においてはVBVバッ
ファによる符号量の制御が連続して行われないため、再
符号化処理をした置換部分の発生符号量と元の置換箇所
に対応する符号化データの符号量とは一致せず、結局、
一定のビットレートで出力することができなくなり、復
号時における復号器の入力バッファがオーバーフローま
たはアンダーフローを起こしてしまう虞れがある。
As described above, in the conventional coded data editing device, when a part of the coded data of the moving image signal is recoded and edited, the edited part in the edited coded data is edited. Since the control of the code amount by the VBV buffer is not continuously performed in the subsequent portions, the generated code amount of the replaced portion subjected to the re-encoding processing and the code amount of the encoded data corresponding to the original replacement portion match. No, after all,
It becomes impossible to output at a constant bit rate, which may cause overflow or underflow in the input buffer of the decoder at the time of decoding.

【0032】また、再符号化を行う動画像信号の最初の
GOPをクローズドGOPとして再符号化すると、元の
符号量より符号量が増大してしまい、復号時の画質が劣
化してしまういう問題点もある。
Further, when the first GOP of the moving picture signal to be re-encoded is re-encoded as a closed GOP, the code amount increases from the original code amount and the image quality at the time of decoding deteriorates. There are also points.

【0033】更に、編集後の符号データは、ブロークン
・リンク・フラグを“1”としたGOPを含めて復号器
に与えて復号されることになるが、ブロークン・リンク
・フラグがたっているGOPの入力時には、復号器の動
作は規定されていないため、再生画像は復号器の構成に
より異なるものとなってしまうという問題点もある。
Further, the coded data after editing will be given to the decoder including the GOP having the broken link flag set to "1" to be decoded, but the GOP having the broken link flag will be decoded. At the time of input, since the operation of the decoder is not specified, there is also a problem that the reproduced image differs depending on the configuration of the decoder.

【0034】そこで、本発明は上記問題点に鑑みてなさ
れたもので、編集後の符号化データの復号時に復号器の
入力バッファがオーバーフロー又はアンダーフローを発
生しないように符号化データの編集を行うことのできる
符号化データ編集装置の提供を目的とする。
Therefore, the present invention has been made in view of the above problems, and edits encoded data so that the input buffer of the decoder does not overflow or underflow when the encoded data after editing is decoded. It is an object of the present invention to provide a coded data editing device capable of performing the above.

【0035】また、本発明は、原動画像信号の一部を再
符号化して符号化データの編集を行う場合にも、符号量
を増大することなく最適な符号量に抑制することのでき
る符号化データ編集装置の提供を他の目的とする。
Further, according to the present invention, even when a part of the moving image signal is re-encoded to edit the encoded data, the encoding can be suppressed to the optimum code amount without increasing the code amount. Another purpose is to provide a data editing device.

【0036】更に、本発明は、編集後の符号化データを
復号する際に、復号器の構成に依存する不確実な再生動
作を防ぐと共に、違和感の少ない再生画像を復号できる
ように編集を行うことのできる符号化データ編集装置の
提供を他の目的とする。
Further, according to the present invention, when decoding the coded data after editing, an uncertain reproduction operation depending on the configuration of the decoder is prevented, and the reproduction image with less discomfort is edited. It is another object to provide a coded data editing device capable of performing the above.

【0037】[0037]

【課題を解決するための手段】本発明の符号化データ編
集装置は、入力された動画像信号を符号化して符号化出
力を生成すると共に、符号化時に想定する復号器側のバ
ッファの状態を含む情報を生成する符号化手段と、前記
復号器側のバッファの状態に基づいて発生符号量を制御
する第1の符号量制御を採用し、前記符号化手段に入力
動画像信号を与えて第1の符号化パラメータを用いて符
号化させて第1の符号化出力を得る第1の符号化制御手
段と、前記第1の符号化出力の一部を置換部とし所定の
動画像信号を前記符号化手段に与えて、前記置換部の先
頭における前記復号器側のバッファの状態を前記第1の
符号量制御における初期値として第2の符号化パラメー
タを用いて再符号化させて前記置換部の第1の符号化出
力に代えて出力すると共に、再符号化によって発生する
発生符号量を前記第1の符号化出力の置換部の符号量と
一致させる第2の符号化制御手段と、を具備したもので
ある。
A coded data editing apparatus according to the present invention codes an input moving image signal to generate a coded output, and at the same time sets the state of a buffer on the decoder side assumed at the time of coding. Adopting a first code amount control for controlling a generated code amount on the basis of a state of a buffer on the side of the decoder and an encoding means for generating information including the input moving image signal to the encoding means, First encoding control means for obtaining a first encoded output by encoding using a first encoding parameter, and a part of the first encoded output as a replacement portion for generating a predetermined moving image signal The replacing means is provided to the encoding means to re-encode the state of the buffer on the decoder side at the head of the replacing section using the second encoding parameter as an initial value in the first code amount control to replace the replacing section. Output instead of the first encoded output of Together, it is obtained by including a second encoding control means for the generated code amount generated by re-encoding to match the code amount of the first substitution of the encoded output, the.

【0038】[0038]

【作用】本発明においては、符号化手段は入力された動
画像信号を符号化して符号化出力を生成すると共に、符
号化時に想定する復号器側のバッファの状態を含む情報
を生成する。第1の符号化制御手段は、前記復号器側の
バッファの状態に基づいて発生符号量を制御する第1の
符号量制御を採用し、前記符号化手段に入力動画像信号
を与えて第1の符号化パラメータを用いて符号化させて
第1の符号化出力を得る。第2の符号化制御手段は前記
第1の符号化出力の一部を置換部とし所定の動画像信号
を前記符号化手段に与えて、前記置換部の先頭における
前記復号器側のバッファの状態を前記第1の符号量制御
における初期値として第2の符号化パラメータを用いて
再符号化させると共に、再符号化によって発生する発生
符号量を前記第1の符号化出力の置換部の符号量と一致
させる。これにより、符号時にVBV制御を連続して行
うことができるため、一定のビットレートで符号化デー
タを出力することができる。よって、編集後の符号化デ
ータは復号器のバッファに供給されてもオーバーフロー
又はアンダーフローを起こさないように符号化データを
編集することが可能となる。
In the present invention, the coding means codes the input moving image signal to generate a coded output, and also generates information including the state of the buffer on the decoder side assumed at the time of coding. The first coding control means adopts a first code quantity control for controlling a generated code quantity based on a state of a buffer on the decoder side, and gives an input moving image signal to the coding means to generate a first coding quantity. The first encoded output is obtained by encoding using the encoding parameter of. The second coding control means uses a part of the first coded output as a replacement section to supply a predetermined moving image signal to the coding means, and the state of the buffer on the decoder side at the head of the replacement section. Is re-encoded using the second encoding parameter as an initial value in the first code amount control, and the generated code amount generated by the re-encoding is the code amount of the replacement unit of the first encoded output. To match. As a result, since VBV control can be continuously performed at the time of encoding, encoded data can be output at a constant bit rate. Therefore, it is possible to edit the encoded data so that the edited encoded data does not overflow or underflow even when supplied to the buffer of the decoder.

【0039】[0039]

【実施例】実施例について図面を参照して説明する。An embodiment will be described with reference to the drawings.

【0040】図1は本発明に係る符号化データ編集装置
の一実施例を示すブロック図である。図1に示す装置
は、図8に示す装置と同様の構成要素には同一符号を付
しているる。
FIG. 1 is a block diagram showing an embodiment of the encoded data editing apparatus according to the present invention. In the device shown in FIG. 1, the same components as those of the device shown in FIG. 8 are designated by the same reference numerals.

【0041】本実施例においては、図8示す従来の符号
化データ編集装置の構成に加え、更に符号化部2を制御
するための情報を記録する第3のディジタル信号記録部
7を備えたことが異なる点である。
In the present embodiment, in addition to the structure of the conventional encoded data editing apparatus shown in FIG. 8, a third digital signal recording section 7 for recording information for controlling the encoding section 2 is further provided. Is the difference.

【0042】図1において、入力端子1には原動画像信
号を入力する。原動画像信号はMPEG2方式による符
号化部2に与える。符号化部2は従来技術と同様に制御
部3からのピクチャタイプ及び量子化ステップなどの符
号化パラメータ制御信号に基づき原動画像信号の符号化
処理を行う。また符号化部2は符号量制御を行うための
発生符号量等の符号化情報を制御部3に与える。符号化
部2によって符号化された符号化データはディジタル信
号記録部4及び5に与える。
In FIG. 1, a driving image signal is input to the input terminal 1. The moving image signal is given to the encoder 2 according to the MPEG2 system. The encoding unit 2 performs the encoding process of the moving image signal based on the encoding parameter control signal such as the picture type and the quantization step from the control unit 3 as in the conventional technique. The encoding unit 2 also provides the control unit 3 with encoding information such as a generated code amount for controlling the code amount. The encoded data encoded by the encoding unit 2 is given to the digital signal recording units 4 and 5.

【0043】制御部3はそれぞれディジタル信号記録部
4及び5に記録制御信号を与えて、ディジタル信号記録
部4及び5の内、一方のディジタル信号記録部に符号化
データを記録させるように制御する。置換部6は各ディ
ジタル信号記録部4、5のデータの読み出し及び書き込
みを行うことができるようになっている。例えば、両者
のディジタル信号記録部4、5を用いて符号化データを
置換する場合には、置換部6は制御部3からの置換箇所
を制御する信号に基づき、ディジタル信号記録部4及び
5に記録されている一方の符号化データの一部を他方の
符号化データの一部に置換する。
The control section 3 gives a recording control signal to the digital signal recording sections 4 and 5, respectively, and controls so that one of the digital signal recording sections 4 and 5 records the encoded data. . The replacing unit 6 can read and write data in the digital signal recording units 4 and 5. For example, when the encoded data is replaced by using both digital signal recording units 4 and 5, the replacing unit 6 causes the digital signal recording units 4 and 5 to perform the replacement based on the signal from the control unit 3 which controls the replacement location. A part of the recorded one encoded data is replaced with a part of the other encoded data.

【0044】また、制御部3は、符号化が行われた際の
符号化部2を制御するための符号化パラメータ、ピクチ
ャ毎のVBVバッファ占有量及び符号化部2から得られ
るピクチャ毎の発生符号量などの情報をディジタル信号
記録部7に与える。ディジタル信号記録部7は与えられ
た情報を記録する。また、制御部3はディジタル信号記
録部7に記録された情報の読み出しを制御することもで
きる。即ち、ディジタル信号記録部7から読み出された
情報は制御部3に与える。
The control unit 3 also controls the coding parameters for controlling the coding unit 2 when the coding is performed, the VBV buffer occupation amount for each picture, and the generation for each picture obtained from the coding unit 2. Information such as the code amount is given to the digital signal recording unit 7. The digital signal recording section 7 records the given information. The control unit 3 can also control the reading of the information recorded in the digital signal recording unit 7. That is, the information read from the digital signal recording unit 7 is given to the control unit 3.

【0045】次に、図1に示す編集装置を用いて一度符
号化した原動画像信号の一部分だけを異なった符号化パ
ラメータにより再符号化し、元の符号化データの対応す
る部分と置換する場合の動作例を図2を参照しながら説
明する。
Next, in the case of re-encoding only a part of the moving image signal once encoded using the editing apparatus shown in FIG. 1 with different encoding parameters and replacing it with the corresponding part of the original encoded data. An operation example will be described with reference to FIG.

【0046】図2は図1に示す符号化データ編集装置の
動作を説明するための説明図であり、図中上段に原動画
像信号を符号化した符号化データAのGOP構成を示
し、図中中段には編集箇所における原動画像信号を再符
号化した符号化データBのGOP構成を示し、図中下段
には編集後の符号化データCのGOP構成を示してい
る。 いま、入力端子1に原動画像信号を入力したもの
とする。すると、符号化データ編集装置は、符号化部2
を用いて入力された原動画像信号を最初から最後まで通
して符号化を行う。即ち、この符号化データは図中上段
に示す符号化データAとなる。その後、この符号化デー
タAはディジタル信号記録部4に与えて記録する。この
とき、符号化を行った際における符号化部2を制御する
ための符号化パラメータ、ピクチャ毎のVBVバッファ
占有量及びピクチャ毎の発生符号量などの情報を同時に
ディジタル信号記録部7に記録する。
FIG. 2 is an explanatory diagram for explaining the operation of the encoded data editing apparatus shown in FIG. 1, and shows the GOP structure of the encoded data A obtained by encoding the moving image signal in the upper part of the figure. The middle row shows the GOP structure of the coded data B obtained by re-encoding the moving image signal at the edited location, and the lower part of the figure shows the GOP structure of the coded data C after editing. Now, it is assumed that the moving image signal is input to the input terminal 1. Then, the encoded data editing device includes the encoding unit 2
The moving image signal input by using is encoded from the beginning to the end. That is, this encoded data becomes the encoded data A shown in the upper part of the figure. Thereafter, the encoded data A is given to the digital signal recording unit 4 and recorded. At this time, information such as a coding parameter for controlling the coding unit 2 at the time of coding, the VBV buffer occupation amount for each picture, and the generated code amount for each picture is simultaneously recorded in the digital signal recording unit 7. .

【0047】次に、符号化をやり直したい部分を含むG
OP(GOP1乃至GOP3)に対応する原動画像信号
を、異なった符号化パラメータを用いて符号化する。こ
のとき、制御部3は符号化データAを生成した際の再符
号化を行う部分の直前のVBVバッファ占有量を前記デ
ィジタル信号記録部7より読み出す。そして、制御部3
はこの読み出したVBVバッファ占有量を再符号化する
際のVBVバッファ占有量の初期値とすると共に、符号
化データAを生成した際の再符号化を行う部分の発生符
号量を読み出して累計を行い、これを再符号化を行う部
分の割り当て符号量として設定する。即ち、再符号化処
理時にVBV制御するのに用いられるVBVバッファ占
有量を、符号化データAを生成した際のVBVバッファ
占有量と同様のVBVバッファ占有量とすることで、再
符号化処理を行う符号化データBの先頭部におけるGO
Pの発生符号量を前記符号化データAの対応するGOP
の発生符号量と一致させるためである。また、符号化デ
ータAを生成した際の再符号化を行う部分の発生符号量
を読み出して累計を行い、再符号化を行う部分の割り当
て符号量とすることにより、符号化データBの発生符号
量と、対応する部分の元の符号化データAの発生符号量
とを一致させるようにする。
Next, G including a portion to be re-encoded
The moving image signals corresponding to OPs (GOP1 to GOP3) are encoded using different encoding parameters. At this time, the control unit 3 reads from the digital signal recording unit 7 the VBV buffer occupation amount immediately before the portion to be re-encoded when the encoded data A is generated. And the control unit 3
Is used as the initial value of the VBV buffer occupancy when re-encoding the read VBV buffer occupancy, and the generated code amount of the portion that is re-encoded when the encoded data A is generated is read and the total is calculated. Then, this is set as the assigned code amount of the portion to be re-encoded. That is, the re-encoding process is performed by setting the VBV buffer occupancy used for VBV control during the re-encoding process to the same VBV buffer occupancy as the VBV buffer occupancy when the encoded data A was generated. GO at the beginning of encoded data B to be performed
The generated code amount of P is the GOP corresponding to the encoded data A.
This is to match the generated code amount of. Further, the generated code amount of the encoded data A is generated, the generated code amount of the portion to be re-encoded is read and accumulated, and the accumulated code amount is set to the allocated code amount of the portion to be re-encoded. The amount and the generated code amount of the original encoded data A of the corresponding portion are matched.

【0048】そして制御部3は、設定したVBVバッフ
ァ初期値を用いてVBV制御を開始する。即ち、制御部
3は割り当て符号量を超えないように符号化部2を制御
して再符号化を行う。このとき、最初の符号化を行った
ときと同様に符号化パラメータ、発生符号量及びVBV
バッファ占有量をディジタル信号記録部7に記録してお
く。こうして、再符号により得られる符号化データは図
中中段に示すような符号化データB(GOP1′乃至G
OP3′)となり、この符号化データBはディジタル信
号記録部5によって記録する。
Then, the control unit 3 starts the VBV control using the set VBV buffer initial value. That is, the control unit 3 controls the encoding unit 2 so as not to exceed the assigned code amount and performs re-encoding. At this time, the coding parameters, the generated code amount, and the VBV are the same as when the first coding is performed.
The buffer occupation amount is recorded in the digital signal recording unit 7. In this way, the coded data obtained by re-encoding is coded data B (GOP1 'to GOP1' to GOP1 'through G0
OP3 '), and the encoded data B is recorded by the digital signal recording unit 5.

【0049】その後、置換部6は符号化データA中のG
OP1乃至GOP3を符号化データB、即ちGOP1′
乃至GOP3′と置換する操作を行う。この場合、制御
部3は置換部3に制御信号を与えて置換箇所を制御す
る。また制御部3はディジタル信号記録部7に記録され
ているGOP1乃至GOP3を構成するピクチャの符号
量と、GOP1′乃至GOP3′を構成するピクチャの
符号量とを読み出し、これらの符号量から元の符号量と
再符号化したときの符号量との差を求める。例えば、結
果としてGOP1′乃至GOP3′を構成するピクチャ
の符号量がGOP1乃至GOP3を構成するピクチャの
符号量より下回るようであれば、制御部3は置換部6に
対し、再符号化により減少した分だけ符号“0”スタッ
フィングビット(バイト)を符号化データBに付加する
ように制御する。これにより、図2に示すように置換後
の符号化データCにおける置換部分の発生符号量は元の
符号化データAに対応するGOPの発生符号量と一致し
たものとなる。このスタッフィングビットは、復号動作
時には意味を持たないものである。つまり、復号動作時
では、MPEG2方式のVBV規定によりピクチャデー
タの後に続くスタッフィングビットはそのピクチャデー
タと共にVBVバッファより除去されることになる。こ
のため、GOP3′の最後のピクチャデータがVBVバ
ッファにより除去された直後のVBVバッファ占有量
は、元の符号化を行った際のGOP3の最後のピクチャ
がVBVバッファより除去された直後のVBVバッファ
占有量と同じ値となる。結局、得られた編集後の符号化
データは図2下段に示す符号化データCとなり、即ち、
想定される復号側のVBVバッファ容量を満足するもの
となる。その後、この符号化データCはディジタル信号
記録部4によって、再度記録する。
After that, the replacing unit 6 selects G in the encoded data A.
OP1 to GOP3 are coded data B, that is, GOP1 '
To GOP3 'are replaced. In this case, the control unit 3 gives a control signal to the replacement unit 3 to control the replacement location. Further, the control unit 3 reads out the code amount of the pictures forming the GOP1 to GOP3 and the code amount of the pictures forming the GOP1 'to GOP3' recorded in the digital signal recording unit 7, and based on these code amounts, the original The difference between the code amount and the code amount when re-encoding is calculated. For example, if, as a result, the code amount of the pictures forming GOP1 ′ to GOP3 ′ is lower than the code amount of the pictures forming GOP1 to GOP3, the control unit 3 decreases the replacement unit 6 by re-encoding. The code "0" stuffing bit (byte) is added to the encoded data B by the amount. As a result, as shown in FIG. 2, the generated code amount of the replaced portion in the coded data C after the replacement matches the generated code amount of the GOP corresponding to the original coded data A. This stuffing bit has no meaning during the decoding operation. That is, during the decoding operation, the stuffing bit following the picture data is removed from the VBV buffer together with the picture data according to the VBV standard of the MPEG2 system. Therefore, the VBV buffer occupancy immediately after the last picture data of GOP3 'is removed by the VBV buffer is the VBV buffer occupancy immediately after the last picture of GOP3 at the time of original encoding is removed from the VBV buffer. It has the same value as the occupancy. Eventually, the obtained encoded data after editing becomes the encoded data C shown in the lower part of FIG. 2, that is,
This satisfies the assumed VBV buffer capacity on the decoding side. Then, the coded data C is recorded again by the digital signal recording unit 4.

【0050】したがって、本実施例によれば、置換編集
するために再符号化処理を行った場合でも、確実にVB
V制御を行うことができることにより、発生符号量を制
御することができ、符号化器のバッファからは一定のビ
ットレートで符号化データを出力することが可能とな
る。このため、編集後のディジタル信号記録部4に記録
されている符号化データCを復号する場合には、当該符
号化データCはVBVバッファを満たすものであること
から、復号器に入力したとしても復号器の入力バッファ
はオーバーフローまたはアンダーフローを生じることな
く、良好に復号することができる。尚、再符号化を行っ
た部分の減少量を補償するために本例においては、GO
P3′の後にスタッフィングビットを付加するように説
明したが、前記スタッフィングビットの代わりに、置換
部分の後のGOP4におけるGOPヘッダの直前にシー
ケンスヘッダ及びシーケンスエクステンションまたはユ
ーザデータ等を挿入するように制御しても良く、この場
合でも同様の効果を得ることができる。
Therefore, according to the present embodiment, even if the re-encoding processing is performed for the replacement editing, the VB is surely performed.
Since the V control can be performed, the generated code amount can be controlled, and the encoded data can be output from the buffer of the encoder at a constant bit rate. Therefore, when the coded data C recorded in the edited digital signal recording unit 4 is to be decoded, the coded data C fills the VBV buffer, and therefore even if the coded data C is input to the decoder. The input buffer of the decoder can be decoded well without overflow or underflow. In order to compensate the reduction amount of the re-encoded portion, in this example, GO
Although the stuffing bit is added after P3 ', the stuffing bit is replaced by a sequence header and a sequence extension or user data immediately before the GOP header in the GOP4 after the replacement part. However, the same effect can be obtained even in this case.

【0051】また、本例では、スタッフィングビット等
の挿入は置換部6による制御で行ったことについて説明
したが、例えば符号化部2で符号量を補償するためのス
タッフィングビットの挿入を行うように構成しても良
い。この場合、データ量はディジタル信号記録部7に記
録された値を用いるのではなく、ディジタル信号記録部
4及び5の各符号化データより検出し、検出結果に基づ
いて設定するようにする。
In this example, the stuffing bit and the like are inserted under the control of the replacing unit 6. However, for example, the stuffing bit for compensating the code amount is inserted in the encoding unit 2. It may be configured. In this case, the data amount does not use the value recorded in the digital signal recording unit 7, but is detected from each encoded data of the digital signal recording units 4 and 5, and is set based on the detection result.

【0052】ところで、上記のように原動画像信号の途
中より再符号化を行う場合、再符号化の開始部分では前
の画像を参照できないため、最初のGOPはクローズド
GOPとなる。このとき、そのGOPの内、符号化順で
最初のIピクチャに続くBピクチャが過去の画像との相
関が高い場合には、最初の符号化処理においては、通常
前方予測または双方向予測を多く用いて符号量を少なく
なるようにする。しかし、前述のように再符号化を行う
と、上述の予測を用いることができなくなる。このた
め、最初の符号化と同程度の品質の画像を復号できる符
号化データを生成しようとすると、その符号量は増加し
てしまう場合がある。また、最初の符号化と同程度の符
号量の符号化データとすると、その復号画像の品質は元
の符号化データの復号画像の品質よりも劣化してしまう
場合もある。
By the way, when re-encoding is performed from the middle of the moving image signal as described above, since the previous image cannot be referred to at the re-encoding start portion, the first GOP is a closed GOP. At this time, if the B picture following the first I picture in the GOP has a high correlation with the past image in the GOP, the forward coding or the bidirectional prediction is usually performed in the first coding process. It is used to reduce the code amount. However, if the re-encoding is performed as described above, the above prediction cannot be used. Therefore, if it is attempted to generate coded data capable of decoding an image having the same quality as the first coding, the code amount may increase. Further, if the coded data has a code amount similar to that of the first coding, the quality of the decoded image may be deteriorated as compared with the quality of the decoded image of the original coded data.

【0053】そこで、最初の符号化を行う際に、制御部
3では符号化部2より得る各マクロブロックの予測モー
ドを元に各ピクチャの過去の画像の参照の程度、例え
ば、そのピクチャ中で前方予測及び双方向予測モードの
マクロブロックの個数をディジタル信号記録部7に記録
しておく。そして再符号化を行う際には、GOPの符号
化順で最初のIピクチャに続くBピクチャの過去の画像
の参照程度が小さい部分を前記マクロブロックの個数に
より検出し、再符号化はそのGOPに対応する部分より
開始する。例えば、制御部3は符号化データBよりも前
の画像を参照画像として予測符号化されたマクロブロッ
ク数を画像毎に検出し、検出したブロック数が所定値よ
りも少ない画像に対応する符号化データAのGOPを置
換部分の先頭として、このGOPに対応する動画像信号
より再符号化させる。これにより、途中のGOPからの
再符号化に伴う符号量の増加または復号画像の品質の劣
化を抑制することができる。
Therefore, when performing the first encoding, the control unit 3 refers to the degree of reference to the past image of each picture, for example, in that picture, based on the prediction mode of each macroblock obtained from the encoding unit 2. The number of macroblocks in the forward prediction and bidirectional prediction modes is recorded in the digital signal recording unit 7. When performing re-encoding, a portion of the B-picture following the first I-picture in the GOP encoding order, which has a small degree of reference to the past image, is detected by the number of the macroblocks, and re-encoding is performed for the GOP. Start from the part corresponding to. For example, the control unit 3 detects, for each image, the number of macroblocks that are predictively coded using an image before the encoded data B as a reference image, and encodes an image in which the detected number of blocks is less than a predetermined value. The GOP of the data A is set as the head of the replacement portion, and the moving image signal corresponding to this GOP is re-encoded. By this means, it is possible to suppress an increase in the code amount or deterioration of the quality of the decoded image due to re-encoding from a GOP in the middle.

【0054】尚、上述の動作例では、最初の符号化時に
ピクチャ毎の過去の画像の参照程度をディジタル信号記
録部7に記録しておき、後に前記参照程度を利用して再
符号化開始する部分を決定するように説明したが、例え
ば前記ディジタル信号記録部7に記録する参照程度を、
GOP毎に過去のGOPの画像の参照程度を用いるよう
にしても良い。また過去のピクチャの参照程度が復号器
等により符号化データから得られる場合には、このとき
の参照程度を読み出して用いるようにしても良い。更
に、上記装置に用いられている符号化方式のMPEG2
では、シーケンス、GOPまたピクチャの各階層毎にユ
ーザが自由に使用可能なユーザデータが挿入することが
できるため、最初の符号化の際に前記過去の画像の参照
程度をこのユーザデータに記述しておくようにすれば、
ディジタル信号記録部7に対する記録の必要は不要とな
り、また容易にこの情報を符号化データより得ることが
できるという効果もある。
In the above operation example, the reference degree of the past image for each picture is recorded in the digital signal recording unit 7 at the time of the first encoding, and the re-encoding is started later by using the reference degree. Although it has been described that the portion is determined, for example, the reference degree recorded in the digital signal recording unit 7 is
The reference level of the image of the past GOP may be used for each GOP. When the reference degree of the past picture is obtained from the encoded data by the decoder or the like, the reference degree at this time may be read and used. Furthermore, the encoding method MPEG2 used in the above apparatus is used.
In this case, since user data that can be freely used by the user can be inserted into each layer of sequence, GOP, or picture, the reference degree of the past image is described in this user data at the time of the first encoding. If you keep it
The digital signal recording unit 7 does not need to be recorded, and this information can be easily obtained from the encoded data.

【0055】次に、従来技術では、編集部分直後のGO
PにおけるGOPヘッダ中のブロークン・リンク・フラ
グを“1”とする必要があるため、そのGOPの最初の
1ピクチャに続くBピクチャの復号は、復号器の構成に
より異なる場合がある。このとき、復号再生画像は異な
るものとなってしまう。そこで、このような問題を防止
するために再符号化を行う際の動作を図3を参照しなが
ら説明する。
Next, in the conventional technique, the GO immediately after the editing portion
Since it is necessary to set the broken link flag in the GOP header in P to "1", decoding of the B picture following the first one picture of the GOP may differ depending on the configuration of the decoder. At this time, the decoded reproduction image becomes different. Therefore, an operation for performing re-encoding to prevent such a problem will be described with reference to FIG.

【0056】図3は図1に示す装置の他の動作例を説明
するための説明図であり、符号化データにおけるGOP
のピクチャ構成及び予測方向の関係を示している。尚、
図中太線で囲む部分は編集時に置換する置換箇所を示
し、また各ピクチャに付してある数字は入力順の番号を
示している。
FIG. 3 is an explanatory diagram for explaining another example of the operation of the apparatus shown in FIG. 1, which is a GOP in encoded data.
2 shows the relationship between the picture configuration and the prediction direction. still,
In the drawing, a portion surrounded by a thick line indicates a replacement portion to be replaced at the time of editing, and the number attached to each picture indicates the number in the input order.

【0057】いま、図8に示す従来の装置と同様に原動
画像信号を、符号化部2を用いて最初から最後まで通し
て符号化を行い、これにより図3上段に示す符号化デー
タAが得られ、この符号化データAをディジタル信号記
録部4に記録したものとする。ここで、例えば符号化デ
ータAの内、GOP1乃至GOP3を前記符号化時とは
異なる符号化パラメータで再符号化する場合には、この
編集部分(GOP1乃至GOP3)の次のGOP、即ち
GOP4における最初のIピクチャ(I26)及びこれ
に続くBピクチャ(B24、B25)に対応する原動画
像信号の符号化も行うようにする。この場合、制御部3
は前記Bピクチャ(B24、B25)の再符号化につい
ては、後方予測及び双方向予測を用いないように符号化
部2を制御する。また、制御部3は前述と同様にGOP
1乃至GOP3に対応する部分の再符号化については、
元の符号量を越えないように符号量制御を行うと共に、
このBピクチャ(B24、B25)に対応する部分につ
いても同様の理由により元の符号量を越えないように制
御する。これにより、ディジタル信号記録部5に得られ
た符号化データBは、図3に示すピクチャ構成及び予測
方向となる。
Now, similarly to the conventional apparatus shown in FIG. 8, the moving image signal is encoded from the beginning to the end by using the encoding unit 2, whereby the encoded data A shown in the upper part of FIG. It is assumed that the encoded data A obtained is recorded in the digital signal recording unit 4. Here, for example, in the case of re-encoding GOP1 to GOP3 in the encoded data A with an encoding parameter different from that at the time of encoding, in the GOP next to this edited portion (GOP1 to GOP3), that is, in GOP4. The original moving picture signals corresponding to the first I picture (I26) and the following B pictures (B24, B25) are also encoded. In this case, the control unit 3
Controls the encoding unit 2 so as not to use backward prediction and bidirectional prediction for re-encoding the B pictures (B24, B25). Further, the control unit 3 controls the GOP as described above.
Regarding re-encoding of the portion corresponding to 1 to GOP3,
While controlling the code amount so that it does not exceed the original code amount,
The portion corresponding to the B picture (B24, B25) is also controlled so as not to exceed the original code amount for the same reason. As a result, the encoded data B obtained in the digital signal recording unit 5 has the picture structure and prediction direction shown in FIG.

【0058】次に、置換部6は符号化データA中のGO
P1乃至GOP3を、符号化データBのGOP1′乃至
GOP3′と置換すると同時に、GOPにおけるBピク
チャにおいてもB24、B25をB24′、B25′と
置換する。このとき、前述と同様に編集前後の符号量を
合わせるためのスタッフィングビット等をGOP1′乃
至GOP3′に挿入する。また同様に、Bピクチャにつ
いてもB24′、B25′にスタッフィングビット等を
付加する。これにより、ディジタル信号記録部4に得ら
れる編集後の符号化データCは、VBVを満たすものと
なる。また符号化データCは図3下段に示すようなピク
チャ構成及び予測の方向を有したものとなる。つまり、
同図に示すように編集部分の直後のGOP4′は、前の
GOPを参照できるためブロークン・リンク・フラグは
“0”であることから、連続して復号処理を行うことが
できる。即ち、復号器の構成によらず同じ復号動作を保
障することができる符号化データを得ることができる。
Next, the replacing unit 6 outputs GO in the encoded data A.
P1 to GOP3 are replaced with GOP1 'to GOP3' of the encoded data B, and at the same time, B24 and B25 are replaced with B24 'and B25' in the B picture in the GOP. At this time, similarly to the above, stuffing bits for matching the code amounts before and after editing are inserted into GOP1 'to GOP3'. Similarly, for B pictures, stuffing bits and the like are added to B24 'and B25'. As a result, the coded data C after editing obtained in the digital signal recording unit 4 satisfies VBV. The coded data C has a picture structure and a prediction direction as shown in the lower part of FIG. That is,
As shown in the figure, since the GOP 4'just after the edited portion can refer to the previous GOP, the broken link flag is "0", so that the decoding process can be continuously performed. That is, it is possible to obtain encoded data that can guarantee the same decoding operation regardless of the configuration of the decoder.

【0059】尚、この場合、再符号化の開始部分とは逆
に、最初の符号化時に各ピクチャの未来画像の参照程
度、例えば後方予測及び双方向予測を行っているマクロ
ブロックの個数を予めディジタル信号記録部7に記録し
ておく。そして、再符号化を行う際には、GOPの符号
化順で最初のIピクチャに続くBピクチャの未来画像の
参照程度が小さい部分を再符号化の終了部とすることに
より、置換を行った部分の最後の部分のつなぎ目におけ
る画質の劣化を抑制することができる。
In this case, contrary to the re-encoding start portion, the reference degree of the future image of each picture at the time of the first encoding, for example, the number of macroblocks for which backward prediction and bidirectional prediction are performed is previously set. It is recorded in the digital signal recording unit 7. Then, when performing re-encoding, replacement is performed by using a portion of the B-picture following the first I-picture in the GOP encoding order, which has a small reference degree of the future image, as the end of re-encoding. It is possible to suppress deterioration of image quality at the joint of the last part of the parts.

【0060】次に、図1に示す符号化データ編集装置の
他の動作例を説明する。
Next, another operation example of the encoded data editing apparatus shown in FIG. 1 will be described.

【0061】本実施例においては、例えば入力端子1へ
の原動画像信号の供給が、ディジタルVTR等の再現性
の高い記録媒体に行われるものとすると、ディジタル信
号記録部7に記録してある最初の符号化で用いたパラメ
ータを再符号化でも利用することにより、編集のつなぎ
目をまたいでの画像の参照が可能な符号化データを得る
ことができる。この場合の動作例について説明する。
In the present embodiment, for example, assuming that the driving image signal is supplied to the input terminal 1 on a recording medium having high reproducibility such as a digital VTR, it is first recorded in the digital signal recording section 7. By using the parameter used in the encoding of [3] also in the re-encoding, it is possible to obtain encoded data that can refer to the image across the editing joint. An operation example in this case will be described.

【0062】いま、図1に示す従来の装置と同様に原動
画像信号を、符号化部2を用いて最初から最後まで通し
て符号化を行い、これにより図4上段に示す符号化デー
タAが得られ、この符号化データAをディジタル信号記
録部4に記録したものとする。ここで、例えば再符号化
を行いたい部分を含むGOPが前記符号化データAの
内、GOP1乃至GOP3であるとき、GOP1の直前
のGOPであるGOP0に対応する原動画像信号より再
符号化を開始する。GOP0に対応する部分の符号化を
行う際に、制御部3はディジタル信号記録部7に記録さ
れている符号化データAを生成した際の符号化パラメー
タを参照し、少なくともI、Pピクチャについては同じ
符号化パラメータにより符号化部2を制御する。そして
GOP1に対応する部分の符号化からは異なった符号化
パラメータを用いて再符号化を行う。またこのGOP1
に対応する部分の符号化を開始する時点より前述と同様
に符号量制御を行う。更に再符号化を行う部分の最後の
GOP(GOP3)に対応する部分の符号化は、Bピク
チャ以外、即ちI、Pピクチャの符号化は元の符号化パ
ラメータにより行う。これにより、得られる符号化デー
タは図4中段に示すようにGOP0′乃至GOP3′か
らなる符号化データBとなる。その後、符号化データB
は、ディジタル信号記録部5に与えて記録する。
Now, similarly to the conventional apparatus shown in FIG. 1, the moving image signal is encoded from the beginning to the end by using the encoding unit 2 so that the encoded data A shown in the upper part of FIG. It is assumed that the encoded data A obtained is recorded in the digital signal recording unit 4. Here, for example, when the GOP including the portion to be re-encoded is GOP1 to GOP3 of the encoded data A, re-encoding is started from the moving image signal corresponding to GOP0 which is the GOP immediately before GOP1. To do. When encoding the portion corresponding to GOP0, the control unit 3 refers to the encoding parameters when the encoded data A recorded in the digital signal recording unit 7 is generated, and at least for I and P pictures. The encoding unit 2 is controlled by the same encoding parameter. Then, re-encoding is performed using encoding parameters different from the encoding of the portion corresponding to GOP1. Also this GOP1
The code amount control is performed in the same manner as described above from the time when the coding of the portion corresponding to is started. Further, the part corresponding to the last GOP (GOP3) of the part to be re-encoded is coded other than the B picture, that is, the I and P pictures are coded using the original coding parameters. As a result, the obtained encoded data becomes the encoded data B composed of GOP0 'to GOP3' as shown in the middle part of FIG. After that, the encoded data B
Is given to the digital signal recording unit 5 for recording.

【0063】次に、置換部6は符号化データA中のGO
P1乃至GOP3を、符号化データBのGOP1′乃至
GOP3′と置換する操作を行う。またこのとき、上述
した実施例と同様に置換する部分の符号量を合わせるた
めにスタッフィングビット等を付加する。これにより、
得られる符号化データは図4下段に示すピクチャ構成を
有した符号化データCとなり、その後ディジタル信号記
録部4に記録する。したがって、上述した制御により、
符号化データB中のB6′、B7′の復号を行うために
必要なI2、P5及び符号化データA中のGOP4のB
24、B25の復号を行うために必要なI20、P23
は、最初の符号化時と再符号化時において同じデータと
なり、即ち、符号化データAと符号化データBとが同じ
データとなる。つまりこれは編集後の符号化データCを
復号する際に、編集のつなぎ目においても前のGOPの
画像を参照することができ、即ち正しい再生画像を得ら
れることを意味する。またこの場合、I20、P23に
ついては置換を行わず、元の符号化データAのままとし
ても良い。これにより、編集後の符号化データCはVB
Vバッファの容量を満たすものとなる。尚、この原動画
信号の再現性が完全でない場合、実際には図4の符号化
データAと符号化データBのピクチャデータI2、I5
及びI20、I23とは異なるものとなってしまうた
め、符号化データCのB6′、B7′及びB24、B2
5は復号が正しく行われず画質劣化を起こす場合があ
る。この場合においても、前述したようにGOPをまた
いでの過去の画像の参照程度が少ない部分を、編集のつ
なぎ目とするように上記の動作を行えば、この画質の劣
化を抑制することができる。
Next, the replacing unit 6 outputs GO in the encoded data A.
The operation of replacing P1 to GOP3 with GOP1 'to GOP3' of the encoded data B is performed. At this time, stuffing bits and the like are added in order to match the code amounts of the parts to be replaced, as in the above-described embodiment. This allows
The obtained encoded data becomes the encoded data C having the picture structure shown in the lower part of FIG. 4, and then recorded in the digital signal recording unit 4. Therefore, by the control described above,
I2, P5 necessary for decoding B6 'and B7' in the encoded data B and B of GOP4 in the encoded data A
I20 and P23 required to decrypt B24 and B25
Becomes the same data at the time of the first encoding and at the time of re-encoding, that is, the encoded data A and the encoded data B become the same data. That is, this means that when decoding the encoded data C after editing, the image of the previous GOP can be referred to even at the joint of editing, that is, a correct reproduced image can be obtained. In this case, I20 and P23 may not be replaced, and the original encoded data A may remain unchanged. As a result, the coded data C after editing is VB
The capacity of the V buffer is satisfied. When the reproducibility of the original moving image signal is not perfect, the picture data I2 and I5 of the encoded data A and the encoded data B of FIG. 4 are actually used.
And I20 and I23 are different from each other, so that B6 ′, B7 ′ and B24, B2 of the encoded data C are obtained.
In No. 5, decoding may not be performed correctly and image quality may deteriorate. Even in this case, the deterioration of the image quality can be suppressed by performing the above-described operation so that the portion where the degree of reference to the past image across the GOP is small is used as the joint of the editing as described above.

【0064】以上、説明したように本実施例の動作例に
おいては、最初の符号化時に符号化情報をディジタル信
号記録部7に記録しておき、後にディジタル信号記録部
7を利用して再符号化及び編集を行うが、これらの符号
化情報が符号化データより得られる場合はこれを読み出
して用いるようにしても良い。更に、上記装置に用いら
れている符号化方式のMPEG2では、シーケンス、G
OPまたピクチャの各階層毎にユーザが自由に使用可能
なユーザデータが挿入することができることから、符号
化の際に例えば、後の編集に必要となる前方、後方の画
像の参照の度合いなどの符号化情報を前記ユーザデータ
に記述しておき、再符号化の際には前記符号化情報より
必要なデータを読み出すようにすれば、ディジタル信号
記録部7を不要にすることもできるという効果もある。
As described above, in the operation example of the present embodiment, the coded information is recorded in the digital signal recording unit 7 at the time of the first coding, and the digital signal recording unit 7 is used again to re-code. The encoding and editing are performed. However, when the encoding information is obtained from the encoded data, it may be read and used. Furthermore, in MPEG2, which is an encoding method used in the above apparatus, the sequence G
Since user data that can be freely used by the user can be inserted into each OP or each layer of a picture, when encoding, for example, the degree of reference of forward and backward images necessary for later editing, etc. If the coding information is described in the user data and necessary data is read from the coding information at the time of re-coding, the digital signal recording unit 7 can be omitted. is there.

【0065】図5は本発明に係る符号化データ編集装置
の他の実施例を示すブロック図である。図5に示す装置
は図1に示す装置と同様の構成要素には同一符号を付し
て説明を省略する。
FIG. 5 is a block diagram showing another embodiment of the coded data editing apparatus according to the present invention. In the device shown in FIG. 5, the same components as those of the device shown in FIG.

【0066】本実施例においては、図1に示す装置を改
良したものであり、ディジタル信号記録部4に記録され
た符号化データを符号化部2aに与えるように構成し、
図1に示す符号化部2に代えて前記符号化データに基づ
いて符号化処理を行う符号化部2aを設けたことが異な
る点である。
In this embodiment, the apparatus shown in FIG. 1 is improved, and the encoded data recorded in the digital signal recording unit 4 is provided to the encoding unit 2a.
A different point is that a coding unit 2a that performs a coding process based on the coded data is provided instead of the coding unit 2 shown in FIG.

【0067】図5において、入力端子1には原動画像信
号を入力する。原動画像信号はMPEG2方式による符
号化部2aに与える。符号化部2aは前記実施例と同様
に制御部3からのピクチャタイプ及び量子化ステップな
どの符号化パラメータ制御信号に基づき原動画像信号の
符号化を行う。また符号化部2aは符号量制御を行うた
めの発生符号量等の符号化情報を制御部3に与える。符
号化部2aによって符号化された符号化データはディジ
タル信号記録部4及び5に与える。
In FIG. 5, a driving image signal is input to the input terminal 1. The moving image signal is given to the encoder 2a based on the MPEG2 system. The encoding unit 2a encodes the moving image signal based on the encoding parameter control signal such as the picture type and the quantization step from the control unit 3 as in the above embodiment. The encoding unit 2a also provides the control unit 3 with encoding information such as a generated code amount for controlling the code amount. The encoded data encoded by the encoding unit 2a is given to the digital signal recording units 4 and 5.

【0068】制御部3はそれぞれディジタル信号記録部
4及び5に記録制御信号を与えて、ディジタル信号記録
部4及び5の内、一方のディジタル信号記録部に符号化
データを記録させるように制御する。また、制御部3は
前記ディジタル信号記録部4に記録された符号化データ
の読み出しもを制御する。そして、ディジタル信号記録
部4から読み出された読み出した符号化データは符号化
部2aに与える。
The control section 3 gives a recording control signal to the digital signal recording sections 4 and 5, respectively, and controls so that one of the digital signal recording sections 4 and 5 records the encoded data. . The control unit 3 also controls the reading of the encoded data recorded in the digital signal recording unit 4. Then, the read coded data read from the digital signal recording unit 4 is given to the coding unit 2a.

【0069】図6は図5に用いられる符号化部の概略構
成を示すブロック図であり、図9に示す符号化部と同様
の構成要素には同一符号を付して説明を省略する。
FIG. 6 is a block diagram showing a schematic structure of the coding unit used in FIG. 5. The same components as those of the coding unit shown in FIG. 9 are designated by the same reference numerals and the description thereof will be omitted.

【0070】図6において、入力端子50には既に符号
化済みのディジタル信号記録部4からの符号化データを
入力する。入力符号化データはバッファメモリ51に与
えられ、当該バッファメモリ51により記憶する。バッ
ファメモリ51からは符号化順画像信号にピクチャ単位
で同期して符号化データが読み出され、この符号化デー
タは逆VLC回路52に与える。
In FIG. 6, the encoded data from the already encoded digital signal recording unit 4 is input to the input terminal 50. The input encoded data is given to the buffer memory 51 and stored in the buffer memory 51. The coded data is read from the buffer memory 51 in synchronization with the coded image signal in picture units, and the coded data is given to the inverse VLC circuit 52.

【0071】逆VLC回路52は符号化データのヘッダ
データ等に記述されるパラメータを復号して符号化制御
回路26に与えると共に、圧縮画像信号の可変長符号を
解いて、量子化回路15の出力信号と同じデータ形態の
信号を生成する。この信号は図6に示す量子化回路15
の出力信号と共に、信号選択回路53に与える。信号選
択回路53は符号化制御回路26からの割り込み制御信
号に基づいて、前記逆VLC回路52及び量子化回路1
5の内、どちらか一方の出力信号を選択する。この信号
選択回路53の出力信号はVLC・文法生成回路16及
び逆量子化回路19に与える。また、逆VLC回路52
により復号された予測モード信号及び動きベクトル信号
は、それぞれ信号選択回路54及び55に与える。ま
た、これらの信号選択回路54及び55の他方の入力端
には、動き検出回路24からの予測モード信号及び動き
ベクトル信号がそれぞれ与えられる。そして信号選択回
路54及び55は、割り込み制御信号に基づき、前記動
き検出回路24及び逆VLC回路52の内、どちらか一
方の出力信号を選択し、それぞれ選択された信号を出力
する。
The inverse VLC circuit 52 decodes the parameters described in the header data of the encoded data and gives them to the encoding control circuit 26, solves the variable length code of the compressed image signal, and outputs it from the quantization circuit 15. Generate a signal that has the same data format as the signal. This signal is a quantization circuit 15 shown in FIG.
Together with the output signal of the above. The signal selection circuit 53, based on the interrupt control signal from the encoding control circuit 26, the inverse VLC circuit 52 and the quantization circuit 1
One of the five output signals is selected. The output signal of the signal selection circuit 53 is given to the VLC / grammar generation circuit 16 and the inverse quantization circuit 19. In addition, the reverse VLC circuit 52
The prediction mode signal and the motion vector signal decoded by are supplied to the signal selection circuits 54 and 55, respectively. The prediction mode signal and the motion vector signal from the motion detection circuit 24 are applied to the other input ends of these signal selection circuits 54 and 55, respectively. Then, the signal selection circuits 54 and 55 select one of the output signals of the motion detection circuit 24 and the inverse VLC circuit 52 based on the interrupt control signal and output the selected signal.

【0072】いま、割り込み制御信号が割り込みモード
を示す制御信号であるものとする。このとき、信号選択
回路53、54及び55はそれぞれ入力端子50より入
力された外部からの符号化データより得る信号、即ち、
逆VLC回路52からの出力信号を選択して出力する。
この場合、符号化制御回路26は同様に、ピクチャタイ
プ信号、量子化ステップ制御信号及び文法生成制御信号
についても、逆VLC回路52において復号したパラメ
ータ信号に基づいて制御を行う。このときVLC・文法
生成回路16の出力信号には、外部から入力された符号
化データと同じ符号化データが再生される。また割り込
みモードとなってから最初のIピクチャ以降に参照画像
メモリ23に得る参照画像データは、入力端子50から
供給される符号化データを復号した信号となる。
Now, assume that the interrupt control signal is a control signal indicating an interrupt mode. At this time, the signal selection circuits 53, 54 and 55 respectively obtain the signals obtained from the coded data from the outside inputted from the input terminal 50,
The output signal from the inverse VLC circuit 52 is selected and output.
In this case, the coding control circuit 26 similarly controls the picture type signal, the quantization step control signal, and the grammar generation control signal based on the parameter signal decoded by the inverse VLC circuit 52. At this time, the same encoded data as the encoded data input from the outside is reproduced as the output signal of the VLC / grammar generating circuit 16. Further, the reference image data obtained in the reference image memory 23 after the first I picture after the interruption mode is a signal obtained by decoding the encoded data supplied from the input terminal 50.

【0073】次に、図5及び図6に示す符号化データ編
集装置を用いて、前記実施例と同様に一度符号化した原
動画像信号の一部分を異なった符号化パラメータを用い
て再符号化し、元の符号化データの対応する一部分と置
換を行う場合の動作例について、図7を参照しながら詳
細に説明する。
Next, using the coded data editing apparatus shown in FIGS. 5 and 6, a part of the moving image signal once coded is re-coded using different coding parameters as in the above embodiment, An operation example in the case of replacing the corresponding part of the original encoded data will be described in detail with reference to FIG. 7.

【0074】先ず、入力端子1を介して入力した動画像
原信号を、符号化部2aにより最初から最後まで通して
符号化を行う。これにより、符号化された符号化データ
は図7上段に示すピクチャ構成を有する符号化データA
となる。その後、符号化データAはディジタル信号記録
部4によって記録する。その後、再符号化を行う際に
は、新たに同様の原動画像信号を入力端子1より符号化
部2aに与えると共に、ディジタル信号記録部4より最
初の符号化で得られた符号化データAを符号化部2aに
与える。このとき、図6の符号化部2aの内部で量子化
回路15の出力信号と逆VLC回路52の出力信号と
が、ピクチャ単位で同期できるようなタイミングで前記
符号化データAを与える。
First, the moving image original signal input through the input terminal 1 is encoded by the encoding unit 2a from the beginning to the end. As a result, the encoded coded data is the encoded data A having the picture structure shown in the upper part of FIG.
Becomes After that, the encoded data A is recorded by the digital signal recording unit 4. After that, when performing re-encoding, a similar moving image signal is newly supplied from the input terminal 1 to the encoding unit 2a, and the encoded data A obtained by the first encoding is obtained from the digital signal recording unit 4. It is given to the encoding unit 2a. At this time, the encoded data A is given at a timing such that the output signal of the quantization circuit 15 and the output signal of the inverse VLC circuit 52 can be synchronized in picture units inside the encoding unit 2a in FIG.

【0075】いま、異なった符号化パラメータを用いて
再符号化を行いたい部分が、図7に示す符号化データA
中のGOP1乃至GOP3に相当する部分であるものと
する。この場合、再符号化はその直前のGOP0を含む
GOP0乃至GOP3までの範囲に対応する原動画像信
号を符号化する。そして最初のGOPであるGOP0の
I、Pピクチャ及び最後のGOPであるGOP3のI、
Pピクチャ(I20、P23)については、割り込みモ
ードを用いて符号化を行い、GOP1〜GOP3のその
他の部分については通常通り原動画像信号の符号化を行
うように制御する。これにより得られる符号化データ
は、図7中段に示すようなピクチャ構成を有した符号化
データBとなる。その後、この符号化データBはディジ
タル信号記録部5によって記録される。この場合の各ピ
クチャにおける予測の方向は図7に示すものとなる。即
ち、GOP0′中のI2、P5及びGOP3′中のI2
0、I23の各ピクチャの符号化データは、最初の符号
化で得られた符号化データAと同じものとなる。また、
GOP1′中の符号化順で最初のIピクチャに続くBピ
クチャ(B6′、B7′)及びGOP3′中の各Bピク
チャは、最初の符号化で得られた符号化データAを復号
した参照画像を用いて符号化を行う。そして、置換部6
によって符号化データAのGOP1乃至GOP3を符号
化データBのGOP1′乃至GOP3′と置換し、図7
下段に示すような編集後の符号化データCを得る。その
後、この符号化データCはディジタル信号記録部4に記
録する。
Now, the portion to be re-encoded using different encoding parameters is the encoded data A shown in FIG.
It is assumed to be a portion corresponding to GOP1 to GOP3 in the inside. In this case, re-encoding encodes the moving image signal corresponding to the range from GOP0 to GOP3 including GOP0 immediately before it. The I of the first GOP, GOP0, the P picture, and the last GOP, the I of GOP3,
The P pictures (I20, P23) are encoded using the interrupt mode, and the other parts of GOP1 to GOP3 are controlled to encode the moving image signal as usual. The coded data obtained by this is coded data B having a picture structure as shown in the middle part of FIG. 7. Thereafter, the encoded data B is recorded by the digital signal recording section 5. The prediction direction in each picture in this case is as shown in FIG. That is, I2 and P5 in GOP0 'and I2 in GOP3'
The coded data of each picture of 0 and I23 is the same as the coded data A obtained in the first coding. Also,
The B picture (B6 ', B7') following the first I picture in the coding order in GOP1 'and each B picture in GOP3' are reference pictures obtained by decoding the coded data A obtained in the first coding. Encode using. And the replacement unit 6
7 replaces GOP1 to GOP3 of the encoded data A with GOP1 'to GOP3' of the encoded data B, as shown in FIG.
The encoded data C after editing as shown in the lower row is obtained. Then, the encoded data C is recorded in the digital signal recording unit 4.

【0076】したがって、このように編集によれば、前
述のように最終的に得られる符号化データCのGOP
1′中の符号化順で最初のIピクチャに続くBピクチャ
(B6′、B7′)は、最初の符号化で得られた符号化
データAを復号した参照画像を用いて符号化が行われ
る。またGOP4中の符号化順で最初のIピクチャに続
くBピクチャ(B24、B25)が復号時の参照画像と
して用いるGOP3′中のI20、I23の各ピクチャ
の符号化データは、最初の符号化で得られた符号化デー
タAと同じものとなる。これにより、編集のつなぎ目に
おいてもGOPをまたいでの画像の参照が問題なく行う
ことができ、即ち正しい復号画像を得ることのできる符
号化データを生成することができる。
Therefore, according to such editing, the GOP of the encoded data C finally obtained as described above is obtained.
B pictures (B6 ', B7') following the first I picture in the coding order in 1'are encoded using the reference image obtained by decoding the encoded data A obtained in the first encoding. . In addition, the coded data of each picture of I20 and I23 in GOP3 ′ used as the reference picture at the time of decoding by the B picture (B24, B25) following the first I picture in the coding order in GOP4 is the first coding. It becomes the same as the obtained encoded data A. As a result, it is possible to refer to an image across GOPs without any problem even at the joint of editing, that is, it is possible to generate encoded data that can obtain a correct decoded image.

【0077】その他の効果は、前記実施例と同様の効果
を有する。
The other effects are similar to those of the above embodiment.

【0078】尚。本実施例においては、符号化部2aへ
の符号化データの供給は、割り込みモード時とする部分
のデータだけを、予めバッファメモリ51に書き込んで
おき、割り込みモード時に対応するピクチャデータをバ
ッファメモリ51より読み出すようにしても実施可能で
ある。
Incidentally, In the present embodiment, as for the encoded data to be supplied to the encoding unit 2a, only the data of the portion in the interrupt mode is written in the buffer memory 51 in advance, and the corresponding picture data in the interrupt mode is stored in the buffer memory 51. It can also be implemented by reading out more.

【0079】また、本実施例においては、割り込みモー
ド時のピクチャタイプ信号及び量子化ステップ制御信号
は、入力端子50からの符号化データより得る逆VLC
回路52の出力信号に基づいて生成されるが、例えば符
号化データ編集装置の制御部3からの信号に基づいて生
成するようにしても良い。
Further, in this embodiment, the picture type signal and the quantization step control signal in the interrupt mode are the inverse VLC obtained from the encoded data from the input terminal 50.
It is generated based on the output signal of the circuit 52, but may be generated based on a signal from the control unit 3 of the encoded data editing device, for example.

【0080】[0080]

【発明の効果】以上、述べたように本発明によれば、原
動画像信号の圧縮符号化後に、この圧縮符号化データの
一部分を再符号化し元の符号化データと置換する際に、
この置換した編集後の符号化データが復号器に与えられ
て復号したとしても、復号器のバッファがオーバーフロ
ーまたはアンダーフローを起こさないように符号化デー
タの編集を行うことができる。
As described above, according to the present invention, after compression encoding of the moving image signal, a part of this compression encoded data is re-encoded and replaced with the original encoded data,
Even if the replaced encoded data after editing is given to the decoder and decoded, the encoded data can be edited so that the buffer of the decoder does not overflow or underflow.

【0081】また、符号化データの編集(原動画像信号
の途中からの再符号化)に伴う符号量の増加または復号
時の画質の劣化を抑制することができる。
Further, it is possible to suppress an increase in the code amount or a deterioration in the image quality at the time of decoding due to the editing of the encoded data (re-encoding from the middle of the moving image signal).

【0082】更に符号化データの編集のつなぎ目におけ
る復号器の構成に依存する不確実な再生動作を防ぐと共
に、違和感の少ない再生画像を復号できるように編集を
行うことができる効果もある。
Further, there is an effect that the uncertain reproduction operation depending on the configuration of the decoder at the joint of the editing of the encoded data can be prevented and the reproduced image can be edited so that the reproduced image with less discomfort can be decoded.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明に係る符号化データ編集装置の一実施例
を示すブロック図。
FIG. 1 is a block diagram showing an embodiment of an encoded data editing device according to the present invention.

【図2】図1に示す装置の動作を説明するための説明
図。
FIG. 2 is an explanatory diagram for explaining the operation of the device shown in FIG.

【図3】図1に示す装置の他の動作例を説明するための
符号化データのピクチャ構成及び予測の関係を示す図。
FIG. 3 is a diagram showing a relationship between a picture configuration and prediction of encoded data for explaining another operation example of the apparatus shown in FIG.

【図4】図1に示す装置の他の動作例を説明するための
符号化データのピクチャ構成及び予測の関係を示す図。
FIG. 4 is a diagram showing a relationship between a picture configuration of encoded data and prediction for explaining another operation example of the apparatus shown in FIG. 1.

【図5】本発明に係る符号化データ編集装置の他の実施
例を示すブロック図。
FIG. 5 is a block diagram showing another embodiment of the encoded data editing device according to the present invention.

【図6】図5の装置に用いられる符号化部の具体的構成
を示すブロック図。
6 is a block diagram showing a specific configuration of an encoding unit used in the device of FIG.

【図7】図5の装置の動作を説明するための符号化デー
タのピクチャ構成及び予測の関係を示す図。
7 is a diagram showing a relationship between a picture configuration of coded data and prediction for explaining the operation of the apparatus of FIG.

【図8】従来の符号化データ編集装置の一例を示すブロ
ック図。
FIG. 8 is a block diagram showing an example of a conventional encoded data editing device.

【図9】図8の符号化部の具体的構成を示すブロック
図。
9 is a block diagram showing a specific configuration of an encoding unit shown in FIG.

【図10】MPEG2方式による符号化を説明するため
の説明図。
FIG. 10 is an explanatory diagram for explaining encoding according to the MPEG2 system.

【図11】図8の装置の動作を説明するための説明図。11 is an explanatory diagram for explaining the operation of the apparatus in FIG.

【符号の説明】[Explanation of symbols]

1…入力端子、2…符号化部、3…制御部、4、5、7
…ディジタル信号記録部、6…置換部、11、18…出
力端子、12…符号化順変換回路、13…減算手段、1
4…DCT回路、15…量子化回路、16…VLC文法
生成回路、19…逆量子化回路、20…逆DCT回路、
21…加算手段、23…参照画像メモリ、24…動き検
出回路、25…動き補償回路、26…符号化制御回路。
DESCRIPTION OF SYMBOLS 1 ... Input terminal, 2 ... Encoding part, 3 ... Control part, 4, 5, 7
... digital signal recording section, 6 ... replacement section, 11, 18 ... output terminal, 12 ... coding order conversion circuit, 13 ... subtraction means, 1
4 ... DCT circuit, 15 ... Quantization circuit, 16 ... VLC grammar generation circuit, 19 ... Inverse quantization circuit, 20 ... Inverse DCT circuit,
21 ... Adder means, 23 ... Reference image memory, 24 ... Motion detection circuit, 25 ... Motion compensation circuit, 26 ... Encoding control circuit.

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 入力された動画像信号を符号化して符号
化出力を生成すると共に、符号化時に想定する復号器側
のバッファの状態を含む情報を生成する符号化手段と、 前記復号器側のバッファの状態に基づいて発生符号量を
制御する第1の符号量制御を採用し、前記符号化手段に
入力動画像信号を与えて第1の符号化パラメータを用い
て符号化させて第1の符号化出力を得る第1の符号化制
御手段と、 前記第1の符号化出力の一部を置換部とし所定の動画像
信号を前記符号化手段に与えて、前記置換部の先頭にお
ける前記復号器側のバッファの状態を前記第1の符号量
制御における初期値として第2の符号化パラメータを用
いて再符号化させて前記置換部の第1の符号化出力に代
えて出力すると共に、再符号化によって発生する発生符
号量を前記第1の符号化出力の置換部の符号量と一致さ
せる第2の符号化制御手段と、 を具備したことを特徴とする符号化データ編集装置。
1. A coding means for coding an input moving image signal to generate a coded output, and for generating information including a state of a buffer on the decoder side assumed at the time of coding, and the decoder side. The first code amount control for controlling the generated code amount based on the state of the buffer is adopted, the input moving image signal is given to the encoding means, and is encoded using the first encoding parameter. First encoding control means for obtaining the encoded output of the first encoding output, and a part of the first encoded output is used as a replacement portion to supply a predetermined moving image signal to the encoding means, and The state of the buffer on the decoder side is re-encoded using the second encoding parameter as an initial value in the first code amount control and output instead of the first encoded output of the replacing unit, Generated code amount generated by re-encoding Serial first encoded data editing device comprising the second encoding control means to match the code amount of substitution of the encoded output, by comprising a.
【請求項2】 前記第2の符号化制御手段は、再符号化
によって発生する発生符号量が前記第1の符号化出力の
置換部の符号量を超過しないように再符号化を行うと共
に、前記再符号化によって発生する発生符号量が前記第
1の符号化出力の置換部の符号量より少ない場合には、
前記第1の符号化出力の置換部の符号量との差分量を求
め、この差分量を補うためのデータを付加して発生符号
量を一致させることを特徴する請求項1に記載の符号化
データ編集装置。
2. The second encoding control means performs re-encoding so that the generated code amount generated by the re-encoding does not exceed the code amount of the replacement unit of the first encoded output, When the generated code amount generated by the re-encoding is smaller than the code amount of the replacement unit of the first encoded output,
2. The encoding according to claim 1, wherein a difference amount between the first encoded output and the code amount of the replacement unit is obtained, and data for compensating for the difference amount is added to match the generated code amounts. Data editing device.
【請求項3】 前記所定の動画像信号は、前記第1の符
号化出力の一部の置換部に対応する動画像の画像信号で
あり、 前記第2の符号化制御手段は、前記第1の符号化出力の
一部の置換部に対応する動画像の画像信号と同じ前記入
力動画像信号を前記符号化手段に与えて再符号化させる
ことを特徴とする請求項1に記載の符号化データ編集装
置。
3. The predetermined moving image signal is an image signal of a moving image corresponding to a part of the replacement portion of the first encoded output, and the second encoding control means includes the first moving image signal. 2. The encoding according to claim 1, wherein the input moving image signal, which is the same as the image signal of the moving image corresponding to a part of the replacement part of the encoded output of, is given to the encoding means to be re-encoded. Data editing device.
【請求項4】 前記復号器側のバッファの状態を含む情
報を記録する記録手段を付加したことを特徴とする請求
項1に記載の符号化データ編集装置。
4. The coded data editing apparatus according to claim 1, further comprising a recording unit for recording information including the state of the buffer on the decoder side.
【請求項5】 前記符号化手段は、時間的に前後する画
像を参照画像として用いた前方予測符号化、後方予測符
号化及び双方向予測符号化を行う予測符号化手段を備
え、 前記第2の符号化制御手段は、前記置換部の第1の符号
化出力に対応する画像のうち前記置換部よりも前の画像
を参照画像として予測符号化された画像については、再
符号化時に前方予測符号化を採用しないことを特徴とす
る請求項1に記載の符号化データ編集装置。
5. The encoding means includes predictive encoding means for performing forward predictive encoding, backward predictive encoding, and bidirectional predictive encoding using temporally preceding and subsequent images as reference images. Of the image corresponding to the first encoded output of the replacing unit, the image predictive-coded using an image before the replacing unit as a reference image is forward-predicted at the time of re-encoding. The encoded data editing apparatus according to claim 1, wherein encoding is not adopted.
【請求項6】 前記符号化手段は、時間的に前後する画
像を参照画像として用いた前方予測符号化、後方予測符
号化及び双方向予測符号化を行う予測符号化手段を備
え、 前記第2の符号化制御手段は、前記置換部の第1の符号
化出力に対応する画像のうち前記置換部よりも前の第1
の画像を参照画像として予測符号化された画像について
は、再符号化時において前記第1の画像とほぼ同一の第
2の画像を参照画像として前方予測符号化することを特
徴とする請求項1に記載の符号化データ編集装置。
6. The encoding means includes predictive encoding means for performing forward predictive encoding, backward predictive encoding, and bidirectional predictive encoding using temporally preceding and subsequent images as reference images. Encoding control means of the first encoding output of the image corresponding to the first encoding output of the replacing unit, which is before the replacing unit.
The image predictively coded with the image No. 2 as a reference image is forward predictively coded with the second image almost the same as the first image as a reference image at the time of re-encoding. The encoded data editing device described in 1.
【請求項7】 前記第2の画像は、前記第2の符号化制
御手段が前記第1の画像に対応する前記入力動画像信号
を前記符号化手段に与えて前記第1の符号化パラメータ
を用いて再符号化させることにより得ることを特徴とす
る請求項6に記載の符号化データ編集装置。
7. In the second image, the second encoding control means supplies the input moving image signal corresponding to the first image to the encoding means to set the first encoding parameter. The coded data editing apparatus according to claim 6, wherein the coded data editing apparatus is obtained by re-encoding using the coded data.
【請求項8】 前記第1の画像に対応する第1の符号化
出力を復号化することにより前記第2の画像を得る復号
化手段を付加したことを特徴とする請求項6に記載の符
号化データ編集装置。
8. The code according to claim 6, further comprising decoding means for decoding the first encoded output corresponding to the first image to obtain the second image. Data editing device.
【請求項9】 前記復号化手段は、前記符号化手段が前
記参照画像を得るために有している局部復号化手段と共
用化されることを特徴とする請求項8に記載の符号化デ
ータ編集装置。
9. The encoded data according to claim 8, wherein the decoding means is shared with a local decoding means which the encoding means has for obtaining the reference image. Editing device.
【請求項10】 前記符号化手段は、時間的に前後する
画像を参照画像として用いた前方予測符号化、後方予測
符号化及び双方向予測符号化を行う予測符号化手段を具
備して、入力された動画像信号を所定のブロック単位で
符号化するものであって、 前記第2の符号化制御手段は、前記置換部の第1の符号
化出力に含まれるブロックの予測方向に基づいて前記置
換部よりも前あるいは後の画像を参照画像として予測符
号化されたブロック数を画像毎に検出し、検出したブロ
ック数が所定値よりも少ない画像に対応する前記第1の
符号化出力を前記置換部の境界とすることを特徴とする
請求項1に記載の符号化データ編集装置。
10. The encoding means comprises predictive encoding means for performing forward predictive encoding, backward predictive encoding and bidirectional predictive encoding using temporally preceding and following images as reference images, and inputting. The encoded moving image signal is encoded in a predetermined block unit, wherein the second encoding control unit is configured to perform the encoding based on a prediction direction of a block included in the first encoded output of the replacement unit. The number of blocks predictively coded using the image before or after the replacement unit as a reference image is detected for each image, and the first encoded output corresponding to the image in which the detected number of blocks is less than a predetermined value is output as described above. The coded data editing apparatus according to claim 1, wherein the boundary is a boundary of the replacement unit.
【請求項11】 前記第1の符号化出力に含まれる各ブ
ロックの符号化時の予測方向を記録する記録手段を備
え、 前記第2の符号化制御手段は、前記記録手段より所定ブ
ロックの予測方向を読み出し、この予測方向及びブロッ
クが含まれる画像と参照画像との間隔によって参照画像
が置換部よりも前の画像であることを検出して前記予測
符号化されたブロック数を検出することを特徴とする請
求項10に記載の符号化データ編集装置。
11. A recording unit for recording a prediction direction at the time of encoding each block included in the first encoded output, wherein the second encoding control unit predicts a predetermined block from the recording unit. The direction is read, and the predictive direction and the interval between the image including the block and the reference image are used to detect that the reference image is an image prior to the replacement unit and to detect the number of the predictively coded blocks. The coded data editing device according to claim 10.
【請求項12】 前記符号化手段は、MPEG1又はM
PEG2の圧縮符号化方式を採用し、前記第2の符号化
制御手段は再符号化によって発生する発生符号量を前記
第1の符号化出力の置換部の符号量と一致させるために
付加するデータとして、スタッフィングビット、シーケ
ンスヘッダ及びユーザデータの内、いずれか一つを用い
ることを特徴とする請求項2に記載の符号化データ編集
装置。
12. The encoding means is MPEG1 or M
Data to be adopted for adopting the PEG2 compression encoding method and for causing the second encoding control means to match the generated code amount generated by re-encoding with the code amount of the replacement unit of the first encoded output. 3. The coded data editing apparatus according to claim 2, wherein any one of the stuffing bit, the sequence header, and the user data is used as the above.
【請求項13】 前記符号化手段は、MPEG1又はM
PEG2の圧縮符号化方式を採用し、前記第2の符号化
制御手段により再符号化させた再符号化データは、一連
のGOPとこの一連のGOPに続くGOP中の最初のI
ピクチャ及びこのIピクチャに続くBピクチャとで構成
されることを特徴とする請求項5乃至請求項11のうち
いずれか一つに記載の符号化データ編集装置。
13. The encoding means is MPEG1 or M.
The re-encoded data adopting the compression encoding method of PEG2 and re-encoded by the second encoding control means is a series of GOPs and the first I in the GOPs following the series of GOPs.
The coded data editing device according to any one of claims 5 to 11, which is composed of a picture and a B picture following the I picture.
【請求項14】 前記符号化手段は、前記入力動画像信
号と予測画像信号とを演算して第1の予測誤差信号を得
る減算手段と、前記第1の予測誤差信号をDCT変換し
て第1のDCT係数信号列を得るDCT手段と、前記第
1のDCT係数信号列を量子化して第1の量子化DCT
係数信号列を得る量子化手段と、前記第1の量子化DC
T係数列を可変長符号化して符号化出力を得る可変長符
号化手段とで構成され、 前記予測符号化手段は、前記量子化手段と逆の処理を行
い第2の量子化DCT係数信号列を得る逆量子化手段
と、前記第2の量子化DCT係数信号列を前記DCT変
換手段と逆の処理を行い第2の予測誤差信号を得る逆D
CT手段と、前記第2の予測誤差信号と前記予測画像信
号とを加算して復号画像信号を得る加算手段と、前記復
号画像信号を記録する画像メモリと、前記画像メモリ中
の復号画像信号を動き補償して前記予測信号を得る動き
補償手段とで構成され、 前記復号化手段は、前記符号化出力の可変長符号を復号
して第2の量子化DCT係数信号列を得る可変長符号復
号手段と、前記第1の量子化DCT係数信号列と前記第
2の量子化DCT係数信号列とを入力してこれらの入力
信号のうちどちらか一方の信号を選択して出力する選択
手段とで構成され、 前記第2の符号化制御手段は、前記選択手段を切換制御
して前記第1の量子化DCT係数信号列及び前記第2の
量子化DCT係数信号列のうち一方を前記逆量子化手段
に入力させ、前記第2の量子化DCT係数信号列を選択
した場合には、前記符号化出力の復号画像信号を得て前
記画像メモリに記録することを特徴とする請求項8に記
載の符号化データ編集装置。
14. The encoding means calculates subtraction means for calculating a first prediction error signal by calculating the input moving image signal and the prediction image signal, and DCT transforms the first prediction error signal to obtain a first prediction error signal. DCT means for obtaining a DCT coefficient signal sequence of 1 and a first quantized DCT by quantizing the first DCT coefficient signal sequence
Quantization means for obtaining a coefficient signal sequence, and the first quantized DC
Variable-length coding means for variable-length coding the T coefficient sequence to obtain a coded output, and the predictive coding means performs a process reverse to that of the quantizing means to obtain a second quantized DCT coefficient signal sequence. And an inverse D that obtains a second prediction error signal by performing the inverse processing of the second quantized DCT coefficient signal sequence to that of the DCT conversion means.
CT means, adding means for adding the second prediction error signal and the predicted image signal to obtain a decoded image signal, an image memory for recording the decoded image signal, and a decoded image signal in the image memory. And a motion compensating means for motion-compensating to obtain the prediction signal, wherein the decoding means decodes a variable-length code of the encoded output to obtain a second quantized DCT coefficient signal sequence. Means and selection means for inputting the first quantized DCT coefficient signal sequence and the second quantized DCT coefficient signal sequence and selecting and outputting one of these input signals. The second encoding control means performs switching control of the selection means to dequantize one of the first quantized DCT coefficient signal sequence and the second quantized DCT coefficient signal sequence. Input to the means, the second amount Enabled when the DCT coefficient signal sequence was selected, coded data editing apparatus according to claim 8, characterized in that recording to obtain a decoded image signal of the coded output to the image memory.
【請求項15】 前記符号化手段は、多重手段を備え、 前記第1の符号化制御手段は、前記多重手段を制御して
前記予測方向に基づく情報がユーザーデータとして多重
させた前記第1の符号化出力を生成することを特徴とす
る請求項10に記載の符号化データ編集装置。
15. The encoding means includes a multiplexing means, and the first encoding control means controls the multiplexing means to multiplex information based on the prediction direction as user data. The encoded data editing device according to claim 10, wherein the encoded output is generated.
【請求項16】 前記所定のブロック単位は、MPEG
1又はMPEG2方式のマクロブロックであることを特
徴とする請求項10及び請求項11のいずれか一つに記
載の符号化データ編集装置。
16. The predetermined block unit is MPEG
The coded data editing device according to claim 10, wherein the coded data editing device is a macro block of 1 or MPEG2 system.
JP4736295A 1995-03-07 1995-03-07 Encoded data editing device Pending JPH08251582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4736295A JPH08251582A (en) 1995-03-07 1995-03-07 Encoded data editing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4736295A JPH08251582A (en) 1995-03-07 1995-03-07 Encoded data editing device

Publications (1)

Publication Number Publication Date
JPH08251582A true JPH08251582A (en) 1996-09-27

Family

ID=12773011

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4736295A Pending JPH08251582A (en) 1995-03-07 1995-03-07 Encoded data editing device

Country Status (1)

Country Link
JP (1) JPH08251582A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001197440A (en) * 1999-11-23 2001-07-19 Thomson Multimedia Sa Method and device for managing frame buffer memory in digital tv system
JP2001313936A (en) * 2000-04-28 2001-11-09 Sony Corp Method and device for signal delivery
JP2003250159A (en) * 2002-02-22 2003-09-05 Fujitsu Ltd Moving picture processing method and moving picture processing apparatus
JP2004007571A (en) * 2002-04-26 2004-01-08 Sony Corp Coding instrument and methodology, decoding instrument and method, compiling apparatus and method, record medium, as well as program
US7292782B2 (en) 2000-09-27 2007-11-06 Victor Company Of Japan, Limited MPEG picture data recording apparatus, MPEG picture data recording method, MPEG picture data recording medium, MPEG picture data generating apparatus, MPEG picture data reproducing apparatus, and MPEG picture data reproducing method
US7428339B2 (en) * 2003-11-07 2008-09-23 Arcsoft, Inc. Pseudo-frames for MPEG-2 encoding
US7653285B2 (en) 2001-06-15 2010-01-26 Sharp Kabushiki Kaisha Data recording method, data editing method, and data decoding method, and apparatus and recording medium therefor
JP2011182451A (en) * 2006-06-02 2011-09-15 Panasonic Corp Coding device and editing device
US8315313B2 (en) 2002-04-26 2012-11-20 Sony Corporation Encoding device and method, decoding device and method, edition device and method, recording medium, and program

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001197440A (en) * 1999-11-23 2001-07-19 Thomson Multimedia Sa Method and device for managing frame buffer memory in digital tv system
JP2001313936A (en) * 2000-04-28 2001-11-09 Sony Corp Method and device for signal delivery
US7292782B2 (en) 2000-09-27 2007-11-06 Victor Company Of Japan, Limited MPEG picture data recording apparatus, MPEG picture data recording method, MPEG picture data recording medium, MPEG picture data generating apparatus, MPEG picture data reproducing apparatus, and MPEG picture data reproducing method
US7653285B2 (en) 2001-06-15 2010-01-26 Sharp Kabushiki Kaisha Data recording method, data editing method, and data decoding method, and apparatus and recording medium therefor
US8306405B2 (en) 2001-06-15 2012-11-06 Sharp Kabushiki Kaisha Data recording method, data editing method, data decoding method, and apparatus and recording medium therefor
JP2003250159A (en) * 2002-02-22 2003-09-05 Fujitsu Ltd Moving picture processing method and moving picture processing apparatus
US10595081B2 (en) 2002-04-26 2020-03-17 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US8767837B2 (en) 2002-04-26 2014-07-01 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US10659839B2 (en) 2002-04-26 2020-05-19 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US8315313B2 (en) 2002-04-26 2012-11-20 Sony Corporation Encoding device and method, decoding device and method, edition device and method, recording medium, and program
US8401088B2 (en) 2002-04-26 2013-03-19 Sony Corporation Encoding device and method, decoding device and method, edition device and method, recording medium, and program
US8537902B2 (en) 2002-04-26 2013-09-17 Sony Corporation Encoding device and method, decoding device and method, edition device and method, recording medium, and program
US8571115B2 (en) 2002-04-26 2013-10-29 Sony Corporation Encoding device and method, decoding device and method, edition device and method, recording medium, and program
US10609445B2 (en) 2002-04-26 2020-03-31 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US10477270B2 (en) 2002-04-26 2019-11-12 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
JP2004007571A (en) * 2002-04-26 2004-01-08 Sony Corp Coding instrument and methodology, decoding instrument and method, compiling apparatus and method, record medium, as well as program
US10602219B2 (en) 2002-04-26 2020-03-24 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US10602220B2 (en) 2002-04-26 2020-03-24 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US10602218B2 (en) 2002-04-26 2020-03-24 Sony Corporation Encoding device and method, decoding device and method, editing device and method, recording medium, and program
US7428339B2 (en) * 2003-11-07 2008-09-23 Arcsoft, Inc. Pseudo-frames for MPEG-2 encoding
JP2011182451A (en) * 2006-06-02 2011-09-15 Panasonic Corp Coding device and editing device

Similar Documents

Publication Publication Date Title
JP4088799B2 (en) Editing apparatus and editing method
US6683987B1 (en) Method and apparatus for altering the picture updating frequency of a compressed video data stream
USRE43238E1 (en) Picture signal transmitting method and apparatus
KR100766740B1 (en) Apparatus and method for converting data using encoding history information
US6625211B1 (en) Method and apparatus for transforming moving picture coding system
KR100592651B1 (en) Transcoding
US6334000B2 (en) Recorded medium for recording image coding strings
JP4342139B2 (en) Signal processing device
JP3976942B2 (en) Image processing apparatus and method, and computer-readable recording medium on which an image processing program is recorded
JPH08251582A (en) Encoded data editing device
JPH11275580A (en) Image data processor, image data decoder, image data coder and their methods
JP2002199392A (en) Method and device for encoding image
JP3487205B2 (en) Image data editing device
JP2898413B2 (en) Method for decoding and encoding compressed video data streams with reduced memory requirements
JP4174728B2 (en) Information processing apparatus, information processing method, recording medium, and program
JP3182329B2 (en) Encoded data editing device and data decoding device
KR100962761B1 (en) Image processing device, image processing method, and recording medium
JP2000312363A (en) Conversion method for moving image encoding system and device therefor
JP4073541B2 (en) Video re-encoding device
JP3469866B2 (en) Method for changing the bit rate of a data stream of an encoded video picture
JP3897684B2 (en) Image recording method
JP2002199408A (en) Moving image coding method and moving image coder
JP4399794B2 (en) Image coding apparatus and image coding method
JP4193224B2 (en) Moving picture coding apparatus and method, and moving picture decoding apparatus and method
JP2002218470A (en) Method for converting image encoded data rate and device for converting image encoding rate