JP7259280B2 - Encoding device, encoding method and encoding program - Google Patents

Encoding device, encoding method and encoding program Download PDF

Info

Publication number
JP7259280B2
JP7259280B2 JP2018216287A JP2018216287A JP7259280B2 JP 7259280 B2 JP7259280 B2 JP 7259280B2 JP 2018216287 A JP2018216287 A JP 2018216287A JP 2018216287 A JP2018216287 A JP 2018216287A JP 7259280 B2 JP7259280 B2 JP 7259280B2
Authority
JP
Japan
Prior art keywords
frequency transform
unit
encoding
processing
transform coefficients
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018216287A
Other languages
Japanese (ja)
Other versions
JP2020088467A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2018216287A priority Critical patent/JP7259280B2/en
Publication of JP2020088467A publication Critical patent/JP2020088467A/en
Application granted granted Critical
Publication of JP7259280B2 publication Critical patent/JP7259280B2/en
Active 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, an encoding method and an encoding program.



近年、デジタルカメラやMFP(Multi-Function Peripheral)などにおいて様々な画像処理が行われる様になっている。これらの画像処理は、CPUや半導体メモリなどにより構成されるハードウェアを利用したソフトウェア処理によって実現される機能である。画像処理における処理対象のデータはデータサイズが大きくなりがちの画像データであり、また、処理内容も複雑かつ大量なものになる。 2. Description of the Related Art In recent years, digital cameras, MFPs (Multi-Function Peripherals), and the like have come to perform various types of image processing. These image processes are functions realized by software processing using hardware such as a CPU and a semiconductor memory. Data to be processed in image processing is image data that tends to have a large data size, and the processing content is also complicated and large in volume.

したがって、画像処理を実行中に半導体メモリへのアクセス処理が大量に発生するので、このアクセス量を低減させることが画像処理の効率化へとつながる。そこで、アクセス量の低減を図るためにメモリへのアクセス処理に用いられるデータのサイズをなるべく小さくする方法として、画像データを圧縮しデータ量を減少させる方法が知られている。その一例として、離散コサイン変換(DCT:Discrete Cosine Transform)を利用して、離散信号である画像データを周波数領域に変換し、固定長のbitに符号化するデータ処理技術が知られている。 Therefore, since a large amount of access processing to the semiconductor memory occurs during execution of image processing, reducing the amount of access leads to improvement in efficiency of image processing. Therefore, as a method for minimizing the size of data used for memory access processing in order to reduce the amount of access, a method of compressing image data to reduce the amount of data is known. As one example, a known data processing technique uses discrete cosine transform (DCT) to transform image data, which is a discrete signal, into the frequency domain and encodes the data into fixed-length bits.

例えばデジタルカメラにおける画像処理を想定する。この場合、光学系を介して取得した被写体像に基づくRGB画像データをYUV画像データに変換して動画圧縮処理を行ない、動画像データを記録するための画像処理を必要とする。その中でも例えば、幾何変換を利用した歪曲補正処理を実行する場合などは、メモリアクセスが大量に発生するので、画像データを固定長bit列に符号化すれば、メモリアクセス処理毎のデータ量を低減につながる。 For example, assume image processing in a digital camera. In this case, RGB image data based on the subject image obtained through the optical system is converted into YUV image data, and moving image compression processing is performed, and image processing for recording the moving image data is required. Among them, for example, when executing distortion correction processing using geometric transformation, a large amount of memory access occurs. leads to

画像データの固定長符号化を行うにあたり、周波数変換処理により出力されるDCT係数から画像中のエッジの縦、横、斜めを認識し、DCT係数のリミッタを切り替えてリミッタ処理を実行して固定長符号にする技術が開示されている(例えば、特許文献1)。 When performing fixed-length coding of image data, the vertical, horizontal, and diagonal orientations of edges in the image are recognized from the DCT coefficients output by frequency transform processing, and limiter processing is performed by switching the DCT coefficient limiters to perform fixed-length encoding. A coding technique has been disclosed (for example, Patent Document 1).

RGB画像データから変換されたYUV画像データを固定長符号にする場合、当該固定長符号には、輝度成分(Y成分)と2つの色差成分(U成分、V成分)のそれぞれ対応するbit列が含まれる。したがって固定長符号のうち、元の画像に含まれているエッジが弱い部分(YUV成分のスカラー量が低量又は中量の部分)に係る輝度(Y)のDCT成分のbit長をある長さにしなければ、復号化後の画像のエッジ部分がなまった状態になる。 When converting YUV image data from RGB image data into fixed-length code, the fixed-length code includes bit strings corresponding to a luminance component (Y component) and two color difference components (U component and V component). included. Therefore, among the fixed-length codes, the bit length of the DCT component of the luminance (Y) associated with the portion of the original image with weak edges (the portion where the scalar amount of the YUV component is low or medium) is set to a certain length. Otherwise, the edges of the decoded image will be dull.

一方、復号化の画像データに係る画質の劣化を抑制するために、低中スカラー量に係る部分の輝度のDCT成分のbit長をある程度すると、U成分とV成分のDCT成分の(bit数)のbit長を短くしなければならない。U成分とV成分のDCT成分のbit長を短くする(データ量を少なくする)と、復号化後の画像において色の再現性が低下することになる。 On the other hand, in order to suppress the deterioration of the image quality related to the decoded image data, if the bit length of the DCT component of the brightness of the part related to the low and medium scalar amount is set to a certain extent, the (number of bits) of the DCT components of the U component and the V component must be shortened. Reducing the bit length of the DCT components of the U component and the V component (reducing the amount of data) will reduce the color reproducibility of the decoded image.

また、特許文献1に開示されている技術では、DCT係数から、エッジを縦、横、斜めの大きく三種類に分けて認識している。この技術では、各エッジの特徴を十分に把握することは困難である。また、特許文献1に開示されている技術は、DCT係数を制限する制限値(リミッタ)が、DCT係数のスカラー量に関わらず一律に設定されているので、DCT係数に対するリミッタ処理が一律に行われる。この技術では、復号化後の画像に含まれるエッジの再現性に課題がある。 Further, in the technique disclosed in Japanese Patent Laid-Open No. 2002-100000, edges are recognized by roughly classifying them into three types: vertical, horizontal, and oblique, based on the DCT coefficients. With this technique, it is difficult to fully grasp the features of each edge. Further, in the technique disclosed in Patent Document 1, the limiting value (limiter) for limiting the DCT coefficient is uniformly set regardless of the scalar amount of the DCT coefficient, so limiter processing is uniformly performed on the DCT coefficient. will be This technique has a problem in the reproducibility of edges included in the decoded image.

すなわち、特許文献1に代表される従来技術を用いても、画像処理を行うときのメモリアクセス量を低下させるために高い圧縮率を実現しつつ、画質への影響を抑制することには課題がある。 That is, even if the conventional technology represented by Patent Document 1 is used, there is still a problem in suppressing the impact on image quality while achieving a high compression rate in order to reduce the amount of memory access during image processing. be.

本発明は、画像処理時のメモリアクセス量を低下させるために固定長符号を用いても、元画像に対するエッジの再現性を高めることができる符号化装置を提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide an encoding apparatus capable of enhancing reproducibility of edges in an original image even when fixed-length codes are used in order to reduce the amount of memory access during image processing.

上記技術的課題を解決するため、本発明の一態様は、複数の画素を含む画像を所定の数の画素数で分割した画像ブロックを固定長符号にする符号化装置であって、前記画像ブロックを生成する画像分割手段と、前記画像ブロックに対して周波数変換処理を行い、当該画像ブロックに対応する周波数変換係数を出力する周波数変換手段と、前記画像ブロックに含まれる各画素に対応する前記周波数変換係数の絶対値が所定条件に適合する周波数変換係数を条件適合周波数変換係数として特定する条件適合周波数変換係数特定手段と、前記条件適合周波数変換係数に基づいて、前記画素に対応する前記周波数変換係数の値を個別に制限するための制限値を含む制限値群を選択する制限値選択手段と、選択された制限値群に含まれる各制限値を用いて、前記周波数変換手段により出力された周波数変換係数の値を制限する制限処理を実行する制限処理手段と、前記制限処理が実行された後の周波数変換係数を固定長符号として符号化する符号化手段と、を有し、前記制限処理手段は、前記周波数変換係数に含まれる前記条件適合周波数変換係数に対する制限処理においては、選択された前記制限値群に含まれている制限値よりも小さい値を用いて前記条件適合周波数変換係数の値を制限する、ことを特徴とする。 In order to solve the above technical problem, one aspect of the present invention is an encoding device that converts an image block obtained by dividing an image including a plurality of pixels into a predetermined number of pixels into a fixed-length code, the encoding device comprising: frequency transforming means for performing frequency transform processing on the image block and outputting frequency transform coefficients corresponding to the image block; and the frequency corresponding to each pixel included in the image block. condition-satisfactory frequency transform coefficient specifying means for specifying a frequency transform coefficient whose absolute value satisfies a predetermined condition as a condition-satisfactory frequency transform coefficient; and said frequency transform corresponding to said pixel based on said condition-satisfactory frequency transform coefficient. limit value selection means for selecting a limit value group including limit values for individually limiting coefficient values; limiting processing means for executing limiting processing for limiting values of frequency transform coefficients; and encoding means for encoding the frequency transform coefficients after the limiting processing has been executed as fixed-length codes, wherein the limiting processing means, in limiting processing for the condition-satisfactory frequency transform coefficients included in the frequency transform coefficients, limit the condition-satisfactory frequency transform coefficients by using a value smaller than a limit value included in the selected limit value group; It is characterized by limiting the value.

本発明によれば、画像処理時のメモリアクセス量を低下させるために固定長符号を用いても、元画像に対するエッジの再現性を高めることができる符号化装置を提供することを目的とする。画像処理時のメモリアクセス量を低下させるために固定長符号化を行っても、元画像への再現性を確保できる。 SUMMARY OF THE INVENTION It is an object of the present invention to provide an encoding apparatus capable of improving reproducibility of edges in an original image even when fixed-length codes are used in order to reduce the amount of memory access during image processing. Even if fixed-length coding is performed in order to reduce the amount of memory access during image processing, reproducibility of the original image can be ensured.

本発明に係る符号化装置及び復号化装置を適用可能な画像形成システムの実施形態を示す構成図。1 is a configuration diagram showing an embodiment of an image forming system to which an encoding device and a decoding device according to the present invention can be applied; FIG. 上記画像形成システムの機能ブロック図。FIG. 2 is a functional block diagram of the image forming system; 本実施形態の処理対象となる画像データ(a)と固定長符号(b)の例を示す図。4A and 4B are diagrams showing examples of image data (a) and fixed-length codes (b) to be processed in the present embodiment; 本発明に係る符号化装置の機能ブロックを示す図。The figure which shows the functional block of the encoding apparatus which concerns on this invention. 本実施形態に係るDCT係数のイメージを示す図。FIG. 4 is a diagram showing an image of DCT coefficients according to the present embodiment; 本実施形態に係るDCT係数であって、特定の係数を区別したイメージを示す図。FIG. 4 is a diagram showing an image of DCT coefficients according to the present embodiment, in which specific coefficients are distinguished; 本実施形態に係る符号化装置が用いる制限値群のイメージを示す図。FIG. 4 is a diagram showing an image of a limit value group used by the encoding device according to the embodiment; 本実施形態に係る符号化装置が用いる制限値のデータ構造の例を示す図。FIG. 4 is a diagram showing an example of the data structure of limit values used by the encoding device according to the embodiment; 本実施形態に係る符号化装置において生成される固定長符号のフォーマットの例を示す図。FIG. 4 is a diagram showing an example of a fixed-length code format generated by the encoding device according to the present embodiment; 本実施形態に係る符号化装置における固定長符号の生成のイメージを示す図。FIG. 4 is a diagram showing an image of fixed-length code generation in the encoding device according to the present embodiment; 本発明に係る復号化装置の機能ブロックを示す図。The figure which shows the functional block of the decoding apparatus which concerns on this invention. 本実施形態に係る復号化において固定長符号フォーマットからDCT係数に変換されるイメージを示す図。FIG. 4 is a diagram showing an image of conversion from a fixed-length code format to DCT coefficients in decoding according to the present embodiment; 本実施形態に係る符号化装置が備える画像処理ブロックの機能構成図。FIG. 2 is a functional configuration diagram of an image processing block included in the encoding device according to the embodiment; 本実施形態に係る符号化装置が備える可変長動画圧縮ブロックの機能構成図。FIG. 2 is a functional configuration diagram of a variable-length video compression block included in the encoding device according to the embodiment; 本発明に係る符号化方法及び復号化方法を含む画像処理方法の実施形態を示すフローチャート。1 is a flow chart showing an embodiment of an image processing method including an encoding method and a decoding method according to the present invention; 本発明に係る符号化方法の実施形態を示すフローチャート。4 is a flow chart illustrating an embodiment of an encoding method according to the present invention; 本発明に係る符号化方法の詳細な実施形態を示すフローチャート。4 is a flowchart illustrating a detailed embodiment of an encoding method according to the invention; 本発明に係る符号化方法の詳細な実施形態を示すフローチャート。4 is a flowchart illustrating a detailed embodiment of an encoding method according to the invention; 本発明に係る符号化方法に含まれるリミッタ処理のイメージを示す図。FIG. 4 is a diagram showing an image of limiter processing included in the encoding method according to the present invention; 本発明に係る復号化方法の実施形態を示すフローチャート。4 is a flow chart illustrating an embodiment of a decoding method according to the present invention;

