JPH05207440A - Code quantity controller - Google Patents

Code quantity controller

Info

Publication number
JPH05207440A
JPH05207440A JP4014601A JP1460192A JPH05207440A JP H05207440 A JPH05207440 A JP H05207440A JP 4014601 A JP4014601 A JP 4014601A JP 1460192 A JP1460192 A JP 1460192A JP H05207440 A JPH05207440 A JP H05207440A
Authority
JP
Japan
Prior art keywords
circuit
sub
quantization
output
sampling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4014601A
Other languages
Japanese (ja)
Inventor
Yasuhiro Kikuchi
康弘 菊池
Kazufumi Mizusawa
和史 水澤
Akiyoshi Tanaka
章喜 田中
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 JP4014601A priority Critical patent/JPH05207440A/en
Publication of JPH05207440A publication Critical patent/JPH05207440A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the deterioration in picture quality due to a quantization error by sampling picture information of a macro block to be coded next when a quantization width reaches a large width so as to reduce the produced code quantity thereby keeping the quantization width to be small. CONSTITUTION:A DCT(discrete cosine transformation) circuit 12 transforms an output of a sub sample circuit 11 into a DCT coefficient and outputs the coefficient. A quantization circuit 13 applies weighting and quantization of an output of the DCT circuit 12 and outputs the result. The quantization is implemented by using a quantization width obtained by a quantization width control circuit 16. An output of the quantization circuit 13 is coded by a variable length coding circuit 14 and stored in a buffer 15. The buffer 15 outputs the stored code sequentially from a terminal 112. The quantization width control circuit 16 changes a quantization width used by the quantization circuit 13 based on a residual quantity of the buffer 15 to control the produced code quantity. A judging circuit 17 judges the method for sub sample control implemented by the sub sample circuit 11 depending on the quantization width obtained by the quantization width control circuit 16.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像の符号化に使用す
る符号量制御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a code amount control device used for image coding.

【0002】[0002]

【従来の技術】画像の符号化方式としては、例えば、動
画像符号化の国際標準化を推進するエム・ピー・イー・
ジー(MPEG)の符号化参照モデルであるSM3(I
SO−IEC/JTC1/SC2/WG11 N001
0 MPEG 90/041)があり、この中で符号量
制御装置が用いられている。
2. Description of the Related Art As an image encoding method, for example, MPE which promotes international standardization of moving image encoding
G3 (MPEG) coding reference model SM3 (I
SO-IEC / JTC1 / SC2 / WG11 N001
0 MPEG 90/041), in which a code amount control device is used.

【0003】以下、従来の符号量制御装置について説明
する。図10は従来の符号量制御装置の構成を示すもの
である。
A conventional code amount control device will be described below. FIG. 10 shows the configuration of a conventional code amount control device.

【0004】図10において、101はDCT(離散コ
サイン変換)を行うDCT回路であり、端子1101か
ら入力した画像情報をDCT係数に変換する。102は
量子化回路であり、DCT回路から出力したDCT係数
の重み付けと量子化を行う。103は可変長符号化回路
であり、量子化回路102の出力を符号化する。104
はバッファであり、可変長符号化回路103から出力さ
れた符号を格納し、端子1102から出力する。105
は量子化幅制御回路であり、バッファ104の残留量に
よって量子化幅を求める。
In FIG. 10, reference numeral 101 denotes a DCT circuit for performing DCT (discrete cosine transform), which converts image information input from a terminal 1101 into DCT coefficients. A quantization circuit 102 weights and quantizes the DCT coefficients output from the DCT circuit. Reference numeral 103 denotes a variable length coding circuit, which codes the output of the quantization circuit 102. 104
Is a buffer, which stores the code output from the variable length coding circuit 103 and outputs the code from the terminal 1102. 105
Is a quantization width control circuit, which obtains the quantization width based on the residual amount in the buffer 104.

【0005】以下、その符号量制御装置の動作を説明す
る。まず、端子1101から入力された画像情報は、ブ
ロック(8×8の小領域)毎にDCT回路101でDC
T係数に変換され、量子化回路102で重み付けと量子
化が行われる。量子化は、量子化幅制御回路105で求
めた量子化幅を用いて、図3(a)のように6個のブロ
ックで構成したマクロブロック毎に行われる。量子化回
路102で量子化されたDCT係数は、可変長符号化回
路103で符号化され、バッファ104に格納される。
バッファ104は、格納した符号を端子1102から順
次出力する。量子化幅制御回路105は、バッファ10
4の残留量によって量子化回路102で用いる量子化幅
を変化させ、発生符号量を制御する。すなわち、バッフ
ァ残留量が多いほど量子化幅を大きくして発生符号量を
減少させ、バッファ残留量が少ないほど量子化幅を小さ
くして発生符号量を増加させることにより、発生符号量
が目標符号量に近づくように制御する。
The operation of the code amount control device will be described below. First, the image information input from the terminal 1101 is processed by the DCT circuit 101 for each block (8 × 8 small area).
It is converted into a T coefficient, and the quantization circuit 102 performs weighting and quantization. The quantization is performed for each macroblock composed of 6 blocks as shown in FIG. 3A, using the quantization width obtained by the quantization width control circuit 105. The DCT coefficient quantized by the quantization circuit 102 is coded by the variable length coding circuit 103 and stored in the buffer 104.
The buffer 104 sequentially outputs the stored codes from the terminal 1102. The quantization width control circuit 105 includes the buffer 10
The amount of generated code is controlled by changing the quantization width used in the quantization circuit 102 according to the residual amount of 4. That is, the larger the buffer residual amount is, the larger the quantization width is to decrease the generated code amount, and the smaller the buffer residual amount is, the smaller the quantization width is to increase the generated code amount. Control to approach the quantity.

