JP2008061122A - Control device, control method, encoder, and program - Google Patents

Control device, control method, encoder, and program Download PDF

Info

Publication number
JP2008061122A
JP2008061122A JP2006238109A JP2006238109A JP2008061122A JP 2008061122 A JP2008061122 A JP 2008061122A JP 2006238109 A JP2006238109 A JP 2006238109A JP 2006238109 A JP2006238109 A JP 2006238109A JP 2008061122 A JP2008061122 A JP 2008061122A
Authority
JP
Japan
Prior art keywords
quantization
image
unit
block
frequency component
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
JP2006238109A
Other languages
Japanese (ja)
Inventor
Tatsuo Fujiwara
達雄 藤原
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2006238109A priority Critical patent/JP2008061122A/en
Publication of JP2008061122A publication Critical patent/JP2008061122A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent deterioration in image quality of a decoded image obtained by encoding and decoding an image to which editing such as dithering is applied. <P>SOLUTION: A prediction unit 1 determines a prediction error between a source image and a predictive image, a conversion unit 2 converts the prediction error into a frequency component, and a quantization unit 43 quantizes the frequency component. On the other hand, a dithering information acquisition unit 41 acquires dithering information representing whether dithering is applied to the source image and on the basis of the dither information, a dithering quantization step control unit 42 controls a quantization step in the case where the quantization unit 43 quantizes the frequency component. The present invention may be applicable to an encoder which encodes an image using an encoding method compliant to H. 264/AVC or the like. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、制御装置、制御方法、符号化装置、及びプログラムに関し、特に、ディザ等の編集が施された画像を符号化して復号することにより得られる復号画像の画質の劣化を防止することができるようにする制御装置、制御方法、符号化装置、及びプログラムに関する。   The present invention relates to a control device, a control method, an encoding device, and a program, and in particular, can prevent deterioration in the image quality of a decoded image obtained by encoding and decoding an image that has been subjected to editing such as dithering. The present invention relates to a control device, a control method, an encoding device, and a program that can be used.

図1は、画像を符号化する従来の符号化装置の一例の構成を示している。   FIG. 1 shows a configuration of an example of a conventional encoding apparatus that encodes an image.

図1において、符号化装置は、予測部1、変換部2、量子化部3、生成部4、及びレート制御部5から構成されており、予測部1には、符号化の対象となる動画像である原画像が供給される。   In FIG. 1, the encoding device includes a prediction unit 1, a conversion unit 2, a quantization unit 3, a generation unit 4, and a rate control unit 5. The prediction unit 1 includes a moving image to be encoded. An original image, which is an image, is supplied.

予測部1は、そこに供給される原画像と、その原画像を予測した予測画像との予測誤差を求め、変換部2に供給する。   The prediction unit 1 obtains a prediction error between the original image supplied thereto and a prediction image obtained by predicting the original image, and supplies the prediction error to the conversion unit 2.

すなわち、予測部1は、そこに供給される原画像を、所定のブロックに分割し、原画像のブロックの予測画像を求める。そして、予測部1は、原画像のブロックから予測画像を減算することにより、原画像のブロックと予測画像との予測誤差を求め、ブロック単位で、変換部2に供給する。   That is, the prediction unit 1 divides the original image supplied thereto into predetermined blocks, and obtains a predicted image of the block of the original image. Then, the prediction unit 1 subtracts the prediction image from the block of the original image to obtain a prediction error between the block of the original image and the prediction image, and supplies the prediction error to the conversion unit 2 in units of blocks.

変換部2は、予測部1からの予測誤差のブロックを、周波数領域の情報である周波数成分のブロックに変換し、量子化部3に供給する。   The conversion unit 2 converts the prediction error block from the prediction unit 1 into a frequency component block that is information in the frequency domain, and supplies the block to the quantization unit 3.

ここで、予測誤差を周波数成分に変換する変換方法としては、例えば、DCT(Discrete Cosine Transform)やアダマール変換等の直交変換等を採用することができる。   Here, as a conversion method for converting a prediction error into a frequency component, for example, orthogonal transform such as DCT (Discrete Cosine Transform) or Hadamard transform can be employed.

量子化部3には、変換部2から周波数成分のブロックが供給される他、レート制御部5から量子化制御情報が供給される。   The quantization unit 3 is supplied with a block of frequency components from the conversion unit 2 and is also supplied with quantization control information from the rate control unit 5.

量子化部3は、レート制御部5から供給される量子化制御情報に基づいて、周波数成分を量子化するときの量子化ステップを決定し、その量子化ステップで、変換部2からのブロック単位の周波数成分を量子化して、その量子化の結果である量子化係数を、ブロック単位で、生成部4に供給する。   The quantization unit 3 determines a quantization step when quantizing the frequency component based on the quantization control information supplied from the rate control unit 5, and the block unit from the conversion unit 2 in the quantization step , And the quantized coefficient that is the result of the quantization is supplied to the generating unit 4 in units of blocks.

生成部4には、量子化部3から量子化係数が供給される他、レート制御部5から、量子化部3で量子化ステップを決定するのに用いられた量子化制御情報が供給される。   In addition to the quantization coefficient supplied from the quantization unit 3, the generation unit 4 is also supplied with quantization control information used to determine the quantization step in the quantization unit 3 from the rate control unit 5. .

生成部4は、量子化部3からのブロック単位の量子化係数と、レート制御部5からの量子化制御情報とを、少なくとも含む符号化ビットストリームを生成し、原画像の符号化結果として出力する。   The generation unit 4 generates an encoded bit stream including at least the block-unit quantization coefficient from the quantization unit 3 and the quantization control information from the rate control unit 5 and outputs the encoded bit stream as an original image encoding result. To do.

一方、レート制御部5は、生成部4が出力する符号化ビットストリームをモニタし、その符号化ビットストリームのレートに基づいて、量子化部3の量子化ステップを制御する。   On the other hand, the rate control unit 5 monitors the encoded bit stream output from the generation unit 4, and controls the quantization step of the quantization unit 3 based on the rate of the encoded bit stream.

すなわち、レート制御部5は、生成部4が出力する符号化ビットストリームのレートが高い場合には、そのレートを低くするため、量子化部3で粗い量子化(粗い量子化粒度の量子化)を行う量子化ステップが決定される量子化制御情報を生成する。また、レート制御部5は、生成部4が出力する符号化ビットストリームのレートが低い場合には、そのレートを高くするため、量子化部3で細かい量子化(細かい量子化粒度の量子化)を行う量子化ステップが決定される量子化制御情報を生成する。   That is, when the rate of the encoded bit stream output from the generation unit 4 is high, the rate control unit 5 performs coarse quantization (quantization with coarse quantization granularity) in the quantization unit 3 in order to reduce the rate. Quantization control information for determining a quantization step to perform is generated. Further, when the rate of the encoded bit stream output from the generation unit 4 is low, the rate control unit 5 performs fine quantization (quantization with a fine quantization granularity) in the quantization unit 3 in order to increase the rate. Quantization control information for determining a quantization step to perform is generated.

レート制御部5は、以上のように、生成部4が出力する符号化ビットストリームのレートに基づいて生成した量子化制御情報を、量子化部3に供給することにより、符号化ビットストリームのレートが、所定の値(所定の範囲内の値)となるように、量子化ステップを制御する。   As described above, the rate control unit 5 supplies the quantization control information generated based on the rate of the encoded bit stream output from the generation unit 4 to the quantization unit 3, thereby enabling the rate of the encoded bit stream. Is controlled to be a predetermined value (a value within a predetermined range).

なお、上述したように、レート制御部5が生成する量子化制御情報は、量子化部3の他、生成部4にも供給され、符号化ビットストリームに含められる。   Note that, as described above, the quantization control information generated by the rate control unit 5 is supplied to the generation unit 4 in addition to the quantization unit 3 and included in the encoded bitstream.

ところで、画像において、中間階調を擬似的に表現する手法として、ディザ(dither)がある。   By the way, there is a dither as a technique for representing an intermediate gradation in an image in a pseudo manner.

図2は、ディザを示している。   FIG. 2 shows the dither.

ディザとは、画素値が0以上の整数値をとる場合に、ある画素値vと、その画素値vと1だけ異なる画素値v+1(又は画素値v-1)とを、格子状(市松模様状)に配置し、画素値としては取り得ない、画素値vとv+1との中間値v+0.5(画素値vとv-1との中間値v-0.5)を擬似的に表現する手法であり、例えば、画像のある領域の画素値として、0と1とを格子状に配置することにより、その領域は、人には、画素値が0.5の領域として見える。   Dither is a pixel value v and a pixel value v + 1 (or pixel value v-1) that differs from the pixel value v by 1 when the pixel value takes an integer value of 0 or more. A pseudo-representation of an intermediate value v + 0.5 between pixel values v and v + 1 (an intermediate value v-0.5 between pixel values v and v-1) that cannot be taken as a pixel value. For example, by arranging 0 and 1 as a pixel value of a region of an image in a grid pattern, the region appears to a person as a region having a pixel value of 0.5.

ディザは、CG(Computer Graphics)や、CGと実際に撮影された画像との合成画像に施されることが多いが、近年においては、実際に撮影された画像に対しても、グラデーション等での階調表現を向上させるために、前処理(PreProcess)として、意図的に、ディザが施されることがある(例えば、非特許文献1を参照)。   Dither is often applied to CG (Computer Graphics) or a composite image of CG and the actually captured image. In order to improve gradation expression, dithering may be intentionally performed as preprocessing (PreProcess) (see, for example, Non-Patent Document 1).

ここで、例えば、ディザは、画像の量子化の粗さを緩和するために施されることがあるが、緩やかに階調が変化するグラデーション領域では、量子化ビットの切り替わりの部分の段差が目立ち、縞模様となって表示されることがある。かかる段差を検出する方法が、例えば、特許文献1に記載されている。   Here, for example, dithering may be performed to reduce the quantization roughness of the image. However, in the gradation area where the gradation changes gradually, the step at the quantization bit switching portion is conspicuous. , It may be displayed as a striped pattern. A method for detecting such a step is described in Patent Document 1, for example.

なお、ディザが施された画像では、上述のように、原則として、ある画素値vと、その画素値vと1だけ異なる画素値v+1とが、格子状に配置される。   In the dithered image, as described above, in principle, a certain pixel value v and a pixel value v + 1 that differs from the pixel value v by 1 are arranged in a grid pattern.

但し、ディザが施された画像がHD(High Definition)画像であり、そのHD画像の、例えば、水平方向に並ぶ1行の画素を、1行おきに間引くことにより、SD(Standard Definition)画像が生成された場合には、そのSD画像では、画素値vとv+1とが、格子状に配置されるのではなく、水平方向にのみ交互に配置され、垂直方向には、画素値v又はv+1だけが配置される。   However, the dithered image is an HD (High Definition) image, and the SD (Standard Definition) image is obtained by thinning out every other row of pixels in the HD image, for example, horizontally aligned. When generated, in the SD image, the pixel values v and v + 1 are not arranged in a grid pattern, but are arranged alternately only in the horizontal direction, and in the vertical direction, the pixel value v or v Only v + 1 is placed.

ディザが施されたHD画像の、垂直方向に並ぶ1列の画素を、1列おきに間引くことにより、SD画像が生成された場合も同様に、そのSD画像では、画素値vとv+1とが、格子状に配置されるのではなく、垂直方向にのみ交互に配置され、水平方向には、画素値v又はv+1だけが配置される。   Similarly, when an SD image is generated by thinning out every other column of pixels in the vertical direction of the dithered HD image, the pixel values v and v + 1 Are not arranged in a grid pattern, but are arranged alternately only in the vertical direction, and only the pixel values v or v + 1 are arranged in the horizontal direction.

以上のSD画像のように、画素値vとv+1とが、水平方向又は垂直方向の一方向のみに交互に配置されたような画像も、ディザが施された画像に含まれる。   An image in which the pixel values v and v + 1 are alternately arranged in only one direction in the horizontal direction or the vertical direction as in the above-described SD image is also included in the dithered image.

特開2006-154452号公報JP 2006-154452 JP

「マッハバンド除去システム〜M.A.P.S(マップス)〜サービス開始」、[online]、2005年8月17日、株式会社 IMAGICA、[平成18年8月22日検索]、インターネット〈URL:http://www.imagica.com/newsrelease/00069.html〉"Mach band removal system -MAPS-service start", [online], August 17, 2005, IMAGICA, Inc. [search August 22, 2006], Internet <URL: http: // www .imagica.com / newsrelease / 00069.html>

図1の符号化装置のように、予測誤差を周波数成分に変換し、その周波数成分を量子化することにより符号化を行う符号化装置の符号化対象である原画像に、ディザが施されている場合には、符号化の結果得られる符号化ストリームを復号することにより得られる復号画像の画質が劣化することがある。   As in the encoding apparatus of FIG. 1, the dither is applied to the original image that is the encoding target of the encoding apparatus that converts the prediction error into a frequency component and quantizes the frequency component. If so, the image quality of the decoded image obtained by decoding the encoded stream obtained as a result of encoding may deteriorate.

この復号画像の画質の劣化について、図3ないし図5を参照して説明する。   Deterioration of the image quality of the decoded image will be described with reference to FIGS.

図3及び図4は、ディザが施された原画像を符号化して復号する過程で得られるデータを示している。   3 and 4 show data obtained in the process of encoding and decoding the dithered original image.

例えば、いま、図1の符号化装置において、原画像が、横×縦(水平×垂直)が16×16画素の256画素のブロックの単位で符号化されることとし、符号化しようとしている原画像のブロックである注目ブロックの予測画像としては、既に符号化され、いわゆるローカルデコードされた、例えば、注目ブロックの左隣のブロックの画像が用いられることとする。   For example, in the encoding apparatus shown in FIG. 1, the original image is encoded in units of 256 pixel blocks of horizontal × vertical (horizontal × vertical) of 16 × 16 pixels. As a predicted image of a target block that is a block of an image, for example, an image of a block that is already encoded and so-called locally decoded, for example, a block adjacent to the left of the target block is used.

図3において、ブロックP1は、例えば、原画像の左端のブロックであり、ブロックP3は、例えば、原画像のブロックP1の右隣のブロックである。 In FIG. 3, the block P 1 is, for example, the leftmost block of the original image, and the block P 3 is, for example, the block on the right side of the block P 1 of the original image.

原画像のブロックP1及びP3では、いずれも、例えば、22の画素値と、その画素値と1だけ異なる23の画素値とが、水平方向にのみ交互に配置され、垂直方向には、22又23の画素値だけが配置されており、したがって、ディザが施されている。 In each of the blocks P 1 and P 3 of the original image, for example, 22 pixel values and 23 pixel values different from the pixel value by 1 are alternately arranged only in the horizontal direction, and in the vertical direction, Only 22 or 23 pixel values are arranged and therefore dithered.

ここで、水平方向に、22と23の画素値が交互に配置され、垂直方向に、22又23の画素値だけが配置されている原画像のブロックP1及びP3では、22と23の画素値が同一の数だけ存在するので、その画素値の平均値であるDC(Direct Current)成分は、22.5である。 Here, in the blocks P 1 and P 3 of the original image in which the pixel values of 22 and 23 are alternately arranged in the horizontal direction and only the pixel values of 22 or 23 are arranged in the vertical direction, Since there are the same number of pixel values, the DC (Direct Current) component that is the average value of the pixel values is 22.5.

ブロックP2は、原画像のブロックP1を、図1の符号化装置で符号化してローカルデコードすることにより得られた復号画像のブロックである。図3において、復号画像のブロックP2の画素値は、すべて22となっており、したがって、そのDC成分は、22である。 The block P 2 is a block of a decoded image obtained by encoding the block P 1 of the original image with the encoding device in FIG. 1 and performing local decoding. In FIG. 3, the pixel values of the block P 2 of the decoded image are all 22. Therefore, the DC component is 22.

いま、図1の符号化装置が、原画像のブロックP3を注目ブロックとして符号化をする場合には、予測部1は、原画像のブロックP3の左隣のブロックP1を符号化してローカルデコードした復号画像のブロックP2を、そのまま、原画像のブロックP3の予測画像P4として、予測誤差P5を求める。 If the encoding apparatus of FIG. 1 encodes the block P 3 of the original image as a target block, the prediction unit 1 encodes the block P 1 adjacent to the left of the block P 3 of the original image. the block P 2 of the decoded image locally decoded, as it is, as the predicted image P 4 blocks P 3 of the original image, obtains the prediction error P 5.

原画像のブロックP3では、上述したように、水平方向に、22と23の画素値が交互に配置され、垂直方向に、22又23の画素値だけが配置されており、予測画像P4は、上述したように、すべての画素値が22の復号画像のブロックP2であるので、そのような原画像のブロックP3と予測画像P4との予測誤差P5は、水平方向に、0と1の画素値が交互に配置され、垂直方向に、0又は1の画素値だけが配置されたブロックとなる。 In block P 3 of the original image, as described above, in the horizontal direction, pixel values of 22 and 23 are alternately arranged in the vertical direction, only the pixel value of 22 also 23 are arranged, the predicted image P 4 As described above, since all the pixel values are the decoded image block P 2 of 22, the prediction error P 5 between the block P 3 of the original image and the prediction image P 4 in the horizontal direction, A block in which pixel values of 0 and 1 are alternately arranged, and only pixel values of 0 or 1 are arranged in the vertical direction.

予測誤差P5は、変換部2で周波数成分に変換される。いま、変換部2が、周波数成分への変換として、例えば、DCT(2次元DCT)を行うこととすると、予測誤差P5は、大雑把には、ブロックP6のようなDCT係数のブロックに変換される。 The prediction error P 5 is converted into a frequency component by the conversion unit 2. Assuming that the conversion unit 2 performs, for example, DCT (two-dimensional DCT) as conversion to frequency components, the prediction error P 5 is roughly converted into a block of DCT coefficients such as the block P 6. Is done.

