JP5850536B2 - Moving picture coding apparatus and moving picture coding method - Google Patents

Moving picture coding apparatus and moving picture coding method Download PDF

Info

Publication number
JP5850536B2
JP5850536B2 JP2013505766A JP2013505766A JP5850536B2 JP 5850536 B2 JP5850536 B2 JP 5850536B2 JP 2013505766 A JP2013505766 A JP 2013505766A JP 2013505766 A JP2013505766 A JP 2013505766A JP 5850536 B2 JP5850536 B2 JP 5850536B2
Authority
JP
Japan
Prior art keywords
unit
coefficient
correction
transform coefficient
correction coefficient
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.)
Active
Application number
JP2013505766A
Other languages
Japanese (ja)
Other versions
JPWO2012127706A1 (en
Inventor
昌史 高橋
昌史 高橋
山口 宗明
宗明 山口
信博 知原
信博 知原
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.)
Hitachi Kokusai Electric Inc
Original Assignee
Hitachi Kokusai Electric Inc
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 Hitachi Kokusai Electric Inc filed Critical Hitachi Kokusai Electric Inc
Priority to JP2013505766A priority Critical patent/JP5850536B2/en
Publication of JPWO2012127706A1 publication Critical patent/JPWO2012127706A1/en
Application granted granted Critical
Publication of JP5850536B2 publication Critical patent/JP5850536B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、動画像符号化装置に関し、特にDCT係数を適切に補正して符号化効率を向上させた動画像符号化装置に関する。   The present invention relates to a moving picture coding apparatus, and more particularly to a moving picture coding apparatus in which DCT coefficients are appropriately corrected to improve coding efficiency.

大容量の動画像情報をデジタルデータ化して記録、伝達する手法として、MPEG(Moving Picture Experts Group)方式等の符号化方式が策定され、MPEG−1規格、MPEG−2規格、MPEG−4規格、H.264/AVC(Advanced Video Coding)規格等として国際標準の符号化方式となっている。   As a method for recording and transmitting large-capacity moving image information as digital data, an encoding method such as the MPEG (Moving Picture Experts Group) method has been established, and the MPEG-1 standard, MPEG-2 standard, MPEG-4 standard, H. It is an international standard encoding system such as H.264 / AVC (Advanced Video Coding) standard.

これらの規格では、ブロック単位で予測技術と変換技術を組み合わせて符号化するハイブリッド画像符号化技術が採用されている。すなわち、ブロック単位で計算された予測画像に対して原画像からの差分(予測差分)を計算し、周波数変換技術の一つであるDCT(Discrete Cosine Transform:離散コサイン変換)を施してその係数を量子化し、可変長符号化する。
一般に自然画像では、DCT係数が低周波成分に集中する性質があるため、上記可変長符号化方式は高周波成分に0などの小さい値が集中するほど符号化効率が高められるように設計されている。また予測差分が大きい場合には、高周波成分に対して強い量子化をかけたり、高周波成分の係数を強制的に切り捨てたりすることで、符号量を大きく削減している。
In these standards, a hybrid image encoding technique that performs encoding by combining a prediction technique and a conversion technique in units of blocks is employed. That is, the difference (prediction difference) from the original image is calculated for the predicted image calculated in units of blocks, and DCT (Discrete Cosine Transform), which is one of the frequency conversion techniques, is applied to the coefficient. Quantize and variable length code.
In general, a natural image has a characteristic that DCT coefficients are concentrated on low frequency components. Therefore, the variable length coding method is designed so that the coding efficiency increases as small values such as 0 concentrate on high frequency components. . When the prediction difference is large, the code amount is greatly reduced by applying strong quantization to the high frequency component or forcibly truncating the coefficient of the high frequency component.

特開2009−200541号公報JP 2009-200541 A 特開2011−130192号公報JP 2011-130192 A 特開2010−118729号公報JP 2010-118729 A 特開2007−251672号公報JP 2007-251672 A 特開2006−237709号公報JP 2006-237709 A

En-Hui Yang, Xiang Yu, “Rate Distortion Optimization for H.264 Interframe Coding:A General Framework and Algorithms”, IEEE TRANSATIONS ON IMAGE PROCESSING, IEEE, JULY 2007, VOL.16, NO.7, p.1774-1784En-Hui Yang, Xiang Yu, “Rate Distortion Optimization for H.264 Interframe Coding: A General Framework and Algorithms”, IEEE TRANSATIONS ON IMAGE PROCESSING, IEEE, JULY 2007, VOL.16, NO.7, p.1774-1784 G. Sullivan and T.Wiegand, “Rate-DistortionOptimization for Video Compression”, IEEE Signal Processing Magazine, vol.15, no.6, pp.74-90, 1998.G. Sullivan and T. Wiegand, “Rate-DistortionOptimization for Video Compression”, IEEE Signal Processing Magazine, vol.15, no.6, pp.74-90, 1998.

しかしながら、従来の予測と変換を基本とするハイブリッド画像符号化では、可変長符号化の性能がDCT係数の分布に大きく依存し、符号化性能を大きく左右する。予測差分情報が大きいため切り捨てた場合、高周波成分だけを対象にした係数補正しか行わない。そのため高周波成分に電力が集中した場合に十分に対処できず、場合によっては著しく符号化効率が低下するという問題があった。
一方で、符号量と画質のトレードオフを適正に評価することができれば、高周波成分だけでなく、低〜中程度の周波数成分に対しても係数操作を行うことにより、符号化効率の向上を見込むことができる。
本発明では、上記DCT係数の補正を適正に行うことにより、符号化効率を向上させた動画像符号化装置等を提供することを目的とする。
However, in the conventional hybrid image coding based on prediction and conversion, the performance of variable-length coding largely depends on the distribution of DCT coefficients and greatly affects the coding performance. When the prediction difference information is large and is discarded, only coefficient correction for only the high frequency component is performed. For this reason, there is a problem in that it cannot sufficiently cope with the case where power is concentrated on high-frequency components, and in some cases, the coding efficiency is remarkably lowered.
On the other hand, if the trade-off between code amount and image quality can be properly evaluated, improvement in coding efficiency is expected by performing coefficient operations not only on high-frequency components but also on low to medium frequency components. be able to.
An object of the present invention is to provide a moving picture coding apparatus and the like that improve coding efficiency by appropriately correcting the DCT coefficient.

本発明に係る動画像符号化装置あるいは方法は、
予測差分もしくは原画像に対して周波数変換を行う周波数変換部と、該周波数変換部が出力する変換係数に対して量子化を行う量子化部と、該変換係数に対して補正を行う変換係数補正部と、該補正された変換係数に対し符号の発生確率に応じた符号化を施す可変長符号化部とを有し、
該変換係数補正部は、該補正に用いる値として複数の候補を生成し、該複数の候補の中から可変長符号化の効率が最も高くなる1つの値を探索し、該1つの値を補正値として量子化前もしくは量子化後の前記変換係数に対して補正を行い、
前記可変長符号化部は、該補正された前記変換係数に符号化を施して、符号化ストリームとして出力することを特徴とする。
上記補正値には、もしそれが最適であれば、何も補正しない補正値も含まれうる。
A moving image encoding apparatus or method according to the present invention includes:
A frequency conversion unit that performs frequency conversion on the prediction difference or the original image, a quantization unit that performs quantization on the conversion coefficient output from the frequency conversion unit, and a conversion coefficient correction that corrects the conversion coefficient And a variable length coding unit that performs coding according to the probability of code generation for the corrected transform coefficient,
The transform coefficient correction unit generates a plurality of candidates as values to be used for the correction, searches for a value that maximizes the efficiency of variable-length coding from the plurality of candidates, and corrects the one value Correct the transform coefficient before or after quantization as a value,
The variable-length encoding unit encodes the corrected transform coefficient and outputs the encoded stream as an encoded stream.
The correction value may include a correction value for correcting nothing if it is optimal.

また、前記変換係数補正部は、前記複数の候補を、遺伝的アルゴリズム若しくは勾配法によって動的に生成することを特徴とする。   Further, the transform coefficient correction unit dynamically generates the plurality of candidates by a genetic algorithm or a gradient method.

また、前記変換係数補正部は、前記補正値を探索する際に、補正された前記変換係数を可変長符号化した場合の符号量と、該補正された前記変換係数を用いて画像を復号した場合の歪み量とを、パラメータとしてコスト計算を行う。
或いは、前記変換係数補正部は、最適な補正値を探索する際に、補正された前記変換係数を可変長符号化した場合の符号量と、補正された前記変換係数を逆量子化した時の歪み量をパラメータとしてコスト計算を行うことを特徴とする請求項2記載の画像符号化装置。
或いは、変換係数補正部は、最適な補正値を探索する際に、補正された前記変換係数を可変長符号化した場合の符号量と、補正値の大きさをパラメータとしてコスト計算を行う。
In addition, when searching for the correction value, the transform coefficient correction unit decodes an image using a code amount when the corrected transform coefficient is variable-length encoded and the corrected transform coefficient. The cost is calculated using the amount of distortion in the case as a parameter.
Alternatively, the transform coefficient correction unit, when searching for the optimum correction value, the code amount when the corrected transform coefficient is variable-length encoded and the corrected transform coefficient when the quantized inverse quantization The image coding apparatus according to claim 2, wherein the cost calculation is performed using the distortion amount as a parameter.
Alternatively, when the optimum correction value is searched for, the transform coefficient correction unit performs cost calculation using as parameters the code amount when the corrected transform coefficient is subjected to variable length coding and the magnitude of the correction value.

本発明によれば、DCT係数の適切な補正により、少ない符号量で高画質の復号画像を得ることができる。   According to the present invention, it is possible to obtain a high-quality decoded image with a small amount of code by appropriately correcting the DCT coefficient.