【0006】[0006]

【発明が解決しようとする課題】上記のような構成で
は、量子化幅のみを調整することによって発生符号量を
制御しているため、発生符号量が多いほど量子化幅が大
きくなる。したがって、量子化幅が大きくなり過ぎると
非常に大きな量子化誤差が発生し、画質劣化することが
課題であった。
In the above configuration, since the generated code amount is controlled by adjusting only the quantization width, the larger the generated code amount, the larger the quantization width. Therefore, if the quantization width becomes too large, a very large quantization error occurs and the image quality deteriorates.

【0007】本発明では上記の課題を解決するため、量
子化幅が大きな値になった場合、次に符号化するマクロ
ブロックの画像情報をサブサンプル制御する。このよう
に、量子化幅の調整だけでなくサブサンプルも行って発
生符号量を減少させ、量子化幅を小さな値に保つことに
より、量子化誤差による画質劣化の少ない符号量制御装
置を提供することを目的とする。
In order to solve the above problem, the present invention controls the sub-sampling of the image information of the macroblock to be coded next when the quantization width has a large value. As described above, by performing not only the adjustment of the quantization width but also the sub-sampling to reduce the generated code amount and keep the quantization width at a small value, a code amount control device with less image quality deterioration due to quantization error is provided. The purpose is to

【0008】[0008]

【課題を解決するための手段】上記の目的を達成するた
め、本発明の符号量制御装置は、画像情報をマクロブロ
ック毎にサブサンプル制御するサブサンプル回路と、上
記サブサンプル回路でサブサンプル制御した画像情報の
ブロックサイズに応じて上記サブサンプル回路の出力を
DCT係数に変換するDCT回路と、上記DCT回路の
出力の重み付けと量子化を行う量子化回路と、上記量子
化回路の出力を符号化する可変長符号化回路と、上記可
変長符号化回路の出力を格納したバッファの残留量によ
って次に符号化するマクロブロックの量子化幅を求める
量子化幅制御回路と、上記量子化幅制御回路で求めた量
子化幅により、上記サブサンプル回路で行うサブサンプ
ル制御の方法を判定する判定回路とを設けたものであ
る。
In order to achieve the above object, a code amount control apparatus of the present invention comprises a sub-sampling circuit for sub-sampling image information for each macroblock, and a sub-sampling control by the sub-sampling circuit. A DCT circuit for converting the output of the sub-sampling circuit into a DCT coefficient according to the block size of the image information, a quantizing circuit for weighting and quantizing the output of the DCT circuit, and an output of the quantizing circuit A variable length coding circuit for encoding, a quantization width control circuit for obtaining a quantization width of a macroblock to be coded next based on the residual amount of a buffer storing the output of the variable length coding circuit, and the quantization width control A determination circuit for determining the method of sub-sampling control performed by the sub-sampling circuit is provided based on the quantization width obtained by the circuit.

【0009】[0009]

【作用】本発明は、この構成により、量子化幅が大きな
値になった場合、次に符号化するマクロブロックの画像
情報をサブサンプルして発生符号量を減少させる。よっ
て、量子化幅を小さな値に保ち、量子化誤差による画質
劣化が低減できる。
According to the present invention, when the quantization width has a large value, the present invention reduces the generated code amount by sub-sampling the image information of the macroblock to be coded next. Therefore, the quantization width can be kept at a small value, and the deterioration in image quality due to the quantization error can be reduced.

【0010】[0010]