ここで、予測誤差P5は、水平方向に、0と1の画素値が交互に配置され、垂直方向に、0又は1の画素値だけが配置されたブロックであり、したがって、予測誤差P5では、0と1の画素値が同一の数だけ存在するので、DC成分は、0.5である。 Here, the prediction error P 5 is a block in which pixel values of 0 and 1 are alternately arranged in the horizontal direction and only pixel values of 0 or 1 are arranged in the vertical direction. Therefore, the prediction error P 5 In this case, since the same number of pixel values of 0 and 1 exist, the DC component is 0.5.

また、予測誤差P5では、0と1の画素値が交互に配置されているので、予測誤差P5は、16×16画素のブロックが有しうる最大の周波数成分(空間周波数成分)を有し、その大きさ(値の絶対値)は、1である。 Further, the prediction error P 5, 0 and so the first pixel values are arranged alternately, the prediction error P 5 is closed the largest frequency component blocks of 16 × 16 pixels can have an (spatial frequency components) The magnitude (absolute value) is 1.

このため、DCT係数のブロックP6においては、DC成分である左上のDCT係数が0.5に、最高の周波数成分である、例えば、右下のDCT係数が1に、他のDCT係数が0に、それぞれなっている。 Therefore, in block P 6 of the DCT coefficients, the DCT coefficients of the upper left 0.5 is a DC component, which is the highest frequency component, for example, the DCT coefficients of the lower right 1, the other DCT coefficients 0, Each has become.

量子化部3は、以上のようなDCT係数のブロックP6を量子化し、量子化係数のブロックP7を出力する。 The quantization unit 3 quantizes the DCT coefficient block P 6 as described above, and outputs a quantization coefficient block P 7 .

ここで、量子化部3では、例えば、人の視覚が、低周波数成分よりも高周波数成分に対して鈍感であること等を利用して、低周波数成分のDCT係数については、細かい量子化が行われ、高周波数成分のDCT係数については、粗い量子化が行われる。   Here, the quantization unit 3 uses, for example, the fact that human vision is less sensitive to high frequency components than low frequency components, and so on, for the DCT coefficients of low frequency components, fine quantization is performed. The coarse quantization is performed on the DCT coefficient of the high frequency component.

このため、量子化係数のブロックP7では、DCT係数のブロックP6の、DC成分である左上のDCT係数の0.5が、1に、最高の周波数成分である右下のDCT係数の1が、0に、他のDCT係数の0が、0に、それぞれ量子化されている。すなわち、量子化係数のブロックP7は、DC成分の量子化係数が1で、他の周波数成分(AC(Alternating Current)成分)の量子化係数が0のブロックとなる。 Therefore, in the quantization coefficient block P 7 , the DCT coefficient 0.5 of the upper left DCT coefficient of the DCT coefficient block P 6 is 1, and the lower right DCT coefficient 1 of the highest frequency component is 1, The other DCT coefficients 0 are quantized to 0 and 0, respectively. That is, the quantization coefficient block P 7 is a block in which the quantization coefficient of the DC component is 1 and the quantization coefficient of the other frequency component (AC (Alternating Current) component) is 0.

図1の符号化装置では、以上のような量子化係数のブロックP7を含む符号化ストリームが出力され、図示せぬ復号装置で復号される。 In the encoding device of FIG. 1, an encoded stream including the block P 7 of quantized coefficients as described above is output and decoded by a decoding device (not shown).

すなわち、復号装置では、量子化係数のブロックP7を、逆量子化して逆DCTすることにより、予測誤差P5に相当する、復号画像と予測画像との差分(以下、適宜、復号誤差という)が求められ、その復号誤差と予測画像とを加算することにより、復号画像が求められる。なお、ローカルデコードでも同様にして、復号画像が求められる。 That is, in the decoding apparatus, the difference between the decoded image and the predicted image corresponding to the prediction error P 5 (hereinafter, referred to as a decoding error as appropriate) is obtained by performing inverse quantization and inverse DCT on the block P 7 of the quantized coefficients. The decoded image is obtained by adding the decoding error and the predicted image. Note that a decoded image is obtained in the same manner in local decoding.

上述したように、量子化係数のブロックP7は、DC成分の量子化係数が1で、他の周波数成分の量子化係数が0のブロックであるため、そのような量子化係数のブロックP7が逆量子化されて逆DCTされることにより、例えば、画素値の平均値が1となる、画素値がすべて1の復号誤差のブロックP8が得られる。 As described above, the quantization coefficient block P 7 is a block in which the quantization coefficient of the DC component is 1 and the quantization coefficient of the other frequency component is 0. Therefore, the quantization coefficient block P 7 Is inversely quantized and subjected to inverse DCT, for example, a block P 8 with a decoding error of which the average value of the pixel values is 1 and the pixel values are all 1 is obtained.

また、量子化係数のブロックP7に符号化された原画像のブロックP3の予測画像P4は、上述したように、すべての画素値が22のブロックである。 Further, the predicted image P 4 blocks P 3 to the block P 7 coded original image quantized coefficients, as described above, a block of all the pixel values 22.

したがって、復号誤差のブロックP8と予測画像P4とを加算して得られる、原画像のブロックP3の復号画像のブロックP9は、画素値が、すべて23で、DC成分が23のブロックとなる。 Therefore, the decoded image block P 9 of the original image block P 3 obtained by adding the decoded error block P 8 and the predicted image P 4 has a pixel value of 23 and a DC component of 23. It becomes.

図1の符号化装置は、原画像のブロックP3の符号化後、その右隣のブロックを注目ブロックとして符号化を行うが、その符号化について、図4を参照して説明する。 The encoding apparatus in FIG. 1 encodes the block P 3 of the original image with the block on the right as the block of interest. The encoding will be described with reference to FIG.

図4において、原画像のブロックP11は、原画像のブロックP3(図3)の右隣のブロックであり、そのブロックP11では、図3の原画像のブロックP1及びP3と同様に、22の画素値と、その画素値と1だけ異なる23の画素値とが、水平方向にのみ交互に配置され、垂直方向には、22又23の画素値だけが配置されている。 In FIG. 4, the original image block P 11 is a block on the right side of the original image block P 3 (FIG. 3), and the block P 11 is the same as the original image blocks P 1 and P 3 of FIG. In addition, 22 pixel values and 23 pixel values different from the pixel value by 1 are alternately arranged only in the horizontal direction, and only 22 or 23 pixel values are arranged in the vertical direction.

したがって、原画像のブロックP11には、図3の原画像のブロックP1及びP3と同様に、ディザが施されており、そのDC成分は、22.5である。 Therefore, the original image block P 11 is dithered in the same manner as the original image blocks P 1 and P 3 in FIG. 3, and its DC component is 22.5.

図1の符号化装置が、原画像のブロックP11を注目ブロックとして符号化をする場合には、予測部1は、原画像のブロックP11の左隣のブロックP3(図3)を符号化してローカルデコードした復号画像のブロックP9を、そのまま、原画像のブロックP11の予測画像P12として、予測誤差P13を求める。 When the encoding apparatus in FIG. 1 encodes the original image block P 11 as a target block, the prediction unit 1 encodes the block P 3 (FIG. 3) adjacent to the left of the original image block P 11 . the block P 9 of the decoded image locally decoded turned into, as it is, as a predictive picture P 12 of the block P 11 of the original image, obtains the prediction error P 13.

原画像のブロックP11では、上述したように、水平方向に、22と23の画素値が交互に配置され、垂直方向に、22又23の画素値だけが配置されており、予測画像P12は、上述したように、すべての画素値が23の復号画像のブロックP9であるので、そのような原画像のブロックP11と予測画像P12との予測誤差P13は、水平方向に、-1と0の画素値が交互に配置され、垂直方向に、-1又は0の画素値だけが配置されたブロックとなる。 In block P 11 of the original image, as described above, in the horizontal direction, pixel values of 22 and 23 are alternately arranged in the vertical direction, only the pixel value of 22 also 23 are arranged, the predicted image P 12 As described above, since all the pixel values are the decoded image block P 9 of 23, the prediction error P 13 between the block P 11 of the original image and the prediction image P 12 is in the horizontal direction, The pixel values of -1 and 0 are alternately arranged, and only the pixel values of -1 or 0 are arranged in the vertical direction.

予測誤差P13は、変換部2でDCTされ、その結果、大雑把には、ブロックP14のようなDCT係数のブロックに変換される。 The prediction error P 13 is DCTed by the conversion unit 2, and as a result, is roughly converted into a block of DCT coefficients such as the block P 14 .

ここで、予測誤差P13は、水平方向に、-1と0の画素値が交互に配置され、垂直方向に、-1又は0の画素値だけが配置されたブロックであり、したがって、予測誤差P13では、-1と0の画素値が同一の数だけ存在するので、DC成分は、-0.5である。 Here, the prediction error P 13 is the horizontal direction, pixel values of -1 and 0 are alternately arranged in the vertical direction, a block in which only the pixel value of -1 or 0 is placed, therefore, the prediction error in P 13, the pixel values of -1 and 0 are present by the same number, DC component is -0.5.

また、予測誤差P13では、-1と0の画素値が交互に配置されているので、予測誤差P13は、16×16画素のブロックが有しうる最高の周波数成分(空間周波数成分)を有し、その大きさ(値の絶対値)は、1である。 Further, the prediction error P 13, the pixel values of -1 and 0 are alternately arranged, the prediction error P 13 is the highest frequency component blocks of 16 × 16 pixels can have an (spatial frequency components) And its magnitude (absolute value) is 1.

このため、DCT係数のブロックP14においては、DC成分である左上のDCT係数が-0.5に、最高の空間周波数成分である、例えば、右下のDCT係数が-1に、他のDCT係数が0に、それぞれなっている。 Therefore, in block P 14 of the DCT coefficient is the DCT coefficient at the upper left is a DC component -0.5, the highest spatial frequency components, for example, the DCT coefficients of the lower right -1, the other DCT coefficients 0, respectively.

量子化部3は、以上のようなDCT係数のブロックP14を量子化し、量子化係数のブロックP15を出力する。 The quantization unit 3 quantizes the DCT coefficient block P 14 as described above, and outputs a quantization coefficient block P 15 .

図3で説明したように、量子化部3では、低周波数成分のDCT係数については、細かい量子化が行われ、高周波数成分のDCT係数については、粗い量子化が行われる。   As described with reference to FIG. 3, the quantization unit 3 performs fine quantization on the low-frequency component DCT coefficients, and performs coarse quantization on the high-frequency component DCT coefficients.

このため、量子化係数のブロックP15では、DCT係数のブロックP14の、DC成分である左上のDCT係数の-0.5が、-1に、最高の空間周波数成分である右下のDCT係数の-1が、0に、他のDCT係数の0が、0に、それぞれ量子化されている。すなわち、量子化係数のブロックP15は、DC成分の量子化係数が-1で、他の周波数成分(AC成分)の量子化係数が0のブロックとなる。 For this reason, in the quantization coefficient block P 15 , the DC component of the upper left DCT coefficient −0.5 of the DCT coefficient block P 14 is −1, and the DCM coefficient of the lower right DCT coefficient of the highest spatial frequency component is −1. -1 is quantized to 0, and 0 of other DCT coefficients are quantized to 0, respectively. That is, the quantization coefficient block P 15 is a block in which the quantization coefficient of the DC component is −1 and the quantization coefficient of the other frequency component (AC component) is 0.

図1の符号化装置では、以上のような量子化係数のブロックP15を含む符号化ストリームが出力され、図示せぬ復号装置で復号される。 In the encoding apparatus of FIG. 1, an encoded stream including the block P 15 of quantization coefficients as described above is output and decoded by a decoding apparatus (not shown).

すなわち、復号装置では、量子化係数のブロックP15を、逆量子化して逆DCTすることにより、予測誤差P13に相当する復号誤差のブロックP16が求められる。 That is, the decoding apparatus obtains a decoding error block P 16 corresponding to the prediction error P 13 by inverse quantization and inverse DCT of the quantization coefficient block P 15 .

具体的には、量子化係数のブロックP15は、上述したように、DC成分の量子化係数が-1で、他の周波数成分の量子化係数が0のブロックであるため、そのような量子化係数のブロックP15が逆量子化されて逆DCTされることにより、例えば、画素値の平均値が-1となる、画素値がすべて-1の復号誤差のブロックP16が得られる。 Specifically, as described above, the quantization coefficient block P 15 is a block in which the quantization coefficient of the DC component is −1 and the quantization coefficient of the other frequency components is 0. By performing inverse quantization and inverse DCT on the quantization coefficient block P 15 , for example, a decoding error block P 16 having pixel values of all −1 and having an average pixel value of −1 is obtained.

また、量子化係数のブロックP15に符号化された原画像のブロックP11の予測画像P12は、上述したように、すべての画素値が23のブロックである。 Further, the predicted image P 12 of the block P 11 encoded original image into blocks P 15 quantized coefficients, as described above, a block of all the pixel values 23.

したがって、復号誤差のブロックP16と予測画像P12とを加算して得られる、原画像のブロックP11の復号画像のブロックP17は、画素値が、すべて22で、DC成分が22のブロックとなる。 Therefore, the decoded image block P 17 of the original image block P 11 obtained by adding the decoding error block P 16 and the predicted image P 12 is a block having all the pixel values of 22 and the DC component of 22. It becomes.

なお、図3及び図4、並びに後述する図11は、ディザが施された原画像を符号化して復号する過程で得られるデータが、大雑把にどのようになるかを分かりやすく説明するための図であり、図中の、予測誤差をDCTして得られるDCT係数の値や、DCT係数を逆DCTして得られる復号誤差の値は、正確な値ではない。   3 and 4 and FIG. 11 to be described later are diagrams for explaining in an easy-to-understand manner how the data obtained in the process of encoding and decoding the dithered original image is changed. In the figure, the value of the DCT coefficient obtained by DCT of the prediction error and the value of the decoding error obtained by inverse DCT of the DCT coefficient are not accurate values.

図3及び図4で説明したように、原画像にディザが施されている場合には、量子化に起因して、AC成分が0で、DC成分のみが1となる量子化係数のブロック(例えば、図3のブロックP7)と、AC成分が0で、DC成分のみが-1となる量子化係数のブロック(例えば、図4のブロックP15)とが交互に現れる。その結果、復号画像のブロックとしても、すべての画素がある値のブロックと、その値と1だけ異なる値のブロックとが交互に現れる。 As described with reference to FIGS. 3 and 4, when dithering is applied to the original image, a block of quantization coefficients in which the AC component is 0 and only the DC component is 1 due to quantization ( For example, block P 7 ) in FIG. 3 and quantization coefficient blocks (for example, block P 15 in FIG. 4) in which the AC component is 0 and only the DC component is −1 appear alternately. As a result, as a block of a decoded image, a block having a certain value for all pixels and a block having a value different from that value by 1 appear alternately.

すなわち、図5は、ディザが施された原画像と、その原画像を、図1の符号化装置で符号化し、復号装置で復号して得られる復号画像とを示している。   That is, FIG. 5 shows a dithered original image and a decoded image obtained by encoding the original image with the encoding device of FIG. 1 and decoding with the decoding device.

図5左側は、ディザが施された原画像を示しており、ある画素値vと、その画素値vより1だけ大きい画素値v+1とが格子状に配置され、これにより、中間階調の画素値v+0.5が擬似的に表現されている。   The left side of FIG. 5 shows the dithered original image, in which a certain pixel value v and a pixel value v + 1 that is 1 larger than the pixel value v are arranged in a grid pattern, so that an intermediate gradation is obtained. The pixel value v + 0.5 is expressed in a pseudo manner.

一方、図5右側は、図5左側の原画像を、図1の符号化装置で符号化し、復号装置で復号して得られる復号画像を示しており、すべての画素値が値vのブロックと、値v+1のブロックとが交互に現れている。   On the other hand, the right side of FIG. 5 shows a decoded image obtained by encoding the original image on the left side of FIG. 5 with the encoding device of FIG. 1 and decoding it with the decoding device. , And blocks of value v + 1 appear alternately.

以上のように、符号化対象である原画像に、ディザが施されている場合には、符号化の結果得られる符号化ストリームを復号することにより得られる復号画像において、すべての画素値が値vのブロックと、値v+1のブロックとが交互に現れ、不自然な画像となること、すなわち、復号画像の画質が劣化することがあった。   As described above, when dither is applied to the original image to be encoded, all pixel values are set to values in the decoded image obtained by decoding the encoded stream obtained as a result of encoding. The block of v and the block of value v + 1 appear alternately, resulting in an unnatural image, that is, the image quality of the decoded image may be deteriorated.

本発明は、このような状況に鑑みてなされたものであり、ディザ等の編集が施された画像を符号化して復号することにより得られる復号画像の画質の劣化を防止することができるようにするものである。   The present invention has been made in view of such a situation, and can prevent deterioration in image quality of a decoded image obtained by encoding and decoding an image subjected to editing such as dithering. To do.

本発明の第1の側面の制御装置は、画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、前記予測誤差を周波数成分に変換する変換手段と、前記周波数成分を量子化する量子化手段とを含む画像符号化装置が、前記周波数成分を量子化するときの量子化ステップを制御する制御装置であり、前記画像に編集が施されているかどうかを表す編集情報を取得する編集情報取得手段と、前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する編集用量子化ステップ制御手段とを備える。   A control device according to a first aspect of the present invention includes a prediction unit that obtains a prediction error between an image and a prediction image obtained by predicting the image, a conversion unit that converts the prediction error into a frequency component, and a quantum component for the frequency component. An image encoding device including quantization means for converting the frequency component into a control device for controlling a quantization step when the frequency component is quantized, and obtaining editing information indicating whether or not the image has been edited Editing information acquisition means for editing, and editing quantization step control means for controlling a quantization step when the frequency component is quantized based on the editing information.