[本発明の要旨]
まず、本発明の要旨について概説する。本発明に係る符号化装置は、離散コサイン変換(DCT:Discrete Cosine Transform)を利用した周波数変換処理を適用して、画像データを固定長データに符号化する処理を行う装置である。また、本発明に係る復号化装置は当該符号化装置に対応し、固定長データを画像データに復号化させる装置である。以下、離散コサイン変換を「DCT」と表記する。また、DCTを用いた周波数変換処理により得られる係数を「DCT係数」と表記する。
[Summary of the present invention]
First, the gist of the present invention will be outlined. An encoding apparatus according to the present invention is an apparatus that applies frequency transform processing using a discrete cosine transform (DCT) to encode image data into fixed-length data. A decoding device according to the present invention corresponds to the encoding device and is a device for decoding fixed-length data into image data. The discrete cosine transform is hereinafter referred to as "DCT". Coefficients obtained by frequency transform processing using DCT are referred to as "DCT coefficients".

本発明に係る装置では、画像データを144bitの固定長bit列に符号化する。これを用いて画像処理を行うことでメモリアクセス処理に係るデータ量を減らすことで、メモリアクセスコストを低下させる。また、画像処理を行うASIC(Applicatin Specific Integrated Circuit)に適用することで、ASICの消費電流を低下させることもでき、ASICの冷却機構の簡素化や、画像処理装置の製造コストを下げることもできる。 The apparatus according to the present invention encodes image data into a fixed-length bit string of 144 bits. By performing image processing using this, the amount of data related to memory access processing is reduced, thereby reducing the memory access cost. In addition, by applying it to an ASIC (Application Specific Integrated Circuit) that performs image processing, it is possible to reduce the current consumption of the ASIC, simplify the cooling mechanism of the ASIC, and reduce the manufacturing cost of the image processing device. .

本発明に係る符号化装置及び復号化装置において実行される符号化方法及び復号化方法は、画像を所定の画素サイズからなる画像ブロックに分割した上で、画像ブロックごとに固定長bit列(固定長符号)への符号化を行う。本発明では、固定長符号に含まれる高スカラー(スカラー量が大きい)の画像ブロックのY(輝度)のDCT係数を復号化後の画質が補償できる範囲で、可能な限り短いbit長に抑えるようにする。 The encoding method and decoding method executed by the encoding device and decoding device according to the present invention divide an image into image blocks each having a predetermined pixel size, and then divide each image block into fixed-length bit strings (fixed long code). In the present invention, the Y (brightness) DCT coefficient of the high scalar (large scalar amount) image block included in the fixed-length code is suppressed to the shortest possible bit length within the range in which the image quality after decoding can be compensated. to

本発明に係る符号化方法及び復号化方法と同様に、DCTを利用した周波数変換処理を用いる従来技術では、例えば、画像データを8画素×8画素単位に分割した画像ブロックにDCTを利用した周波数変換処理を実行してDCT係数を得る。このDCT係数に対して特徴判定を行い、DCT係数の量子化後の固定長符号を行う前に、bit列の長さを整えるための「リミッタ処理のTYPE」を特定して、DCT係数を量子化する。量子化の後、リミッタ処理のTYPEに基づいてリミッタ処理を実行するなどの固定長符号化処理を実行する。このような従来技術では、DCT係数において縦/横/斜め方向に特徴を抽出し、DCT係数を制限するためのリミッタ処理に用いる制限値(リミッタ値)を変えながらリミッタ処理を実行する。 Similar to the encoding method and decoding method according to the present invention, in the prior art using frequency transform processing using DCT, for example, image data is divided into 8-pixel by 8-pixel units, and the frequency using DCT is divided into image blocks. A transform process is performed to obtain the DCT coefficients. Characteristic determination is performed on the DCT coefficients, and before performing fixed-length coding after quantization of the DCT coefficients, a "limiter processing TYPE" for adjusting the length of the bit string is specified, and the DCT coefficients are quantized. become After quantization, fixed-length encoding processing such as limiter processing is executed based on the TYPE of limiter processing. In such a conventional technique, features are extracted in the vertical/horizontal/diagonal directions of the DCT coefficients, and limiter processing is performed while varying limit values used in the limiter processing for limiting the DCT coefficients.

しかし、従来技術では、リミッタ処理において、DCT係数のスカラー量には注目していないので、DCT係数が有するスカラー量の差異(起伏)がリミッタ処理によって平坦化してしまう。その結果、そのリミッタ処理が行われた画像ブロックが有する特徴が無くなってしまい、特に高周波数を有する画像のエッジが劣化する。 However, in the prior art, since the scalar amount of the DCT coefficients is not considered in the limiter process, the difference (undulation) in the scalar amount of the DCT coefficients is flattened by the limiter process. As a result, the feature of the image block subjected to the limiter processing is lost, and especially the edge of the image having high frequencies is degraded.

この点、本発明に係る符号化装置によれば、YUV画像データに対して、DCTを利用した周波数変換処理を行ってDCT係数を算出し、これを固定長符号にしてデータアクセス処理に係るメモリアクセス量を低減させることができる。また、本発明に係る復号化装置によれば、上記符号化装置によって生成された固定長符号を復号化することで画質の劣化を抑えることができる。すなわち、本発明に係る符号化装置及び復号化装置を用いることで、メモリアクセスが大量に発生する処理(例えば、画像データに対する歪曲補正処理などの幾何変換処理)を実行するときのメモリアクセス量を少なくしつつ、復号化後の画像の再現性も確保できる。以下、これらの特徴と実現し得る実施形態について説明する。 In this respect, according to the encoding apparatus of the present invention, YUV image data is subjected to frequency transform processing using DCT to calculate DCT coefficients, which are converted into fixed-length codes and stored in memory for data access processing. Access volume can be reduced. Further, according to the decoding device according to the present invention, deterioration of image quality can be suppressed by decoding the fixed-length code generated by the encoding device. That is, by using the encoding device and the decoding device according to the present invention, the amount of memory access when executing processing that requires a large amount of memory access (for example, geometric transformation processing such as distortion correction processing for image data) can be reduced. It is possible to secure the reproducibility of the image after decoding while reducing it. These features and possible embodiments are described below.

[本発明に係る符号化装置/復号化装置を備える装置の実施形態]
本発明に係る符号化装置及び復号化装置は、例えば、画像を撮影して処理する画像処理システムに適用可能なものである。以下、本発明に係る符号化装置及び復号化装置の実施形態を説明するための画像処理システムの構成例を図1に示す。以下の説明において、本実施形態に係る画像処理システムは、被写体像を撮像して記録する機能を備えるデジタルカメラ1とする。
[Embodiment of device provided with encoding device/decoding device according to the present invention]
INDUSTRIAL APPLICABILITY The encoding device and decoding device according to the present invention are applicable, for example, to an image processing system that captures and processes images. FIG. 1 shows a configuration example of an image processing system for describing embodiments of an encoding device and a decoding device according to the present invention. In the following description, the image processing system according to this embodiment is assumed to be a digital camera 1 having a function of capturing and recording a subject image.

本実施形態に係るデジタルカメラ1は、光学系20、撮像素子30、A/Dコンバータ40、画像処理を行うプロセッサ10、メモリコントローラ50、固定長用メモリ60、動画像メモリ70、を備える。 The digital camera 1 according to this embodiment includes an optical system 20, an image sensor 30, an A/D converter 40, a processor 10 that performs image processing, a memory controller 50, a fixed length memory 60, and a moving image memory .

光学系20は、光学レンズなどを備え、被写体像を撮像素子30の撮影面に結像させる。光学系20が備える光学レンズは、例えば広角レンズである。この光学レンズを二枚備えることで、180度の範囲の被写体の反射光を集光するように構成することもできる。 The optical system 20 includes an optical lens and the like, and forms a subject image on the imaging surface of the imaging device 30 . The optical lens included in the optical system 20 is, for example, a wide-angle lens. By providing two optical lenses, it is possible to converge the reflected light of the subject within a range of 180 degrees.

撮像素子30は、光学系20により集光された光を電気信号に変換して、当該画像信号を所定の時間間隔で適宜出力する光電変換素子である。撮像素子30は、例えば、CCDセンサやCMOSセンサなどの固体撮影素子を用いることができる。 The imaging element 30 is a photoelectric conversion element that converts the light condensed by the optical system 20 into an electrical signal and appropriately outputs the image signal at predetermined time intervals. The imaging device 30 can use, for example, a solid-state imaging device such as a CCD sensor or a CMOS sensor.

A/Dコンバータ40は、撮像素子30から出力されてくる画像信号をデジタルデータ(画像データ)に変換してプロセッサ10に適宜出力する。この画像データが後段のプロセッサ10による画像処理の対象となる。 The A/D converter 40 converts the image signal output from the imaging element 30 into digital data (image data) and outputs the digital data to the processor 10 as appropriate. This image data is subjected to image processing by the processor 10 in the subsequent stage.

いわゆるコンピュータを構成するプロセッサ10は、例えば、ASIC(Applicatin Specific Integrated Circuit)であって、歪曲補正処理などの幾何変換処理を含む画像処理を実行する。また、プロセッサ10は、画像処理を行うにあたり、画像データの固定長符号に変換する符号化処理、固定長符号を画像データに復号化する復号化処理を実行する。 A processor 10 constituting a so-called computer is, for example, an ASIC (Application Specific Integrated Circuit), and executes image processing including geometric transformation processing such as distortion correction processing. Further, in performing image processing, the processor 10 executes encoding processing for converting image data into fixed-length codes and decoding processing for decoding fixed-length codes into image data.

メモリコントローラ50は、プロセッサ10の処理により生成された固定長符号を一旦、固定長用メモリ60に格納するときのデータ格納動作、固定長用メモリ60に格納されている固定長符号の読出しの動作を制御する。 The memory controller 50 performs a data storage operation when temporarily storing the fixed-length code generated by the processing of the processor 10 in the fixed-length memory 60, and an operation of reading the fixed-length code stored in the fixed-length memory 60. to control.

固定長用メモリ60は、プロセッサ10において実行される画像処理に用いられる固定長符号を、メモリコントローラ50の制御によって格納/読み出しを行う不揮発性メモリである。固定長用メモリ60には、例えば、DDR-SDRAM(Double-DataーRate Synchronous Dynamic Random Access Memory)を用いることができる。 The fixed-length memory 60 is a non-volatile memory that stores/reads fixed-length codes used in image processing executed by the processor 10 under the control of the memory controller 50 . For the fixed-length memory 60, for example, a DDR-SDRAM (Double-Data-Rate Synchronous Dynamic Random Access Memory) can be used.

動画像メモリ70は、プロセッサ10によって画像処理が行われて生成される動画像を記憶する不揮発性メモリである。動画像メモリ70には、例えば、フラッシュメモリを用いることができる。 The moving image memory 70 is a non-volatile memory that stores moving images generated by image processing performed by the processor 10 . A flash memory, for example, can be used for the moving image memory 70 .