【実施例】図1は本発明の一実施例における符号量制御
装置の構成図である。図1において、11はサブサンプ
ル回路であり、端子111から画像情報を入力し、サブ
サンプル制御する。12はDCT回路であり、サブサン
プル回路11の出力をDCT係数に変換する。13は量
子化回路であり、DCT回路12から出力されたDCT
係数の重み付けと量子化を行う。14は可変長符号化回
路であり、量子化回路13の出力を符号化する。15は
バッファであり、可変長符号化回路14から出力された
符号を格納し、端子112から出力する。16は量子化
幅制御回路であり、バッファ15の残留量によって次に
符号化するマクロブロックの量子化幅を求める。17は
判定回路であり、量子化幅制御回路16で求めた量子化
幅によってサブサンプル回路11で行うサブサンプル制
御の方法を判定する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram of a code amount control device in an embodiment of the present invention. In FIG. 1, reference numeral 11 is a sub-sampling circuit, which inputs image information from a terminal 111 and performs sub-sampling control. Reference numeral 12 is a DCT circuit, which converts the output of the sub-sampling circuit 11 into DCT coefficients. Reference numeral 13 is a quantization circuit, which is the DCT output from the DCT circuit 12.
Coefficient weighting and quantization. Reference numeral 14 is a variable length coding circuit, which codes the output of the quantization circuit 13. A buffer 15 stores the code output from the variable-length coding circuit 14 and outputs the code from the terminal 112. Reference numeral 16 is a quantization width control circuit, which determines the quantization width of the macroblock to be coded next based on the remaining amount in the buffer 15. A determination circuit 17 determines the sub-sampling control method performed by the sub-sampling circuit 11 based on the quantization width obtained by the quantization width control circuit 16.

【0011】以下、図1の符号量制御装置の動作を説明
する。まず、サブサンプル回路11は、判定回路17の
判定結果により、端子111から入力した画像情報を図
3(a)に示すマクロブロック毎にサブサンプル制御
し、出力する。DCT回路12は、判定回路17の判定
結果により、サブサンプル回路11でサブサンプル制御
した画像情報のブロックサイズに応じてサブサンプル回
路11の出力をDCT係数に変換し、出力する。量子化
回路13は、DCT回路12の出力の重み付けと量子化
を行い、出力する。量子化は、量子化幅制御回路16で
求めた量子化幅を用いて行う。量子化回路13の出力
は、可変長符号化回路14で符号化され、バッファ15
に格納される。バッファ15は、格納した符号を端子1
12から順次出力する。量子化幅制御回路16は、バッ
ファ15の残留量によって、量子化回路13で用いる量
子化幅を変化させ、発生符号量を制御する。判定回路1
7は、量子化幅制御回路16で求めた量子化幅によって
サブサンプル回路11で行うサブサンプル制御の方法を
判定する。
The operation of the code amount control device of FIG. 1 will be described below. First, the sub-sampling circuit 11 performs sub-sampling control of the image information input from the terminal 111 for each macroblock shown in FIG. 3A according to the determination result of the determination circuit 17, and outputs it. The DCT circuit 12 converts the output of the sub-sampling circuit 11 into a DCT coefficient according to the block size of the image information subjected to the sub-sampling control by the sub-sampling circuit 11 according to the determination result of the determination circuit 17, and outputs the DCT coefficient. The quantization circuit 13 weights and quantizes the output of the DCT circuit 12, and outputs the weighted and quantized signal. The quantization is performed using the quantization width obtained by the quantization width control circuit 16. The output of the quantization circuit 13 is coded by the variable length coding circuit 14 and is output to the buffer 15
Stored in. The buffer 15 stores the stored code in the terminal 1
It outputs sequentially from 12. The quantization width control circuit 16 changes the quantization width used in the quantization circuit 13 according to the remaining amount of the buffer 15, and controls the generated code amount. Judgment circuit 1
Reference numeral 7 determines the sub-sampling control method performed by the sub-sampling circuit 11 based on the quantization width obtained by the quantization width control circuit 16.

【0012】以上が本実施例における動作の流れであ
る。次に、上記判定回路17の動作を説明する。大きな
量子化幅で量子化を行うと、量子化誤差によって画質が
劣化するため、サブサンプルして発生符号量を減少さ
せ、量子化幅を小さくする必要がある。しかし、サブサ
ンプル率が小さいと、発生符号量が減少しないために量
子化誤差によって画質が劣化し、サブサンプル率が大き
いと、標本化点が少なくなるためにかえって解像度の低
下による画質劣化が目立つ。したがって、量子化幅に応
じてサブサンプル率を変更する必要があるため、上記判
定回路17は、量子化幅によって上記サブサンプル回路
で行うサブサンプル制御の方法を判定する。
The above is the flow of the operation in this embodiment. Next, the operation of the judgment circuit 17 will be described. If the quantization is performed with a large quantization width, the image quality is deteriorated due to the quantization error. Therefore, it is necessary to reduce the generated code amount by sub-sampling and reduce the quantization width. However, when the sub-sampling rate is small, the generated code amount does not decrease and the image quality deteriorates due to the quantization error. When the sub-sampling rate is large, the sampling points decrease and the image quality deteriorates due to the lower resolution. .. Therefore, since it is necessary to change the sub-sampling rate according to the quantization width, the determination circuit 17 determines the sub-sampling control method performed by the sub-sampling circuit according to the quantization width.