本発明の第1の側面の制御方法、又はプログラムは、画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、前記予測誤差を周波数成分に変換する変換手段と、前記周波数成分を量子化する量子化手段とを含む画像符号化装置が、前記周波数成分を量子化するときの量子化ステップを制御する制御方法、又は制御処理を、コンピュータに実行させるプログラムであり、前記画像に編集が施されているかどうかを表す編集情報を取得し、前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御するステップを含む。   The control method or program according to the first aspect of the present invention includes a prediction unit that obtains a prediction error between an image and a prediction image obtained by predicting the image, a conversion unit that converts the prediction error into a frequency component, and the frequency. An image encoding device including a quantization unit that quantizes a component is a control method for controlling a quantization step when the frequency component is quantized, or a program for causing a computer to execute a control process, Editing information indicating whether or not editing has been performed on the image, and controlling a quantization step when quantizing the frequency component based on the editing information.

本発明の第2の側面の符号化装置は、画像を符号化する符号化装置であり、前記画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、前記予測誤差を周波数成分に変換する変換手段と、前記周波数成分を量子化する量子化手段と、前記画像に編集が施されているかどうかを表す編集情報を取得する編集情報取得手段と、前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する編集用量子化ステップ制御手段とを備える。   An encoding apparatus according to a second aspect of the present invention is an encoding apparatus that encodes an image, a prediction unit that obtains a prediction error between the image and a predicted image obtained by predicting the image, and the prediction error as a frequency. Based on the editing information, conversion means for converting into components, quantization means for quantizing the frequency components, editing information acquisition means for acquiring editing information indicating whether the image has been edited, Editing quantization step control means for controlling a quantization step when the frequency component is quantized.

本発明の第1及び第2の側面においては、前記画像に編集が施されているかどうかを表す編集情報が取得され、前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップが制御される。   In the first and second aspects of the present invention, a quantization step when the editing information indicating whether or not the image has been edited is acquired and the frequency component is quantized based on the editing information Is controlled.

なお、プログラムは、伝送媒体を介して伝送することもできるし、記録媒体に記録することもできる。   The program can be transmitted via a transmission medium, or can be recorded on a recording medium.

本発明の第1及び第2の側面によれば、ディザ等の編集が施された画像を符号化して復号することにより得られる復号画像の画質を向上させることができる。   According to the first and second aspects of the present invention, it is possible to improve the image quality of a decoded image obtained by encoding and decoding an image subjected to editing such as dithering.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、明細書又は図面に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、明細書又は図面に記載されていることを確認するためのものである。従って、明細書又は図面中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between the constituent elements of the present invention and the embodiments described in the specification or the drawings are exemplified as follows. This description is intended to confirm that the embodiments supporting the present invention are described in the specification or the drawings. Therefore, even if there is an embodiment which is described in the specification or the drawings but is not described here as an embodiment corresponding to the constituent elements of the present invention, that is not the case. It does not mean that the form does not correspond to the constituent requirements. Conversely, even if an embodiment is described here as corresponding to a configuration requirement, that means that the embodiment does not correspond to a configuration requirement other than the configuration requirement. It's not something to do.

本発明の第1の側面の制御装置は、
画像と、その画像を予測した予測画像との予測誤差を求める予測手段(例えば、図7の予測部1)と、
前記予測誤差を周波数成分に変換する変換手段(例えば、図7の変換部2)と、
前記周波数成分を量子化する量子化手段(例えば、図7の量子化部43)と
を含む画像符号化装置(例えば、図7の画像符号化部31)が、前記周波数成分を量子化するときの量子化ステップを制御する制御装置(例えば、図7の量子化ステップ制御部32)であり、
前記画像に編集が施されているかどうかを表す編集情報を取得する編集情報取得手段(例えば、図7のディザ情報取得部41)と、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する編集用量子化ステップ制御手段(例えば、図7のディザ用量子化ステップ制御部42)と
を備える。
The control device according to the first aspect of the present invention includes:
Prediction means (for example, the prediction unit 1 in FIG. 7) for obtaining a prediction error between an image and a predicted image obtained by predicting the image;
Conversion means for converting the prediction error into a frequency component (for example, the conversion unit 2 in FIG. 7);
When an image encoding device (for example, the image encoding unit 31 in FIG. 7) including a quantization unit (for example, the quantization unit 43 in FIG. 7) that quantizes the frequency component quantizes the frequency component Is a control device (for example, the quantization step control unit 32 in FIG. 7) that controls the quantization step of
Editing information acquisition means (for example, a dither information acquisition unit 41 in FIG. 7) for acquiring editing information indicating whether the image has been edited;
Editing quantization step control means for controlling a quantization step when the frequency component is quantized based on the editing information (for example, a dither quantization step control unit in FIG. 7).

第1の側面の制御装置において、
前記画像符号化装置には、前記周波数成分を量子化して得られる量子化係数を含む符号化ビットストリームのレートに基づいて、前記量子化ステップを制御するレート制御手段(例えば、図7のレート制御部5)をさらに設けることができ、
前記編集用量子化ステップ制御手段には、前記画像に編集が施されている場合、前記レート制御手段が前記量子化ステップを制御するための量子化ステップ制御情報に基づいて、前記量子化ステップを制御させることができる。
In the control device according to the first aspect,
The image encoding apparatus includes rate control means for controlling the quantization step based on a rate of an encoded bitstream including a quantization coefficient obtained by quantizing the frequency component (for example, rate control in FIG. 7). Part 5) can be further provided,
In the editing quantization step control means, when the image is edited, the rate control means performs the quantization step based on quantization step control information for controlling the quantization step. Can be controlled.

本発明の第1の側面の制御方法、又はプログラムは、
画像と、その画像を予測した予測画像との予測誤差を求める予測手段(例えば、図7の予測部1)と、
前記予測誤差を周波数成分に変換する変換手段(例えば、図7の変換部2)と、
前記周波数成分を量子化する量子化手段(例えば、図7の量子化部43)と
を含む画像符号化装置(例えば、図7の画像符号化部31)が、前記周波数成分を量子化するときの量子化ステップを制御する制御方法、又は制御処理をコンピュータに実行させるプログラムであり、
前記画像に編集が施されているかどうかを表す編集情報を取得し(例えば、図9のステップS11)、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する(例えば、図9のステップS12)
ステップを含む。
A control method or program according to the first aspect of the present invention includes:
Prediction means (for example, the prediction unit 1 in FIG. 7) for obtaining a prediction error between an image and a predicted image obtained by predicting the image;
Conversion means for converting the prediction error into a frequency component (for example, the conversion unit 2 in FIG. 7);
When an image encoding device (for example, the image encoding unit 31 in FIG. 7) including a quantization unit (for example, the quantization unit 43 in FIG. 7) that quantizes the frequency component quantizes the frequency component A control method for controlling the quantization step of the above, or a program for causing a computer to execute control processing,
Edit information indicating whether the image has been edited (for example, step S11 in FIG. 9),
Based on the editing information, a quantization step for quantizing the frequency component is controlled (for example, step S12 in FIG. 9).
Includes steps.

本発明の第2の側面の符号化装置は、
画像を符号化する符号化装置(例えば、図6の符号化装置22)であり、
前記画像と、その画像を予測した予測画像との予測誤差を求める予測手段(例えば、図7の予測部1)と、
前記予測誤差を周波数成分に変換する変換手段(例えば、図7の変換部2)と、
前記周波数成分を量子化する量子化手段(例えば、図7の量子化部43)と、
前記画像に編集が施されているかどうかを表す編集情報を取得する編集情報取得手段(例えば、図7のディザ情報取得部41)と、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する編集用量子化ステップ制御手段(例えば、図7のディザ用量子化ステップ制御部42)と
を備える。
The encoding device according to the second aspect of the present invention provides:
An encoding device that encodes an image (for example, the encoding device 22 in FIG. 6);
Prediction means for obtaining a prediction error between the image and a prediction image obtained by predicting the image (for example, the prediction unit 1 in FIG. 7);
Conversion means for converting the prediction error into a frequency component (for example, the conversion unit 2 in FIG. 7);
Quantization means for quantizing the frequency component (for example, the quantization unit 43 in FIG. 7);
Editing information acquisition means (for example, a dither information acquisition unit 41 in FIG. 7) for acquiring editing information indicating whether the image has been edited;
Editing quantization step control means for controlling a quantization step when the frequency component is quantized based on the editing information (for example, a dither quantization step control unit in FIG. 7).

以下、図面を参照して、本発明の実施の形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図6は、本発明を適用したオーサリングシステム(システムとは、複数の装置が論理的に集合した物をいい、各構成の装置が同一筐体中にあるか否かは、問わない)の一実施の形態の構成例を示している。   FIG. 6 shows an authoring system to which the present invention is applied (a system is a logical collection of a plurality of devices, regardless of whether or not the devices of each configuration are in the same casing). The structural example of embodiment is shown.

図6において、オーサリングシステムは、オーサリング装置21、符号化装置22、記録制御装置23から構成されている。   In FIG. 6, the authoring system includes an authoring device 21, an encoding device 22, and a recording control device 23.

オーサリング装置21には、編集の対象となる素材としての画像(動画)が供給される。オーサリング装置21は、そこに供給される素材としての画像に対して、オーサリングシステムのオペレータの操作に応じた処理、すなわち、例えば、ディザや、特殊効果等の処理を施し、オーサリングの結果としての画像を、符号化装置22に供給する。   The authoring device 21 is supplied with an image (moving image) as a material to be edited. The authoring device 21 performs processing corresponding to the operation of the operator of the authoring system, that is, processing such as dithering and special effects, for the image as the material supplied thereto, and the image as a result of authoring Is supplied to the encoding device 22.

符号化装置22は、オーサリング装置21からのオーサリングの結果としての画像を、符号化の対象である原画像として、その原画像を符号化し、符号化の結果得られる符号化ビットストリームを、記録制御装置23に供給する。   The encoding device 22 encodes the original image that is the result of the authoring from the authoring device 21 as an original image to be encoded, and controls the recording of the encoded bitstream obtained as a result of the encoding. Supply to device 23.

すなわち、符号化装置22は、図1の符号化装置のように、原画像の予測誤差を周波数成分に変換し、その周波数成分を量子化することにより、オーサリング装置21からの原画像を符号化し、符号化ビットストリームを、記録制御装置23に供給する。   That is, the encoding device 22 encodes the original image from the authoring device 21 by converting the prediction error of the original image into a frequency component and quantizing the frequency component as in the encoding device of FIG. The encoded bit stream is supplied to the recording control device 23.

記録制御装置23は、符号化装置22からの符号化ビットストリームを、例えば、ディスク(例えば、ブルーレイディスクやDVD(Digital Versatile Disc)など)や、半導体メモリなどの記録媒体24に記録する。   The recording control device 23 records the encoded bit stream from the encoding device 22 on a recording medium 24 such as a disc (for example, a Blu-ray disc or a DVD (Digital Versatile Disc)) or a semiconductor memory.

図7は、図6の符号化装置22の構成例を示している。   FIG. 7 shows a configuration example of the encoding device 22 of FIG.

なお、図中、図1の符号化装置と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。   In the figure, portions corresponding to those of the encoding device of FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted below as appropriate.

符号化装置22は、画像符号化部31と量子化ステップ制御部32とから構成される。   The encoding device 22 includes an image encoding unit 31 and a quantization step control unit 32.

画像符号化部31は、予測部1、変換部2、レート制御部5、量子化部43、及び生成部44から構成され、図6のオーサリング装置21から供給される、符号化の対象である原画像を符号化し、符号化ビットストリームを出力する。   The image encoding unit 31 includes a prediction unit 1, a conversion unit 2, a rate control unit 5, a quantization unit 43, and a generation unit 44, and is an encoding target supplied from the authoring device 21 of FIG. An original image is encoded and an encoded bit stream is output.

すなわち、予測部1には、図6のオーサリング装置21から、符号化の対象である原画像が供給される。予測部1は、図1で説明したように、そこに供給される原画像を、所定のブロックに分割し、原画像のブロックの予測画像を求める。さらに、予測部1は、原画像のブロックと予測画像との予測誤差を求め、ブロック単位で、変換部2に供給する。   In other words, the prediction unit 1 is supplied with the original image to be encoded from the authoring device 21 of FIG. As described with reference to FIG. 1, the prediction unit 1 divides an original image supplied thereto into predetermined blocks and obtains a predicted image of the block of the original image. Further, the prediction unit 1 obtains a prediction error between the block of the original image and the prediction image, and supplies the prediction error to the conversion unit 2 in units of blocks.

変換部2は、図1で説明したように、予測部1からの予測誤差のブロックを、例えば、DCTやアダマール変換等の直交変換等の変換によって、周波数成分のブロックに変換し、量子化部43に供給する。   As described with reference to FIG. 1, the transform unit 2 transforms the prediction error block from the predictor 1 into a block of frequency components by transform such as orthogonal transform such as DCT or Hadamard transform, and the quantizer 43.

レート制御部5は、図1で説明したように、生成部44が出力する符号化ビットストリームをモニタし、その符号化ビットストリームのレートに基づいて、量子化部43の量子化ステップを制御する。   As described with reference to FIG. 1, the rate control unit 5 monitors the encoded bit stream output from the generation unit 44 and controls the quantization step of the quantization unit 43 based on the rate of the encoded bit stream. .

すなわち、レート制御部5は、生成部44が出力する符号化ビットストリームのレートが高い場合には、そのレートを低くするため、量子化部43で粗い量子化を行う量子化ステップが決定される量子化制御情報を生成する。また、レート制御部5は、生成部44が出力する符号化ビットストリームのレートが低い場合には、そのレートを高くするため、量子化部43で細かい量子化を行う量子化ステップが決定される量子化制御情報を生成する。   That is, when the rate of the encoded bit stream output from the generation unit 44 is high, the rate control unit 5 determines a quantization step for performing rough quantization in the quantization unit 43 in order to reduce the rate. Generate quantization control information. In addition, when the rate of the encoded bit stream output from the generation unit 44 is low, the rate control unit 5 determines a quantization step for performing detailed quantization in the quantization unit 43 in order to increase the rate. Generate quantization control information.

そして、レート制御部5は、生成部44が出力する符号化ビットストリームのレートに基づいて生成した量子化制御情報を、量子化部43に供給することにより、符号化ビットストリームのレートが、所定の値(所定の範囲内の値)となるように、量子化ステップを制御する。   Then, the rate control unit 5 supplies the quantization control information generated based on the rate of the encoded bit stream output from the generation unit 44 to the quantization unit 43, whereby the rate of the encoded bit stream is set to a predetermined value. The quantization step is controlled to be a value of (a value within a predetermined range).

ここで、符号化装置22では、量子化部43の量子化ステップを制御する量子化制御情報は、レート制御部5で生成される他、後述するディザ用量子化ステップ制御部42でも生成される。そこで、レート制御部5で生成される量子化制御情報と、ディザ用量子化ステップ制御部42で生成される量子化制御情報とを区別するために、以下、適宜、レート制御部5で生成される量子化制御情報を、第1の量子化制御情報といい、ディザ用量子化ステップ制御部42で生成される量子化制御情報を、第2の量子化制御情報という。   Here, in the encoding device 22, the quantization control information for controlling the quantization step of the quantization unit 43 is generated not only by the rate control unit 5 but also by a dither quantization step control unit 42 described later. . Therefore, in order to distinguish between the quantization control information generated by the rate control unit 5 and the quantization control information generated by the dithering quantization step control unit 42, the rate control unit 5 generates the following appropriately. The quantization control information is referred to as first quantization control information, and the quantization control information generated by the dither quantization step control unit 42 is referred to as second quantization control information.

なお、レート制御部5は、第1の量子化制御情報を、量子化部43に供給する他、ディザ用量子化ステップ制御部42と生成部44にも供給する。   The rate control unit 5 supplies the first quantization control information to the quantization unit 43 as well as to the dither quantization step control unit 42 and the generation unit 44.

量子化部43には、変換部2から周波数成分のブロックが供給されるとともに、レート制御部5から第1の量子化制御情報が供給される他、ディザ用量子化ステップ制御部42から第2の量子化制御情報が供給される。   The quantization unit 43 is supplied with a block of frequency components from the conversion unit 2, is supplied with first quantization control information from the rate control unit 5, and is also supplied with a second from the dither quantization step control unit 42. Quantization control information is supplied.

量子化部43は、レート制御部5からの第1の量子化制御情報と、ディザ用量子化ステップ制御部42からの第2の量子化制御情報とに基づいて、周波数成分を量子化するときの量子化ステップを決定し、その量子化ステップで、変換部2からのブロック単位の周波数成分を量子化して、その量子化の結果である量子化係数を、ブロック単位で、生成部44に供給する。   When the quantization unit 43 quantizes the frequency component based on the first quantization control information from the rate control unit 5 and the second quantization control information from the dither quantization step control unit 42 The quantization step is determined, the frequency component of the block unit from the transform unit 2 is quantized in the quantization step, and the quantization coefficient resulting from the quantization is supplied to the generation unit 44 in block unit To do.

生成部44には、量子化部43から量子化係数が供給される他、レート制御部5から、量子化部43で量子化ステップを決定するのに用いられた第1の量子化制御情報が供給されるとともに、ディザ用量子化ステップ制御部42から、量子化部43で量子化ステップを決定するのに用いられた第2の量子化制御情報が供給される。   In addition to the quantization coefficient supplied from the quantization unit 43 to the generation unit 44, the first quantization control information used to determine the quantization step by the quantization unit 43 is received from the rate control unit 5. The second quantization control information used to determine the quantization step by the quantization unit 43 is supplied from the dither quantization step control unit 42.