[プロセッサ10の機能ブロック]
次に、プロセッサ10の機能ブロックについて詳細に説明する。図2に示すように、プロセッサ10によって構成される画像処理ブロック100は、画像処理部110と、固定長符号化部120と、歪曲補正部130と、固定長復号化部140と、可変長動画圧縮部150と、を有する。
[Functional Blocks of Processor 10]
Next, the functional blocks of processor 10 will be described in detail. As shown in FIG. 2, the image processing block 100 configured by the processor 10 includes an image processing unit 110, a fixed length encoding unit 120, a distortion correction unit 130, a fixed length decoding unit 140, and a variable length moving image. and a compression unit 150 .

画像処理部110は、光学系20、撮像素子30及びA/Dコンバータ40によって構成されるデータ入力部200から出力されてくる画像データをRGB画像データにする画像処理を実行する。画像処理部110は、RGB画像データを生成して固定長符号化部120に出力する。なお、画像処理部110の詳細については、後述する。 The image processing unit 110 performs image processing to convert image data output from a data input unit 200 composed of the optical system 20, the imaging device 30, and the A/D converter 40 into RGB image data. The image processing unit 110 generates RGB image data and outputs it to the fixed length encoding unit 120 . Details of the image processing unit 110 will be described later.

固定長符号化部120は、画像処理部110において生成されたRGB画像データに対する固定長符号化処理を実行する。したがって、固定長符号化部120によってRGB画像データが固定長符号に変換される。また、固定長符号化部120は、歪曲補正部130により生成された補正画像データ(補正後のRGB画像データ)に対して固定長符号化処理を実行する。固定長符号化部120は、補正後のRGB画像データから変換された固定長符号を一時記憶部300に転送する。このとき、歪曲補正部130から指定されたアドレスに補正後の固定長符号を書き込むように指示する。固定長符号化部120の詳細については後述する。固定長符号化部120は、本発明に係る符号化装置の実施形態である。 The fixed-length encoding unit 120 performs fixed-length encoding processing on the RGB image data generated by the image processing unit 110 . Therefore, the fixed-length encoding unit 120 converts the RGB image data into fixed-length codes. The fixed-length encoding unit 120 also performs fixed-length encoding processing on the corrected image data (RGB image data after correction) generated by the distortion correction unit 130 . The fixed-length encoding unit 120 transfers the fixed-length code converted from the corrected RGB image data to the temporary storage unit 300 . At this time, the distortion correction unit 130 instructs to write the corrected fixed-length code to the specified address. Details of the fixed-length encoding unit 120 will be described later. Fixed-length coding section 120 is an embodiment of the coding device according to the present invention.

歪曲補正部130は、一時記憶部300に格納された補正前の固定長符号から固定長復号化部140により復号化された画像データを読み込んで、歪曲補正処理を実行する。歪曲補正部130は、歪曲補正処理によって生成された補正画像データを、固定長符号化部120に転送する。 The distortion correction unit 130 reads the image data decoded by the fixed length decoding unit 140 from the pre-correction fixed length code stored in the temporary storage unit 300, and executes distortion correction processing. The distortion correction section 130 transfers the corrected image data generated by the distortion correction processing to the fixed length encoding section 120 .

固定長復号化部140は、歪曲補正部130から指定された固定長符号を一時記憶部300から読み出して復号化して、歪曲補正部130に転送する。また、固定長復号化部140は、補正後の固定長符号を順次読み込んで復号化し、可変長動画圧縮部150に転送する。固定長復号化部140の詳細については後述する。固定長復号化部140は、符号化装置を構成する。 Fixed-length decoding section 140 reads the fixed-length code specified by distortion correction section 130 from temporary storage section 300 , decodes it, and transfers it to distortion correction section 130 . Also, the fixed-length decoding unit 140 sequentially reads and decodes the fixed-length codes after correction, and transfers them to the variable-length video compression unit 150 . Details of the fixed-length decoding unit 140 will be described later. Fixed-length decoding section 140 constitutes an encoding device.

可変長動画圧縮部150は、固定長復号化部140から転送されてきた補正後のRGB画像データに対し、例えば、MPEG(Moving Picture Experts Group)方式の動画圧縮処理を実行する。可変長動画圧縮部150は、動画圧縮処理により生成された動画像データを、動画像メモリ70によって構成される画像データ格納部400に転送する。可変長動画圧縮部150の詳細については、後述する。 The variable length video compression unit 150 performs, for example, MPEG (Moving Picture Experts Group) video compression processing on the corrected RGB image data transferred from the fixed length decoding unit 140 . The variable-length moving image compression unit 150 transfers the moving image data generated by the moving image compression process to the image data storage unit 400 configured by the moving image memory 70 . Details of the variable-length video compression unit 150 will be described later.

[元画像データと固定長符の例]
ここで、本実施形態に係る画像処理ブロック100における処理対象となる画像データと当該画像データに係る固定長符号の関係について、図3の模式図を用いて説明する。図3(a)は、画像処理対象となる元画像データ601を模式的に示している。元画像601データは、複数の画素により構成されている。図3(b)は、元画像データ601を所定のサイズの画素数からなる画像ブロックに分割した画像ブロックを模式的に示している。この画像ブロック毎に固定長符号化の処理が実行されることになる。
[Example of original image data and fixed length]
Here, the relationship between the image data to be processed in the image processing block 100 according to the present embodiment and the fixed-length code related to the image data will be described with reference to the schematic diagram of FIG. FIG. 3A schematically shows original image data 601 to be subjected to image processing. The original image 601 data is composed of a plurality of pixels. FIG. 3B schematically shows image blocks obtained by dividing the original image data 601 into image blocks each having a predetermined number of pixels. Fixed-length coding processing is executed for each image block.

デジタルカメラ1で撮影された被写体に係る元画像データ601を、4画素×4画素の画像ブロックに分割して、図3(b)に例示するような画像ブロックを固定長符号の処理単位とする。したがって、本実施形態に係る固定長符号は、元画像データ601の4画素×4画素で構成される画像ブロックごとに生成される値に基づくものとなる。 Original image data 601 of an object photographed by the digital camera 1 is divided into image blocks of 4×4 pixels, and the image blocks shown in FIG. . Therefore, the fixed-length code according to this embodiment is based on a value generated for each image block composed of 4×4 pixels of the original image data 601 .

[符号化装置の実施形態]
次に、本発明に係る符号化装置の実施形態に相当する固定長符号化部120の機能ブロックについてより詳細に説明する。図4に示すように、本実施形態に係る固定長符号化部120は、ブロック化部121と、YUV変換部122と、DCT変換部123と、3MAX位置番号生成部124と、量子化部125と、量子化テーブル126と、リミッタ部127と、リミッタテーブル128と、符号化フォーマット生成部129と、を有する。
[Embodiment of encoding device]
Next, the functional blocks of the fixed-length coding unit 120, which corresponds to an embodiment of the coding device according to the present invention, will be described in more detail. As shown in FIG. 4, the fixed-length encoding unit 120 according to this embodiment includes a blocking unit 121, a YUV transform unit 122, a DCT transform unit 123, a 3MAX position number generation unit 124, and a quantization unit 125. , a quantization table 126 , a limiter section 127 , a limiter table 128 , and an encoding format generation section 129 .

ブロック化部121は、画像処理部110から受け取るRGB画像データを、4画素×4画素からなる画像ブロックに分割する。画像ブロックのイメージは、図3を用いて説明したとおりである。ブロック化部121は、画像分割手段に相当し、画像分割部を構成する。 The blocking unit 121 divides the RGB image data received from the image processing unit 110 into image blocks of 4×4 pixels. The image of the image block is as described with reference to FIG. The blocking unit 121 corresponds to image dividing means and constitutes an image dividing unit.

YUV変換部122は、ブロック化部121から渡される画像ブロック(4画素×4画素からなる画像ブロック)のそれぞれに対して、YUV変換処理を実行する。したがって、YUV変換部122において、4画素×4画素からなるYUV画像ブロックが形成される。このYUV画像ブロックが、YUV変換部122からDCT変換部123に渡される。 The YUV conversion unit 122 performs YUV conversion processing on each of the image blocks (image blocks consisting of 4 pixels×4 pixels) passed from the blocking unit 121 . Therefore, the YUV conversion unit 122 forms a YUV image block consisting of 4 pixels×4 pixels. This YUV image block is passed from the YUV conversion unit 122 to the DCT conversion unit 123 .

DCT変換部123は、YUV画像ブロックに対し、DCTを利用した周波数変換処理を実行して、当該YUV画像ブロックに係るDCT係数を生成する。DCT変換部123は、生成したDCT係数を3MAX位置番号生成部124と、量子化部125に渡す。DCT変換部123は、周波数変換手段に相当し、周波数変換部を構成する。 The DCT transform unit 123 performs frequency transform processing using DCT on the YUV image block to generate DCT coefficients for the YUV image block. The DCT transformation unit 123 passes the generated DCT coefficients to the 3MAX position number generation unit 124 and the quantization unit 125 . The DCT transforming section 123 corresponds to frequency transforming means and constitutes a frequency transforming section.

ここで、DCT変換部123において生成されるDCT係数の例を模式的に示す。なおDCT係数は、水平及び垂直の2次元のコサインカーブの周波数で構成される値である。各画素の空間周波数にDCT係数で示される周波数がどの程度含まれているかによって値が異なる。図5は、本実施形態に係るあるYUV画像ブロックをDCT係数の値によって区別した例である。これをDCT係数ブロック1000とする。DCT係数ブロック1000は、4画素×4画素の各画素の領域を、輝度のDCT係数の値によって区別して表現したものである。 Here, examples of DCT coefficients generated in the DCT transform section 123 are shown schematically. Note that the DCT coefficient is a value composed of frequencies of two-dimensional horizontal and vertical cosine curves. The value differs depending on how much of the frequency indicated by the DCT coefficient is included in the spatial frequency of each pixel. FIG. 5 is an example in which certain YUV image blocks according to this embodiment are distinguished by DCT coefficient values. Let this be a DCT coefficient block 1000 . The DCT coefficient block 1000 expresses each pixel region of 4×4 pixels by distinguishing them by the values of luminance DCT coefficients.

本実施形態では、DCT係数の値の大きさに応じて、4つのレベルで区別している。これらを、第一レベルDCT係数1001、第二レベルDCT係数1002、第三レベルDCT係数1003、第四レベルDCT係数1004とする。 In this embodiment, four levels are used according to the value of the DCT coefficient. These are referred to as a first level DCT coefficient 1001, a second level DCT coefficient 1002, a third level DCT coefficient 1003, and a fourth level DCT coefficient 1004.

直流成分(DC)に相当する領域のDCT係数を、第一レベルDCT係数1001とする。図5の例では、第一画素に相当する領域のDCT係数が第一レベルDCT係数1001になっている。 A first level DCT coefficient 1001 is a DCT coefficient in a region corresponding to a direct current component (DC). In the example of FIG. 5, the DCT coefficients of the area corresponding to the first pixel are the first level DCT coefficients 1001 .

画素に含まれる交流成分(AC)が低い領域のDCT係数を、第二レベルDCT係数1002とする。図5の例では、第二画素と第五画素に相当する領域のDCT係数が第二レベルDCT係数1002になっている。 A second-level DCT coefficient 1002 is a DCT coefficient in a region containing a pixel with a low alternating current component (AC). In the example of FIG. 5, the DCT coefficients of the regions corresponding to the second and fifth pixels are second level DCT coefficients 1002 .

画素に含まれる交流成分(AC)が中程度の領域のDCT係数を、第三レベルDCT係数1003とする。図5の例では、第三画素、第四画素、第六~第十画素、第十三画素と第十四画素が、第三レベルDCT係数1003になっている。 A third-level DCT coefficient 1003 is a DCT coefficient in a region in which the alternating current component (AC) contained in a pixel is moderate. In the example of FIG. 5, the third, fourth, sixth to tenth, thirteenth and fourteenth pixels are the third level DCT coefficients 1003 .