【0013】すなわち、上記量子化幅制御回路で求めた
量子化幅をQs、あらかじめ設定した閾値をT1、T2
(T1<T2)とすると、上記判定回路は、Qs≦T1の場
合は「サブサンプルなし」、T1<Qs≦T2の場合は
「水平サブサンプル」、T2<Qsの場合は「水平・垂直
サブサンプル」と判定する。上記サブサンプル回路が入
力した画像情報の値が0〜255のとき、閾値は、例え
ばT1=30、T2=50とする。
That is, the quantization width obtained by the quantization width control circuit is Qs, and the preset thresholds are T1 and T2.
If (T1 <T2), the above determination circuit determines that “no subsample” when Qs ≦ T1, “horizontal subsample” when T1 <Qs ≦ T2, and “horizontal / vertical subsample” when T2 <Qs. "Sample". When the value of the image information input by the sub-sampling circuit is 0 to 255, the threshold values are, for example, T1 = 30 and T2 = 50.

【0014】以下、上記サブサンプル回路11について
説明する。図2は、本実施例のサブサンプル回路11の
構成を示すものである。
The sub-sampling circuit 11 will be described below. FIG. 2 shows the configuration of the sub-sampling circuit 11 of this embodiment.

【0015】図2において、21は水平サブサンプル回
路であり、端子121から入力した画像情報を水平方向
にサブサンプルする。22は垂直サブサンプル回路であ
り、水平サブサンプル回路21の出力を垂直方向にサブ
サンプルする。23は選択回路であり、水平サブサンプ
ル回路の入力、水平サブサンプル回路の出力、垂直サブ
サンプル回路の出力の3つの画像情報の中から1つの画
像情報を選択して出力する。
In FIG. 2, reference numeral 21 is a horizontal sub-sampling circuit, which sub-samples the image information input from the terminal 121 in the horizontal direction. A vertical sub-sampling circuit 22 sub-samples the output of the horizontal sub-sampling circuit 21 in the vertical direction. Reference numeral 23 denotes a selection circuit, which selects and outputs one image information from the three image information of the input of the horizontal sub-sampling circuit, the output of the horizontal sub-sampling circuit, and the output of the vertical sub-sampling circuit.

【0016】以下、図2のサブサンプル回路11の動作
を説明する。水平サブサンプル回路21は、図3(a)
のように構成された1マクロブロックの画像情報を端子
121から入力して水平方向にサブサンプルし、図3
(b)のような画像情報を出力する。水平サブサンプル
回路21の出力は、さらに垂直サブサンプル回路22で
垂直方向にサブサンプルされ、図3(c)のようにな
る。選択回路23は、サブサンプルしていない画像情
報、水平サブサンプル回路21で水平方向にサブサンプ
ルした画像情報、水平サブサンプル回路21と垂直サブ
サンプル回路22で水平・垂直方向にサブサンプルした
画像情報の3つの画像情報の中から、端子122より入
力した上記判定回路の判定結果に応じて1つの画像情報
を選択し、端子123から出力する。選択回路23が出
力する画像情報は、端子122から入力した上記判定回
路の判定結果が「サブサンプルなし」の場合は水平サブ
サンプル回路21の入力であり、「水平サブサンプル」
の場合は水平サブサンプル回路21の出力であり、「水
平・垂直サブサンプル」の場合には垂直サブサンプル回
路22の出力である。
The operation of the sub-sampling circuit 11 shown in FIG. 2 will be described below. The horizontal sub-sampling circuit 21 is shown in FIG.
The image information of one macro block configured as shown in FIG.
The image information as shown in (b) is output. The output of the horizontal sub-sampling circuit 21 is further sub-sampled in the vertical direction by the vertical sub-sampling circuit 22 and becomes as shown in FIG. The selection circuit 23 includes image information that is not subsampled, image information that is horizontally subsampled by the horizontal subsample circuit 21, and image information that is horizontally and vertically subsampled by the horizontal subsample circuit 21 and the vertical subsample circuit 22. One of the three image information is selected according to the determination result of the determination circuit input from the terminal 122, and is output from the terminal 123. The image information output by the selection circuit 23 is the input of the horizontal sub-sampling circuit 21 when the determination result of the determination circuit input from the terminal 122 is “no sub-sampling”, and “horizontal sub-sampling”.
In the case of, the output is from the horizontal sub-sampling circuit 21, and in the case of "horizontal / vertical sub-sampling," it is the output from the vertical sub-sampling circuit 22.

【0017】図4は、上記水平サブサンプル回路21の
構成を示すものである。図4において、41は遅延素子
であり、端子141から入力した画像情報を1画素遅延
させる。42は加算器であり、端子141から入力した
画像情報と遅延素子41が出力した画像情報を加算す
る。43は係数乗算器であり、加算器42の出力に0.
5を掛ける。44は間引き回路であり、係数乗算器43
の出力を1画素おきに間引いて端子142から出力す
る。
FIG. 4 shows the configuration of the horizontal sub-sampling circuit 21. In FIG. 4, reference numeral 41 denotes a delay element, which delays the image information input from the terminal 141 by one pixel. An adder 42 adds the image information input from the terminal 141 and the image information output from the delay element 41. 43 is a coefficient multiplier, and the output of the adder 42 is 0.
Multiply by 5. 44 is a thinning circuit, which is a coefficient multiplier 43.
Output is thinned out every other pixel and output from the terminal 142.

【0018】したがって、上記水平サブサンプル回路2
1は、図3(a)に示すマクロブロック構造の画像情報
を端子141から入力し、加算器42及び係数乗算器4
3で2画素毎に平均して出力する。係数乗算器43の出
力は間引き回路44で1画素おきに間引かれ、図3
(b)に示すマクロブロック構造の画像情報が端子14
2から出力される。
Therefore, the horizontal sub-sampling circuit 2
1 receives the image information of the macroblock structure shown in FIG. 3A from the terminal 141, and the adder 42 and the coefficient multiplier 4
At 3, the average is output for every two pixels. The output of the coefficient multiplier 43 is decimated by the decimating circuit 44 every other pixel.
The image information of the macroblock structure shown in FIG.
It is output from 2.

【0019】図5は、上記垂直サブサンプル回路22の
構成を示すものである。図5において、51はメモリで
あり、上記水平サブサンプル回路の出力を端子151か
ら入力してブロック毎に格納し、図6(a)のような番
号順で出力する。52は遅延素子であり、メモリ51か
ら出力された画像情報を1画素遅延させる。53は加算
器であり、メモリ51から出力された画像情報と遅延素
子52から出力された画像情報を加算する。54は係数
乗算器であり、加算器53の出力に0.5を掛ける。5
5は間引き回路であり、係数乗算器54の出力を1画素
おきに間引いて出力する。56はメモリであり、間引き
回路55から出力された画像情報を格納し、図6(b)
のような番号順で端子152から出力する。
FIG. 5 shows the configuration of the vertical sub-sampling circuit 22. In FIG. 5, reference numeral 51 is a memory, which inputs the output of the horizontal sub-sampling circuit from the terminal 151, stores it in each block, and outputs it in the numerical order as shown in FIG. A delay element 52 delays the image information output from the memory 51 by one pixel. An adder 53 adds the image information output from the memory 51 and the image information output from the delay element 52. A coefficient multiplier 54 multiplies the output of the adder 53 by 0.5. 5
A thinning circuit 5 thins out the output of the coefficient multiplier 54 every other pixel and outputs the thinned output. Reference numeral 56 denotes a memory, which stores the image information output from the thinning circuit 55, and is shown in FIG.
The numbers are output from the terminal 152 in the order of numbers.

【0020】したがって、上記垂直サブサンプル回路2
2は、上記水平サブサンプル回路の出力を端子151か
ら入力し、加算器53及び係数乗算器54で垂直方向に
2画素づつ平均して出力する。係数乗算器54の出力は
間引き回路55で1画素おきに間引かれ、図3(c)に
示すマクロブロック構造の画像情報が端子152から出
力される。
Therefore, the vertical sub-sampling circuit 2 described above is used.
2, the output of the horizontal sub-sampling circuit is input from the terminal 151, and the adder 53 and the coefficient multiplier 54 average and output every two pixels in the vertical direction. The output of the coefficient multiplier 54 is thinned out every other pixel by the thinning circuit 55, and the image information of the macroblock structure shown in FIG.

【0021】次に、本実施例のDCT回路12の動作を
説明する。図7は上記DCT回路12の構成を示すもの
である。71は切り換え回路であり、端子171から入
力した画像情報の出力先をブロックサイズによって切り
換える。72は8×8DCT回路であり、8×8のDC
Tを行う。73は4×8DCT回路であり、4×8のD
CTを行う。74は4×4DCT回路であり、4×4の
DCTを行う。
Next, the operation of the DCT circuit 12 of this embodiment will be described. FIG. 7 shows the configuration of the DCT circuit 12. A switching circuit 71 switches the output destination of the image information input from the terminal 171 depending on the block size. 72 is an 8x8 DCT circuit, which is an 8x8 DC
Do T. 73 is a 4 × 8 DCT circuit, which is a 4 × 8 D
Perform CT. A 4 × 4 DCT circuit 74 performs 4 × 4 DCT.

