JP5482474B2 - Encoding device and encoding program - Google Patents

Encoding device and encoding program Download PDF

Info

Publication number
JP5482474B2
JP5482474B2 JP2010132335A JP2010132335A JP5482474B2 JP 5482474 B2 JP5482474 B2 JP 5482474B2 JP 2010132335 A JP2010132335 A JP 2010132335A JP 2010132335 A JP2010132335 A JP 2010132335A JP 5482474 B2 JP5482474 B2 JP 5482474B2
Authority
JP
Japan
Prior art keywords
encoding
value
quantization
unit
data
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.)
Expired - Fee Related
Application number
JP2010132335A
Other languages
Japanese (ja)
Other versions
JP2011259240A (en
Inventor
君彦 数井
章 中川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010132335A priority Critical patent/JP5482474B2/en
Publication of JP2011259240A publication Critical patent/JP2011259240A/en
Application granted granted Critical
Publication of JP5482474B2 publication Critical patent/JP5482474B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、符号化装置及び符号化プログラムに関する。   The present invention relates to an encoding device and an encoding program.

情報処理装置は、膨大な情報量を有するデータを処理する。例えば、情報処理装置は、画像や動画などを処理する。また、情報処理装置は、データを伝送する際や蓄積する際に、データを圧縮する符号化処理を実行する。   The information processing apparatus processes data having an enormous amount of information. For example, the information processing apparatus processes an image or a moving image. Further, the information processing apparatus executes an encoding process for compressing data when transmitting or accumulating data.

例えば、動画圧縮規格の1つであるH.264を用いて説明する。動画を符号化する符号化装置は、入力された動画を形成する画像を4画素×4画素ごとの単位ブロックに分割し、又は、8画素×8画素ごとの単位ブロックに分割する。そして、符号化装置は、単位ブロックごとに一連の符号化処理を実行する。例えば、符号化装置は、単位ブロックに含まれるデータを直交変換し、直交変換後のデータを量子化し、量子化後のデータを符号化することで符号化データを生成する。また、符号化データを復号する復号装置は、符号化データを逆量子化し、逆量子化したデータを逆直交変換し、逆直交変換されたデータから画像を復元する。   For example, one of the video compression standards is H.264. H.264. An encoding device that encodes a moving image divides an input image forming a moving image into unit blocks of every 4 pixels × 4 pixels or into unit blocks of every 8 pixels × 8 pixels. Then, the encoding device performs a series of encoding processes for each unit block. For example, the encoding apparatus orthogonally transforms data included in a unit block, quantizes the data after orthogonal transformation, and encodes the quantized data to generate encoded data. In addition, a decoding device that decodes encoded data performs inverse quantization on the encoded data, performs inverse orthogonal transform on the inversely quantized data, and restores an image from the inverse orthogonal transformed data.

また、H.264では、逆直交変換の結果となるデータが、所定の範囲に収まることが求められる。所定の範囲は「許容範囲」とも称される。復元装置により復元されたデータは、量子化により発生する誤差である量子化誤差が重畳されており、符号化前のデータと同一のデータとはならない。ここで、量子化誤差によって、逆直交変換後のデータが許容範囲を超えることがある。   H. In H.264, the data resulting from the inverse orthogonal transform is required to fall within a predetermined range. The predetermined range is also referred to as “allowable range”. The data restored by the restoration device is superimposed with a quantization error, which is an error caused by quantization, and is not the same data as the data before encoding. Here, the data after the inverse orthogonal transform may exceed the allowable range due to the quantization error.

また、生成した符号化データに対して逆量子化と逆直交変換とを実行する符号化装置がある。逆量子化と逆直交変換とを実行する符号化装置は、逆量子化と逆直交変換とを実行した結果得られたデータが許容範囲に収まるかを判定する。そして、逆量子化と逆直交変換とを実行する符号化装置は、収まらないと判定した場合に、符号化データを復号した際にデータが許容範囲に収まるように符号化処理の方法を変更し、変更後の符号化処理の方法を用いて符号化データを再度生成する。また、量子化を実行する際に用いる量子化係数の絶対値を加算した値と閾値とを比較することで、許容範囲に収まるかを判定する符号化装置もある。   There is also an encoding device that performs inverse quantization and inverse orthogonal transform on the generated encoded data. An encoding apparatus that performs inverse quantization and inverse orthogonal transform determines whether data obtained as a result of performing inverse quantization and inverse orthogonal transform falls within an allowable range. Then, when it is determined that the encoding device that performs inverse quantization and inverse orthogonal transform does not fit, the encoding processing method is changed so that the data falls within the allowable range when the encoded data is decoded. Then, the encoded data is generated again using the encoding method after the change. In addition, there is also an encoding device that determines whether a value is within an allowable range by comparing a threshold value with a value obtained by adding absolute values of quantization coefficients used when performing quantization.

特開2008−199344号公報JP 2008-199344 A

しかしながら、上述した装置では、量子化や直交変換を複数回実行するという問題がある。例えば、逆量子化と逆直交変換とを実行する符号化装置は、逆量子化と逆直交変換とを実行した後のデータが許容範囲に収まらない場合には、符号化処理の方法を変更した上で、直交変換や量子化を再度実行する。また、例えば、量子化係数を用いて判定する符号化装置は、量子化係数の絶対値を加算した値を用いており、量子化の後に判定結果がわかると考えられる。この結果、量子化係数を用いて判定する符号化装置は、許容範囲に収まらない場合には、量子化を再度実行することになると考えられる。   However, the above-described apparatus has a problem of performing quantization and orthogonal transformation a plurality of times. For example, an encoding device that performs inverse quantization and inverse orthogonal transform has changed the method of encoding processing when the data after performing inverse quantization and inverse orthogonal transform does not fall within the allowable range. Above, orthogonal transformation and quantization are performed again. In addition, for example, an encoding apparatus that uses a quantization coefficient for determination uses a value obtained by adding absolute values of quantization coefficients, and it is considered that the determination result is known after quantization. As a result, it is considered that the encoding apparatus that performs determination using the quantization coefficient will perform quantization again when it does not fall within the allowable range.

また、量子化や直交変換を複数回実行する符号化装置は、リアルタイムに処理することが要求されるデータに不適であり、更に有用な装置が求められる。   In addition, an encoding device that performs quantization and orthogonal transformation a plurality of times is not suitable for data that is required to be processed in real time, and a more useful device is required.

開示の技術は、上述に鑑みてなされたものであって、量子化や直交変換を複数回実行することなく符号化を実行可能である符号化装置及び符号化プログラムを提供することを目的とする。   The disclosed technology has been made in view of the above, and an object thereof is to provide an encoding device and an encoding program that can execute encoding without performing quantization and orthogonal transformation a plurality of times. .

開示する符号化装置は、一つの態様において、複数の数値データを含むデータ群の該数値データを2乗した値の和を算出する算出部を備える。符号化装置は、前記算出部により算出された値と、前記データ群に含まれる該数値データの絶対値の最大値とに基づいて、所定の符号化処理が実行された該データ群を復号することで得られる復号後データ群が所定の許容範囲内に収まるか否かを判定する判定部を備える。また、符号化装置は、前記判定部によって収まらないと判定された場合に、前記所定の符号化処理と比較して発生する誤差が小さい符号化処理を選択し、選択した符号化処理を実行する符号化部を備える。   In one embodiment, the disclosed encoding device includes a calculation unit that calculates a sum of values obtained by squaring the numerical data of a data group including a plurality of numerical data. The encoding apparatus decodes the data group on which a predetermined encoding process has been executed, based on the value calculated by the calculation unit and the maximum absolute value of the numerical data included in the data group. A determination unit that determines whether or not the decoded data group obtained by the above is within a predetermined allowable range. In addition, when it is determined that the determination unit does not fit the encoding device, the encoding device selects an encoding process with a small error generated compared to the predetermined encoding process, and executes the selected encoding process An encoding unit is provided.

開示する符号化装置の一つの態様によれば、量子化や直交変換を複数回実行することなく符号化を実行可能であるという効果を奏する。   According to one aspect of the disclosed encoding device, there is an effect that encoding can be performed without performing quantization and orthogonal transformation a plurality of times.

図1は、実施例1に係る符号化装置の構成の一例を示すブロック図である。FIG. 1 is a block diagram illustrating an example of the configuration of the encoding apparatus according to the first embodiment. 図2は、直交変換と量子化とについて示す図である。FIG. 2 is a diagram illustrating orthogonal transform and quantization. 図3は、量子化により発生し得る量子化誤差について示す図である。FIG. 3 is a diagram illustrating quantization errors that may occur due to quantization. 図4は、P(n)を2乗した値の和に関する値について示す図である。FIG. 4 is a diagram showing values related to the sum of values obtained by squaring P (n). 図5は、実施例2に係る符号化装置の構成の一例を示すブロック図である。FIG. 5 is a block diagram illustrating an example of the configuration of the encoding device according to the second embodiment. 図6は、実施例2に係る符号化装置による処理の流れの一例を示すフローチャートである。FIG. 6 is a flowchart illustrating an example of a process flow performed by the encoding apparatus according to the second embodiment. 図7は、実施例2に係る符号化プログラムを実行するコンピュータの一例を示す図である。FIG. 7 is a diagram illustrating an example of a computer that executes an encoding program according to the second embodiment.

以下に、開示する符号化装置及び符号化プログラムの実施例について、図面に基づいて詳細に説明する。なお、本実施例により開示する発明が限定されるものではない。各実施例は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。   Hereinafter, embodiments of the disclosed encoding apparatus and encoding program will be described in detail with reference to the drawings. Note that the invention disclosed by this embodiment is not limited. Each embodiment can be appropriately combined within a range in which processing contents do not contradict each other.

図1を用いて、実施例1に係る符号化装置100の構成の一例を示す。図1は、実施例1に係る符号化装置の構成の一例を示すブロック図である。図1に示す例では、符号化装置100は、算出部101と、判定部102と、符号化部103とを有する。   An example of the configuration of the encoding apparatus 100 according to the first embodiment will be described with reference to FIG. FIG. 1 is a block diagram illustrating an example of the configuration of the encoding apparatus according to the first embodiment. In the example illustrated in FIG. 1, the encoding apparatus 100 includes a calculation unit 101, a determination unit 102, and an encoding unit 103.

算出部101は、複数の数値データを含むデータ群の数値データを2乗した値の和を算出する。判定部102は、算出部101により算出された値と、データ群に含まれる数値データの絶対値の最大値とに基づいて、所定の符号化処理が実行されたデータ群を復号することで得られる復号後データ群が所定の許容範囲内に収まるか否かを判定する。符号化部103は、判定部102によって収まらないと判定された場合に、所定の符号化処理と比較して発生する誤差が小さい符号化処理を選択し、選択した符号化処理を実行する。   The calculation unit 101 calculates the sum of values obtained by squaring numerical data of a data group including a plurality of numerical data. The determination unit 102 is obtained by decoding the data group that has been subjected to the predetermined encoding process, based on the value calculated by the calculation unit 101 and the maximum absolute value of the numerical data included in the data group. It is determined whether or not the decrypted data group is within a predetermined allowable range. When it is determined by the determination unit 102 that the encoding unit 103 does not fit, the encoding unit 103 selects an encoding process with a small error generated compared to a predetermined encoding process, and executes the selected encoding process.

つまり、実施例1に係る符号化装置100は、量子化で原点に変換される点の量子化誤差の最大値が画素値の2乗値の和を算出することで得られることに着目し、復号後のデータが許容範囲に収まるかを符号化処理前に判定する。この結果、量子化や直交変換を複数回実行することなく、一度の符号化処理で符号化を実行可能である。   That is, the encoding apparatus 100 according to the first embodiment pays attention to the fact that the maximum value of the quantization error at the point converted to the origin by the quantization is obtained by calculating the sum of the square values of the pixel values. It is determined before encoding processing whether the decoded data falls within the allowable range. As a result, encoding can be executed by a single encoding process without performing quantization and orthogonal transformation a plurality of times.

実施例2に係る符号化装置200について説明する。以下では、符号化装置200の全体像について説明した後に、直交変換と量子化とについて説明し、許容範囲に収まるかを判定する判定式について説明する。その後、実施例2に係る符号化装置200の構成の一例について説明し、符号化装置200による処理の流れの一例について説明し、符号化装置200の効果について説明する。   A coding apparatus 200 according to the second embodiment will be described. In the following, after describing the overall image of the encoding device 200, orthogonal transformation and quantization will be described, and a determination formula for determining whether or not the allowable range is satisfied will be described. Then, an example of the configuration of the encoding device 200 according to the second embodiment will be described, an example of the flow of processing performed by the encoding device 200 will be described, and the effects of the encoding device 200 will be described.

[符号化装置の全体像]
実施例2に係る符号化装置200の全体像について説明する。符号化装置200は、動画や画像などのデータが入力されると、所定のサイズを有する単位ブロックに分割する。例えば、符号化装置200は、動画が入力されると、動画を形成する各画像を4画素×4画素ごとの単位ブロックに分割し、又は、8画素×8画素ごとの単位ブロックに分割する。そして、符号化装置200は、単位ブロックごとに一連の符号化処理を実行する。すなわち、符号化装置は、単位ブロックに含まれるデータを直交変換し、直交変換後のデータを量子化し、量子化後のデータを符号化することで符号化データを生成する。なお、単位ブロックを「データ群」とも称し、単位ブロックに含まれる各画素の画素値を「数値データ」とも称する。
[Overview of encoding device]
An overall image of the encoding apparatus 200 according to the second embodiment will be described. When data such as a moving image or an image is input, the encoding device 200 divides the data into unit blocks having a predetermined size. For example, when a moving image is input, the encoding apparatus 200 divides each image forming the moving image into unit blocks of 4 pixels × 4 pixels or into unit blocks of 8 pixels × 8 pixels. Then, the encoding apparatus 200 performs a series of encoding processes for each unit block. That is, the encoding device orthogonally transforms data included in a unit block, quantizes the data after orthogonal transformation, and encodes the quantized data to generate encoded data. The unit block is also referred to as “data group”, and the pixel value of each pixel included in the unit block is also referred to as “numerical data”.

例えば、符号化装置200は、動画圧縮規格の1つであるH.264を用いてデータを符号化する。また、例えば、符号化装置200は、直交変換として、離散コサイン変換(DCT、Discrete Cosine Transform)を行う。   For example, the encoding apparatus 200 is an H.264 that is one of the moving image compression standards. H.264 is used to encode the data. For example, the encoding apparatus 200 performs discrete cosine transform (DCT) as orthogonal transform.

符号化装置200によって生成された符号化データは、その後、復号装置によって逆量子化され、逆量子化後のデータが逆直交変換され、逆直交変換後のデータから画像が復元される。なお、復元された画像は、量子化により発生する誤差である量子化誤差が重畳されており、符号化前の画像と完全に同一の画像とはならない。   The encoded data generated by the encoding device 200 is then inversely quantized by the decoding device, the inversely quantized data is subjected to inverse orthogonal transformation, and an image is restored from the data after inverse orthogonal transformation. Note that the restored image is superimposed with a quantization error, which is an error generated by quantization, and is not completely the same as the image before encoding.

ここで、符号化を行う際には、逆直交変換の結果となるデータが許容範囲に収まることが求められる。つまり、符号化データを復号することで得られるデータが許容範囲に収まることが求められる。このことを踏まえ、以下に詳細に説明するように、実施例2に係る符号化装置200は、直交変換を行う前に、生成する符号化データを復号することで得られるデータが許容範囲に収まるかを判定する。そして、符号化装置200は、許容範囲に収まらないと判定した場合には、符号化データを復号した際に許容範囲に収まるように符号処理の方法を変更し、変更後の符号化処理の方法を用いて符号化データを生成する。   Here, when encoding is performed, it is required that the data resulting from the inverse orthogonal transform fall within an allowable range. That is, the data obtained by decoding the encoded data is required to be within an allowable range. Based on this, as will be described in detail below, the encoding apparatus 200 according to the second embodiment allows the data obtained by decoding the encoded data to be generated to fall within an allowable range before performing orthogonal transform. Determine whether. If the encoding apparatus 200 determines that the encoded data does not fall within the allowable range, the encoding apparatus 200 changes the encoding process method so that the encoded data falls within the allowable range when the encoded data is decoded. Is used to generate encoded data.

例えば、符号化装置200は、許容範囲に収まらないと判定した場合には、量子化時の丸め演算を通常の小数点以下四捨五入ではなく、0方向への丸めにする量子化を含む符号化を実行することで、許容範囲超えを回避する。また、例えば、符号化装置200は、直交変換後のデータの内、高周波側のデータの幾つかを強制的に「0」とする量子化を含む符号化を実行することで、許容範囲超えを回避する。つまり、符号化装置200は、量子化により得られる値の絶対値が小さくなるように符号化処理の方法を変更することで、許容範囲に収まるようにする。また、例えば、符号化装置200は、許容範囲に収まらないと判定した場合には、H.264のストレートバイナリでの符号化を実行することで、許容範囲超えを回避する。ストレートバイナリでの符号化とは、符号化、直交変換及び量子化を行わず、画素値をそのまま符号化データとする手法である。   For example, if the encoding apparatus 200 determines that the value does not fall within the allowable range, the encoding apparatus 200 performs encoding including quantization that rounds in the zero direction instead of rounding off the decimal point after the normal decimal point. By doing so, exceeding the allowable range is avoided. In addition, for example, the encoding apparatus 200 performs encoding including quantization that forcibly sets some of high-frequency data among the data after orthogonal transformation to “0”, thereby exceeding the allowable range. To avoid. That is, the encoding apparatus 200 changes the encoding processing method so that the absolute value of the value obtained by the quantization becomes smaller, so that it falls within the allowable range. Further, for example, when the encoding apparatus 200 determines that the value does not fall within the allowable range, By executing H.264 straight binary encoding, exceeding the allowable range is avoided. The straight binary coding is a method in which pixel values are directly used as coded data without performing coding, orthogonal transformation, and quantization.

ただし、本発明はH.264を用いる場合に限定されるものではなく、許容範囲が設定される符号化手法であれば任意の手法を用いて良い。なお、以下では、符号化装置200が、動画を形成する画像そのものを符号化するのではなく、動画において時間軸上で連続する2つの画像間の差分となる差分画像を符号化する場合を用いて説明する。   However, the present invention relates to H.264. However, the present invention is not limited to using H.264, and any method may be used as long as it is an encoding method in which an allowable range is set. In the following description, a case where the encoding apparatus 200 encodes a difference image that is a difference between two images that are continuous on the time axis in the moving image, rather than encoding the image itself that forms the moving image. I will explain.

また、以下では、動画を形成する画像の各画素の精度が「8 bit」である場合を用いて説明する。つまり、各画素が「0」から「256」までの間の値となる場合を例に説明する。ここで、各画素は「0」から「256」の値となり、符号化装置200が受け付ける画像は差分画像である。この結果、符号化装置200が受け付ける入力画像の各画素の示す値は、「−256」から「255」までの間の値となる場合を用いて説明する。   In the following, description will be made using a case where the accuracy of each pixel of an image forming a moving image is “8 bits”. That is, a case where each pixel has a value between “0” and “256” will be described as an example. Here, each pixel has a value from “0” to “256”, and the image received by the encoding apparatus 200 is a difference image. As a result, description will be made using a case where the value indicated by each pixel of the input image received by the encoding apparatus 200 is a value between “−256” and “255”.

また、以下では、許容範囲が「−512」から「511」である場合を用いて説明する。ただし、本発明はこれに限定されるものではなく、許容範囲が「−512」から「511」までの間でなくても良く、任意の範囲であって良い。   In the following description, the allowable range is “−512” to “511”. However, the present invention is not limited to this, and the allowable range may not be between “−512” and “511”, and may be an arbitrary range.

ここで、差分画像を用いる意義について簡単に説明する。動画を形成する画像の内、時間軸上において連続する画像は似ていることが多く、画像間の差はわずかであることが多い。言い換えると、連続する画像間には強い相関関係があることが多い。このような場合に、符号化装置200は、画像間の差分となる差分画像を受け付け、受け付けた差分画像に対して直交変換や量子化を実行する。例えば、符号化装置200は、公知の技術を用いて現在の画像から次の画像を予測し、予測した予測画像と現在の画像との差分をとることで差分画像を生成する。そして、生成した差分画像を符号化する。ただし、本発明はこれに限定されるものではなく、符号化装置は、動画を形成する画像そのものに対して直交変換や量子化を行って符号化データを生成しても良い。以下では、符号化対象となる画像を入力画像と記載する。   Here, the significance of using the difference image will be briefly described. Of the images forming a moving image, continuous images on the time axis are often similar, and the difference between the images is often slight. In other words, there is often a strong correlation between consecutive images. In such a case, the encoding apparatus 200 receives a difference image that is a difference between images, and performs orthogonal transformation or quantization on the received difference image. For example, the encoding apparatus 200 predicts the next image from the current image using a known technique, and generates a difference image by taking the difference between the predicted image and the current image. Then, the generated difference image is encoded. However, the present invention is not limited to this, and the encoding apparatus may generate encoded data by performing orthogonal transformation or quantization on the image itself forming the moving image. Hereinafter, an image to be encoded is referred to as an input image.

[直交変換と量子化とについて]
図2を用いて、直交変換と量子化とについて説明する。図2は、直交変換と量子化とについて示す図である。図2に示す例では、説明の便宜上、単位ブロックの大きさが「2」である場合を用いて説明する。図2のXY座標系は、単位ブロックの各画素を示す座標系である。すなわち、図2のXY座標系での座標(x、y)の成分「x」と「y」は、それぞれ、大きさが「2」である単位ブロックに含まれる2つの画素の画素値を示す。単位ブロックの画素値が「1、2」である場合には、例えば、「(x、y)=(1、2)」となる。ただし、本発明はこれに限定されるものではなく、単位ブロックの大きさは任意の大きさで良く、例えば、4以上であっても良い。例えば、単位ブロックの大きさが4画素×4画素の単位ブロックである場合には、座標軸の数は16(=4×4)となる。座標軸の数を次元数とも記載する。
[About orthogonal transformation and quantization]
The orthogonal transform and quantization will be described with reference to FIG. FIG. 2 is a diagram illustrating orthogonal transform and quantization. In the example shown in FIG. 2, for convenience of explanation, the case where the size of the unit block is “2” will be used. The XY coordinate system in FIG. 2 is a coordinate system indicating each pixel of the unit block. That is, the components “x” and “y” of the coordinates (x, y) in the XY coordinate system of FIG. 2 indicate the pixel values of two pixels included in the unit block whose size is “2”, respectively. . When the pixel value of the unit block is “1, 2”, for example, “(x, y) = (1, 2)”. However, the present invention is not limited to this, and the size of the unit block may be any size, for example, 4 or more. For example, when the unit block size is a unit block of 4 pixels × 4 pixels, the number of coordinate axes is 16 (= 4 × 4). The number of coordinate axes is also described as the number of dimensions.

図2のUV座標系は、XY座標系を直交変換した座標系である。XY座標系の任意の座標がUV座標系において量子化値Qで量子化されると、XY座標系の任意の座標は、u軸に平行な直線及びv軸に平行な直線による形成される格子の点である格子点Pの1つに変換される。原点も格子点Pの1つである。量子化値が「Q」である場合には、隣接する格子点間の距離が「Q」となる。   2 is a coordinate system obtained by orthogonally transforming the XY coordinate system. When an arbitrary coordinate in the XY coordinate system is quantized with a quantization value Q in the UV coordinate system, the arbitrary coordinate in the XY coordinate system is a lattice formed by a straight line parallel to the u axis and a straight line parallel to the v axis. Is converted to one of the grid points P. The origin is also one of the lattice points P. When the quantized value is “Q”, the distance between adjacent lattice points is “Q”.

例えば、符号化装置200がUV座標系において量子化値Qを用いて量子化を行うと、図2の領域R1内に存在するXY座標系の点は、UV座標系の格子点P1に変換される。UV座標系における格子点P1の座標は、(Q、Q)である。このように、符号化装置200は、XY座標系の点を、UV座標系の格子点のいずれかに変換する。この結果、例えば、格子点P1(Q、Q)に変換されるUV座標系の点の座標(u、v)は、数1や数2に示される範囲となる。   For example, when the encoding apparatus 200 performs quantization using the quantized value Q in the UV coordinate system, the points in the XY coordinate system existing in the region R1 in FIG. 2 are converted into lattice points P1 in the UV coordinate system. The The coordinates of the lattice point P1 in the UV coordinate system are (Q, Q). As described above, the encoding apparatus 200 converts a point in the XY coordinate system into one of lattice points in the UV coordinate system. As a result, for example, the coordinates (u, v) of the points in the UV coordinate system that are converted to the lattice points P1 (Q, Q) are in the ranges shown in Equations 1 and 2.

Figure 0005482474
Figure 0005482474

Figure 0005482474
Figure 0005482474

数1や数2において、Qは量子化値を示す。数1や数2に示されるように、格子点P1(Q、Q)に変換されるuの座標は、「Q−1/2Q」より大きな値であり、「Q+1/2Q」より小さな値になる。また、例えば、uの座標が「Q+1/2Q」以上の値であり、「2Q+1/2Q」より小さい値になるようであれば、uの座標は「2Q」に変換される。   In Equations 1 and 2, Q indicates a quantized value. As shown in Equation 1 and Equation 2, the coordinates of u converted to the lattice point P1 (Q, Q) are larger than “Q−1 / 2Q” and smaller than “Q + 1 / 2Q”. Become. For example, if the coordinates of u are values greater than or equal to “Q + 1 / 2Q” and are smaller than “2Q + 1 / 2Q”, the coordinates of u are converted to “2Q”.

ここで、符号化装置200がUV座標系の座標(u、v)を量子化値Qで量子化し、UV座標系の点の座標(iQ、jQ)に変換したとする。u、v、i、j間の関係は、数3や数4のようになる。i、jは、整数である。iは、u/Qの小数点以下を四捨五入した値であり、jは、j/Qの小数点以下を四捨五入した値である。数1や数2は、「i=1」「j=1」である場合に対応する。   Here, it is assumed that the encoding apparatus 200 quantizes the coordinates (u, v) in the UV coordinate system with the quantized value Q and converts them into the coordinates (iQ, jQ) of the points in the UV coordinate system. The relationship among u, v, i, and j is as shown in Equation 3 and Equation 4. i and j are integers. i is a value obtained by rounding off the decimal part of u / Q, and j is a value obtained by rounding off the decimal part of j / Q. Equations 1 and 2 correspond to the case of “i = 1” and “j = 1”.

Figure 0005482474
Figure 0005482474

Figure 0005482474
Figure 0005482474

符号化装置200が直交変換を実行すると、XY座標系の点の座標(x、y)は、UV座標系の座標(u、v)と表現される。符号化装置200が量子化を実行すると、UV座標系の点の座標(u、v)は、UV座標系の座標(iQ、jQ)に変換され、(i、j)と表現される。ここで、量子化値Qとして「1」よりも大きい値を用いることで、iはuよりも小さい値になり、jはvよりも小さい値になる。つまり、UV座標系の座標(u、v)が量子化後に(i、j)として表現されることで、点(u、v)を示す情報量が削減される。なお、量子化後のUV座標系の座標(iQ、jQ)の位置は、逆量子化や逆直交変換を行ったとしても変化しない。   When the encoding apparatus 200 performs orthogonal transformation, the coordinates (x, y) of the points in the XY coordinate system are expressed as the coordinates (u, v) in the UV coordinate system. When the encoding apparatus 200 performs quantization, the coordinates (u, v) of the points in the UV coordinate system are converted into the coordinates (iQ, jQ) in the UV coordinate system and expressed as (i, j). Here, by using a value larger than “1” as the quantized value Q, i becomes a value smaller than u and j becomes a value smaller than v. That is, the coordinates (u, v) of the UV coordinate system are expressed as (i, j) after quantization, thereby reducing the amount of information indicating the point (u, v). Note that the position of the coordinates (iQ, jQ) in the UV coordinate system after quantization does not change even if inverse quantization or inverse orthogonal transformation is performed.

[許容範囲に収まるかを判定する判定式]
以下に説明するように、数5の判定式を満たす場合に、符号化装置200は、直交変換、量子化、逆量子化、逆直交変換後の点のXY座標系におけるすべての成分が許容範囲を超えないと判定する。
[Judgment formula for judging whether it falls within the allowable range]
As will be described below, when the determination formula of Formula 5 is satisfied, the encoding apparatus 200 allows all components in the XY coordinate system of the points after orthogonal transformation, quantization, inverse quantization, and inverse orthogonal transformation to be within an allowable range. Judge that it does not exceed.

Figure 0005482474
Figure 0005482474

数5において、Pmaxは、XY座標系の点の各成分の内、絶対値が最大となる成分を示す。数5の右辺の「511」は、許容範囲の絶対値の最大値を示す。Qは、量子化値を示す。Nは、単位ブロックに含まれる数値データの数を示す。P(n)は、単位ブロックに含まれる各画素の画素値を示す。P(n)の「n」は、単位ブロックに含まれる画素数を示し、例えば、単位ブロックの大きさが4画素×4画素の単位ブロックである場合には、「16(=4×4)」となる。数5の右辺において「511」から減算される値は、以下に詳細に説明するように、量子化により発生し得る量子化誤差の最大値を示す。   In Equation 5, Pmax indicates a component having the maximum absolute value among the components of the points in the XY coordinate system. “511” on the right side of Equation 5 indicates the maximum absolute value of the allowable range. Q represents a quantized value. N indicates the number of numerical data included in the unit block. P (n) indicates the pixel value of each pixel included in the unit block. “N” of P (n) indicates the number of pixels included in the unit block. For example, when the size of the unit block is a unit block of 4 pixels × 4 pixels, “16 (= 4 × 4) " The value subtracted from “511” on the right side of Equation 5 indicates the maximum value of the quantization error that can occur due to quantization, as will be described in detail below.

すなわち、逆直交変換後の点が取り得る最大値は、Pmaxに量子化誤差の最大値を加算した値となる。このことを踏まえ、数5に示されるように、許容範囲の最大値から量子化誤差の最大値を減算した値よりもPmaxが小さくなれば、符号化装置200は、逆直交変換後の点のXY座標系のすべての成分が許容範囲を超えないと判定する。以下では、数5の右辺において「511」から減算される値について、詳細に説明する。   That is, the maximum value that can be taken by the point after inverse orthogonal transformation is a value obtained by adding the maximum value of the quantization error to Pmax. Based on this, as shown in Equation 5, if Pmax is smaller than the value obtained by subtracting the maximum value of the quantization error from the maximum value of the allowable range, the encoding apparatus 200 may determine the point after the inverse orthogonal transform. It is determined that all components in the XY coordinate system do not exceed the allowable range. Hereinafter, the value subtracted from “511” on the right side of Equation 5 will be described in detail.

[数5の(「N」の平方根)×(Q/2)について]
数5の右辺において「511」から減算される値の内、(「N」の平方根)×(Q/2)について説明する。すなわち、データ群に含まれる数値データの数の平方根に量子化にて用いられる量子化値を乗算することで得られる値について説明する。図3は、量子化により発生し得る量子化誤差について示す図である。図3において、301は、単位ブロックの画素各々が取り得る座標の範囲を示す。図3に示す例では、各画素の値の取り得る範囲が「−256」から「255」までである場合を示した。302は、許容範囲を示す。図3に示す例では、許容範囲が「−512」から「511」である場合を例に示した。303は、単位ブロックの画素の内任意の点である。図3に示す例では、点303は、X軸やY軸等のN個の軸を有するN次元直交空間のXY座標系において(x、y …)と表現される場合を用いて説明し、UV座標系において(u、v …)と表現される場合を用いて説明する。図3に示す例では、2個の軸を有する場合を例に説明する。つまり、単位ブロックに含まれる数値データの数が「2」である場合を示した。304は、点303を量子化した後の座標が取り得る範囲を示す。305は、点303を量子化した後の座標が取り得る範囲304の内、許容範囲から外れた部分を示す。
[Equation 5 (Square root of “N”) × (Q / 2)]
Of the values subtracted from “511” on the right side of Expression 5, (square root of “N”) × (Q / 2) will be described. That is, the value obtained by multiplying the square root of the number of numerical data included in the data group by the quantization value used in quantization will be described. FIG. 3 is a diagram illustrating quantization errors that may occur due to quantization. In FIG. 3, reference numeral 301 denotes a range of coordinates that can be taken by each pixel of the unit block. In the example illustrated in FIG. 3, the range in which the value of each pixel can take is “−256” to “255”. 302 indicates an allowable range. In the example illustrated in FIG. 3, the case where the allowable range is “−512” to “511” is illustrated as an example. 303 is an arbitrary point among the pixels of the unit block. In the example illustrated in FIG. 3, the point 303 is described using a case where (x, y...) Is expressed in the XY coordinate system of the N-dimensional orthogonal space having N axes such as the X axis and the Y axis. Description will be made using a case where (u, v...) Is expressed in the UV coordinate system. In the example illustrated in FIG. 3, a case where there are two axes will be described as an example. That is, the case where the number of numerical data included in the unit block is “2” is shown. Reference numeral 304 denotes a range that can be taken by coordinates after the point 303 is quantized. Reference numeral 305 denotes a portion out of the allowable range in the range 304 that the coordinates after the point 303 is quantized can take.

符号化装置200は、直交変換後の点となるUV座標系の点に対して、量子化を行う。そして、符号化装置200は、UV座標系における格子点の1つに変換する。ここで、符号化装置200が量子化値Qで量子化した場合には、UV座標系における量子化誤差の大きさは最大でQ/2となる。すなわち、UV座標系における量子化後の点は、UV座標系における量子化前の点の座標の成分と比較して、最大Q/2の誤差を有する。この結果、図3の304に示すように、点(u、 v、…)を量子化することで得られる量子化後の点の取り得る範囲は、点(u、 v、…)を中心として、UV座標系の座標軸に平行な一辺の長さがQのN次元超立方体の内側となる。   The encoding apparatus 200 performs quantization on a point in the UV coordinate system that is a point after orthogonal transformation. Then, the encoding device 200 converts it into one of lattice points in the UV coordinate system. Here, when the encoding apparatus 200 quantizes with the quantization value Q, the size of the quantization error in the UV coordinate system is Q / 2 at the maximum. That is, the point after quantization in the UV coordinate system has an error of Q / 2 at the maximum compared to the coordinate component of the point before quantization in the UV coordinate system. As a result, as shown by 304 in FIG. 3, the range that can be obtained by the quantized point obtained by quantizing the point (u, v,...) Is centered on the point (u, v,...). The length of one side parallel to the coordinate axis of the UV coordinate system is the inside of the N-dimensional hypercube having a Q length.

次に、N次元のXY座標系における量子化誤差の最大値について検討する。図3に示すように、N次元のXY座標系において、量子化前の点と量子化後の点との間の距離の最大値は、N次元超立方体の対角線の長さの半分になる。この結果、N次元のUV座標系での各成分の量子化誤差が最大Q/2である場合、逆量子化と逆直交変換とを実行した後の点が取り得る誤差であって、N次元のXY座標系での各成分が取り得る誤差の最大値は(「N」の平方根)×(Q/2)となる。言い換えると、直交変換後のN次元のUV座標系における誤差の最大値が「Q/2」であったとしても、逆直交変換後のN次元のXY座標系では、N次元のUV座標系における誤差と比較して最大(「N」の平方根)倍の誤差が生じる可能性がある。   Next, the maximum value of the quantization error in the N-dimensional XY coordinate system will be examined. As shown in FIG. 3, in the N-dimensional XY coordinate system, the maximum value of the distance between the point before quantization and the point after quantization is half the length of the diagonal line of the N-dimensional hypercube. As a result, when the quantization error of each component in the N-dimensional UV coordinate system is a maximum of Q / 2, it is an error that can be taken by a point after performing inverse quantization and inverse orthogonal transformation, The maximum error that each component can take in the XY coordinate system is (square root of “N”) × (Q / 2). In other words, even if the maximum value of the error in the N-dimensional UV coordinate system after orthogonal transformation is “Q / 2”, in the N-dimensional XY coordinate system after inverse orthogonal transformation, in the N-dimensional UV coordinate system, There may be a maximum (square root of “N”) times the error compared to the error.

(「N」の平方根)×(Q/2)をそのまま用いる判定式について説明する。図3の例では、許容範囲は、「−512」から「511」までである。また、逆直交変換後の点のXY座標系の各成分は、最大、(「N」の平方根)×(Q/2)の誤差を有する。このことを踏まえると、逆直交変換後の点すべてが許容範囲を超えない条件は、数6に示すように、直交変換の対象となるXY座標系の点の各成分の内最も絶対値が大きい点に、量子化誤差の最大値を加えた値が、許容範囲に収まれば良いことになる。   A determination formula using (the square root of “N”) × (Q / 2) as it is will be described. In the example of FIG. 3, the allowable range is “−512” to “511”. Each component of the XY coordinate system of the point after inverse orthogonal transformation has an error of (square root of “N”) × (Q / 2) at the maximum. Considering this, the condition that all the points after the inverse orthogonal transformation do not exceed the allowable range is that the absolute value of the components of the points of the XY coordinate system to be subjected to the orthogonal transformation is the largest, as shown in Equation 6. A value obtained by adding the maximum value of the quantization error to the point should be within the allowable range.

Figure 0005482474
Figure 0005482474

数6に示すように、XY座標系の点の各成分の内、絶対値が最大である成分が、数6の右辺の値以下である時、逆直交変換後の点のXY座標系のすべての成分は、許容範囲を超えないことになる。   As shown in Equation 6, when the component having the maximum absolute value among the components of the points in the XY coordinate system is less than or equal to the value on the right side of Equation 6, all of the XY coordinate systems of the points after inverse orthogonal transformation This component will not exceed the allowable range.

また、同様に、逆直交変換後の点のXY座標系のすべての成分が許容範囲を超えない場合において、直交変換前のXY座標系の点の各成分の絶対値の最大値は、数7で示される。   Similarly, when all components of the XY coordinate system of the point after inverse orthogonal transformation do not exceed the allowable range, the maximum absolute value of each component of the point of the XY coordinate system before orthogonal transformation is Indicated by

Figure 0005482474
Figure 0005482474

数7のPthは、逆直交変換後の点のXY座標系のすべての成分が許容範囲を超えない場合において、直交変換前のXY座標系の点の各成分の絶対値の最大値を示す。数7に示すように、閾値Pthは、量子化値Qが大きくなるにつれ小さくなり、単位ブロックに含まれる数値データの数が多くなるにつれ小さくなる。   Pth in Expression 7 indicates the maximum absolute value of each component of the point of the XY coordinate system before orthogonal transformation when all components of the XY coordinate system of the point after inverse orthogonal transformation do not exceed the allowable range. As shown in Equation 7, the threshold value Pth decreases as the quantized value Q increases, and decreases as the number of numerical data included in the unit block increases.

[数5のP(n)を2乗した値の和に関する値ついて]
数5の右辺において「511」から減算される値の内、P(n)を2乗した値の和について説明する。すなわち、データ群の数値データを2乗した値の和について説明する。
[Values related to the sum of squared values of P (n) in Formula 5]
A sum of values obtained by squaring P (n) among values subtracted from “511” on the right side of Expression 5 will be described. That is, a sum of values obtained by squaring numerical data of the data group will be described.

量子化誤差は、必ずしも(「N」の平方根)×(Q/2)となるわけではなく、(「N」の平方根)×(Q/2)をそのまま用いると、制限が不要に強くなる。例えば、Nが「64」であり、Qが「120」であり、入力画像の全画素が一様に「40」である場合を例に説明する。この場合、数6に代入すると、左辺は「40」、右辺は「31」となり、許容範囲を超えるとの判定結果となる。これに対して、実際には、入力画像の画素値が一様であることから、直交変換結果により得られる値は、1つの軸の値は「0」でない値となる一方、他の軸の値はすべて「0」となる。「0」でない値は、DCTの係数の内DC(Direct Current、直流)成分に相当する。この結果、逆直交変換後のN次元のXY座標系での各成分が取り得る量子化誤差の最大値は、値が「0」とはならなかった軸上における距離とはり、(「N」の平方根)×(Q/2)ではなく、(Q/2)になる。この結果、数6における右辺の値は451になり、最大値が「40」であれば、許容範囲に収まることになる。   The quantization error is not necessarily (the square root of “N”) × (Q / 2). If (the square root of “N”) × (Q / 2) is used as it is, the restriction becomes unnecessarily strong. For example, a case where N is “64”, Q is “120”, and all pixels of the input image are uniformly “40” will be described as an example. In this case, when substituting into Equation 6, the left side is “40”, the right side is “31”, and the determination result is that the allowable range is exceeded. On the other hand, since the pixel values of the input image are actually uniform, the value obtained from the orthogonal transformation result is a value of one axis that is not “0”, while the value of the other axis The values are all “0”. A value other than “0” corresponds to a DC (Direct Current) component of the DCT coefficient. As a result, the maximum value of the quantization error that can be taken by each component in the N-dimensional XY coordinate system after inverse orthogonal transformation is the distance on the axis where the value did not become “0” (“N” Not (square root of) × (Q / 2), but (Q / 2). As a result, the value on the right side in Equation 6 is 451, and if the maximum value is “40”, it falls within the allowable range.

このことを踏まえ、符号化装置200は、数5の右辺において「511」から減算される値として、(「N」の平方根)×(Q/2)をそのまま用いるのではなく、データ群の数値データを2乗した値の和を併せて用いる。   Based on this, the encoding apparatus 200 does not directly use (the square root of “N”) × (Q / 2) as a value to be subtracted from “511” on the right side of Equation 5, but instead uses the numerical value of the data group. The sum of squared data is also used.

図4を用いて、P(n)を2乗した値の和に関する値について示す。図4は、P(n)を2乗した値の和に関する値について示す図である。図4の306は、UV座標系の格子点の1つである(0、0)に変換されるUV座標系の座標(u、 v)の範囲を示す。すなわち、図4の306に示すように、符号化装置200は、uの絶対値がQ/2より小さく、vの絶対値がQ/2より小さい場合には、量子化を行うことで、UV座標系の座標(u、 v)をUV座標系の座標(0、0)に変換する。この場合、変換後のUV座標系の座標が(0、0)となることから、UV座標系での各成分の量子化誤差の最大値は、各軸の値(u、 v、 …)そのものになる。   A value related to the sum of values obtained by squaring P (n) will be described with reference to FIG. FIG. 4 is a diagram showing values related to the sum of values obtained by squaring P (n). Reference numeral 306 in FIG. 4 indicates a range of coordinates (u, v) of the UV coordinate system converted to (0, 0), which is one of the lattice points of the UV coordinate system. That is, as shown by 306 in FIG. 4, the encoding apparatus 200 performs UV quantization when the absolute value of u is smaller than Q / 2 and the absolute value of v is smaller than Q / 2. The coordinates (u, v) in the coordinate system are converted into coordinates (0, 0) in the UV coordinate system. In this case, since the coordinates in the UV coordinate system after conversion are (0, 0), the maximum value of the quantization error of each component in the UV coordinate system is the value of each axis (u, v,...) Itself. become.

N次元に拡張して考える。符号化装置200は、量子化することによって、量子化前の点(u、 v、 …)を原点(0、 0、 …)に変換する。ここで、各軸の絶対値は、Q/2未満であるとする。この場合、量子化前の点と量子化後の点との間の距離の最大値は、言い換えると、逆量子化や逆直交変換後の点がN次元のXY座標系において取り得る量子化誤差の最大値は、(「N」の平方根)×(Q/2)ではなく、原点と量子化前の点との距離となる。すなわち、量子化前の点と量子化後の点との間の距離は、(((uの2乗)+(vの2乗)+… )の平方根)となる。   Consider expanding to N dimensions. The encoding apparatus 200 converts the point (u, v,...) Before quantization to the origin (0, 0,...) By performing quantization. Here, the absolute value of each axis is assumed to be less than Q / 2. In this case, the maximum value of the distance between the point before quantization and the point after quantization is, in other words, the quantization error that the point after inverse quantization or inverse orthogonal transformation can take in the N-dimensional XY coordinate system. The maximum value of is not (square root of “N”) × (Q / 2), but the distance between the origin and the point before quantization. That is, the distance between the point before quantization and the point after quantization becomes (((square of u) + (square of v) +...)).

ここで、Parsevalの等式により、XY座標系の座標(x、 y、 …)とUV座標系の座標(u、 v、 …)との間には、数8の関係が成立する。   Here, according to the Parseval equation, the relationship of Formula 8 is established between the coordinates (x, y,...) Of the XY coordinate system and the coordinates (u, v,...) Of the UV coordinate system.

Figure 0005482474
Figure 0005482474

この結果、量子化前の点と量子化後の点との間の距離の最大値は、(((xの2乗)+(yの2乗)+… )の平方根)となる。つまり、量子化誤差の値は、(「N」の平方根)×(Q/2)ではなく、P(n)を2乗した値の和の平方根となる。   As a result, the maximum value of the distance between the point before quantization and the point after quantization becomes (((square of x) + (square of y) +...)). That is, the value of the quantization error is not ((square root of “N”) × (Q / 2)) but is the square root of the sum of squared values of P (n).

[判定式について]
数5に示した判定式では、(「N」の平方根)×(Q/2)と、P(n)を2乗した値の和の平方根との内、小さい値を用いる。つまり、符号化装置200は、(「N」の平方根)×(Q/2)そのものを用いると制限が不当に強くなることがあることを踏まえ、P(n)を2乗した値の和の平方根がより小さい場合には、P(n)を2乗した値の和の平方根を用いる。言い換えると、量子化後の点が原点になるような場合には、P(n)を2乗した値の和の平方根が(「N」の平方根)×(Q/2)より小さくなり、符号化装置200は、P(n)を2乗した値の和の平方根を用いる。一方、P(n)を2乗した値の和の平方根が(「N」の平方根)×(Q/2)より大きくなるようであれば、符号化装置200は、(「N」の平方根)×(Q/2)を用いる。
[About judgment formula]
In the determination formula shown in Equation 5, a smaller value is used among (the square root of “N”) × (Q / 2) and the square root of the sum of squared values of P (n). That is, the encoding apparatus 200 uses the sum of the values obtained by squaring P (n) based on the fact that the limit may become unduly strong if (the square root of “N”) × (Q / 2) itself is used. When the square root is smaller, the square root of the sum of squared values of P (n) is used. In other words, when the point after quantization is the origin, the square root of the sum of squared values of P (n) is smaller than (square root of “N”) × (Q / 2), and the sign The conversion apparatus 200 uses the square root of the sum of squared values of P (n). On the other hand, if the square root of the sum of the squared values of P (n) is larger than (square root of “N”) × (Q / 2), the encoding apparatus 200 (the square root of “N”) X (Q / 2) is used.

例えば、Nが「64」であり、Qが「120」であり、入力画像の全画素が一様に「40」である場合を例に説明する。この場合、上述したように、数6に代入すると、左辺は「40」、右辺は「31」となり、許容範囲を超えるとの判定結果となる。これに対して、数5を用いると、右辺は「191」となり、許容範囲を超えないとの判定結果となる。つまり、適切な判定を行えることがわかる。   For example, a case where N is “64”, Q is “120”, and all pixels of the input image are uniformly “40” will be described as an example. In this case, as described above, when substituting into Equation 6, the left side is “40”, the right side is “31”, and the determination result is that the allowable range is exceeded. On the other hand, when Expression 5 is used, the right side is “191”, which is a determination result that the allowable range is not exceeded. That is, it can be seen that an appropriate determination can be made.

なお、上述した例では、右辺の値が実際には「451」になると記載しており、数5によれば、実際の値「451」よりも小さい値が得られた。これは、数5においては、判定を直交変換前に行っており、直交変換により得られる値の分布が得られるかが不明なことを踏まえ、余裕を見た安全側の値となっている。   In the above-described example, it is described that the value on the right side is actually “451”. According to Equation 5, a value smaller than the actual value “451” is obtained. In Equation 5, the determination is performed before the orthogonal transformation, and the value on the safe side with a margin is taken into consideration that it is unclear whether the distribution of values obtained by the orthogonal transformation can be obtained.

この結果、(「N」の平方根)×(Q/2)を用いると許容範囲を超えると判定される場合であっても、P(n)を2乗した値の和の平方根の値を用いると許容範囲を超えないと判定される場合には、符号化方法を変更することなく符号化を実行可能となる。   As a result, the square root of the sum of the squared values of P (n) is used even when it is determined that the allowable range is exceeded when (square root of “N”) × (Q / 2) is used. If it is determined that the allowable range is not exceeded, encoding can be executed without changing the encoding method.

また、判定式に用いられる値は、すべて、直交変換や量子化、逆量子化、逆直交変換を行うことなく取得することが可能である。このため、符号化装置200は、直交変換前に、許容範囲を超えるか否かを判定可能となる。   In addition, all values used in the determination formula can be acquired without performing orthogonal transformation, quantization, inverse quantization, or inverse orthogonal transformation. For this reason, the encoding apparatus 200 can determine whether or not the allowable range is exceeded before the orthogonal transform.

[符号化装置の構成]
図5を用いて、実施例2に係る符号化装置200の構成の一例を示す。図5は、実施例2に係る符号化装置の構成の一例を示すブロック図である。図5に示す例では、符号化装置200は、算出部201と、判定部202と、符号化部203とを有する。
[Configuration of Encoding Device]
An example of the configuration of the encoding apparatus 200 according to the second embodiment will be described with reference to FIG. FIG. 5 is a block diagram illustrating an example of the configuration of the encoding device according to the second embodiment. In the example illustrated in FIG. 5, the encoding apparatus 200 includes a calculation unit 201, a determination unit 202, and an encoding unit 203.

以下では、説明の便宜上、符号化装置200が差分画像を受け付け、受け付けた差分画像を単位ブロックに分割したものとして説明する。つまり、単位ブロック各々に対して符号化装置200が実行する一連の処理について、以下に詳細に説明する。また、以下では、符号化装置200が許容範囲に収まるかを判定する点について詳細に説明する一方、それ以外の点については従来の技術と同様であることから説明を省略する。   In the following, for convenience of explanation, it is assumed that the encoding apparatus 200 has received a difference image and the received difference image is divided into unit blocks. That is, a series of processes executed by the encoding device 200 for each unit block will be described in detail below. In the following, the point of determining whether or not the encoding device 200 falls within the allowable range will be described in detail, but the other points are the same as those of the conventional technology, and thus the description thereof is omitted.

算出部201と判定部202と符号化部203とは、各種の処理手順などを規定したプログラムを記憶する内部メモリを有し、種々の処理を制御する。算出部201と判定部202と符号化部203とは、例えば、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)、CPU(Central Processing Unit)、MPU(Micro Processing Unit)などの電子回路である。   The calculation unit 201, the determination unit 202, and the encoding unit 203 have an internal memory that stores a program that defines various processing procedures and the like, and controls various processes. The calculation unit 201, the determination unit 202, and the encoding unit 203 include, for example, electronic circuits such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a central processing unit (CPU), and a micro processing unit (MPU). It is.

算出部201は、データ群に含まれる数値データを2乗した値の和を算出する。具体的には、算出部201は、単位ブロックに含まれる画素値各々を2乗した値の和の平方根を算出する。例えば、算出部201は、単位ブロックに含まれる画素値各々について2乗した値を算出し、2乗することで算出した値各々の和を算出し、和をとることで算出した値の平方根を算出する。   The calculation unit 201 calculates the sum of values obtained by squaring numerical data included in the data group. Specifically, the calculation unit 201 calculates the square root of the sum of values obtained by squaring each pixel value included in the unit block. For example, the calculation unit 201 calculates a squared value for each pixel value included in the unit block, calculates the sum of the values calculated by squaring, and calculates the square root of the value calculated by taking the sum. calculate.

また、算出部201は、データ群に含まれる数値データの数の平方根に量子化値を乗算した値を算出する。具体的には、単位ブロックに含まれる画素数の平方根に量子化値を乗算することで得られる値を算出する。例えば、算出部201は、符号化部203による量子化にて用いられる量子化値を記憶する記憶部を有する。そして、算出部201は、単位ブロックに含まれる画素の数をカウントし、カウントすることで得られた値の平方根を算出する。また、算出部201は、カウントすることで得られた値の平方根と、記憶部に記憶された量子化値とを乗算した値を算出する。   The calculation unit 201 calculates a value obtained by multiplying the square root of the number of numerical data included in the data group by the quantization value. Specifically, a value obtained by multiplying the square root of the number of pixels included in the unit block by the quantization value is calculated. For example, the calculation unit 201 includes a storage unit that stores a quantization value used in quantization by the encoding unit 203. Then, the calculation unit 201 counts the number of pixels included in the unit block, and calculates the square root of the value obtained by counting. Further, the calculation unit 201 calculates a value obtained by multiplying the square root of the value obtained by counting and the quantized value stored in the storage unit.

このように、算出部201は、数5の右辺において「511」から減算される値を算出する。言い換えると、算出部201は、量子化誤差の最大値を算出する。   In this way, the calculation unit 201 calculates a value to be subtracted from “511” on the right side of Equation 5. In other words, the calculation unit 201 calculates the maximum value of the quantization error.

判定部202は、算出部201により算出された値と、データ群に含まれる数値データの絶対値の最大値とに基づいて、所定の符号化処理が実行されたデータ群を復号することで得られる復号後データ群が所定の許容範囲内に収まるか否かを判定する。また、判定部202は、算出部201によって算出された値の内他方の値と比較して小さい値を選択して用いる。   The determination unit 202 is obtained by decoding the data group that has been subjected to the predetermined encoding process, based on the value calculated by the calculation unit 201 and the maximum absolute value of the numerical data included in the data group. It is determined whether or not the decrypted data group is within a predetermined allowable range. The determination unit 202 selects and uses a value that is smaller than the other value calculated by the calculation unit 201.

具体的には、判定部202は、データ群に含まれる数値データの絶対値の最大値が、数5の式を満たすか否かを判定する。ここで、判定部202は、満たすと判定した場合には、復号後データ群が所定の許容範囲内に収まると判定し、満たさないと判定した場合には、復号後データ群が所定の許容範囲内に収まらないと判定する。   Specifically, the determination unit 202 determines whether or not the maximum absolute value of the numerical data included in the data group satisfies the formula (5). If the determination unit 202 determines that the decoded data group falls within the predetermined allowable range, the determination unit 202 determines that the decoded data group falls within the predetermined allowable range. It is determined that it does not fit within.

例えば、判定部202は、単位ブロックに含まれる画素各々の内、画素値の絶対値が最も大きい画素値を取得する。例えば、単位ブロックに4つの画素が含まれており、4つの画素各々の画素値が「10」「−40」「30」「20」である場合を用いて説明する。この場合、判定部202は、絶対値が最も大きい「−40」を取得し、「−40」の絶対値となる「40」を取得する。   For example, the determination unit 202 acquires a pixel value having the largest absolute value of pixel values among the pixels included in the unit block. For example, a case where four pixels are included in a unit block and the pixel values of the four pixels are “10”, “−40”, “30”, and “20” will be described. In this case, the determination unit 202 acquires “−40” having the largest absolute value, and acquires “40” that is the absolute value of “−40”.

また、例えば、判定部202は、単位ブロックに含まれる画素値各々を2乗した値の和の平方根と、単位ブロックに含まれる画素数の平方根に量子化値を乗算することで得られる値との内、小さい値を選択する。単位ブロックに含まれる画素値各々を2乗した値の和の平方根が「20」であり、単位ブロックに含まれる画素数の平方根に量子化値を乗算することで得られる値が「30」である場合を用いて説明する。この場合、判定部202は、「20」を選択する。なお、単位ブロックに含まれる画素値各々を2乗した値の和の平方根と、単位ブロックに含まれる画素数の平方根に量子化値を乗算することで得られる値とは、上述したように、算出部201によって算出される。   In addition, for example, the determination unit 202 obtains a square root of the sum of squared values of the pixel values included in the unit block and a value obtained by multiplying the square root of the number of pixels included in the unit block by the quantization value. Select a smaller value. The square root of the sum of squared values of the pixel values included in the unit block is “20”, and the value obtained by multiplying the square root of the number of pixels included in the unit block by the quantized value is “30”. A description will be given using a case. In this case, the determination unit 202 selects “20”. Note that, as described above, the square root of the sum of the squared values of the pixel values included in the unit block and the value obtained by multiplying the square root of the number of pixels included in the unit block by the quantization value are as described above. Calculated by the calculation unit 201.

また、例えば、判定部202は、選択した値と、所定の許容範囲に含まれる値の絶対値の最大値とを数5に代入することで、復号後データ群が所定の許容範囲内に収まるか否かを判定する。例えば、判定部202は、数5の右辺の値が「511−20=491」となり、左辺の値が「40」となる場合には、左辺の値「40」は右辺の値「491」以下であり、許容範囲に収まると判定する。   Further, for example, the determination unit 202 substitutes the selected value and the maximum absolute value of the values included in the predetermined allowable range into Equation 5, so that the decoded data group falls within the predetermined allowable range. It is determined whether or not. For example, when the value on the right side of Equation 5 is “511-20 = 491” and the value on the left side is “40”, the determination unit 202 determines that the value “40” on the left side is equal to or less than the value “491” on the right side. It is determined that it falls within the allowable range.

符号化部203は、判定部202によって収まると判定された場合に、所定の符号化処理を実行する。また、符号化部203は、判定部202によって収まらないと判定された場合に、所定の符号化処理と比較して発生する誤差が小さい符号化処理を選択し、選択した符号化処理を実行する。例えば、符号化部203は、判定部202によって収まらないと判定された場合に、0方向への丸めの演算による量子化を含む符号化処理を行う。また、例えば、符号化部203は、ストレートバイナリで伝送する。   The encoding unit 203 executes a predetermined encoding process when it is determined that the determination unit 202 fits. In addition, when the determination unit 202 determines that the encoding unit 203 does not fit, the encoding unit 203 selects an encoding process with a small error generated compared to a predetermined encoding process, and executes the selected encoding process . For example, the encoding unit 203 performs an encoding process including quantization by a rounding operation in the 0 direction when the determination unit 202 determines that it does not fit. Also, for example, the encoding unit 203 transmits in straight binary.

なお、符号化装置200は、パーソナルコンピュータ、携帯電話、PHS(Personal Handyphone System)端末、移動体通信端末又はPDA(Personal Digital Assistant)などの情報処理装置を利用して実現しても良い。例えば、PDAなどの情報処理装置に、算出部201と、判定部202と、符号化部203との各機能を搭載することによって実現しても良い。   The encoding device 200 may be realized using an information processing device such as a personal computer, a mobile phone, a PHS (Personal Handyphone System) terminal, a mobile communication terminal, or a PDA (Personal Digital Assistant). For example, you may implement | achieve by mounting each function of the calculation part 201, the determination part 202, and the encoding part 203 in information processing apparatuses, such as PDA.

[符号化装置による処理]
次に、図6を用いて、実施例2に係る符号化装置200による処理の流れの一例を示す。図6は、実施例2に係る符号化装置による処理の流れの一例を示すフローチャートである。
[Processing by encoding device]
Next, an example of the flow of processing by the encoding apparatus 200 according to the second embodiment will be described with reference to FIG. FIG. 6 is a flowchart illustrating an example of a process flow performed by the encoding apparatus according to the second embodiment.

図6に示すように、符号化装置200は、差分画像を受け付けると(ステップS101肯定)、差分画像を単位ブロックに分割する(ステップS102)。そして、算出部201は、単位ブロックごとに量子化誤差の最大値を算出する(ステップS103)。具体的には、算出部201は、単位ブロックに含まれる画素値各々を2乗した値の和の平方根を算出し、単位ブロックに含まれる画素数の平方根に量子化値を乗算することで得られる値を算出する。   As illustrated in FIG. 6, when receiving the difference image (Yes in Step S101), the encoding apparatus 200 divides the difference image into unit blocks (Step S102). Then, the calculation unit 201 calculates the maximum value of the quantization error for each unit block (step S103). Specifically, the calculation unit 201 calculates the square root of the sum of the squared values of the pixel values included in the unit block, and multiplies the square root of the number of pixels included in the unit block by the quantized value. Calculate the value obtained.

そして、判定部202は、算出部201により算出された値と、データ群に含まれる数値データの絶対値の最大値とに基づいて、復号後データ群が所定の許容範囲内に収まるか否かを判定する(ステップS104)。具体的には、判定部202は、データ群に含まれる数値データの絶対値の最大値が、数5の式を満たすか否かを判定する。   Then, the determination unit 202 determines whether or not the decoded data group falls within a predetermined allowable range based on the value calculated by the calculation unit 201 and the maximum absolute value of the numerical data included in the data group. Is determined (step S104). Specifically, the determination unit 202 determines whether or not the maximum absolute value of the numerical data included in the data group satisfies the formula (5).

ここで、許容範囲内に収まると判定部202が判定した場合には(ステップS104肯定)、符号化部203は、所定の符号化処理を実行する(ステップS105)。一方、許容範囲内に収まらないと判定部202が判定した場合には(ステップS104否定)、符号化部203は、所定の符号化処理と比較して発生する誤差が小さい符号化処理を選択し(ステップS106)、選択した符号化処理を実行する(ステップS107)。例えば、符号化部203は、0方向への丸めの演算による量子化を含む符号化処理を行う。なお、上記の処理手順は、上記の順番に限定されるものではなく、処理内容を矛盾させない範囲で適宜変更しても良い。   Here, when the determination unit 202 determines that the value falls within the allowable range (Yes at Step S104), the encoding unit 203 executes a predetermined encoding process (Step S105). On the other hand, when the determination unit 202 determines that the result does not fall within the allowable range (No in step S104), the encoding unit 203 selects an encoding process with a small error generated compared to the predetermined encoding process. (Step S106), the selected encoding process is executed (Step S107). For example, the encoding unit 203 performs an encoding process including quantization by a rounding operation in the 0 direction. In addition, said process procedure is not limited to said order, You may change suitably in the range which does not contradict a process content.

[実施例2の効果]
上述したように、実施例2によれば、符号化装置200は、複数の数値データを含むデータ群の数値データを2乗した値の和を算出する。そして、符号化装置200は、算出した値と、データ群に含まれる数値データの絶対値の最大値とに基づいて、所定の符号化処理が実行されたデータ群を復号することで得られる復号後データ群が所定の許容範囲内に収まるか否かを判定する。そして、符号化装置200は、収まらないと判定した場合に、所定の符号化処理と比較して発生する誤差が小さい符号化処理を選択し、選択した符号化処理を実行する。この結果、量子化や直交変換を複数回実行することなく符号化を実行可能である。つまり、符号化装置200は、量子化誤差の最大値が、単位ブロックの数値データを2乗した値の和の平方根になることを用いて、許容範囲内に収まるか否かを符号化処理前に判定し、許容範囲に収まるような符号化処理を行う。この結果、符号化装置200によれば、一度の符号化処理で符号化可能である。
[Effect of Example 2]
As described above, according to the second embodiment, the encoding apparatus 200 calculates the sum of values obtained by squaring numerical data of a data group including a plurality of numerical data. Then, the encoding apparatus 200 decodes the data group that has been subjected to the predetermined encoding process based on the calculated value and the maximum absolute value of the numerical data included in the data group. It is determined whether or not the subsequent data group falls within a predetermined allowable range. If the encoding apparatus 200 determines that it does not fit, the encoding apparatus 200 selects an encoding process with a smaller error that is generated compared to the predetermined encoding process, and executes the selected encoding process. As a result, encoding can be performed without performing quantization or orthogonal transformation multiple times. That is, the encoding apparatus 200 uses the fact that the maximum value of the quantization error is the square root of the sum of values obtained by squaring the numerical data of the unit block to determine whether or not it falls within the allowable range. Thus, the encoding process is performed so as to be within the allowable range. As a result, according to the encoding device 200, encoding can be performed by a single encoding process.

また、実施例2によれば、符号化装置200は、データ群に含まれる数値データの数の平方根に量子化にて用いられる量子化値を乗算した値を更に算出する。そして、符号化装置200は、算出した値の内他方の値と比較して小さい値を選択して用いる。この結果、許容範囲に収まるか否かを適切に判定することが可能である。具体的には、符号化装置200によれば、量子化後の点が原点に変換されない場合であっても、許容範囲に収まるか否かを適切に判定することが可能である。   Further, according to the second embodiment, the encoding apparatus 200 further calculates a value obtained by multiplying the square root of the number of numerical data included in the data group by the quantization value used in the quantization. Then, encoding apparatus 200 selects and uses a smaller value than the other of the calculated values. As a result, it is possible to appropriately determine whether or not the allowable range is satisfied. Specifically, according to the encoding apparatus 200, it is possible to appropriately determine whether or not the point after quantization is within the allowable range even when the point after quantization is not converted to the origin.

さて、これまで本発明の実施例について説明したが、本発明は上述した実施例以外にも、その他の実施例にて実施されても良い。そこで、以下では、その他の実施例を示す。   Although the embodiments of the present invention have been described so far, the present invention may be implemented in other embodiments besides the above-described embodiments. Therefore, other embodiments will be described below.

例えば、上述した実施例では、単位ブロックに含まれる画素値各々を2乗した値の和の平方根と、単位ブロックに含まれる画素数の平方根に量子化値を乗算することで得られる値との内、小さい値を選択する場合を例に示した。ただし、本発明はこれに限定されるものではない。例えば、単位ブロックに含まれる画素値各々を2乗した値の和の平方根のみを用いてもよい。すなわち、小さい値を選択することなく、単位ブロックに含まれる画素値各々を2乗した値の和の平方根を用いても良い。また、符号化装置は、量子化により原点に変換される点かを量子化値と原点の座標とに基づいて判定し、変換されるとの判定結果が得られた場合に、単位ブロックに含まれる画素値各々を2乗した値の和の平方根を用いて判定しても良い。   For example, in the above-described embodiment, the square root of the sum of squared values of the pixel values included in the unit block and the value obtained by multiplying the square root of the number of pixels included in the unit block by the quantized value. The case where a small value is selected is shown as an example. However, the present invention is not limited to this. For example, only the square root of the sum of squared values of the pixel values included in the unit block may be used. That is, the square root of the sum of values obtained by squaring each pixel value included in the unit block may be used without selecting a small value. Also, the encoding device determines whether the point is converted to the origin by quantization based on the quantization value and the coordinates of the origin, and is included in the unit block when the determination result is obtained that conversion is performed. The pixel value may be determined using the square root of the sum of squared values of the pixel values.

[システム構成]
また、本実施例において説明した各処理の内、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。例えば、図1〜図6に含まれる情報について変更しても良い。
[System configuration]
Of the processes described in this embodiment, all or a part of the processes described as being automatically performed can be manually performed, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified. For example, the information included in FIGS. 1 to 6 may be changed.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。例えば、図5の算出部201と判定部202とを符号化装置200の外部装置としてネットワーク経由で接続するようにしても良い。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or a part of the distribution / integration may be functionally or physically distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, the calculation unit 201 and the determination unit 202 in FIG. 5 may be connected as an external device of the encoding device 200 via a network.

[コンピュータ]
また、上述の実施例で説明した各種の処理は、あらかじめ用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータで実行することによって実現することができる。そこで、以下では、図7を用いて、上述の実施例と同様の機能を有する符号化プログラムを実行するコンピュータの一例を示す。なお、図7は、実施例2に係る符号化プログラムを実行するコンピュータの一例を示す図である。
[Computer]
The various processes described in the above-described embodiments can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. Therefore, in the following, an example of a computer that executes an encoding program having the same function as in the above-described embodiment will be described with reference to FIG. FIG. 7 is a diagram illustrating an example of a computer that executes an encoding program according to the second embodiment.

図7に示すように、実施例2におけるコンピュータ3000は、操作部3001、マイク3002、スピーカ3003、ディスプレイ3004を有する。また、コンピュータ3000は、通信部3006、CPU3010、ROM3011、HDD(Hard Disk Drive)3012、RAM3013を有する。また、コンピュータ3000は、各部がバス3009などで接続される。   As illustrated in FIG. 7, the computer 3000 according to the second embodiment includes an operation unit 3001, a microphone 3002, a speaker 3003, and a display 3004. The computer 3000 includes a communication unit 3006, a CPU 3010, a ROM 3011, an HDD (Hard Disk Drive) 3012, and a RAM 3013. In addition, each part of the computer 3000 is connected by a bus 3009 or the like.

ROM3011は、図5にて示した算出部201と、判定部202と、符号化部203と同様の機能を発揮する制御プログラムを記憶する。つまり、図7に示すように、ROM3011は、算出プログラム3011aと、判定プログラム3011bと、符号化プログラム3011cとを記憶する。なお、これらのプログラム3011a〜3011cについては、図5に示した符号化装置200の各構成要素と同様、適宜統合又は分離しても良い。   The ROM 3011 stores a control program that exhibits the same functions as the calculation unit 201, the determination unit 202, and the encoding unit 203 illustrated in FIG. That is, as shown in FIG. 7, the ROM 3011 stores a calculation program 3011a, a determination program 3011b, and an encoding program 3011c. Note that these programs 3011a to 3011c may be appropriately integrated or separated in the same manner as each component of the encoding apparatus 200 shown in FIG.

そして、CPU3010が、これらのプログラム3011a〜3011cをROM3011から読み出して実行する。この結果、図7に示すように、各プログラム3011a〜3011cは、算出プロセス3010aと、判定プロセス3010bと、符号化プロセス3010cとして機能する。なお、各プロセス3010a〜3010cは、図5に示した、算出部201と、判定部202と、符号化部203とにそれぞれ対応する。   Then, the CPU 3010 reads out these programs 3011a to 3011c from the ROM 3011 and executes them. As a result, as shown in FIG. 7, the programs 3011a to 3011c function as a calculation process 3010a, a determination process 3010b, and an encoding process 3010c. Each process 3010a to 3010c corresponds to the calculation unit 201, the determination unit 202, and the encoding unit 203 illustrated in FIG.

そして、CPU3010は、RAM3013に格納された差分画像データ3013aと、単位ブロックデータ3013bと、量子化誤差データ3013cと、許容範囲データ3013dとを用いて、符号化プログラムを実行する。   The CPU 3010 executes the encoding program using the difference image data 3013a, the unit block data 3013b, the quantization error data 3013c, and the allowable range data 3013d stored in the RAM 3013.

なお、上述した説明では、プロセス3010a〜3010cすべてが常にCPU3010上にて仮想的に実現される場合について示した。ただし、本発明はこれに限定されるものではない。例えば、プロセス3010a〜3010cの内処理に必要な一部のプロセスについて、CPU3010上にて仮想的に実現されても良い。言い換えると、常にすべてのプロセスがCPU3010上にて動作するのではなく、処理に必要なプロセスが選択的に動作するようにしても良い。   In the above description, all processes 3010a to 3010c are always virtually realized on the CPU 3010. However, the present invention is not limited to this. For example, some processes necessary for the internal processing of the processes 3010a to 3010c may be virtually realized on the CPU 3010. In other words, not all processes always operate on the CPU 3010, but processes necessary for processing may selectively operate.

[その他]
なお、本実施例で説明した符号化プログラムは、インターネットなどのネットワークを介して配布することができる。また、符号化プログラムは、ハードディスク、フレキシブルディスク(FD)、CD−ROM、MO、DVDなどのコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行することもできる。
[Others]
The encoding program described in this embodiment can be distributed via a network such as the Internet. The encoding program can also be executed by being recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a CD-ROM, an MO, and a DVD, and being read from the recording medium by the computer.

100 符号化装置
101 算出部
102 判定部
103 符号化部
200 符号化装置
201 算出部
202 判定部
203 符号化部
DESCRIPTION OF SYMBOLS 100 Encoding apparatus 101 Calculation part 102 Determination part 103 Encoding part 200 Encoding apparatus 201 Calculation part 202 Determination part 203 Encoding part

Claims (5)

複数の数値データを含むデータ群の該数値データを2乗した値の和を算出する算出部と、
前記算出部により算出された値と、前記データ群に含まれる該数値データの絶対値の最大値とを加算した値が、所定の許容範囲の絶対値の最大値よりも大きい場合に、所定の符号化処理が実行された該データ群を復号することで得られる復号後データ群が前記許容範囲内に収まらないと判定する判定部と、
前記判定部によって収まらないと判定された場合に、前記所定の符号化処理と比較して処理後に得られる復号後データ群のデータ量が小さくなる符号化処理を選択し、選択した符号化処理を実行する符号化部と
を備えることを特徴とする符号化装置。
A calculation unit that calculates a sum of values obtained by squaring the numerical data of a data group including a plurality of numerical data;
When a value obtained by adding the value calculated by the calculation unit and the maximum absolute value of the numerical data included in the data group is larger than the maximum absolute value of a predetermined allowable range , a determining unit and decoded obtained by decoding the data group to which encoding processing is executed data group not fit within the allowable range,
Wherein when it is determined that not fit by the determination unit, the data amount of decoded data group obtained after treatment as compared to the predetermined encoding process selects the smaller Kunar encoding process, the selected coding An encoding device comprising: an encoding unit that executes
前記符号化処理は、量子化を含み、
前記算出部は、前記データ群に含まれる数値データの数の平方根に前記量子化にて用いられる量子化値を乗算した値を更に算出し、
前記判定部は、前記算出部によって算出された値の内他方の値と比較して小さい値を選択して用いることを特徴とする請求項1に記載の符号化装置。
The encoding process includes quantization,
The calculation unit further calculates a value obtained by multiplying the square root of the number of numerical data included in the data group by a quantization value used in the quantization,
The encoding apparatus according to claim 1, wherein the determination unit selects and uses a smaller value than the other value calculated by the calculation unit.
前記符号化部は、前記判定部によって収まらないと判定された場合に、0方向への丸めの演算による量子化を含む符号化処理を行うことを特徴とする請求項1又は2に記載の符号化装置。   3. The code according to claim 1, wherein the encoding unit performs an encoding process including quantization by a rounding operation in a zero direction when it is determined that the determination unit does not fit. Device. 前記符号化部は、前記判定部によって収まらないと判定された場合に、ストレートバイナリで伝送することを含む符号化処理を行うことを特徴とする請求項1又は2に記載の符号化装置。   The encoding apparatus according to claim 1, wherein the encoding unit performs an encoding process including transmission in straight binary when it is determined that the determination unit does not fit. 複数の数値データを含むデータ群の該数値データを2乗した値の和を算出する算出手順と、
前記算出手順により算出された値と、前記データ群に含まれる該数値データの絶対値の最大値とを可算した値が、所定の許容範囲の絶対値の最大値よりも大きい場合に、所定の符号化処理が実行された該データ群を復号することで得られる復号後データ群が前記許容範囲内に収まらないと判定する判定手順と、
前記判定手順によって収まらないと判定された場合に、前記所定の符号化処理と比較して処理後に得られる復号後データ群のデータ量が小さくなる符号化処理を選択し、選択した符号化処理を実行する符号化手順と
をコンピュータに実行させることを特徴とする符号化プログラム。
A calculation procedure for calculating a sum of values obtained by squaring the numerical data of a data group including a plurality of numerical data;
When a value obtained by adding the value calculated by the calculation procedure and the maximum absolute value of the numerical data included in the data group is larger than the maximum absolute value of a predetermined allowable range , a determination procedure as decoded data group obtained by decoding the data group to which encoding processing is performed is not fit within the allowable range,
Wherein when it is determined that not fit the determining step, the data amount of decoded data group obtained after treatment as compared to the predetermined encoding process selects the smaller Kunar encoding process, the selected coding An encoding program for causing a computer to execute an encoding procedure for executing.
JP2010132335A 2010-06-09 2010-06-09 Encoding device and encoding program Expired - Fee Related JP5482474B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010132335A JP5482474B2 (en) 2010-06-09 2010-06-09 Encoding device and encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010132335A JP5482474B2 (en) 2010-06-09 2010-06-09 Encoding device and encoding program

Publications (2)

Publication Number Publication Date
JP2011259240A JP2011259240A (en) 2011-12-22
JP5482474B2 true JP5482474B2 (en) 2014-05-07

Family

ID=45474921

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010132335A Expired - Fee Related JP5482474B2 (en) 2010-06-09 2010-06-09 Encoding device and encoding program

Country Status (1)

Country Link
JP (1) JP5482474B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6621934B1 (en) * 1996-12-17 2003-09-16 Thomson Licensing S.A. Memory efficient compression apparatus in an image processing system
GB0323038D0 (en) * 2003-10-02 2003-11-05 Koninkl Philips Electronics Nv Method and apparatus for improved inverse transform calculation
JP2007166039A (en) * 2005-12-09 2007-06-28 Matsushita Electric Ind Co Ltd Image coding equipment
US8300698B2 (en) * 2006-10-23 2012-10-30 Qualcomm Incorporated Signalling of maximum dynamic range of inverse discrete cosine transform

Also Published As

Publication number Publication date
JP2011259240A (en) 2011-12-22

Similar Documents

Publication Publication Date Title
JP5860067B2 (en) Encoding method and apparatus, and decoding method and apparatus
JP4555257B2 (en) Image encoding device
JP5218784B2 (en) Image quality evaluation system, apparatus, method and program used therefor
JP2018142979A (en) Method for decoding dynamic image for converting dynamic range reduced by inverse transformation shift memory
JP5843631B2 (en) Frame rate control method, frame rate control device, and frame rate control program
JPWO2012160626A1 (en) Image compression apparatus, image restoration apparatus, and program
JP5482474B2 (en) Encoding device and encoding program
JP6145965B2 (en) Image encoding apparatus, image decoding apparatus, and program
US9161047B2 (en) Image encoding apparatus and method, image decoding apparatus, and non-transitory computer readable medium
Kuroki et al. Adaptive arithmetic coding for image prediction errors
CN107172425B (en) Thumbnail generation method and device and terminal equipment
JP2010062626A (en) Screen data transmitter, screen data transmitting method and screen data transmission program
JP4034317B2 (en) Image encoding device
JP2013187692A (en) Image processing device and image processing method
US9020289B2 (en) Image processing apparatus and image processing method for compressing image data by combining spatial frequency conversion, quantization, and entropy coding
JP5206612B2 (en) Encoding device, encoding method, and encoding program
JP4730144B2 (en) Decoding device, inverse quantization method, and program thereof
CN116233426B (en) Attribute quantization and inverse quantization methods, devices and equipment
US8983219B2 (en) Image processing apparatus and control method therefor
JP2006005478A (en) Image encoder and image decoder
JP2007300454A (en) Decoding device, inverse quantization method, and program
KR101517019B1 (en) Adaptive predictive image compression method using block characteristic and system thereof
CN108668134B (en) Encoding and decoding method and device and electronic equipment
JP5546329B2 (en) Data converter
US10628165B2 (en) Gain control for multiple description coding

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130403

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131029

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131105

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131205

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131225

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140203

R150 Certificate of patent or registration of utility model

Ref document number: 5482474

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees