JPH07135660A - Movement vector coder - Google Patents

Movement vector coder

Info

Publication number
JPH07135660A
JPH07135660A JP28322093A JP28322093A JPH07135660A JP H07135660 A JPH07135660 A JP H07135660A JP 28322093 A JP28322093 A JP 28322093A JP 28322093 A JP28322093 A JP 28322093A JP H07135660 A JPH07135660 A JP H07135660A
Authority
JP
Japan
Prior art keywords
motion vector
difference
value
differential
code
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
JP28322093A
Other languages
Japanese (ja)
Inventor
Kinji Hashimoto
欽司 橋本
Shoichi Nishino
正一 西野
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP28322093A priority Critical patent/JPH07135660A/en
Publication of JPH07135660A publication Critical patent/JPH07135660A/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 attain variable length coding with an excellent coding efficiency by storing a difference code in a difference code memory and transferring the difference code to a variable length coder in a preset order by the use of a memory data controller. CONSTITUTION:A movement vector is stored in a delay device 101. A difference period counter 102 counts the number of blocks to reset the delay device 101 every difference period. A difference coder 103 codes a difference between a current movement vector value and a stored value in the delay device 101 and stores the difference to a difference code memory 105. A memory data controller 106 transfers the difference code stored in the difference code memory 105 in the preset order to the variable length coder 104 synchronously with the difference period counter 102. In this case, the coding efficiency is improved by using a rearrangement pattern in which the number of difference codes of consecutive 0s is increased for example.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は映像を記録および伝送す
る場合、映像信号のデータ量を削減するために動きベク
トルの高能率符号化を行う動きベクトル符号化装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a motion vector coding apparatus for performing high-efficiency coding of motion vectors in order to reduce the data amount of video signals when recording and transmitting video.

【0002】[0002]

【従来の技術】近年、映像のディジタル信号処理技術や
半導体の集積技術などの進歩により、映像信号をディジ
タル符号化した装置の開発が盛んになってきている。映
像信号の符号化装置の1つに時間方向の冗長を削減する
ものがある。この代表例としてMPEGがあり、現在標
準化作業が活発に行われている。MPEGでは、空間方
向の圧縮にDCT(離散コサイン変換)を、時間方向の
圧縮に動き補償が用いられている。
2. Description of the Related Art In recent years, development of a device which digitally encodes a video signal has become popular due to advances in digital signal processing technology of video and semiconductor integration technology. One of the video signal encoding apparatuses is one that reduces redundancy in the time direction. MPEG is a representative example of this, and standardization work is currently underway. In MPEG, DCT (discrete cosine transform) is used for compression in the space direction, and motion compensation is used for compression in the time direction.

【0003】動き補償とは、入力映像信号をある大きさ
(例えば水平16画素、垂直16画素)のブロックに分
割し、以前のフレームの再生映像信号である予測フレ−
ムから動きベクトル分ずらして予測を行うフレーム間予
測のことである。ここで、動きベクトルは水平と垂直の
2方向のベクトルとして表現される。以下に従来技術を
MPEGに代表される動き補償符号化方式を基に説明す
る。
The motion compensation is to divide an input video signal into blocks of a certain size (for example, 16 horizontal pixels and 16 vertical pixels), and predict a frame which is a reproduced video signal of a previous frame.
It is an inter-frame prediction in which the prediction is performed by shifting the motion vector from the frame. Here, the motion vector is expressed as a vector in two directions, horizontal and vertical. The conventional technique will be described below based on a motion compensation coding system represented by MPEG.

【0004】図7は従来の動き補償符号化装置の構成図
である。図7において、701はバッファメモリ、70
2はブロック化器、703はフレームメモリ、704は
動きベクトル検出器、705は予測ブロック信号生成
器、706は減算器、707は直交変換器、708は量
子化器、709は直交変換符号化器、710は動きベク
トル符号化器、711は逆量子化器、712は逆直交変
換器、713は加算器、714、715はスイッチであ
る。
FIG. 7 is a block diagram of a conventional motion compensation coding apparatus. In FIG. 7, 701 is a buffer memory, and 70
2 is a blocker, 703 is a frame memory, 704 is a motion vector detector, 705 is a prediction block signal generator, 706 is a subtractor, 707 is an orthogonal transformer, 708 is a quantizer, and 709 is an orthogonal transform encoder. , 710 is a motion vector encoder, 711 is an inverse quantizer, 712 is an inverse orthogonal transformer, 713 is an adder, and 714 and 715 are switches.

【0005】まず、1フレーム目の映像信号をバッファ
メモリ701に格納する。格納された映像信号をブロッ
ク化器702により水平16画素・垂直16画素のブロ
ックに分割する。1フレーム目の映像信号は予測映像信
号が存在しないため、スイッチ714を用いて直交変換
器707に直接入力されて直交変換され、その変換係数
は量子化器708により量子化し、直交変換符号化器7
09により符号化される。
First, the video signal of the first frame is stored in the buffer memory 701. The stored video signal is divided into blocks of horizontal 16 pixels and vertical 16 pixels by the blocker 702. Since the predicted video signal does not exist in the video signal of the first frame, it is directly input to the orthogonal transformer 707 using the switch 714 and subjected to orthogonal transformation, and its transform coefficient is quantized by the quantizer 708, and the orthogonal transformation encoder 7
It is coded according to 09.

【0006】量子化出力は符号化されるとともに、逆量
子化器711によって量子化器708の逆の操作が施さ
れ、逆直交変換器712によって再び映像信号に変換さ
れる。このときスイッチ715により加算器713はス
ルーの状態になっている。戻された映像信号はフレーム
メモリ703に蓄えわれ、次のフレームの予測に用いら
れる。
The quantized output is encoded, the inverse quantizer 711 performs the reverse operation of the quantizer 708, and the inverse orthogonal transformer 712 converts it into a video signal again. At this time, the switch 715 causes the adder 713 to be in a through state. The returned video signal is stored in the frame memory 703 and used for prediction of the next frame.

【0007】次フレームの映像信号をバッファメモリ7
01に格納する。格納された映像信号をブロック化器7
02により水平16画素・垂直16画素のブロックに分
割する。それぞれのブロックの映像信号は1フレーム前
の復号信号上の対応する位置を基準位置として、あらか
じめ決められた探索範囲内で最もフレーム間予測誤差の
少ない位置を動きベクトルとして動きベクトル検出器7
04により検出し、1フレーム前の信号の基準位置から
検出した動きベクトル分変位されたブロックの映像信号
を予測ブロック信号として予測ブロック信号生成器70
5により生成し、符号化しようとするブロックとの差分
を減算器706により計算する。
The buffer memory 7 stores the video signal of the next frame.
Stored in 01. Block the stored video signal 7
It divides into blocks of 16 horizontal pixels and 16 vertical pixels by 02. The video signal of each block uses the corresponding position on the decoded signal one frame before as the reference position, and the position with the smallest inter-frame prediction error within the predetermined search range as the motion vector.
The video signal of the block detected by 04 and displaced by the motion vector detected from the reference position of the signal one frame before is used as the prediction block signal.
5, the subtracter 706 calculates the difference from the block to be encoded.

【0008】得られた差分信号は空間的冗長性を除去す
るために直交変換器707により直交変換し、その変換
係数は量子化器708により量子化し、直交変換符号化
器709により符号化される。一方、動きベクトル検出
器704により検出された動きベクトルは動きベクトル
符号化器710を用いて符号化される。
The obtained difference signal is orthogonally transformed by an orthogonal transformer 707 to remove spatial redundancy, and its transform coefficient is quantized by a quantizer 708 and encoded by an orthogonal transform encoder 709. . On the other hand, the motion vector detected by the motion vector detector 704 is encoded using the motion vector encoder 710.

【0009】量子化出力は符号化されるとともに、逆量
子化器711によって量子化器708の逆の操作が施さ
れ、逆直交変換器712によって差分信号に再び変換さ
れ、加算器713により予測ブロック信号と加えられる
ことにより映像信号に戻される。戻された映像信号はフ
レームメモリ703に蓄えられ次のフレームの予測に用
いられる。
The quantized output is encoded, the inverse quantizer 711 performs the reverse operation of the quantizer 708, the inverse orthogonal transformer 712 transforms the difference signal again, and the adder 713 predicts the prediction block. The signal is added back to the video signal. The returned video signal is stored in the frame memory 703 and used for prediction of the next frame.