画素に含まれる交流成分が高周波の領域のDCT係数を、第四レベルDCT係数1004とする。図5の例では、第十一画素、第十二画素、第十五画素、第十六画素が、第四レベルDCT係数1004になっている。なお、第四レベルDCT係数1004は、固定長符号に含めない。 A DCT coefficient in a high-frequency region of AC components contained in a pixel is assumed to be a fourth level DCT coefficient 1004 . In the example of FIG. 5, the 11th, 12th, 15th and 16th pixels are the fourth level DCT coefficients 1004 . Note that the fourth level DCT coefficient 1004 is not included in the fixed length code.

上記のように、画素ごとに区別されたDCT係数を含むDCT係数ブロック1000は、画像ブロックを構成する各画素に対応するレベルのDCT係数のパターン(配置のパターン)によって、異なる複数のパターンを有するものとなる。このような特定のDCT係数の配置パターンをもった画像ブロックが、DCT変換部123から3MAX位置番号生成部124と量子化部125に渡される。 As described above, the DCT coefficient block 1000 containing DCT coefficients distinguished for each pixel has a plurality of different patterns depending on the pattern (arrangement pattern) of the DCT coefficients at the level corresponding to each pixel constituting the image block. become a thing. An image block having such a specific arrangement pattern of DCT coefficients is passed from the DCT transformation section 123 to the 3MAX position number generation section 124 and the quantization section 125 .

図4に戻る。3MAX位置番号生成部124は、DCT変換部123から受け取ったDCT係数ブロック1000のうち、第三レベルDCT係数1003の絶対値を大きいものから順に並べたとき、上位3位までに相当する三個の第三レベルDCT係数1003を区別する。この「上位3位まで」が所定条件に相当する。また、3MAX位置番号生成部124は、DCT係数の絶対値が所定の上限以上かつ所定の下限未満ではない第三レベルDCT係数1003以外は、処理対象にしない。すなわち、3MAX位置番号生成部124は、所定条件において、処理対象を除外し、第三レベルDCT係数1003に該当しない絶対値のものは、これを除外して処理を行う。この区別された第三レベルDCT係数1003を、第五レベルDCT係数1005とする。この第五レベルDCT係数1005を含むDCT係数ブロック1000を、3MAXDCT係数ブロック1100とする。 Return to FIG. The 3MAX position number generator 124 selects three DCT coefficient blocks 1000 received from the DCT transform unit 123, which correspond to the top three absolute values of the third level DCT coefficients 1003 when arranged in descending order. The third level DCT coefficients 1003 are distinguished. This "up to the top three" corresponds to the predetermined condition. The 3MAX position number generator 124 does not process any DCT coefficients other than the third level DCT coefficients 1003 whose absolute values are not less than the predetermined upper limit and less than the predetermined lower limit. That is, the 3MAX position number generation unit 124 excludes processing targets under a predetermined condition, and performs processing while excluding absolute values that do not correspond to the third level DCT coefficients 1003 . The differentiated third level DCT coefficients 1003 are referred to as fifth level DCT coefficients 1005 . A DCT coefficient block 1000 including this fifth level DCT coefficient 1005 is called a 3MAX DCT coefficient block 1100 .

たとえば、図5に示したDCT係数ブロック1000に含まれる第三レベルDCT係数1003の上位三個が、第三画素と第四画素及び第七画素に対応する領域のDCT係数だった場合、図6のような3MAXDCT係数ブロック1100を得られる。なお、3MAXDCT係数ブロック1100は、84パターンに分類される。 For example, if the top three of the third level DCT coefficients 1003 included in the DCT coefficient block 1000 shown in FIG. 5 are DCT coefficients in regions corresponding to the third, fourth and seventh pixels, We obtain a 3MAX DCT coefficient block 1100 such as Note that the 3MAX DCT coefficient block 1100 is classified into 84 patterns.

図7は、3MAXDCT係数ブロック1100の全パターンを例示している。なお、図7は、3MAXDCT係数ブロック1100の区別ごとのリミッタ値の例示でもある。リミッタ値については、後述する。 FIG. 7 illustrates the full pattern of 3MAX DCT coefficient block 1100 . Note that FIG. 7 is also an example of limiter values for each classification of the 3MAX DCT coefficient block 1100 . Limiter values will be described later.

3MAXDCT係数ブロック1100は、第三レベルDCT係数1003のうち第五レベルDCT係数1005となるものの配置パターンによって、3MAX位置番号が「1」から「84」のいずれかに相当するものである。3MAX位置番号生成部124は、3MAXDCT係数ブロック1100に含まれている第五レベルDCT係数1005の配置パターンが、図7に含まれる84パターンの中のいずれに該当するかを特定する。そして、この特定されるものが「3MAX位置番号」としてリミッタ部127と符号化フォーマット生成部129に転送される。3MAX位置番号生成部124は、条件適合周波数変換係数特定手段に相当し、条件適合周波数変換係数特定部を構成する。 The 3MAX DCT coefficient block 1100 corresponds to a 3MAX position number of "1" to "84" depending on the arrangement pattern of the fifth level DCT coefficients 1005 among the third level DCT coefficients 1003. FIG. The 3MAX position number generator 124 identifies which of the 84 patterns included in FIG. 7 the arrangement pattern of the fifth level DCT coefficients 1005 included in the 3MAX DCT coefficient block 1100 corresponds to. Then, the specified number is transferred to the limiter section 127 and the encoding format generation section 129 as the "3MAX position number". The 3MAX position number generation unit 124 corresponds to condition-suitable frequency transform coefficient specifying means and constitutes a condition-suitable frequency transform coefficient specifying unit.

図4に戻る。量子化部125は、DCT変換部123からDCT係数を受け取り、量子化テーブル126から量子化値を読み出して、4×4のDCT係数の量子化をする。量子化部125は、量子化したDCT係数をリミッタ部127に転送する。 Return to FIG. The quantization unit 125 receives the DCT coefficients from the DCT transform unit 123, reads the quantization values from the quantization table 126, and quantizes the 4×4 DCT coefficients. Quantization section 125 transfers the quantized DCT coefficients to limiter section 127 .

量子化テーブル126は、量子化値を記憶している。量子化テーブル126に記憶されている量子化値は、量子化部125によって読み出される。 The quantization table 126 stores quantization values. The quantization values stored in the quantization table 126 are read by the quantization section 125 .

リミッタ部127は、3MAX位置番号生成部124から受け取った3MAX位置番号に基づいて、リミッタテーブル128を参照し、3MAX位置番号に対応したリミッタ値を読み出す。ここで読み出されるリミッタ値は、四画素×四画素に対応して生成された四×四の係数群に対応する制限値群である。また、リミッタ部127は、量子化部125から受け取った量子化後のDCT係数に対し、リミッタ値を用いたリミッタ処理を行う。リミッタ部127は、リミッタ処理を行った量子化後のDCT係数を符号化フォーマット生成部129に転送する。リミッタ部127は、制限値群を選択する制限値選択手段に相当し、制限値選択部を構成する。また、リミッタ部127は、制限処理手段に相当し、制限処理部を構成する。 Based on the 3MAX position number received from the 3MAX position number generator 124, the limiter unit 127 refers to the limiter table 128 and reads out the limiter value corresponding to the 3MAX position number. The limiter values read here are a limit value group corresponding to a 4×4 coefficient group generated corresponding to 4 pixels×4 pixels. Also, the limiter section 127 performs limiter processing using a limiter value on the quantized DCT coefficients received from the quantization section 125 . The limiter unit 127 transfers the quantized DCT coefficients subjected to limiter processing to the encoding format generation unit 129 . The limiter unit 127 corresponds to limit value selection means for selecting a limit value group, and constitutes a limit value selection unit. Further, the limiter section 127 corresponds to restriction processing means and constitutes a restriction processing section.

リミッタテーブル128は、3MAX位置番号と、これに紐付けられているリミッタ値を記憶している。リミッタテーブル128に記憶されているリミッタテーブルデータ2000の例を図7及ぶ図8に例示する。リミッタ値テーブルは、3MAX位置番号をインデックスとして、これに対応するリミッタ値を記憶している。リミッタ値は4×4の3MAXDCT係数ブロック1100に対応しているものである。なお、リミッタ値は、上述した、区別されたDCT係数(第一から第五)のそれぞれに対応する値として区別されてリミッタテーブル128に格納されている。 The limiter table 128 stores 3MAX position numbers and limiter values linked thereto. Examples of limiter table data 2000 stored in the limiter table 128 are illustrated in FIGS. 7 and 8. FIG. The limiter value table uses the 3MAX position number as an index and stores the corresponding limiter value. The limiter values correspond to a 4×4 3MAX DCT coefficient block 1100 . The limiter values are stored in the limiter table 128 as discriminated values corresponding to the above-described discriminated DCT coefficients (first to fifth).

ここで、リミッタテーブルデータ2000に含まれるリミッタ値について、図7を参照しながら説明する。なお、図7において、3MAXDCT係数ブロック1100に含まれる各係数には符号は付していないが、図6に例示した各ブロックのパターン(横線、格子、斜線、塗りつぶし)に同様のパターンを用いて表記している。したがって、図7において横線パターンの係数は、第一レベルDCT係数1001に相当する。斜線パターンの係数は、第二レベルDCT係数1002に相当する。格子パターンの係数は、第三レベルDCT係数1003に相当する。塗りつぶしの係数は、第五レベルDCT係数1005に相当する。 Here, limiter values included in limiter table data 2000 will be described with reference to FIG. In FIG. 7, the coefficients included in the 3MAXDCT coefficient block 1100 are not labeled, but the same patterns (horizontal lines, grids, oblique lines, solid lines) shown in FIG. It is written. Therefore, the horizontal line pattern coefficients in FIG. 7 correspond to the first level DCT coefficients 1001 . The hatched pattern coefficients correspond to the second level DCT coefficients 1002 . The grid pattern coefficients correspond to the third level DCT coefficients 1003 . The filled coefficients correspond to the fifth level DCT coefficients 1005 .

リミッタ値は、3MAXDCT係数ブロック1100に含まれる各DCT係数に基づいて、以下のように個別に設定される。第一レベルDCT係数1001は、直流成分(DC)であるから、最もリミッタレベルを高くし、bit長を短くしないように設定されている。第二レベルDCT係数1002は、交流成分(AC)で一番低い波形であるから、二番目にリミッタレベルを高くし、bit長をあまり短くしないように設定されている。第三レベルDCT係数1003は、交流成分が中くらいの波形であるから、DCT係数のスカラー量が大きくない。そこで、第三レベルDCT係数1003は、最もリミッタレベルを高くし、bit長を短くするように設定されている。第五レベルDCT係数1005は、交流成分(AC)が中くらいの波形であって、DCT係数のスカラー量は大きくない。そこで、第五レベルDCT係数1005は、中度のリミッタレベルとし、bit長を少し短くするように設定されている。なお、第四レベルDCT係数1004は、高周波であるかた固定長符号には含めない。したがって、リミッタ値は設定されていない。 The limiter values are individually set based on each DCT coefficient contained in the 3MAX DCT coefficient block 1100 as follows. Since the first level DCT coefficient 1001 is a direct current component (DC), it is set to have the highest limiter level and not to shorten the bit length. Since the second level DCT coefficient 1002 has the lowest waveform in the alternating current component (AC), the limiter level is set to the second highest and the bit length is set so as not to be too short. Since the third level DCT coefficient 1003 has a waveform with medium AC components, the scalar amount of the DCT coefficient is not large. Therefore, the third level DCT coefficient 1003 is set to have the highest limiter level and the shortest bit length. The fifth level DCT coefficient 1005 has a waveform with a medium AC component, and the scalar amount of the DCT coefficient is not large. Therefore, the fifth level DCT coefficient 1005 is set to have a moderate limiter level and a slightly shorter bit length. It should be noted that the fourth level DCT coefficient 1004 is not included in the fixed length code since it is a high frequency. Therefore, no limiter value is set.

符号化フォーマット生成部129は、リミッタ部127から渡された、リミッタ処理後のDCT係数を、図9に例示するような形式に変換するフォーマット変換処理を行う。符号化フォーマット生成部129は、フォーマット変換処理によって生成された固定長符号を、一時記憶部300を構成する固定長用メモリ60に記憶させる。符号化フォーマット生成部129は、符号化手段に相当する。 The encoding format generation unit 129 performs format conversion processing for converting the DCT coefficients after the limiter processing, which are passed from the limiter unit 127, into a format as illustrated in FIG. The coding format generation unit 129 stores the fixed length code generated by the format conversion processing in the fixed length memory 60 forming the temporary storage unit 300 . The encoding format generator 129 corresponds to encoding means.