生成部44は、量子化部43からのブロック単位の量子化係数と、レート制御部5からの第1の量子化制御情報、及びディザ用量子化ステップ制御部42からの第2の量子化制御情報とを、少なくとも含む符号化ビットストリームを生成し、原画像の符号化結果として出力する。   The generation unit 44, the block-unit quantization coefficient from the quantization unit 43, the first quantization control information from the rate control unit 5, and the second quantization control from the dither quantization step control unit 42 An encoded bit stream including at least information is generated and output as an encoding result of the original image.

量子化ステップ制御部32は、ディザ情報取得部41とディザ用量子化ステップ制御部42とから構成され、画像符号化部31(の量子化部43)が、周波数成分を量子化するときの量子化ステップを制御する。   The quantization step control unit 32 includes a dither information acquisition unit 41 and a dither quantization step control unit 42, and the image encoding unit 31 (the quantization unit 43 thereof) performs quantization when the frequency component is quantized. Control the step.

すなわち、ディザ情報取得部41は、画像符号化部31での符号化の対象である原画像にディザが施されているかどうかを表すディザ情報を取得し、ディザ用量子化ステップ制御部42に供給する。   That is, the dither information acquisition unit 41 acquires dither information indicating whether or not dither has been applied to the original image that is to be encoded by the image encoding unit 31, and supplies the dither information to the dither quantization step control unit 42. To do.

ディザ用量子化ステップ制御部42は、ディザ情報取得部41から供給されるディザ情報に基づいて、量子化部43が周波数成分を量子化するときの量子化ステップを制御する。   The dither quantization step control unit 42 controls the quantization step when the quantization unit 43 quantizes the frequency component based on the dither information supplied from the dither information acquisition unit 41.

すなわち、ディザ用量子化ステップ制御部42は、量子化部43で周波数成分が量子化の対象となっているブロックである注目ブロックにディザが施されているかどうかを、ディザ情報に基づいて認識し、注目ブロックにディザが施されていない場合には、量子化部43において、例えば、図1の符号化装置と同様の量子化ステップが決定される第2の量子化制御情報を生成する。   That is, the dither quantization step control unit 42 recognizes based on the dither information whether the quantizing unit 43 has dithered the target block that is the block whose frequency component is the quantization target. If no dither is applied to the block of interest, the quantization unit 43 generates, for example, second quantization control information in which the same quantization step as that of the encoding device in FIG. 1 is determined.

また、ディザ用量子化ステップ制御部42は、注目ブロックにディザが施されている場合には、量子化部43において、高周波数成分について細かい量子化を行う量子化ステップが決定される第2の量子化制御情報を、レート制御部5から供給される第1の量子化情報に基づいて生成する。   Also, the dither quantization step control unit 42 determines the second quantization step for performing fine quantization on the high frequency component in the quantization unit 43 when the target block is dithered. The quantization control information is generated based on the first quantization information supplied from the rate control unit 5.

そして、ディザ用量子化ステップ制御部42は、第2の量子化制御情報を、量子化部43に供給することにより、その量子化部43で行われる量子化で用いられる量子化ステップを制御する。   Then, the dither quantization step control unit 42 supplies the second quantization control information to the quantization unit 43, thereby controlling the quantization step used in the quantization performed by the quantization unit 43. .

なお、ディザ用量子化ステップ制御部42は、第2の量子化制御情報を、量子化部43を供給する他、生成部44にも供給する。上述したように、生成部44は、ディザ用量子化ステップ制御部42からの第2の量子化制御情報を符号化ビットストリームに含める。   The dither quantization step control unit 42 supplies the second quantization control information to the generation unit 44 in addition to supplying the quantization unit 43. As described above, the generation unit 44 includes the second quantization control information from the dither quantization step control unit 42 in the encoded bitstream.

次に、ディザ情報取得部41は、上述したように、原画像にディザが施されているかどうかを表すディザ情報を取得するが、この取得の方法について説明する。   Next, as described above, the dither information acquisition unit 41 acquires dither information indicating whether or not dither has been applied to the original image. The acquisition method will be described.

ディザは、図6のオーサリング装置21において、オペレータの操作に応じて、原画像に施される。そこで、オーサリング装置21が、オペレータの操作に応じて施したディザに関する情報、すなわち、例えば、ディザが施された原画像の位置等を表す情報を出力する場合には、ディザ情報取得部41では、オーサリング装置21が出力する、ディザに関する情報を受信することにより、その情報を、ディザ情報として取得することができる。   Dithering is performed on the original image in accordance with the operation of the operator in the authoring device 21 of FIG. Therefore, when the authoring device 21 outputs information related to dither performed according to the operation of the operator, that is, for example, information indicating the position of the original image subjected to dither, the dither information acquisition unit 41 By receiving information on dither output from the authoring device 21, the information can be acquired as dither information.

また、図7の画像符号化部31は、図1の符号化装置のように、原画像の予測誤差を周波数成分に変換し、その周波数成分を量子化することにより、原画像を符号化するが、いま、原画像の予測誤差の周波数成分として、例えば、DCT係数を採用することとすると、変換部2が予測誤差をDCT係数に変換するブロックにディザが施されている場合には、変換部2で得られるDCT係数のブロックでは、例えば、図3のブロックP6や、図4のブロックP14に示したように、最高の周波数成分である、例えば、ブロックの右下のDCT係数が1又は-1になる。 7 encodes the original image by converting the prediction error of the original image into a frequency component and quantizing the frequency component, like the encoding device of FIG. However, assuming that, for example, a DCT coefficient is used as the frequency component of the prediction error of the original image, if the block where the conversion unit 2 converts the prediction error into the DCT coefficient is dithered, the block of DCT coefficients obtained in part 2, for example, and blocks P 6 in FIG. 3, as shown in block P 14 in FIG. 4, the highest frequency component, for example, DCT coefficients of the lower right block Becomes 1 or -1.

そこで、ディザ情報取得部41では、変換部2で得られる予測誤差の周波数成分に基づき、原画像にディザが施されているかどうかを判定することにより、ディザ情報を取得することができる。   Therefore, the dither information acquisition unit 41 can acquire dither information by determining whether or not dither is applied to the original image based on the frequency component of the prediction error obtained by the conversion unit 2.

すなわち、ディザ情報取得部41では、変換部2で得られるDCT係数のブロックの右下のDCT係数が1又は-1であるかどうかを判定し、DCT係数のブロックの右下のDCT係数が1又は-1である場合に、そのブロックにディザが施されていると認識して、その旨のディザ情報を、ディザ用量子化ステップ制御部42に供給することができる。   That is, the dither information acquisition unit 41 determines whether the lower right DCT coefficient of the DCT coefficient block obtained by the conversion unit 2 is 1 or −1, and the lower right DCT coefficient of the DCT coefficient block is 1. Alternatively, when it is −1, it is recognized that the block is dithered, and the dither information to that effect can be supplied to the dither quantization step control unit 42.

ここで、図8は、横×縦が8×8のブロックをDCTする場合のDCTの基底を示している。   Here, FIG. 8 shows the basis of DCT when DCT is performed on a block of horizontal × vertical 8 × 8.

いま、図8のブロックの上からi行目で、左からj列目のDCT係数を、(i,j)成分ということとすると、原画像にディザが施されている場合には、その原画像の予測誤差のブロックでは、図3や図4で説明したことから、0と1の画素値や、-1と0の画素値が格子状に配置される。   Now, assuming that the DCT coefficient in the i-th row from the top and the j-th column from the left is the (i, j) component, if the original image is dithered, In the image prediction error block, the pixel values of 0 and 1 and the pixel values of -1 and 0 are arranged in a lattice form, as described with reference to FIGS.

そして、このように、0と1の画素値や、-1と0の画素値が格子状に配置されたブロックがDCTされると、そのDCTの結果得られるDCT係数のブロックでは、ブロックの右下のDCT係数である(8,8)成分が、1又は-1となる。   Then, when a block in which the pixel values of 0 and 1 and the pixel values of -1 and 0 are arranged in a grid is DCTed in this way, in the block of DCT coefficients obtained as a result of the DCT, The (8,8) component which is the lower DCT coefficient is 1 or -1.

したがって、ディザ情報取得部41において、DCT係数のブロックの右下のDCT係数が1又は-1であるかどうかによって、そのブロックにディザが施されているかどうかを判定することができる。   Therefore, the dither information acquisition unit 41 can determine whether the block is dithered based on whether the DCT coefficient at the lower right of the DCT coefficient block is 1 or -1.

なお、ディザが施された画像がHD画像であり、そのHD画像の、水平方向に並ぶ1行の画素を、1行おきに間引くことにより、SD画像が生成された場合や、ディザが施されたHD画像の、垂直方向に並ぶ1列の画素を、1列おきに間引くことにより、SD画像が生成された場合において、そのSD画像を、符号化の対象である原画像とするときには、原画像の予測誤差のブロックでは、0と1の画素値や、-1と0の画素値が格子状ではなく、水平方向又は垂直方向のうちのいずれか一方向にのみ交互に配置される。   Note that the dithered image is an HD image, and when the SD image is generated by thinning out every other row of pixels of the HD image that are lined up horizontally, dithering is performed. In the case where an SD image is generated by thinning out every other column of pixels arranged in the vertical direction of the HD image, when the SD image is used as an original image to be encoded, In the image prediction error block, pixel values of 0 and 1 and pixel values of -1 and 0 are not arranged in a grid pattern, but are alternately arranged in only one of the horizontal direction and the vertical direction.

このような予測誤差のブロックがDCTされると、そのDCTの結果得られるDCT係数のブロックでは、ブロックの右端のDCT係数である(1,8)成分か、下端のDCT係数である(8.1)成分が、1又は-1となる。   When such a prediction error block is DCT, the DCT coefficient block obtained as a result of the DCT is the (1,8) component which is the DCT coefficient at the right end of the block or the DCT coefficient at the lower end (8.1). The component is 1 or -1.

そこで、ディザ情報取得部41では、DCT係数のブロックが8×8のブロックである場合には、(8,8)成分が、1又は-1である場合の他、(1,8)成分か、(8.1)成分が、1又は-1である場合も、原画像のブロックにディザが施されていると認識して、その旨のディザ情報を、ディザ用量子化ステップ制御部42に供給するようにすることができる。   Therefore, in the dither information acquisition unit 41, when the block of the DCT coefficient is an 8 × 8 block, the (8,8) component is 1 or -1, and the (1,8) component is , (8.1) Even if the component is 1 or -1, it recognizes that the dithering is applied to the block of the original image, and supplies the dither information to that effect to the dithering quantization step control unit 42. Can be.

なお、ディザ情報取得部41において、原画像にディザが施されているかどうかの認識は、予測誤差の周波数成分に基づいて行う方法に限定されるものではない。   The dither information acquisition unit 41 is not limited to the method of recognizing whether the original image is dithered based on the frequency component of the prediction error.

すなわち、ディザ情報取得部41では、原画像の予測誤差ではなく、原画像そのものの画素値の周波数成分に基づき、周波数成分のブロックの右下の周波数成分が所定の値であるかどうかを判定することや、原画像そのものの画素値に基づき、原画像において、1だけ異なる2つの画素値が格子状に配置されているかどうかを判定すること等によって、原画像のブロックにディザが施されているかどうかを認識することができる。   That is, the dither information acquisition unit 41 determines whether the lower right frequency component of the frequency component block is a predetermined value based on the frequency component of the pixel value of the original image itself, not the prediction error of the original image. Whether the original image block is dithered by determining whether two pixel values differing by 1 are arranged in a grid pattern based on the pixel value of the original image itself I can recognize.

ここで、予測誤差の周波数成分は、画像符号化部31の変換部2で求められるため、原画像のブロックにディザが施されているかどうかを認識するためだけに、別に求める必要はない。   Here, since the frequency component of the prediction error is obtained by the conversion unit 2 of the image coding unit 31, it is not necessary to obtain it separately only to recognize whether or not dithering is applied to the block of the original image.

また、原画像のブロックにディザが施されているかどうかを、そのブロックの特定の周波数成分に基づいて認識(判断)する場合には、ブロックの特定の周波数成分だけを参照してもよいし、ブロック全体の周波数成分(の分布)を参照してもよい。   Further, when recognizing (determining) whether or not dither is applied to a block of the original image based on a specific frequency component of the block, only the specific frequency component of the block may be referred to. The frequency component (distribution) of the entire block may be referred to.

次に、図7の符号化装置22の処理について説明する。   Next, processing of the encoding device 22 in FIG. 7 will be described.

図7の符号化装置22では、ディザ情報に基づいて、量子化部43の量子化ステップを制御するディザ用量子化ステップ制御処理と、原画像の予測誤差を周波数成分に変換し、その周波数成分を量子化することにより、原画像を符号化する符号化処理とが行われる。   In the encoding device 22 of FIG. 7, based on the dither information, the dither quantization step control process for controlling the quantization step of the quantization unit 43, the prediction error of the original image is converted into a frequency component, and the frequency component Is encoded, and an encoding process for encoding the original image is performed.

図9は、図7の符号化装置22が行うディザ用量子化ステップ制御処理を説明するフローチャートである。   FIG. 9 is a flowchart for explaining the dither quantization step control process performed by the encoding device 22 of FIG.

図9のディザ用量子化ステップ制御処理は、図7の符号化装置22の量子化ステップ制御部32が行う。   The dither quantization step control process of FIG. 9 is performed by the quantization step control unit 32 of the encoding device 22 of FIG.

すなわち、量子化ステップ制御部32では、ステップS11において、ディザ情報取得部41が、画像符号化部31の量子化部43で量子化の対象となっている周波数成分のブロックである注目ブロックにディザが施されているかどうかを表すディザ情報を取得し、ディザ用量子化ステップ制御部42に供給して、ステップS12に進む。   That is, in the quantization step control unit 32, in step S11, the dither information acquisition unit 41 dithers to a target block that is a block of frequency components that are quantized by the quantization unit 43 of the image encoding unit 31. Is obtained, supplied to the dither quantization step control unit 42, and the process proceeds to step S12.

ステップS12では、ディザ用量子化ステップ制御部42は、ディザ情報取得部41から供給されるディザ情報に基づいて、量子化部43が周波数成分を量子化するときの量子化ステップを制御し、ディザ用量子化ステップ制御処理を終了する。   In step S12, the dither quantization step control unit 42 controls the quantization step when the quantization unit 43 quantizes the frequency component based on the dither information supplied from the dither information acquisition unit 41, and This completes the quantization step control process.

すなわち、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報に基づき、例えば、量子化部43で図1の符号化装置と同様の量子化ステップが決定される第2の量子化制御情報、又は高周波数成分について細かい量子化を行う量子化ステップが決定される第2の量子化制御情報を生成し、量子化部43に供給する。   That is, the dither quantization step control unit 42 determines, based on the dither information from the dither information acquisition unit 41, for example, a second quantization step that is determined by the quantization unit 43 as in the encoding apparatus of FIG. Quantization control information or second quantization control information for determining a quantization step for performing fine quantization on high frequency components is generated and supplied to the quantization unit 43.

その後は、周波数成分の新たなブロックが、注目ブロックとして、変換部2から量子化部43に供給されるのを待って、ステップS11に戻り、ステップS11及びS12の処理が繰り返し行われる。   After that, after waiting for a new block of frequency components to be supplied as a target block from the transform unit 2 to the quantization unit 43, the process returns to step S11, and the processes of steps S11 and S12 are repeated.

なお、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表している場合には、レート制御部5から供給される第1の量子化制御情報に基づいて、量子化部43の量子化ステップを制御する第2の量子化制御情報を生成する。   The dither quantization step control unit 42 is supplied from the rate control unit 5 when the dither information from the dither information acquisition unit 41 indicates that the target block is dithered. Based on the quantization control information of 1, the second quantization control information for controlling the quantization step of the quantization unit 43 is generated.

ここで、量子化部43は、レート制御部5からの第1の量子化制御情報と、ディザ用量子化ステップ制御部42からの第2の量子化制御情報との両方に基づき、量子化ステップを決定する。   Here, the quantization unit 43 performs the quantization step based on both the first quantization control information from the rate control unit 5 and the second quantization control information from the dither quantization step control unit 42. To decide.

例えば、第1の量子化制御情報をAと表すとともに、第2の量子化制御情報をBと表すこととし、第1の量子化制御情報Aと、第2の量子化制御情報Bとを引数とする関数を、f(A,B)と表すこととすると、量子化部43は、関数f(A,B)の値を、量子化ステップに決定する。   For example, the first quantization control information is represented as A, the second quantization control information is represented as B, and the first quantization control information A and the second quantization control information B are arguments. If the function is expressed as f (A, B), the quantization unit 43 determines the value of the function f (A, B) as a quantization step.

一方、注目ブロックにディザが施されていることを表している場合には、図3や図4で説明したように、注目ブロックの最高の周波数成分が-1又は1になるが、すなわち、例えば、注目ブロックが、8×8のブロックであれば、図8で説明したように、最高の周波数成分である(1,8)成分、(8,1)成分、又は(8,8)成分が、1又は-1となるが、この最高の周波数成分が0に量子化されることによって、復号画像の画質が劣化する。   On the other hand, in the case where dither is applied to the target block, as described in FIGS. 3 and 4, the highest frequency component of the target block is −1 or 1, that is, for example, If the target block is an 8 × 8 block, as described in FIG. 8, the highest frequency component (1,8) component, (8,1) component, or (8,8) component is 1 or −1, but the highest frequency component is quantized to 0, so that the image quality of the decoded image is deteriorated.