【0010】1フレーム目の他に符号化しようとするブ
ロックの入力信号そのものを変換・符号化した方が差分
信号を変換・符号化した場合よりも符号量が少なくなる
場合のために、入力信号をそのまま符号化することが必
要となる。そのためスイッチ714を用いて直交変換器
707への入力を切替える。このとき直交変換器707
からの出力は映像信号そのものであるため、スイッチ7
15により予測ブロック信号を加えないようにする。
In the case where the input signal itself of the block to be encoded other than the first frame has a smaller code amount than the case where the differential signal is converted / encoded, the input signal is converted. Need to be encoded as is. Therefore, the switch 714 is used to switch the input to the orthogonal transformer 707. At this time, the orthogonal transformer 707
Since the output from is the video signal itself, switch 7
The prediction block signal is not added by 15.

【0011】ここで、本発明の主眼である動きベクトル
の符号化について以下詳しく説明する。動きベクトルの
符号化方法として、MPEGでは直前ブロックの動きベ
クトルとの差分値を可変長符号化する方法が用いてられ
ている。これは、静止状態やパニング・ズーム時などの
通常よく現れる映像において差分値が0の近傍に集中す
るため、差分値を可変長符号化することにより符号量の
削減を図ることが可能であるからである。MPEGで
は、可変長符号化方法として1次元ハフマン符号化を用
いている。
The encoding of the motion vector, which is the main object of the present invention, will be described in detail below. As a motion vector coding method, in MPEG, a method of variable length coding a difference value from the motion vector of the immediately preceding block is used. This is because the difference values are concentrated in the vicinity of 0 in an image that often appears in a stationary state or during panning / zooming. Therefore, it is possible to reduce the code amount by variable-length encoding the difference values. Is. In MPEG, one-dimensional Huffman coding is used as a variable length coding method.

【0012】図8は、MPEGで用いられている1次元
ハフマン符号化テ−ブルである。ここで、動きベクトル
の存在範囲は水平方向・垂直方向共−15から+15で
ある。そのため、動きベクトルの差分値の存在範囲は水
平方向・垂直方向共−30から+30となる。MPEG
では差分符号化方法として折り返し符号化を用いてお
り、差分符号値の存在範囲を−16から+15にほぼ半
減している。これらの差分符号に対する可変長符号とし
て、差分符号値の絶対値の小さい順に符号長の短い可変
長符号を割り当てている。
FIG. 8 shows a one-dimensional Huffman coding table used in MPEG. Here, the existence range of the motion vector is −15 to +15 both in the horizontal and vertical directions. Therefore, the existence range of the difference value of the motion vector is −30 to +30 in both the horizontal and vertical directions. MPEG
Uses fold-back coding as the differential coding method, and the existence range of the differential code value is halved from -16 to +15. As variable length codes for these difference codes, variable length codes having shorter code lengths are assigned in ascending order of the absolute values of the difference code values.

【0013】差分符号化は、差分されたデータを復号す
る時にエラーが発生した場合エラーが伝搬されるブロッ
ク単位で行う。これは動きベクトルの真値を符号化して
から次に動きベクトルの真値を符号化するまでのブロッ
ク数であり、ここでは差分周期と定義する。
The differential encoding is performed in block units in which an error is propagated when an error occurs when decoding the differential data. This is the number of blocks from the coding of the true value of the motion vector to the coding of the true value of the next motion vector, and is defined as the difference cycle here.

【0014】図9は図7の動きベクトル符号化器710
の詳細ブロック図である。図9において、符号化対象の
動きベクトル値を現動きベクトル値とする。また、直前
の動きベクトル値を前動きベクトル値とする。901は
遅延器で、動きベクトル値を格納する。902は差分周
期カウンタで、差分周期ごとに遅延器901のリセット
を行う。903は差分符号化器で、現動きベクトル値と
遅延器901の格納値との差分値を符号化する。904
は可変長符号化器で、差分符号化器903で符号化され
た差分符号を可変長符号化する。
FIG. 9 shows the motion vector encoder 710 of FIG.
3 is a detailed block diagram of FIG. In FIG. 9, the motion vector value to be encoded is the current motion vector value. In addition, the immediately previous motion vector value is set as the previous motion vector value. A delay unit 901 stores the motion vector value. A difference cycle counter 902 resets the delay device 901 for each difference cycle. A differential encoder 903 encodes the difference value between the current motion vector value and the stored value of the delay device 901. 904
Is a variable length encoder, which performs variable length encoding on the differential code encoded by the differential encoder 903.

【0015】図10は図9で示した詳細ブロックの動作
を説明するフローチャートである。以下に2フレーム目
以降の1フレームの映像信号についての処理手順を示
す。
FIG. 10 is a flow chart for explaining the operation of the detailed block shown in FIG. The processing procedure for the video signals of the first and second frames after the second frame will be described below.

【0016】(1001)画素数を水平800画素・垂
直800画素とし、ブロックの大きさを水平16画素・
垂直16画素とし、水平ブロックの総数を50・垂直ブ
ロックの総数を50とする。また、差分周期を10ブロ
ックとする。初期値として、対象ブロックの水平ブロッ
クを0ブロック、垂直ブロックを0ブロック、差分周期
ブロックを0ブロックに設定する。(1002)へ行
く。
(1001) The number of pixels is 800 horizontal pixels and 800 vertical pixels, and the block size is 16 horizontal pixels.
There are 16 vertical pixels, the total number of horizontal blocks is 50, and the total number of vertical blocks is 50. Further, the difference cycle is 10 blocks. As the initial value, the horizontal block of the target block is set to 0 block, the vertical block is set to 0 block, and the difference period block is set to 0 block. Go to (1002).

【0017】(1002)遅延器901の水平および垂
直方向の動きベクトル値をそれぞれ0に初期化する。
(1003)へ行く。
(1002) The horizontal and vertical motion vector values of the delay device 901 are initialized to 0, respectively.
Go to (1003).

【0018】(1003)差分符号化器903を用い
て、現動きベクトル値と遅延器901に格納された値と
の差分値を符号化する。(1004)へ行く。
(1003) The differential encoder 903 is used to encode the differential value between the current motion vector value and the value stored in the delay unit 901. Go to (1004).

【0019】(1004)現動きベクトル値を遅延器9
01に格納する。(1005)へ行く。
(1004) The current motion vector value is delayed by the delay unit 9
Stored in 01. Go to (1005).

【0020】(1005)可変長符号化器904によ
り、差分符号化器903により求めた差分符号を可変長
符号化する。(1006)へ行く。
(1005) The variable length encoder 904 variable length encodes the differential code obtained by the differential encoder 903. Go to (1006).

【0021】(1006)差分周期カウンタ902によ
り差分周期ブロックに1を加算する。(1007)へ行
く。
(1006) The differential cycle counter 902 adds 1 to the differential cycle block. Go to (1007).

【0022】(1007)差分周期ブロックが差分周期
の10ブロックに等しいかを調べる。等しい場合(10
08)へ行く。そうでない場合(1009)へ行く。
(1007) It is checked whether the difference period block is equal to 10 blocks of the difference period. If they are equal (10
Go to 08). If not, go to (1009).

【0023】(1008)遅延器901の水平および垂
直方向の動きベクトル値をそれぞれ0にリセットする。
また、差分周期ブロックを0にリセットする。(100
9)へ行く。
(1008) The horizontal and vertical motion vector values of the delay device 901 are reset to 0, respectively.
Also, the difference period block is reset to 0. (100
Go to 9).

【0024】(1009)対象ブロックの水平ブロック
に1を加算する。(1010)へ行く。
(1009) Add 1 to the horizontal block of the target block. Go to (1010).