図9は、本実施形態に係る固定長符号のフォーマット(固定長符号化フォーマット)を例示している。図9に示すように、3MAX位置番号を示すbit(7bit)と、輝度のDCT係数に対応するbit(97bit)と、U成分のDCT係数に対応するbit(20bit)と、V成分のDCT係数に対応するbit(20bit)から構成される。本実施形態に係る固定長符号は、144bitから構成される。 FIG. 9 illustrates a fixed-length code format (fixed-length coding format) according to this embodiment. As shown in FIG. 9, bits (7 bits) indicating the 3MAX position number, bits (97 bits) corresponding to the DCT coefficient of luminance, bits (20 bits) corresponding to the DCT coefficient of the U component, and the DCT coefficient of the V component. is composed of bits (20 bits) corresponding to . The fixed-length code according to this embodiment consists of 144 bits.

図10は、符号化フォーマット生成部129において、リミッタ部127から渡されたDCT係数を、図9に示したフォーマットに基づいて固定長符号に変換した場合の例を示している。図10(a)、図10(b)、図10(c)はそれぞれ、異なる3MAX位置番号に対応する3MAXDCT係数ブロック1100に対するリミッタ処理後の係数ブロックに基づく固定長符号を例示している。符号化フォーマット生成部129は、図10に示すように各ブロックのDCT係数を並び替えて、3MAX位置番号に基づいて符号化フォーマットを決定し、図10に示したフォーマットの固定長を生成する。なお、図10に示す3MAXDCT係数ブロック1100内の数字は、固定長符号におけるbit列の位置との対応を例示するために便宜上表記した数字である。 FIG. 10 shows an example in which the encoding format generator 129 converts the DCT coefficients passed from the limiter 127 into fixed-length codes based on the format shown in FIG. FIGS. 10(a), 10(b), and 10(c) respectively illustrate fixed-length codes based on coefficient blocks after limiter processing for 3MAX DCT coefficient blocks 1100 corresponding to different 3MAX position numbers. The coding format generator 129 rearranges the DCT coefficients of each block as shown in FIG. 10, determines the coding format based on the 3MAX position numbers, and generates the fixed length format shown in FIG. It should be noted that the numbers in the 3MAX DCT coefficient block 1100 shown in FIG. 10 are numbers written for convenience in order to illustrate the correspondence with the positions of the bit strings in the fixed-length code.

図10(a)は、図7に示した3MAXDCT係数ブロック1100のおける、3MAX位置番号が「1」のものに対し、リミッタ部127においてリミッタ処理が行われたものを例示している。DCT係数のレベルによって有効なbit長が異なる。例えば、第一レベルDCT係数1001は11bit、第二レベルDCT係数1002は10bit、第五レベルDCT係数1005は8bit、第三レベルDCT係数1003は7bitが有効なbit長である。 FIG. 10(a) exemplifies the 3MAX DCT coefficient block 1100 shown in FIG. The effective bit length differs depending on the DCT coefficient level. For example, the effective bit length is 11 bits for the first level DCT coefficient 1001, 10 bits for the second level DCT coefficient 1002, 8 bits for the fifth level DCT coefficient 1005, and 7 bits for the third level DCT coefficient 1003.

図10(a)に係る符号化フォーマットは、図9に示したものと同様であって、各DCT係数ブロックをレベル毎に格納している。以上のように、符号化フォーマット生成部129は、3MAX位置番号に対応したリミッタ処理が行われた画素ブロックのDCT係数に対する符号化処理を実行する。 The encoding format of FIG. 10(a) is the same as that shown in FIG. 9, and each DCT coefficient block is stored for each level. As described above, the encoding format generation unit 129 performs encoding processing on DCT coefficients of pixel blocks subjected to limiter processing corresponding to 3MAX position numbers.

[復号化装置の実施形態]
続いて、本発明に係る復号化装置の実施形態に相当する固定長復号化部140の詳細な機能ブロックについて図11を用いて説明する。図11に示すように、本実施形態に係る固定長復号化部140は、符号解析部141と、DCT係数ソート部142と、逆量子化部143と、逆量子化テーブル144と、逆DCT変換部145と、RGB変換部146と、逆ブロック化部147と、を有する。
[Embodiment of decoding device]
Next, detailed functional blocks of the fixed-length decoding unit 140 corresponding to the embodiment of the decoding device according to the present invention will be explained using FIG. As shown in FIG. 11, the fixed-length decoding unit 140 according to this embodiment includes a code analysis unit 141, a DCT coefficient sorting unit 142, an inverse quantization unit 143, an inverse quantization table 144, and an inverse DCT transform. It has a section 145 , an RGB conversion section 146 , and a deblocking section 147 .

符号解析部141は、一時記憶部300から読み出した図9に示したフォーマットからなる固定長符号を読み出して、3MAX位置番号と各DCT係数に対応するbit列から、それぞれDCT係数の値を特定し、DCT係数ソート部142に転送する。符号解析部141は、符号解析手段に相当する。 The code analysis unit 141 reads fixed-length codes having the format shown in FIG. , to the DCT coefficient sorting unit 142 . The code analysis unit 141 corresponds to code analysis means.

DCT係数ソート部142は、3MAX位置番号から輝度のDCT係数を変換し、逆量子化部143に輝度のDCT係数を転送する。DCT係数ソート部142は、符号解析部141において特定された第三レベルDCT係数1003の配置パターンと、解析された各周波数変換係数に基づいて、画像ブロックに対応した配列を有する周波数変換係数を生成する。DCT係数ソート部142は、周波数変換係数生成手段に相当し、周波数変換係数生成部を構成する。 The DCT coefficient sorting unit 142 converts the luminance DCT coefficients from the 3MAX position numbers, and transfers the luminance DCT coefficients to the inverse quantization unit 143 . The DCT coefficient sorting unit 142 generates frequency transform coefficients having an array corresponding to the image block based on the arrangement pattern of the third-level DCT coefficients 1003 specified by the code analysis unit 141 and each analyzed frequency transform coefficient. do. The DCT coefficient sorting unit 142 corresponds to frequency transform coefficient generating means and constitutes a frequency transform coefficient generating unit.

DCT係数ソート部142における処理について、図12を用いて説明する。図12は、図10に示した図とは逆に、固定長フォーマットのbit列から、3MAX位置番号を抽出し、固定長符号から3MAXDCT係数ブロック1100へ変換する様子を例示している。DCT係数ソート部142は、図12に示すように、固定長フォーマットから3MAXDCT係数ブロック1100への変換を行い、変換された3MAXDCT係数ブロック1100を逆量子化部143に転送する。 Processing in the DCT coefficient sorting section 142 will be described with reference to FIG. 12 illustrates how 3MAX position numbers are extracted from fixed-length format bit strings and converted from fixed-length codes to 3MAX DCT coefficient blocks 1100, contrary to the diagram shown in FIG. DCT coefficient sorting section 142 performs conversion from the fixed length format to 3MAX DCT coefficient block 1100 as shown in FIG.

逆量子化部143は、3MAXDCT係数ブロック1100に含まれる輝度のDCT係数と、U成分のDCT係数及びV成分のDCT係数に対し、逆量子化テーブル144から読み出した逆量子化値を用いて逆量子化処理を実行する。逆量子化部143は、逆量子化処理の結果を、逆DCT変換部145に転送する。逆量子化部143は、逆量子化手段に相当する。 The inverse quantization unit 143 uses inverse quantization values read from the inverse quantization table 144 to inversely quantize the luminance DCT coefficients, the U component DCT coefficients, and the V component DCT coefficients included in the 3MAX DCT coefficient block 1100 . Perform quantization processing. The inverse quantization unit 143 transfers the result of the inverse quantization process to the inverse DCT transform unit 145 . The inverse quantization section 143 corresponds to inverse quantization means.

逆量子化テーブル144には、DCT係数を量子化するための量子化値が格納されている。 The inverse quantization table 144 stores quantization values for quantizing the DCT coefficients.

逆DCT変換部145は、逆量子化部143から渡された「逆量子化処理の結果として得られた輝度、U成分、V成分のDCT係数」に基づいて逆DCT変換処理を実行する。これによって、YUV画像データが得られるので、このYUV画像データをRGB変換部146に転送する。逆DCT変換部145は、逆周波数変換処理手段に相当し、逆周波数変換処理部を構成する。 The inverse DCT transform unit 145 executes inverse DCT transform processing based on “the DCT coefficients of the luminance, U component, and V component obtained as a result of the inverse quantization processing” passed from the inverse quantization unit 143 . YUV image data is thus obtained, and this YUV image data is transferred to the RGB conversion unit 146 . The inverse DCT transform unit 145 corresponds to inverse frequency transform processing means and constitutes an inverse frequency transform processing unit.

RGB変換部146は、転送されてきたYUV画像データに対するRGB画像データへの変換処理を実行する。RGB変換部146によって、4画素×4画素の画素ブロックからなるRGB画像データが出力される。 The RGB conversion unit 146 executes conversion processing of the transferred YUV image data into RGB image data. The RGB conversion unit 146 outputs RGB image data consisting of a pixel block of 4 pixels×4 pixels.

逆ブロック化部147は、RGB変換部146から渡された画素ブロックを2次元の画像データに展開して、RGB画像データを生成する。逆ブロック化部147は、生成したRGB画像データを一時記憶部300に転送する。逆ブロック化部147は、画像ブロック統合手段に相当し、画像ブロック統合部を構成する。 The deblocking unit 147 develops the pixel block passed from the RGB conversion unit 146 into two-dimensional image data to generate RGB image data. The deblocking unit 147 transfers the generated RGB image data to the temporary storage unit 300 . The deblocking unit 147 corresponds to image block integration means and constitutes an image block integration unit.

[画像処理部110の詳細な機能ブロック]
ここで、本実施形態に係る画像処理部110の詳細な機能ブロックについて図13を用いて説明する。図13に示すように、画像処理部110は、Byaer補正処理部111と、フィルタ処理部112と、を有する。
[Detailed Functional Blocks of Image Processing Unit 110]
Here, detailed functional blocks of the image processing unit 110 according to this embodiment will be described with reference to FIG. 13 . As shown in FIG. 13 , the image processor 110 has a Byaer correction processor 111 and a filter processor 112 .

Byaer補正処理部111は、データ入力部200から画像データを受け取り、ベイヤー型の画像を読み込み補正して通常のRGB値を生成する。 The Byaer correction processing unit 111 receives image data from the data input unit 200, reads and corrects the Bayer type image, and generates normal RGB values.

フィルタ処理部112は、Byaer補正処理部111において生成されたRGB画像データにフィルタ処理を実行する。フィルタ処理後のRGB画像データは、固定長符号化部120に転送される。 The filtering unit 112 performs filtering on the RGB image data generated by the Byaer correction processing unit 111 . The RGB image data after filtering is transferred to the fixed length encoding unit 120 .

[可変長動画圧縮部150の詳細な機能ブロック]
次に、本実施形態に係る可変長動画圧縮部150の詳細な機能ブロックについて、図14を用いて説明する。図14に示すように、可変長動画圧縮部150は、動き検索部151と、DCT部152と、量子化処理部153と、可変長符号化部154と、逆量子化処理部155と、逆DCT部156と、動き補償部157と、を有する。
[Detailed functional blocks of variable-length video compression unit 150]
Next, detailed functional blocks of the variable-length video compression unit 150 according to this embodiment will be described with reference to FIG. 14 . As shown in FIG. 14, the variable-length video compression unit 150 includes a motion search unit 151, a DCT unit 152, a quantization processing unit 153, a variable-length coding unit 154, an inverse quantization processing unit 155, and an inverse It has a DCT section 156 and a motion compensation section 157 .

動き検索部151は、固定長復号化部140から受け取った画像データと、動き補償部157からの相関が最も高い前フレームのブロックとの差分データを算出する。 The motion search unit 151 calculates difference data between the image data received from the fixed length decoding unit 140 and the block of the previous frame with the highest correlation from the motion compensation unit 157 .