そこで、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表している場合には、注目ブロックの最高の周波数成分の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、量子化部43での量子化ステップを制御する第2の量子化制御情報を動的に生成する。   Accordingly, when the dither information from the dither information acquisition unit 41 indicates that the target block has been dithered, the dither quantization step control unit 42 determines the value of the highest frequency component of the target block. The second quantization control information for controlling the quantization step in the quantization unit 43 is dynamically changed so that -1 or 1 is quantized into a quantization coefficient that can be restored by inverse quantization. To generate.

すなわち、量子化部43での量子化ステップは、上述したように、第1と第2の量子化制御情報の両方に基づいて決定されるので、ディザ用量子化ステップ制御部42は、第1と第2の量子化制御情報に基づいて決定される量子化ステップで、注目ブロックの周波数成分が量子化された場合に、最高の周波数成分の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、第1の量子化制御情報に基づき、第2の量子化制御情報を生成する。   That is, since the quantization step in the quantization unit 43 is determined based on both the first and second quantization control information as described above, the dither quantization step control unit 42 When the frequency component of the target block is quantized in the quantization step determined based on the second quantization control information, the highest frequency component value of -1 or 1 is obtained by inverse quantization. Based on the first quantization control information, second quantization control information is generated so as to be quantized into a quantization coefficient that can be restored.

次に、図10は、図7の符号化装置22が行う符号化処理を説明するフローチャートである。   Next, FIG. 10 is a flowchart illustrating an encoding process performed by the encoding device 22 of FIG.

図10の符号化処理は、図7の画像符号化部31が行う。   The image encoding unit 31 in FIG. 7 performs the encoding process in FIG.

すなわち、画像符号化部31において、予測部1には、図6のオーサリング装置21から、符号化の対象である原画像が供給される。予測部1は、図1で説明したように、そこに供給される原画像を、所定のブロックに分割し、符号化の対象とするブロックを、注目ブロックとして選択する。   That is, in the image encoding unit 31, the prediction unit 1 is supplied with the original image to be encoded from the authoring device 21 in FIG. As described with reference to FIG. 1, the prediction unit 1 divides an original image supplied thereto into predetermined blocks, and selects a block to be encoded as a target block.

そして、予測部1は、ステップS31において、注目ブロックの予測画像を求め、原画像の注目ブロックと予測画像との予測誤差を求める。さらに、予測部1は、注目ブロックについて求めた予測誤差を、変換部2に供給して、ステップS32に進む。   And the prediction part 1 calculates | requires the prediction image of an attention block in step S31, and calculates | requires the prediction error of the attention block and prediction image of an original image. Furthermore, the prediction unit 1 supplies the prediction error obtained for the block of interest to the conversion unit 2, and proceeds to step S32.

ステップS32では、変換部2は、予測部1からの注目ブロックについての予測誤差を、周波数成分に変換し、注目ブロックについての周波数成分を、量子化部43に供給して、ステップS33に進む。   In step S32, the conversion unit 2 converts the prediction error for the target block from the prediction unit 1 into a frequency component, supplies the frequency component for the target block to the quantization unit 43, and proceeds to step S33.

ステップS33では、量子化部43は、レート制御部5から供給される第1の量子化制御情報と、ディザ用量子化ステップ制御部42からの第2の量子化制御情報とに基づいて、注目ブロックの周波数成分を量子化するときの量子化ステップを決定し、その量子化ステップで、変換部2からの注目ブロックの各周波数成分を量子化して、その量子化の結果である量子化係数のブロックを、生成部44に供給して、ステップS34に進む。   In step S <b> 33, the quantization unit 43 receives attention based on the first quantization control information supplied from the rate control unit 5 and the second quantization control information from the dither quantization step control unit 42. A quantization step for quantizing the frequency component of the block is determined, and in that quantization step, each frequency component of the block of interest from the transform unit 2 is quantized, and the quantization coefficient that is the result of the quantization is determined. The block is supplied to the generation unit 44, and the process proceeds to step S34.

すなわち、レート制御部5は、生成部44が出力する符号化ビットストリームをモニタしており、その符号化ビットストリームのレートに基づいて、量子化部43の量子化ステップを制御する第1の量子化制御情報を生成して、ディザ用量子化ステップ制御部42、量子化部43、及び生成部44に供給する。   That is, the rate control unit 5 monitors the encoded bit stream output from the generating unit 44, and controls the quantization step of the quantization unit 43 based on the rate of the encoded bit stream. The quantization control information is generated and supplied to the dither quantization step control unit 42, the quantization unit 43, and the generation unit 44.

また、ディザ用量子化ステップ制御部42は、図9で説明したように、変換部2から量子化部43に周波数成分が供給された注目ブロックのディザ情報、さらには、必要に応じて、レート制御部5からの第1の量子化制御情報に基づいて、量子化部43の量子化ステップを制御する第2の量子化制御情報を生成して、量子化部43、及び生成部44に供給する。   Further, as described with reference to FIG. 9, the dither quantization step control unit 42 performs dither information on the block of interest in which the frequency component is supplied from the transform unit 2 to the quantization unit 43, and further, if necessary, the rate. Based on the first quantization control information from the control unit 5, second quantization control information for controlling the quantization step of the quantization unit 43 is generated and supplied to the quantization unit 43 and the generation unit 44. To do.

量子化部43は、ステップS33において、以上のようにしてレート制御部5から供給される第1の量子化制御情報と、ディザ用量子化ステップ制御部42から供給される第2の量子化制御情報とに基づいて、注目ブロックの周波数成分を量子化するときの量子化ステップを決定する。そして、量子化部43は、その量子化ステップで、変換部2からの注目ブロックの各周波数成分を量子化し、その量子化の結果である量子化係数のブロックを、生成部44に供給して、ステップS33からステップS34に進む。   In step S33, the quantization unit 43 performs the first quantization control information supplied from the rate control unit 5 as described above and the second quantization control supplied from the dither quantization step control unit 42. Based on the information, the quantization step for quantizing the frequency component of the block of interest is determined. Then, in the quantization step, the quantization unit 43 quantizes each frequency component of the target block from the conversion unit 2, and supplies the quantization coefficient block resulting from the quantization to the generation unit 44. The process proceeds from step S33 to step S34.

ステップS34では、生成部44は、量子化部43からのブロック単位の量子化係数と、レート制御部5からの第1の量子化制御情報、及びディザ用量子化ステップ制御部42からの第2の量子化制御情報とを、少なくとも含む符号化ビットストリームを生成し、原画像の符号化結果として出力する。   In step S <b> 34, the generation unit 44 performs the block-unit quantization coefficient from the quantization unit 43, the first quantization control information from the rate control unit 5, and the second dither quantization step control unit 42. The encoded bit stream including at least the quantization control information is generated and output as the encoding result of the original image.

その後は、予測部1が、原画像の新たなブロックを、注目ブロックとして選択するのを待って、ステップS31に戻り、ステップS31ないしS34の処理が繰り返し行われる。   Thereafter, the process waits for the prediction unit 1 to select a new block of the original image as the block of interest, returns to step S31, and repeats the processes of steps S31 to S34.

以上のように、符号化装置22では、原画像の予測誤差を周波数成分に変換し、その周波数成分を量子化することにより、原画像を符号化する場合において、ディザ情報に基づいて、量子化ステップを制御するので、すなわち、原画像のブロックの最高の周波数成分が-1又は1であり、したがって、原画像のブロックにディザが施されているときには、そのブロックの最高の周波数成分の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、量子化ステップを制御するので、最高の周波数成分が0に量子化されることによって、特に、ディザが施された原画像の復号画像の画質が劣化することを防止することができる。   As described above, in the encoding device 22, when the original image is encoded by converting the prediction error of the original image into a frequency component and quantizing the frequency component, the quantization is performed based on the dither information. Control the step, i.e. the highest frequency component of the block of the original image is -1 or 1, so when the block of the original image is dithered, the value of the highest frequency component of the block is Since the quantization step is controlled so that a certain -1 or 1 is quantized to a quantized coefficient that can be recovered by inverse quantization, the highest frequency component is specifically quantized to 0, Thus, it is possible to prevent the image quality of the decoded image of the original image that has been dithered from deteriorating.

このように、符号化装置22によって、ディザが施されている原画像の復号画像の画質の劣化を防止することができることについて、図11を参照して、さらに説明する。   In this way, it will be further described with reference to FIG. 11 that the encoding device 22 can prevent degradation of the image quality of the decoded image of the original image that has been dithered.

図11は、符号化装置22において、ディザが施された原画像を符号化して復号(ローカルデコード)する過程で得られるデータを示している。   FIG. 11 shows data obtained in the process of encoding and decoding (local decoding) the dithered original image in the encoding device 22.

例えば、いま、前述の図3で説明した場合と同様に、符号化装置22において、原画像が、横×縦が16×16画素の256画素のブロックの単位で符号化されることとし、符号化しようとしている原画像のブロックである注目ブロックの予測画像としては、既に符号化され、ローカルデコードされた、注目ブロックの左隣のブロックの画像が用いられることとする。   For example, as in the case described with reference to FIG. 3 above, the encoding device 22 encodes the original image in units of 256-pixel blocks of horizontal × vertical 16 × 16 pixels. As a predicted image of a target block that is a block of an original image to be converted, an image of a block adjacent to the left of the target block that has already been encoded and locally decoded is used.

図11において、ブロックP101は、例えば、原画像の左端のブロックであり、ブロックP103は、例えば、原画像のブロックP101の右隣のブロックである。 In FIG. 11, a block P 101 is, for example, the leftmost block of the original image, and a block P 103 is, for example, a block adjacent to the right of the block P 101 of the original image.

原画像のブロックP101及びP103では、いずれも、例えば、22の画素値と、その画素値に1を加算した23の画素値とが、水平方向にのみ交互に配置され、垂直方向には、22又23の画素値だけが配置されており、したがって、ディザが施されている。 In both blocks P 101 and P 103 of the original image, for example, 22 pixel values and 23 pixel values obtained by adding 1 to the pixel value are alternately arranged only in the horizontal direction, and in the vertical direction. Only 22 or 23 pixel values are arranged, and therefore dithered.

ここで、原画像のブロックP101及びP103では、22と23の画素値が同一の数だけ存在するので、その画素値の平均値であるDC成分は、22.5である。 Here, since the same number of pixel values 22 and 23 exist in the blocks P 101 and P 103 of the original image, the DC component that is the average value of the pixel values is 22.5.

ブロックP102は、原画像のブロックP101を、図7の符号化装置22(の画像符号化部31)で符号化してローカルデコードすることにより得られた復号画像のブロックである。図11において、復号画像のブロックP102の画素値は、すべて22となっており、したがって、そのDC成分は、22である。 The block P 102 is a block of a decoded image obtained by encoding and locally decoding the block P 101 of the original image with the encoding device 22 (the image encoding unit 31) of FIG. 11, the pixel values of the block P 102 of the decoded image are all become 22, therefore, the DC component is 22.

いま、符号化装置22が、原画像のブロックP103を注目ブロックとして符号化をする場合には、予測部1は、原画像のブロックP103の左隣のブロックP101を符号化してローカルデコードした復号画像のブロックP102を、そのまま、原画像のブロックP103の予測画像P104として、予測誤差P105を求める。 When the encoding device 22 performs encoding using the original image block P 103 as a target block, the prediction unit 1 encodes the block P 101 adjacent to the left of the original image block P 103 and performs local decoding. The decoded error block P 102 is used as it is as the predicted image P 104 of the original image block P 103 to obtain a prediction error P 105 .

原画像のブロックP103では、上述したように、水平方向に、22と23の画素値が交互に配置され、垂直方向に、22又23の画素値だけが配置されており、予測画像P104は、上述したように、すべての画素値が22の復号画像のブロックP102であるので、そのような原画像のブロックP103と予測画像P104との予測誤差P105は、水平方向に、0と1の画素値が交互に配置され、垂直方向に、0又は1の画素値だけが配置されたブロックとなる。 In block P 103 of the original image, as described above, in the horizontal direction, pixel values of 22 and 23 are alternately arranged in the vertical direction, only the pixel value of 22 also 23 are arranged, the predicted image P 104 As described above, since all the pixel values are the decoded image block P 102 of 22, the prediction error P 105 between the block P 103 of the original image and the prediction image P 104 is in the horizontal direction, A block in which pixel values of 0 and 1 are alternately arranged, and only pixel values of 0 or 1 are arranged in the vertical direction.

予測誤差P105は、変換部2で周波数成分に変換される。いま、変換部2が、周波数成分への変換として、例えば、DCTを行うこととすると、予測誤差P105は、大雑把には、ブロックP106のようなDCT係数のブロックに変換される。 The prediction error P 105 is converted into a frequency component by the conversion unit 2. Assuming that the conversion unit 2 performs, for example, DCT as the conversion to the frequency component, the prediction error P 105 is roughly converted into a DCT coefficient block such as the block P 106 .

ここで、予測誤差P105は、水平方向に、0と1の画素値が交互に配置され、垂直方向に、0又は1の画素値だけが配置されたブロックであり、したがって、予測誤差P105では、0と1の画素値が同一の数だけ存在するので、DC成分は、0.5である。 Here, the prediction error P 105 is in the horizontal direction, 0 and 1 of the pixel values are arranged alternately in the vertical direction, a block in which only the pixel value of 0 or 1 is placed, therefore, the prediction error P 105 In this case, since the same number of pixel values of 0 and 1 exist, the DC component is 0.5.

また、予測誤差P105では、0と1の画素値が交互に配置されているので、予測誤差P105は、16×16画素のブロックが有しうる最大の周波数成分を有し、その大きさは、1である。 In addition, in the prediction error P 105 , since the pixel values of 0 and 1 are alternately arranged, the prediction error P105 has the maximum frequency component that a block of 16 × 16 pixels can have, and its size is , 1

このため、DCT係数のブロックP106においては、DC成分である左上のDCT係数が0.5に、最高の周波数成分である、例えば、右下のDCT係数が1に、他のDCT係数が0に、それぞれなっている。 Therefore, in block P 106 of the DCT coefficient is the DCT coefficient of the upper left 0.5 is a DC component, which is the highest frequency component, for example, the DCT coefficients of the lower right 1, the other DCT coefficients 0, Each has become.

量子化部43は、以上のようなDCT係数のブロックP106を量子化し、量子化係数のブロックP107を出力する。 The quantization unit 43 quantizes the DCT coefficient block P 106 as described above, and outputs a quantization coefficient block P 107 .

ここで、前述したように、図1の符号化装置では、例えば、人の視覚が、低周波数成分よりも高周波数成分に対して鈍感であること等を利用して、低周波数成分のDCT係数については、細かい量子化が行われ、高周波数成分のDCT係数については、粗い量子化が行われるが、図7の符号化装置22でも、原則としては、図1の符号化装置と同様の量子化が行われる。   Here, as described above, in the encoding device of FIG. 1, for example, using the fact that human vision is less sensitive to high frequency components than low frequency components, the DCT coefficients of low frequency components are used. 7, fine quantization is performed, and DCT coefficients of high frequency components are subjected to coarse quantization. However, in principle, the encoding device 22 in FIG. 7 has the same quantum as the encoding device in FIG. 1. Is done.

但し、符号化装置22では、原画像のブロックにディザが施されているときには、ディザ用量子化ステップ制御部42において、ディザが施されているブロックの最高の周波数成分の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、量子化部43の量子化ステップが制御される。   However, in the encoding device 22, when dithering is performed on the block of the original image, the dithering quantization step control unit 42 determines that the value of the highest frequency component of the block being dithered is −1 or The quantization step of the quantization unit 43 is controlled so that 1 is quantized to a quantization coefficient that can be restored by inverse quantization.

このため、量子化係数のブロックP107では、DCT係数のブロックP106の、DC成分である左上のDCT係数の0.5が、1に、最高の周波数成分である右下のDCT係数の1が、1に、他のDCT係数の0が、0に、それぞれ量子化されている。 Therefore, in the quantization coefficient block P 107 , the DCT coefficient 0.5 of the upper left DCT coefficient of the DCT coefficient block P 106 is 1, and the lower right DCT coefficient 1 of the highest frequency component is 1, The other DCT coefficients 0 are quantized to 1 and 0, respectively.

符号化装置22では、以上のような量子化係数のブロックP107を含む符号化ストリームが出力され、図示せぬ復号装置で復号される。 The encoding device 22 outputs an encoded stream including the block P 107 of quantized coefficients as described above, and is decoded by a decoding device (not shown).

すなわち、復号装置では、量子化係数のブロックP107を、逆量子化して逆DCTすることにより、予測誤差P105に相当する、復号画像と予測画像との差分である復号誤差が求められ、その復号誤差と予測画像とを加算することにより、復号画像が求められる。 That is, the decoding device obtains a decoding error corresponding to the prediction error P 105 , which is a difference between the decoded image and the predicted image, by dequantizing the block P 107 of the quantized coefficient and performing inverse DCT. By adding the decoding error and the predicted image, a decoded image is obtained.

上述したように、量子化係数のブロックP107は、DC成分、及び最高の周波数成分の量子化係数が1で、他の周波数成分の量子化係数が0のブロックであるため、そのような量子化係数のブロックP107が逆量子化されて逆DCTされることにより、例えば、予測誤差P105と同様に、水平方向に、0と1の画素値が交互に配置され、垂直方向に、0又は1の画素値だけが配置された復号誤差のブロックP108が得られる。 As described above, the quantization coefficient block P 107 is a block in which the quantization coefficient of the DC component and the highest frequency component is 1, and the quantization coefficient of the other frequency component is 0. As a result of inverse quantization and inverse DCT of the quantization coefficient block P 107 , for example, similarly to the prediction error P 105 , pixel values of 0 and 1 are alternately arranged in the horizontal direction, and 0 in the vertical direction. Alternatively, a decoding error block P 108 in which only one pixel value is arranged is obtained.