動画像符号化装置のブロック図(実施例1〜3Block diagram of moving picture coding apparatus (first to third embodiments) 変換係数補正部111のブロック図(実施例1Block diagram of conversion coefficient correction unit 111 (Example 1) 変換係数補正部111Aのブロック図(実施例2Block diagram of the conversion coefficient correction unit 111A (Example 2) 変換係数補正部111Bのブロック図(実施例3Block diagram of conversion coefficient correction unit 111B (Example 3) DCTに関する概念的な説明図DCT conceptual illustration ハイブリッド符号化の手順を示す概念図Conceptual diagram showing the procedure of hybrid coding 実施形態に係るDCT係数の補正方法に関する概念図Schematic diagram relating to DCT coefficient correction method according to the embodiment 実施形態に係る補正係数探索処理に関する概念図The conceptual diagram regarding the correction coefficient search process which concerns on embodiment 補正係数候補の決定過程の一例を示す図The figure which shows an example of the determination process of a correction coefficient candidate 補正係数候補の決定過程の一例を示す図The figure which shows an example of the determination process of a correction coefficient candidate 補正係数候補の決定過程の一例を示す図The figure which shows an example of the determination process of a correction coefficient candidate 補正係数の値域に関する説明図Explanatory diagram of the correction coefficient range 画像符号化処理の流れ図(実施例1〜3Flow chart of image encoding process (Examples 1 to 3) 補正係数探索処理に関する概念図(実施例2Conceptual diagram regarding correction coefficient search processing (second embodiment) 補正係数探索処理の流れ図(実施例2Flow chart of correction coefficient search process (second embodiment) 補正係数探索処理に関する概念図(実施例3Conceptual diagram regarding correction coefficient search processing (Example 3) 補正係数探索処理の流れ図(実施例3Flow chart of correction coefficient search process (Example 3) DCT係数の補正方法に関する概念的な説明図Conceptual illustration of DCT coefficient correction method 動画像符号化装置のブロック図(実施例4Block diagram of moving picture coding apparatus (Example 4)

以下、本発明の実施例に係る動画像符号化装置を、図面を参照して説明する。本例の動画像符号化装置は、H.264/AVC等のハイブリッド符号化方式に基づいて符号化を行うものであり、最初に、H.264/AVC符号化について概説する。   Hereinafter, a moving picture coding apparatus according to an embodiment of the present invention will be described with reference to the drawings. The moving picture encoding apparatus of this example performs encoding based on a hybrid encoding scheme such as H.264 / AVC, and first, H.264 / AVC encoding will be outlined.

MPEG-4やH.264/AVCなどのハイブリッド符号化方式では、符号化処理が完了した画像情報を利用して符号化対象画像を予測し、原画像との予測差分を符号化することによって、動画像の持つ冗長性を減らして符号量を削減している。ここでは、動画像の局所的性質を利用したきめ細かな予測を実現するために、画像を細かく分割したブロック単位で予測が行われる。
上記予測差分は、周波数変換手法の一つであるDCTにより周波数成分(変換係数)に分解され、その係数値が符号化される。以下、上記の規格に合わせてDCTを周波数変換方式として用いた場合について説明する。
In hybrid encoding schemes such as MPEG-4 and H.264 / AVC, an image to be encoded is predicted using image information that has been encoded, and a prediction difference from the original image is encoded. The amount of code is reduced by reducing the redundancy of moving images. Here, in order to realize fine prediction using the local property of a moving image, prediction is performed in units of blocks obtained by finely dividing an image.
The prediction difference is decomposed into frequency components (transform coefficients) by DCT, which is one of frequency transform methods, and the coefficient values are encoded. Hereinafter, a case where DCT is used as a frequency conversion method according to the above-described standard will be described.

図5は、予測差分がDCTにより周波数成分に分解される様子について概念的に示している。DCTは、基底信号603の係数値による加重和によって入力信号を表現する周波数変換の一手法であり、予測差分601に対してDCTを適用することによりその係数値602が低周波成分に偏る性質を利用して、係数値を効率的に符号化している。   FIG. 5 conceptually shows how the prediction difference is decomposed into frequency components by DCT. DCT is a method of frequency conversion that expresses an input signal by a weighted sum of coefficient values of the base signal 603. By applying the DCT to the prediction difference 601, the coefficient value 602 is biased toward low frequency components. Utilizing this, the coefficient values are efficiently encoded.

図6に、各ブロックに対する予測差分信号の符号化手順について示す。まず対象ブロックの予測差分601に対してDCTを施し、取得されたDCT係数602に対して量子化を行う。続いて、量子化後のDCT係数603に対し、低周波成分から高周波成分に向かって2次元的なジグザグ方向のスキャン604を行って係数値を一次元展開し、取得された1次元データに対して可変長符号化(VLC:Variable length coding)605を施して符号語を生成する。   FIG. 6 shows the encoding procedure of the prediction difference signal for each block. First, DCT is performed on the prediction difference 601 of the target block, and the obtained DCT coefficient 602 is quantized. Subsequently, the quantized DCT coefficient 603 is subjected to a two-dimensional zigzag scan 604 from the low frequency component to the high frequency component to expand the coefficient value one-dimensionally. Then, variable length coding (VLC) 605 is applied to generate a codeword.

図7は、本発明の実施形態において、DCT係数に対して補正を行って符号化効率を高める方法の概念図である。ここでは、例として量子化後のDCT係数に対して補正を行う方法について示している。まず、量子化済みDCT係数603に対する補正値(以後、補正係数)の候補702を複数用意し、これらの中から符号化効率を最も高められる最適解703を決定するための補正係数探索を行う。次に、得られた補正係数703を量子化済みDCT係数603に足し合わせることによりDCT係数の補正を行い、補正済みDCT係数704を取得する。以後、この補正済みDCT係数に対して通常の符号化処理1次元展開、VLC)を行い、符号語を生成する。補正係数としては、量子化済みDCT係数に現れる大きさが2や1の要素1つを1や0に置き換えるようなものを用いれば符号量の低下が十分期待でき、複数の非ゼロの要素を有するものを多数試行することで量子化による欠損を補って歪を小さくするような補正係数が見つかる可能性もある。   FIG. 7 is a conceptual diagram of a method for improving the coding efficiency by correcting DCT coefficients in the embodiment of the present invention. Here, as an example, a method of correcting the quantized DCT coefficient is shown. First, a plurality of correction value candidates (hereinafter referred to as correction coefficients) 702 for the quantized DCT coefficient 603 are prepared, and a correction coefficient search for determining the optimum solution 703 that can maximize the coding efficiency is performed. Next, the DCT coefficient is corrected by adding the obtained correction coefficient 703 to the quantized DCT coefficient 603 to obtain a corrected DCT coefficient 704. Thereafter, a normal encoding process one-dimensional expansion (VLC) is performed on the corrected DCT coefficient to generate a code word. As the correction coefficient, if one of the elements having a magnitude of 2 or 1 appearing in the quantized DCT coefficient is replaced with 1 or 0, a decrease in the code amount can be sufficiently expected, and a plurality of non-zero elements can be expected. There is a possibility that a correction coefficient that compensates for the deficiency due to the quantization and reduces the distortion by trying a large number of possessed ones can be found.

図8は、本発明の実施形態における、補正係数探索処理の概念図である。まず、補正係数の候補801の中から一つを選び802)、量子化済みDCT係数603に足し合わせて、補正係数候補で補正したDCT係数(以後、補正後係数候補)804を生成する。続いて、これに対して逆量子化および逆DCTを施し、補正後係数候補を用いた予測差分の復号値805を取得する。これと符号化前の予測差分806を比較807し、それらの差分値として表される誤差808を計算する。誤差としては、例えば以下に示すブロック内各画素値の絶対値誤差和SAD(um of Absolute Difference)や二乗誤差和SSD(um of Squared Difference)を用いると効果的である。   FIG. 8 is a conceptual diagram of correction coefficient search processing in the embodiment of the present invention. First, one of the correction coefficient candidates 801 is selected (802), and added to the quantized DCT coefficient 603 to generate a DCT coefficient (hereinafter, corrected coefficient candidate) 804 corrected with the correction coefficient candidate. Subsequently, inverse quantization and inverse DCT are applied to this to obtain a prediction difference decoded value 805 using the corrected coefficient candidate. This is compared 807 with the prediction difference 806 before encoding, and an error 808 expressed as a difference between them is calculated. As the error, for example, it is effective to use an absolute value error sum SAD (um of Absolute Difference) or a square error sum SSD (um of Squared Difference) of each pixel value in the block shown below.

Figure 0005850536
Figure 0005850536
ここで、p(i,j)は座標(i,j)における予測差分806の値を、q(i,j)は座標(i,j)における予測差分の復号値805の値を示している。
Figure 0005850536
Figure 0005850536
Here, p (i, j) indicates the value of the prediction difference 806 at the coordinates (i, j), and q (i, j) indicates the value of the decoded value 805 of the prediction difference at the coordinates (i, j). .

一方、補正後係数候補804に対して一次元展開を行い、VLCを施して符号量810を計測する。最後に、計測した誤差808と符号量810をもとにコスト計算を行う。例えば、以下に示すコスト値を利用すると効果的である。   On the other hand, one-dimensional expansion is performed on the corrected coefficient candidate 804, VLC is performed, and the code amount 810 is measured. Finally, cost calculation is performed based on the measured error 808 and code amount 810. For example, it is effective to use the cost values shown below.

Figure 0005850536
ただし、DistはSADやSSDなどの誤差値、Rateは符号量、Weight1は重み係数を表す。ここで、Weight1の値を調整することにより、画質と符号量のトレードオフを制御することができる。例えば画質を多少劣化させても符号量を大幅に低下させたければ、コスト値に対する符号量の寄与率が大きくなるようにWeigh1の値を高めに設定すればよい。または、画質歪みと符号量の統計的性質から誤差と符号量のトレードオフについて適正に評価するため、非特許文献1に記載されているRD-Optimization方式を利用してコスト計算してもよい。
以上の処理を補正係数の候補すべてに対して実施し、その結果コスト値を最小にする候補を最適な補正係数として決定する。なお、補正係数候補の生成や選出の仕方により、いくつかの補正係数探索処理が考えられる。図9〜図11を参照して、3種類の方法に分けて説明する。
Figure 0005850536
Here, Dist represents an error value such as SAD or SSD, Rate represents a code amount, and Weight 1 represents a weighting coefficient. Here, the trade-off between image quality and code amount can be controlled by adjusting the value of Weight1. For example, if the code amount is to be significantly reduced even if the image quality is somewhat deteriorated, the value of Weigh1 may be set higher so that the contribution rate of the code amount to the cost value increases. Alternatively, the cost may be calculated using the RD-Optimization method described in Non-Patent Document 1 in order to appropriately evaluate the trade-off between error and code amount from the statistical properties of image quality distortion and code amount.
The above processing is performed for all the correction coefficient candidates, and as a result, the candidate that minimizes the cost value is determined as the optimum correction coefficient. Depending on how correction coefficient candidates are generated and selected, several correction coefficient search processes can be considered. With reference to FIG. 9 to FIG.

図9は、補正係数候補の決定過程の一例を示す図である。例えば4×4サイズのブロック単位でDCTを施す場合、DCT係数901も4×4サイズの行列となる。この場合、補正係数も4×4サイズの行列(以後、補正係数行列)として計算する。簡単のため、補正係数行列の各要素が取り得る値を±11, 0, 1の3種類)に限定すると、902に示す 通りの候補が存在する。この中からコスト値を最小とする補正係数行列903を決定し、補正を行う904)。
しかし、この例では、通りの候補すべてに対してコスト計算を行う必要があるため、莫大な計算量が必要となる。さらに、現実には補正係数行列の各要素が取り得る値の範囲は上記の例よりもさらに広く、補正係数探索のための計算量は、各要素が取り得る値の数に対して指数関数的に増大する。そのため、図9のようにすべての候補に対してコスト計算を行うことは現実的ではない。そこで、効率的な探索アルゴリズムを利用することにより、探索精度の低下を抑えつつ計算量を大幅に削減する方法について、以下に述べる。
FIG. 9 is a diagram illustrating an example of a correction coefficient candidate determination process. For example, when DCT is performed in units of 4 × 4 size blocks, the DCT coefficient 901 is also a 4 × 4 size matrix. In this case, the correction coefficient is also calculated as a 4 × 4 matrix (hereinafter referred to as a correction coefficient matrix). For the sake of simplicity, if the possible values of each element of the correction coefficient matrix are limited to three types (± 11, 0, 1), candidates as shown in 902 exist. A correction coefficient matrix 903 that minimizes the cost value is determined from these, and correction is performed 904).
However, in this example, since it is necessary to perform cost calculation for all the street candidates, a huge amount of calculation is required. Furthermore, in reality, the range of values that each element of the correction coefficient matrix can take is wider than the above example, and the amount of calculation for the correction coefficient search is exponential with respect to the number of values that each element can take. To increase. Therefore, it is not realistic to perform cost calculation for all candidates as shown in FIG. Therefore, a method for significantly reducing the amount of calculation while suppressing a decrease in search accuracy by using an efficient search algorithm will be described below.

図10は、遺伝的アルゴリズムを応用した補正係数行列の決定方法の模式図である。
遺伝的アルゴリズムは、データ列を遺伝子として見立てた複数の個体に対し、選択、交叉、突然変異などの遺伝子操作を繰り返すことにより、適応度の高い個体が選択淘汰されていく自然界の様子を模した探索アルゴリズムである。ここでは、個体として補正係数行列の候補を、適応度としてコスト値の逆数(コスト値が低いほど適応度が高くなるように設定)を設定している。例えば、第n世代として1001に示す6種類の個体(A〜F)が選ばれているとする。ここで、次世代の個体集合を決定するために、遺伝子操作を行う。まず、適応度に応じて現世代の個体を次世代に残す選択処理により、例えば適応度の最も高い2つの個体A1002およびB1003が残る。
続いて、2種類の異なる個体に対して、一部のデータ列を入れ替える交叉処理では、例えば個体Cの第2行および第3行を個体Dと入れ替えた1004と、個体Aの第2列および第4列を個体Cと入れ替えた1005を生成する。この場合、交叉を行う個体は無作為に選択してもよいが、各個体の選択確率がその適応度に応じて偏った分布になるように抽出するとより効果的である。また、どの行もしくは列のデータを入れ替えるかについても、無作為に決定すると効果的である。続いて、個体のデータ列の一部が突発的に別の値に変化する突然変異処理では、例えば個体Aの第2, 3成分と4, 4成分の値が変化した1006を生成する。この場合も、突然変異を起こす個体と、データ列のどの値を変化させるかについては、無作為もしくは適応度に応じて決定すると良い。なお、交叉と突然変異を組み合わせて1007のような個体を生成するのも効果的である。
以上のように、第n世代の個体に対して遺伝子操作を行って生成される第n+1世代の個体1008を各個体の適応度によって整列すると、全体的に第n世代よりも適応度が上昇していることがわかる。この処理を、適応度が十分大きくなるか収束するまで繰り返し、最終的に最も適応度の高い個体が最適解となる。
FIG. 10 is a schematic diagram of a correction coefficient matrix determination method applying a genetic algorithm.
The genetic algorithm imitates the natural world where individuals with high fitness are selected and selected by repeating genetic operations such as selection, crossover, mutation, etc. for multiple individuals with data strings as genes. Search algorithm. Here, the correction coefficient matrix candidates are set as individuals, and the reciprocal of the cost value is set as the fitness (set so that the fitness becomes higher as the cost value is lower). For example, assume that six types of individuals (A to F) shown in 1001 are selected as the nth generation. Here, genetic manipulation is performed to determine the next generation population. First, for example, two individuals A1002 and B1003 having the highest fitness level remain by the selection process of leaving the current generation individual in the next generation according to the fitness level.
Subsequently, in the crossover process of exchanging a part of data strings for two different types of individuals, for example, 1004 in which the second row and the third row of the individual C are replaced with the individual D, the second column of the individual A, and 1005 in which the fourth column is replaced with the individual C is generated. In this case, individuals to be crossed may be selected at random, but it is more effective to extract each individual so that the selection probability of each individual has a biased distribution according to its fitness. In addition, it is effective to randomly determine which row or column of data to replace. Subsequently, in the mutation process in which a part of the individual data string suddenly changes to another value, for example, 1006 in which the values of the second and third components and the fourth and fourth components of the individual A are changed is generated. Also in this case, it is preferable to determine an individual that causes mutation and which value of the data string is changed according to randomness or fitness. It is also effective to generate an individual like 1007 by combining crossover and mutation.
As described above, when the (n + 1) th generation individuals 1008 generated by performing genetic operations on the nth generation individuals are arranged according to the fitness of each individual, the fitness is generally higher than that of the nth generation. You can see that it is rising. This process is repeated until the fitness becomes sufficiently large or converges, and finally the individual with the highest fitness becomes the optimal solution.

図11は、勾配法を応用した補正係数行列の決定方法の模式図である。ここでは、局所的なコスト分布の傾きに応じて解の推定値を繰り返し更新する。すなわち、現時点での推定値に対して、局所的な周辺探索を行い、コスト関数を最小化する方向に推定値を更新していく。
例えば、第n回目の試行後によって補正係数行列1101が最適解として推定されているとする。第n+1回目の試行では、任意の成分、例えば第1, 1成分の値を変化させた補正係数行列1102〜1104を用いてコスト値を計算し、その結果補正係数行列1104のコストが最も小さかった場合、これを第n+1番目の推定結果とする。この処理を、変化させる成分を変えながらコスト値が十分小さくなるか収束するまで繰り返す。なお、この方法は局所解に陥りやすいため、初期推定値を変化させて何度か上記探索処理を行い、得られた複数解の中からコストを最小化するものを最終的に選択すると効果的である。
FIG. 11 is a schematic diagram of a correction coefficient matrix determination method applying the gradient method. Here, the estimated value of the solution is repeatedly updated according to the slope of the local cost distribution. That is, a local peripheral search is performed on the current estimated value, and the estimated value is updated in a direction that minimizes the cost function.
For example, it is assumed that the correction coefficient matrix 1101 is estimated as the optimal solution after the n-th trial. In the (n + 1) th trial, cost values are calculated using correction coefficient matrices 1102 to 1104 in which the values of arbitrary components, for example, the first and first components are changed, and as a result, the cost of the correction coefficient matrix 1104 is the lowest. In this case, this is the (n + 1) th estimation result. This process is repeated until the cost value becomes sufficiently small or converges while changing the component to be changed. Since this method tends to fall into a local solution, it is effective to perform the above search process several times by changing the initial estimated value, and finally select the one that minimizes the cost from the obtained multiple solutions. It is.

これらの全試行に拠らない方法においても、同時に封数の補正係数候補が挙がることがある。ハードウェアに実装する際は、複数の候補について並列処理できるようにしてもよい。   Even in a method that does not rely on all these trials, candidates for the correction coefficient of the seal may be listed at the same time. When implemented in hardware, a plurality of candidates may be processed in parallel.

図12は、補正係数の値域について、その一例を示している。補正係数の値は量子化パラメータによって変化するが、例えば1201に示すように補正係数行列のすべての要素について±10(10, -9, …, 0, …, 9, 10)の範囲で変化させると効果的である。また、DCT係数の低周波成分に対して強い補正を行うと画質に大きく影響するため、あまり大きな値で補正を行うことは望ましくない。そのため、1202に示すように、周波数成分によって補正係数の値の範囲に差を設けると効果的である。   FIG. 12 shows an example of the correction coefficient value range. The value of the correction coefficient varies depending on the quantization parameter. For example, as shown in 1201, all elements of the correction coefficient matrix are changed in a range of ± 10 (10, −9,..., 0,..., 9, 10). And effective. In addition, if a strong correction is performed on the low-frequency component of the DCT coefficient, the image quality is greatly affected, so it is not desirable to perform the correction with a very large value. Therefore, as indicated by 1202, it is effective to provide a difference in the range of correction coefficient values depending on the frequency component.

図1は、実施例1に係る動画像符号化装置のブロック図である。本例の動画像符号化装置は、入力された原画像101を保持する入力画像メモリ102と、入力画像を小領域に分割するブロック分割部103と、ブロック単位で過去のフレームからの動き量を探索する動き探索部104と、ブロック単位で画面内予測を行う画面内予測部105と、動き探索部104にて検出された動き量をもとにブロック単位で画面間予測を行う画面間予測部106と、画像の性質に合った予測モード(予測手段およびブロックサイズ)を決定するモード選択部107と、予測差分を生成するための減算部108と、予測差分を量子化済み変換係数へ処理する周波数変換部109および量子化処理部110と、変換係数に補正を加える変換係数部111と、補正済みDCT係数等を符号の発生確率に応じて適応的符号化する可変長符号化部112と、補正済み変換係数から予測差分を復元(復号化)する逆量子化処理部113および逆周波数変換部114と、復元された予測差分を用いて復号化画像を生成するための加算部115と、復号化画像を保持して後の予測に活用するための参照画像メモリ116を有する。   FIG. 1 is a block diagram of a video encoding apparatus according to the first embodiment. The moving image encoding apparatus of this example includes an input image memory 102 that holds an input original image 101, a block dividing unit 103 that divides the input image into small regions, and motion amounts from past frames in units of blocks. A motion search unit 104 for searching, an intra-screen prediction unit 105 that performs intra-screen prediction in units of blocks, and an inter-screen prediction unit that performs inter-screen predictions in units of blocks based on the amount of motion detected by the motion search unit 104 106, a mode selection unit 107 that determines a prediction mode (prediction means and block size) that matches the nature of the image, a subtraction unit 108 for generating a prediction difference, and processing the prediction difference into a quantized transform coefficient The frequency transform unit 109 and the quantization processing unit 110, the transform coefficient unit 111 that corrects the transform coefficient, and the corrected DCT coefficient and the like are adaptively encoded according to the probability of code generation. A variable-length encoding unit 112, an inverse quantization processing unit 113 that restores (decodes) a prediction difference from the corrected transform coefficient, and an inverse frequency conversion unit 114, and a decoded image is generated using the restored prediction difference. And a reference image memory 116 for holding the decoded image and using it for later prediction.

入力画像メモリ102は、原画像101(映像41と同義)の中から一枚の画像を符号化対象画像として保持し、これをブロック分割部103にて細かなブロックに分割し、動き探索部104、画面内予測部105、画面間予測部106、および減算部108に渡す。
動き探索部104では、参照画像メモリ116に格納されている復号化済み画像を用いて該当ブロックの動き量を計算し、動きベクトルを画面間予測部106に渡す。
The input image memory 102 holds one image as an encoding target image from the original image 101 (synonymous with the video 41), and divides it into fine blocks by the block dividing unit 103, and the motion search unit 104. To the intra-screen prediction unit 105, the inter-screen prediction unit 106, and the subtraction unit 108.
The motion search unit 104 calculates the motion amount of the corresponding block using the decoded image stored in the reference image memory 116, and passes the motion vector to the inter-screen prediction unit 106.

画面内予測部105および画面間予測部106は、それぞれ、周辺ブロックの原画像を用いた画面内予測処理および符号化済みの別画像を参照した画面間予測処理を、複数のブロックサイズで実行する。
モード選択部107は、両予測部において複数のブロックサイズで実行された中から、最適な予測モードを選択し、その予測画像を減算部108および加算部115に送る。
The intra-screen prediction unit 105 and the inter-screen prediction unit 106 respectively perform intra-screen prediction processing using the original image of the peripheral block and inter-screen prediction processing referring to another encoded image with a plurality of block sizes. .
The mode selection unit 107 selects an optimal prediction mode from the two prediction units that are executed with a plurality of block sizes, and sends the prediction image to the subtraction unit 108 and the addition unit 115.

減算部108は、対象ブロックの原画像と、モード選択部107で選択された予測画像との差分(予測差分)を生成し、周波数変換部109に渡す。
周波数変換部109および量子化処理部110は、送られてきた予測差分に対して指定された大きさのブロック単位で、DCTなどによる周波数変換および量子化マトリクスによる量子化処理をそれぞれ行い、得られた変換係数あるいは量子化済み変換係数を変換係数補正部113に渡す。
The subtraction unit 108 generates a difference (prediction difference) between the original image of the target block and the prediction image selected by the mode selection unit 107 and passes the difference to the frequency conversion unit 109.
The frequency conversion unit 109 and the quantization processing unit 110 are respectively obtained by performing frequency conversion using DCT or the like and quantization processing using a quantization matrix in units of blocks having a size specified for the transmitted prediction difference. The transformed coefficient or the quantized transformed coefficient is passed to the transformed coefficient correction unit 113.

変換係数補正部111は、量子化済みの変換係数に対し、最適な補正値を決定して補正を行い、可変長符号化部112および逆量子化部113に渡す。
可変長符号化処理部112では、補正済みの変換係数と動きベクトルなどのヘッダ情報を、記号の発生確率に基づいて符号化を行って符号化ストリームを生成する。
また、逆量子化処理部113および逆周波数変換部114では、量子化後の周波数変換係数に対して、それぞれ逆量子化および逆DCTなどの逆周波数変換を施し、予測差分を取得して加算部115に送る。
加算部115では、予測画像と復号化済み予測差分を加算して復号化画像を生成し、参照画像メモリ116に格納する。
The transform coefficient correction unit 111 determines and corrects an optimal correction value for the quantized transform coefficient and passes it to the variable length coding unit 112 and the inverse quantization unit 113.
The variable-length encoding processing unit 112 encodes header information such as the corrected transform coefficient and motion vector based on the probability of occurrence of symbols to generate an encoded stream.
In addition, the inverse quantization processing unit 113 and the inverse frequency transform unit 114 perform inverse frequency transforms such as inverse quantization and inverse DCT on the quantized frequency transform coefficients, respectively, obtain a prediction difference, and add an addition unit. 115.
The adding unit 115 adds the predicted image and the decoded prediction difference to generate a decoded image, and stores the decoded image in the reference image memory 116.

図2は、実施例1の変換係数補正部111について、その詳細の一例を示したものである。変換係数補正部111は、補正係数候補を生成する補正係数候補生成部201と、補正係数候補と変換係数を足し合わせるための加算器202と、変換係数に対して符号化を行う可変長符号化部203と、予測差分を復号化するための逆量子化処理部204および逆周波数変換部205と、符号化前の予測差分と復号化済み予測差分の差分値を計算するための誤差計算部206と、コスト計算を行うためのコスト評価部207と、コスト最小の補正係数候補を格納するための最適補正係数格納部208と、最適な補正係数を用いて変換係数を補正する加算部209を有する。   FIG. 2 shows an example of the details of the conversion coefficient correction unit 111 of the first embodiment. The transform coefficient correction unit 111 includes a correction coefficient candidate generation unit 201 that generates a correction coefficient candidate, an adder 202 that adds the correction coefficient candidate and the transform coefficient, and variable length coding that performs coding on the transform coefficient. Unit 203, inverse quantization processing unit 204 and inverse frequency transform unit 205 for decoding the prediction difference, and error calculation unit 206 for calculating a difference value between the prediction difference before encoding and the decoded prediction difference A cost evaluation unit 207 for performing cost calculation, an optimal correction coefficient storage unit 208 for storing a correction coefficient candidate with the minimum cost, and an addition unit 209 for correcting the conversion coefficient using the optimal correction coefficient. .

補正係数候補生成部201は、補正係数候補を生成して1つずつ加算部202へ送る。加算部202では、取得した補正係数候補を量子化処理部110から送られてきた量子化済み変換係数と足し合わせて、可変長符号化部203および逆量子化処理部204へ送る。可変長符号化部203では、送られてきた補正後係数候補に対して符号化を行い、符号量を計測してコスト評価部207へ送る。
一方で、逆量子化処理部204および逆周波数変換部205では、同じ補正後係数候補に対して逆量子化および逆周波数変換を施して予測差分を復号し、誤差計算部206へ送る。誤差計算部206では、[式1]、[式2]等により予測差分の復号値と符号化前の予測差分に対して誤差計算を行い、コスト評価部207へ送る。
The correction coefficient candidate generation unit 201 generates correction coefficient candidates and sends them to the addition unit 202 one by one. The adding unit 202 adds the obtained correction coefficient candidate to the quantized transform coefficient sent from the quantization processing unit 110 and sends the sum to the variable length coding unit 203 and the inverse quantization processing unit 204. The variable length coding unit 203 performs coding on the received corrected coefficient candidate, measures the amount of code, and sends the code amount to the cost evaluation unit 207.
On the other hand, the inverse quantization processing unit 204 and the inverse frequency transform unit 205 perform inverse quantization and inverse frequency transform on the same corrected coefficient candidate, decode the prediction difference, and send it to the error calculation unit 206. The error calculation unit 206 calculates an error with respect to the decoded value of the prediction difference and the prediction difference before encoding using [Equation 1], [Equation 2], and the like, and sends the result to the cost evaluation unit 207.

コスト評価部207では、送られてきた符号量と誤差情報を用いて[式3]等の計算式にてコスト計算を行い、それがこれまでに計算されたどの補正係数候補のコストよりも小さければ、その補正係数とコスト値を最適補正係数格納部へ送る。補正係数候補生成部201が出すすべての候補に対して上記処理を完了した時点で、最適補正係数格納部208に格納されている補正係数は加算部209へ送られ、量子化処理部110から送られてくる量子化済み変換係数と足し合わされ補正済み変換係数として可変長符号化部112へと送られる。   The cost evaluation unit 207 performs cost calculation using a calculation formula such as [Formula 3] using the received code amount and error information, and it should be smaller than the cost of any correction coefficient candidate calculated so far. For example, the correction coefficient and the cost value are sent to the optimum correction coefficient storage unit. When the above processing is completed for all candidates issued by the correction coefficient candidate generation unit 201, the correction coefficients stored in the optimal correction coefficient storage unit 208 are sent to the addition unit 209 and sent from the quantization processing unit 110. The obtained quantized transform coefficients are added together and sent to the variable length coding unit 112 as corrected transform coefficients.

図13は、実施例1における1フレームの符号化処理手順について示している。まず、符号化対象となるフレーム内に存在するすべてのブロックに対して(1301)、以下の処理を行う。すなわち、該当ブロックに対して一度すべての符号化モード(予測方法とブロックサイズの組み合わせ)に対して予測処理を実行し、予測差分を計算する。ここでは、予測方法として、画面内予測1302、および画面間予測1303を実施し、すべての符号化モードの中から最適なモードを選択するモード選択処理1304を行う。
続いて、選択された符号化モードの予測差分に対して、周波数変換処理1305および量子化処理1306を施して量子化済み変換係数を算出する。続いて、変換係数を補正するための補正係数を決定するための補正係数探索処理を行う(1307)。すなわち、補正係数の候補を1つ算出し(1308)、量子化済み変換係数と足し合わせて補正後係数候補を生成する(1309)。さらに、補正後係数候補に対して可変長符号化を施して符号量を計算する一方(1310)、同じ補正後係数候補に対して逆量子化および逆周波数変換を施して予測誤差の復号値を取得する(1311)。これと予測差分との誤差を計算し(1312)、上記符号量と誤差情報を用いてコスト計算を行う(1313)。さらに、算出されたコスト値がこれまでで最小なら(1314)、補正係数とコスト値を更新する(1315)。上記処理をすべての補正係数候補に対して行い、コストが最小となる係数を最適な補正係数とする。
FIG. 13 shows an encoding processing procedure for one frame in the first embodiment. First, the following processing is performed on all blocks existing in the frame to be encoded (1301). That is, the prediction process is executed once for all coding modes (combination of prediction method and block size) for the corresponding block, and the prediction difference is calculated. Here, intra prediction 1302 and inter prediction 1303 are performed as prediction methods, and mode selection processing 1304 for selecting an optimum mode from all the encoding modes is performed.
Subsequently, frequency conversion processing 1305 and quantization processing 1306 are performed on the prediction difference of the selected coding mode to calculate quantized transform coefficients. Subsequently, a correction coefficient search process for determining a correction coefficient for correcting the conversion coefficient is performed (1307). That is, one correction coefficient candidate is calculated (1308) and added to the quantized transform coefficient to generate a corrected coefficient candidate (1309). Further, the code amount is calculated by performing variable-length coding on the corrected coefficient candidate (1310), while the same corrected coefficient candidate is subjected to inverse quantization and inverse frequency transform to obtain a prediction error decoded value. Obtain (1311). The error between this and the prediction difference is calculated (1312), and the cost is calculated using the code amount and the error information (1313). Furthermore, if the calculated cost value is the smallest so far (1314), the correction coefficient and the cost value are updated (1315). The above processing is performed for all correction coefficient candidates, and the coefficient with the lowest cost is set as the optimum correction coefficient.

続いて、上記最適補正係数で変換係数を補正し(1316)、可変長符号化処理1317を施して符号化ストリームを生成する。一方で、補正済み変換係数に対して逆量子化処理(1318と逆周波数変換処理1319を施して予測差分を復号化し、復号化画像を生成して参照画像メモリに格納する(1320)。以上の処理をすべてのブロックに対して完了すれば、画像1フレーム分の符号化は終了する(1321)。
なお、ループ2(1307)の終了条件として、コスト値が所定値以下になること、試行回数が上限に達すること、などを含めてもよく、試行回数の上限は、入力画像102メモリに溜まった処理待ち画像の量に応じて設定することができる。またループ2において、また1310で得られる可変長符号化の符号量が、試行済みの補正後係数候補の符号量或いは補正係数を用いないときの符号量を超えた時点で、現在の補正係数候補を諦め次の候補を試行するようにしてもよい。
後述の実施例2以降では、本フローチャートのうちで補正係数を決定する補正係数探索処理のみ異なるため、ループ2(1307のみ示しその他の動作は図13と同様とする。
Subsequently, the transform coefficient is corrected with the optimal correction coefficient (1316), and a variable length encoding process 1317 is performed to generate an encoded stream. On the other hand, the corrected transform coefficient is subjected to inverse quantization processing (1318 and inverse frequency transform processing 1319 to decode the prediction difference, and a decoded image is generated and stored in the reference image memory (1320). If the processing is completed for all the blocks, the encoding for one frame of the image is completed (1321).
Note that the loop 2 (1307) termination condition may include a cost value that is equal to or lower than a predetermined value, the number of trials reaching an upper limit, and the like. The upper limit of the number of trials is accumulated in the memory of the input image 102. It can be set according to the amount of images waiting to be processed. In addition, when the code amount of variable length coding obtained in loop 2 and 1310 exceeds the code amount of the corrected coefficient candidate that has been tried or the code amount when the correction coefficient is not used, the current correction coefficient candidate You may give up and try the next candidate.
In the second and later embodiments described later, only the correction coefficient search process for determining the correction coefficient in this flowchart is different, and therefore loop 2 (only 1307 is shown and other operations are the same as those in FIG. 13).

実施例2に係る補正係数探索処理は、実施例1に対し、画質の劣化を周波数領域で評価するように変更し、計算量を削減したものである。なお、実施例2以降では、実施例1に対し変換係数補正部111の細部が異なる他は、実施例1と同様の構成であり、それらの部分の説明は割愛する。   The correction coefficient search process according to the second embodiment is different from the first embodiment in that image quality deterioration is evaluated in the frequency domain, and the amount of calculation is reduced. In the second and subsequent embodiments, the configuration is the same as that of the first embodiment except that the details of the conversion coefficient correction unit 111 are different from those of the first embodiment, and the description of those portions is omitted.

図14に、実施例2による補正係数探索処理について示す。まず、補正係数の候補1401の中から一つの候補1402を選び、量子化済みDCT係数603に足し合わせて補正後係数候補1404を生成する。続いて、これに対して逆量子化を施し、補正後係数候補を用いた場合のDCT係数の復号値1405を取得する。これと量子化前のDCT係数1406を比較し、それらの差分値として表される誤差1408を計算する。誤差としては、先に述べた絶対値誤差和SADや二乗誤差和SSDを利用できる。また、DCT係数については、低周波成分の誤差が画質に与える影響が大きいため、低周波成分の誤差に対する重みを大きく設定するとさらに効果的である、SADおよびSSDに対してそれぞれ重みを設定したWSAD(Weighted SAD)、WSSD(Weighted SSD)は以下の通りである。   FIG. 14 shows correction coefficient search processing according to the second embodiment. First, one candidate 1402 is selected from the correction coefficient candidates 1401 and added to the quantized DCT coefficient 603 to generate a corrected coefficient candidate 1404. Subsequently, inverse quantization is performed on this, and a decoded value 1405 of the DCT coefficient when the corrected coefficient candidate is used is obtained. This is compared with the DCT coefficient 1406 before quantization, and an error 1408 expressed as a difference value between them is calculated. As the error, the absolute value error sum SAD or the square error sum SSD described above can be used. In addition, the DCT coefficient has a large effect on the image quality due to the error of the low frequency component, so it is more effective to set a large weight for the error of the low frequency component. (Weighted SAD) and WSSD (Weighted SSD) are as follows.

Figure 0005850536
Figure 0005850536
ただし、P(i,j)は量子化前DCT係数1406の(i,j)成分を、Q(i,j)は補正したDCT係数の逆量子化値1405の(i,j)成分を、関数W(i,j)は、iおよびjが大きいほど値が小さくなる関数である。一方、補正後係数候補1404に対して一次元展開を行い、VLCを施して符号量1410を計測する。最後に、計測した誤差1408と符号量1410をもとにコスト計算を行う。ここでは、例えば以下に示すコスト値を利用すると効果的である。
Figure 0005850536
Figure 0005850536
However, P (i, j) is the (i, j) component of the pre-quantization DCT coefficient 1406, Q (i, j) is the (i, j) component of the dequantized value 1405 of the corrected DCT coefficient, The function W (i, j) is a function that decreases as i and j increase. On the other hand, one-dimensional expansion is performed on the corrected coefficient candidate 1404, and VLC is applied to measure the code amount 1410. Finally, cost calculation is performed based on the measured error 1408 and code amount 1410. Here, for example, it is effective to use the cost values shown below.

Figure 0005850536
ただし、DistはSADやSSD、WSAD、WSSDなどの誤差値、Rateは符号量、Weight2は重み係数を表す。ここでも、Weight2の値を調整することにより、画質と符号量のトレードオフを制御することができる。例えば画質を多少劣化させても符号量を大幅に低下させたければ、コスト値に対する符号量の寄与率が大きくなるようにWeigh2の値を高めに設定すればよい。
Figure 0005850536
Here, Dist represents an error value such as SAD, SSD, WSAD, WSSD, Rate represents a code amount, and Weight 2 represents a weight coefficient. Again, the trade-off between image quality and code amount can be controlled by adjusting the value of Weight2. For example, if the code amount is to be significantly reduced even if the image quality is somewhat deteriorated, the value of Weigh2 may be set higher so that the contribution rate of the code amount to the cost value is increased.

図3は、実施例2における変換係数補正111Aについて、その詳細の一例を示したものである。変換係数補正部111Aは、実施例1の変換係数補正部111に替えて設けられるものであり、補正係数候補を生成する補正係数候補生成部301と、補正係数候補と変換係数を足し合わせるための加算器302と、変換係数に対して符号化を行う可変長符号化部303と、変換係数を復号化するための逆量子化処理部304と、量子化前の変換係数と復号化済み変換係数の差分値を計算するための誤差計算部305と、コスト計算を行うためのコスト評価部306と、コスト最小の補正係数候補を格納するための最適補正係数格納部307と、最適な補正係数を用いて変換係数を補正する加算部308を有する。   FIG. 3 shows an example of the details of the conversion coefficient correction 111A in the second embodiment. The conversion coefficient correction unit 111A is provided in place of the conversion coefficient correction unit 111 of the first embodiment. The conversion coefficient correction unit 111A generates a correction coefficient candidate and adds the correction coefficient candidate and the conversion coefficient. An adder 302; a variable length coding unit 303 that performs coding on the transform coefficient; an inverse quantization processing unit 304 for decoding the transform coefficient; a transform coefficient before quantization and a decoded transform coefficient An error calculation unit 305 for calculating the difference value, a cost evaluation unit 306 for performing cost calculation, an optimal correction coefficient storage unit 307 for storing a correction coefficient candidate with the lowest cost, and an optimal correction coefficient An adder 308 is used to correct the conversion coefficient.

補正係数候補生成部301は、補正係数候補を生成して1つずつ加算部302へ送る。加算部302では、取得した補正係数候補を量子化処理部110から送られてきた量子化済み変換係数と足し合わせて、可変長符号化部303および逆量子化処理部304へ送る。可変長符号化部303では、送られてきた補正後係数候補に対して符号化を行い、符号量を計測してコスト評価部306へ送る。一方で、逆量子化処理部304では、同じ補正後係数候補に対して逆量子化を施して変換係数を復号し、誤差計算部305へ送る。誤差計算部305では、[式1][式2][式4][式5]等により変換係数の復号値と量子化前変換係数の誤差計算を行い、コスト評価部306へ送る。   The correction coefficient candidate generation unit 301 generates correction coefficient candidates and sends them to the addition unit 302 one by one. The adding unit 302 adds the acquired correction coefficient candidate to the quantized transform coefficient sent from the quantization processing unit 110 and sends it to the variable length coding unit 303 and the inverse quantization processing unit 304. The variable length coding unit 303 performs coding on the received corrected coefficient candidate, measures the amount of code, and sends the code amount to the cost evaluation unit 306. On the other hand, the inverse quantization processing unit 304 performs inverse quantization on the same corrected coefficient candidate, decodes the transform coefficient, and sends it to the error calculation unit 305. The error calculation unit 305 calculates an error between the decoded value of the transform coefficient and the pre-quantization transform coefficient using [Expression 1], [Expression 2], [Expression 4], [Expression 5], and the like, and sends the result to the cost evaluation unit 306.

コスト評価部306では、送られてきた符号量と誤差情報を用いて[式6]等の計算式にてコスト計算を行い、これまでに計算されたどの補正係数候補のコストよりも小さければ、その補正係数とコスト値を最適補正係数格納部307へ送る。補正係数候補生成部301が出すすべての候補に対して上記処理を完了した時点で、最適補正係数格納部307に格納されている補正係数は加算部308へと送られ、量子化処理部110から送られてくる量子化済み変換係数と足し合わされて補正済み変換係数として可変長符号化部112へと送られる。   The cost evaluation unit 306 performs cost calculation using a calculation formula such as [Formula 6] using the transmitted code amount and error information, and if it is smaller than the cost of any correction coefficient candidate calculated so far, The correction coefficient and the cost value are sent to the optimum correction coefficient storage unit 307. When the above processing is completed for all candidates issued by the correction coefficient candidate generation unit 301, the correction coefficient stored in the optimal correction coefficient storage unit 307 is sent to the addition unit 308, and the quantization processing unit 110 It is added to the quantized transform coefficient that is sent and sent to the variable length coding unit 112 as a corrected transform coefficient.

図15は、実施例2における補正係数の決定処理手順について説明している。まず、補正係数の候補を1つ算出し(1501)、量子化済み変換係数と足し合わせて補正後係数候補を生成する(1502)。さらに、補正後係数候補に対して可変長符号化を施して符号量を計算する一方(1503)、同じ補正後係数候補に対して逆量子化を施して変換係数の復号値を取得する(1504)。これと量子化前変換係数との誤差を計算し(1505)、上記符号量と誤差情報を用いてコスト計算を行う(1506)。さらに、算出されたコスト値がこれまでで最小なら(1507)、補正係数とコスト値を更新する(1508)。上記処理をすべての補正係数候補に対して終了すれば、コストが最小となる係数を最適な補正係数として補正係数の決定処理を終了する。   FIG. 15 illustrates a correction coefficient determination process procedure according to the second embodiment. First, one correction coefficient candidate is calculated (1501) and added to the quantized transform coefficient to generate a corrected coefficient candidate (1502). Further, variable length coding is performed on the corrected coefficient candidates to calculate a code amount (1503), while inverse quantization is performed on the same corrected coefficient candidates to obtain a decoded coefficient decoding value (1504). ). The error between this and the pre-quantization transform coefficient is calculated (1505), and the cost is calculated using the code amount and the error information (1506). Furthermore, if the calculated cost value is the smallest so far (1507), the correction coefficient and the cost value are updated (1508). When the above process is completed for all the correction coefficient candidates, the correction coefficient determination process ends with the coefficient having the smallest cost as the optimal correction coefficient.

実施例2による補正係数探索処理でもなお、補正係数候補のそれぞれについて補正処理、逆量子化、可変長符号化を行う必要があった。本実施例3では、さらに逆量子化を行うことなく探索処理を可能にする方法について示す。
図16に、実施例3による補正係数探索処理について示す。まず、補正係数の候補1601の中から一つを選び1602)、量子化済みDCT係数603に足し合わせて補正後係数候補1604を生成する。続いて、補正係数候補1602の大きさを計算する1605。補正係数候補の大きさとしては、補正係数行列の各要素の絶対値和SAE(um of Absolute Element)や、低周波数成分に大きな重みを設定した重みつき絶対値和WSAE(Weighted SAE)を利用すると効果的である。
Even in the correction coefficient search processing according to the second embodiment, it is necessary to perform correction processing, inverse quantization, and variable length coding for each correction coefficient candidate. In the third embodiment, a method for enabling search processing without performing inverse quantization will be described.
FIG. 16 shows correction coefficient search processing according to the third embodiment. First, one of the correction coefficient candidates 1601 is selected 1602) and added to the quantized DCT coefficient 603 to generate a corrected coefficient candidate 1604. Subsequently, the size of the correction coefficient candidate 1602 is calculated 1605. As the size of the correction coefficient candidate, use the absolute value sum SAE (um of Absolute Element) of each element of the correction coefficient matrix or the weighted absolute value sum WSAE (Weighted SAE) in which a large weight is set for the low frequency component. It is effective.

Figure 0005850536
Figure 0005850536
ただし、s(i,j)は補正係数候補1602の(i,j)成分を、関数W(i,j)は、iおよびjが大きいほど値が小さくなる関数であるとする。一方、補正後係数候補1404に対して一次元展開を行い、VLCを施して符号量1607を計測する。最後に、計測した補正係数の大きさ1605と符号量1607をもとにコスト計算を行う。ここでは、例えば以下に示すコスト値を利用すると効果的である。
Figure 0005850536
ただし、DistはSAEやWSAEなどの補正係数候補の大きさ、Rateは符号量、Weight3は重み係数を表す。ここでも、Weight3の値を調整することにより、画質と符号量のトレードオフを制御することができる。例えば画質を多少劣化させても符号量を大幅に低下させたければ、コスト値に対する符号量の寄与率が大きくなるようにWeigh3の値を高めに設定すればよい。
Figure 0005850536
Figure 0005850536
Here, s (i, j) is the (i, j) component of the correction coefficient candidate 1602, and the function W (i, j) is a function that decreases in value as i and j increase. On the other hand, one-dimensional expansion is performed on the corrected coefficient candidate 1404, and VLC is applied to measure the code amount 1607. Finally, cost calculation is performed based on the measured correction coefficient size 1605 and code amount 1607. Here, for example, it is effective to use the cost values shown below.
Figure 0005850536
However, Dist represents the size of a correction coefficient candidate such as SAE or WSAE, Rate represents a code amount, and Weight 3 represents a weighting coefficient. Again, the tradeoff between image quality and code amount can be controlled by adjusting the value of Weight3. For example, if the code amount is to be significantly reduced even if the image quality is somewhat deteriorated, the value of Weigh3 may be set higher so that the contribution rate of the code amount to the cost value is increased.

図4は、本実施例3における変換係数補正部111Bについて、その詳細の一例を示したものである。変換係数補正部111Bは、補正係数候補を生成する補正係数候補生成部401と、補正係数候補の大きさを計算するための補正係数加算器402と、補正係数候補と変換係数を足し合わせるための加算器403と、変換係数に対して符号化を行う可変長符号化部404と、コスト計算を行うためのコスト評価部405と、コスト最小の補正係数候補を格納するための最適補正係数格納部406と、最適な補正係数を用いて変換係数を補正する加算部407を有する。   FIG. 4 shows an example of the details of the conversion coefficient correction unit 111B in the third embodiment. The conversion coefficient correction unit 111B includes a correction coefficient candidate generation unit 401 that generates a correction coefficient candidate, a correction coefficient adder 402 that calculates the size of the correction coefficient candidate, and a combination of the correction coefficient candidate and the conversion coefficient. An adder 403, a variable length coding unit 404 that performs coding on the transform coefficient, a cost evaluation unit 405 for performing cost calculation, and an optimum correction coefficient storage unit for storing a correction coefficient candidate with the minimum cost 406 and an adder 407 that corrects the conversion coefficient using an optimal correction coefficient.

補正係数候補生成部401は、補正係数候補を生成して1つずつ加算部402へ送る。加算部402では、取得した補正係数候補を量子化処理部110から送られてきた量子化済み変換係数と足し合わせて、補正係数加算部403および可変長符号化部404へ送る。補正係数加算部403では、[式7][式8]等により補正係数候補の大きさを計算し、コスト評価部407へ送る。
可変長符号化部404では、補正後係数候補に対して符号化を行い、符号量を計測してコスト評価部405へ送る。コスト評価部405では、送られてきた符号量と補正係数候補の大きさを用いて[式9]等の計算式にてコスト計算を行い、これまでに計算されたどの補正係数候補のコストよりも小さければ、その補正係数とコスト値を最適補正係数格納部406へ送る。補正係数候補生成部401が出すすべての候補に対して上記処理を完了した時点で、最適補正係数格納部406に格納されている補正係数は加算部407へと送られ、量子化処理部110から送られてくる量子化済み変換係数と足し合わされて補正済み変換係数として可変長符号化部112へと送られる。
The correction coefficient candidate generation unit 401 generates correction coefficient candidates and sends them one by one to the addition unit 402. The adding unit 402 adds the obtained correction coefficient candidate to the quantized transform coefficient sent from the quantization processing unit 110, and sends it to the correction coefficient adding unit 403 and the variable length coding unit 404. The correction coefficient addition unit 403 calculates the size of the correction coefficient candidate using [Equation 7], [Equation 8], and the like, and sends it to the cost evaluation unit 407.
The variable length encoding unit 404 encodes the corrected coefficient candidate, measures the code amount, and sends the code amount to the cost evaluation unit 405. The cost evaluation unit 405 performs cost calculation using a calculation formula such as [Equation 9] using the received code amount and the size of the correction coefficient candidate, and from any correction coefficient candidate cost calculated so far. If smaller, the correction coefficient and the cost value are sent to the optimum correction coefficient storage unit 406. When the above processing is completed for all candidates issued by the correction coefficient candidate generation unit 401, the correction coefficient stored in the optimal correction coefficient storage unit 406 is sent to the addition unit 407, and is sent from the quantization processing unit 110. It is added to the quantized transform coefficient that is sent and sent to the variable length coding unit 112 as a corrected transform coefficient.

図17は、実施例3における補正係数の決定処理手順について説明している。まず、補正係数の候補を1つ算出し(1701)、量子化済み変換係数と足し合わせて補正後係数候補を生成する(1702)。さらに、補正後係数候補に対して可変長符号化を施して符号量を計算する一方(1703)、補正係数候補の大きさを算出する(1704)。続いて上記符号量と補正係数の大きさを用いてコスト計算を行う(1705)。算出されたコスト値がこれまでで最小なら(1706)、補正係数とコスト値を更新する(1707)。上記処理をすべての補正係数候補に対して終了すれば、コストが最小となる係数を最適な補正係数として補正係数の決定処理を終了する。   FIG. 17 illustrates a correction coefficient determination processing procedure in the third embodiment. First, one correction coefficient candidate is calculated (1701) and added to the quantized transform coefficient to generate a corrected coefficient candidate (1702). Further, variable length coding is performed on the corrected coefficient candidate to calculate the code amount (1703), while the size of the correction coefficient candidate is calculated (1704). Subsequently, cost calculation is performed using the code amount and the correction coefficient (1705). If the calculated cost value is the smallest so far (1706), the correction coefficient and the cost value are updated (1707). When the above process is completed for all the correction coefficient candidates, the correction coefficient determination process ends with the coefficient having the smallest cost as the optimal correction coefficient.

上記の実施例1〜3実施例で使用される重み関数W(i,j)は、どのようなものでも構わないが、以下にその一例を示す。

Figure 0005850536
Any weighting function W (i, j) may be used in the first to third embodiments, but an example is shown below.
Figure 0005850536

図1は、実施例4に係る動画像符号化装置のブロック図であり、実施例1の動画像符号化装置に、第1パス符号化部11と、選択部12を追加し、明示的に2パス符号化を行う構成が示されている。 FIG. 19 is a block diagram of the video encoding device according to the fourth embodiment. A first pass encoding unit 1 2 1 and a selection unit 1 2 2 are added to the video encoding device according to the first embodiment. However, a configuration in which two-pass coding is explicitly performed is shown.

第1パス符号化部11は、DCT係数の補正を行わない従来のH.264符号化ストリームを出力する部分であり、ブロック分割部103〜量子化処理部110及び逆量子化処理部113〜参照画像メモリ116の構成を備えている。以下、ブロック分割部103〜参照画像メモリ116の構成を、便宜的に第2パス符号化部と呼ぶ。本例では、第1及び第2パス符号化部はCABACが利用できる。
第1パス符号化部11はまた、符号化中に決定した各種符号化パラメータ、動き情報等を、第2パス符号化部のために出力する。
The first pass encoding unit 1 2 1 is a part that outputs a conventional H.264 encoded stream that does not perform DCT coefficient correction, and is a block division unit 103 to a quantization processing unit 110 and an inverse quantization processing unit 113. The configuration of a reference image memory 116 is provided. Hereinafter, the configuration of the block division unit 103 to the reference image memory 116 is referred to as a second pass encoding unit for convenience. In this example, CABAC can be used for the first and second pass encoding units.
The first pass encoding unit 1 2 1 also outputs various encoding parameters, motion information, and the like determined during encoding for the second pass encoding unit.

選択部12は、マクロブロック単位或いはそれよりも大きな単位(以下、選択単位と呼ぶ)で、第1パス符号化部11と第2パス符号化部(可変長符号化部112から入力される符号化ストリームの内、望ましい一方を選択して出力するとともに、選択されたパスの符号化結果を他方のパスの参照画像メモリにコピーするなどして、第1及び第2パスとの間で参照画像を同じに保つ制御を行う。
選択部12は、コスト評価部207と同様のコスト評価部247を有しており、コスト評価部247は、入力画像メモリから読み出した原画像と、各パスの参照画像メモリなどから読み出した符号化結果の部分画像とから、各パスの歪みを計測するとともに、各パスの符号化ストリームの量を計測し、R−D最適化等の手法に基づき、どちらのパスのコストが低いかを判断する。歪は、視覚特性を考慮して計測することが望ましく、視覚的に重要でない画像領域であることが分っている場合、第2パス符号化部を一時的に停止させてもよい。
The selection unit 1 2 2 is a macroblock unit or a larger unit (hereinafter referred to as a selection unit), and includes a first pass encoding unit 1 2 1 and a second pass encoding unit (from the variable length encoding unit 112). Among the input encoded streams, a desired one is selected and output, and the encoding result of the selected pass is copied to the reference image memory of the other pass, and so on. Control to keep the reference image the same between them.
The selection unit 1 2 2 includes a cost evaluation unit 247 similar to the cost evaluation unit 207. The cost evaluation unit 247 reads the original image read from the input image memory, the reference image memory of each path, and the like. The distortion of each path is measured from the partial image of the encoding result, and the amount of the encoded stream of each path is measured. Based on a technique such as RD optimization, which path has the lower cost. to decide. The distortion is preferably measured in consideration of visual characteristics, and when it is known that the image area is not visually important, the second pass encoding unit may be temporarily stopped.

次に、本例の動作を説明する。
第2パス符号化部は、第1パス符号化部11よりも1ブロックから選択単位程度の時間遅れて動作し、第1パス符号化部11の符号化結果(レートと歪、マクロブロックのパーティショニング、ブロックの予測モード選択など)を参照しつつ、より高い効率を目指してチューニングされた符号化を行う。
DCT係数の補正はチューニングの対象の1つであり、各ブロックで常に行う必要なく、第1パスにおいて選択単位中でコストが顕著に大きかった1つのブロックのみで行うようにしてもよい。また1つのブロックにおいて補正係数703を試行する回数は1回だけにしてもよく、その場合は確実に符号量或いは歪の低減が期待できる補正係数を用いることが望ましい。
選択単位は一例として、レート制御におけるBasic Unitの様な、1ないし複数のマクロブロックからなる単位とすることができる。
Next, the operation of this example will be described.
The second pass encoding unit operates with a time delay of about 1 unit from the first block encoding unit 1 2 1 by a selection unit, and the encoding result (rate and distortion, first pass encoding unit 1 2 1). Referring to macro block partitioning, block prediction mode selection, and the like), encoding that is tuned for higher efficiency is performed.
The correction of the DCT coefficient is one of the objects to be tuned, and does not always have to be performed in each block, but may be performed in only one block whose cost is remarkably large in the selection unit in the first pass. Further, the correction coefficient 703 may be tried once in one block. In that case, it is desirable to use a correction coefficient that can reliably reduce the code amount or distortion.
For example, the selection unit may be a unit composed of one or a plurality of macroblocks such as a basic unit in rate control.

上記の実施例1〜3では、どれも予測および周波数変換をブロック単位で行っているが、それ以外にも例えば画像の背景から分離したオブジェクト単位で算出しても良い。また、周波数変換の一例としてDCTを挙げているが、DST(Discrete Sine Transformation:離散サイン変換)、WT(Wavelet Transformation:ウェーブレット変換)、DFT(Discrete Fourier Transformation:離散フーリエ変換)、KLT(Karhunen-Loeve Transformation:カルーネン-レーブ変換)など、画素間相関除去に利用する直交変換ならどんなものでも構わない。
これらの実施例では、図7のように量子化後のDCT係数に対して補正を行うものとして説明したが、図19に示すように、量子化前のDCT係数に対して補正を行っても良い。この場合、量子化前のDCT係数1801に対して補正係数探索1802を行い、得られた補正係数1803を量子化前DCT係数に足し合わせることによりDCT係数の補正を行う。補正済みDCT係数1804に対しては、通常の符号化処理(量子化、1次元展開、VLC)を行い、符号語を生成する。
また、例えばMPEG-1やMPEG-2のイントラ符号化のように、特に予測を行わずに原画像に対して周波数変換を施しても構わない。可変長符号化も特に行わなくて良い。
In the first to third embodiments, prediction and frequency conversion are performed in units of blocks. However, for example, calculation may be performed in units of objects separated from the background of an image. In addition, DCT is cited as an example of frequency transformation. DST (Discrete Sine Transformation), WT (Wavelet Transformation), DFT (Discrete Fourier Transformation), KLT (Karhunen-Loeve) Any transformation can be used as long as it is an orthogonal transformation used to remove correlation between pixels, such as Transformation (Karunen-Reeve transformation).
In these embodiments, the description has been made assuming that the DCT coefficient after quantization is corrected as shown in FIG. 7, but the DCT coefficient before quantization is corrected as shown in FIG. good. In this case, the correction coefficient search 1802 is performed on the DCT coefficient 1801 before quantization, and the DCT coefficient is corrected by adding the obtained correction coefficient 1803 to the DCT coefficient before quantization. The corrected DCT coefficient 1804 is subjected to normal encoding processing (quantization, one-dimensional expansion, VLC) to generate a code word.
Further, for example, frequency conversion may be performed on the original image without performing prediction, such as intra coding of MPEG-1 or MPEG-2. There is no need to perform variable length coding.

本発明は、H.261、MPEG-1、H.262/MPEG-2、MPEG-4、H.263、H.264/AVCなど周波数変換を用いる方式ならどのような動画像符号化方式にも適用できるだけでなく、JPEG、JPEG-2000など周波数変換を用いる静止画像符号化方式にも適用可能である。また、画像だけでなく、周波数変換と可変長符号化を組み合わせて用いる音声符号化などにも適用可能である。   The present invention can be applied to any moving image encoding method as long as it uses a frequency conversion method such as H.261, MPEG-1, H.262 / MPEG-2, MPEG-4, H.263, and H.264 / AVC. Not only can it be applied, but it can also be applied to still image coding systems that use frequency conversion such as JPEG and JPEG-2000. Further, it can be applied not only to images but also to voice coding using a combination of frequency conversion and variable length coding.

101…原画像、102…入力画像メモリ、103…ブロック分割部、104…動き探索部、105…画面内予測部、106…画面間予測部、107…モード選択部、108…現残部、109…周波数変換部、110…量子化処理部、111…変換係数補正部、112…可変長符号化部、113…逆量子化処理部、114…逆周波数変換部、115…加算部、116…参照画像メモリ、201…補正係数候補生成部、202…加算部、203…可変長符号化部、204…逆量子化処理部、205…逆周波数変換部、206…誤差計算部、207…コスト評価部、208…最適補正係数格納部、209…加算部。   DESCRIPTION OF SYMBOLS 101 ... Original image, 102 ... Input image memory, 103 ... Block division part, 104 ... Motion search part, 105 ... In-screen prediction part, 106 ... Inter-screen prediction part, 107 ... Mode selection part, 108 ... Current remaining part, 109 ... Frequency conversion unit, 110 ... quantization processing unit, 111 ... transform coefficient correction unit, 112 ... variable length coding unit, 113 ... inverse quantization processing unit, 114 ... inverse frequency conversion unit, 115 ... addition unit, 116 ... reference image Memory 201: Correction coefficient candidate generation unit 202 ... Addition unit 203 ... Variable length coding unit 204 ... Inverse quantization processing unit 205 ... Inverse frequency conversion unit 206 ... Error calculation unit 207 ... Cost evaluation unit 208: Optimal correction coefficient storage unit, 209: Adder unit.

Claims (5)

予測差分もしくは原画像に対して周波数変換を行う周波数変換部と、該周波数変換部が出力する変換係数に対して量子化を行う量子化部と、該変換係数に対して補正を行う変換係数補正部と、該補正された変換係数に対し符号の発生確率に応じた符号化を施す可変長符号化部とを有し、
該変換係数補正部は、該補正に用いる値として複数の候補を生成し、該複数の候補の中から可変長符号化の効率が最も高くなる1つの候補を探索し、該1つの候補を補正値として量子化前もしくは量子化後の前記変換係数に加算して補正を行い、
前記可変長符号化部は、該補正された前記変換係数に符号化を施して、符号化ストリームとして出力することを特徴とする画像符号化装置。
A frequency conversion unit that performs frequency conversion on the prediction difference or the original image, a quantization unit that performs quantization on the conversion coefficient output from the frequency conversion unit, and a conversion coefficient correction that corrects the conversion coefficient And a variable length coding unit that performs coding according to the probability of code generation for the corrected transform coefficient,
The transform coefficient correction unit generates a plurality of candidates as values to be used for the correction, searches for one candidate having the highest variable-length coding efficiency from the plurality of candidates, and corrects the one candidate Perform correction by adding to the transform coefficient before or after quantization as a value,
The variable length coding unit performs coding on the corrected transform coefficient and outputs the coded coefficient as an encoded stream.
前記変換係数補正部は、前記複数の候補のれぞれを、変換係数と同じサイズの行列として、遺伝的アルゴリズム若しくは勾配法によって動的に生成することを特徴とする請求項1記載の画像符号化装置。 The transform coefficient correcting unit, the their respective of said plurality of candidate, as a matrix of the same size as transform coefficients, an image of claim 1, wherein the dynamically generated by genetic algorithm or a gradient method Encoding device. 前記変換係数補正部は、前記補正値を探索する際に、補正された前記変換係数を可変長符号化した場合の符号量と、前記予測差分もしくは原画像と該補正され前記変換係数を逆量子化及び逆周波数変換したものとの間の歪み量とを、パラメータとしてコスト計算を行うことを特徴とする請求項1又は2記載の画像符号化装置。 The transform coefficient correction unit, when searching for the correction value, code amount when the corrected transform coefficient is variable-length encoded, the prediction difference or the original image, and the corrected transform coefficient is inversely quantized. The image coding apparatus according to claim 1 or 2, wherein a cost calculation is performed using a distortion amount between the image and the inverse frequency transformed as a parameter. 前記変換係数補正部は、最適な補正値を探索する際に、補正された前記変換係数を可変長符号化した場合の符号量と、前記周波数変換部が出力した変換係数と前記補正された前記変換係数を逆量子化したものとの間の歪み量とを、パラメータとしてコスト計算を行うことを特徴とする請求項1又は2記載の画像符号化装置。 The transform coefficient correction unit, when searching for an optimal correction value, the code amount when the corrected transform coefficient is variable-length encoded, the transform coefficient output by the frequency transform unit, and the corrected strain amount and an image coding apparatus according to claim 1 or 2, wherein the performing cost calculation as parameters between those transform coefficients dequantized. 前記変換係数補正部は、最適な補正値を探索する際に、補正された前記変換係数を可変長符号化した場合の符号量と、補正値の大きさをパラメータとしてコスト計算を行うことを特徴とする請求項1又は2記載の画像符号化装置。 The transform coefficient correction unit, when searching for an optimal correction value, performs cost calculation using the amount of code when the corrected transform coefficient is variable-length encoded and the magnitude of the correction value as parameters. The image encoding device according to claim 1 or 2.
JP2013505766A 2011-03-18 2011-08-25 Moving picture coding apparatus and moving picture coding method Active JP5850536B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013505766A JP5850536B2 (en) 2011-03-18 2011-08-25 Moving picture coding apparatus and moving picture coding method

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2011061501 2011-03-18
JP2011061501 2011-03-18
JP2013505766A JP5850536B2 (en) 2011-03-18 2011-08-25 Moving picture coding apparatus and moving picture coding method
PCT/JP2011/069162 WO2012127706A1 (en) 2011-03-18 2011-08-25 Video encoding device and video encoding method

Publications (2)

Publication Number Publication Date
JPWO2012127706A1 JPWO2012127706A1 (en) 2014-07-24
JP5850536B2 true JP5850536B2 (en) 2016-02-03

Family

ID=46878896

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013505766A Active JP5850536B2 (en) 2011-03-18 2011-08-25 Moving picture coding apparatus and moving picture coding method

Country Status (2)

Country Link
JP (1) JP5850536B2 (en)
WO (1) WO2012127706A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5937946B2 (en) * 2012-10-16 2016-06-22 日本電信電話株式会社 Image encoding device, image decoding device, image encoding method, image decoding method, image encoding program, and image decoding program
JP6357073B2 (en) * 2014-10-24 2018-07-11 日本電信電話株式会社 Image encoding method, image decoding method, image encoding program, and image decoding program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0730895A (en) * 1993-06-15 1995-01-31 Texas Instr Inc <Ti> Picture processor and its processing method
JPH10136359A (en) * 1996-10-24 1998-05-22 Sharp Corp Orthogonal transformation encoder
WO2006054507A1 (en) * 2004-11-19 2006-05-26 Matsushita Electric Industrial Co., Ltd. Moving-image encoding method, and moving-image decoding method
JP2008289134A (en) * 2007-04-20 2008-11-27 Panasonic Corp Coding rate converting apparatus, integrated circuit, and method, and program for the same
JP2009272792A (en) * 2008-05-02 2009-11-19 Victor Co Of Japan Ltd Moving image encoder, moving image decoder, moving image encoding program, and moving image decoding program
JP2010199959A (en) * 2009-02-25 2010-09-09 Nippon Telegr & Teleph Corp <Ntt> Image-coding apparatus, image-coding method and image-coding program
WO2011016250A1 (en) * 2009-08-06 2011-02-10 パナソニック株式会社 Encoding method, decoding method, encoding device and decoding device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0730895A (en) * 1993-06-15 1995-01-31 Texas Instr Inc <Ti> Picture processor and its processing method
JPH10136359A (en) * 1996-10-24 1998-05-22 Sharp Corp Orthogonal transformation encoder
WO2006054507A1 (en) * 2004-11-19 2006-05-26 Matsushita Electric Industrial Co., Ltd. Moving-image encoding method, and moving-image decoding method
JP2008289134A (en) * 2007-04-20 2008-11-27 Panasonic Corp Coding rate converting apparatus, integrated circuit, and method, and program for the same
JP2009272792A (en) * 2008-05-02 2009-11-19 Victor Co Of Japan Ltd Moving image encoder, moving image decoder, moving image encoding program, and moving image decoding program
JP2010199959A (en) * 2009-02-25 2010-09-09 Nippon Telegr & Teleph Corp <Ntt> Image-coding apparatus, image-coding method and image-coding program
WO2011016250A1 (en) * 2009-08-06 2011-02-10 パナソニック株式会社 Encoding method, decoding method, encoding device and decoding device

Also Published As

Publication number Publication date
WO2012127706A1 (en) 2012-09-27
JPWO2012127706A1 (en) 2014-07-24

Similar Documents

Publication Publication Date Title
RU2543519C2 (en) Method and apparatus for image encoding and decoding using large transformation unit
TWI542203B (en) Method for decoding video
KR101818997B1 (en) Methods of encoding and decoding using multi-level prediction and apparatuses for using the same
US9014260B2 (en) Method and apparatus for encoding images, and method and apparatus for decoding encoded images
US8144770B2 (en) Apparatus and method for encoding moving picture
JP5717465B2 (en) Moving picture coding apparatus and moving picture coding method
JP2007166617A (en) Method and device for intra prediction coding and decoding of image
JP2006140758A (en) Method, apparatus and program for encoding moving image
JP2013502140A (en) Video encoding and decoding method and apparatus using adjustment of accuracy of motion vector
KR20110045950A (en) Method and apparatus for encoding/decoding image by referencing to a plurality of frames
JP2011124846A (en) Image encoding device
JP5850536B2 (en) Moving picture coding apparatus and moving picture coding method
JP6360214B2 (en) Video decoding method
JP5832263B2 (en) Image coding apparatus and image coding method
JP2009049969A (en) Device and method of coding moving image and device and method of decoding moving image
JP5713719B2 (en) Video encoding device
JP2012134632A (en) Image decoding device, image decoding method, and program
CA2803202C (en) Methods and devices for data compression using adaptive reconstruction levels
JP7406208B2 (en) Encoding device, encoding method and program
WO2022164853A1 (en) Dynamically biasing mode selection in video encoding
JP2007243859A (en) Image encoding apparatus and image encoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150730

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150911

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151109

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20151126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151127

R150 Certificate of patent or registration of utility model

Ref document number: 5850536

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250