DCT部152は、動き検索部151で算出された差分データを空間周波数に変換し、量子化処理部153に転送する。 The DCT unit 152 converts the difference data calculated by the motion search unit 151 into spatial frequency, and transfers the spatial frequency to the quantization processing unit 153 .

量子化処理部153は、周波数変換済みのDCTデータを量子化し、可変長符号化部154に転送する。 The quantization processing unit 153 quantizes the frequency-transformed DCT data and transfers the quantized data to the variable-length coding unit 154 .

可変長符号化部154は、量子化処理部153で生成された量子化データを可変長符号化して圧縮符号を生成する。可変長符号化部154は、生成した圧縮符号を画像データ格納部400に格納する。 The variable-length coding unit 154 variable-length-codes the quantized data generated by the quantization processing unit 153 to generate compression codes. The variable-length coding unit 154 stores the generated compression code in the image data storage unit 400. FIG.

逆量子化処理部155は、量子化処理部153で生成された、「量子化されたブロック」に対し、逆量子化処理を実行する。逆量子化処理部155は、処理結果を、逆DCT部156に転送する。 The inverse quantization processing unit 155 performs inverse quantization processing on the “quantized block” generated by the quantization processing unit 153 . The inverse quantization processing section 155 transfers the processing result to the inverse DCT section 156 .

逆DCT部156は、逆量子化処理部155から渡された逆量子化データに対して、逆周波数変換処理を実行する。逆DCT部156は、逆周波数変換処理による処理結果を動き補償部157に転送するする。 The inverse DCT unit 156 performs inverse frequency transform processing on the inverse quantized data passed from the inverse quantization processing unit 155 . The inverse DCT unit 156 transfers the processing result of the inverse frequency transform processing to the motion compensation unit 157 .

動き補償部157は、動き補償した前フレームのマクロブロックに、逆DCT部156から渡された差分データを加算して参照フレームを作成する。動き補償部157は、参照フレームを動き検索部151に転送する。 The motion compensation unit 157 adds the difference data passed from the inverse DCT unit 156 to the motion-compensated macroblocks of the previous frame to create a reference frame. The motion compensator 157 transfers the reference frame to the motion searcher 151 .

[符号化方法及び復号化方法の実施形態]
次に、本発明に係る符号化方法及び復号化方法の実施形態について説明する。図15は、上記にて説明をしたデジタルカメラ1の動作の流れを例示している。本実施形態に係る符号化方法と復号化方法は、デジタルカメラ1のような画像処理装置において実行される一連の画像処理の中で行われる。
[Embodiment of Encoding Method and Decoding Method]
Next, embodiments of the encoding method and decoding method according to the present invention will be described. FIG. 15 illustrates the flow of operations of the digital camera 1 described above. The encoding method and decoding method according to this embodiment are performed in a series of image processing executed in an image processing apparatus such as the digital camera 1 .

まず、光学系20を介して被写体の反射光を撮像素子30の撮像面に集光させ、撮像素子30から出力される画像信号を取り込む(S1501)。続いて、A/Dコンバータ40によって、画像信号が画像データに変換されてプロセッサ10に入力される(S1502)。続いて、プロセッサ10において画像データ処理が実行される(S1503)。画像データ処理の詳細は後述する。プロセッサ10における画像データ処理によって動画像データが生成されて出力され、動画像メモリ70に格納される(S1504)。 First, reflected light from an object is focused on the imaging surface of the imaging element 30 via the optical system 20, and an image signal output from the imaging element 30 is captured (S1501). Subsequently, the image signal is converted into image data by the A/D converter 40 and input to the processor 10 (S1502). Subsequently, image data processing is executed in the processor 10 (S1503). Details of the image data processing will be described later. Moving image data is generated and output by image data processing in the processor 10, and stored in the moving image memory 70 (S1504).

[画像データ処理の詳細]
S1503における画像データ処理において、本発明に係る符号化方法及び復号化方法は適用される。したがって、当該画像データ処理を実行する画像処理プログラムに、本発明に係る符号化プログラム及び復号化プログラムが含まれる。以下、画像データ処理(S1503)の詳細について説明しつつ、符号化方法及び復号化方法、符号化プログラム及び復号化プログラムの実行についても言及する。
[Details of image data processing]
The encoding method and decoding method according to the present invention are applied to the image data processing in S1503. Therefore, the image processing program for executing the image data processing includes the encoding program and the decoding program according to the present invention. The details of the image data processing (S1503) will be described below, and the encoding method, decoding method, and execution of the encoding program and decoding program will also be referred to.

図16は、S1503における画像データ処理の詳細な流れを示すフローチャートである。まず、固定長符号化部120においてRGB画像データが固定長符号に符号化される(S1601)。生成された固定長符号は、一時記憶部300に一旦格納される(S1602)。続いて、一旦格納されている固定長符号を歪曲補正部130の指示に基づいて固定長復号化部140が読み出す(S1603)。 FIG. 16 is a flowchart showing the detailed flow of image data processing in S1503. First, RGB image data is coded into a fixed length code in the fixed length coding unit 120 (S1601). The generated fixed-length code is temporarily stored in the temporary storage unit 300 (S1602). Subsequently, the fixed-length decoding unit 140 reads out the temporarily stored fixed-length code based on an instruction from the distortion correction unit 130 (S1603).

続いて、固定長復号化部140が、固定長符号を復号化する(S1604)。固定長符号からYUV画像データに復号化されたものを用いて、歪曲補正部130が歪曲補正処理を実行する(S1605)。 Subsequently, fixed-length decoding section 140 decodes the fixed-length code (S1604). Using the YUV image data decoded from the fixed-length code, the distortion correction unit 130 executes distortion correction processing (S1605).

歪曲補正処理が行われたYUV画像データに対し、再度、固定長符号化処理が行われる(S1606)。生成された固定長符号は、一時記憶部300に一旦格納される(S1607)。続いて、一旦格納されている固定長符号を可変長動画圧縮部150の指示に基づいて固定長復号化部140が読み出す(S1608)。 Fixed-length encoding processing is performed again on the YUV image data that has been subjected to distortion correction processing (S1606). The generated fixed-length code is temporarily stored in the temporary storage unit 300 (S1607). Subsequently, the fixed-length decoding unit 140 reads out the temporarily stored fixed-length code based on an instruction from the variable-length video compression unit 150 (S1608).

続いて、固定長復号化部140が、固定長符号を復号化する(S1609)。固定長符号からYUV画像データに復号化されたものを用いて、可変長動画圧縮部150が動画像データを生成する(S1610)。続いて、生成された動画像データを画像データ格納部400に格納する(S1611)。 Subsequently, fixed-length decoding section 140 decodes the fixed-length code (S1609). Using the YUV image data decoded from the fixed-length code, the variable-length moving image compression unit 150 generates moving image data (S1610). Subsequently, the generated moving image data is stored in the image data storage unit 400 (S1611).

次に、固定長符号化処理(S1601、S1606)における詳細な処理の流れについて、図17のフローチャートを用いながら説明する。 Next, a detailed processing flow in fixed-length encoding processing (S1601, S1606) will be described using the flowchart of FIG.

まず、画像処理部110によって生成されたRGB画像データをメモリから読み出して、ブロック化部121において、4画素×4画素の画像ブロックを生成し、YUV変換部122に対して順次出力する(S1701)。 First, the RGB image data generated by the image processing unit 110 is read from the memory, the blocking unit 121 generates image blocks of 4 pixels×4 pixels, and sequentially outputs them to the YUV conversion unit 122 (S1701). .

続いて、YUV変換部122は、画像ブロックのそれぞれに対し、RGB形式からYUV形式に変換するYUV変換処理を実行し、生成したYUV画像データをDCT変換部123に転送する(S1702)。 Subsequently, the YUV conversion unit 122 executes YUV conversion processing for converting from the RGB format to the YUV format for each image block, and transfers the generated YUV image data to the DCT conversion unit 123 (S1702).

続いて、S1702においてYUV形式に変換された4画素×4画素のYUV画像ブロックに対し、DCT変換部123が離散コサイン変換(DCT)を利用した周波数変換処理を実行する(S1703)。DCT変換部123は、周波数変換処理により生成したDCT係数を3MAX位置番号生成部124と量子化部125に転送する。 Subsequently, the DCT transform unit 123 performs frequency transform processing using discrete cosine transform (DCT) on the YUV image block of 4 pixels×4 pixels converted into the YUV format in S1702 (S1703). The DCT transforming section 123 transfers the DCT coefficients generated by the frequency transforming process to the 3MAX position number generating section 124 and the quantizing section 125 .

続いて、生成された周波数変換係数(DCT)係数に対し、3MAX位置番号生成部124,量子化部125,リミッタ部127によるDCT形成制限処理が行われる(S1704)。DCT制限処理の詳細は後述する。 Subsequently, DCT formation restriction processing is performed on the generated frequency transform coefficient (DCT) coefficients by the 3MAX position number generator 124, quantizer 125, and limiter 127 (S1704). Details of the DCT restriction processing will be described later.

最後に、符号化フォーマット生成部129において、固定長符号生成処理が実行される(S1705)。固定長符号生成処理の詳細は、図9及び図10を用いながら説明をした符号化フォーマット生成部129の動作によるものである。 Finally, the encoding format generation unit 129 executes fixed-length code generation processing (S1705). The details of the fixed-length code generation processing are based on the operation of the coding format generation unit 129 described with reference to FIGS. 9 and 10. FIG.

次に、DCT係数制限処理(S1704)の詳細について、図18のフローチャートを用いながら説明する。まず、DCT変換処理(S1703)において、図5において例示したDCT係数ブロック1000が生成されたものとする。これに対し、各ブロックのDCT係数の値に基づいて、各ブロックが、どのレベルのDCT係数に相当するかを判断する(S1801)。 Next, details of the DCT coefficient limiting process (S1704) will be described with reference to the flowchart of FIG. First, it is assumed that the DCT coefficient block 1000 illustrated in FIG. 5 is generated in the DCT transform processing (S1703). On the other hand, based on the value of the DCT coefficient of each block, it is determined which level of DCT coefficient each block corresponds to (S1801).

続いて、3MAX位置番号生成部124が、第三レベルDCT係数1003に相当するDCT係数の絶対値が大きいものから順に並べ、その上位3つに相当する第三レベルDCT係数1003を特定する(S1802)。 Subsequently, the 3MAX position number generator 124 arranges the DCT coefficients corresponding to the third level DCT coefficients 1003 in descending order of absolute value, and identifies the third level DCT coefficients 1003 corresponding to the top three (S1802). ).

続いて、上位3つに相当する第三レベルDCT係数1003を、第五レベルDCT係数1005とする(図6参照)。そして、第五レベルDCT係数1005の配置パターンが、図7に示したいずれのパターンに合致するかを判定し、合致したパターンの「3MAX位置番号」を特定する(S1803)。特定された3MAX位置番号はリミッタ部127と符号化フォーマット生成部129に転送される。 Next, the third level DCT coefficients 1003 corresponding to the top three are set as the fifth level DCT coefficients 1005 (see FIG. 6). Then, it is determined which pattern shown in FIG. 7 the arrangement pattern of the fifth level DCT coefficients 1005 matches, and the "3MAX position number" of the matched pattern is specified (S1803). The specified 3MAX position number is transferred to the limiter section 127 and the encoding format generation section 129 .

また、DCT変換処理(S1703)において、生成されたDCT係数ブロック1000に含まれるDCT係数に対して、量子化部125が量子化処理を実行する(S1804)。S1804において、量子化部125は、量子化テーブル126を参照して量子化値を特定し、DCT係数ブロック1000に含まれるDCT係数の量子化を行う。量子化したDCT係数は、リミッタ部127に転送される。 Also, in the DCT transform processing (S1703), the quantization unit 125 performs quantization processing on the DCT coefficients included in the generated DCT coefficient block 1000 (S1804). In S1804, the quantization section 125 refers to the quantization table 126 to specify a quantization value, and quantizes the DCT coefficients included in the DCT coefficient block 1000. FIG. The quantized DCT coefficients are transferred to limiter section 127 .

