JPH0451689A - Motion compensating predictive interframe coding device - Google Patents

Motion compensating predictive interframe coding device

Info

Publication number
JPH0451689A
JPH0451689A JP2160520A JP16052090A JPH0451689A JP H0451689 A JPH0451689 A JP H0451689A JP 2160520 A JP2160520 A JP 2160520A JP 16052090 A JP16052090 A JP 16052090A JP H0451689 A JPH0451689 A JP H0451689A
Authority
JP
Japan
Prior art keywords
step size
quantization step
signal
block
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2160520A
Other languages
Japanese (ja)
Other versions
JP2629409B2 (en
Inventor
Hiroyuki Ueyasu
博之 上保
Akiyoshi Tanaka
章喜 田中
Ikuo Inoue
郁夫 井上
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 JP16052090A priority Critical patent/JP2629409B2/en
Priority to US07/597,853 priority patent/US5144426A/en
Publication of JPH0451689A publication Critical patent/JPH0451689A/en
Priority to US08/298,684 priority patent/USRE37091E1/en
Application granted granted Critical
Publication of JP2629409B2 publication Critical patent/JP2629409B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE:To improve picture quality by measuring the fineness of the input television signal of a block to be intraframe-coded, and making quantization step size small for the block whose average value is larger than a definite value, and in addition, which is fine in a continuous block group to be quantized by the same quantization step size. CONSTITUTION:The fineness of every block the luminance signal of the input television signal has is measured. Then, as for the block which is the contiuous block to be quantized by first quantization step size 24 to be the same standard, and has a fine picture, the average value of whose picture element value is larger than the definite value, an orthogonal transformation factor 18 is quantized by second quantization step size 20 which is the first quantization step size 24 made small according to the average and the variance of the picture element value of the corresponding block and a threshold corrected by the first quantization step size 24. Thus, the improvement of the picture quality of the block with the fine picture can be attained while limiting the quantity of generated codes.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、テレビジョン信号の動き補償予測フレーム間
符号化装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a motion compensated predictive interframe coding device for television signals.

従来の技術 近年、動画像符号化技術の発達に伴℃・、テレビ電話、
テレビ会議システム、aD−rtoM、7’イジタルV
 T R等で用いられろカラー動画像の高能率符号化装
置として、動き補償予測フレーム間符号化装置が開発さ
れている。例えば、吹抜敬彦著rTV画像の多次元信号
処理J(1988年11月16日発行、日刊工業新聞社
刊、第7章高能率符号化、I)Il)213−1)I)
291 )に記載された動き補償予測フレーム間符号化
装置が知られて℃・る。
Conventional technologyIn recent years, with the development of video encoding technology,
Video conference system, aD-rtoM, 7' Digital V
A motion compensated predictive interframe coding device has been developed as a highly efficient coding device for color video images used in TR and the like. For example, Multidimensional Signal Processing of rTV Images J by Takahiko Fukinuki (published November 16, 1988, Nikkan Kogyo Shimbunsha, Chapter 7 High Efficiency Coding, I) Il) 213-1) I)
A motion-compensated predictive interframe coding device described in No. 291) is known.

動き補償予測フレーム間符号化装置では、一定のフレー
ムレートで映像符号化が実現できるように、発生符号量
が多い場合には予測誤差または入力テレビジョン信号の
画素値の量子化ステ、プサイズを大きくして発生する符
号量を制限している。
In order to achieve video encoding at a constant frame rate, the motion compensated predictive interframe coding device increases the prediction error or the quantization step or size of the pixel values of the input television signal when the amount of generated code is large. The amount of code generated is limited.

従来の量子化ステップサイズの決定方式として、シー、
シー、アイ ティ、ティ エスジーエックスフイ文書s
s;s (C,C,1,T、T、5GXV文書@625
  title : Discription  of
  Ref、Mode18(几M8)、  5ourc
e :Working  Party  XV/4Sp
ecialist  Group  On  Codi
ng  for Visual  Te1ephony
 、 version : June 、 9.198
9″)に記載された動き補償予測フレーム間符号化装置
が知られている。
As a conventional method for determining the quantization step size, the
C, I, T, GXF Documents
s;s (C, C, 1, T, T, 5GXV document @625
Title: Description of
Ref, Mode18 (几M8), 5ourc
e: Working Party XV/4Sp
ecialist Group On Codi
ng for Visual Telephony
, version: June, 9.198
9'') is known.

以下、第2図を参照しながら、従来の動き補償予測フレ
ーム間符号化装置にっ℃・て説明する。
Hereinafter, a conventional motion compensation predictive interframe coding device will be explained with reference to FIG.

第2図において、51は入力テレビジョン信号が入力す
る入力端子、63は現フレームの符号化ブロックの画信
号と前フレームの再生画信号を比較して符号化ブロック
の動ベクトルを算出する動ベクトル算出部、54は現フ
レームと前フレームの再生画信号を蓄積する画像メモリ
部、58は前フレームの再生画信号に対して動き補償予
測する動き補償予測部、60は符号化するブロックをフ
レーム内符号化するかフレーム間符号化するか判定する
フレーム間・フレーム内判定部、62は動き補償予測信
号に対して2次元ローパスフィルタ処理するループ内フ
ィルタ部、64は符号化ブロックの原画信号と予測信号
の差分演算を行い予測誤差を算出する予測誤差算出部、
66は符号化方式選択信号により直交変換する信号の選
択と再生画像を算出するための信号の選択を行うスイッ
チ部、68は直交変換する信号を直交変換する直交変換
部、了0は直交変換係数を量子化する量子化部、73は
量子化ステップサイズを算出する量子化ステップサイズ
算出部、74は伝送フレームを一時蓄積する符号メモリ
部、76は量子化した直交変換係数を逆直交変換する逆
直交変換部、78は現フレームの再生画像を算出する再
生画像算出部、82は予測陽差を通信路符号化する予測
誤差符号化部、84は動ベクトルを通信路符号化する動
ベクトル符号化部、8eは予測符号と勤ベクトル符号よ
り伝送フレームを構成するマルチプレクサ部、89は伝
送信号を出力する出力端子である。
In FIG. 2, 51 is an input terminal into which an input television signal is input, and 63 is a motion vector that calculates the motion vector of the encoded block by comparing the image signal of the encoded block of the current frame with the reproduced image signal of the previous frame. 54 is an image memory unit that stores the reproduced image signals of the current frame and the previous frame; 58 is a motion compensation prediction unit that performs motion compensation prediction on the reproduced image signal of the previous frame; and 60 is the block to be encoded within the frame. An inter-frame/intra-frame determination unit that determines whether to perform encoding or interframe encoding; 62 is an in-loop filter unit that performs two-dimensional low-pass filter processing on the motion compensation prediction signal; 64 is an original signal and prediction of the encoded block; a prediction error calculation unit that calculates a prediction error by calculating a difference between signals;
66 is a switch unit that selects a signal to be orthogonally transformed and a signal for calculating a reproduced image based on the encoding method selection signal, 68 is an orthogonal transform unit that orthogonally transforms the signal to be orthogonally transformed, and 0 is an orthogonal transform coefficient. 73 is a quantization step size calculation unit that calculates the quantization step size, 74 is a code memory unit that temporarily stores transmission frames, and 76 is an inverse orthogonal transform that performs inverse orthogonal transformation on the quantized orthogonal transform coefficients. An orthogonal transform unit; 78 is a reproduced image calculation unit that calculates a reproduced image of the current frame; 82 is a prediction error encoding unit that encodes a positive prediction difference through a channel; 84 is a motion vector encoder that encodes a motion vector through a channel. 8e is a multiplexer unit which configures a transmission frame from the prediction code and the vector code; 89 is an output terminal for outputting a transmission signal.

以上のような構成において、以下その動作について説明
する。
The operation of the above configuration will be explained below.

図示されていないアナログ・ディジタル変換回路でディ
ジタル信号に変換され、水平方向M画素、垂直方向Nラ
インのブロックに分割されたテレビジョン信号は、入力
端子61より入カテレビジョン信号62として入力する
A television signal converted into a digital signal by an analog-to-digital conversion circuit (not shown) and divided into blocks of M pixels in the horizontal direction and N lines in the vertical direction is input as an input television signal 62 from an input terminal 61.

動ベクトル算出部63は、入力テレビジョン信号62と
画像メモリ部54に蓄積されている前フレームの再生テ
レビジョン信号66を比較し、符号化ブロックの動きを
動ベクトルとして算出し、勤ベクトル信号66に出力す
る。同時に動ベクトル算出部63は、動ベクトル算出時
の評価値を用いて、符号化ブロックについて動き補償予
測の有効・無効を判定し、その結果を動き補償予測制御
信号として動ベクトル信号66に出力する。従って、動
ベクトル信号66には、勤ベクトルと動き補償予測信号
が重畳されている。
The motion vector calculation unit 63 compares the input television signal 62 with the reproduced television signal 66 of the previous frame stored in the image memory unit 54, calculates the motion of the encoded block as a motion vector, and generates a motion vector signal 66. Output to. At the same time, the motion vector calculation unit 63 uses the evaluation value at the time of motion vector calculation to determine whether motion compensation prediction is valid or invalid for the encoded block, and outputs the result as a motion compensation prediction control signal to the motion vector signal 66. . Therefore, the motion vector signal 66 has a motion vector and a motion compensated prediction signal superimposed thereon.