【0025】(1010)対象ブロックの水平ブロック
が水平ブロックの総数である50に等しいかを調べる。
等しい場合、(1011)へ行く。そうでない場合、
(1003)へ行く。
(1010) It is checked whether the horizontal block of the target block is equal to 50, which is the total number of horizontal blocks.
If they are equal, go to (1011). If not,
Go to (1003).

【0026】(1011)対象ブロックの水平ブロック
を0にリセットする。対象ブロックの垂直ブロックに1
を加算する。(1012)へ行く。
(1011) The horizontal block of the target block is reset to 0. 1 for vertical block of target block
Is added. Go to (1012).

【0027】(1012)対象ブロックの垂直ブロック
が垂直ブロックの総数である50に等しいかを調べる。
等しい場合、処理を終了する。そうでない場合、(10
03)へ行く。
(1012) It is checked whether the vertical block of the target block is equal to 50 which is the total number of vertical blocks.
If they are equal, the process ends. Otherwise, (10
Go to 03).

【0028】可変長符号化方法には、MPEGで動きベ
クトル符号化に用いられている1次元ハフマン符号化の
他に、量子化係数の符号化などに用いられているランレ
ングス符号化がある。ランレングス符号化は、差分周期
内のブロックに対し、1つまたは連続する複数個のブロ
ックの水平および垂直方向の動きベクトルの差分符号値
をまとめて1つの符号語に符号化する。動きベクトルの
符号化においても差分符号値が0になる頻度が高いため
ランレングス符号化を用いることは有効である。
Variable-length coding methods include one-dimensional Huffman coding used for motion vector coding in MPEG, and run-length coding used for coding quantized coefficients. In the run-length coding, the differential code values of the horizontal and vertical motion vectors of one or a plurality of consecutive blocks are collectively coded into one codeword for the blocks in the differential cycle. Also in the motion vector coding, it is effective to use the run length coding because the difference code value is often zero.

【0029】図11は動きベクトルの可変長符号化にラ
ンレングス符号化を用いた場合の符号長テーブルの一例
である。ここで、差分周期を10ブロックとしている。
このとき、動きベクトルの数は水平方向と垂直方向を合
わせ20個となる。また、差分符号化方法として折り返
し符号化を用い、差分符号値の存在範囲は−16から+
15とする。
FIG. 11 shows an example of a code length table when run length coding is used for variable length coding of motion vectors. Here, the difference cycle is 10 blocks.
At this time, the number of motion vectors is 20 in the horizontal and vertical directions. In addition, folding coding is used as the differential coding method, and the existence range of the differential code value is from -16 to +.
Set to 15.

【0030】run と value を以下のように定義する。 run : 連続する0の値の差分符号の個数(run = 0,...,
19) value: 連続する0の値の差分符号の直後の差分符号値
(value = -16,...,+15) (run,value) : run、value で示される合計 run + 1
個の情報 ここですべてが0の場合、可変長符号語は (19,0)とな
る。図11の符号長は正負を表すサインビットを含んで
いないため、 valueが0でない場合の符号長は1ビット
増加する。さらに、図11で符号長が空白になっている
部分は以下で示すように2つの符号語の組合せに変換し
て符号化する。 (run,value) -> (run - 1,0) + (0,value) 次に図12,図13に、動きベクトルの可変長符号化に
ランレングス符号化を用いた場合の可変長符号化テーブ
ルを示す。ここで符号語のsは、入力されるvalueが正
の数の場合は0、負の数の場合は1となる。
Run and value are defined as follows. run: Number of consecutive 0-valued difference codes (run = 0, ...,
19) value: Difference code value immediately after the difference code of consecutive 0 values
(value = -16, ..., + 15) (run, value): run, total run + 1
Individual information Here, if all are 0, the variable length codeword is (19,0). Since the code length of FIG. 11 does not include a sign bit representing positive or negative, the code length increases by 1 bit when value is not 0. Further, a portion where the code length is blank in FIG. 11 is converted into a combination of two codewords and encoded as shown below. (run, value)-> (run-1,0) + (0, value) Next, FIGS. 12 and 13 show variable length coding when run length coding is used for variable length coding of motion vectors. Show table. Here, the code word s is 0 when the input value is a positive number and 1 when the input value is a negative number.

【0031】このような可変長符号化器を用いた場合、
可変長符号化器へ転送する差分符号の順番により、連続
する0の値の差分符号の個数が異なるため、異なる符号
長の可変長符号が生成される。そのため効率のよい可変
長符号を生成するためには、差分符号化器から可変長符
号化器へ差分符号を効率のよい順番に転送できることが
必要となる。
When such a variable length encoder is used,
Since the number of consecutive differential codes having a value of 0 differs depending on the order of the differential codes transferred to the variable length encoder, variable length codes having different code lengths are generated. Therefore, in order to generate an efficient variable length code, it is necessary to transfer the differential codes from the differential encoder to the variable length encoder in an efficient order.

【0032】[0032]

【発明が解決しようとする課題】しかしながら従来の動
きベクトル符号化装置においては前述の具体例で説明し
たように、差分符号化を行った順に可変長符号化器に差
分符号が転送されるため、ランレングス符号化などの入
力デ−タの順番に依存する可変長符号化方法を用いた場
合、必ずしも効率のよいデ−タの順番に差分符号を可変
長符号化器へ転送することはできないという課題を有し
ていた。
However, in the conventional motion vector coding apparatus, since the differential codes are transferred to the variable length coder in the order in which the differential coding is performed, as described in the above-mentioned specific example, When a variable length coding method that depends on the order of input data such as run length coding is used, it is not always possible to transfer the differential codes to the variable length encoder in an efficient data order. Had challenges.

【0033】本発明は、かかる点に鑑み、あらかじめ設
定した順番に差分符号を可変長符号化器へ転送すること
により符号化効率の高い動きベクトル符号化装置を提供
することを目的とするものである。
In view of the above point, the present invention has an object to provide a motion vector coding apparatus having high coding efficiency by transferring differential codes to a variable length coder in a preset order. is there.

【0034】[0034]

【課題を解決するための手段】本発明は前記目的を達成
するために、動きベクトル値を差分符号化する際に動き
ベクトルの真値を符号化してから次に動きベクトルの真
値を符号化するまでのブロック数を差分周期とし、符号
化対象の動きベクトル値を現動きベクトル値、直前の動
きベクトル値を前動きベクトル値としたとき、動きベク
トル値を格納する遅延器と、ブロック数のカウントを行
い差分周期ごとに遅延器のリセットを行う差分周期カウ
ンタと、現動きベクトル値と遅延器の格納値との差分値
を符号化する差分符号化器と、差分符号を可変長符号化
する可変長符号化器と、差分符号化器で符号化された差
分符号を格納する差分符号メモリと、差分周期カウンタ
に同期して差分符号メモリに格納された差分符号をあら
かじめ設定された順番に可変長符号化器へ転送するメモ
リデ−タ制御器を備えたものである。
In order to achieve the above object, the present invention encodes the true value of a motion vector and then the true value of the motion vector when differentially encoding the motion vector value. When the number of blocks up to is the difference cycle, the motion vector value to be encoded is the current motion vector value, and the previous motion vector value is the previous motion vector value, the delay unit that stores the motion vector value and the block number A difference cycle counter that counts and resets the delay unit for each difference cycle, a difference encoder that encodes the difference value between the current motion vector value and the stored value of the delay unit, and a difference length variable-length code A variable length encoder, a difference code memory for storing the difference code encoded by the difference encoder, and a difference code stored in the difference code memory in synchronization with the difference cycle counter are preset. Turn transferred to the variable-length coder Memoride - those having the motor controller.

【0035】[0035]

【作用】本発明の動きベクトル符号化装置は前記した構
成により、差分符号化器を用い現動きベクトル値と前動
きベクトル値の差分符号化を行い、差分符号を差分符号
メモリに格納する。メモリデ−タ制御器を用い差分周期
カウンタに同期して差分周期ごとに差分符号メモリに格
納された差分符号をあらかじめ設定された順番で差分符
号化器に転送する。
According to the motion vector coding apparatus of the present invention having the above-mentioned configuration, the differential coding is performed using the differential coding unit to perform the differential coding between the current motion vector value and the previous motion vector value and store the differential code in the differential code memory. The differential code stored in the differential code memory is transferred to the differential encoder in a preset order for each differential cycle in synchronization with the differential cycle counter using the memory data controller.