続いて、リミッタ部127において、DCT係数を制限するリミッタ処理が実行される(S1805)。ここで、リミッタ処理(S1805)の効果について詳細について説明する。図19は、リミッタ部127において実行される制限処理(S1805)の効果を説明するイメージ図である。図19において、各画素に対応する位置に表記されている数字はDCT係数の例示である。 Subsequently, limiter processing for limiting the DCT coefficients is executed in the limiter section 127 (S1805). Here, the effect of limiter processing (S1805) will be described in detail. FIG. 19 is an image diagram for explaining the effect of the limit processing (S1805) executed in the limiter section 127. FIG. In FIG. 19, numbers written at positions corresponding to respective pixels are examples of DCT coefficients.

図19(a)から(d)は、従来技術を用いてDCT係数の制限処理を行う場合を想定した比較例を示している。図19(e)から(h)は、本発明に係る符号化処理における制限処理を行った場合の例である。 FIGS. 19(a) to 19(d) show comparative examples assuming a case where the conventional technique is used to limit the DCT coefficients. FIGS. 19(e) to 19(h) are examples of restriction processing in the encoding processing according to the present invention.

図19(a)と図19(e)は、それぞれ量子化前のDCT係数を例示している。図19(e)に示すように、第三レベルDCT係数1003の一部が、第五レベルDCT係数1005とされている。 FIGS. 19(a) and 19(e) respectively illustrate DCT coefficients before quantization. As shown in FIG. 19(e), part of the third level DCT coefficients 1003 are used as fifth level DCT coefficients 1005. FIG.

これらに対し量子化処理を実行したものが図19(b)と図19(f)である。そして、これらに対してリミッタ処理を実行したものが図19(c)と図19(g)である。最後にこれらに対して逆量子化処理を行ったものが図19(d)と図19(h)である。各図に示されている量子化前のDCT係数の値と、量子化後のDCT係数の値を参照すると、比較例では、第三レベルDCT係数1003の値が大きく変化しているところ、本発明に係るものは、その変化が小さい。すなわち、本発明に係る方法であれば、固定長符号に圧縮した場合であっても、画像のエッジの再現性や色の再現性が高い。つまり、画像処理を実行するときの処理対象データを固定長符号にすることで、メモリへのアクセス量を減らし、処理の効率化を図るとともに、処理後の画像の質を高いレベルで維持できる。 FIG. 19(b) and FIG. 19(f) show the quantization processing executed on these. FIG. 19(c) and FIG. 19(g) are the result of performing limiter processing on these. Finally, FIG. 19(d) and FIG. 19(h) show the inverse quantization process performed on these. Referring to the values of the DCT coefficients before quantization and the values of the DCT coefficients after quantization shown in each figure, in the comparative example, the value of the third level DCT coefficient 1003 changes significantly, whereas in this example The variation is small in the invention. That is, with the method according to the present invention, even when compressed into fixed-length codes, the reproducibility of edges and colors of an image is high. In other words, by using fixed-length codes for data to be processed when performing image processing, it is possible to reduce the amount of access to the memory, improve the processing efficiency, and maintain the quality of the processed image at a high level.

本実施形態に係る量子化部125では、第三レベルDCT係数1003に対しては、3bitシフト、第一レベルDCT係数1001に対してはシフトなし、第二レベルDCT係数1002に対しては1bitシフト、第五レベルDCT係数1005に対しては、2bitシフト、第四レベルDCT係数1004の値はゼロにする。なお、量子化部125におけるbitシフト処理は、すべて右シフトである。なお、逆量子化部143において実行される逆量子化処理においては、各レベルのDCT係数に対して同様に左シフト処理を行う。 In the quantization section 125 according to this embodiment, the third level DCT coefficient 1003 is shifted by 3 bits, the first level DCT coefficient 1001 is not shifted, and the second level DCT coefficient 1002 is shifted by 1 bit. , the fifth level DCT coefficient 1005 is shifted by 2 bits, and the value of the fourth level DCT coefficient 1004 is set to zero. All bit shift processing in the quantization unit 125 is right shift. In the inverse quantization processing executed in the inverse quantization section 143, left shift processing is similarly performed on the DCT coefficients of each level.

また、本実施形態に係るリミッタ部127では、第五レベルDCT係数1005の値が「63」以上の場合は、DCT係数の値を「63」に制限する。また、第二レベルDCT係数1002及び第一レベルDCT係数1001については、DCT係数の値に関わらず制限はしない。また、第五レベルDCT係数1005については、DCT係数の値が「127」以上の場合は、値を「127」に制限する。 Further, the limiter unit 127 according to the present embodiment limits the value of the DCT coefficient to "63" when the value of the fifth level DCT coefficient 1005 is "63" or more. Also, the second level DCT coefficient 1002 and the first level DCT coefficient 1001 are not restricted regardless of the values of the DCT coefficients. As for the fifth level DCT coefficient 1005, the value is limited to "127" when the value of the DCT coefficient is "127" or more.

以上のように、本実施形態に係る符号化方法では、特にDCT係数制限処理(S1704)において、量子化前の第三レベルDCT係数1003の内、スカラー量が上位三位までのものである第五レベルDCT係数1005に対して、リミッタ値を大きく設定している。これによって、逆量子化処理後も量子化前の値との差が小さく、特にスカラーが大きいDCT係数の特徴が維持されている。これに対し、比較例は、第三レベルDCT係数1003の部分が平坦化してしまい、特徴が消えている。 As described above, in the encoding method according to the present embodiment, particularly in the DCT coefficient limiting process (S1704), among the third-level DCT coefficients 1003 before quantization, the scalar amount is the highest three. A large limiter value is set for the five-level DCT coefficient 1005 . As a result, even after the inverse quantization process, the difference between the values before quantization is small, and the characteristics of the DCT coefficients, which are particularly large in scalar, are maintained. On the other hand, in the comparative example, the portion of the third level DCT coefficient 1003 is flattened and the features are lost.

次に、固定長復号化処理(S1604、S1609)における詳細な処理の流れについて、図20のフローチャートを用いながら説明する。 Next, the detailed processing flow in the fixed-length decoding processing (S1604, S1609) will be described using the flowchart of FIG.

まず、符号解析部141が一時記憶部300から該当する固定長符号を読み出し、解析して、3MAX位置番号と、各DCT係数にbit列を区別して、DCT係数ソート部142に転送する(S2001)。 First, the code analysis unit 141 reads out the corresponding fixed-length code from the temporary storage unit 300, analyzes it, distinguishes the 3MAX position number and the bit string of each DCT coefficient, and transfers it to the DCT coefficient sorting unit 142 (S2001). .

続いて、DCT係数ソート部142が、3MAX位置番号に基づいて図12に例示したように、輝度のDCT係数への変換を行い、逆量子化部143に転送する(S2002)。 Subsequently, the DCT coefficient sorting unit 142 converts luminance into DCT coefficients as illustrated in FIG. 12 based on the 3MAX position number, and transfers the DCT coefficients to the inverse quantization unit 143 (S2002).

続いて、逆量子化部143が、逆量子化テーブル144を参照して、DCT係数ソート部142から転送されてきた量子化された輝度、U成分、Y成分、のDCT係数に対して、逆量子化処理を実行し、結果を逆DCT変換部145に転送する(S2003)。 Subsequently, the inverse quantization unit 143 refers to the inverse quantization table 144 and performs the inverse quantization on the DCT coefficients of the quantized luminance, U component, and Y component transferred from the DCT coefficient sorting unit 142 . Quantization processing is executed, and the result is transferred to the inverse DCT transform unit 145 (S2003).

続いて、逆DCT変換部145が、転送されてきたDCT係数に基づいて逆DCT変換を行い、YUV画像データを生成する。生成したYUV画像データはRGB変換部146に転送される(S2004)。 Subsequently, the inverse DCT transform unit 145 performs inverse DCT transform based on the transferred DCT coefficients to generate YUV image data. The generated YUV image data is transferred to the RGB conversion unit 146 (S2004).

続いて、RGB変換部146は、転送されてきたYUV画像データをRGB画像データに変換する(S2005)。最後に、画像ブロックからなるRGB画像データ(4×4画素の画像ブロック)を、二次元データに展開したRGB画像データを生成し、一時記憶部300に転送する(S2006)。 Subsequently, the RGB conversion unit 146 converts the transferred YUV image data into RGB image data (S2005). Finally, RGB image data (image block of 4×4 pixels) consisting of image blocks is developed into two-dimensional data to generate RGB image data and transferred to the temporary storage unit 300 (S2006).

以上のように、DCT係数のスカラー量に基づいて、所定の画像ブロックに相当するDCT係数を制限する処理を制御して、これを固定長符号にし、上記のように復号化することで、画像の質の低下を抑制しながら、高い圧縮率をもってデータ量を低減させることができる。 As described above, based on the scalar amount of the DCT coefficients, the process of limiting the DCT coefficients corresponding to a predetermined image block is controlled, converted into fixed-length code, and decoded as described above to obtain an image. It is possible to reduce the amount of data with a high compression rate while suppressing the deterioration of the quality of the data.

なお、本発明は上述した各実施形態に限定されるものではなく、その技術的要旨を逸脱しない範囲で種々の変形が可能であり、特許請求の範囲に記載された技術思想に含まれる技術的事項の全てが本発明の対象となる。上記実施形態は、好適な例を示したものであるが、当業者であれば、開示した内容から様々な変形例を実現することが可能である。そのような変形例も、特許請求の範囲に記載された技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications are possible without departing from the technical scope of the invention. All matters are covered by the present invention. Although the above embodiment shows a preferred example, a person skilled in the art can realize various modifications from the disclosed contents. Such modifications are also included in the technical scope described in the claims.

1 :デジタルカメラ
10 :プロセッサ
20 :光学系
30 :撮像素子
40 :A/Dコンバータ
50 :メモリコントローラ
60 :固定長用メモリ
70 :動画像メモリ
100 :画像処理ブロック
110 :画像処理部
111 :Byaer補正処理部
112 :フィルタ処理部
120 :固定長符号化部
121 :ブロック化部
122 :YUV変換部
123 :DCT変換部
124 :3MAX位置番号生成部
125 :量子化部
126 :量子化テーブル
127 :リミッタ部
128 :リミッタテーブル
129 :符号化フォーマット生成部
130 :歪曲補正部
140 :固定長復号化部
141 :符号解析部
142 :DCT係数ソート部
143 :逆量子化部
144 :逆量子化テーブル
145 :逆DCT変換部
146 :RGB変換部
147 :逆ブロック化部
150 :可変長動画圧縮部
151 :動き検索部
152 :DCT部
153 :量子化処理部
154 :可変長符号化部
155 :逆量子化処理部
156 :逆DCT部
157 :動き補償部
200 :データ入力部
300 :一時記憶部
400 :画像データ格納部
601 :元画像データ
1: Digital camera 10: Processor 20: Optical system 30: Image sensor 40: A/D converter 50: Memory controller 60: Fixed length memory 70: Moving image memory 100: Image processing block 110: Image processing unit 111: Byaer correction Processing unit 112 : Filter processing unit 120 : Fixed length encoding unit 121 : Blocking unit 122 : YUV conversion unit 123 : DCT conversion unit 124 : 3MAX position number generation unit 125 : Quantization unit 126 : Quantization table 127 : Limiter unit 128: Limiter table 129: Encoding format generator 130: Distortion corrector 140: Fixed length decoder 141: Code analyzer 142: DCT coefficient sorter 143: Inverse quantizer 144: Inverse quantizer table 145: Inverse DCT Transformation unit 146 : RGB transformation unit 147 : Deblocking unit 150 : Variable length video compression unit 151 : Motion search unit 152 : DCT unit 153 : Quantization processing unit 154 : Variable length coding unit 155 : Inverse quantization processing unit 156 : Inverse DCT unit 157 : Motion compensation unit 200 : Data input unit 300 : Temporary storage unit 400 : Image data storage unit 601 : Original image data

特開2004-112345号公報Japanese Patent Application Laid-Open No. 2004-112345

Claims (7)