動き補償予測部58は、(1)動き補償予測制御信号が
動き補償予測の有効を指示している場合には、前フレー
ムの再生テレビジョン信号66を動ベクトルで動き補償
予測し、(2)動き補償予測制御信号が動き補償予測の
無効を指示している場合には、前フレームの再生テレビ
ジョン信号65をそのまま動き補償予測信号69として
出力する。
The motion compensation prediction unit 58 (1) performs motion compensation prediction on the reproduced television signal 66 of the previous frame using a motion vector when the motion compensation prediction control signal instructs to enable motion compensation prediction, and (2) When the motion compensation prediction control signal instructs invalidation of motion compensation prediction, the reproduced television signal 65 of the previous frame is output as is as the motion compensation prediction signal 69.

フレーム間・フレーム内判定部60は、フロック単位に
入力テレビジョン信号52と動き補償予測信号69を比
較し、動き補償予測の有効性を判定し、動き補償予測の
有効性が小さし・場合は該当フロックについてフレーム
内符号化が有効と判定し、動き補償予測の有効性が大き
い場合は該当フロックについてフレーム間符号化が有効
と判定し、その結果を符号化方式選択信号61として出
力する。フロック単位に符号化方式をフレーム内符号化
方式とフレーム間符号化方式で切り替えることにより、
フレーム間符号化方式のみで符号化する場合に比べ、以
下の改善が図れる。
The inter-frame/intra-frame determining unit 60 compares the input television signal 52 and the motion compensation prediction signal 69 in units of blocks, determines the effectiveness of the motion compensation prediction, and if the effectiveness of the motion compensation prediction is small, It is determined that intraframe coding is effective for the relevant flock, and if the effectiveness of motion compensation prediction is large, it is determined that interframe coding is effective for the relevant flock, and the result is output as the encoding method selection signal 61. By switching the encoding method between intra-frame encoding and inter-frame encoding on a per-flock basis,
The following improvements can be made compared to encoding using only the interframe encoding method.

即ち、(1)シーンチェンジ発生時、フレーム内符号化
が選択されるためにシーンチェンジ後の画質向上が図れ
る。(2)動体の大きな動きが発生すると、動体の陰に
隠れていた背景領域が出現し、この場合にフレーム内符
号化が選択されるために、画質向上が図れる。また、C
D−ROM等に用いる蓄積系メディア符号化方式では、
再生画像の編集機能や逆方向再生機能を実現するために
、一定フレーム周期毎に全ブロックをフレーム内符号化
したフレーム(このフレームを、[リフレッシュ・フレ
ーム(Refresh Frame ) Jと呼ぶ。)
を挿入する必要があり、動き補償予測フレーム間符号化
装置にフレーム内符号化機能を具備することによりリフ
レッシ−・フレームの挿入が実現できる。
That is, (1) since intra-frame encoding is selected when a scene change occurs, the image quality after the scene change can be improved. (2) When a large movement of the moving object occurs, a background area hidden behind the moving object appears, and in this case, intra-frame encoding is selected, so that the image quality can be improved. Also, C
In the storage media encoding method used for D-ROM etc.,
In order to realize the editing function and reverse playback function of the reproduced image, a frame in which all blocks are intra-frame encoded at a fixed frame period (this frame is called a refresh frame J).
It is necessary to insert a refresh frame, and the insertion of a refresh frame can be realized by providing a motion compensated predictive interframe coding device with an intraframe coding function.

ループ内フィルタ部62は動ベクトルを用いて動き補償
予測した符号化ブロックに対して、2次元ローパスフィ
ルタ処理を行い、予測信号63を算出する。予測誤差算
出部64は、符号化ブロックの入力テレビジョン信号6
2と予測信号63の差分演算を行い、その結果を予測誤
差信号66として出力する。
The in-loop filter section 62 performs two-dimensional low-pass filter processing on the encoded block subjected to motion compensation prediction using the motion vector, and calculates a prediction signal 63. The prediction error calculation unit 64 calculates the input television signal 6 of the encoded block.
2 and the prediction signal 63, and outputs the result as a prediction error signal 66.

スイッチ部66は、(1)符号化方式選択信号61がフ
レーム内符号化を選択している場合には、直交変換する
信号67として入力テレビジョン信号62を選択し、(
2)符号化方式選択信号61がフレーム間符号化を選択
している場合には、直交変換する信号67として予測誤
差信号65を選択する。
(1) If the encoding method selection signal 61 selects intraframe encoding, the switch unit 66 selects the input television signal 62 as the signal 67 to be orthogonally transformed;
2) When the encoding method selection signal 61 selects interframe encoding, the prediction error signal 65 is selected as the signal 67 to be orthogonally transformed.

直交変換部68は、直交変換する信号6γに対して直交
変換を行い、直交変換する信号67の近傍画素間が持つ
高い相関性を除去して、直交変換係数69を算出する。
The orthogonal transform unit 68 performs orthogonal transform on the signal 6γ to be orthogonally transformed, removes high correlation between neighboring pixels of the signal 67 to be orthogonally transformed, and calculates orthogonal transform coefficients 69.

直交変換方式としては、多くの場合、高い変換効率を持
ち、ハードウェア化について実現性のある離散コサイン
変換が用いられる。
As the orthogonal transform method, in many cases, discrete cosine transform is used, which has high transform efficiency and can be implemented in hardware.

量子化部Toは、量子化ステップサイズ71を用いて直
交変換係数69を量子化し、直交変換量子化係数72を
算出する。
The quantization unit To quantizes the orthogonal transform coefficient 69 using the quantization step size 71 and calculates the orthogonal transform quantization coefficient 72.

量子化ステップサイズ算出部73は、以下に示した方式
により、符号メモリ部74内の残留符号量76より量子
化ステップサイズ了1を算出する。
The quantization step size calculation unit 73 calculates the quantization step size R1 from the residual code amount 76 in the code memory unit 74 using the method shown below.

以下に、本従来例における量子化ステップサイズ71の
算出方法について記述する。
The method for calculating the quantization step size 71 in this conventional example will be described below.

この従来例では、入力テレビジョン信号は第3図に示す
ように、水平方向35252画素直方向288ラインの
大きさを有し、水平方向16画素、垂直方向16ライン
の領域(「マクロブロック(Macro  Block
 ) lと呼んでいる。)に分割されでいる。量子化ス
テップサイズQbは、nマクロブロック周期で、量子化
開始時に第、(1)式より算出する・ Qb=2xINT[Bcont+200q]+2 −(
1)但し、第(1)式において以下のように定義する。
In this conventional example, the input television signal has a size of 35,252 pixels in the horizontal direction and 288 lines in the vertical direction, as shown in FIG. Block
) It is called l. ). The quantization step size Qb is calculated from equation (1) at the start of quantization with a period of n macroblocks. Qb=2xINT[Bcont+200q]+2-(
1) However, in equation (1), it is defined as follows.