【0036】[0036]

【実施例】【Example】

(実施例1)以下、本発明の第1の実施例における動き
ベクトル符号化装置について図面を用いて説明する。図
1は本発明の第1の実施例における動きベクトル符号化
装置の構成図である。ここでは、図7の従来例における
動きベクトル符号化装置の動きベクトル符号化器710
のみが異なるため、その構成を記載している。
(Embodiment 1) A motion vector coding apparatus according to a first embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a motion vector coding apparatus according to a first embodiment of the present invention. Here, the motion vector encoder 710 of the motion vector encoder in the conventional example of FIG. 7 is used.
Only the difference is shown, and the configuration is described.

【0037】図1において、符号化対象の動きベクトル
値を現動きベクトル値、直前の動きベクトル値を前動き
ベクトル値とする。101は遅延器で、動きベクトル値
を格納する。102は差分周期カウンタで、ブロック数
のカウントを行い差分周期ごとに遅延器101のリセッ
トを行う。103は差分符号化器で、現動きベクトル値
と遅延器101の格納値との差分値を符号化する。10
4は可変長符号化器で、差分符号を可変長符号化する。
105は差分符号メモリで、差分符号化器103で符号
化された差分符号を格納する。106はメモリデータ制
御器で、差分周期カウンタ102に同期して差分符号メ
モリ105に格納された差分符号をあらかじめ設定され
た順番に可変長符号化器104へ転送する。
In FIG. 1, the motion vector value to be encoded is the current motion vector value, and the immediately preceding motion vector value is the previous motion vector value. 101 is a delay device which stores a motion vector value. A differential cycle counter 102 counts the number of blocks and resets the delay device 101 for each differential cycle. A difference encoder 103 encodes a difference value between the current motion vector value and the stored value of the delay device 101. 10
Reference numeral 4 is a variable length encoder, which performs variable length encoding of the differential code.
A differential code memory 105 stores the differential code encoded by the differential encoder 103. A memory data controller 106 transfers the differential codes stored in the differential code memory 105 in synchronization with the differential cycle counter 102 to the variable length encoder 104 in a preset order.

【0038】図2は図1の動作を説明するフローチャー
トである。以下に2フレーム目以降の1フレームの映像
信号についての処理手順を示す。
FIG. 2 is a flow chart for explaining the operation of FIG. The processing procedure for the video signals of the first and second frames after the second frame will be described below.

【0039】(201)画素数を水平800画素・垂直
800画素とし、ブロックの大きさを水平16画素・垂
直16画素とし、水平ブロックの総数を50・垂直ブロ
ックの総数を50とする。また、差分周期を10ブロッ
クとする。初期値として、対象ブロックの水平ブロック
を0ブロック、垂直ブロックを0ブロック、差分周期ブ
ロックを0ブロックに設定する。(202)へ行く。
(201) The number of pixels is 800 horizontal pixels and 800 vertical pixels, the block size is 16 horizontal pixels and 16 vertical pixels, and the total number of horizontal blocks is 50 and the total number of vertical blocks is 50. Further, the difference cycle is 10 blocks. As the initial value, the horizontal block of the target block is set to 0 block, the vertical block is set to 0 block, and the difference period block is set to 0 block. Go to (202).

【0040】(202)遅延器101の水平および垂直
方向の動きベクトル値をそれぞれ0に初期化する。(2
03)へ行く。
(202) The horizontal and vertical motion vector values of the delay device 101 are initialized to 0, respectively. (2
Go to 03).

【0041】(203)差分符号化器103を用いて、
現動きベクトル値と遅延器101に格納された値との差
分値を符号化する。(204)へ行く。
(203) Using the differential encoder 103,
The difference value between the current motion vector value and the value stored in the delay device 101 is encoded. Go to (204).

【0042】(204)現動きベクトル値を遅延器10
1に格納する。(205)へ行く。(205)差分符号
化器103により符号化された差分符号を、差分符号メ
モリ105に格納する。(206)へ行く。
(204) The current motion vector value is added to the delay unit 10
Store in 1. Go to (205). (205) The differential code encoded by the differential encoder 103 is stored in the differential code memory 105. Go to (206).

【0043】(206)差分周期カウンタ102により
差分周期ブロックに1を加算する。(207)へ行く。
(206) The differential cycle counter 102 adds 1 to the differential cycle block. Go to (207).

【0044】(207)差分周期ブロックが差分周期の
10ブロックに等しいかを調べる。等しい場合(20
8)へ行く。そうでない場合(211)へ行く。
(207) Check whether the difference period block is equal to 10 blocks of the difference period. If they are equal (20
Go to 8). If not, go to (211).

【0045】(208)メモリデータ制御器106を用
いて、差分符号メモリ105から可変長符号化器104
へあらかじめ設定された順番にデータの出力制御を行
う。(209)へ行く。
(208) Using the memory data controller 106, the differential code memory 105 to the variable length encoder 104
Data output control is performed in the order set in advance. Go to (209).

【0046】(209)差分周期内にあるブロックの差
分符号を可変長符号化する。(210)へ行く。
(209) The differential code of the block within the differential cycle is variable length coded. Go to (210).

【0047】(210)遅延器101の水平および垂直
方向の動きベクトル値をそれぞれ0にリセットする。ま
た、差分周期ブロックを0にリセットする。(211)
へ行く。
(210) The horizontal and vertical motion vector values of the delay device 101 are reset to 0, respectively. Also, the difference period block is reset to 0. (211)
Go to

【0048】(211)対象ブロックの水平ブロックに
1を加算する。(212)へ行く。(212)対象ブロ
ックの水平ブロックが水平ブロックの総数である50に
等しいかを調べる。等しい場合、(213)へ行く。そ
うでない場合、(203)へ行く。
(211) Add 1 to the horizontal block of the target block. Go to (212). (212) It is checked whether the horizontal block of the target block is equal to 50, which is the total number of horizontal blocks. If they are equal, go to (213). If not, go to (203).

【0049】(213)対象ブロックの水平ブロックを
0にリセットする。対象ブロックの垂直ブロックに1を
加算する。(214)へ行く。
(213) The horizontal block of the target block is reset to 0. Add 1 to the vertical block of the target block. Go to (214).

【0050】(214)対象ブロックの垂直ブロックが
垂直ブロックの総数である50に等しいかを調べる。等
しい場合、処理を終了する。そうでない場合、(20
3)へ行く。
(214) It is checked whether the vertical block of the target block is equal to 50 which is the total number of vertical blocks. If they are equal, the process ends. Otherwise, (20
Go to 3).

【0051】ここでは、差分符号化器103として、M
PEGで採用されている折り返し符号化を用いて動きベ
クトルの差分符号化を行う。
Here, as the differential encoder 103, M
The differential encoding of the motion vector is performed using the folding encoding adopted in PEG.

【0052】また、可変長符号化器104として、ラン
レングス符号化を用いて差分符号の可変長符号化を行
う。ランレングス符号化は、差分周期内のブロックに対
し、1つまたは連続する複数個のブロックの水平または
垂直方向の動きベクトルの差分符号値をまとめて1つの
符号語に符号化する。このような可変長符号化器を用い
た場合、可変長符号化器に転送する差分符号の順番によ
り、可変長符号が異なってくる。
Also, as the variable length encoder 104, the variable length encoding of the differential code is performed by using the run length encoding. In the run-length encoding, the differential code values of the horizontal or vertical motion vector of one or a plurality of blocks in a difference period are collectively encoded into one codeword. When such a variable length encoder is used, the variable length code is different depending on the order of the differential codes transferred to the variable length encoder.