複数の画素を含む画像を所定の数の画素数で分割した画像ブロックを固定長符号にする符号化装置であって、
前記画像ブロックを生成する画像分割手段と、
前記画像ブロックに対する周波数変換処理を行い、当該画像ブロックに対応する周波数変換係数を出力する周波数変換手段と、
前記画像ブロックに含まれる各画素に対応する前記周波数変換係数の絶対値が所定条件に適合する周波数変換係数を条件適合周波数変換係数として特定する条件適合周波数変換係数特定手段と、
前記条件適合周波数変換係数に基づいて、前記画素に対応する前記周波数変換係数の値を個別に制限するための制限値を含む制限値群を選択する制限値選択手段と、
選択された制限値群に含まれる各制限値を用いて、前記周波数変換手段により出力された周波数変換係数の値を制限する制限処理を実行する制限処理手段と、
前記制限処理が実行された後の周波数変換係数を固定長符号として符号化する符号化手段と、を有し、
前記制限処理手段は、前記周波数変換係数に含まれる前記条件適合周波数変換係数に対する制限処理においては、選択された前記制限値群に含まれている制限値よりも小さい値を用いて前記条件適合周波数変換係数の値を制限する、ことを特徴とする符号化装置。
An encoding device that converts an image block obtained by dividing an image including a plurality of pixels into a predetermined number of pixels into a fixed-length code,
image segmentation means for generating the image blocks;
frequency transform means for performing frequency transform processing on the image block and outputting frequency transform coefficients corresponding to the image block;
a condition-suitable frequency transform coefficient specifying means for specifying, as a condition-suitable frequency transform coefficient, a frequency transform coefficient whose absolute value of the frequency transform coefficient corresponding to each pixel included in the image block meets a predetermined condition;
Limit value selection means for selecting a limit value group including limit values for individually limiting values of the frequency transform coefficients corresponding to the pixels based on the condition-satisfactory frequency transform coefficients;
limiting processing means for executing limiting processing for limiting the values of the frequency conversion coefficients output by the frequency conversion means, using each limit value included in the selected limit value group;
encoding means for encoding the frequency transform coefficient after the limiting process has been performed as a fixed-length code;
The limit processing means uses a value smaller than a limit value included in the selected limit value group in the limit processing for the condition-suitable frequency transform coefficients included in the frequency transform coefficients. An encoding device, characterized in that it limits the values of transform coefficients.
条件適合周波数変換係数特定手段は、所定の上限以上かつ所定の下限未満の周波数変換係数の絶対値を並べ替えの対象から除外したものを条件適合周波数変換係数の対象とする、
請求項1に記載の符号化装置。
The condition-satisfactory frequency transform coefficient identifying means excludes absolute values of the frequency transform coefficients that are equal to or greater than a predetermined upper limit and less than a predetermined lower limit from the objects to be rearranged, and treats the frequency transform coefficients that are subject to condition-satisfactory frequency transform coefficients.
2. Encoding apparatus according to claim 1.
前記条件適合周波数変換係数特定手段は、前記所定条件として、前記絶対値が大きいものから順に三個の周波数変換係数を条件適合周波数変換係数として特定する、
請求項1又は2に記載の符号化装置。
The condition-suitable frequency transform coefficient specifying means specifies, as the predetermined condition, three frequency transform coefficients in descending order of absolute values as condition-suitable frequency transform coefficients.
3. Encoding device according to claim 1 or 2.
前記符号化手段は、前記周波数変換係数に含まれる前記条件適合周波数変換係数のパターンに基づいて、前記制限処理が実行された周波数変換係数の固定長符号化フォーマットを決定し、当該固定長符号化フォーマットに基づいて前記周波数変換係数を固定長符号にする、
請求項1乃至3のいずれか一項に記載の符号化装置。
The encoding means determines a fixed-length encoding format of the frequency transform coefficients subjected to the limiting process based on the pattern of the condition-satisfactory frequency transform coefficients included in the frequency transform coefficients, and performs the fixed-length encoding. fixed-length code the frequency transform coefficients based on a format;
4. Encoding apparatus according to any one of claims 1 to 3.
前記符号化が固定長符号化フォーマットの決定に用いる前記条件適合周波数変換係数のパターンは、前記条件適合周波数変換係数に対応する前記画素の配置である、
請求項4に記載の符号化装置。
the pattern of the conditional frequency transform coefficients used by the encoding to determine a fixed-length encoding format is the arrangement of the pixels corresponding to the conditional frequency transform coefficients;
5. Encoding device according to claim 4.
複数の画素を含む画像を所定の数の画素数で分割した画像ブロックにし、
前記画像ブロックに対する周波数変換処理を行い、
当該画像ブロックに対応する周波数変換係数を出力し、
前記画像ブロックに含まれる各画素に対応する前記周波数変換係数の絶対値が所定条件に適合する周波数変換係数を条件適合周波数変換係数として特定し、
前記条件適合周波数変換係数に基づいて、前記画素に対応する前記周波数変換係数の値を個別に制限するための制限値を含む制限値群を選択し、
選択された制限値群に含まれる各制限値を用いて、前記周波数変換係数の値を制限する制限処理を実行するに当たり、前記周波数変換係数に含まれる前記条件適合周波数変換係数に対する制限処理においては、選択された前記制限値群に含まれている制限値よりも小さい値を用いて前記条件適合周波数変換係数の値を制限し、
前記制限処理が実行された後の周波数変換係数を固定長符号として符号化する、ことを特徴とする符号化方法。
an image block obtained by dividing an image containing a plurality of pixels into a predetermined number of pixels;
performing frequency transform processing on the image block;
outputting frequency transform coefficients corresponding to the image block;
identifying a frequency transform coefficient whose absolute value corresponding to each pixel included in the image block satisfies a predetermined condition as a condition-satisfactory frequency transform coefficient;
selecting a limit value group including limit values for individually limiting values of the frequency transform coefficients corresponding to the pixels based on the conditional frequency transform coefficients;
In executing the limiting process for limiting the values of the frequency transform coefficients using each limit value included in the selected limit value group, in the limiting process for the condition-satisfactory frequency transform coefficients included in the frequency transform coefficients, , limiting the value of the conditional frequency transform coefficient using a value smaller than the limit value included in the selected limit value group;
An encoding method, characterized in that the frequency transform coefficient after the limiting process is performed is encoded as a fixed-length code.
コンピュータにおいて、複数の画素を含む画像を所定の数の画素数で分割した画像ブロックを固定長符号にする処理を実行させる符号化プログラムであって、
前記画像ブロックを生成する画像分割部と、
前記画像ブロックに対する周波数変換処理を行い、当該画像ブロックに対応する周波数変換係数を出力する周波数変換部と、
前記画像ブロックに含まれる各画素に対応する前記周波数変換係数の絶対値が所定条件に適合する周波数変換係数を条件適合周波数変換係数として特定する条件適合周波数変換係数特定部と、
前記条件適合周波数変換係数に基づいて、前記画素に対応する前記周波数変換係数の値を個別に制限するための制限値を含む制限値群を選択する制限値選択部と、
選択された制限値群に含まれる各制限値を用いて、前記周波数変換部により出力された周波数変換係数の値を制限する制限処理を実行する制限処理部と、
前記制限処理が実行された後の周波数変換係数を固定長符号として符号化する符号化部と、を含み、
前記制限処理部は、前記周波数変換係数に含まれる前記条件適合周波数変換係数に対する制限処理においては、選択された前記制限値群に含まれている制限値よりも小さい値を用いて前記条件適合周波数変換係数の値を制限する、処理を実行させることを特徴とする符号化プログラム。
An encoding program for causing a computer to execute a process of converting an image block obtained by dividing an image including a plurality of pixels into a predetermined number of pixels into a fixed-length code,
an image dividing unit that generates the image blocks;
a frequency transform unit that performs frequency transform processing on the image block and outputs a frequency transform coefficient corresponding to the image block;
a condition-suitable frequency transform coefficient specifying unit that specifies, as a condition-suitable frequency transform coefficient, a frequency transform coefficient whose absolute value of the frequency transform coefficient corresponding to each pixel included in the image block meets a predetermined condition;
a limit value selection unit that selects a limit value group including limit values for individually limiting values of the frequency transform coefficients corresponding to the pixels, based on the condition-satisfactory frequency transform coefficients;
a limit processing unit that uses each limit value included in the selected limit value group to execute a limit process for limiting the value of the frequency transform coefficient output by the frequency transform unit;
an encoding unit that encodes the frequency transform coefficient after the limiting process has been performed as a fixed-length code,
In the limiting process for the condition-satisfactory frequency transform coefficients included in the frequency transform coefficients, the limit processing unit uses a value smaller than a limit value included in the selected limit value group to limit the condition-satisfactory frequencies. An encoding program characterized by causing a process to be performed that limits the values of transform coefficients.
JP2018216287A 2018-11-19 2018-11-19 Encoding device, encoding method and encoding program Active JP7259280B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018216287A JP7259280B2 (en) 2018-11-19 2018-11-19 Encoding device, encoding method and encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018216287A JP7259280B2 (en) 2018-11-19 2018-11-19 Encoding device, encoding method and encoding program

Publications (2)

Publication Number Publication Date
JP2020088467A JP2020088467A (en) 2020-06-04
JP7259280B2 true JP7259280B2 (en) 2023-04-18

Family

ID=70909018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018216287A Active JP7259280B2 (en) 2018-11-19 2018-11-19 Encoding device, encoding method and encoding program

Country Status (1)

Country Link
JP (1) JP7259280B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001352544A (en) 2000-06-08 2001-12-21 Matsushita Graphic Communication Systems Inc Image coder and image coding method
JP2005176169A (en) 2003-12-15 2005-06-30 Matsushita Electric Ind Co Ltd Video coding method and apparatus
JP2012244397A (en) 2011-05-19 2012-12-10 Sony Corp Image processing apparatus and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07143485A (en) * 1993-11-16 1995-06-02 Kawasaki Steel Corp Image data coder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001352544A (en) 2000-06-08 2001-12-21 Matsushita Graphic Communication Systems Inc Image coder and image coding method
JP2005176169A (en) 2003-12-15 2005-06-30 Matsushita Electric Ind Co Ltd Video coding method and apparatus
JP2012244397A (en) 2011-05-19 2012-12-10 Sony Corp Image processing apparatus and method

Also Published As

Publication number Publication date
JP2020088467A (en) 2020-06-04

Similar Documents

Publication Publication Date Title
US10638162B2 (en) Coding method and decoding processing method
US8103111B2 (en) Coding method, electronic camera, recording medium storing coded program, and decoding method
JP5027936B2 (en) Method, recording medium, program and processing device for adaptive scan ordering.
US8509547B2 (en) Scan conversion apparatus, image encoding apparatus, and control method therefor
WO2019142821A1 (en) Encoder, decoder, encoding method, decoding method, encoding program, and decoding program
JP4656912B2 (en) Image encoding device
JP7092920B2 (en) Image decoder and program
KR20210024624A (en) Image encoding method, decoding method, encoder and decoder
US9736485B2 (en) Encoding apparatus, encoding method, and image capture apparatus
WO2006046550A1 (en) Image encoding method and device, image decoding method, and device
US20200252652A1 (en) Encoding device, decoding device, encoding method, and decoding method
JP7259280B2 (en) Encoding device, encoding method and encoding program
JP6946671B2 (en) Image processing device and image processing method
US20150098512A1 (en) Image processing apparatus and method thereof
US10277902B2 (en) Image encoding apparatus and control method thereof
JP2021072485A (en) Encoding device, decoding device, encoding method, decoding method, encoding program and decoding program
US9020289B2 (en) Image processing apparatus and image processing method for compressing image data by combining spatial frequency conversion, quantization, and entropy coding
JP4749508B2 (en) Image decoding method
JP2003224868A (en) Image compression apparatus, image compression method, image compression program, and image expansion program
JP7444599B2 (en) Intra prediction device, image encoding device, image decoding device, and program
JP7451131B2 (en) Image encoding device, image encoding method, and program
WO2016047250A1 (en) Signal processing apparatus, imaging apparatus and signal processing method
JP4667424B2 (en) Image decoding device
WO2020188875A1 (en) Encoding device, decoding device, encoding method, decoding method, encoding program, and decoding program
JP4667423B2 (en) Image decoding device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20200107

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20200226

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210806

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220906

RD13 Notification of appointment of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7433

Effective date: 20221027

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221107

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: 20230307

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230320

R151 Written notification of patent or utility model registration

Ref document number: 7259280

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151