また、量子化係数のブロックP107に符号化された原画像のブロックP103の予測画像P104は、上述したように、すべての画素値が22のブロックである。 Further, as described above, the predicted image P 104 of the original image block P 103 encoded in the quantization coefficient block P 107 is a block having all the pixel values of 22.

したがって、復号誤差のブロックP108と予測画像P104とを加算して得られる、原画像のブロックP103の復号画像のブロックP109は、元の原画像のブロックP103と同様に、22の画素値と、その画素値と1だけ異なる23の画素値とが、水平方向にのみ交互に配置され、垂直方向には、22又23の画素値だけが配置されたブロック、つまり、元の原画像のブロックP103に施されているディザを維持したブロックとなる。 Thus, obtained by adding the block P 108 of the decoding error and the predicted image P 104, block P 109 of the decoded image of the block P 103 of the original image, similarly to the block P 103 of the original source image, the 22 A pixel value and 23 pixel values that differ from the pixel value by 1 are arranged alternately only in the horizontal direction, and only 22 or 23 pixel values are arranged in the vertical direction. This is a block that maintains the dither applied to the block P 103 of the image.

次に、図7の符号化装置22は、原画像の予測誤差を周波数成分に変換し、その周波数成分を量子化することにより、原画像を符号化する符号化方式に適用することができる。   Next, the encoding device 22 in FIG. 7 can be applied to an encoding method for encoding an original image by converting the prediction error of the original image into a frequency component and quantizing the frequency component.

このような符号化方式としては、例えば、MPEG(Moving Picture Experts Group)2や、MPEG4ビジュアル、H.264/AVC(Advanced Video Coding)などがある。   Examples of such an encoding method include MPEG (Moving Picture Experts Group) 2, MPEG4 visual, and H.264 / AVC (Advanced Video Coding).

図12は、符号化方式として、H.264/AVCを採用した場合の符号化装置22の構成例を示している。   FIG. 12 shows a configuration example of the encoding device 22 when H.264 / AVC is adopted as the encoding method.

なお、図中、図7の場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。   In the figure, portions corresponding to those in FIG. 7 are denoted by the same reference numerals, and description thereof will be omitted below as appropriate.

オーサリング装置21(図6)からの原画像は、表示順に、並べ替え部61に供給される。   The original images from the authoring device 21 (FIG. 6) are supplied to the rearrangement unit 61 in the display order.

並べ替え部61は、オーサリング装置21からの表示順の原画像を符号化(復号)順に並べ替え、順に、演算部62及びインター予測部71に供給する。   The rearrangement unit 61 rearranges the original images in the display order from the authoring device 21 in the encoding (decoding) order, and sequentially supplies the images to the calculation unit 62 and the inter prediction unit 71.

演算部62は、並べ替え部61からの原画像を、所定のブロックに分割し、符号化の対象とする注目ブロックを選択する。さらに、演算部62は、注目ブロックと、後述するモード判定部72から供給される注目ブロックの予測画像との予測誤差を、必要に応じて求め、直交変換部63に供給する。直交変換部63は、演算部62からの注目ブロックの予測誤差に対して、DCT、さらには、必要に応じて、アダマール変換等の直交変換処理を施し、その結果得られる注目ブロックの直交変換係数を、量子化部64に供給する。   The calculation unit 62 divides the original image from the rearrangement unit 61 into predetermined blocks, and selects a target block to be encoded. Further, the calculation unit 62 obtains a prediction error between the block of interest and the predicted image of the block of interest supplied from the mode determination unit 72 described later as needed, and supplies the prediction error to the orthogonal transform unit 63. The orthogonal transform unit 63 performs orthogonal transform processing such as DCT and, if necessary, Hadamard transform on the prediction error of the target block from the calculation unit 62, and the orthogonal transform coefficient of the target block obtained as a result Is supplied to the quantization unit 64.

量子化部64には、直交変換部63から注目ブロックの直交変換係数が供給される他、後述するレート用量子化ステップ制御部75から、第1の量子化制御情報としての量子化パラメータQpが供給されるとともに、ディザ用量子化ステップ制御部42から、第2の量子化制御情報としてのスケーリングリストが供給される。   The quantization unit 64 is supplied with the orthogonal transform coefficient of the block of interest from the orthogonal transform unit 63, and receives a quantization parameter Qp as first quantization control information from the rate quantization step control unit 75 described later. In addition, the scaling list as the second quantization control information is supplied from the dithering quantization step control unit 42.

量子化部64は、レート用量子化ステップ制御部75からの量子化パラメータQpと、ディザ用量子化ステップ制御部42からのスケーリングリストとに基づいて、量子化ステップを決定し、その量子化ステップで、直交変換部63からの注目ブロックの直交変換係数を量子化して、その結果得られる注目ブロックの量子化係数を、エントロピー符号化部73に供給する。   The quantization unit 64 determines a quantization step based on the quantization parameter Qp from the rate quantization step control unit 75 and the scaling list from the dither quantization step control unit 42, and the quantization step Thus, the orthogonal transform coefficient of the target block from the orthogonal transform unit 63 is quantized, and the quantized coefficient of the target block obtained as a result is supplied to the entropy encoding unit 73.

エントロピー符号化部73は、量子化部64から供給される量子化係数、レート用量子化ステップ制御部75から供給される量子化パラメータQp、及びディザ用量子化ステップ制御部42から供給されるスケーリングリスト、その他のデータに対して、CAVLC(Context-Adaptive Variable Length Coding)などの可変長符号化、又は、CABAC(Context-Adaptive Binary Arithmetic Coding)などの算術符号化等の処理を施すことにより、符号化ビットストリームを生成し、バッファ74に供給する。   The entropy encoding unit 73 includes a quantization coefficient supplied from the quantization unit 64, a quantization parameter Qp supplied from the rate quantization step control unit 75, and a scaling supplied from the dither quantization step control unit 42. Codes can be applied to lists and other data by processing such as CAVLC (Context-Adaptive Variable Length Coding) or other variable-length coding, or CABAC (Context-Adaptive Binary Arithmetic Coding). A generated bit stream is generated and supplied to the buffer 74.

バッファ74は、エントロピー符号化部73からの符号化ビットストリームを一時記憶し、適宜読み出して、記録制御装置23(図6)に供給する。   The buffer 74 temporarily stores the encoded bit stream from the entropy encoding unit 73, reads it out as appropriate, and supplies it to the recording control device 23 (FIG. 6).

また、バッファ74は、符号化ビットストリームの記憶量を、適宜、レート用量子化ステップ制御部75に供給する。   Further, the buffer 74 supplies the storage amount of the encoded bit stream to the rate quantization step control unit 75 as appropriate.

レート用量子化ステップ制御部75は、バッファ74からの符号化ビットストリームの記憶量に基づいて、量子化部64の量子化ステップを制御する。   The rate quantization step control unit 75 controls the quantization step of the quantization unit 64 based on the storage amount of the encoded bit stream from the buffer 74.

すなわち、レート用量子化ステップ制御部75は、符号化ビットストリームの記憶量が大である場合には、その記憶量を小にするため、量子化部64で粗い量子化を行う量子化ステップが決定される第1の量子化制御情報としての量子化パラメータQpを決定する。また、レート用量子化ステップ制御部75は、符号化ビットストリームの記憶量が小である場合には、その記憶量を大にするため、量子化部64で細かい量子化を行う量子化ステップが決定される第1の量子化制御情報としての量子化パラメータQpを決定する。   That is, when the storage amount of the encoded bitstream is large, the rate quantization step control unit 75 performs a quantization step for performing rough quantization by the quantization unit 64 in order to reduce the storage amount. The quantization parameter Qp as the first quantization control information to be determined is determined. Also, the rate quantization step control unit 75 has a quantization step for performing fine quantization in the quantization unit 64 in order to increase the storage amount when the storage amount of the encoded bitstream is small. The quantization parameter Qp as the first quantization control information to be determined is determined.

レート用量子化ステップ制御部75は、以上のように、符号化ビットストリームの記憶量に基づいて生成した第1の量子化制御情報としての量子化パラメータQpを、量子化部64に供給することにより、符号化ビットストリームのレートが、所定の値(所定の範囲内の値)となるように、量子化ステップを制御する。   The rate quantization step control unit 75 supplies the quantization parameter Qp as the first quantization control information generated based on the storage amount of the encoded bitstream to the quantization unit 64 as described above. Thus, the quantization step is controlled so that the rate of the encoded bit stream becomes a predetermined value (a value within a predetermined range).

ここで、H.264/AVCでは、量子化パラメータQpが大であるほど、量子化ステップ(量子化の粒度)も大になる。したがって、符号化ビットストリームの記憶量が大である場合には、量子化パラメータQpは大きな値に決定され、量子化ステップも大きな値に決定される。その結果、粗い量子化が行われ、符号化ビットストリームのレート(データ量)は小になる。一方、符号化ビットストリームの記憶量が小である場合には、量子化パラメータQpは小さな値に決定され、量子化ステップも小さな値に決定される。その結果、細かい量子化が行われ、符号化ビットストリームのレートは大になる。   Here, in H.264 / AVC, the larger the quantization parameter Qp, the larger the quantization step (quantization granularity). Therefore, when the storage amount of the encoded bitstream is large, the quantization parameter Qp is determined to be a large value, and the quantization step is also determined to be a large value. As a result, coarse quantization is performed, and the rate (data amount) of the encoded bit stream becomes small. On the other hand, when the storage amount of the encoded bitstream is small, the quantization parameter Qp is determined to be a small value, and the quantization step is also determined to be a small value. As a result, fine quantization is performed and the rate of the encoded bit stream is increased.

H.264/AVCに準拠した符号化を行う従来の符号化装置では、上述のように、符号化ビットストリームの記憶量が大である場合に、量子化パラメータQpが大きな値に決定され、量子化ステップも大きな値に決定されることで、前述の図3及び図4で説明したように、ブロックにおいて、最高の周波数成分である右下の直交変換係数(DCT係数等)の1や-1が、0に量子化される。   As described above, in the conventional coding apparatus that performs coding in accordance with H.264 / AVC, when the storage amount of the coded bitstream is large, the quantization parameter Qp is determined to be a large value, Since the conversion step is also determined to be a large value, as described with reference to FIGS. 3 and 4 above, 1 or −1 of the right lower orthogonal transform coefficient (DCT coefficient, etc.) which is the highest frequency component in the block Is quantized to 0.

なお、H.264/AVCでは、量子化パラメータQpは、いわゆるマクロブロックごとに決定される。   In H.264 / AVC, the quantization parameter Qp is determined for each so-called macroblock.

レート用量子化ステップ制御部75は、第1の量子化制御情報としての量子化パラメータQpを、量子化部64に供給する他、ディザ用量子化ステップ制御部42とエントロピー符号化部73にも供給する。   The rate quantization step control unit 75 supplies the quantization parameter Qp as the first quantization control information to the quantization unit 64, and also supplies the dither quantization step control unit 42 and the entropy encoding unit 73. Supply.

一方、ディザ情報取得部41は、量子化部64で量子化の対象となっている注目ブロックにディザが施されているかどうかを表すディザ情報を取得し、ディザ用量子化ステップ制御部42に供給する。   On the other hand, the dither information acquisition unit 41 acquires dither information indicating whether or not the target block to be quantized by the quantization unit 64 is dithered and supplies it to the dither quantization step control unit 42. To do.

ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報に基づいて、量子化部64が周波数成分を量子化するときの量子化ステップを制御する。   The dither quantization step control unit 42 controls the quantization step when the quantization unit 64 quantizes the frequency component based on the dither information from the dither information acquisition unit 41.

すなわち、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表していない場合には、第2の量子化制御情報としてのスケーリングリストである、スケーリングマトリクス(Scaling Matrix)の集合の、各スケーリングマトリクスのスケーリング(Scaling)値を、標準値(デフォルト)に設定する。   That is, when the dither information from the dither information acquisition unit 41 does not indicate that the target block is dithered, the dither quantization step control unit 42 uses the second dither control information as the second quantization control information. The scaling value of each scaling matrix in the set of scaling matrices (Scaling Matrix) that is the scaling list is set to a standard value (default).

ここで、H.264/AVCでは、DCT等の直交変換の対象となるブロック(DCT Matrix)の直交変換係数ごとに、量子化の粒度を変えることができるように、スケーリングマトリクスが用意されている。   Here, in H.264 / AVC, a scaling matrix is prepared so that the quantization granularity can be changed for each orthogonal transform coefficient of a block (DCT Matrix) subject to orthogonal transform such as DCT. .

直交変換の対象となるブロックが、例えば、4×4のブロックである場合、スケーリングマトリクスは、4×4のコンポーネントを有するマトリクスで、各コンポーネントは、スケーリング値と呼ばれる。H.264/AVCでは、量子化ステップは、上述の量子化パラメータQpとスケーリング値との両方に基づいて決定され、その量子化ステップで、直交変換係数の量子化が行われるが、この量子化においては、スケーリング値で、直交変換係数を除算することが行われる。   When the block to be orthogonally transformed is, for example, a 4 × 4 block, the scaling matrix is a matrix having 4 × 4 components, and each component is called a scaling value. In H.264 / AVC, the quantization step is determined based on both of the above-described quantization parameter Qp and the scaling value, and in this quantization step, the orthogonal transform coefficient is quantized. In, the orthogonal transform coefficient is divided by the scaling value.

したがって、スケーリング値が小であれば、量子化ステップは小となって、細かい量子化が行われる。一方、スケーリング値が大であれば、量子化ステップは大となって、粗い量子化が行われる。   Therefore, if the scaling value is small, the quantization step is small and fine quantization is performed. On the other hand, if the scaling value is large, the quantization step is large and coarse quantization is performed.

H.264/AVCにおいて、スケーリング値は、1ないし255の範囲の整数値に設定することができ、標準値は、16になっている。   In H.264 / AVC, the scaling value can be set to an integer value in the range of 1 to 255, and the standard value is 16.

このため、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表していない場合には、スケーリングマトリクスのスケーリング値を、標準値である16に設定する。   Therefore, if the dither information from the dither information acquisition unit 41 does not indicate that the target block has been dithered, the dither quantization step control unit 42 sets the scaling value of the scaling matrix to the standard value. Set the value to 16.

なお、H.264/AVCでは、直交変換の対象となるブロックとして、輝度信号のブロック、色信号Cbのブロック、及び色信号Crのブロックがあり、さらに、輝度信号のブロックには、4×4のブロックと、8×8のブロックとの2種類がある。   In H.264 / AVC, there are a luminance signal block, a color signal Cb block, and a color signal Cr block as blocks to be subjected to orthogonal transformation, and the luminance signal block includes 4 × 4. There are two types of blocks, 8 × 8 blocks.

また、H.264/AVCでは、イントラ符号化(フレーム内予測)されるブロックと、インター符号化(フレーム間予測)されるブロックとのそれぞれに、スケーリングマトリクスを指定することができる。   In H.264 / AVC, a scaling matrix can be specified for each of a block to be intra-encoded (intra-frame prediction) and a block to be inter-encoded (inter-frame prediction).

したがって、スケーリングマトリクスは、輝度信号の4×4のブロック、輝度信号の8×8のブロック、色信号Cbのブロック、及び色信号Crのブロックのそれぞれについて、イントラ符号化用とインター符号化用とが存在する。つまり、スケーリングマトリクスは、8個存在する。この8個のスケーリングマトリクスの集合が、スケーリングリスト(Scaling List)と呼ばれる。   Therefore, the scaling matrix is for intra coding and inter coding for each of the 4 × 4 block of the luminance signal, the 8 × 8 block of the luminance signal, the block of the color signal Cb, and the block of the color signal Cr. Exists. That is, there are eight scaling matrices. A set of these eight scaling matrices is called a scaling list.

ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表していない場合には、標準値のスケーリング値をコンポーネントとするスケーリングマトリクスの集合であるスケーリングリストを、第2の量子化制御情報として、量子化部64とエントロピー符号化部73に供給する。   When the dither information from the dither information acquisition unit 41 does not indicate that the target block is dithered, the dither quantization step control unit 42 uses a scaling value of a standard value as a component as a scaling matrix. Is supplied to the quantization unit 64 and the entropy encoding unit 73 as second quantization control information.

また、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表している場合には、レート用量子化ステップ制御部75から供給される第1の量子化制御情報としての量子化パラメータQpに基づいて、量子化部64の量子化ステップを制御する第2の量子化制御情報としてのスケーリングリストを生成する。   In addition, when the dither information from the dither information acquisition unit 41 indicates that the target block has been dithered, the dither quantization step control unit 42 starts from the rate quantization step control unit 75. Based on the supplied quantization parameter Qp as the first quantization control information, a scaling list as second quantization control information for controlling the quantization step of the quantization unit 64 is generated.

すなわち、ディザ用量子化ステップ制御部42は、ディザ情報取得部41からのディザ情報が、注目ブロックにディザが施されていることを表している場合には、注目ブロックの最高の周波数成分の直交変換係数の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、量子化部64での量子化ステップを制御する第2の量子化制御情報としてのスケーリングリストを生成する。   That is, when the dither information from the dither information acquisition unit 41 indicates that the target block is dithered, the dither quantization step control unit 42 is orthogonal to the highest frequency component of the target block. Second quantization control for controlling the quantization step in the quantization unit 64 so that the transform coefficient value −1 or 1 is quantized into a quantization coefficient that can be restored by inverse quantization. Generate a scaling list as information.