【0053】図3は、可変長符号化器への転送データの
並べ換えパターンを示している。ここで、水平方向及び
垂直方向の動きベクトル値をhi、vi(i = 0〜
9)とし、差分符号値をΔhi、Δvi(i = 0〜
9)とする。Δh0とΔv0は真値の差分符号値とす
る。ここで、動きベクトルはh0、v0からh9、v9
へ図3の左から右の順に差分符号化器103へ入力され
るとする。
FIG. 3 shows a rearrangement pattern of transfer data to the variable length encoder. Here, the horizontal and vertical motion vector values are represented by hi and vi (i = 0 to 0).
9) and the difference code values are Δhi and Δvi (i = 0 to 0).
9). Δh0 and Δv0 are true value difference sign values. Here, the motion vectors are h0, v0 to h9, v9
3 is input to the differential encoder 103 in the order from left to right in FIG.

【0054】まず、差分符号を入力順に可変長符号化器
へ転送した場合は、可変長符号語として、(0,1)、(0,-
1)、(8,1)、(5,1)、(2,0)が生成される。図12,図1
3の可変長符号化テーブルを用いた場合、差分周期内の
動きベクトルの符号長は35ビットとなる。
First, when the differential code is transferred to the variable-length encoder in the order of input, the variable-length code words (0,1), (0,-
1), (8,1), (5,1), (2,0) are generated. 12 and 1
When the variable length coding table of No. 3 is used, the code length of the motion vector in the difference cycle is 35 bits.

【0055】並べ換えパターン1は、差分符号化された
逆順に可変長符号化へデータを転送する場合である。こ
のとき、可変長符号語として、(3,1)、(5,1)、(8,-1)、
(0,1)が生成される。図12,図13の可変長符号化テ
ーブルを用いた場合、差分周期内の動きベクトルの符号
長は27ビットとなる。
The rearrangement pattern 1 is a case where the data is transferred to the variable length coding in the reverse order of the differential coding. At this time, as variable-length codewords, (3,1), (5,1), (8, -1),
(0,1) is generated. When the variable length coding table of FIGS. 12 and 13 is used, the code length of the motion vector in the difference cycle is 27 bits.

【0056】これは、動きベクトルの真値の差分符号で
あるΔh0、Δv0を可変長符号化器へ最後に転送する
ことにより、連続する0の値の差分符号の個数が多くな
ったため、符号化効率が向上したと考えられる。
This is because the number of consecutive 0-valued difference codes is increased by finally transferring the differential codes Δh0 and Δv0 of the true value of the motion vector to the variable length encoder. It is considered that the efficiency has improved.

【0057】並べ換えパターン2は、水平方向の差分符
号の後に垂直方向の差分符号を転送した場合である。こ
のとき可変長符号語として、(0,1)、(4,1)、(2,1)、(1,
-1)、(8,0)が生成される。図12,図13の可変長符号
化テーブルを用いた場合、差分周期内の動きベクトルの
符号長は34ビットとなる。
The rearrangement pattern 2 is a case where the differential code in the vertical direction is transferred after the differential code in the horizontal direction. At this time, as variable-length codewords, (0,1), (4,1), (2,1), (1,
-1) and (8,0) are generated. When the variable length coding table of FIGS. 12 and 13 is used, the code length of the motion vector in the difference cycle is 34 bits.

【0058】これは、水平方向と垂直方向の動きベクト
ル値は本来独立であると考えられるからである。水平方
向のみにパニング以外の動きがあり垂直方向にパニング
以外の動きがない場合、垂直方向の差分値は0になるた
め連続する0の値の差分符号の個数が多くなったため、
符号化効率が向上したと考えられる。
This is because the motion vector values in the horizontal direction and the vertical direction are considered to be originally independent. When there is motion other than panning only in the horizontal direction and there is no motion other than panning in the vertical direction, the difference value in the vertical direction is 0, and the number of consecutive difference codes of 0 is large.
It is considered that the coding efficiency has improved.

【0059】並べ換えパターン3は、並べ換えパターン
2で動きベクトルの真値の差分符号であるΔh0、Δv
0を最後に転送した場合である。このとき、可変長符号
語として、(4,1)、(2,1)、(10,1)、(0,-1)が生成され
る。図12,図13の可変長符号化テーブルを用いた場
合、差分周期内の動きベクトルの符号長は25ビットと
なる。
The rearrangement pattern 3 is the rearrangement pattern 2, and the difference codes of the true value of the motion vector are Δh0 and Δv.
This is the case when 0 is transferred last. At this time, (4,1), (2,1), (10,1), and (0, -1) are generated as variable-length codewords. When the variable length coding table of FIGS. 12 and 13 is used, the code length of the motion vector in the difference cycle is 25 bits.

【0060】並べ換えパターン4は、並べ換えパターン
2を逆順にした後、最後の2つがΔv0、Δh0になる
ようにした場合である。このとき、可変長符号語とし
て、(10,1)、(2,1)、(4,-1)、(0,1)が生成される。図1
2,図13の可変長符号化テーブルを用いた場合、差分
周期内の動きベクトルの符号長は25ビットとなる。
The rearrangement pattern 4 is a case where the rearrangement pattern 2 is reversed and then the last two are set to Δv0 and Δh0. At this time, (10,1), (2,1), (4, -1), and (0,1) are generated as variable-length code words. Figure 1
2. When the variable length coding table of FIG. 13 is used, the code length of the motion vector in the difference cycle is 25 bits.

【0061】並べ換えパターン3および並べ換えパター
ン4は、動きベクトルの真値の差分符号を可変長符号化
器へ最後に転送し、さらに動きベクトルの差分値の差分
符号に対しては、水平方向の差分符号を転送した後に垂
直方向の差分符号を転送するか、垂直方向の差分符号を
転送した後に水平方向の差分符号を転送するかのいずれ
かであり、並べ換えパターン1と並べ換えパターン2の
2つの効果により、連続する0の値の差分符号の個数が
さらに多くなり、符号化効率が並べ換えパターン1と並
べ換えパターン2よりさらに向上したと考えられる。
In the rearrangement pattern 3 and the rearrangement pattern 4, the difference code of the true value of the motion vector is finally transferred to the variable length encoder, and the difference code in the horizontal direction is added to the difference code of the difference value of the motion vector. Either the code is transferred and then the vertical difference code is transferred, or the vertical difference code is transferred and then the horizontal difference code is transferred, and two effects of rearrangement pattern 1 and rearrangement pattern 2 are obtained. It is considered that, by this, the number of consecutive difference codes having a value of 0 is further increased, and the coding efficiency is further improved as compared with the rearrangement pattern 1 and the rearrangement pattern 2.

【0062】以上のように、第1の実施例の動きベクト
ル符号化装置を用いることにより、差分符号メモリを用
いて可変長符号化器への転送データの順番を並び換える
ことにより、連続する0の値の差分符号の個数が多くな
る差分符号の順に可変長符号化することが可能となり、
動きベクトルの符号化効率を向上させることができる。
As described above, by using the motion vector coding apparatus of the first embodiment, the order of the transfer data to the variable length coder is rearranged by using the differential code memory, so that continuous 0s can be obtained. It becomes possible to perform variable length coding in the order of the difference codes in which the number of difference codes of the value of
The motion vector coding efficiency can be improved.

【0063】(実施例2)第1の実施例では差分符号を
可変長符号化器104へ転送する順番を並べ換えるため
に、差分周期内に存在する差分符号を格納する差分符号
メモリ105とメモリデータ制御器が106が必要とな
る。ところが、これらの規模の増加が実現上支障となる
場合がある。
(Embodiment 2) In the first embodiment, in order to rearrange the order of transferring the differential codes to the variable length encoder 104, the differential code memory 105 for storing the differential codes existing in the differential cycle and the memory A data controller 106 is required. However, there is a case where the increase of these scales is an obstacle to realization.

【0064】そこで第2の実施例では、差分符号メモリ
を真値の動きベクトルの差分符号に必要な容量に削減
し、メモリデータ制御器106の代わりにスイッチを設
けることで構成することが可能な動きベクトル符号化装
置について述べる。
Therefore, the second embodiment can be configured by reducing the capacity of the differential code memory to the capacity required for the differential code of the true-valued motion vector and providing a switch instead of the memory data controller 106. The motion vector coding apparatus will be described.

【0065】以下に、本発明の第2の実施例における動
きベクトル符号化装置について図面を用いて説明する。
The motion vector coding apparatus according to the second embodiment of the present invention will be described below with reference to the drawings.