【0022】図3のように、輝度(Y)のブロックサイ
ズはサブサンプルを行ったかどうかにかかわらず8×8
である。しかし、色差(Pb、Pr)のブロックサイズ
は、上記判定回路で「サブサンプルなし」と判定された
場合は8×8であり、「水平サブサンプル」と判定され
た場合は4×8であり、「水平・垂直サブサンプル」と
判定された場合は4×4である。したがって、切り換え
回路71は、端子172から入力した上記判定回路17
の判定結果により、端子171から入力した画像情報の
DCTを行う回路を切り換え、ブロックサイズに応じた
DCTを行う。すなわち、輝度の画像情報、または上記
判定回路17で「サブサンプルなし」と判定された色差
の画像情報は8×8のDCTを行い、「水平サブサンプ
ル」と判定された色差の画像情報は4×8のDCTを行
い、「水平垂直サブサンプル」と判定された色差の画像
情報は4×4のDCTを行う。このようにして、上記サ
ブサンプル回路11から出力された画像情報は、ブロッ
クサイズに応じてDCTされ、端子173から出力され
る。
As shown in FIG. 3, the block size of luminance (Y) is 8 × 8 regardless of whether sub-sampling is performed or not.
Is. However, the block size of the color difference (Pb, Pr) is 8 × 8 when the determination circuit determines “no sub-sample” and 4 × 8 when the “horizontal sub-sample” is determined. , 4 × 4 when it is determined to be “horizontal / vertical subsample”. Therefore, the switching circuit 71 uses the determination circuit 17 input from the terminal 172.
According to the determination result of (1), the circuit that performs DCT of the image information input from the terminal 171 is switched to perform DCT according to the block size. That is, 8 × 8 DCT is performed on the luminance image information or the color difference image information determined as “no sub-sample” by the determination circuit 17, and the color difference image information determined as “horizontal sub-sample” is 4 × 8. The DCT of × 8 is performed, and the image information of the color difference determined as the “horizontal / vertical subsample” is subjected to 4 × 4 DCT. In this way, the image information output from the sub-sampling circuit 11 is DCT according to the block size and output from the terminal 173.

【0023】次に、本実施例の可変長符号化回路14の
動作を説明する。図8は上記可変長符号化回路14の構
成を示すものである。81〜83はテーブルであり、そ
れぞれ図9(a)〜(c)のようにジグザグスキャンの
順番を示す情報が格納されている。84は切り換え回路
であり、端子182から入力した上記判定回路の判定結
果と端子181から入力した上記量子化回路の出力によ
り、ブロックサイズに応じてテーブル81〜83の中か
ら1つのテーブルを選択し、出力する。85は符号化器
であり、上記量子化回路の出力を端子181から入力
し、符号化して端子183から出力する。
Next, the operation of the variable length coding circuit 14 of this embodiment will be described. FIG. 8 shows the configuration of the variable length coding circuit 14. Reference numerals 81 to 83 denote tables, which respectively store information indicating the order of zigzag scanning as shown in FIGS. A switching circuit 84 selects one of the tables 81 to 83 according to the block size according to the determination result of the determination circuit input from the terminal 182 and the output of the quantization circuit input from the terminal 181. ,Output. Reference numeral 85 denotes an encoder, which inputs the output of the quantizing circuit from a terminal 181, encodes it, and outputs it from a terminal 183.

【0024】上記判定回路17の判定結果によって色差
(Pb、Pr)のブロックサイズが異なるため、切り換え
回路84はブロックサイズに応じてジグザグスキャンの
順番を示すテーブルを選択し、符号器85に出力する。
すなわち、符号化器85は、輝度または上記判定回路で
「サブサンプルなし」と判定された色差を入力した場合
はテーブル81を選択し、「水平サブサンプル」と判定
された色差を入力した場合はテーブル82を選択し、
「水平垂直サブサンプル」と判定された色差を入力した
場合はテーブル83を選択する。
Since the block size of the color difference (Pb, Pr) differs depending on the determination result of the determination circuit 17, the switching circuit 84 selects a table indicating the order of zigzag scanning according to the block size and outputs it to the encoder 85. ..
That is, the encoder 85 selects the table 81 when the chrominance determined as "no subsample" by the luminance or the above determination circuit is input, and when the chrominance determined as "horizontal subsample" is input. Select table 82,
When the color difference determined as “horizontal / vertical subsample” is input, the table 83 is selected.

【0025】以上の構成により、量子化幅が大きくなっ
た場合はサブサンプルして発生符号量を減少させる。こ
のようにして量子化幅を小さな値に保ち、量子化誤差に
よる画質劣化を低減する。
With the above configuration, when the quantization width becomes large, sub-sampling is performed to reduce the generated code amount. In this way, the quantization width is kept at a small value and image quality deterioration due to quantization error is reduced.