なお、H.264/AVCでは、量子化ステップは、量子化パラメータQpとスケーリング値との両方に基づいて決定されるので、その量子化ステップで量子化が行われた場合に、最高の周波数成分の直交変換係数の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、量子化パラメータQpに基づき、スケーリング値が設定される。   In H.264 / AVC, the quantization step is determined based on both the quantization parameter Qp and the scaling value, so that when the quantization step is performed, the highest frequency component is obtained. Based on the quantization parameter Qp, the scaling value is set so that −1 or 1 which is the value of the orthogonal transform coefficient is quantized to a quantization coefficient that can be restored by inverse quantization.

ここで、上述したように、量子化ステップは、量子化パラメータQpが大であるほど大になり、スケーリング値が小であるほど小になる。   Here, as described above, the quantization step increases as the quantization parameter Qp increases, and decreases as the scaling value decreases.

このため、ディザ用量子化ステップ制御部42では、量子化パラメータQpが大である場合には、スケーリング値として、小さな値が設定され、量子化パラメータQpが小である場合には、スケーリング値として、大きな値が設定される。これにより、注目ブロックの最高の周波数成分の直交変換係数の値である-1又は1が、逆量子化によって復元することができる量子化係数に量子化されるように、量子化部64での量子化ステップを制御するスケーリング値が設定される。   For this reason, the dithering quantization step control unit 42 sets a small value as the scaling value when the quantization parameter Qp is large, and as the scaling value when the quantization parameter Qp is small. A large value is set. As a result, the value of the orthogonal transform coefficient of -1 or 1 of the highest frequency component of the block of interest is quantized by the quantization unit 64 so that it is quantized into a quantized coefficient that can be restored by inverse quantization. A scaling value is set that controls the quantization step.

すなわち、図13は、原画像にディザが施されている場合に、ディザ用量子化ステップ制御部42が量子化パラメータQpに基づいて設定されるスケーリング値を示している。   That is, FIG. 13 shows a scaling value set by the dithering quantization step control unit 42 based on the quantization parameter Qp when the original image is dithered.

上述したように、ディザ用量子化ステップ制御部42は、量子化パラメータQpが大である場合には、小さな値のスケーリング値を設定し、量子化パラメータQpが小である場合には、大きな値のスケーリング値を設定する。   As described above, the dithering quantization step control unit 42 sets a small scaling value when the quantization parameter Qp is large, and sets a large value when the quantization parameter Qp is small. Set the scaling value.

図12に戻り、ディザ用量子化ステップ制御部42は、スケーリング値を設定すると、そのスケーリング値をコンポーネントとするスケーリングマトリクスの集合であるスケーリングリストを、第2の量子化制御情報として、量子化部64とエントロピー符号化部73に供給する。   Returning to FIG. 12, when the dithering quantization step control unit 42 sets a scaling value, a scaling list that is a set of scaling matrices having the scaling value as a component is used as the second quantization control information, and the quantization unit. 64 and the entropy encoding unit 73.