【0066】図4は本発明の第2の実施例における動き
ベクトル符号化装置の構成図である。ここでは、図7の
従来例における動きベクトル符号化装置の動きベクトル
符号化器710のみが異なるため、その構成を記載して
いる。
FIG. 4 is a block diagram of a motion vector coding apparatus according to the second embodiment of the present invention. Here, only the motion vector encoder 710 of the motion vector encoder in the conventional example of FIG. 7 is different, and therefore the configuration is described.

【0067】図4において、符号化対象の動きベクトル
値を現動きベクトル値、直前の動きベクトル値を前動き
ベクトル値とする。401は遅延器で、動きベクトル値
を格納する。402は差分周期カウンタで、ブロック数
のカウントを行い差分周期ごとに遅延器401のリセッ
トを行う。403は差分符号化器で、現動きベクトル値
と遅延器401の値との差分値を符号化する。404は
可変長符号化器で、差分符号をランレングス符号化を用
いて可変長符号化する。
In FIG. 4, the motion vector value to be encoded is the current motion vector value, and the immediately preceding motion vector value is the previous motion vector value. A delay unit 401 stores a motion vector value. A difference cycle counter 402 counts the number of blocks and resets the delay unit 401 for each difference cycle. A differential encoder 403 encodes the differential value between the current motion vector value and the value of the delay device 401. A variable length encoder 404 performs variable length encoding on the differential code using run length encoding.

【0068】405は差分符号メモリで、差分周期カウ
ンタ402に同期して直前に格納されている差分符号を
可変長符号化器404へ転送し、新たに差分符号化器4
03で符号化された差分符号を格納する。406はスイ
ッチで、差分周期カウンタ402に同期して動きベクト
ルの真値の差分符号を差分符号メモリ405に、動きベ
クトルの差分値の差分符号を可変長符号化器406に転
送する。
Reference numeral 405 denotes a differential code memory, which transfers the differential code stored immediately before in synchronization with the differential cycle counter 402 to the variable length encoder 404 and newly adds it to the differential encoder 4
The difference code encoded in 03 is stored. A switch 406 transfers the true value difference code of the motion vector to the difference code memory 405 and the motion vector difference value difference code to the variable length encoder 406 in synchronization with the difference cycle counter 402.

【0069】図5は図4の動作を説明するフローチャー
トである。以下に2フレーム目以降の1フレームの映像
信号についての処理手順を示す。
FIG. 5 is a flow chart for explaining the operation of FIG. The processing procedure for the video signals of the first and second frames after the second frame will be described below.

【0070】(501)画素数を水平800画素・垂直
800画素とし、ブロックの大きさを水平16画素・垂
直16画素とし、水平ブロックの総数を50・垂直ブロ
ックの総数を50とする。また、差分周期を10ブロッ
クとする。初期値として、対象ブロックの水平ブロック
を0ブロック、垂直ブロックを0ブロック、差分周期ブ
ロックを0ブロックに設定する。(502)へ行く。
(501) It is assumed that the number of pixels is 800 horizontal pixels and 800 vertical pixels, the block size is 16 horizontal pixels and 16 vertical pixels, and the total number of horizontal blocks is 50 and the total number of vertical blocks is 50. Further, the difference cycle is 10 blocks. As the initial value, the horizontal block of the target block is set to 0 block, the vertical block is set to 0 block, and the difference period block is set to 0 block. Go to (502).

【0071】(502)遅延器401の水平および垂直
方向の動きベクトル値をそれぞれ0に初期化する。(5
03)へ行く。
(502) Initialize the horizontal and vertical motion vector values of the delay unit 401 to 0, respectively. (5
Go to 03).

【0072】(503)差分符号化器403を用いて、
現動きベクトル値と遅延器401に格納された値との差
分値を符号化する。(504)へ行く。
(503) Using the differential encoder 403,
The difference value between the current motion vector value and the value stored in the delay unit 401 is encoded. Go to (504).

【0073】(504)現動きベクトルを遅延器401
に格納する。(505)へ行く。(505)差分周期カ
ウンタ402により差分周期ブロックに1を加算する。
(506)へ行く。
(504) The current motion vector is delayed by the delay unit 401.
To store. Go to (505). (505) The difference cycle counter 402 increments the difference cycle block by one.
Go to (506).

【0074】(506)差分周期ブロックが1ブロック
に等しいかを調べる。等しい場合(507)へ行く。そ
うでない場合(508)へ行く。
(506) It is checked whether the difference periodic block is equal to one block. If they are equal, go to (507). If not, go to (508).

【0075】(507)差分符号メモリ405に格納さ
れている差分符号を可変長符号化器404に転送し、現
在対象の差分符号を差分符号メモリ405に新規に格納
する。(508)へ行く。
(507) The differential code stored in the differential code memory 405 is transferred to the variable length encoder 404, and the currently targeted differential code is newly stored in the differential code memory 405. Go to (508).

【0076】(508)差分符号を可変長符号化する。
(509)へ行く。(509)差分周期ブロックが差分
周期の10ブロックに等しいかを調べる。等しい場合
(510)へ行く。そうでない場合(511)へ行く。
(508) The differential code is variable length coded.
Go to (509). (509) It is checked whether the difference cycle block is equal to 10 blocks of the difference cycle. If they are equal, go to (510). If not, go to (511).

【0077】(510)遅延器401の水平および垂直
方向の動きベクトル値をそれぞれ0にリセットする。ま
た、差分周期ブロックを0にリセットする。(511)
へ行く。
(510) The horizontal and vertical motion vector values of the delay unit 401 are reset to 0 respectively. Also, the difference period block is reset to 0. (511)
Go to

【0078】(511)対象ブロックの水平ブロックに
1を加算する。(512)へ行く。(512)対象ブロ
ックの水平ブロックが水平ブロックの総数である50に
等しいかを調べる。等しい場合、(513)へ行く。そ
うでない場合、(503)へ行く。
(511) Add 1 to the horizontal block of the target block. Go to (512). (512) It is checked whether the horizontal block of the target block is equal to 50, which is the total number of horizontal blocks. If they are equal, go to (513). If not, go to (503).

【0079】(513)対象ブロックの水平ブロックを
0にリセットする。対象ブロックの垂直ブロックに1を
加算する。(514)へ行く。
(513) The horizontal block of the target block is reset to 0. Add 1 to the vertical block of the target block. Go to (514).

【0080】(514)対象ブロックの垂直ブロックが
垂直ブロックの総数である50に等しいかを調べる。等
しい場合、処理を終了する。そうでない場合、(50
3)へ行く。
(514) It is checked whether the vertical block of the target block is equal to 50 which is the total number of vertical blocks. If they are equal, the process ends. Otherwise, (50
Go to 3).

【0081】ここでは、差分符号化器403として、M
PEGで採用されている折り返し符号化を用いて動きベ
クトルの差分符号化を行う。
Here, as the differential encoder 403, M
The differential encoding of the motion vector is performed using the folding encoding adopted in PEG.

【0082】また、可変長符号化器404として、ラン
レングス符号化を用いて差分符号の可変長符号化を行
う。
Also, as the variable length encoder 404, the variable length encoding of the differential code is performed by using the run length encoding.

【0083】本実施例の構成を用いることにより、動き
ベクトルの真値の差分符号を差分符号メモリ405に格
納し、それ以降のブロックの動きベクトルの差分符号を
順次可変長符号化器404に転送していき、最後に差分
符号メモリ405に格納された動きベクトルの真値の差
分符号を可変長符号化器404に転送するため、連続す
る0の値の差分符号の個数が多い可変長符号を作成する
ことが可能となる。
By using the configuration of this embodiment, the difference code of the true value of the motion vector is stored in the difference code memory 405, and the difference codes of the motion vectors of the subsequent blocks are sequentially transferred to the variable length encoder 404. Finally, in order to transfer the true value difference code of the motion vector stored in the difference code memory 405 to the variable length encoder 404, a variable length code having a large number of consecutive 0 value difference codes is used. It is possible to create.