【0026】なお、復号化する場合は、上記サブサンプ
ル回路11がマクロブロック毎に行ったサブサンプル制
御の方法を量子化幅によって判定する判定回路17を設
け、その判定結果によってDCT回路12と同様にブロ
ックサイズに応じた逆DCTを行う。また、サブサンプ
ルされたマクロブロックは、上記判定回路17の判定結
果に応じて補間する。すなわち、水平サブサンプルが行
われた場合、水平方向の画素間を補間し、水平・垂直サ
ブサンプルが行われた場合、さらにライン間の画素を補
間する。補間は、線形補間法などを用いる。このように
サブサンプルされたマクロブロックを補間することによ
り、画像が再生できる。
In the case of decoding, a determination circuit 17 for determining the method of sub-sampling control performed by the sub-sampling circuit 11 for each macroblock based on the quantization width is provided, and the determination result is similar to that of the DCT circuit 12. Inverse DCT is performed according to the block size. Further, the sub-sampled macroblock is interpolated according to the determination result of the determination circuit 17. That is, when horizontal sub-sampling is performed, pixels between pixels in the horizontal direction are interpolated, and when horizontal / vertical sub-sampling is performed, pixels between lines are further interpolated. The interpolation uses a linear interpolation method or the like. An image can be reproduced by interpolating the sub-sampled macroblocks.

【0027】[0027]

【発明の効果】以上のように本発明は、量子化幅が大き
くなった場合はサブサンプルして発生符号量を減少さ
せ、量子化幅を小さな値に保つことによって画質劣化の
少ない符号量制御装置を実現するものである。
As described above, according to the present invention, when the quantization width becomes large, sub-sampling is performed to reduce the generated code amount, and the quantization width is maintained at a small value to control the code amount with less image quality deterioration. It realizes the device.

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

【図1】本発明の一実施例における符号量制御装置のブ
ロック結線図
FIG. 1 is a block connection diagram of a code amount control device according to an embodiment of the present invention.

【図2】同符号量制御装置の要部であるサブサンプル回
路のブロック結線図
FIG. 2 is a block connection diagram of a sub-sampling circuit which is a main part of the same code amount control device.

【図3】同符号量制御装置のマクロブロック構造の概念
FIG. 3 is a conceptual diagram of a macroblock structure of the same code amount control device.

【図4】同符号量制御装置の要部である水平サブサンプ
ル回路のブロック結線図
FIG. 4 is a block connection diagram of a horizontal sub-sampling circuit, which is a main part of the same code amount control device.

【図5】同符号量制御装置の要部である垂直サブサンプ
ル回路のブロック結線図
FIG. 5 is a block connection diagram of a vertical sub-sampling circuit which is a main part of the same code amount control device.

【図6】同符号量制御装置の要部である垂直サブサンプ
ル回路の画像情を出力の順番を示した概念図
FIG. 6 is a conceptual diagram showing the order of outputting image information of a vertical sub-sampling circuit which is a main part of the same code amount control device.

【図7】同符号量制御装置の要部であるDCT回路のブ
ロック結線図
FIG. 7 is a block connection diagram of a DCT circuit which is a main part of the same code amount control device.

【図8】同符号量制御装置の要部である可変長符号化回
路のブロック結線図
FIG. 8 is a block connection diagram of a variable length coding circuit which is a main part of the same code amount control device.

【図9】同符号量制御装置の要部である可変長符号化回
路のジグザグスキャンの順番の概念図
FIG. 9 is a conceptual diagram of a zigzag scan order of a variable length coding circuit which is a main part of the same code amount control device.

【図10】従来の符号量制御装置のブロック結線図FIG. 10 is a block connection diagram of a conventional code amount control device.

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