ここで、エントロピー符号化部73は、ディザ用量子化ステップ制御部42から供給されるスケーリングリストを符号化ビットストリームに含めるが、H.264/AVCでは、スケーリングリストは、符号化ビットストリーム(のシンタクス(Syntax))中のSPS(Sequence Parameter Set)又はPPS(Picture Parameter Set)に含められる。この符号化ビットストリームは、H.264/AVCに準拠したものであり、したがって、H.264/AVCに準拠した従来の復号装置で復号することができる。   Here, the entropy encoding unit 73 includes the scaling list supplied from the dither quantization step control unit 42 in the encoded bitstream. In H.264 / AVC, the scaling list is the encoded bitstream ( It is included in SPS (Sequence Parameter Set) or PPS (Picture Parameter Set) in the syntax (Syntax). This encoded bit stream is compliant with H.264 / AVC, and therefore can be decoded by a conventional decoding device compliant with H.264 / AVC.

なお、H.264/AVCのスケーリングリストは、MPEG2やMPEG4ビジュアルの量子化マトリクス(Quantiser Matrix)に相当する。   The H.264 / AVC scaling list corresponds to an MPEG2 or MPEG4 visual quantization matrix.

上述したように、量子化部64で得られた注目ブロックの量子化係数は、エントロピー符号化部73に供給され、符号化ビットストリームに含められるが、さらに、逆量子化部65にも供給される。   As described above, the quantization coefficient of the block of interest obtained by the quantization unit 64 is supplied to the entropy encoding unit 73 and included in the encoded bitstream, but is also supplied to the inverse quantization unit 65. The

逆量子化部65は、量子化部64からの注目ブロックの量子化係数を逆量子化し、その結果得られる注目ブロックの直交変換係数を、逆直交変換部66に供給する。   The inverse quantization unit 65 inversely quantizes the quantization coefficient of the target block from the quantization unit 64 and supplies the orthogonal transform coefficient of the target block obtained as a result to the inverse orthogonal transform unit 66.

逆直交変換部66は、逆量子化部65から供給された変換係数に対して逆直交変換処理を施し、これにより、注目ブロックの予測誤差に相当する復号誤差を求め、演算部67に供給する。   The inverse orthogonal transform unit 66 performs an inverse orthogonal transform process on the transform coefficient supplied from the inverse quantization unit 65, thereby obtaining a decoding error corresponding to the prediction error of the block of interest and supplying the decoding unit 67 with the decoding error. .

演算部67は、モード判定部72から供給される、注目ブロックの予測誤差を求めるのに用いられた予測画像と、逆直交変換部66からの復号誤差とを、必要に応じて加算することにより、注目ブロックの復号画像をローカルデコードする。演算部67で得られた復号画像は、フィルタ68に供給される。   The calculation unit 67 adds the prediction image supplied from the mode determination unit 72 and used to obtain the prediction error of the block of interest and the decoding error from the inverse orthogonal transform unit 66 as necessary. The decoded image of the block of interest is locally decoded. The decoded image obtained by the calculation unit 67 is supplied to the filter 68.

フィルタ68は、必要に応じて、注目ブロックの復号画像に対して、ブロック歪みを除去するデブロッキング処理を施し、フレームメモリ69に供給する。   The filter 68 performs a deblocking process to remove block distortion on the decoded image of the block of interest as necessary, and supplies the result to the frame memory 69.

フレームメモリ69は、フィルタ68からの復号画像を、予測画像の生成に用いる参照画像として記憶する。この参照画像は、イントラ予測部70及びインター予測部71において予測画像を生成するときに参照される。   The frame memory 69 stores the decoded image from the filter 68 as a reference image used for generating a predicted image. This reference image is referred to when the intra prediction unit 70 and the inter prediction unit 71 generate a prediction image.

すなわち、イントラ予測部70は、注目ブロックのピクチャのうちの、既に符号化され、ローカルデコードされて、フレームメモリ69に記憶されている復号画像である参照画像から、演算部62で予測誤差を求めようとしている注目ブロックに隣接するブロックの画像を抽出することにより、イントラ予測画像を生成し、モード判定部72に供給する。   In other words, the intra prediction unit 70 obtains a prediction error from the reference image, which is a decoded image that has already been encoded, locally decoded, and stored in the frame memory 69 among the pictures of the block of interest. An intra prediction image is generated by extracting an image of a block adjacent to the target block to be supplied, and supplied to the mode determination unit 72.

また、インター予測部71は、注目ブロックのピクチャ(フレーム又はフィールド)とは異なるピクチャのうちの、既に符号化され、ローカルデコードされて、フレームメモリ69に記憶されている復号画像である参照画像と、注目ブロックとの間の動きを表す動きベクトルを検出し、その動きベクトルに基づいて、参照画像に動き補償を施こすことにより(MotionEstimation/Compensation)、インター予測画像を生成して、モード判定部72に供給する。   In addition, the inter prediction unit 71 includes a reference image that is a decoded image that has already been encoded, locally decoded, and stored in the frame memory 69 among pictures different from the picture (frame or field) of the block of interest. Detects a motion vector representing the motion between the block of interest, and performs motion compensation on the reference image based on the motion vector (MotionEstimation / Compensation) to generate an inter prediction image and a mode determination unit 72.

モード判定部72は、注目ブロックに適用する予測モードを選択し(ModeDecision)、その予測モードに応じて、イントラ予測部70からのイントラ予測画像、又はインター予測部71からのインター予測画像のうちの一方を、注目ブロックの予測画像として、演算部62及び67に供給する。   The mode determination unit 72 selects a prediction mode to be applied to the block of interest (ModeDecision), and according to the prediction mode, the intra prediction image from the intra prediction unit 70 or the inter prediction image from the inter prediction unit 71 One is supplied to the calculation units 62 and 67 as a predicted image of the block of interest.

上述したように、演算部62では、モード判定部72からの予測画像を用いて、予測誤差が求められ、演算部67では、モード判定部72からの予測画像を用いて、復号画像が求められる。   As described above, the calculation unit 62 obtains a prediction error using the predicted image from the mode determination unit 72, and the calculation unit 67 obtains a decoded image using the prediction image from the mode determination unit 72. .

以上のように、原画像にディザが施されている場合には、そのディザによって生じている周波数成分である最高の周波数成分が、逆量子化によって復元することができる量子化係数に量子化されるように、符号化ビットストリームに基づく量子化ステップの制御とは別に、量子化ステップを制御するので、復号画像の画質の劣化を防止することができる。   As described above, when dithering is applied to the original image, the highest frequency component, which is the frequency component generated by the dithering, is quantized into a quantization coefficient that can be restored by inverse quantization. As described above, since the quantization step is controlled separately from the control of the quantization step based on the encoded bit stream, it is possible to prevent deterioration of the image quality of the decoded image.

さらに、原画像にディザが施されている場合の量子化ステップの制御は、周波数成分ごとに設定が可能なスケーリング値を用いて行われ、ディザによって生じている周波数成分のみが、逆量子化によって復元することができる量子化係数に量子化されるように、スケーリング値が設定されるので、符号化ビットストリームのデータ量の増加を抑制することができる。   Furthermore, when the dither is applied to the original image, the quantization step is controlled using a scaling value that can be set for each frequency component, and only the frequency component generated by the dither is dequantized. Since the scaling value is set so as to be quantized into a quantized coefficient that can be restored, an increase in the data amount of the encoded bitstream can be suppressed.

ここで、以上のような、原画像にディザが施されているかどうかによって、量子化ステップを制御することは、インター予測画像を用いて予測誤差が求められる場合と、イントラ予測画像を用いて予測誤差が求められる場合とのいずれにも適用可能であるが、特に、イントラ予測画像を用いて予測誤差が求められる場合に有用である。   Here, controlling the quantization step depending on whether or not dither has been applied to the original image as described above includes the case where a prediction error is obtained using an inter prediction image and the case where prediction is performed using an intra prediction image. The present invention is applicable to both cases where an error is obtained, but is particularly useful when a prediction error is obtained using an intra-predicted image.

なお、図12において、並べ替え部61、演算部62、逆量子化部65、逆直交変換部66、演算部67、フィルタ68、フレームメモリ69、イントラ予測部70、インター予測部71、及びモード判定部72が、図7の予測部1に相当し、直交変換部63が、図7の変換部2に相当する。また、量子化部64が、図7の量子化部43に相当し、エントロピー符号化部73が、図7の生成部44に相当する。さらに、バッファ74及びレート用量子化ステップ制御部75が、図7のレート制御部5に相当する。   In FIG. 12, rearrangement unit 61, calculation unit 62, inverse quantization unit 65, inverse orthogonal transform unit 66, calculation unit 67, filter 68, frame memory 69, intra prediction unit 70, inter prediction unit 71, and mode The determination unit 72 corresponds to the prediction unit 1 in FIG. 7, and the orthogonal transformation unit 63 corresponds to the conversion unit 2 in FIG. Further, the quantization unit 64 corresponds to the quantization unit 43 in FIG. 7, and the entropy encoding unit 73 corresponds to the generation unit 44 in FIG. 7. Further, the buffer 74 and the rate quantization step control unit 75 correspond to the rate control unit 5 of FIG.

次に、図14は、本発明を適用したオーサリングシステムの他の一実施の形態の構成例を示している。   Next, FIG. 14 shows a configuration example of another embodiment of an authoring system to which the present invention is applied.

なお、図中、図6における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。   In the figure, portions corresponding to those in FIG. 6 are denoted by the same reference numerals, and description thereof will be omitted below as appropriate.

すなわち、図14のオーサリングシステムは、オーサリング装置21、符号化装置22、及び記録制御装置23を有する点で、図6のオーサリングシステムと一致し、符号化装置91、復号装置92、表示装置93、及び操作装置94が新たに設けられている点で、図6のオーサリングシステムと異なっている。   That is, the authoring system of FIG. 14 is the same as the authoring system of FIG. 6 in that it has an authoring device 21, an encoding device 22, and a recording control device 23, and an encoding device 91, a decoding device 92, a display device 93, 6 is different from the authoring system of FIG. 6 in that an operation device 94 is newly provided.

オーサリング装置21では、図6で説明したように、そこに供給される素材としての画像に対して、オーサリングシステムのオペレータの操作に応じた処理を施し、オーサリングの結果としての画像を、符号化装置22及び91に供給する。   As described with reference to FIG. 6, the authoring device 21 performs processing according to the operation of the operator of the authoring system on the image as the material supplied thereto, and the image as a result of the authoring is encoded. 22 and 91.

符号化装置91は、オーサリング装置21からの画像を、符号化の対象である原画像として、符号化装置22と同一の符号化方式で符号化し、すなわち、符号化装置22が原画像を、例えば、H.264/AVCに準拠した符号化方式で符号化する場合には、符号化装置91も、原画像を、H.264/AVCに準拠した符号化方式で符号化し、その結果得られる符号化ビットストリームを、復号装置92に供給する。   The encoding device 91 encodes the image from the authoring device 21 as an original image to be encoded by the same encoding method as the encoding device 22, that is, the encoding device 22 converts the original image, for example, When encoding with an encoding method compliant with H.264 / AVC, the encoding device 91 also encodes the original image with an encoding method compliant with H.264 / AVC, and the resulting code The encoded bit stream is supplied to the decoding device 92.

ここで、符号化装置22が原画像を、例えば、H.264/AVCに準拠した符号化方式で符号化する場合には、符号化装置91としては、H.264/AVCに準拠した符号化方式で符号化を行う従来の符号化装置を用いることができる。   Here, when the encoding device 22 encodes an original image with, for example, an encoding method compliant with H.264 / AVC, the encoding device 91 performs encoding according to H.264 / AVC. A conventional encoding device that performs encoding by a method can be used.

また、符号化装置91は、符号化装置22と同一構成とすることができる。但し、符号化装置91を符号化装置22と同一構成とする場合には、符号化装置91において、原画像にディザが施されているかどうかによって、量子化ステップを制御しないようにする必要がある。   Also, the encoding device 91 can have the same configuration as the encoding device 22. However, when the encoding device 91 has the same configuration as that of the encoding device 22, it is necessary to prevent the quantization step from being controlled in the encoding device 91 depending on whether or not the original image is dithered. .

復号装置92は、符号化装置91からの符号化ビットストリームを復号し、その結果得られる復号画像を、表示装置93に供給して表示させる。   The decoding device 92 decodes the encoded bit stream from the encoding device 91 and supplies the decoded image obtained as a result to the display device 93 for display.

オーサリングシステムのオペレータは、表示装置93に表示された復号画像を見て、図3ないし図5で説明したように、復号画像において、すべての画素値が値vのブロックと、値v+1のブロックとが交互に現れている部分、つまり、原画像にディザが施されていることにより不自然になっている部分を指定するように、操作装置94を操作する。   The operator of the authoring system looks at the decoded image displayed on the display device 93 and, as described with reference to FIGS. 3 to 5, in the decoded image, all the pixel values of the block having the value v and the value v + 1 The operation device 94 is operated so as to designate a portion where blocks appear alternately, that is, a portion which is unnatural due to dithering being applied to the original image.

操作装置94は、オペレータの操作に応じた操作信号を、符号化装置22のディザ情報取得部41(図7)に供給する。符号化装置22では、ディザ情報取得部41が、操作装置94からの操作信号に応じて、原画像にディザが施されているかどうかを認識することにより、ディザ情報を取得し、ディザ用量子化ステップ制御部42に供給する。   The operation device 94 supplies an operation signal corresponding to the operation of the operator to the dither information acquisition unit 41 (FIG. 7) of the encoding device 22. In the encoding device 22, the dither information acquisition unit 41 acquires dither information by recognizing whether or not the original image is dithered in accordance with an operation signal from the operation device 94, and dither quantization. This is supplied to the step controller 42.

以下、符号化装置22及び記録制御装置23では、図6の場合と同様の処理が行われ、これにより、原画像を符号化した符号化ビットストリームが記録媒体24に記録される。   Thereafter, the encoding device 22 and the recording control device 23 perform the same processing as in the case of FIG. 6, whereby an encoded bit stream obtained by encoding the original image is recorded on the recording medium 24.

次に、符号化装置22(図7)の画像符号化部31や、量子化ステップ制御部32が行う一連の処理は、専用のハードウェアにより行うこともできるし、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータ等にインストールされる。   Next, a series of processing performed by the image encoding unit 31 and the quantization step control unit 32 of the encoding device 22 (FIG. 7) can be performed by dedicated hardware or can be performed by software. When a series of processing is performed by software, a program constituting the software is installed in a general-purpose computer or the like.

そこで、図15は、上述した一連の処理を実行するプログラムがインストールされるコンピュータの一実施の形態の構成例を示している。   Accordingly, FIG. 15 shows a configuration example of an embodiment of a computer in which a program for executing the series of processes described above is installed.

プログラムは、コンピュータに内蔵されている記録媒体としてのハードディスク105やROM103に予め記録しておくことができる。   The program can be recorded in advance on a hard disk 105 or a ROM 103 as a recording medium built in the computer.

あるいはまた、プログラムは、フレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto Optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体111に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体111は、いわゆるパッケージソフトウエアとして提供することができる。   Alternatively, the program is stored temporarily on a removable recording medium 111 such as a flexible disk, a CD-ROM (Compact Disc Read Only Memory), a MO (Magneto Optical) disk, a DVD (Digital Versatile Disc), a magnetic disk, or a semiconductor memory. It can be stored permanently (recorded). Such a removable recording medium 111 can be provided as so-called package software.

なお、プログラムは、上述したようなリムーバブル記録媒体111からコンピュータにインストールする他、ダウンロードサイトから、ディジタル衛星放送用の人工衛星を介して、コンピュータに無線で転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送し、コンピュータでは、そのようにして転送されてくるプログラムを、通信部108で受信し、内蔵するハードディスク105にインストールすることができる。   The program is installed in the computer from the removable recording medium 111 as described above, or transferred from the download site to the computer wirelessly via a digital satellite broadcasting artificial satellite, LAN (Local Area Network), The program can be transferred to a computer via a network such as the Internet, and the computer can receive the program transferred in this way by the communication unit 108 and install it in the built-in hard disk 105.

コンピュータは、CPU(Central Processing Unit)102を内蔵している。CPU102には、バス101を介して、入出力インタフェース110が接続されており、CPU102は、入出力インタフェース110を介して、ユーザによって、キーボードや、マウス、マイク等で構成される入力部107が操作等されることにより指令が入力されると、それにしたがって、ROM(Read Only Memory)103に格納されているプログラムを実行する。あるいは、また、CPU102は、ハードディスク105に格納されているプログラム、衛星若しくはネットワークから転送され、通信部108で受信されてハードディスク105にインストールされたプログラム、またはドライブ109に装着されたリムーバブル記録媒体111から読み出されてハードディスク105にインストールされたプログラムを、RAM(Random Access Memory)104にロードして実行する。これにより、CPU102は、上述したフローチャートにしたがった処理、あるいは上述したブロック図の構成により行われる処理を行う。そして、CPU102は、その処理結果を、必要に応じて、例えば、入出力インタフェース110を介して、LCD(Liquid Crystal Display)やスピーカ等で構成される出力部106から出力、あるいは、通信部108から送信、さらには、ハードディスク105に記録等させる。   The computer includes a CPU (Central Processing Unit) 102. An input / output interface 110 is connected to the CPU 102 via the bus 101, and the CPU 102 operates an input unit 107 including a keyboard, a mouse, a microphone, and the like by the user via the input / output interface 110. When a command is input as a result, the program stored in a ROM (Read Only Memory) 103 is executed accordingly. Alternatively, the CPU 102 also transfers from a program stored in the hard disk 105, a program transferred from a satellite or a network, received by the communication unit 108 and installed in the hard disk 105, or a removable recording medium 111 attached to the drive 109. The program read and installed in the hard disk 105 is loaded into a RAM (Random Access Memory) 104 and executed. Thus, the CPU 102 performs processing according to the above-described flowchart or processing performed by the configuration of the above-described block diagram. Then, the CPU 102 outputs the processing result from the output unit 106 configured with an LCD (Liquid Crystal Display), a speaker, or the like, for example, via the input / output interface 110, or from the communication unit 108 as necessary. Transmission and further recording on the hard disk 105 are performed.

ここで、本明細書において、コンピュータに各種の処理を行わせるためのプログラムを記述する処理ステップは、必ずしもフローチャートとして記載された順序に沿って時系列に処理する必要はなく、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含むものである。   Here, in this specification, the processing steps for describing a program for causing a computer to perform various types of processing do not necessarily have to be processed in time series according to the order described in the flowchart, but in parallel or individually. This includes processing to be executed (for example, parallel processing or processing by an object).

また、プログラムは、1のコンピュータにより処理されるものであっても良いし、複数のコンピュータによって分散処理されるものであっても良い。さらに、プログラムは、遠方のコンピュータに転送されて実行されるものであっても良い。   Further, the program may be processed by a single computer, or may be processed in a distributed manner by a plurality of computers. Furthermore, the program may be transferred to a remote computer and executed.

なお、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   The embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.

すなわち、上述した本実施の形態では、原画像にディザが施されているかどうかを表すディザ情報を取得し、そのディザ情報に基づいて、周波数成分を量子化するときの量子化ステップを制御するようにしたが、その他、例えば、原画像に、CG(Computer Graphics)に関する処理、又は画像合成に関する処理等のディザ以外の編集が施されているかどうかを表す編集情報を取得し、その編集情報に基づいて、周波数成分を量子化するときの量子化ステップを制御することができる。   That is, in the above-described embodiment, dither information indicating whether dither has been applied to the original image is acquired, and the quantization step when quantizing the frequency component is controlled based on the dither information. However, for example, the editing information indicating whether the original image has undergone editing other than dithering such as processing related to CG (Computer Graphics) or processing related to image composition is obtained, and based on the editing information. Thus, the quantization step when the frequency component is quantized can be controlled.

従来の符号化装置の一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of the conventional encoding apparatus. ディザを説明する図である。It is a figure explaining a dither. ディザが施された原画像を符号化して復号する過程で得られるデータを示す図である。It is a figure which shows the data obtained in the process of encoding and decoding the dithered original image. ディザが施された原画像を符号化して復号する過程で得られるデータを示す図である。It is a figure which shows the data obtained in the process of encoding and decoding the dithered original image. ディザが施された原画像と、その原画像を符号化し、復号して得られる復号画像とを示す図である。It is a figure which shows the original image to which the dither was given, and the decoded image obtained by encoding and decoding the original image. 本発明を適用したオーサリングシステムの一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the authoring system to which this invention is applied. 符号化装置22の構成例を示すブロック図である。3 is a block diagram illustrating a configuration example of an encoding device 22. FIG. DCTの基底を示す図である。It is a figure which shows the base of DCT. ディザ用量子化ステップ制御処理を説明するフローチャートである。It is a flowchart explaining the quantization step control process for dithering. 符号化処理を説明するフローチャートである。It is a flowchart explaining an encoding process. ディザが施された原画像を符号化して復号する過程で得られるデータを示す図である。It is a figure which shows the data obtained in the process of encoding and decoding the dithered original image. H.264/AVCに準拠した符号化を行う符号化装置22の構成例を示すブロック図である。It is a block diagram which shows the structural example of the encoding apparatus 22 which performs the encoding based on H.264 / AVC. 量子化パラメータQpに基づいて設定されるスケーリング値を示す図である。It is a figure which shows the scaling value set based on the quantization parameter Qp. 本発明を適用したオーサリングシステムの他の一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of other embodiment of the authoring system to which this invention is applied. 本発明を適用したコンピュータの一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the computer to which this invention is applied.

符号の説明Explanation of symbols

1 予測部, 2 変換部, 5 レート制御部, 21 オーサリング装置, 22 符号化装置, 23 記録制御装置, 24 記録媒体, 31 画像符号化部, 32 量子化ステップ制御部, 41 ディザ情報取得部, 42 ディザ用量子化ステップ制御部, 43 量子化部, 44 生成部, 61 並べ替え部, 62 演算部, 63 直交変換部, 64 量子化部, 65 逆量子化部, 66 逆直交変換部, 67 演算部, 68 フィルタ, 69 フレームメモリ, 70 イントラ予測部, 71 インター予測部, 72 モード判定部, 73 エントロピー符号化部, 74 バッファ, 75 レート用量子化ステップ制御部, 91 符号化装置, 92 復号装置, 93 表示装置, 94 操作装置, 101 バス, 102 CPU, 103 ROM, 104 RAM, 105 ハードディスク, 106 出力部, 107 入力部, 108 通信部, 109 ドライブ, 110 入出力インタフェース, 111 リムーバブル記録媒体   DESCRIPTION OF SYMBOLS 1 Prediction part, 2 conversion part, 5 rate control part, 21 authoring apparatus, 22 encoding apparatus, 23 recording control apparatus, 24 recording medium, 31 image encoding part, 32 quantization step control part, 41 dither information acquisition part, 42 dither quantization step control unit, 43 quantization unit, 44 generation unit, 61 rearrangement unit, 62 operation unit, 63 orthogonal transform unit, 64 quantization unit, 65 inverse quantization unit, 66 inverse orthogonal transform unit, 67 Arithmetic unit, 68 filter, 69 frame memory, 70 intra prediction unit, 71 inter prediction unit, 72 mode determination unit, 73 entropy coding unit, 74 buffer, 75 rate quantization step control unit, 91 coding device, 92 decoding Device, 93 display device, 94 operation device, 101 bus, 102 CPU, 103 ROM, 104 RAM, 105 hard disk, 106 output unit, 107 input unit, 108 communication unit, 109 drive, 110 input / output interface, 111 removable recording medium

Claims (8)

画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、
前記予測誤差を周波数成分に変換する変換手段と、
前記周波数成分を量子化する量子化手段と
を含む画像符号化装置が、前記周波数成分を量子化するときの量子化ステップを制御する制御装置において、
前記画像に編集が施されているかどうかを表す編集情報を取得する編集情報取得手段と、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する編集用量子化ステップ制御手段と
を備える制御装置。
A prediction means for calculating a prediction error between an image and a predicted image obtained by predicting the image;
Conversion means for converting the prediction error into a frequency component;
In a control device for controlling a quantization step when the image encoding device including a quantization means for quantizing the frequency component quantizes the frequency component,
Editing information acquisition means for acquiring editing information indicating whether the image has been edited;
A control apparatus comprising: an editing quantization step control unit that controls a quantization step when the frequency component is quantized based on the editing information.
前記編集情報取得手段は、前記周波数成分に基づき、前記画像に編集が施されているかどうかを判定することにより、前記編集情報を取得する
請求項1に記載の制御装置。
The control device according to claim 1, wherein the editing information acquisition unit acquires the editing information by determining whether the image is edited based on the frequency component.
前記画像符号化装置は、前記周波数成分を量子化して得られる量子化係数を含む符号化ビットストリームのレートに基づいて、前記量子化ステップを制御するレート制御手段をさらに含み、
前記編集用量子化ステップ制御手段は、前記画像に編集が施されている場合、前記レート制御手段が前記量子化ステップを制御するための量子化ステップ制御情報に基づいて、前記量子化ステップを制御する
請求項1に記載の制御装置。
The image encoding device further includes rate control means for controlling the quantization step based on a rate of an encoded bitstream including a quantization coefficient obtained by quantizing the frequency component,
The editing quantization step control means controls the quantization step based on quantization step control information for the rate control means to control the quantization step when the image is edited. The control device according to claim 1.
前記変換手段は、前記画像の所定のブロックの予測誤差を周波数成分に変換し、
前記レート制御手段は、前記所定のブロックごとの前記量子化ステップを制御し、
前記編集用量子化ステップ制御手段は、前記所定のブロックの周波数成分ごとの前記量子化ステップを制御する
請求項3に記載の制御装置。
The converting means converts a prediction error of a predetermined block of the image into a frequency component,
The rate control means controls the quantization step for each predetermined block;
The control apparatus according to claim 3, wherein the editing quantization step control means controls the quantization step for each frequency component of the predetermined block.
前記編集情報は、ディザ、CG(Computer Graphics)に関する処理、又は画像合成に関する処理が施されているかどうかを表す情報である
請求項1に記載の制御装置。
The control apparatus according to claim 1, wherein the editing information is information indicating whether a process related to dithering, CG (Computer Graphics), or a process related to image composition is performed.
画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、
前記予測誤差を周波数成分に変換する変換手段と、
前記周波数成分を量子化する量子化手段と
を含む画像符号化装置が、前記周波数成分を量子化するときの量子化ステップを制御する制御方法において、
前記画像に編集が施されているかどうかを表す編集情報を取得し、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する
ステップを含む制御方法。
A prediction means for calculating a prediction error between an image and a predicted image obtained by predicting the image;
Conversion means for converting the prediction error into a frequency component;
In a control method for controlling a quantization step when the image encoding device including a quantization means for quantizing the frequency component quantizes the frequency component,
Obtain editing information indicating whether the image has been edited;
A control method including a step of controlling a quantization step when the frequency component is quantized based on the editing information.
画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、
前記予測誤差を周波数成分に変換する変換手段と、
前記周波数成分を量子化する量子化手段と
を含む画像符号化装置が、前記周波数成分を量子化するときの量子化ステップを制御する制御処理を、コンピュータに実行させるプログラムにおいて、
前記画像に編集が施されているかどうかを表す編集情報を取得し、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する
ステップを含む制御処理を、コンピュータに実行させるプログラム。
A prediction means for calculating a prediction error between an image and a predicted image obtained by predicting the image;
Conversion means for converting the prediction error into a frequency component;
In a program for causing a computer to execute a control process for controlling a quantization step when the image encoding device including a quantization unit that quantizes the frequency component quantizes the frequency component,
Obtain editing information indicating whether the image has been edited;
A program for causing a computer to execute a control process including a step of controlling a quantization step when quantizing the frequency component based on the editing information.
画像を符号化する符号化装置において、
前記画像と、その画像を予測した予測画像との予測誤差を求める予測手段と、
前記予測誤差を周波数成分に変換する変換手段と、
前記周波数成分を量子化する量子化手段と、
前記画像に編集が施されているかどうかを表す編集情報を取得する編集情報取得手段と、
前記編集情報に基づいて、前記周波数成分を量子化するときの量子化ステップを制御する編集用量子化ステップ制御手段と
を備える符号化装置。
In an encoding device for encoding an image,
Prediction means for obtaining a prediction error between the image and a prediction image obtained by predicting the image;
Conversion means for converting the prediction error into a frequency component;
Quantization means for quantizing the frequency component;
Editing information acquisition means for acquiring editing information indicating whether the image has been edited;
An encoding apparatus comprising: an editing quantization step control unit that controls a quantization step when the frequency component is quantized based on the editing information.
JP2006238109A 2006-09-01 2006-09-01 Control device, control method, encoder, and program Pending JP2008061122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006238109A JP2008061122A (en) 2006-09-01 2006-09-01 Control device, control method, encoder, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006238109A JP2008061122A (en) 2006-09-01 2006-09-01 Control device, control method, encoder, and program

Publications (1)

Publication Number Publication Date
JP2008061122A true JP2008061122A (en) 2008-03-13

Family

ID=39243333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006238109A Pending JP2008061122A (en) 2006-09-01 2006-09-01 Control device, control method, encoder, and program

Country Status (1)

Country Link
JP (1) JP2008061122A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0487460A (en) * 1990-07-31 1992-03-19 Canon Inc Picture processor
JPH05300492A (en) * 1991-12-18 1993-11-12 Victor Co Of Japan Ltd Moving iamge coding device
JPH09205647A (en) * 1996-01-24 1997-08-05 Fuji Xerox Co Ltd Image coder, image decoder and image processor
JPH1028267A (en) * 1996-07-09 1998-01-27 Matsushita Electric Ind Co Ltd Video-encoding device
JP2003143414A (en) * 2001-11-05 2003-05-16 Canon Inc Picture processing apparatus and method therefor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0487460A (en) * 1990-07-31 1992-03-19 Canon Inc Picture processor
JPH05300492A (en) * 1991-12-18 1993-11-12 Victor Co Of Japan Ltd Moving iamge coding device
JPH09205647A (en) * 1996-01-24 1997-08-05 Fuji Xerox Co Ltd Image coder, image decoder and image processor
JPH1028267A (en) * 1996-07-09 1998-01-27 Matsushita Electric Ind Co Ltd Video-encoding device
JP2003143414A (en) * 2001-11-05 2003-05-16 Canon Inc Picture processing apparatus and method therefor

Similar Documents

Publication Publication Date Title
RU2751082C1 (en) Method for coding and decoding of images, coding and decoding device and corresponding computer programs
JP4844449B2 (en) Moving picture encoding apparatus, method, program, moving picture decoding apparatus, method, and program
US9077968B2 (en) Image processing apparatus and method, and program
US20150010243A1 (en) Method for encoding/decoding high-resolution image and device for performing same
US20130089265A1 (en) Method for encoding/decoding high-resolution image and device for performing same
WO2010001999A1 (en) Dynamic image encoding/decoding method and device
JP2008022404A (en) Image processing apparatus and method, and program
JP2011130410A (en) Encoding method, decoding method and apparatus thereof
JP2005184042A (en) Image decoding apparatus, image decoding method, and image decoding program
JP2008252346A (en) Image encoder and image encoding method
JP2011166592A (en) Image encoding device, and image decoding device
KR102321895B1 (en) Decoding apparatus of digital video
JP2023027401A (en) Decoding device, program, and decoding method
JP4786623B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
JP4719854B2 (en) Moving picture encoding apparatus, moving picture encoding program, moving picture decoding apparatus, and moving picture decoding program
JP2008061122A (en) Control device, control method, encoder, and program
JP2007266861A (en) Image encoding device
JP6200220B2 (en) Image processing apparatus, encoding apparatus, decoding apparatus, and program
JP4561688B2 (en) Moving picture encoding apparatus, moving picture encoding program, moving picture decoding apparatus, and moving picture decoding program
KR100728032B1 (en) Method for intra prediction based on warping
JP5136511B2 (en) Decoding apparatus and method, recording medium, and program
JP4857152B2 (en) Orthogonal transformation / quantization equipment
JPH06244736A (en) Encoder
JP2006270392A (en) Image predicting and coding device
JPWO2009133938A1 (en) Video encoding and decoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090623

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101207

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110405