【0084】図6は、可変長符号化器への転送データの
並べ換えパターンを示している。ここで、水平方向およ
び垂直方向の動きベクトル値をhi、vi(i = 0〜
9)とし、差分符号値をΔhi、Δvi(i = 0〜
9)とする。Δh0とΔv0は真値の差分符号値とす
る。ここで、動きベクトルはh0、v0からh9、v9
へ図6の左から右の順に差分符号化器403へ入力され
るとする。
FIG. 6 shows a rearrangement pattern of transfer data to the variable length encoder. Here, the horizontal and vertical motion vector values are represented by hi and vi (i = 0 to 0).
9) and the difference code values are Δhi and Δvi (i = 0 to 0).
9). Δh0 and Δv0 are true value difference sign values. Here, the motion vectors are h0, v0 to h9, v9
6 is input to the differential encoder 403 from left to right in FIG.

【0085】まず、差分符号を入力順に可変長符号化器
へ転送した場合は、可変長符号語として、(0,1)、(0,-
1)、(8,1)、(5,1)、(2,0)が生成される。図12,図1
3の可変長符号化テーブルを用いた場合、差分周期内の
動きベクトルの符号長は35ビットとなる。
First, when the differential code is transferred to the variable-length encoder in the order of input, the variable-length code words (0,1), (0,-
1), (8,1), (5,1), (2,0) are generated. 12 and 1
When the variable length coding table of No. 3 is used, the code length of the motion vector in the difference cycle is 35 bits.

【0086】並べ換えパターンでは、動きベクトルの真
値の差分符号であるΔh0、Δv0を最後に可変長符号
化へ転送する。このとき、可変長符号語として、(8,
1)、(5,1)、(3,1)、(0,-1)が生成される。図12,図1
3の可変長符号化テーブルを用いた場合、差分周期内の
動きベクトルの符号長は27ビットとなる。
In the rearrangement pattern, the difference codes Δh0 and Δv0 of the true value of the motion vector are finally transferred to the variable length coding. At this time, as a variable-length codeword, (8,
1), (5,1), (3,1) and (0, -1) are generated. 12 and 1
When the variable length coding table of No. 3 is used, the code length of the motion vector in the difference cycle is 27 bits.

【0087】これは、動きベクトルの真値の差分符号で
あるΔh0、Δv0を可変長符号化器へ最後に転送する
ことにより、連続する0の値の差分符号の個数が多くな
ったため、符号化効率が向上したと考えられる。
This is because the number of consecutive 0-value difference codes is increased by finally transferring the differential codes Δh0 and Δv0 of the true value of the motion vector to the variable length encoder. It is considered that the efficiency has improved.

【0088】以上のように、第2の実施例の動きベクト
ル符号化装置を用いることにより、差分周期カウンタ4
02に同期して動きベクトルの真値の差分符号に対応す
る差分符号メモリ405とスイッチ406を用いて差分
符号を可変長符号化器404へ転送する順番を制御する
ことにより、連続する0の値の差分符号の個数が多い可
変長符号を生成することが可能となり、実施例1よりも
簡単な構成で動きベクトルの符号化効率を向上させるこ
とができる。
As described above, by using the motion vector coding apparatus of the second embodiment, the difference cycle counter 4
By controlling the order of transferring the differential codes to the variable length encoder 404 by using the differential code memory 405 and the switch 406 corresponding to the true value differential code of the motion vector in synchronization with 02, consecutive 0 values are obtained. It is possible to generate a variable-length code having a large number of differential codes, and it is possible to improve the motion vector coding efficiency with a simpler configuration than the first embodiment.

【0089】[0089]

【発明の効果】本発明の動きベクトル符号化装置は、差
分符号を差分符号メモリに格納し、メモリデ−タ制御器
を用い差分周期ごとに可変長符号化器へあらかじめ設定
した順番に差分符号を転送することによって、可変長符
号化器に適した順番でデ−タを転送することができ、符
号化効率のよい可変長符号化を行うことが可能となる。
According to the motion vector coding apparatus of the present invention, the differential code is stored in the differential code memory, and the differential code is stored in the differential code memory in the order preset by the memory data controller for each differential cycle. By transferring the data, the data can be transferred in an order suitable for the variable length coder, and variable length coding with high coding efficiency can be performed.

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

【図1】本発明の第1の実施例における動きベクトル符
号化器の構成図
FIG. 1 is a configuration diagram of a motion vector encoder according to a first embodiment of the present invention.

【図2】本発明の第1の実施例における動きベクトル符
号化装置のフローチャート
FIG. 2 is a flowchart of the motion vector coding apparatus according to the first embodiment of the present invention.

【図3】本発明の第1の実施例における差分符号の並べ
換えパターンを示す図
FIG. 3 is a diagram showing a rearrangement pattern of differential codes in the first embodiment of the present invention.

【図4】本発明の第2の実施例における動きベクトル符
号化器の構成図
FIG. 4 is a configuration diagram of a motion vector encoder according to a second embodiment of the present invention.

【図5】本発明の第2の実施例における動きベクトル符
号化装置のフローチャート
FIG. 5 is a flowchart of a motion vector coding device according to a second embodiment of the present invention.

【図6】本発明の第2の実施例における差分符号の並べ
換えパターンを示す図
FIG. 6 is a diagram showing a rearrangement pattern of differential codes in the second embodiment of the present invention.

【図7】従来の動きベクトル符号化装置の構成図FIG. 7 is a configuration diagram of a conventional motion vector encoding device.

【図8】従来の動きベクトル符号化装置の動きベクトル
符号化テーブルを示す図
FIG. 8 is a diagram showing a motion vector coding table of a conventional motion vector coding device.

【図9】従来の動きベクトル符号化装置の動きベクトル
符号化器のブロック図
FIG. 9 is a block diagram of a motion vector encoder of a conventional motion vector encoder.

【図10】従来の動きベクトル符号化装置のフローチャ
ート
FIG. 10 is a flowchart of a conventional motion vector encoding device.

【図11】ランレングス符号化を用いた可変長符号化器
の符号長テーブルを示す図
FIG. 11 is a diagram showing a code length table of a variable length encoder using run length encoding.

【図12】ランレングス符号化を用いた可変長符号化器
の符号化テーブルを示す図
FIG. 12 is a diagram showing an encoding table of a variable length encoder using run length encoding.

【図13】ランレングス符号化を用いた可変長符号化器
の符号化テーブルを示す図
FIG. 13 is a diagram showing an encoding table of a variable length encoder using run length encoding.

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