11 サブサンプル回路 12 DCT回路 13 量子化回路 14 可変長符号化回路 15 バッファ 16 量子化幅制御回路 17 判定回路 111、112 端子 21 水平サブサンプル回路 22 垂直サブサンプル回路 23 選択回路 121、122、123 端子 41 遅延回路 42 加算器 43 係数乗算器 44 間引き回路 141、142 端子 51 メモリ 52 遅延回路 53 加算器 54 係数乗算器 55 間引き回路 56 メモリ 151、152 端子 71 切り換え回路 72 8×8DCT回路 73 4×8DCT回路 74 4×4DCT回路 171、172、173 端子 81〜83 テーブル 84 切り換え回路 85 符号化器 181、182、183 端子 101 DCT回路 102 量子化回路 103 可変長符号化回路 104 バッファ 105 量子化幅制御回路 1101、1102 端子 11 sub-sampling circuit 12 DCT circuit 13 quantizing circuit 14 variable-length coding circuit 15 buffer 16 quantizing width control circuit 17 determination circuit 111, 112 terminal 21 horizontal sub-sampling circuit 22 vertical sub-sampling circuit 23 selection circuits 121, 122, 123 Terminal 41 Delay circuit 42 Adder 43 Coefficient multiplier 44 Decimation circuit 141, 142 Terminal 51 Memory 52 Delay circuit 53 Adder 54 Coefficient multiplier 55 Decimation circuit 56 Memory 151, 152 Terminal 71 Switching circuit 722 8 × 8 DCT circuit 734 × 8 DCT circuit 74 4 × 4 DCT circuit 171, 172, 173 terminals 81-83 table 84 switching circuit 85 encoder 181, 182, 183 terminal 101 DCT circuit 102 quantization circuit 103 variable length encoding circuit 104 buffer 10 Quantization width control circuit 1101 and 1102 terminals

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 画像情報をマクロブロック毎にサブサン
プル制御するサブサンプル回路と、上記サブサンプル回
路でサブサンプル制御した画像情報のブロックサイズに
応じて上記サブサンプル回路の出力を離散コサイン変換
係数に変換する離散コサイン変換回路と、上記離散コサ
イン変換回路の出力の重み付けと量子化を行う量子化回
路と、上記量子化回路の出力を符号化する可変長符号化
回路と、上記可変長符号化回路の出力を格納したバッフ
ァの残留量によって次に符号化するマクロブロックの量
子化幅を求める量子化幅制御回路と、上記量子化幅制御
回路で求めた量子化幅により、上記サブサンプル回路で
行うサブサンプル制御の方法を判定する判定回路とを備
える符号量制御装置。
1. A sub-sampling circuit for sub-sampling control of image information for each macro block, and an output of the sub-sampling circuit into a discrete cosine transform coefficient according to a block size of image information sub-sampled by the sub-sampling circuit. A discrete cosine transform circuit for converting, a quantizing circuit for weighting and quantizing the output of the discrete cosine transform circuit, a variable length coding circuit for coding the output of the quantizing circuit, and the variable length coding circuit. Is performed by the sub-sampling circuit according to the quantization width control circuit that obtains the quantization width of the macroblock to be encoded next based on the residual amount of the buffer that stores the output of the output and the quantization width that is obtained by the quantization width control circuit. A code amount control device comprising a determination circuit for determining a sub-sampling control method.
JP4014601A 1992-01-30 1992-01-30 Code quantity controller Pending JPH05207440A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4014601A JPH05207440A (en) 1992-01-30 1992-01-30 Code quantity controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4014601A JPH05207440A (en) 1992-01-30 1992-01-30 Code quantity controller

Publications (1)

Publication Number Publication Date
JPH05207440A true JPH05207440A (en) 1993-08-13

Family

ID=11865715

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4014601A Pending JPH05207440A (en) 1992-01-30 1992-01-30 Code quantity controller

Country Status (1)

Country Link
JP (1) JPH05207440A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006157481A (en) * 2004-11-30 2006-06-15 Canon Inc Image coding apparatus and method thereof
WO2007043583A1 (en) * 2005-10-11 2007-04-19 Matsushita Electric Industrial Co., Ltd. Image encoding device, image decoding device, and method thereof
WO2017051492A1 (en) * 2015-09-24 2017-03-30 日本電気株式会社 Video encoding device and video decoding device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006157481A (en) * 2004-11-30 2006-06-15 Canon Inc Image coding apparatus and method thereof
US7706622B2 (en) 2004-11-30 2010-04-27 Canon Kabushiki Kaisha Image coding apparatus and image coding method
WO2007043583A1 (en) * 2005-10-11 2007-04-19 Matsushita Electric Industrial Co., Ltd. Image encoding device, image decoding device, and method thereof
WO2017051492A1 (en) * 2015-09-24 2017-03-30 日本電気株式会社 Video encoding device and video decoding device

Similar Documents

Publication Publication Date Title
US8031976B2 (en) Circuit and method for decoding an encoded version of an image having a first resolution directly into a decoded version of the image having a second resolution
KR970005831B1 (en) Image coder using adaptive frame/field change coding method
US5703966A (en) Block selection using motion estimation error
JP3118237B1 (en) Picture prediction decoding method
KR100563756B1 (en) Method for converting digital signal and apparatus for converting digital signal
US7555043B2 (en) Image processing apparatus and method
KR100340369B1 (en) Encoding method
JP3025610B2 (en) Encoding method and apparatus
JPH04196976A (en) Image encoding device
JPH0686262A (en) Apparatus for encoding of image
JP4360093B2 (en) Image processing apparatus and encoding apparatus and methods thereof
JPH06189290A (en) Video signal encoding device using 1d/2d dct
JP3089941B2 (en) Inter prediction coding device
JPH05207440A (en) Code quantity controller
JP3797208B2 (en) Color moving image encoding apparatus, decoding apparatus, encoding method, decoding method, and color moving image code string transmission method
JP2002262293A (en) Moving image decoder and moving image decoding method
JP2003348595A (en) Image processor and image processing method, recording medium and program
JP2008109700A (en) Method and device for converting digital signal
JP3361543B2 (en) Image signal encoding device
JP3343554B1 (en) Image prediction decoding method and image prediction encoding device
JP4359273B2 (en) Coding mode selection method
JPH10150659A (en) Picture encoder
JP2002359852A (en) Device and method for predictive decoding of image
JP3343553B1 (en) Image prediction coding apparatus and method
KR0155731B1 (en) Image-compressing method and apparatus thereof