JPH04259182A - Movement compensation prediction inter-frame coder - Google Patents
Movement compensation prediction inter-frame coderInfo
- Publication number
- JPH04259182A JPH04259182A JP3019815A JP1981591A JPH04259182A JP H04259182 A JPH04259182 A JP H04259182A JP 3019815 A JP3019815 A JP 3019815A JP 1981591 A JP1981591 A JP 1981591A JP H04259182 A JPH04259182 A JP H04259182A
- Authority
- JP
- Japan
- Prior art keywords
- orthogonal transform
- signal
- step size
- quantization
- event
- 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
Links
Landscapes
- Color Television Systems (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【0001】0001
【産業上の利用分野】本発明はテレビジョン信号の動き
補償予測フレーム間符号化装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a motion-compensated predictive interframe coding apparatus for television signals.
【0002】0002
【従来の技術】近年、動画像符号化技術の発達にともな
い、テレビ電話、テレビ会議システム、CD−ROM、
ディジタルVTR等で用いられるカラー動画像の高能率
符号化装置として動き補償予測フレーム間符号化装置が
開発されている。例えば、吹抜敬彦著「TV画像の多次
元信号処理」(1988年11月15日発行、日刊工業
新聞社刊、第7章 高能率符号化、pp213−pp2
91)に記載された動き補償予測フレーム間符号化装置
が知られている。[Background Art] In recent years, with the development of video encoding technology, video telephones, video conference systems, CD-ROMs,
A motion compensated predictive interframe coding device has been developed as a highly efficient coding device for color moving images used in digital VTRs and the like. For example, Takahiko Fukinuki, "Multidimensional signal processing of TV images" (November 15, 1988, Nikkan Kogyo Shimbun, Chapter 7 High Efficiency Coding, pp213-pp2)
The motion compensated predictive interframe coding device described in 91) is known.
【0003】動き補償予測フレーム間符号化装置では、
一定のフレームレートで映像符号化が実現できるように
、発生符号量が多い場合には予測誤差または入力テレビ
ジョン信号の画素値の量子化ステップサイズを大きくし
て発生する符号量を制限している。従来の量子化ステッ
プサイズの決定方式として、シー・シー・アイ・ティー
・ティー文書の「ディスクリプション オブ リフ
ァレンス モデル8」(C.C.I.T.T. SG
XV 文書 25 ” title:Discript
ion of Ref. Model 8(RM8),
source: Working Party XV
/4 Specialist Group On Co
ding for Visual Telephony
, version:June.9.1989 ”)に
記載された動き補償予測フレーム間符号化装置が知られ
ている。[0003] In a motion compensated predictive interframe coding device,
In order to achieve video encoding at a constant frame rate, when the amount of generated code is large, the prediction error or the quantization step size of the pixel value of the input television signal is increased to limit the amount of generated code. . As a conventional method for determining the quantization step size, the C.C.I.T.T. document "Description of Reference Model 8" (C.C.I.T.T. SG
XV Document 25 ” title:Descript
ion of Ref. Model 8 (RM8),
source: Working Party XV
/4 Specialist Group On Co
ding for Visual Telephony
, version: June. 9.1989'') is known.
【0004】以下、図2を参照にして従来の動き補償予
測フレーム間符号化装置について説明する。図2に於て
、51は入力テレビジョン信号が入力する入力端子、5
3は現フレームの符号化ブロックの画信号と前フレーム
の再生画信号を比較して符号化ブロックの動ベクトルを
算出する動ベクトル算出部、54は現フレームと前フレ
ームの再生画信号を蓄積する画像メモリ部、58は前フ
レームの再生画信号に対して動き補償予測する動き補償
予測部、符号化するブロックをフレーム内符号化するか
フレーム間符号化するか判定するフレーム間・フレーム
内判定部、62は動き補償予測信号に対して2次元ロー
パスフィルタ処理するループ内フィルタ部、64は符号
化ブロックの原画信号と予測信号の差分演算を行ない予
測誤差を算出する予測誤差算出部、66は符号化方式選
択信号により、直交変換する信号の選択と再生画像を算
出するための信号の選択を行なうスイッチ部、68は直
交変換する信号を直交変換する直交変換部、70は直交
変換係数を量子化する量子化部、73は量子化ステップ
サイズを算出する量子化ステップサイズ算出部、74は
伝送フレームを一時蓄積する符号メモリ部、76は量子
化した直交変換係数を逆直交変換する逆直交変換部、7
8は現フレームの再生画像を算出する再生画像算出部、
82は予測誤差を通信路符号化する予測誤差符号化部、
84は動ベクトルを通信路符号化する動ベクトル符号化
部、86は予測符号と動ベクトル符号より伝送フレーム
を構成するマルチプレクサ部、89は伝送信号を出力す
る出力端子である。A conventional motion compensated predictive interframe coding apparatus will be described below with reference to FIG. In FIG. 2, 51 is an input terminal to which an input television signal is input;
Reference numeral 3 denotes a motion vector calculation unit that compares the image signal of the encoded block of the current frame with the reproduced image signal of the previous frame to calculate the motion vector of the encoded block, and 54 stores the reproduced image signals of the current frame and the previous frame. An image memory unit, 58 is a motion compensation prediction unit that performs motion compensation prediction on the reproduced image signal of the previous frame, and an interframe/intraframe determination unit that determines whether a block to be encoded is to be intraframe encoded or interframe encoded. , 62 is an in-loop filter unit that performs two-dimensional low-pass filter processing on the motion-compensated prediction signal, 64 is a prediction error calculation unit that calculates a prediction error by calculating the difference between the original image signal and the prediction signal of the encoded block, and 66 is a code 68 is an orthogonal transformation unit that orthogonally transforms the signal to be orthogonally transformed; 70 is a quantizer for orthogonal transformation coefficients; 73 is a quantization step size calculation unit that calculates a quantization step size, 74 is a code memory unit that temporarily stores transmission frames, and 76 is an inverse orthogonal transform unit that performs inverse orthogonal transform on quantized orthogonal transform coefficients. ,7
8 is a reproduced image calculation unit that calculates a reproduced image of the current frame;
82 is a prediction error encoding unit that encodes the prediction error through a channel;
84 is a motion vector encoding unit that encodes a motion vector through a channel; 86 is a multiplexer unit that configures a transmission frame from a prediction code and a motion vector code; and 89 is an output terminal that outputs a transmission signal.
【0005】以上のような構成に於て、以下その動作に
ついて説明する。まず、図示されていないアナログ・デ
ィジタル変換回路でディジタル信号に変換され、水平方
向M画素、垂直方向Nラインのブロックに分割されたテ
レビジョン信号は、入力端子51より入力テレビジョン
信号52として入力する。The operation of the above configuration will be explained below. First, a television signal that is 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 52 from an input terminal 51. .
【0006】動ベクトル算出部53は、入力テレビジョ
ン信号52と画像メモリ部54に蓄積されている前フレ
ームの再生テレビジョン信号55を比較し、符号化ブロ
ックの動きを動ベクトルとして算出し、動ベクトル信号
56に出力する。同時に動ベクトル算出部53は、動ベ
クトル算出時の評価値を用いて、符号化ブロックについ
て動き補償予測の有効・無効を判定し、その結果を動き
補償予測制御信号として動ベクトル信号56に出力する
。従って、動ベクトル信号56には、動ベクトルと動き
補償予測信号が重畳されている。The motion vector calculation section 53 compares the input television signal 52 with the reproduced television signal 55 of the previous frame stored in the image memory section 54, calculates the motion of the encoded block as a motion vector, and calculates the motion of the encoded block as a motion vector. The vector signal 56 is output. At the same time, the motion vector calculation unit 53 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 56. . Therefore, the motion vector signal 56 has a motion vector and a motion compensated prediction signal superimposed thereon.
【0007】動き補償予測部58は、(1)動き補償予
測制御信号が動き補償予測の有効を指示している場合に
は前フレームの再生テレビジョン信号55を動ベクトル
で動き補償予測し、(2)動き補償予測制御信号が動き
補償予測の無効を指示している場合には前フレームの再
生テレビジョン信号55をそのままで、動き補償予測信
号59として出力する。The motion compensation prediction unit 58 (1) performs motion compensation prediction on the reproduced television signal 55 of the previous frame using a motion vector when the motion compensation prediction control signal indicates the validity of motion compensation prediction; 2) If the motion compensation prediction control signal instructs invalidation of motion compensation prediction, the reproduced television signal 55 of the previous frame is output as is as the motion compensation prediction signal 59.
【0008】フレーム間・フレーム内判定部60は、ブ
ロック単位に入力テレビジョン信号52と動き補償予測
信号59を比較し、動き補償予測の有効性・無効性を判
定し、(1)動き補償予測の有効性が小さい場合は該当
ブロックについてフレーム内符号化が有効と判定し、(
2)動き補償予測の有効性が大きい場合は該当ブロック
についてフレーム間符号化が有効と判定し、その結果を
符号化方式選択信号61として出力する。ブロック単位
に符号化方式をフレーム内符号化方式とフレーム間符号
化方式で切り替えることにより、フレーム間符号化方式
のみで符号化する場合に比べ、以下の改善が図れる。
(1)シーンチェンジ発生時、フレーム内符号化が選択
されるためにシーンチェンジ後の画質向上が図れる。(
2)動体の大きな動きが発生すると、動体の陰に隠れて
いた背景領域が出現し、この場合にフレーム内符号化が
選択されるために、画質向上が図れる。The inter-frame/intra-frame determining unit 60 compares the input television signal 52 and the motion-compensated prediction signal 59 on a block-by-block basis, and determines the validity/invalidity of the motion-compensated prediction. If the effectiveness of (
2) If the effectiveness of motion compensation prediction is high, it is determined that interframe coding is effective for the corresponding block, and the result is output as the coding method selection signal 61. By switching the encoding method between the intra-frame encoding method and the inter-frame encoding method on a block-by-block basis, the following improvements can be made compared to the case where encoding is performed using only the inter-frame encoding method. (1) When a scene change occurs, intra-frame encoding is selected, so 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.
【0009】ループ内フィルタ部62は動ベクトルを用
いて動き補償予測した符号化ブロックに対して、2次元
ローパスフィルタ処理を行ない、予測信号63を算出す
る。予測誤差算出部64は、符号化ブロックの入力テレ
ビジョン信号52と予測信号63の差分演算を行ない、
その結果を予測誤差信号65として出力する。[0009] The in-loop filter section 62 performs two-dimensional low-pass filter processing on the coded block that has been motion compensated and predicted using the motion vector, and calculates a prediction signal 63. The prediction error calculation unit 64 performs a difference calculation between the input television signal 52 and the prediction signal 63 of the encoded block,
The result is output as a prediction error signal 65.
【0010】スイッチ部66は、(1)符号化方式選択
信号61がフレーム内符号化を選択している場合には直
交変換する信号67として入力テレビジョン信号52を
選択し、(2)符号化方式選択信号61がフレーム間符
号化を選択している場合には、直交変換する信号67と
して予測誤差信号65を選択する。The switch unit 66 (1) selects the input television signal 52 as the signal 67 to be orthogonally transformed when the encoding method selection signal 61 selects intraframe encoding, and (2) selects the input television signal 52 as the signal 67 to be orthogonally transformed. When the method selection signal 61 selects interframe coding, the prediction error signal 65 is selected as the signal 67 to be orthogonally transformed.
【0011】直交変換部68は、直交変換する信号67
に対して直交変換を行ない、直交変換する信号67の近
傍画素間が持つ高い相関性を除去して、直交変換係数6
9を算出する。直交変換方式としては、多くの場合、高
い変換効率を持ち、ハードウェア化について実現性のあ
る離散コサイン変換が用いられる。The orthogonal transform section 68 converts the signal 67 to be orthogonally transformed.
The high correlation between neighboring pixels of the signal 67 to be orthogonally transformed is removed, and the orthogonal transform coefficient 6
Calculate 9. As the orthogonal transform method, in many cases, discrete cosine transform is used, which has high transform efficiency and can be implemented in hardware.
【0012】量子化部70は、量子化ステップサイズ7
1を用いて、直交変換係数69を量子化し、直交変換量
子化係数72を算出する。The quantization unit 70 has a quantization step size of 7
1 to quantize the orthogonal transform coefficient 69 and calculate the orthogonal transform quantized coefficient 72.
【0013】量子化ステップサイズ算出部73は、符号
メモリ部74内の残留符号量75より、以下に示す方式
により量子化ステップサイズ71を算出する。The quantization step size calculation unit 73 calculates the quantization step size 71 from the residual code amount 75 in the code memory unit 74 using the method shown below.
【0014】本従来例では入力テレビジョン信号は、水
平方向352画素、垂直方向288ラインの大きさを有
し、水平方向16画素、垂直方向16ラインの領域(本
従来例では、「マクロブロック( Macro Blo
ck )」と呼んでいる。)に分割する。量子化ステッ
プサイズQbは、nマクロブロック周期で、量子化開始
時に第(1)式に示した式より算出する。In this conventional example, the input television signal has a size of 352 pixels in the horizontal direction and 288 lines in the vertical direction. Macro Blo
ck)". ). The quantization step size Qb is calculated from the equation shown in equation (1) at the start of quantization with a cycle of n macroblocks.
【0015】
Qb=2×INT[Bcont÷200q]+2
(1)
但し、第(1)式に於て以下のように定義する。Qb=2×INT[Bcont÷200q]+2
(1)
However, in equation (1), it is defined as follows.
【0016】(a)INT[*]は、小数点以下を切り
捨てる関数とする。
(b)Bcontは、符号メモリ部74の残留符号量を
示す。(a) INT[*] is a function that truncates the fractions below the decimal point. (b) Bcont indicates the remaining code amount in the code memory section 74.
【0017】(c)qは、符号化速度パラメータであり
、符号化速度Vと第(2)式の関係がある。(c) q is an encoding speed parameter and has a relationship with the encoding speed V as shown in equation (2).
【0018】
V=q×64kbit/sec
(2)
第(1)式より明らかなように、残留符号量Bcont
が多くなると、量子化ステップサイズQbが大きくなり
発生符号量が制限され、一定フレームレートの映像信号
符号化が実現できる。例えば、量子化ステップサイズQ
bの算出時に、残留符号量Bcont=700bitの
時は、量子化ステップサイズQb=8となり、残留符号
量Bcont=6100bitの時は、量子化ステップ
サイズQb=62となる。[0018] V=q×64kbit/sec
(2)
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, when the residual code amount Bcont=700 bits, the quantization step size Qb=8, and when the residual code amount Bcont=6100 bits, the quantization step size Qb=62.
【0019】本従来例では、量子化ステップサイズQb
の算出周期nは、n=12としている。In this conventional example, the quantization step size Qb
The calculation period n is set to n=12.
【0020】逆直交変換部76は、直交変換量子化係数
72を逆直交変換し、量子化誤差を含んだ直交変換信号
77を算出する。The inverse orthogonal transform section 76 performs inverse orthogonal transform on the orthogonal transform quantization coefficients 72 to calculate an orthogonal transform signal 77 containing a quantization error.
【0021】スイッチ部66は、(1)符号化方式選択
信号61がフレーム内符号化を選択している場合には再
生画像算出信号79として数値「0」信号80を選択し
、(2)符号化方式選択信号61がフレーム間符号化を
選択している場合にはに再生画像算出信号79として予
測信号63を選択する。The switch section 66 (1) selects the numerical value "0" signal 80 as the reproduction image calculation signal 79 when the encoding method selection signal 61 selects intraframe encoding, and (2) selects the numerical value "0" signal 80 as the reproduction image calculation signal 79. When the coding method selection signal 61 selects interframe coding, the prediction signal 63 is selected as the reproduced image calculation signal 79.
【0022】再生画像算出部78は量子化誤差を含んだ
直交変換信号77と再生画像算出信号79を加算し、符
号化ブロックの再生画像信号81を算出する。The reproduced image calculation unit 78 adds the orthogonal transform signal 77 containing the quantization error and the reproduced image calculation signal 79 to calculate the reproduced image signal 81 of the encoded block.
【0023】画像メモリ54は現フレームの再生画像信
号81を蓄積し、前フレームの再生画像信号55を出力
する。The image memory 54 stores the reproduced image signal 81 of the current frame and outputs the reproduced image signal 55 of the previous frame.
【0024】予測誤差符号化部82は直交変換量子化係
数72、量子化ステップサイズ71、符号化方式選択信
号61を符号化し、予測誤差符号83を算出する。量子
化ステップサイズ71の符号化は、量子化ステップサイ
ズ71の値が変化したとき、つまりnマクロブロックに
1回のみとする。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, and calculates a prediction error code 83. The quantization step size 71 is encoded only when the value of the quantization step size 71 changes, that is, once every n macroblocks.
【0025】動ベクトル符号化部84は動ベクトル56
を符号化し、動ベクトル符号85を算出する。The motion vector encoder 84 encodes the motion vector 56
is encoded, and a motion vector code 85 is calculated.
【0026】マルチプレクサ部86は予測誤差符号83
と動ベクトル符号85より、所定の形式の伝送フレーム
87を算出する。The multiplexer unit 86 uses the prediction error code 83
A transmission frame 87 in a predetermined format is calculated from the motion vector code 85.
【0027】符号メモリ部74は伝送フレーム87を、
一旦蓄積し、図示していない外部より入力するのクロッ
ク信号に同期して、伝送符号88として出力端子89よ
り出力する。同時に、符号メモリ部74はメモリ内に残
留している符号量を残留符号量75として算出する。The code memory section 74 stores the transmission frame 87 as
Once accumulated, the signal is output from an output terminal 89 as a transmission code 88 in synchronization with a clock signal input from an external source (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 75.
【0028】[0028]
【発明が解決しようとする課題】しかし、以上のような
構成では量子化ステップサイズQb以下の直交変換係数
は、すべて量子化後「0」になるために、(1)量子化
ステップサイズQbが大きく、(2)直交変換係数と量
子化ステップサイズとの差異が小さい直交変換係数が多
く存在する場合、量子化による再生画像の画質劣化であ
る「ブロック歪」や「モスキートノイズ」等が発生する
という課題があった。[Problems to be Solved by the Invention] However, in the above configuration, all orthogonal transform coefficients smaller than the quantization step size Qb become "0" after quantization, so (1) the quantization step size Qb is (2) If there are many orthogonal transform coefficients with a small difference between the orthogonal transform coefficients and the quantization step size, "block distortion" and "mosquito noise", which are deterioration in the quality of the reproduced image due to quantization, will occur. There was a problem.
【0029】その原因として、視覚的に重要な意味を持
つ直交変換係数で、その値が量子化ステップサイズQb
よりも少しでも小さい場合は、量子化後の直交変換係数
は「0」となってしまうために再生画像の画質が劣化し
ていたと考えられる。とくに、量子化ステップサイズQ
bが大きい場合には、量子化後多くの直交変換係数が「
0」となってしまうために再生画像の画質劣化が著しい
。The reason for this is that the orthogonal transform coefficient has a visually important meaning, and its value is the quantization step size Qb.
If it is even slightly smaller than , the orthogonal transform coefficient after quantization becomes "0", and the quality of the reproduced image is considered to have deteriorated. In particular, the quantization step size Q
When b is large, many orthogonal transform coefficients after quantization are
0'', the quality of the reproduced image deteriorates significantly.
【0030】本発明は以上のような課題に鑑み、直交変
換係数を量子化する前に、各直交変換係数の絶対値|C
oef|と量子化ステップサイズQbを比較し、量子化
後「0」となる直交変換係数のうち、直交変換係数と量
子化ステップサイズの差分が予め定めた閾値Th以下の
直交変換係数について、前記直交変換係数の絶対値|C
oef|を量子化ステップサイズとする数値変換を行う
ことにより、量子化後に量子化ステップサイズの差分が
予め定めた閾値Th以下の直交変換係数が「0」となる
ことを防止し、さらに、直交変換係数が前記数値変換処
理されたために発生するイベント数の増加により発生す
る符号量の増加を防ぐことにより、再生画像の画質向上
を図るものである。In view of the above problems, the present invention calculates the absolute value |C of each orthogonal transform coefficient before quantizing the orthogonal transform coefficient.
oef | and the quantization step size Qb, and among the orthogonal transform coefficients that become "0" after quantization, for the orthogonal transform coefficients for which the difference between the orthogonal transform coefficient and the quantization step size is equal to or less than a predetermined threshold Th, Absolute value of orthogonal transformation coefficient |C
By performing numerical conversion using oef| as the quantization step size, it is possible to prevent orthogonal transform coefficients whose difference in quantization step size is less than or equal to a predetermined threshold Th after quantization from becoming "0", and to The purpose is to improve the image quality of reproduced images by preventing an increase in the amount of code that occurs due to an increase in the number of events that occur due to the conversion coefficient being subjected to the numerical conversion process.
【0031】[0031]
【課題を解決するための手段】上記目的を達成するため
、本発明の技術的解決手段は、テレビジョン信号をアナ
ログ信号からディジタル信号へ変換するアナログディジ
タル変換手段と、ディジタル化した入力テレビジョン信
号の1フレームまたは1フィールドを定められた大きさ
のブロックに分割するブロック化手段と、個々のブロッ
クについてテレビジョン画像の動きである動ベクトルを
算出する動ベクトル算出手段と、個々のブロックについ
て前記動ベクトルを用いて動き補償予測するか判定する
動き補償判定手段と、動き補償予測するブロックついて
前フレームの再生画像を動ベクトルで動き補償予測し、
予測画素値を算出する動き補償予測画素算出手段と、入
力テレビジョン信号の画素値と予測画素値との差分を予
測誤差値として算出する予測誤差算出手段と、個々のブ
ロックについて、フレーム間符号化するかフレーム内符
号化するかを判定する符号化方式判定手段と、ブロック
毎に前記フレーム内符号化・フレーム間符号化判定結果
により直交変換する信号を、入力テレビジョン信号の画
素値とするか予測誤差値とするか切り替える直交変換信
号選択手段と、入力テレビジョン信号の画素値または予
測誤差値を、直交変換し直交変換係数を算出する直交変
換手段と、発生符号量より量子化ステップサイズを算出
する量子化ステップサイズ算出手段と、個々の直交変換
係数を量子化ステップサイズと比較し、直交変換係数値
が予め定めた範囲以内で量子化後に零となる直交変換係
数について、該当する直交変換係数値を量子化ステップ
サイズまで数値変換する直交変換係数変換手段と、数値
変換処理した直交変換係数を含んだ全ての直交変換係数
を、量子化ステップサイズを用いて量子化する第1の直
交変換係数量子化手段と、前記数値変換処理し量子化し
た直交変換係数について、発生したイベント単位に符号
化し、発生符号量を算出する第1のイベント符号量算出
手段と数値変換処理をしない直交変換係数を、量子化ス
テップサイズを用いて量子化する第2の直交変換係数量
子化手段と、前記量子化した直交変換係数について、発
生したイベント単位に符号化し、発生符号量を算出する
第2のイベント符号量算出手段と数値変換しない場合の
イベントの発生符号量と、数値変換した場合に前記数値
変換しない場合のイベントの範囲内に内に発生する複数
イベントの総発生符号量を比較し発生符号量の少ない方
を算出するイベント単位の発生符号量情報算出手段と、
前記イベント単位の発生符号量情報を用いて、第1の直
行変換係数量子化手段の出力と第2の直行変換係数量子
化手段の出力から発生符号量の少ない直交変換係数を選
択する手段と、フレーム内符号化かフレーム間符号化か
の情報と動ベクトル値と量子化ステップサイズと量子化
した直交変換係数を符号化する符号化手段と、量子化し
た直交変換係数を逆直交変換し、逆量子化信号を算出す
る逆直交変換手段と、前記フレーム間符号化・フレーム
内符号化判定結果により再生画素値算出時に用いる画素
値を動き補償予測した予測画素値とするか、数値「0」
とするか切り替える再生画素選択手段と、予測画素値ま
たは数値「0」と逆量子化信号より再生画像を算出する
再生画素算出手段と、再生画像を蓄積する再生画素蓄積
手段とを具備した動き補償予測フレーム間符号化装置に
より、上記目的を達成するものである。Means for Solving the Problems In order to achieve the above object, the technical solution of the present invention provides an analog-to-digital conversion means for converting a television signal from an analog signal to a digital signal, and a digital input television signal. a blocking means for dividing one frame or one field into blocks of a predetermined size; a motion vector calculating means for calculating a motion vector representing the motion of a television image for each block; a motion compensation determination means for determining whether to perform motion compensation prediction using the vector;
A motion compensation predicted pixel calculation means for calculating a predicted pixel value, a prediction 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, and interframe coding for each block. encoding method determining means for determining whether to perform intra-frame encoding or intra-frame encoding; and whether a signal to be orthogonally transformed based on the intra-frame encoding/inter-frame encoding determination result for each block is used as a pixel value of an input television signal. orthogonal transform signal selection means for converting or switching a prediction error value; orthogonal transform means for orthogonally transforming pixel values or prediction error values of an input television signal to calculate orthogonal transform coefficients; The quantization step size calculation means to be calculated compares each orthogonal transform coefficient with the quantization step size, and calculates the corresponding orthogonal transform for orthogonal transform coefficients whose orthogonal transform coefficient value becomes zero after quantization within a predetermined range. orthogonal transform coefficient converting means for numerically converting coefficient values to a quantization step size; and a first orthogonal transform that quantizes all orthogonal transform coefficients including the numerically converted orthogonal transform coefficients using the quantization step size. a coefficient quantization means, a first event code amount calculation means that encodes the numerically converted and quantized orthogonal transform coefficients in units of generated events and calculates the generated code amount, and an orthogonal transform coefficient that does not undergo the numerical conversion process. a second orthogonal transform coefficient quantizer that quantizes the quantized orthogonal transform coefficient using a quantization step size; and a second event that encodes the quantized orthogonal transform coefficient in units of generated events and calculates the amount of generated code. The code amount calculation means compares the generated code amount of an event without numerical conversion with the total generated code amount of multiple events that occur within the range of events when numerical conversion is not performed, and calculates the generated code amount. means for calculating generated code amount information for each event, which calculates the smaller of the
means for selecting orthogonal transform coefficients with a small amount of generated codes from the output of the first orthogonal transform coefficient quantization means and the output of the second orthogonal transform coefficient quantization means, using the generated code amount information in units of events; An encoding means for encoding information on intra-frame encoding or inter-frame encoding, a motion vector value, a quantization step size, and a quantized orthogonal transform coefficient; An inverse orthogonal transform means for calculating a quantized signal and a pixel value to be used when calculating a reproduced pixel value based on the interframe coding/intraframe coding determination result, whether the pixel value is a predicted pixel value subjected to motion compensation prediction, or a numerical value "0"
A motion compensation device comprising a reproduction pixel selection means for selecting or switching the reproduction pixel, a reproduction pixel calculation means for calculating a reproduction image from a predicted pixel value or numerical value "0" and an inverse quantization signal, and a reproduction pixel accumulation means for accumulating the reproduction image. The above object is achieved by a predictive interframe coding device.
【0032】[0032]
【作用】量子化処理を施される直交変換係数Coefの
分布を測定すると、直交変換された画像がフレーム内画
像でも、フレーム間画像でも、(1)低域成分領域に係
数の絶対値|Coef|が大きいもの数多く分布し、(
2)高域成分領域に係数の絶対値|Coef|が小さい
もの数多く分布している。従って、量子化後に直交変換
係数が数値「0」に変換されるのは高域成分領域に属す
る直交変換係数値である場合が多い。[Operation] When measuring the distribution of the orthogonal transform coefficient Coef subjected to quantization processing, whether the orthogonally transformed image is an intra-frame image or an inter-frame image, (1) the absolute value of the coefficient |Coef in the low frequency component region There are many distributions where | is large, and (
2) Many coefficients with small absolute values |Coef| are distributed in the high frequency component region. Therefore, it is often the orthogonal transform coefficient values belonging to the high frequency component region that are converted to the numerical value "0" after quantization.
【0033】フレーム内画像の直交変換係数の高域成分
が量子化により数値「0」となった場合、再生画像は画
像はボケた画像となる。If the high frequency component of the orthogonal transform coefficient of the intra-frame image becomes a numerical value "0" due to quantization, the reproduced image will be a blurred image.
【0034】フレーム間画像の直交変換係数の高域成分
が量子化により数値「0」となった場合、再生画像に「
モスキートノイズ」などの画質劣化が発生する。[0034] If the high-frequency component of the orthogonal transform coefficient of the interframe image becomes a numerical value "0" due to quantization, the reproduced image will contain "
Image quality deterioration such as "mosquito noise" occurs.
【0035】一方、量子化後の直交変換係数は第3図(
a)にしめすようにジグザグスキャンを用いて、係数値
「0」の連続する個数(ランレングス)と「0」でない
係数値の対(これを、「イベント」と呼ぶ)に分割し、
「イベント」単位に第3図(b)に示した可変長符号の
符号長表を用いて符号長を算出する。可変長符号は、発
生頻度の高いイベントには符号長の短い符号を割り当て
、発生頻度の低い符号には符号長の長い符号が割り当て
られている。従って、前記直交変換係数に対する数値変
換処理を行った場合に、1イベントが2イベント以上に
分割される為、2イベント以上の発生する符号量の合計
が増加し、再生画の画質が劣化する場合があり、そこで
本発明は、上記構成により量子化により発生すると考え
られるこれらの画質劣化を、直交変換係数を量子化する
前に、量子化後「0」となる直交変換係数について、各
直交変換係数の絶対値|Coef|と量子化ステップサ
イズQbを比較し、両者の差分が予め定めた閾値Th以
下の直交変換係数について、直交変換係数の絶対値|C
oef|を量子化ステップサイズとする数値変換を行う
ことにより、量子化後にある程度以上の大きさを持つ直
交変換係数が「0」となることを防止し、さらに、直交
変換係数の数値変換処理を行った結果発生した2イベン
ト以上の全発生符号量と、直交変換係数の数値変換処理
を行わないで発生する1イベントの発生符号量を比較し
、直交変換係数の数値変換処理により発生符号量が増加
しないように、直交変換係数の数値変換処理を行うか否
かを選択することで、発生符号量の増加を防ぎ、その結
果として、再生画像の画質向上を図るものであるOn the other hand, the orthogonal transform coefficients after quantization are shown in Figure 3 (
Using a zigzag scan as shown in a), divide into a continuous number of coefficient values ``0'' (run length) and a pair of coefficient values that are not ``0'' (this is called an ``event''),
The code length is calculated for each "event" using the variable length code code length table shown in FIG. 3(b). In a variable length code, a code with a short code length is assigned to an event that occurs frequently, and a code with a long code length is assigned to a code that occurs less frequently. Therefore, when numerical conversion processing is performed on the orthogonal transform coefficients, one event is divided into two or more events, so the total amount of code generated for two or more events increases, and the quality of the reproduced image may deteriorate. Therefore, the present invention solves the image quality deterioration that is thought to occur due to quantization by using the above configuration, before quantizing the orthogonal transform coefficients, each orthogonal transform coefficient is The absolute value of the coefficient |Coef| is compared with the quantization step size Qb, and for orthogonal transform coefficients for which the difference between the two is less than or equal to a predetermined threshold Th, the absolute value of the orthogonal transform coefficient |C
By performing numerical conversion using oef| as the quantization step size, it is possible to prevent orthogonal transform coefficients having a size larger than a certain level from becoming "0" after quantization, and furthermore, the numerical conversion process of orthogonal transform coefficients can be Compare the total generated code amount of 2 or more events that occurred as a result of this process with the generated code amount of one event that occurs without performing numerical conversion processing of orthogonal transform coefficients, and calculate the generated code amount by numerical conversion processing of orthogonal transform coefficients. By selecting whether or not to perform numerical conversion processing on the orthogonal transform coefficients, the amount of generated code is prevented from increasing, and as a result, the quality of the reproduced image is improved.
【0036】。[0036].
【実施例】以下、図1を参照しながら本発明の実施例に
ついて説明する。図1は本発明の一実施例に於ける動き
補償予測フレーム間符号化装置のブロック結線図である
。図1において、1は入力テレビジョン信号が入力する
入力端子、3は現フレームの符号化ブロックの画信号と
前フレームの再生画信号を比較して符号化ブロックの動
ベクトルと動き補償予測制御信号を算出する動ベクトル
算出部、4は現フレームと前フレームの再生画信号を蓄
積する画像メモリ部、7は前フレームの再生画信号に対
して動き補償予測する動き補償予測部、9は符号化する
ブロックをフレーム内符号化するかフレーム内符号化す
るかを判定するフレーム間・フレーム内判定部、11は
動き補償予測信号に対して2次元ローパスフィルタ処理
するループ内フィルタ部、13は符号化ブロックの原画
信号と予測信号の差分演算を行ない予測誤差を算出する
予測誤差算出部、15は符号化方式選択信号により、直
交変換する信号の選択と再生画像を算出するための信号
を選択するスイッチ部、17は直交変換する直交変換部
、19は直交変換係数を数値変換する直交変換係数変換
部、20は量子化ステップサイズを算出する量子化サイ
ズ算出部、23は数値変換された直交変換係数を量子化
する直交変換係数量子化部、25、29は直交変換係数
のイベント単位に符号長を算出するイベント符号化部、
27は数値変換しない直交変換係数を量子化する直交変
換係数量子化部、31は直交変換係数についてイベント
単位に発生符号量より数値変換したものを選ぶか否かを
決める発生符号量比較部、33は発生符号量比較部によ
り決定された選択信号によりイベント単位に直交変換量
子化係数を選択するスイッチ部、35は伝送フレーム形
式の情報を蓄積する符号メモリ部、37は直交変換量子
化係数を逆直交変換する逆直交変換部、41は現フレー
ムの再生画像を算出する再生画像算出部、43は符号化
方式選択信号、予測誤差、量子化ステップサイズを通信
路符号化する予測誤差符号化部、45は動ベクトルを通
信路符号化する動ベクトル符号化部、47は予測符号と
動ベクトル符号より伝送フレームを構成するマルチプレ
クサ部、50は伝送信号を出力する出力端子である。Embodiments Hereinafter, embodiments of the present invention will be described with reference to FIG. FIG. 1 is a block diagram of a motion compensated predictive interframe coding apparatus in an embodiment of the present invention. In FIG. 1, 1 is an input terminal into which an input television signal is input, and 3 is a motion vector of the coded block and a motion compensation prediction control signal by comparing the picture signal of the coded block of the current frame and the reproduced picture signal of the previous frame. 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 on the reproduced image signal of the previous frame; 9 is an encoding unit; 11 is an inter-frame/intra-frame determining unit that determines whether a block to be encoded is to be intra-frame encoded or intra-frame encoded; 11 is an intra-loop filter unit that performs two-dimensional low-pass filter processing on the motion-compensated prediction signal; 13 is an encoding unit; A prediction error calculation unit calculates a prediction error by calculating the difference between the original image signal and the prediction signal of the block, and 15 is a switch that selects a signal to be orthogonally transformed and a signal for calculating a reproduced image based on an encoding method selection signal. 17 is an orthogonal transformation unit that performs orthogonal transformation; 19 is an orthogonal transformation coefficient transformation unit that numerically transforms orthogonal transformation coefficients; 20 is a quantization size calculation unit that calculates a quantization step size; and 23 is an orthogonal transformation coefficient that has been numerically transformed. 25 and 29 are event encoding units that calculate code lengths for each event of orthogonal transform coefficients;
27 is an orthogonal transform coefficient quantization unit that quantizes orthogonal transform coefficients that are not numerically converted; 31 is a generated code amount comparison unit that determines whether or not to select numerically converted orthogonal transform coefficients from the generated code amount for each event; 33 3 is a switch unit that selects orthogonal transform quantization coefficients for each event based on the selection signal determined by the generated code amount comparison unit; 35 is a code memory unit that stores information on the transmission frame format; and 37 is a switch unit that inverts orthogonal transform quantization coefficients. an inverse orthogonal transform unit that performs orthogonal transformation; 41 is a reproduced image calculation unit that calculates a reproduced image of the current frame; 43 is a prediction error encoding unit that encodes the encoding method selection signal, prediction error, and quantization step size through channel coding; 45 is a motion vector encoding unit that encodes a motion vector through a channel; 47 is a multiplexer unit that configures a transmission frame from a prediction code and a motion vector code; and 50 is an output terminal that outputs a transmission signal.
【0037】以上のような構成において、以下その動作
を説明する。テレビジョン信号は図1に図示されていな
い信号処理部でアナログ・ディジタル変換され、水平方
向M画素、垂直方向Nラインのブロックに分割され、入
力端子1より入力テレビジョン信号2として入力する。
次に、動ベクトル算出部3は入力テレビジョン信号2と
、画像メモリ部4より読みだした前フレームの再生画像
5を比較し、動ベクトルを算出し、動ベクトル信号6に
出力する。同時に、動ベクトル算出部3は動ベクトル算
出時の評価値を用いて、符号化ブロックに対する動き補
償予測が有効か無効かを判定し、その結果を動き補償予
測制御情報として動ベクトル信号6に出力する。The operation of the above configuration will be explained below. The television signal is converted from analog to digital by a signal processing section not shown in FIG. Next, the motion vector calculation section 3 compares the input television signal 2 with the reproduced image 5 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 as motion compensation prediction control information to the motion vector signal 6. do.
【0038】動き補償予測部7は、符号化ブロックと同
一位置の前フレームの再生画像5に対し動ベクトル信号
6により動き補償予測する場合は動ベクトルで動き補償
予測し、動き補償予測しない場合は前フレームの再生画
像をそのまま動き補償予測信号8として出力する。The motion compensation prediction unit 7 performs motion compensation prediction using the motion vector when performing motion compensation prediction using the motion vector signal 6 on the reproduced image 5 of the previous frame at the same position as the encoded block, and when not performing motion compensation prediction. The reproduced image of the previous frame is output as is as a motion compensated prediction signal 8.
【0039】フレーム間・フレーム内判定部9は、ブロ
ック単位に入力テレビジョン信号2と動き補償予測信号
8を比較し、フレーム間予測の有効性を判定し、フレー
ム間予測の有効性が小さい場合は該当ブロックについて
フレーム内符号化が有効と判定し、フレーム間予測の有
効性が大きい場合は該当ブロックについてフレーム間符
号化が有効と判定し、その結果を符号化方式選択信号1
0として出力する。The inter-frame/intra-frame determining unit 9 compares the input television signal 2 and the motion compensated prediction signal 8 on a block-by-block basis, determines the effectiveness of inter-frame prediction, and determines if the effectiveness of inter-frame prediction is small. determines that intraframe coding is effective for the corresponding block, and if the effectiveness of interframe prediction is large, determines that interframe coding is effective for the corresponding block, and sends the result to coding method selection signal 1.
Output as 0.
【0040】ループ内フィルタ部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-compensated prediction signal 8 if the encoded block is a block to be predicted with motion compensation, and in other cases, performs in-loop filter processing on the motion-compensated prediction signal 8. The predicted signal 12 is output without being filtered.
【0041】予測誤差算出部13は、符号化ブロックの
入力テレビジョン信号2と予測信号12の差分演算を行
ない、その結果を予測誤差信号14として出力する。The prediction error calculation section 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.
【0042】スイッチ部15は、(1)符号化方式選択
信号10がフレーム内符号化を選択している場合には直
交変換する信号16として入力テレビジョン信号2を選
択し、(2)符号化方式選択信号10がフレーム間符号
化を選択している場合にはに直交変換する信号16とし
て予測誤差信号14を選択する。The switch section 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, and (2) selects the input television signal 2 as the signal 16 to be orthogonally transformed. When the method selection signal 10 selects interframe coding, the prediction error signal 14 is selected as the signal 16 to be orthogonally transformed.
【0043】直交変換部17は、直交変換する信号16
に対して直交変換を行ない、直交変換する信号16の近
傍画素間が持つ高い相関性を除去して、直交変換係数1
8を算出する。直交変換方式としては、多くの場合、高
い変換効率を持ち、ハードウェア化について実現性のあ
る離散コサイン変換が用いられる。The orthogonal transform unit 17 converts the signal 16 to be orthogonally transformed.
The high correlation between neighboring pixels of the signal 16 to be orthogonally transformed is removed, and the orthogonal transform coefficient 1 is
Calculate 8. As the orthogonal transform method, in many cases, discrete cosine transform is used, which has high transform efficiency and can be implemented in hardware.
【0044】直交変換係数変換部19は、直交変換係数
18の絶対値|Coef|と量子化ステップサイズ算出
部20が算出した量子化ステップサイズ21を比較し両
者の差分があらかじめ定めた閾値Thより大きくない場
合は、直交変換係数の絶対値|Coef|を量子化ステ
ップサイズQbとする数値変換を行い、数値変換した直
交変換係数22を算出する。つまり
とする。The orthogonal transform coefficient converting unit 19 compares the absolute value |Coef| of the orthogonal transform coefficient 18 with the quantization step size 21 calculated by the quantization step size calculating unit 20, and calculates the difference between the two from a predetermined threshold Th. If it is not large, numerical conversion is performed using the absolute value |Coef| of the orthogonal transformation coefficient as the quantization step size Qb, and the numerically transformed orthogonal transformation coefficient 22 is calculated. In other words.
【0045】第1の量子化部23は、量子化ステップサ
イズ21を用いて、数値変換した直交変換係数22を量
子化し、直交変換量子化係数24を算出する。The first quantizer 23 quantizes the numerically converted orthogonal transform coefficients 22 using the quantization step size 21 to calculate orthogonal transform quantized coefficients 24 .
【0046】第1のイベント符号化部25はブロック単
位に直交変換係数22を、[0046] The first event encoding unit 25 converts the orthogonal transform coefficients 22 in units of blocks into
【0047】[0047]
【表1】[Table 1]
【0048】に示したジグザグスキャンの順番に従って
走査し、直交変換係数をイベントに変換する。なお、(
表1)においては、直交変換係数(8*8)の走査順序
を示し、「1」より走査を始め、「64」で走査を完了
するものとする。次にイベント符号化部25は、各イベ
ントの符号長をScanning is performed in accordance with the zigzag scanning order shown in [0048] and the orthogonal transformation coefficients are converted into events. In addition,(
In Table 1), the scanning order of the orthogonal transform coefficients (8*8) is shown, and it is assumed that scanning starts at "1" and ends at "64". Next, the event encoding unit 25 determines the code length of each event.
【0049】[0049]
【表2】[Table 2]
【0050】に示した可変長符号の符号長表を用いて、
発生符号量26として算出する。なお、(表2)はイベ
ントの2次元ハフマン符号の符号長を示し、空欄は省略
している。Using the code length table of the variable length code shown in
It is calculated as the generated code amount 26. Note that (Table 2) shows the code length of the two-dimensional Huffman code of the event, and blank spaces are omitted.
【0051】同様にして、第2の量子化部27は、量子
化ステップサイズ21を用いて、数値変換していない直
交変換係数18を量子化し、直交変換量子化係数28を
算出する。Similarly, the second quantizer 27 uses the quantization step size 21 to quantize the orthogonal transform coefficients 18 that have not been numerically transformed, and calculates the orthogonal transform quantized coefficients 28.
【0052】第2のイベント符号化部29はブロック単
位に直交変換係数28を、(表1)に示したジグザグス
キャンの順番に従って走査し、直交変換係数をイベント
に変換する。次にイベント符号化部29は、各イベント
の符号長を(表2)に示した可変長符号の符号長表を用
いて、発生符号量30として算出する。The second event encoding unit 29 scans the orthogonal transform coefficients 28 block by block in accordance with the zigzag scan order shown in Table 1, and converts the orthogonal transform coefficients into events. Next, the event encoding unit 29 calculates the code length of each event as the generated code amount 30 using the variable length code code length table shown in (Table 2).
【0053】符号量比較部31は、直交変換係数の数値
変換処理を行わないイベントの発生符号量30と、直交
変換係数の数値変換処理を行ったイベントの発生符号量
26を比較し、発生符号量の少ないイベントを選択し、
イベント選択信号32を出力する。The code amount comparison unit 31 compares the generated code amount 30 of an event in which the orthogonal transform coefficients are not subjected to numerical conversion processing with the generated code amount 26 of an event in which the orthogonal transform coefficients are subjected to numerical conversion processing, and determines the generated code. Select low volume events,
An event selection signal 32 is output.
【0054】次に、Next,
【0055】[0055]
【表3】[Table 3]
【0056】[0056]
【表4】[Table 4]
【0057】に、イベント選択の例を示す。なお、(表
3)は数値変換しない直交変換係数を、(表4)は数値
変換した直交変換係数を示している。イベントを、(係
数「0」のランレングス、「0」でない係数の係数値)
で示した場合、(表3)に示した直交変換係数のイベン
トの一部は以下のようになる。An example of event selection is shown below. Note that (Table 3) shows orthogonal transformation coefficients that are not numerically converted, and (Table 4) shows orthogonal transformation coefficients that are numerically converted. event, (run length of coefficient "0", coefficient value of coefficient not "0")
In the case shown in (Table 3), some of the events of the orthogonal transformation coefficients shown in (Table 3) are as follows.
【0058】(3、1)、(1、2)、(0、2)、(
6、3)、・・・・・・・・・・(表3)に示した直交
変換係数を、数値変換した直交変換係数が(表4)のよ
うになった場合、そのイベントは以下のようになる。(3, 1), (1, 2), (0, 2), (
6, 3),...If the orthogonal transform coefficients shown in (Table 3) are numerically converted and the orthogonal transform coefficients become as shown in (Table 4), the event is as follows. It becomes like this.
【0059】(3、1)、(1、2)、(0、2)、(
2、1)、(3、3)、・・・・・・従って、直交変換
係数の数値変換によりイベント(6、3)が、イベント
(2、1)、(3、3)になる。そこで、イベント(j
,k)の発生符号量をm(j,k)としたとき、mは(
表2)に示した符号長表より以下のようになる。(3, 1), (1, 2), (0, 2), (
2, 1), (3, 3), etc. Therefore, the event (6, 3) becomes the events (2, 1), (3, 3) by the numerical transformation of the orthogonal transformation coefficients. Therefore, the event (j
, k), and m(j, k) is the generated code amount of (
From the code length table shown in Table 2), the code length is as follows.
【0060】m(6,3)=20bitm(2,1)=
5bit
m(3、3)=13bit
従って、
m(6,3)>m(2,1)+m(3,3)となるので
、数値変換したイベントを選択する。m(6,3)=20bitm(2,1)=
5 bits m (3, 3) = 13 bits Therefore, m (6, 3) > m (2, 1) + m (3, 3), so select the numerically converted event.
【0061】スイッチ部33は、イベント選択信号32
によりイベント信号を選択する。上記例の場合、イベン
ト(2、1)、(3、3)が選択され直交変換量子化係
数34とした出力される。The switch section 33 receives the event selection signal 32
Select the event signal by. In the case of the above example, events (2, 1) and (3, 3) are selected and output as orthogonal transform quantization coefficients 34.
【0062】量子化ステップサイズ21は、量子化ステ
ップサイズ算出部20で、符号メモリ部35内の符号残
留量36より、前記の従来例で記述した方式により求め
とものである。The quantization step size 21 is calculated by the quantization step size calculation section 20 from the code residual amount 36 in the code memory section 35 using the method described in the conventional example.
【0063】逆直交変換部37は、直交変換量子化係数
34を逆直交変換し、量子化誤差を含んだ信号38を算
出する。The inverse orthogonal transform unit 37 performs inverse orthogonal transform on the orthogonal transform quantization coefficients 34 to calculate a signal 38 containing a quantization error.
【0064】スイッチ部15は、(1)符号化方式選択
信号10がフレーム内符号化を選択している場合には再
生画像算出信号39として数値「0」信号40を選択し
、(2)符号化方式選択信号10がフレーム間符号化を
選択している場合にはに再生画像算出信号39として予
測信号12を選択する。The switch section 15 (1) selects the numerical value "0" signal 40 as the reproduced image calculation signal 39 when the encoding method selection signal 10 selects intraframe encoding, and (2) selects the numerical value "0" signal 40 as the reproduction image calculation signal 39. When the coding method selection signal 10 selects interframe coding, the prediction signal 12 is selected as the reproduced image calculation signal 39.
【0065】再生画像算出部41は量子化誤差を含んだ
信号38と再生画像算出信号39を加算し、符号化ブロ
ックの再生画像42を算出する。The reproduced image calculation unit 41 adds the signal 38 containing the quantization error and the reproduced image calculation signal 39 to calculate a reproduced image 42 of the encoded block.
【0066】画像メモリ4は現フレームの再生画像信号
42を蓄積し、前フレームの再生画像信号5を出力する
。The image memory 4 stores the reproduced image signal 42 of the current frame and outputs the reproduced image signal 5 of the previous frame.
【0067】予測誤差符号化部43は、符号化方式選択
信号10、量子化ステップサイズ21、直交変換量子化
係数34を符号化し、予測誤差符号44を算出する。The prediction error encoding unit 43 encodes the encoding method selection signal 10, the quantization step size 21, and the orthogonal transform quantization coefficient 34, and calculates the prediction error code 44.
【0068】動ベクトル符号化部45は動き補償予測し
たブロックの動ベクトル信号6を符号化し、動ベクトル
符号46を算出する。The motion vector encoding unit 45 encodes the motion vector signal 6 of the block subjected to motion compensation prediction and calculates a motion vector code 46.
【0069】マルチプレクサ部47は予測誤差符号44
と動ベクトル符号46より、所定の形式の伝送フレーム
48を算出する。The multiplexer unit 47 uses the prediction error code 44
A transmission frame 48 in a predetermined format is calculated from the motion vector code 46.
【0070】符号メモリ部35は伝送フレーム48を一
旦蓄積し、図示いていない外部より入力するのクロック
信号に同期して、伝送符号49として出力端子50より
、出力する。同時に、符号メモリ部35はメモリ内に残
留している符号量を残留符号量36として算出する。The code memory unit 35 temporarily stores the transmission frame 48 and outputs it from the output terminal 50 as a transmission code 49 in synchronization with a clock signal input from an external device (not shown). At the same time, the code memory unit 35 calculates the amount of codes remaining in the memory as the remaining code amount 36.
【0071】以上の説明から明らかなように本実施例に
よれば、直交変換係数の量子化時、量子化ステップサイ
ズより僅かに小さいため数値「0」に量子化されていた
直交変換係数が、量子化後残る直交変換係数の数値変換
処理と、直交変換係数の数値変換処理を行った結果発生
した2イベント以上の全発生符号量と、直交変換係数の
数値変換処理を行わないで発生する1イベントの発生符
号量を比較し、直交変換係数の数値変換処理により発生
符号量が増加しないように、直交変換係数の数値変換処
理を行うか否かを選択することで、発生符号量の増加を
防ぎ、その結果として、再生画像の画質向上を図るもの
である。As is clear from the above description, according to this embodiment, when the orthogonal transform coefficients are quantized, the orthogonal transform coefficients that were quantized to a numerical value of "0" because they were slightly smaller than the quantization step size are Numerical conversion processing of the orthogonal transform coefficients remaining after quantization, total amount of generated codes of 2 or more events that occur as a result of performing the numerical conversion processing of the orthogonal transform coefficients, and 1 that occurs without performing the numerical conversion processing of the orthogonal transform coefficients. By comparing the generated code amount of events and selecting whether or not to perform the numerical conversion process of the orthogonal transform coefficient, the increase in the generated code amount can be prevented so that the generated code amount does not increase due to the numerical conversion process of the orthogonal transform coefficient. As a result, the quality of reproduced images is improved.
【0072】[0072]
【発明の効果】以上のように本発明では、直交変換係数
を量子化する前に、量子化後「0」となる直交変換係数
について、各直交変換係数の絶対値値|Coef|と量
子化ステップサイズQbを比較し、両者の差分が予め定
めた閾値Th以下の直交変換係数について、直交変換係
数の絶対値|Coef|を量子化ステップサイズとする
数値変換を行うことにより、量子化後にある程度以上の
大きさを持つ直交変換係数が「0」となることを防止し
、直交変換係数の数値変換処理を行った結果発生した2
イベント以上の全発生符号量と、直交変換係数の数値変
換処理を行わないで発生する1イベントの発生符号量を
比較し、直交変換係数の数値変換処理により発生符号量
が増加しないように、直交変換係数の数値変換処理を行
うか否かを選択することで、発生符号量の増加を防ぐこ
とにより、再生画像の画質向上を図られ、その効果は大
きい。As described above, in the present invention, before quantizing orthogonal transform coefficients, for orthogonal transform coefficients that become "0" after quantization, the absolute value of each orthogonal transform coefficient |Coef| By comparing the step size Qb and performing numerical conversion using the absolute value |Coef| of the orthogonal transform coefficient as the quantization step size for orthogonal transform coefficients whose difference between the two is less than or equal to a predetermined threshold Th, it is possible to 2, which occurred as a result of numerical conversion processing of orthogonal transform coefficients, to prevent orthogonal transform coefficients with a size larger than 0 from becoming "0".
Compare the total amount of codes generated for an event or more with the amount of codes generated for one event that occurs without performing numerical conversion processing of orthogonal transform coefficients, and calculate the orthogonal By selecting whether or not to perform numerical conversion processing of the conversion coefficients, the image quality of the reproduced image can be improved by preventing an increase in the amount of generated codes, which has a large effect.
【図1】本発明の一実施例に於ける動き補償予測フレー
ム間符号化装置のブロック結線図FIG. 1 is a block diagram of a motion compensated predictive interframe coding device in an embodiment of the present invention.
【図2】従来の動き補償予測フレーム間符号化装置のブ
ロック結線図[Fig. 2] Block wiring diagram of a conventional motion compensated predictive interframe coding device
1、51 入力端子
3、53 動ベクトル算出部
4、54 画像メモリ部
7、58 動き補償予測部
9、60 フレーム内・フレーム間判定部11、62
ループ内フィルタ部
13、64 予測誤差算出部
15、33、66 スイッチ部
17、68 直交変換部
19 直交変換係数変換部
20、73 量子化ステップサイズ算出部23、27
、70 量子化部
25、29 イベント符号化部
31 符号量比較部
35、74 符号メモリ部
37、76 逆直交変換部
38、78 再生画像算出部
43、82 予測誤差符号化部
45、84 動ベクトル符号化部
47、86 マルチプレクサ部
50、89 出力端子1, 51 Input terminals 3, 53 Motion vector calculation units 4, 54 Image memory units 7, 58 Motion compensation prediction units 9, 60 Intra-frame/inter-frame determination units 11, 62
In-loop filter section 13, 64 Prediction error calculation section 15, 33, 66 Switch section 17, 68 Orthogonal transformation section 19 Orthogonal transformation coefficient transformation section 20, 73 Quantization step size calculation section 23, 27
, 70 quantization units 25, 29 event encoding unit 31 code amount comparison unit 35, 74 code memory unit 37, 76 inverse orthogonal transformation unit 38, 78 reproduced image calculation unit 43, 82 prediction error encoding unit 45, 84 motion vector Encoding section 47, 86 Multiplexer section 50, 89 Output terminal
Claims (1)
ディジタル信号へ変換するアナログディジタル変換手段
と、ディジタル化した入力テレビジョン信号の1フレー
ムまたは1フィールドを定められた大きさのブロックに
分割するブロック化手段と、個々のブロックについてテ
レビジョン画像の動きである動ベクトルを算出する動ベ
クトル算出手段と、個々のブロックについて前記動ベク
トルを用いて動き補償予測するか否かを判定する動き補
償判定手段と、動き補償予測するブロックについて、前
フレームの再生画像を動ベクトルで動き補償予測し、予
測画素値を算出する動き補償予測画素算出手段と、入力
テレビジョン信号の画素値と予測画素値との差分を予測
誤差値として算出する予測誤差算出手段と、個々のブロ
ックについて、フレーム間符号化するかフレーム内符号
化するかを判定する符号化方式判定手段と、ブロック毎
に前記フレーム内符号化・フレーム間符号化判定結果に
より直交変換する信号を、入力テレビジョン信号の画素
値とするか予測誤差値とするかを切り替える直交変換信
号選択手段と、入力テレビジョン信号の画素値または予
測誤差値を、直交変換し直交変換係数を算出する直交変
換手段と、発生符号量より量子化ステップサイズを算出
する量子化ステップサイズ算出手段と、個々の直交変換
係数を量子化ステップサイズと比較し、直交変換係数値
が予め定めた範囲以内で量子化後に0となる直交変換係
数について、該当する直交変換係数値を量子化ステップ
サイズまで数値変換する直交変換係数変換手段と、数値
変換処理した直交変換係数を含んだ全ての直交変換係数
を、量子化ステップサイズを用いて量子化する第1の直
交変換係数量子化手段と、前記数値変換処理し量子化し
た直交変換係数について、値が0である係数の連続する
個数と値が0でない係数の値を対とし、この対であるイ
ベントをイベント単位に符号化し、発生した符号量を算
出する第1のイベント符号量算出手段と、前記数値変換
処理をしない直交変換係数を、量子化ステップサイズを
用いて量子化する第2の直交変換係数量子化手段と、前
記量子化した直交変換係数について、イベント単位に符
号化し、発生符号量を算出する第2のイベント符号量算
出手段と、数値変換しない場合のイベント発生符号量と
、数値変換した場合に前記数値変換しない場合の前記イ
ベントの範囲内に内に発生する複数イベントの総発生符
号量を比較し、発生符号量の少ない方を算出するイベン
ト単位の発生符号量情報算出手段と、前記イベント単位
の発生符号量情報を用いて、前記第1の直交変換係数量
子化手段の出力と、前記第2の直行変換係数量子化手段
の出力のうち、発生符号量の少ない直交変換係数を選択
する選択手段と、フレーム内符号化かフレーム間符号化
かの情報と動ベクトル値と量子化ステップサイズと量子
化した直交変換係数を符号化する符号化手段と、量子化
した直交変換係数を逆直交変換し、逆量子化信号を算出
する逆直交変換手段と、前記フレーム間符号化・フレー
ム内符号化判定結果により再生画素値算出時に用いる画
素値を動き補償予測した予測画素値とするか、数値「0
」とするか切り替える再生画素選択手段と、予測画素値
または数値「0」と逆量子化信号より再生画像を算出す
る再生画素算出手段と、再生画像を蓄積する再生画素蓄
積手段とを具備した動き補償予測フレーム間符号化装置
。1. Analog-to-digital conversion means for converting a television signal from an analog signal to a digital signal, and blocking means for dividing one frame or one field of a digitized input television signal into blocks of a predetermined size. a motion vector calculation means for calculating a motion vector representing a motion of a television image for each block; a motion compensation determination means for determining whether or not to perform motion compensation prediction using the motion vector for each block; For a block to be predicted with motion compensation, a motion compensation prediction pixel calculation means that performs motion compensation prediction on the reproduced image of the previous frame using a motion vector and calculates a predicted pixel value, and a motion compensation prediction pixel calculation means that calculates a predicted pixel value, and a difference between the pixel value of the input television signal and the predicted pixel value. A prediction error calculation means for calculating a prediction error value; a coding method determination means for determining whether to perform interframe encoding or intraframe encoding for each block; orthogonal transform signal selection means for switching a signal to be orthogonally transformed as a pixel value of an input television signal or a prediction error value according to an encoding determination result; an orthogonal transform means for calculating an orthogonal transform coefficient; a quantization step size calculation means for calculating a quantization step size from the generated code amount; For orthogonal transform coefficients that become 0 after quantization within a predetermined range, an orthogonal transform coefficient converting means for numerically converting the corresponding orthogonal transform coefficient value to a quantization step size, and an orthogonal transform coefficient subjected to numerical conversion processing are included. a first orthogonal transform coefficient quantizer that quantizes all orthogonal transform coefficients using a quantization step size; and a first orthogonal transform coefficient quantizer that quantizes all orthogonal transform coefficients using a quantization step size; a first event code amount calculation means that pairs the number of events and the value of a coefficient whose value is not 0, encodes the events of this pair in event units, and calculates the generated code amount; and orthogonal transformation that does not perform the numerical conversion process. a second orthogonal transform coefficient quantizer that quantizes coefficients using a quantization step size; and a second event code that encodes the quantized orthogonal transform coefficients in units of events and calculates the amount of generated codes. The amount calculation means compares the amount of code generated by an event without numerical conversion, and the total amount of code generated for multiple events that occur within the range of the event without converting the numerical value, and calculates the generated code. The output of the first orthogonal transform coefficient quantization means and the second orthogonal transform are calculated by using the event-based generated code amount information calculation means that calculates the smaller amount, and the event-based generated code amount information. Selection means for selecting an orthogonal transform coefficient with a small amount of generated code from among the outputs of the coefficient quantization means, information on intra-frame coding or inter-frame coding, motion vector value, quantization step size, and quantized orthogonal An encoding means for encoding the transform coefficients, an inverse orthogonal transform means for performing inverse orthogonal transform on the quantized orthogonal transform coefficients and calculating an inverse quantized signal, and reproduction based on the interframe encoding/intraframe encoding determination result. Either set the pixel value used when calculating the pixel value as the predicted pixel value obtained by motion compensation prediction, or use the numerical value "0".
”; a reproduction pixel calculation means for calculating a reproduction image from a predicted pixel value or numerical value “0” and an inverse quantization signal; and reproduction pixel accumulation means for accumulating the reproduction image. Compensated predictive interframe coding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3019815A JPH04259182A (en) | 1991-02-13 | 1991-02-13 | Movement compensation prediction inter-frame coder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3019815A JPH04259182A (en) | 1991-02-13 | 1991-02-13 | Movement compensation prediction inter-frame coder |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04259182A true JPH04259182A (en) | 1992-09-14 |
Family
ID=12009823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3019815A Pending JPH04259182A (en) | 1991-02-13 | 1991-02-13 | Movement compensation prediction inter-frame coder |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04259182A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008503918A (en) * | 2004-06-18 | 2008-02-07 | トムソン ライセンシング | Method and apparatus for video codec quantization |
WO2009075107A1 (en) * | 2007-12-13 | 2009-06-18 | Panasonic Corporation | Image encoding device, encoding rate conversion device, video/audio stream recording device, network distribution system, coefficient conversion device, integrated circuit, and image encoding method |
JP2017046115A (en) * | 2015-08-25 | 2017-03-02 | Kddi株式会社 | Moving image encoding device, moving image decoding device, moving image processing system, moving image encoding method, moving image decoding method, and program |
JP2019110568A (en) * | 2019-02-15 | 2019-07-04 | Kddi株式会社 | Moving picture coding apparatus, moving picture processing system, moving picture coding method, and program |
-
1991
- 1991-02-13 JP JP3019815A patent/JPH04259182A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008503918A (en) * | 2004-06-18 | 2008-02-07 | トムソン ライセンシング | Method and apparatus for video codec quantization |
US8542731B2 (en) | 2004-06-18 | 2013-09-24 | Thomson Licensing | Method and apparatus for video codec quantization |
WO2009075107A1 (en) * | 2007-12-13 | 2009-06-18 | Panasonic Corporation | Image encoding device, encoding rate conversion device, video/audio stream recording device, network distribution system, coefficient conversion device, integrated circuit, and image encoding method |
JP2017046115A (en) * | 2015-08-25 | 2017-03-02 | Kddi株式会社 | Moving image encoding device, moving image decoding device, moving image processing system, moving image encoding method, moving image decoding method, and program |
WO2017033560A1 (en) * | 2015-08-25 | 2017-03-02 | Kddi株式会社 | Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, moving image decoding method, and program |
US10819988B2 (en) | 2015-08-25 | 2020-10-27 | Kddi Corporation | Moving image encoding apparatus, moving image decoding apparatus, moving image encoding method, moving image decoding method, and computer readable storage medium |
JP2019110568A (en) * | 2019-02-15 | 2019-07-04 | Kddi株式会社 | Moving picture coding apparatus, moving picture processing system, moving picture coding method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0595562B1 (en) | Method and apparatus for quantization and inverse-quantization of picture data | |
KR960006762B1 (en) | Efficient 2D Scan Selection Circuit for Image Coding | |
CN1124041C (en) | Method and apparatus for compensating quantization errors of decoded video image | |
KR100568649B1 (en) | Moving-picture decording apparatus and moving-picture decording method | |
JPH04259182A (en) | Movement compensation prediction inter-frame coder | |
EP0541287B1 (en) | Video signal coding apparatus and decoding apparatus | |
JP2629409B2 (en) | Motion compensated prediction interframe coding device | |
KR960012933B1 (en) | Motion image compression method and apparatus | |
HK1000792B (en) | Video signal coding apparatus and decoding apparatus | |
JPH04268891A (en) | Motion compensated predictive interframe coding device | |
JP3013602B2 (en) | Video signal encoding device | |
JPH04137985A (en) | Moving compensation prediction inter-frame coder | |
JPH04268890A (en) | Motion compensated predictive interframe coding device | |
JP3279927B2 (en) | Image encoding method and apparatus | |
KR19990061002A (en) | Data generation limiting device in block encoding for video compression | |
KR0134496B1 (en) | Mpeg coder using adaptive scan method | |
KR100221308B1 (en) | A device for eliminating blocking effects and a moving picture decoder using the device | |
JP2922155B2 (en) | Image encoding method, image encoding device, and image processing system | |
JP2629997B2 (en) | Motion compensated interframe coding device | |
KR100242832B1 (en) | Quantization Step Value Generator | |
JPH0761153B2 (en) | Motion compensation prediction interframe coding device | |
KR100230842B1 (en) | Block cancelation method and apparatus in moving picture decoder | |
JPH03127582A (en) | Movement compensation prediction inter-frame coder | |
JP2630022B2 (en) | Motion compensated interframe coding device | |
JPH03214989A (en) | Moving compensation prediction inter-frame coder |