101 遅延器 102 差分周期カウンタ 103 差分符号化器 104 可変長符号化器 105 差分符号メモリ 106 メモリデータ制御器 101 delay device 102 differential cycle counter 103 differential encoder 104 variable length encoder 105 differential code memory 106 memory data controller

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】動きベクトル値を差分符号化する際に動き
ベクトルの真値を符号化してから次に動きベクトルの真
値を符号化するまでのブロック数を差分周期とし、符号
化対象の動きベクトル値を現動きベクトル値、直前の動
きベクトル値を前動きベクトル値としたとき、動きベク
トル値を格納する遅延器と、ブロック数のカウントを行
い前記差分周期ごとに前記遅延器のリセットを行う差分
周期カウンタと、前記現動きベクトル値と前記遅延器の
格納値との差分値を符号化する差分符号化器と、差分符
号を可変長符号化する可変長符号化器と、前記差分符号
化器で符号化された差分符号を格納する差分符号メモリ
と、前記差分周期カウンタに同期して前記差分符号メモ
リに格納された差分符号をあらかじめ設定された順番に
前記可変長符号化器へ転送するメモリデ−タ制御器を備
えたことを特徴とする動きベクトル符号化装置。
1. When a motion vector value is differentially coded, the number of blocks from the coding of the true value of the motion vector to the coding of the true value of the motion vector is set as a difference cycle, and the motion to be coded is set. When the vector value is the current motion vector value and the previous motion vector value is the previous motion vector value, the delay unit that stores the motion vector value and the block number are counted, and the delay unit is reset at each difference cycle. A difference cycle counter, a difference encoder for encoding a difference value between the current motion vector value and the stored value of the delay device, a variable length encoder for variable length encoding a difference code, and the difference encoding Differential code memory for storing the differential code encoded by the differential unit, and the differential code stored in the differential code memory in synchronization with the differential cycle counter in the variable length encoding in a preset order. Transferred to Memoride - motion vector coding apparatus comprising the motor controller.
【請求項2】メモリデ−タ制御器は、動きベクトルの真
値の差分符号を動きベクトルの差分値の差分符号の後に
前記可変長符号化器へ転送することを特徴とする請求項
1記載の動きベクトル符号化装置。
2. The memory data controller transfers the differential code of the true value of the motion vector to the variable length encoder after the differential code of the differential value of the motion vector. Motion vector coding device.
【請求項3】可変長符号化器は、ランレングス符号化を
行うことを特徴とする請求項1記載の動きベクトル符号
化装置。
3. The motion vector coding apparatus according to claim 1, wherein the variable-length coding unit performs run-length coding.
【請求項4】メモリデ−タ制御器は、動きベクトルの差
分値の差分符号の中で、水平方向の差分符号を転送した
後に垂直方向の差分符号を転送するか、垂直方向の差分
符号を転送した後に水平方向の差分符号を転送するかの
いずれかの制御を行うことを特徴とする請求項1記載の
動きベクトル符号化装置。
4. The memory data controller transfers a horizontal difference code and then a vertical difference code among the difference codes of the motion vector difference values, or transfers a vertical direction difference code. 2. The motion vector coding apparatus according to claim 1, wherein either one of the control of transferring the differential code in the horizontal direction is performed after that.
【請求項5】動きベクトル値を差分符号化する際に動き
ベクトルの真値を符号化してから次に動きベクトルの真
値を符号化するまでのブロック数を差分周期とし、符号
化対象の動きベクトル値を現動きベクトル値、直前の動
きベクトル値を前動きベクトル値としたとき、動きベク
トル値を格納する遅延器と、ブロック数のカウントを行
い前記差分周期ごとに前記遅延器のリセットを行う差分
周期カウンタと、前記現動きベクトル値と前記遅延器の
値との差分値を符号化する差分符号化器と、差分符号を
ランレングス符号化を用いて可変長符号化する可変長符
号化器と、前記差分周期カウンタに同期して直前に格納
されている差分符号を前記可変長符号化器へ転送し、新
たに前記差分符号化器で符号化された差分符号を格納す
る差分符号メモリと、前記差分周期カウンタに同期して
動きベクトルの真値の差分符号を前記差分符号メモリ
に、動きベクトルの差分値の差分符号を前記可変長符号
化器に転送するスイッチを備えたことを特徴とする動き
ベクトル符号化装置。
5. A motion to be coded is defined as the difference period, which is the number of blocks from the coding of the true value of the motion vector to the coding of the true value of the motion vector when the motion vector value is differentially coded. When the vector value is the current motion vector value and the previous motion vector value is the previous motion vector value, the delay unit that stores the motion vector value and the block number are counted, and the delay unit is reset at each difference cycle. A differential cycle counter, a differential encoder that encodes the difference value between the current motion vector value and the value of the delay device, and a variable length encoder that performs variable length encoding of the differential code using run length encoding. And a differential code memory that transfers the differential code stored immediately before in synchronization with the differential cycle counter to the variable length encoder and stores the differential code newly encoded by the differential encoder. A switch for transferring the difference code of the true value of the motion vector to the difference code memory and the difference code of the difference value of the motion vector to the variable length encoder in synchronization with the difference cycle counter. Motion vector coding device.
JP28322093A 1993-11-12 1993-11-12 Movement vector coder Pending JPH07135660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28322093A JPH07135660A (en) 1993-11-12 1993-11-12 Movement vector coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28322093A JPH07135660A (en) 1993-11-12 1993-11-12 Movement vector coder

Publications (1)

Publication Number Publication Date
JPH07135660A true JPH07135660A (en) 1995-05-23

Family

ID=17662655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28322093A Pending JPH07135660A (en) 1993-11-12 1993-11-12 Movement vector coder

Country Status (1)

Country Link
JP (1) JPH07135660A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0879763A (en) * 1994-09-05 1996-03-22 Sharp Corp Moving image coder and moving image decoder
JP2002374171A (en) * 2001-06-15 2002-12-26 Sony Corp Encoding device and method, decoding device and method, recording medium and program
JP2011050090A (en) * 2003-05-12 2011-03-10 Google Inc Video compression method
JP2012065097A (en) * 2010-09-15 2012-03-29 Fujitsu Ltd Compression device, compression method, compression program, and restoration device
US8938001B1 (en) 2011-04-05 2015-01-20 Google Inc. Apparatus and method for coding using combinations
US9077960B2 (en) 2005-08-12 2015-07-07 Microsoft Corporation Non-zero coefficient block pattern coding
US9088785B2 (en) 2001-12-17 2015-07-21 Microsoft Technology Licensing, Llc Skip macroblock coding

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0879763A (en) * 1994-09-05 1996-03-22 Sharp Corp Moving image coder and moving image decoder
JP2002374171A (en) * 2001-06-15 2002-12-26 Sony Corp Encoding device and method, decoding device and method, recording medium and program
US10368065B2 (en) 2001-12-17 2019-07-30 Microsoft Technology Licensing, Llc Skip macroblock coding
US9774852B2 (en) 2001-12-17 2017-09-26 Microsoft Technology Licensing, Llc Skip macroblock coding
US9538189B2 (en) 2001-12-17 2017-01-03 Microsoft Technology Licensing, Llc Skip macroblock coding
US9088785B2 (en) 2001-12-17 2015-07-21 Microsoft Technology Licensing, Llc Skip macroblock coding
US8942290B2 (en) 2003-05-12 2015-01-27 Google Inc. Dynamic coefficient reordering
US8824553B2 (en) 2003-05-12 2014-09-02 Google Inc. Video compression method
JP2011050090A (en) * 2003-05-12 2011-03-10 Google Inc Video compression method
US10616576B2 (en) 2003-05-12 2020-04-07 Google Llc Error recovery using alternate reference frame
US9077960B2 (en) 2005-08-12 2015-07-07 Microsoft Corporation Non-zero coefficient block pattern coding
JP2012065097A (en) * 2010-09-15 2012-03-29 Fujitsu Ltd Compression device, compression method, compression program, and restoration device
US8938001B1 (en) 2011-04-05 2015-01-20 Google Inc. Apparatus and method for coding using combinations

Similar Documents

Publication Publication Date Title
US5386234A (en) Interframe motion predicting method and picture signal coding/decoding apparatus
JP3856262B2 (en) Motion compensation encoding apparatus, motion compensation encoding method, and motion compensation code recording medium
JP3743962B2 (en) Image decoding method
US5654706A (en) System for variable length decoding digital transmission data which has been compressed by selecting a scanning pattern
JP3441132B2 (en) Moving picture compression apparatus and method
JP3888597B2 (en) Motion compensation coding apparatus and motion compensation coding / decoding method
JPH0537915A (en) Method and device for coding image signal
JPH07135660A (en) Movement vector coder
KR100242635B1 (en) A system for variable-length-coding and variable-length-decoding digital data
US7333542B1 (en) Moving picture decoding apparatus and moving picture decoding method
JP3624450B2 (en) Image data encoding method and image data encoding apparatus
JPH07143487A (en) Image coder
EP1298937A1 (en) Video encoding or decoding using recompression of reference frames
JPH03255792A (en) Picture quality controller
KR100207391B1 (en) Image coding system and moving information detecting method using adaptive vector quantization
JPH1175198A (en) Image signal compressor and method and storage medium
JPH0349373A (en) Picture encoding system
KR0123092B1 (en) Method and apparatus for coding a code indicating picture starting location
JPH0795572A (en) Picture coder
JP2004007778A (en) Motion compensating and decoding method
JP3948442B2 (en) Motion compensation decoding apparatus
JP3191462B2 (en) High efficiency coding device
KR0148155B1 (en) Esc coding apparatus and method of image coding
KR0129796B1 (en) Encoding device of moving picture
JPH06233271A (en) Moving picture decoding method