(a)  INT [’ ]は小数点を切り捨てる関数
とする。
(a) INT [' ] is a function that truncates the decimal point.

例: INT [1,5] =1、INT [1,3]
 =1、INT [1,6] =1 (b)  Bcontは符号メモリ部74の残留符号量
を示す0 (c)qは、符号化速度パラメータであり、符号化速度
■と第(2)式の関係がある。
Example: INT [1,5] =1, INT [1,3]
=1, INT [1,6] =1 (b) Bcont is 0 indicating the residual code amount in the code memory section 74 (c) q is the encoding speed parameter, and the encoding speed ■ and Equation (2) There is a relationship between

V = q X 64 kbit / sec  ・・
・・・・(2)例: V : Q X 64 kbit
 / secの時、q=1となる。
V = q x 64 kbit / sec...
...(2) Example: V: Q x 64 kbit
/ sec, q=1.

第(1)式より明らかなように、残留符号量BCont
が多くなると、量子化ステップサイズQbが大きくなり
発生符号量が制限され、一定フレームレートの映像信号
符号化が実現できる。例えば、量子化ステップサイズQ
bの算出時に、残留符号量□B’ConL= 700 
bi tのときは、量子化ステップサイズQb=8とな
り、残留符号量Bcont = 6100 bitのと
きは、量子化ステップサイズQb:62となる。ただし
、第1マクロブロツクから第(n−1)マクロブロック
までは予め定めた量子化ステップサイズQbで量子化を
行う。例えば、V = 64 kbit / 5ec(
q=1)の場合、Qb=32とする。
As is clear from equation (1), the residual code amount BCont
As the number increases, the quantization step size Qb increases, the amount of generated code is limited, and video signal encoding at a constant frame rate can be realized. For example, quantization step size Q
When calculating b, residual code amount □B'ConL = 700
When the residual code amount Bcont is 6100 bits, the quantization step size Qb is 62. However, from the first macroblock to the (n-1)th macroblock, quantization is performed with a predetermined quantization step size Qb. For example, V = 64 kbit/5ec(
q=1), Qb=32.

本従来例では、量子化ステップサイズQbの算出周期n
は、n=12としている。
In this conventional example, the calculation period n of the quantization step size Qb
Here, n=12.

逆直交変換部76は、直交変換量子化係数72を逆直交
変換し、量子化誤差を含んだ直交変換した信号77を算
出する。
The inverse orthogonal transform unit 76 performs inverse orthogonal transform on the orthogonal transform quantization coefficient 72 and calculates an orthogonally transformed signal 77 containing a quantization error.

スイッチ部66は、(1)符号化方式選択信号61がフ
レーム内符号化を選択している場合には再生画像算出信
号79として数値「o」信号8oを選択し、(2)符号
化方式選択信号61がフレーム間符号化を選択している
場合には再生画像算出信号79として予測信号63を選
択する。
The switch unit 66 (1) selects the numerical value "o" signal 8o as the reproduced image calculation signal 79 when the encoding method selection signal 61 selects intraframe encoding, and (2) selects the encoding method. When the signal 61 selects interframe coding, the predicted signal 63 is selected as the reproduced image calculation signal 79.

再生画像算出部子8は量子化誤差を含んだ直交変換した
信号77と再生画像算出信号子9を加算し、符号化ブロ
ックの再生画像81を算出する。
The reproduced image calculation unit 8 adds the orthogonally transformed signal 77 containing the quantization error and the reproduced image calculation signal element 9 to calculate the reproduced image 81 of the encoded block.

画像メモリ44は現フレームの再生画像信号81を蓄積
し、前フレームの再生画像信号66を出力する。予測誤
差符号化部82は直交変換量子化係数72、量子化ステ
ップサイズ71、符号化方式選択信号61を符号化し、
予測誤差符号83を算出する。量子化ステップサイズ7
1の符号化は、量子化ステップサイズ71の値が変化し
たとき、即ちnマクロブロックに1回のみとする。
The image memory 44 stores the reproduced image signal 81 of the current frame and outputs the reproduced image signal 66 of the previous frame. The prediction error encoding unit 82 encodes the orthogonal transform quantization coefficient 72, the quantization step size 71, and the encoding method selection signal 61,
A prediction error code 83 is calculated. Quantization step size 7
1 is encoded only when the value of the quantization step size 71 changes, that is, once every n macroblocks.

動ベクトル符号化部84は動ベクトル信号56を符号化
し、動ベクトル符号86を算出する。マルチプレクサ部
86は予測誤差符号83と動ベクトル符号86より、所
定の形式の伝送フレーム8了を算出する。
The motion vector encoding unit 84 encodes the motion vector signal 56 and calculates a motion vector code 86. The multiplexer unit 86 calculates a transmission frame 8 in a predetermined format from the prediction error code 83 and the motion vector code 86.

符号メモリ部74は伝送フレーム8アを一旦蓄積し、図
示していない外部より入力するクロック信号に同期して
、伝送符号88として出力端子89より出力する。同時
に、符号メモリ部74はメモリ内に残留している符号量
を残留符号量76として算出する。
The code memory unit 74 temporarily stores the transmission frame 8A, and outputs it from an output terminal 89 as a transmission code 88 in synchronization with a clock signal input from an external device (not shown). At the same time, the code memory unit 74 calculates the amount of codes remaining in the memory as the remaining code amount 76.

発明が解決しようとする課題 しかし、以上のような構成では、量子化ステップサイズ
Qbが、量子化ステップサイズを算出するブロック周期
間(従来例では、nマクロブロック周期間)は固定され
るために、連続したnフロック間は入力テレビジョン信
号の持つ特徴に拘らず、同一の量子化ステップサイズQ
bで量子化した直交変換係数が量子化される。即ち、同
一の量子化ステップサイズ周期に属する連続したブロッ
ク内で、フレーム内符号化する精微なパターンを持つブ
ロックが、他のブロックと同じ量子化ステップサイズQ
bで量子化されるために、フレーム内符号化した精微な
パターンを持つブロックの画質が劣化するという問題が
あった。
Problem to be Solved by the Invention However, in the above configuration, the quantization step size Qb is fixed because the block cycle period (n macroblock cycle period in the conventional example) for calculating the quantization step size is fixed. , the quantization step size Q is the same between n consecutive blocks regardless of the characteristics of the input television signal.
The orthogonal transform coefficients quantized by b are quantized. That is, within consecutive blocks belonging to the same quantization step size cycle, a block with a fine pattern to be intra-frame encoded has the same quantization step size Q as other blocks.
Since the block is quantized by b, there is a problem in that the image quality of intra-frame encoded blocks having minute patterns deteriorates.

すなわち、フレーム内符号化した精微なノくターンを持
つブロックより発生する直交変換係数を、大きな量子化
ステップサイズで量子化することにより、原画像の持つ
精微性が失われ、平坦なブロックとなる「ブロック歪み
」が発生し、視覚的に大きな画質劣化として認識されて
いた。
In other words, by quantizing the orthogonal transform coefficients generated from intra-frame encoded blocks with fine nodules using a large quantization step size, the fineness of the original image is lost and the blocks become flat. "Block distortion" occurred, which was visually recognized as a major deterioration in image quality.

一方、量子化ステップサイズを符号化して発生する符号
量を削減するために、同一の量子化ステツブサイズで量
子化する連続したブロック数は一定値以上なければなら
ない(従来例では、nマクロブロック)ので、毎ブロッ
クごとに量子化ステップサイズを算出して変更すること
はできない。
On the other hand, in order to reduce the amount of code generated by encoding the quantization step size, the number of consecutive blocks to be quantized with the same quantization step size must be greater than a certain value (in the conventional example, n macroblocks). , it is not possible to calculate and change the quantization step size for each block.

本発明は、以上のような課題に鑑み、輝度信号ブロック
であり、かつフレーム内符号化するブロックについて、
発生符号量より算出した基準となる第1の量子化ステッ
プサイズで量子化される連続したブロックで、画素値の
平均値が一定値以上であるとき該当ブロックの持つ画像
的な精微性に比例して、第1の量子化ステップサイズか
ら、第2の量子化ステップサイズを算出し、第2の量子
化ステップサイズを用いて、直交変換係数を量子化する
ことにより、原画像の精微性を保持し、その結果として
画質の向上を図ることを目的とする。
In view of the above-mentioned problems, the present invention provides a block that is a luminance signal block and is subjected to intra-frame encoding.
In consecutive blocks that are quantized using the standard first quantization step size calculated from the generated code amount, when the average value of pixel values is greater than a certain value, it is proportional to the image precision of the corresponding block. Then, a second quantization step size is calculated from the first quantization step size, and the orthogonal transform coefficients are quantized using the second quantization step size, thereby maintaining the precision of the original image. The purpose is to improve image quality as a result.

即ち、フレーム内符号化する輝度信号ブロックの画素値
の平均値が一定値以上であり、かつ精微性が高いブロッ
クは、実際の量子化ステップサイズを、基準となる量子
化ステップサイズより小さくすることで、発生符号量は
制限しつつ、精微性を保持し、その結果としてブロック
の画質を向上させることができる。
In other words, for blocks in which the average pixel value of the luminance signal block to be intra-frame encoded is a certain value or more and the precision is high, the actual quantization step size should be set smaller than the standard quantization step size. In this way, precision can be maintained while limiting the amount of generated code, and as a result, the image quality of the block can be improved.

また、第1の量子化ステップサイズが一定値以上である
ときは、第2の量子化ステップサイズを算出するための
閾値を補正することにより、輝度信号の符号量を削減し
色差信号の符号量を増加させ、色差信号の符号量が極端
に少ないことによって生じる符号化ブロックの色の劣化
を防ぐことができる。結果として画像全体の画質向上が
達成できる。
Furthermore, when the first quantization step size is equal to or larger than a certain value, by correcting the threshold value for calculating the second quantization step size, the code amount of the luminance signal is reduced and the code amount of the color difference signal is reduced. It is possible to prevent deterioration of the color of the encoded block caused by an extremely small amount of code of the color difference signal. As a result, the image quality of the entire image can be improved.

課題を解決するための手段 この目的を達成するために、本発明は、テレビジョン信
号をアナログディジタル変換するA/D変換手段と、デ
ィジタル化した入力テレビジョン信号の1フレームまた
は1フィールドを定められた大きさのブロックに分割す
るブロック化手段と、個々のブロックについてテレビジ
ョン画像の動きである動ベクトルを算出する動ヘクトル
検出手段と、個々のブロックについて動ベクトルを用い
て動き補償予測するか判定する動き補償判定手段と、動
き補償予測するブロックについて、前フレームの再生画
像を動ベクトルで動き補償予測し、予測画素値を算出す
る動き補償予測手段と、入力テレビジョン信号の画素値
と予測画素値との差分を予測誤差値として算出する誤差
算出手段と、個々のブロックについて、フレーム間符号
化するかフレーム内符号化するかを判定する符号化方法
決定手段と、ブロック毎に符号化方法決定手段の判定結
果により、直交変換する信号を入力テレビジョン信号の
画素値とするか予測誤差値とするか切り替える切り替え
手段と、入力テレビジョン信号の画素値または予測誤差
値を、直交変換し、直交変換係数を算出する直交変換手
段と、発生符号量より第1の量子化ステップサイズを算
出する第1量子化ステップサイズ決定手段と、入力テレ
ビジョン信号の輝度信号のブロック毎の画素値の平均と
分散を算出する平均・分散算出手段と、輝度信号ブロッ
クであり、かつフレーム内符号化するブロックを平均ま
たは分散によってクラス分けするために予め定められた
閾値な第1の量子化ステップサイズによって補正する手
段と、輝度信号のブロックでありかつフレーム内符号化
するブロックについては、平均と分散と補正された閾値
よりブロックをクラス分けし、各クラス毎に第1の量子
化ステップサイズより第2の量子化ステップサイズを算
出し、その他のブロックについては、第1の量子化ステ
ップサイズを第2の量子化ステツブサイズとする第2量
子化ステップサイズ決定手段と、第2の量子化ステップ
サイズを用いて、直交変換係数を量子化し、量子化した
直交変換係数を算出する量子化手段と、フレーム内符号
化かフレーム間符号化かの情報と、第1の量子化ステッ
プサイズと量子化のクラス分けに関する情報と、量子化
した直交変換係数を符号化する符号化手段と。童子化し
た直交変換係数を逆直交変換し、逆量子化信号を算出す
る逆量子化手段と、符号化方法決定手段の判定結果によ
り再生画素値算出時に用いる画素値を動き補償予測した
予測画素値とするか、数値「O」とするか切り替える切
り替え手段と、”予測画素値または数値「0」と逆量子
化信号より再生画像を算出する画像再生手段と、再生画
像を蓄積する画像蓄積手段と、動ベクトルとを符号化す
る動ベクトル符号化手段を設けるように構成されている
Means for Solving the Problems To achieve this object, the present invention provides an A/D conversion means for analog-to-digital conversion of a television signal and a method for defining one frame or one field of the digitized input television signal. a blocking means for dividing each block into blocks of a certain size, a motion vector detection means for calculating a motion vector representing the motion of a television image for each block, and a determination as to whether to perform motion compensated prediction using the motion vector for each block. a motion compensation prediction means for performing motion compensation prediction on a reproduced image of a previous frame using a motion vector and calculating a predicted pixel value for a block to be motion compensated predicted; an error calculation means for calculating the difference between the predicted error value and the predicted error value; an encoding method determining means for determining whether to perform interframe encoding or intraframe encoding for each block; and an encoding method determination means for determining the encoding method for each block. a switching means for switching whether the signal to be orthogonally transformed is the pixel value of the input television signal or the prediction error value, based on the determination result of the means; orthogonal transform means for calculating a transform coefficient; first quantization step size determining means for calculating a first quantization step size from the generated code amount; and an average of pixel values for each block of a luminance signal of an input television signal. An average/variance calculation means for calculating variance, and a first quantization step size that is a predetermined threshold for classifying blocks that are luminance signal blocks and are to be intra-frame encoded based on the average or variance. For blocks that are luminance signal blocks and are to be intraframe encoded, the blocks are divided into classes based on the mean, variance, and corrected threshold, and for each class, the second quantization step size is determined based on the first quantization step size. A quantization step size is calculated, and for other blocks, using a second quantization step size determination means that sets the first quantization step size to a second quantization step size, and the second quantization step size, Quantization means for quantizing orthogonal transform coefficients and calculating quantized orthogonal transform coefficients, information on intra-frame coding or inter-frame coding, and information on the first quantization step size and quantization classification. and an encoding means for encoding the quantized orthogonal transform coefficients. A predicted pixel value obtained by motion-compensated prediction of a pixel value to be used when calculating a reproduced pixel value based on the determination result of the inverse quantization means that performs inverse orthogonal transformation on the orthogonal transform coefficients and calculates an inverse quantized signal, and the encoding method determination means. a switching means for switching whether to use the predicted pixel value or the numerical value "0" and the inverse quantization signal; and an image storage means for accumulating the reproduced image. , and motion vector encoding means for encoding the motion vectors.

作用 本発明は、上記構成により、入力テレビジョン信号の持
つブロック毎の精微性は、ブロック内の画素値の分散σ
2で測定できると考えられる。例えば、精微なパターン
を持つブロックの分散σ2は、急峻な画素値の変化を持
つ「粗(・」ブロックの分散σ2に比べ小さいと考えら
れる。また精微性の高(・〕知ツクはど分散σ2が小さ
くなると考えられろ。
Effects According to the present invention, with the above configuration, the precision of each block of the input television signal is determined by the variance σ of pixel values within the block.
It is thought that it can be measured with 2. For example, the variance σ2 of a block with a fine pattern is considered to be smaller than the variance σ2 of a "coarse" block with sharp changes in pixel values. Consider that σ2 becomes smaller.

また、分散が小さいブロックであっても、画素値の平均
値が一定値より小さいときには、精微性が高くとも視覚
的にほとんど目立たないブロックであるといえる。
Further, even if the variance is small, if the average value of pixel values is smaller than a certain value, it can be said that the block is hardly visually noticeable even if the precision is high.

従って、本発明は上記構成により、入力テレビジョン信
号の輝度信号の持つブロック毎の精微性を分散σ2で測
定し、同一の基準となる第1の量子化ステップサイズで
量子化する連続したブロックで、フレーム内符号化する
精微な画像を有し、かつ画素値の平均値が一定値以上で
あるブロックについては、第1の量子化ステップサイズ
を、該当ブロックの画素値の平均と分散と第1の量子化
ステップサイズにより補正した閾値に応じて小さくした
第2の量子化ステップサイズで直交変換係数を量子化す
ることにより、発生符号量を制限しつつ、精微な画像を
有するブロックの画質を向上することができるようにし
たものである。
Therefore, with the above configuration, the present invention measures the precision of each block of the luminance signal of the input television signal using the variance σ2, and measures the precision of each block of the luminance signal of the input television signal using consecutive blocks that are quantized using the same reference first quantization step size. , for a block that has a fine image to be intra-frame encoded and whose average pixel value is greater than a certain value, the first quantization step size is determined by the average and variance of the pixel values of the block and the first quantization step size. By quantizing the orthogonal transform coefficients with a second quantization step size that is smaller according to the threshold corrected by the quantization step size, the image quality of blocks with detailed images is improved while limiting the amount of generated code. It was made so that it could be done.

実施例 以下、本発明の一実施例について図面を参照しながら説
明する。第1図は、本発明による動き補償予測フレーム
間符号化装置の一実施例を示すブロック図である。
EXAMPLE Hereinafter, an example of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a motion compensated predictive interframe coding device according to the present invention.

1は入力テレビジョン信号が入力する入力端子、3は現
フレームの符号化ブロックの画信号と前フレームの再生
画信号を比較して符号化ブロックの動ベクトルと動き補
償予測制御信号を算出する動ベクトル算出部、4は現フ
レームと前フレームの再生画信号を蓄積する画像メモリ
部、7は前フレームの再生画信号に対して動き補償予測
する動き補償予測部、9は符号化するブロックをフレー
ム間符号化するかフレーム内符号化するかを判定するフ
レーム間・フレーム内判定部、11は動き補償予測信号
に対して2次元ローパスフィルタ処理するループ内フィ
ルタ部、13は符号化ブロックの原画信号と予測信号の
差分演算を行い予測誤差を算出する予測誤差算出部、1
6は符号化方式選択信号により、直交変換する信号の選
択と再生画像を算出するための信号を選択するスイッチ
部、17は直交変換する直交変換部、19は直交変換係
数を量子化する量子化部、21は第2の量子化ステップ
サイズを算出する第2量子化ステップサイズ算出部、2
2は第1の量子化ステップサイズを算出する第1量子化
サイズ算出部、26は入力テレビジョン信号の平均と分
散を算出する平均・分散値算出部、28は伝送フレーム
を一時蓄積する符号メモリ部、3oは量子化した直交変
換係数を逆直交変換する逆直交変換部、34は現フレー
ムの再生画像を算出する再生画像算出部、36は符号化
方式選択信号、予測誤差、第1量子化ステツプサイズ、
および量子化クラス情報を通信路符号化する予測誤差符
号化部、38は動ベクトルを通信路符号化する動ベクト
ル符号化部、4oは予測符号と動ベクトル符号より伝送
フレームを構成するマルチフレフサ部、43は伝送信号
を出力する出力端子である。
1 is an input terminal into which an input television signal is input, and 3 is an input terminal that compares the picture signal of the coded block of the current frame with the reproduced picture signal of the previous frame to calculate the motion vector of the coded block and the motion compensation prediction control signal. A vector calculation unit; 4 is an image memory unit that stores the reproduced image signals of the current frame and the previous frame; 7 is a motion compensation prediction unit that performs motion compensation prediction for the reproduced image signal of the previous frame; 9 is a frame for the block to be encoded; An inter-frame/intra-frame determination unit that determines whether to perform inter-coding or intra-frame encoding; 11 is an in-loop filter unit that performs two-dimensional low-pass filter processing on the motion-compensated prediction signal; 13 is an original image signal of the encoded block; a prediction error calculation unit that calculates a prediction error by calculating a difference between the prediction signal and the prediction signal;
6 is a switch unit that selects a signal to be orthogonally transformed and a signal for calculating a reproduced image based on the encoding method selection signal; 17 is an orthogonal transform unit that performs orthogonal transform; and 19 is a quantizer that quantizes orthogonal transform coefficients. unit, 21 is a second quantization step size calculation unit, 2, which calculates the second quantization step size;
2 is a first quantization size calculation unit that calculates the first quantization step size; 26 is an average/variance value calculation unit that calculates the average and variance of the input television signal; and 28 is a code memory that temporarily stores transmission frames. 3o is an inverse orthogonal transform unit that performs inverse orthogonal transform on the quantized orthogonal transform coefficients, 34 is a reproduced image calculation unit that calculates a reproduced image of the current frame, and 36 is an encoding method selection signal, prediction error, and first quantization. step size,
and a prediction error encoding unit that encodes the quantization class information through a channel; 38, a motion vector encoding unit that encodes a motion vector through a channel; 4o, a multi-flexer unit that configures a transmission frame from a prediction code and a motion vector code; 43 is an output terminal for outputting a transmission signal.

以上のような構成において、以下その動作を説明する。The operation of the above configuration will be explained below.

テレビジョン信号は、第1図に図示されていない信号処
理部でアナログ・ディジタル変換され、水平方向M画素
、垂直方向Nラインのブロックに分割され、入力端子1
より入力テレビジョン信号2として入力する。
The television signal is converted from analog to digital by a signal processing unit not shown in FIG. 1, and is divided into blocks of M pixels in the horizontal direction and N lines in the vertical direction.
The input television signal 2 is input as the input television signal 2.

次に、動ベクトル算出部3は入力テレビジョン信号2と
、画像メモリ部4より読み出した前フレームの再生画像
6を比較し、動ベクトルを算出し、勤ベクトル信号6に
出力する。同時に、動ベクトル算出部3は動ベクトル算
出時の評価値を用いて、符号化ブロックに対する動き補
償予測が有効か無効かを判定し、その結果を動き補償予
測制御情報として勤ベクトル信号6に出力する。
Next, the motion vector calculation section 3 compares the input television signal 2 with the reproduced image 6 of the previous frame read out from the image memory section 4, calculates a motion vector, and outputs it as a motion vector signal 6. At the same time, the motion vector calculation unit 3 uses the evaluation value at the time of motion vector calculation to determine whether motion compensation prediction for the encoded block is valid or invalid, and outputs the result to the motion vector signal 6 as motion compensation prediction control information. do.

動き補償予測部7は、符号化ブロックと同一位置の前フ
レームの再生画像6に対し、動ヘクトル信号6により動
き補償予測する場合は動ベクトルで動き補償予測し、動
き補償予測しない場合は何もせずに動き補償予測信号8
として出力する。
The motion compensation prediction unit 7 performs motion compensation prediction using a motion vector when motion compensation prediction is to be performed using the motion vector signal 6 on the reproduced image 6 of the previous frame at the same position as the encoded block, and does nothing when motion compensation prediction is not to be performed. motion compensation prediction signal 8
Output as .

フレーム間・フレーム内判定部9は、フロック単位に入
力テレビジコン信号2と動き補償予測信号8を比較し、
動き補償予測の有効性を判定し、動き補償予測の有効性
が小さい場合は該当ブロックについてフレーム内符号化
が有効と判定し、動き補償予測の有効性が大きい場合は
該当ブロックについてフレーム間符号化が有効と判定し
、その結果を符号化方式選択信号1oとして出力する。
The inter-frame/intra-frame determination unit 9 compares the input television control signal 2 and the motion compensation prediction signal 8 on a per-flock basis,
The effectiveness of motion compensation prediction is determined, and if the effectiveness of motion compensation prediction is small, intraframe coding is determined to be effective for the block, and if the effectiveness of motion compensation prediction is high, interframe coding is performed for the block. is determined to be valid, and outputs the result as the encoding method selection signal 1o.

また、フレーム内・フレーム間判定部9は、リフレッシ
−フレームの挿入が必要な符号化装置の場合は、一定フ
レーム周期で全ブロックをフレーム内符号化するように
符号化方式選択信号10を出力する。
In addition, in the case of an encoding device that requires insertion of refresh frames, the intra-frame/inter-frame determining unit 9 outputs an encoding method selection signal 10 so as to intra-frame encode all blocks at a constant frame period. .

ループ内フィルタ部11は、動き補償予測信号8に対し
、符号化ブロックが動き補償予測するブロックであると
きは2次元ローパスフィルタ処理であるループ内フィル
タ処理を行い、その他の場合はループ内フィルタ処理し
な(・で予測信号12として出力する。
The in-loop filter unit 11 performs in-loop filter processing, which is two-dimensional low-pass filter processing, on the motion compensation prediction signal 8 when the encoded block is a block to be predicted with motion compensation, and in other cases performs in-loop filter processing. It is output as the predicted signal 12 with .

予測誤差算出部13は、符号化ブロックの入力テレビジ
ョン信号2と予測信号12の差分演算を行い、その結果
を予測誤差信号14として出力する。
The prediction error calculation unit 13 calculates the difference between the input television signal 2 and the prediction signal 12 of the encoded block, and outputs the result as a prediction error signal 14.

スイッチ部15は、(1)符号化方式選択信号10がフ
レーム内符号化を選択している場合には直交変換する信
号16として入力テレビジョン信号2を選択し、(2)
符号化方式選択信号10がフレーム間符号化を選択して
いる場合には直交変換する信号16として予測誤差信号
14を選択する。
The switch unit 15 (1) selects the input television signal 2 as the signal 16 to be orthogonally transformed when the encoding method selection signal 10 selects intraframe encoding; (2)
When the encoding method selection signal 10 selects interframe encoding, the prediction error signal 14 is selected as the signal 16 to be orthogonally transformed.

直交変換部17は、直交変換する信号16に対して直交
変換を行い、直交変換する信号16の近傍画素間が持つ
高い相関性を除去して、直交変換係数18を算出する。
The orthogonal transform unit 17 performs orthogonal transform on the signal 16 to be orthogonally transformed, removes high correlation between neighboring pixels of the signal 16 to be orthogonally transformed, and calculates orthogonal transform coefficients 18 .

直交変換方式としては、多くの場合、高い変換効率を持
ち、ハードウェア化について実現性のある離散コサイン
変換が用いられる。
As the orthogonal transform method, in many cases, discrete cosine transform is used, which has high transform efficiency and can be implemented in hardware.

量子化部19は、第2の量子化ステップサイズ2oで直
交変換係数18を量子化する。以下に、第2の量子化ス
テップサイズ20の算出方法について記述する。
The quantization unit 19 quantizes the orthogonal transform coefficients 18 with a second quantization step size of 2o. The method for calculating the second quantization step size 20 will be described below.

(1)符号化するブロックが輝度信号ブロックではない
か、またはフレーム間符号化ブロックである場合 第2量子化ステップサイズ部21は、第1量子化ステッ
プサイズ算出部22が、前記の従来例に記述した方式に
より残留符号量23より算出した第1の量子化ステップ
サイズを第2の量子化ステップサイズとして出力する。
(1) When the block to be encoded is not a luminance signal block or is an inter-frame encoded block The second quantization step size section 21 uses the first quantization step size calculation section 22 according to the conventional example. The first quantization step size calculated from the residual code amount 23 using the described method is output as the second quantization step size.

(2)符号化するブロックが輝度信号ブロックであり、
かつフレーム内符号化ブロックである場合以下に示した
方式により、符号化ブロックの画素値の平均と分散を算
出し、算出した平均と分散より該当ブロックをクラス分
けし、各クラス毎に基準となる第1の量子化ステップサ
イズより実際の量子化で用いる第2の量子化ステップサ
イズを算出する。
(2) The block to be encoded is a luminance signal block,
If the block is an intra-frame encoded block, calculate the average and variance of the pixel values of the encoded block using the method shown below, classify the block based on the calculated average and variance, and use the standard for each class. A second quantization step size used in actual quantization is calculated from the first quantization step size.

平均・分散値算出部26は、符号化ブロックの入力テレ
ビジョン信号2の画素値の平均値μと分散σ2を第(3
)および第(4)式により算出し、平均信号44、分散
信号26として出力する。平均μはブロックの精微性に
応して第1ステツプサイズを変化させるかどうかの判断
に用℃・る。
The average/variance value calculation unit 26 calculates the average value μ and variance σ2 of the pixel values of the input television signal 2 of the encoded block by the (3rd
) and equation (4), and output as an average signal 44 and a variance signal 26. The average μ is used to determine whether to change the first step size depending on the precision of the block.

分散σ2は、入力テレビジョン信号2の精微性が高いブ
ロックでは小さい値となり、入力テレビジョン信号2の
精微性が低いブロックでは犬き℃・値となる。
The variance σ2 has a small value in a block in which the input television signal 2 has high precision, and has a small value in degrees Celsius in a block in which the input television signal 2 has low precision.

但し、第(3)および第(4)式において以下のように
定義する。
However, equations (3) and (4) are defined as follows.

(a)Mはブロックの水平方向画素数を示す。(a) M indicates the number of pixels in the horizontal direction of the block.

(b)Nはブロックの垂直方向ライン数を示す。(b) N indicates the number of vertical lines of the block.

(c)P(i、j)はブロック内アドレス(i、i)の
画素値を示す。
(c) P(i, j) indicates the pixel value of address (i, i) within the block.

第2量子化ステップサイズ算出部21は、符号化ブロッ
クの平均信号44と分散信号26と第1の量子化ステッ
プサイズ24より、第2の量子化ステップサイズ20と
量子化クラス情報2了を算出する。第1の量子化ステッ
プサイズ24は、第1量子化ステップサイズ算出部22
で、符号メモリ部28内の符号残留量23より、前記の
従来例で記述した方式により求めたものである。第2量
子化ステップサイズ算出部21は、まず第1の量子化ス
テップサイズによって、予め定められた閾値を補正する
。補正の方法は以下の通りである。
The second quantization step size calculation unit 21 calculates a second quantization step size 20 and quantization class information 2 from the average signal 44 of the encoded block, the variance signal 26, and the first quantization step size 24. do. The first quantization step size 24 is calculated by the first quantization step size calculation unit 22
This is calculated from the code residual amount 23 in the code memory unit 28 using the method described in the conventional example. The second quantization step size calculation unit 21 first corrects a predetermined threshold value using the first quantization step size. The method of correction is as follows.

第1の量子化ステップサイズQbと予め定められた閾値
thqを比較する。
The first quantization step size Qb and a predetermined threshold thq are compared.

(1) Qb < = th q  の時クラス分けに
使用する閾値tb1 、  th2.  th 3゜t
h4を補正せずそのままとする。
(1) Threshold values tb1, th2. used for classification when Qb <= th q. th 3゜t
Leave h4 unchanged without correcting it.

(2) Qb > tllq  の時 クラス分けに使用する閾値th1 th4を次式により補正する。(2) When Qb > tllq Threshold th1 used for classification Correct th4 using the following formula.

th2.  th3゜ ’  ” ’ +  2.3. 4 maxは量子化ステップサイズQbの最大値量子化ステ
ップサイズQbと閾値th1、th2、th3、th4
の関係図を第4図に示す。
th2. th3゜'''' + 2.3.4 max is the maximum value of the quantization step size Qb and the thresholds th1, th2, th3, th4
Figure 4 shows the relationship diagram.

次に輝度信号であり、かつフレーム内符号化するブロッ
クに関し、平均信号44、分散信号26と前記閾値th
1、th2、th3、th4を比較し、各ブロックを4
つの量子化クラスに分け、量子化クラスにより第1の量
子化ステップサイズ24より第2の量子化ステップサイ
ズ2oを算出する。
Next, regarding a block which is a luminance signal and is to be intra-frame encoded, the average signal 44, the variance signal 26 and the threshold value th
1, th2, th3, th4, each block is 4
The second quantization step size 2o is calculated from the first quantization step size 24 according to the quantization class.

但し、第1の量子化ステップサイズをQbとし、第2の
量子化ステップサイズをQstepとする。
However, the first quantization step size is Qb, and the second quantization step size is Qstep.

(1)o≦σ2〈thlかつμ〉th4の場合Q 5t
ep  ’ C1ass = 1Q 5tep = −
Q b (2)th1≦σ2〈th2かつμ>th4の場合Q 
5tep  C1ass二2 Qstep  = −Qb (s)th2≦σ2くth3かつμ> th4の場合Q
 5tep   C1ass =:3Qstep ” 
−Qb (4)th3≦σ2かつμ)th4の場合Q 5tep
   C!1ass = 4Qstep  = Qb 以上のようにすることにより、輝度信号ブロックであり
、かつフレーム内符号化するブロックの第2の量子化ス
テップサイズ2oは、入力テレビジョン信号2の画素の
平均値が一定値以上であり、かつ精微性が高いブロック
に対しては、第1の量子化ステップサイズ24より小さ
くなる。また第1の量子化ステップサイズが一定値を越
えるときはクラス分けの閾値を補正することにより、第
1の量子化ステップサイズより小さい量子化ステップサ
イズで量子化されるブロックを少なくし、輝度信号の符
号量を削減し、色差信号の符号量が極端に少ないことに
よって生じる符号化ブロックの色の劣化を防ぐことがで
きる。
(1) When o≦σ2〈thl and μ〉th4, Q 5t
ep' C1ass = 1Q 5tep = -
Q b (2) When th1≦σ2<th2 and μ>th4 Q
5step C1ass22 Qstep = -Qb (s) Q if th2≦σ2 th3 and μ> th4
5step C1ass=:3Qstep”
-Qb (4) If th3≦σ2 and μ)th4, then Q 5tep
C! 1ass = 4Qstep = Qb By doing the above, the second quantization step size 2o of the block that is a luminance signal block and is to be intraframe encoded is such that the average value of the pixels of the input television signal 2 is a constant value. For blocks that are above and have high precision, the first quantization step size is smaller than 24. In addition, when the first quantization step size exceeds a certain value, by correcting the classification threshold, the number of blocks that are quantized with a quantization step size smaller than the first quantization step size is reduced, and the luminance signal It is possible to reduce the code amount of the color difference signal and prevent deterioration of the color of the encoded block caused by an extremely small code amount of the color difference signal.

量子化部19は、直交変換係数14を第2の量子化ステ
ップサイズ2oで量子化し、直交変換量子化係数29を
算出する。逆直交変換部30は、直交変換量子化係数2
9を逆直交変換し、量子化誤差を含んだ信号31を算出
する。
The quantization unit 19 quantizes the orthogonal transform coefficients 14 with a second quantization step size of 2o, and calculates orthogonal transform quantized coefficients 29. The inverse orthogonal transform unit 30 converts orthogonal transform quantization coefficients 2
9 is subjected to inverse orthogonal transformation, and a signal 31 containing a quantization error is calculated.

スイッチ部16は、(1)符号化方式選択信号10がフ
レーム内符号化を選択している場合には再生画像算出信
号32として数値rOJ信号33を選択し、(2)符号
化方式選択信号10がフレーム間符号化を選択している
場合には再生画像算出信号32として予測信号12を選
択する。
The switch unit 16 (1) selects the numerical value rOJ signal 33 as the reproduced image calculation signal 32 when the encoding method selection signal 10 selects intraframe encoding, and (2) selects the numerical value rOJ signal 33 as the reproduction image calculation signal 32. If interframe coding is selected, the predicted signal 12 is selected as the reproduced image calculation signal 32.

再生画像算出部34は量子化誤差を含んだ信号31と再
生画像算出信号32を加算し、符号化ブロックの再生画
像36を算出する。画像メモリ4は現フレームの再生画
像信号36を蓄積し、前フレームの再生画像信号5を出
力する。
The reproduced image calculation unit 34 adds the signal 31 containing the quantization error and the reproduced image calculation signal 32 to calculate a reproduced image 36 of the encoded block. The image memory 4 stores the reproduced image signal 36 of the current frame and outputs the reproduced image signal 5 of the previous frame.

予測誤差符号化部36は、符号化方式選択信号10、第
1の量子化ステップサイズ24、量子化クラス情報27
、および直交変換量子化係数26を符号化し、予測誤差
符号37を算出する。
The prediction error encoding unit 36 includes an encoding method selection signal 10, a first quantization step size 24, and quantization class information 27.
, and the orthogonal transform quantization coefficients 26 to calculate a prediction error code 37.

動ベクトル符号化部38は動き補償予測したブロックの
動ベクトル信号6を符号化し、動ベクトル符号39を算
出する。
The motion vector encoding unit 38 encodes the motion vector signal 6 of the block subjected to motion compensation prediction and calculates a motion vector code 39.

マルチプレクサ部4oは予測誤差符号37と動ベクトル
符号39より、所定の形式の伝送フレーム41を算出す
る。
The multiplexer unit 4o calculates a transmission frame 41 in a predetermined format from the prediction error code 37 and the motion vector code 39.

符号メモリ部28は伝送フレーム41を、−旦蓄積し、
図示していない外部より入力するクロック信号に同期し
て、伝送符号42として出力端子43より出力する。同
時に、符号メモリ部28はメモリ内に残留している符号
量を残留符号量23として算出する。
The code memory section 28 stores the transmission frame 41 -times,
It is output from an output terminal 43 as a transmission code 42 in synchronization with a clock signal input from an external source (not shown). At the same time, the code memory unit 28 calculates the amount of codes remaining in the memory as the remaining code amount 23.

以上の説明から明らかなように、本実施例によれば、輝
度信号ブロックの符号化時に、同一の量子化ステップサ
イズに属する連続したブロック群において、フレーム内
符号化し、かつ画素値の平均値が一定値以上であるブロ
ックではブロックの精微性に比例して、基準となる第1
の量子化ステップサイズより、第2の量子化ステップサ
イズを算出し、第2の量子化ステップサイズを用いて直
交変換係数を量子化するので、画像の精微性を損なわず
1画像全体の画質向上が達成できる。
As is clear from the above description, according to this embodiment, when encoding a luminance signal block, intra-frame encoding is performed in a group of consecutive blocks belonging to the same quantization step size, and the average value of pixel values is For blocks that are above a certain value, the first reference value is
A second quantization step size is calculated from the quantization step size of can be achieved.

また、第1の量子化ステップサイズが一定値ヲ越えると
きは、クラス分けのための閾値を補正することにより第
1の量子化ステップサイズより小さい量子化ステップサ
イズで量子化されるブロック数を削減し、輝度信号の符
号量を削減し、その結果、色差信号の符号量が増加し、
色差信号の符号量が極端に少ないことによって生じる符
号化ブロックの色の劣化を防ぐことができる。
Also, when the first quantization step size exceeds a certain value, the number of blocks quantized with a quantization step size smaller than the first quantization step size is reduced by correcting the threshold for classification. As a result, the amount of code for the luminance signal is reduced, and as a result, the amount of code for the color difference signal is increased.
Deterioration of the color of the encoded block caused by an extremely small amount of code of the color difference signal can be prevented.

なお、以上の説明では平均・分散値算出部26で算出す
る分散値26を第(3)式で定義したが、入力テレビジ
ョン信号2の精細性を測定できる分散であれば、他の測
定尺度でもよい。例えば、一般にブロックの大きさ(水
平方向画素数:M、垂直方向ライン数二N)は固定値で
あるから、計算処理が簡単な尺度として第(6)式に示
した数値りがある。ただし、p(i、Dはブロック内ア
ドレス(i、j)の画素値、μはブロックの平均画素値
を示す。
Note that in the above explanation, the variance value 26 calculated by the mean/variance value calculation unit 26 is defined by equation (3), but other measurement scales may be used as long as the variance can measure the fineness of the input television signal 2. But that's fine. For example, since the size of a block (horizontal pixel count: M, vertical line count: 2N) is generally a fixed value, the numerical value shown in equation (6) is available as a measure that is easy to calculate. However, p(i, D indicates the pixel value of address (i, j) in the block, and μ indicates the average pixel value of the block.

また、以上の説明では、第1の量子化ステップサイズを
変化させるかとうかを画素値の平均値によって決定した
が、全体の画素値の特徴を表現するその他の尺度でよい
Further, in the above description, whether or not to change the first quantization step size is determined based on the average value of pixel values, but other measures expressing the characteristics of the entire pixel values may be used.

更に、以上の説明では、量子化ステップサイズツクラス
分けを4クラスとしたが、他のクラス分は数でもよい。
Further, in the above description, the quantization step size is classified into four classes, but the other classes may be divided into numbers.

更に、以上の説明では、クラス分は毎に基準となる第1
の量子化ステップサイズを等分し、第2の量子化ステッ
プサイズを決定したが、分散が小さいブロックに対して
、第2の量子化ステップサイズが小さくなるように算出
されれば、他の方法でもよい。
Furthermore, in the above explanation, the first standard is used for each class.
The second quantization step size was determined by equally dividing the quantization step size, but if the second quantization step size is calculated to be smaller for blocks with small variance, another method But that's fine.

更に、クラス分けのための閾値を(6)式によって補正
したが、量子化ステップサイズが大きくなる発明の効果 以上のように本発明は、フレーム内符号化するフロック
の入力テレビジョン信号の持っ精微性に関する特徴を測
定し、同一の量子化ステップサイズで量子化する連続し
たブロック群内で平均値が一定値以上であり、かつ精微
な絵柄を持つフレーム内符号化するフロックに対しては
、前記量子化ステップサイズを小さくすることにより、
発生符号量は制限しつつ、原画像の持つ精微性を損なう
ことなく動画像符号化が行えるために、画質の向上を図
ることが可能となる。
Furthermore, although the threshold value for classification is corrected using equation (6), the present invention has the effect of increasing the quantization step size. For intraframe-encoded blocks whose average value is a certain value or more within a group of consecutive blocks that are quantized with the same quantization step size and that have delicate patterns, By reducing the quantization step size,
Since video encoding can be performed while limiting the amount of generated code and without impairing the fineness of the original image, it is possible to improve the image quality.

特に、リフレッシ−フレームの画質改善効果が顕著であ
る。
In particular, the image quality improvement effect of refresh frames is remarkable.

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

第1図は本発明の一実施例における動き補償予測フレー
ム間符号化装置のブロック図、第2図は従来の動き補償
予測フレーム間符号化装置のブロック図、第3図は従来
例における画像とマクロフロックの関係を示した概念図
、第4図は本発明の一実施例における動き補償予測フレ
ーム間符号化装置の量子化ステップサイズとの関係を示
す特性図である。 1.61・・・入力端子、3.63・・・動ベクトル算
出部、4.64・・・画像メモリ部、58・・・動き補
償予測部、9.60・・フレーム内・フレーム間判定部
、11.62・・ループ内フィルタ部、13.64・・
予測誤差算出部、15.66・・・スイッチ部、17.
68・・・直交変換部、19.70・・・量子化部、2
1第2量子化ステップサイズ算出部、22.69・・第
1量子化ステップサイズ算出部、26・・・平均・分散
値算出部、28、了4・・・符号メモリ部、30.76
・・・逆直交変換部、34.78・・・再生画像算出部
、36.82・・・予測誤差符号化部、38.84・・
・勤ベクトル符号化部、41.86・・・マルチプレク
サ部、43.89・・・出力端子。
FIG. 1 is a block diagram of a motion-compensated predictive interframe coding device according to an embodiment of the present invention, FIG. 2 is a block diagram of a conventional motion-compensated predictive interframe coding device, and FIG. 3 is a block diagram of a conventional motion-compensated predictive interframe coding device. FIG. 4 is a conceptual diagram showing the relationship between macro blocks and a characteristic diagram showing the relationship with the quantization step size of the motion compensated predictive interframe coding device in an embodiment of the present invention. 1.61... Input terminal, 3.63... Motion vector calculation unit, 4.64... Image memory unit, 58... Motion compensation prediction unit, 9.60... Intra-frame/inter-frame determination Section, 11.62... In-loop filter section, 13.64...
Prediction error calculation unit, 15.66... switch unit, 17.
68...Orthogonal transformation unit, 19.70...Quantization unit, 2
1 Second quantization step size calculation unit, 22.69... First quantization step size calculation unit, 26... Average/variance value calculation unit, 28, 4... Code memory unit, 30.76
... Inverse orthogonal transform unit, 34.78... Reproduction image calculation unit, 36.82... Prediction error encoding unit, 38.84...
・Input vector encoding unit, 41.86... Multiplexer unit, 43.89... Output terminal.

Claims (1)

【特許請求の範囲】[Claims] テレビジョン信号をアナログディジタル変換するA/D
変換手段と、ディジタル化した入力テレビジョン信号の
1フレームまたは1フィールドを定められた大きさのブ
ロックに分割するブロック化手段と、個々のブロックに
ついてテレビジョン画像の動きである動ベクトルを算出
する動ベクトル検出手段と、個々のブロックについて前
記動ベクトルを用いて動き補償予測するか判定する動き
補償判定手段と、動き補償予測するブロックについて、
前フレームの再生画像を動ベクトルで動き補償予測し、
予測画素値を算出する動き補償予測手段と、入力テレビ
ジョン信号の画素値と予測画素値との差分を予測誤差値
として算出する誤差算出手段と、個々のブロックについ
て、フレーム間符号化するかフレーム内符号化するかを
判定する符号化方法決定手段と、ブロック毎に前記符号
化方法決定手段の判定結果により直交変換する信号を入
力テレビジョン信号の画素値とするか予測誤差値とする
か切り替える切り替え手段と、入力テレビジョン信号の
画素値または予測誤差値を、直交変換し、直交変換係数
を算出する直交変換手段と、発生符号量より第1の量子
化ステップサイズを算出する第1量子化ステップサイズ
決定手段と、入力テレビジョン信号の輝度信号のブロッ
ク毎の画素値の平均と分散を算出する平均・分散算出手
段と、輝度信号ブロックであり、かつフレーム内符号化
するブロックを平均または分散によつてクラス分けする
ために、予め定められた閾値を第1の量子化ステップサ
イズによつて補正する手段と、輝度信号のブロックであ
りかつフレーム内符号化するブロックについては、前記
平均と分散と補正された閾値よりブロックをクラス分け
し、各クラス毎に第1の量子化ステップサイズより第2
の量子化ステップサイズを算出し、その他のブロックに
ついては、第1の量子化ステップサイズを第2の量子化
ステップサイズとする第2量子化ステップサイズ決定手
段と、第2の量子化ステップサイズを用いて、直交変換
係数を量子化し、量子化した直交変換係数を算出する量
子化手段と、フレーム内符号化かフレーム間符号化かの
情報と第1の量子化ステップサイズと量子化のクラス分
けに関する情報と量子化した直交変換係数を符号化する
符号化手段と、量子化した直交変換係数を逆直交変換し
、逆量子化信号を算出する逆量子化手段と、前記符号化
方法決定手段の判定結果により、再生画素値算出時に用
いる画素値を動き補償予測した予測画素値とするか、数
値「0」とするか切り替える切り替え手段と、予測画素
値または数値「0」と逆量子化信号より再生画像を算出
する画像再生手段と、再生画像を蓄積する画像蓄積手段
と、動ベクトルとを符号化する動ベクトル符号化手段を
具備する動き補償予測フレーム間符号化装置。
A/D converts television signals from analog to digital
a converting means, a blocking means for dividing one frame or one field of the digitized input television signal into blocks of a predetermined size, and a moving means for calculating a motion vector representing the movement of the television image for each block. a vector detection means, a motion compensation determination means for determining whether to perform motion compensation prediction using the motion vector for each block, and a block to be motion compensated predicted;
Motion-compensated prediction is performed on the reproduced image of the previous frame using a motion vector,
A motion compensation prediction means for calculating predicted pixel values; an error calculation means for calculating the difference between the pixel value of the input television signal and the predicted pixel value as a prediction error value; encoding method determining means for determining whether to perform inner encoding; and switching for each block whether the signal to be orthogonally transformed is to be a pixel value of an input television signal or a prediction error value based on the determination result of the encoding method determining means. a switching means; an orthogonal transform means for orthogonally transforming pixel values or prediction error values of an input television signal to calculate orthogonal transform coefficients; and a first quantizer for calculating a first quantization step size from the generated code amount. step size determining means; mean/variance calculation means for calculating the mean and variance of pixel values for each block of the luminance signal of the input television signal; means for correcting a predetermined threshold value by a first quantization step size in order to classify according to The blocks are divided into classes based on the corrected threshold value, and the second quantization step size is determined based on the first quantization step size for each class.
and for other blocks, a second quantization step size determination means that sets the first quantization step size to the second quantization step size; quantization means for calculating the quantized orthogonal transform coefficients, information on intra-frame coding or inter-frame coding, first quantization step size, and quantization classification. an encoding means for encoding the quantized orthogonal transform coefficients, an inverse quantization means for performing inverse orthogonal transformation on the quantized orthogonal transform coefficients and calculating an inverse quantized signal, and the encoding method determining means. A switching means for switching whether the pixel value to be used when calculating the reproduced pixel value is the predicted pixel value predicted by motion compensation or the numerical value "0" according to the determination result, and the predicted pixel value or the numerical value "0" and the dequantized signal. A motion compensated predictive interframe encoding device comprising an image reproduction means for calculating a reproduced image, an image storage means for accumulating the reproduced image, and a motion vector encoding means for encoding a motion vector.
JP16052090A 1989-10-13 1990-06-19 Motion compensated prediction interframe coding device Expired - Lifetime JP2629409B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP16052090A JP2629409B2 (en) 1990-06-19 1990-06-19 Motion compensated prediction interframe coding device
US07/597,853 US5144426A (en) 1989-10-13 1990-10-12 Motion compensated prediction interframe coding system
US08/298,684 USRE37091E1 (en) 1989-10-13 1994-08-31 Motion compensated prediction interframe coding system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16052090A JP2629409B2 (en) 1990-06-19 1990-06-19 Motion compensated prediction interframe coding device

Publications (2)

Publication Number Publication Date
JPH0451689A true JPH0451689A (en) 1992-02-20
JP2629409B2 JP2629409B2 (en) 1997-07-09

Family

ID=15716736

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16052090A Expired - Lifetime JP2629409B2 (en) 1989-10-13 1990-06-19 Motion compensated prediction interframe coding device

Country Status (1)

Country Link
JP (1) JP2629409B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1994008427A1 (en) * 1992-09-28 1994-04-14 Sony Corporation Motion video encoding/decoding method, apparatus and storage medium therefor
EP0574244A3 (en) * 1992-06-10 1994-08-10 Canon Kk Coding method and apparatus
US7336708B2 (en) 1992-01-29 2008-02-26 Mitsubishi Denki Kabushiki Kaisha High-efficiency encoder and video information recording/reproducing apparatus
JP2013138361A (en) * 2011-12-28 2013-07-11 Canon Inc Image encoding apparatus, image encoding method, and program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7336708B2 (en) 1992-01-29 2008-02-26 Mitsubishi Denki Kabushiki Kaisha High-efficiency encoder and video information recording/reproducing apparatus
US7362805B2 (en) 1992-01-29 2008-04-22 Mitsubishi Denki Kabushiki Kaisha High efficiency encoder and video information recording/reproducing apparatus
US7376184B2 (en) 1992-01-29 2008-05-20 Mitsubishi Denki Kabushiki Kaisha High-efficiency encoder and video information recording/reproducing apparatus
US7688892B2 (en) 1992-01-29 2010-03-30 Mitsubishi Denki Kabushiki Kaisha High efficiency encoder and video information recording/reproducing apparatus
US7756202B2 (en) 1992-01-29 2010-07-13 Mitsubishi Denki Kabushiki Kaisha High-efficiency encoder and video information recording/reproducing apparatus
US7936817B2 (en) 1992-01-29 2011-05-03 Mitsubishi Denki Kabushiki Kaisha High-efficiency encoder and video information recording/reproducing apparatus
EP0574244A3 (en) * 1992-06-10 1994-08-10 Canon Kk Coding method and apparatus
WO1994008427A1 (en) * 1992-09-28 1994-04-14 Sony Corporation Motion video encoding/decoding method, apparatus and storage medium therefor
JP2013138361A (en) * 2011-12-28 2013-07-11 Canon Inc Image encoding apparatus, image encoding method, and program
US9571828B2 (en) 2011-12-28 2017-02-14 Canon Kabushiki Kaisha Image encoding apparatus, image encoding method and program

Also Published As

Publication number Publication date
JP2629409B2 (en) 1997-07-09

Similar Documents

Publication Publication Date Title
KR0183688B1 (en) Image encoding method and device
US5663763A (en) Picture signal encoding method and apparatus and picture signal decoding method and apparatus
JPH06189281A (en) Video signal encoding device using compression of adaptive frame/field format
JPH03127580A (en) Movement compensation inter-frame coder
JP2895034B1 (en) Decoder having adaptive block phenomenon removal function and adaptive block phenomenon removal decoding method
JPH0451689A (en) Motion compensating predictive interframe coding device
JPH04268891A (en) Encoding device between movement compensation predicting frames
JPH04268890A (en) Encoding device between movement compensation predicting frames
JPH0761153B2 (en) Motion compensation prediction interframe coding device
JPH03127582A (en) Movement compensation prediction inter-frame coder
KR950005624B1 (en) Image compressing &amp; encoding apparatus and method
JPH04259182A (en) Movement compensation prediction inter-frame coder
JPH03214989A (en) Moving compensation prediction inter-frame coder
JP3279927B2 (en) Image encoding method and apparatus
JP2574572B2 (en) Image encoding method and image encoding device
JPH04137985A (en) Moving compensation prediction inter-frame coder
JPH05227513A (en) Video signal transmitter
KR100221308B1 (en) A device for eliminating blocking effects and a moving picture decoder using the device
JP3985567B2 (en) Encoding device and encoding method
KR100195692B1 (en) An apparatus for calculating addresses by multi-loop
JP3407176B2 (en) Color image coding device
JP2630022B2 (en) Motion compensated interframe coding device
JPH08317396A (en) Motion compensated predictive inter-frame encoder
JP3149662B2 (en) Video encoding device, video decoding device, and optical disk
JP2922155B2 (en) Image encoding method, image encoding device, and image processing system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080418

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090418

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100418

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110418

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110418

Year of fee payment: 14