JP2009290556A - Image information processing apparatus and image information processing method - Google Patents

Image information processing apparatus and image information processing method Download PDF

Info

Publication number
JP2009290556A
JP2009290556A JP2008140993A JP2008140993A JP2009290556A JP 2009290556 A JP2009290556 A JP 2009290556A JP 2008140993 A JP2008140993 A JP 2008140993A JP 2008140993 A JP2008140993 A JP 2008140993A JP 2009290556 A JP2009290556 A JP 2009290556A
Authority
JP
Japan
Prior art keywords
block
data
unit
pixel data
sub
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.)
Withdrawn
Application number
JP2008140993A
Other languages
Japanese (ja)
Inventor
Fumiaki Kato
文昭 加藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2008140993A priority Critical patent/JP2009290556A/en
Publication of JP2009290556A publication Critical patent/JP2009290556A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image information processing apparatus and an image information processing method by which quantization processing with reduced deterioration of image quality can be performed and data processing can be performed at high speed. <P>SOLUTION: The apparatus includes a blocking section 132 which divides pixel data outputted from an imaging element according to a predetermined number to generate blocks, a division processing section 134 which divides the blocks into subblocks according to a level change of the pixel data in the respective blocks, a quantization section 136 which quantizes the pixel data by a quantization word length determined according to a change amount of a pixel data level for each subblock thus generated and a section length of each subblock, and generates quantization data, and a compression data generating section 138 which aggregates the information on the level change of the pixel data in the blocks and the quantization data and generates compression data. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像情報処理装置及び画像情報処理方法に関する。   The present invention relates to an image information processing apparatus and an image information processing method.

デジタルカメラ、ビデオカメラ等の撮像装置は、CCD、CMOS等の撮像素子などを用いて被写体をデジタルデータに変換する。近年、撮像素子は多画素化が進み、撮像装置は高性能化が要求されている。撮像素子の多画素化が進むと、撮像装置内における撮像信号の処理負荷が増大する。従って、撮像装置は、ユーザーにとって操作性がスムーズとなるように、データを高速処理することが求められている。   An imaging device such as a digital camera or a video camera converts a subject into digital data using an imaging device such as a CCD or CMOS. In recent years, the number of pixels of an image sensor has been increased, and an image pickup apparatus is required to have high performance. As the number of pixels of the image sensor increases, the processing load of the image signal in the image capturing apparatus increases. Therefore, the imaging apparatus is required to process data at high speed so that operability is smooth for the user.

また、CCD、CMOS等の撮像素子から出力された信号は、不可逆圧縮処理や信号処理されて記録媒体に記録される場合もあるが、信号処理を施さずにRAWデータとして記録媒体に記録される場合もある。この場合、撮像装置の内部バスに伝送されるデータ量は多大であり、記録媒体への書き込み処理、記録媒体からの読み出し処理にかかる時間が長時間化する。例えば、特許文献1及び2では、撮像装置においてRAWデータを処理する技術について開示されている。   In addition, a signal output from an image sensor such as a CCD or CMOS may be recorded on a recording medium after being subjected to irreversible compression processing or signal processing, but is recorded as RAW data on the recording medium without performing signal processing. In some cases. In this case, the amount of data transmitted to the internal bus of the imaging apparatus is large, and the time required for the writing process to the recording medium and the reading process from the recording medium becomes longer. For example, Patent Documents 1 and 2 disclose a technique for processing RAW data in an imaging apparatus.

特開平5−191770号公報JP-A-5-191770 特開2007−228515号公報JP 2007-228515 A

例えば、特許文献1では、撮像装置の内部バスにおけるデータ伝送の際、RAWデータを可逆圧縮して伝送する技術が開示されている。しかし、可逆圧縮したとしても、例えば、ハフマン符号化などは可変長符号化処理となるため、内部バスにおける帯域を一定に維持することは困難である。また、可変長符号化処理では、帯域削減の効果を常時得ることができないという問題があった。   For example, Patent Document 1 discloses a technique for reversibly compressing and transmitting RAW data during data transmission on an internal bus of an imaging apparatus. However, even if lossless compression is performed, for example, Huffman coding or the like is variable length coding processing, so it is difficult to maintain a constant bandwidth on the internal bus. Further, the variable length coding process has a problem that the effect of bandwidth reduction cannot always be obtained.

特許文献2では、記録媒体で読み書きされる画像データが圧縮される。この圧縮処理では、所定数の画素データからなるブロック内の画素データの最大値及び最小値と、ブロック内での位置情報と、ブロック内の画素データから最小値を減算した減算値が量子化される。特許文献2の圧縮処理は、固定長符号化処理であり、圧縮効率が8bit/pixの場合では、1画素あたり7ビットの量子化で達成可能であった。   In Patent Document 2, image data read / written on a recording medium is compressed. In this compression processing, the maximum and minimum values of pixel data in a block made up of a predetermined number of pixel data, position information in the block, and a subtraction value obtained by subtracting the minimum value from the pixel data in the block are quantized. The The compression process of Patent Document 2 is a fixed-length encoding process, and can be achieved by quantization of 7 bits per pixel when the compression efficiency is 8 bits / pix.

しかし、圧縮処理において、圧縮効率を更に向上させるため単純に量子化語長を4bitなどに下げるだけでは、波形の変動の激しい部分が上記ブロック内に存在した場合、量子化ノイズが顕在化するという問題があった。例えば、被写体が黒い幕を背景にして立った人物であって、暗い背景と明るい人物の肌色とのグラデーション変化のある境界部分が上記圧縮処理対象となる1つのブロック内に存在する場合、肌色部分が段差となる等の量子化ノイズが目立ってしまう。   However, in the compression process, simply reducing the quantization word length to 4 bits or the like to further improve the compression efficiency means that if there is a part where the waveform fluctuates significantly in the block, quantization noise becomes obvious. There was a problem. For example, if the subject is a person standing against a black curtain and a boundary portion having a gradation change between a dark background and a bright person's skin color is present in one block to be compressed, the skin color portion Quantization noise such as a step becomes conspicuous.

そこで、本発明は、上記問題に鑑みてなされたものであり、本発明の目的とするところは、画質劣化を低減させた量子化処理ができ、更にデータ処理の高速化を図ることが可能な、新規かつ改良された画像情報処理装置及び画像情報処理方法を提供することにある。   Therefore, the present invention has been made in view of the above problems, and an object of the present invention is to enable quantization processing with reduced image quality degradation and to further speed up data processing. Another object of the present invention is to provide a new and improved image information processing apparatus and image information processing method.

上記課題を解決するために、本発明のある観点によれば、撮像素子から出力された画素データを所定数毎に分割しブロックを生成するブロック化部と、ブロック内の画素データのレベル変化に応じてブロックを分割しサブブロックを生成する分割処理部と、生成されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成する量子化部と、ブロック内の画素データのレベル変化に関する情報と量子化データを集約し圧縮データを生成する圧縮データ生成部とを有する画像情報処理装置が提供される。   In order to solve the above-described problem, according to an aspect of the present invention, a block forming unit that generates a block by dividing pixel data output from an image sensor every predetermined number, and changes in the level of pixel data in the block Pixel data with a quantization word length determined according to the amount of change in the pixel data level and the length of the sub-block section for each generated sub-block An image information processing apparatus is provided that includes a quantization unit that quantizes data and generates quantized data, and a compressed data generation unit that aggregates quantized data and information related to level changes of pixel data in a block to generate compressed data The

上記分割処理部は、ブロック内の画素データレベルの振幅値と変化量に応じて、ブロックを分割しサブブロックを生成してもよい。   The division processing unit may divide the block and generate sub-blocks according to the amplitude value and change amount of the pixel data level in the block.

上記分割処理部は、ブロック内の画素データレベルの振幅値と変化量に基づいてブロックを分割する数及び分割位置を決定する分割決定部と、決定された分割数及び分割位置に応じて、ブロックを分割しサブブロックを生成するサブブロック生成部とを有してもよい。   The division processing unit includes a division determination unit that determines the number and division position for dividing a block based on the amplitude value and change amount of the pixel data level in the block, and a block according to the determined division number and division position. And a sub-block generating unit that generates sub-blocks.

また、上記課題を解決するために、本発明の別の観点によれば、圧縮データから、所定数の画素データからなるブロック内の画素データのレベル変化に関する情報と、ブロックが分割されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データが量子化された量子化データを抽出する抽出部と、レベル変化に関する情報に基づいて、量子化データを逆量子化し逆量子化画素データを生成する逆量子化部とを有する画像情報処理装置が提供される。   In order to solve the above-described problem, according to another aspect of the present invention, from compressed data, information on a level change of pixel data in a block made up of a predetermined number of pixel data, and a sub-block into which the block is divided Based on information on level change, an extraction unit that extracts quantized data in which pixel data is quantized with a quantization word length determined according to the amount of change in pixel data level and the length of the sub-block interval Thus, there is provided an image information processing apparatus having an inverse quantization unit that inversely quantizes quantized data and generates inversely quantized pixel data.

上記レベル変化に関する情報は、画素データのレベルの振幅値と変化量に関する情報であってもよい。   The information related to the level change may be information related to the amplitude value and the change amount of the level of the pixel data.

また、上記課題を解決するために、本発明の別の観点によれば、撮像素子から出力された画素データを所定数毎に分割しブロックを生成するステップと、ブロック内の画素データのレベル変化に応じてブロックを分割しサブブロックを生成するステップと、生成されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成するステップと、ブロック内の画素データのレベル変化に関する情報と量子化データを集約し圧縮データを生成するステップとを有する画像情報処理方法が提供される。   In order to solve the above-described problem, according to another aspect of the present invention, a step of generating a block by dividing pixel data output from an image sensor into a predetermined number, and a level change of pixel data in the block The block is divided according to the step of generating the sub-block, and the pixel data is converted with the quantization word length determined according to the change amount of the pixel data level and the length of the sub-block section for each generated sub-block. There is provided an image information processing method including a step of quantizing and generating quantized data, and a step of aggregating information on level change of pixel data in a block and quantized data to generate compressed data.

また、上記課題を解決するために、本発明の別の観点によれば、圧縮データから、所定数の画素データからなるブロック内の画素データのレベル変化に関する情報と、ブロックが分割されたサブブロック毎に画素データレベルの変化量及びサブブロックの区間の長さに応じて決定された量子化語長で画素データが量子化された量子化データを抽出するステップと、レベル変化に関する情報に基づいて、量子化データを逆量子化し逆量子化画素データを生成するステップとを有する画像情報処理方法が提供される。   In order to solve the above-described problem, according to another aspect of the present invention, from compressed data, information on a level change of pixel data in a block made up of a predetermined number of pixel data, and a sub-block into which the block is divided Extracting quantized data in which pixel data is quantized with a quantized word length determined according to the amount of change in pixel data level and the length of a sub-block interval for each, and based on information on level change An image information processing method comprising: dequantizing the quantized data to generate dequantized pixel data.

本発明によれば、画質劣化を低減させた量子化処理ができ、更にデータ処理の高速化を図ることができる。   According to the present invention, quantization processing with reduced image quality degradation can be performed, and further, data processing speed can be increased.

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。   Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.

まず、本発明の第1の実施形態に係る撮像装置100について説明する。図1は、本実施形態に係る撮像装置100を示すブロック図である。本実施形態に係る撮像装置100は、例えばデジタルスチルカメラ、デジタルビデオカメラなどであり、被写体像をデジタルデータとして記録することができる。   First, the imaging device 100 according to the first embodiment of the present invention will be described. FIG. 1 is a block diagram illustrating an imaging apparatus 100 according to the present embodiment. The imaging apparatus 100 according to this embodiment is, for example, a digital still camera, a digital video camera, or the like, and can record a subject image as digital data.

撮像装置100は、図1に示すように、例えば、撮像素子101、AFE回路102、デジタル画像処理部103、SDRAM104、ROM105及びストレージデバイス106等を備えている。
また、デジタル画像処理部103は、カメラ信号前処理部111、カメラ信号処理部112、解像度変換部113、JPEGエンジン114、CPU115、ビデオ出力エンコーダ116及びSDRAMコントローラ117などを有する。これらの各構成要素は、内部バス118によって相互に接続されている。さらに、本実施形態のデジタル画像処理部103は、RAW圧縮部121及びRAW伸張部122を有する。
As shown in FIG. 1, the imaging apparatus 100 includes, for example, an imaging element 101, an AFE circuit 102, a digital image processing unit 103, an SDRAM 104, a ROM 105, a storage device 106, and the like.
The digital image processing unit 103 includes a camera signal preprocessing unit 111, a camera signal processing unit 112, a resolution conversion unit 113, a JPEG engine 114, a CPU 115, a video output encoder 116, an SDRAM controller 117, and the like. Each of these components is connected to each other by an internal bus 118. Furthermore, the digital image processing unit 103 according to the present embodiment includes a RAW compression unit 121 and a RAW expansion unit 122.

撮像素子101は、例えばCCD(Charge Coupled Devices)、CMOS(Complementary Metal Oxide Semiconductor)撮像素子などの固体撮像素子であり、図示しないレンズブロック(光学系)を通じて被写体から入射された光を電気信号に変換する。   The imaging device 101 is a solid-state imaging device such as a CCD (Charge Coupled Devices) or CMOS (Complementary Metal Oxide Semiconductor) imaging device, and converts light incident from a subject through an unillustrated lens block (optical system) into an electrical signal. To do.

AFE回路102は、撮像素子101から出力された画像信号に対して、CDS処理によりS/N(Signal/Noise)比を良好に保つようにサンプルホールドを行う。AFE回路102は、AGC処理により利得を制御し、A/D(Analog/Digital)変換を行ってデジタル画像信号を出力する。   The AFE circuit 102 performs sample hold on the image signal output from the image sensor 101 so as to maintain a good S / N (Signal / Noise) ratio by CDS processing. The AFE circuit 102 controls the gain by AGC processing, performs A / D (Analog / Digital) conversion, and outputs a digital image signal.

デジタル画像処理部103は、例えば、SoC(System on a Chip)回路などとして形成される。デジタル画像処理部103において、カメラ信号前処理部111は、AFE回路102から供給された画像信号に対して、撮像素子101における欠陥画素の信号補正処理、レンズの周辺光量落ちを補正するシェーディング処理などを施す。また、カメラ信号前処理部111は、処理後の信号をRAWデータとして出力する。   The digital image processing unit 103 is formed as a SoC (System on a Chip) circuit, for example. In the digital image processing unit 103, the camera signal pre-processing unit 111 performs a signal correction process for a defective pixel in the image sensor 101, a shading process for correcting a decrease in the amount of peripheral light of the lens, and the like on the image signal supplied from the AFE circuit 102. Apply. Further, the camera signal preprocessing unit 111 outputs the processed signal as RAW data.

RAW圧縮部121は、カメラ信号前処理部111からのRAWデータを、後述する圧縮方法により圧縮し、SDRAMコントローラ117を介して、SDRAM104に供給する。
RAW伸張部122は、SDRAM104からSDRAMコントローラ117を介して読み出した、圧縮されたRAWデータを、後述する方法により伸張して、カメラ信号処理部112に出力する。
The RAW compression unit 121 compresses the RAW data from the camera signal preprocessing unit 111 by a compression method described later, and supplies the compressed RAW data to the SDRAM 104 via the SDRAM controller 117.
The RAW decompression unit 122 decompresses the compressed RAW data read from the SDRAM 104 via the SDRAM controller 117 by a method described later and outputs the decompressed data to the camera signal processing unit 112.

カメラ信号処理部112は、RAW伸張部122からRAWデータにデモザイク処理を施す。その後、カメラ信号処理部112は、AF(Auto Focus)、AE(Auto Exposure)、ホワイトバランス制御などのための信号検波処理や、ホワイトバランス調整に代表される信号補正処理など、いわゆるカメラ信号処理、またはその処理の一部を実行する。さらに、カメラ信号処理部112は、信号補正後の画像データを、例えば4:2:2などの所定フォーマットの輝度信号(Y)と色差信号(R−Y,B−Y)に変換する。   The camera signal processing unit 112 performs demosaic processing on the RAW data from the RAW expansion unit 122. Thereafter, the camera signal processing unit 112 performs so-called camera signal processing such as signal detection processing for AF (Auto Focus), AE (Auto Exposure), white balance control, and signal correction processing represented by white balance adjustment, Or a part of the process is executed. Furthermore, the camera signal processing unit 112 converts the image data after signal correction into a luminance signal (Y) and color difference signals (RY, BY) in a predetermined format such as 4: 2: 2.

解像度変換部113は、カメラ信号処理部112で処理された画像データ、又はJPEGエンジン114で伸張復号化された画像データの入力を受けて、所定の解像度に変換する。   The resolution conversion unit 113 receives image data processed by the camera signal processing unit 112 or image data decompressed and decoded by the JPEG engine 114 and converts the image data into a predetermined resolution.

JPEGエンジン114は、解像度変換部113で処理された画像データを圧縮符号化し、JPEG方式の符号化データを生成する。また、JPEGエンジン114は、ストレージデバイス106から読み出されたJPEG画像データを伸張復号化する。なお、デジタル画像処理部103には、このJPEGエンジン114以外の他の静止画圧縮方式、又は動画圧縮方式のエンコード/デコードエンジンが設けられてもよい。   The JPEG engine 114 compresses and encodes the image data processed by the resolution converter 113 to generate JPEG encoded data. Further, the JPEG engine 114 decompresses and decodes JPEG image data read from the storage device 106. The digital image processing unit 103 may be provided with an encoding / decoding engine other than the JPEG engine 114 using a still image compression method or a moving image compression method.

CPU115は、ROM105に格納されたプログラムを実行することにより、デジタル画像処理部103及び撮像装置100全体を統括的に制御し、また、その制御のための各種演算を実行する。   The CPU 115 controls the entire digital image processing unit 103 and the entire imaging apparatus 100 by executing a program stored in the ROM 105, and executes various calculations for the control.

ビデオ出力エンコーダ116は、例えばNTSC(National Television Standards Committee)エンコーダなどである。ビデオ出力エンコーダ116は、解像度変換部113などから出力された画像データを基に、モニタ表示用の画像信号を生成し、モニタ(図示せず。)又はビデオ出力端子26aに出力する。   The video output encoder 116 is, for example, an NTSC (National Television Standards Committee) encoder. The video output encoder 116 generates an image signal for monitor display based on the image data output from the resolution conversion unit 113 and the like, and outputs the image signal to a monitor (not shown) or the video output terminal 26a.

SDRAMコントローラ117は、SDRAM104に対するインタフェースブロックであり、アドレスデコーダなどを有する。SDRAMコントローラ117は、CPU115からの制御信号に従って、SDRAM104の書き込み及び読み出し動作を制御する。   The SDRAM controller 117 is an interface block for the SDRAM 104 and includes an address decoder and the like. The SDRAM controller 117 controls writing and reading operations of the SDRAM 104 according to a control signal from the CPU 115.

SDRAM104は、DDR(Double Data Rate)SDRAMなどの揮発性のメモリである。SDRAM104は、デジタル画像処理部103におけるデータ処理のためのワークエリアである。SDRAM104は、キャプチャデータエリア104aと、JPEG符号エリア104bと、CPUワークエリア104cなどを含む。キャプチャデータエリア104aは、撮像素子101からキャプチャされたデータ、即ち、RAW圧縮部121で圧縮されたRAWデータを一時的に格納する。JPEG符号エリア104bは、JPEGエンジン114により符号化された画像データや、その符号化・復号化処理で利用されるデータなどを一時的に格納する。CPUワークエリア104cは、CPU115の処理で利用されるデータを一時的に格納する。   The SDRAM 104 is a volatile memory such as a DDR (Double Data Rate) SDRAM. The SDRAM 104 is a work area for data processing in the digital image processing unit 103. The SDRAM 104 includes a capture data area 104a, a JPEG code area 104b, a CPU work area 104c, and the like. The capture data area 104 a temporarily stores data captured from the image sensor 101, that is, RAW data compressed by the RAW compression unit 121. The JPEG code area 104b temporarily stores image data encoded by the JPEG engine 114, data used in the encoding / decoding process, and the like. The CPU work area 104c temporarily stores data used in the processing of the CPU 115.

ROM105は、CPU115が実行するプログラムや各種データを保持する。ROM105は、例えば、EEPROM(Electronically Erasable and Programmable ROM)、フラッシュメモリなどの不揮発性メモリである。   The ROM 105 holds programs executed by the CPU 115 and various data. The ROM 105 is a nonvolatile memory such as an EEPROM (Electronically Erasable and Programmable ROM) or a flash memory.

ストレージデバイス106は、符号化された画像データのファイルを記録するためのデバイスである。ストレージデバイス106は、例えば、フラッシュメモリ、光ディスク、磁気テープなどの記録媒体と、記録媒体の記録/再生ドライブなどからなる。   The storage device 106 is a device for recording an encoded image data file. The storage device 106 includes, for example, a recording medium such as a flash memory, an optical disk, and a magnetic tape, and a recording / reproducing drive for the recording medium.

上記のような撮像装置100において、撮像素子101による撮像信号は、順次AFE回路102に供給され、CDS処理やAGC処理が施された後、デジタル信号に変換されて、デジタル画像処理部103のカメラ信号前処理部111に供給される。カメラ信号前処理部111では、入力された画像信号に対して、欠陥画素補正やシェーディング補正などを施したRAWデータが生成され、このRAWデータは、RAW圧縮部121により圧縮された後、SDRAM104に一旦書き込まれる。   In the imaging apparatus 100 as described above, an imaging signal from the imaging element 101 is sequentially supplied to the AFE circuit 102, subjected to CDS processing and AGC processing, converted into a digital signal, and the camera of the digital image processing unit 103. The signal is supplied to the signal preprocessing unit 111. The camera signal pre-processing unit 111 generates RAW data in which defective pixel correction or shading correction is performed on the input image signal. This RAW data is compressed by the RAW compression unit 121 and then stored in the SDRAM 104. Once written.

上記RAWデータは、SDRAM104から読み出されると、RAW伸張部122により伸張された後、カメラ信号処理部112により各種画質補正処理が施される。処理後の画像データは、例えばSDRAM104に一旦格納された後、解像度変換部113により、表示に適した解像度のデータに変換され、さらに例えばSDRAM104に格納された後、ビデオ出力エンコーダ116に供給される。これにより、カメラスルー画像がモニタに表示される。   When the RAW data is read from the SDRAM 104, it is expanded by the RAW expansion unit 122 and then subjected to various image quality correction processes by the camera signal processing unit 112. The processed image data is temporarily stored in the SDRAM 104, for example, and then converted into data having a resolution suitable for display by the resolution converter 113, and further stored in the SDRAM 104, for example, and then supplied to the video output encoder 116. . Thereby, a camera through image is displayed on the monitor.

また、図示しない入力部などを通じて画像の記録が要求されると、解像度変換部113は、カメラ信号処理部112で処理された画像データを、必要に応じて記録用に設定された解像度のデータに変換して、例えばSDRAM104に一旦格納する。JPEGエンジン114は、画像データを圧縮符号化して、符号化データを生成する。符号化データは、例えばSDRAM104に一旦記録された後、ストレージデバイス106に記録される。   In addition, when image recording is requested through an input unit (not shown), the resolution conversion unit 113 converts the image data processed by the camera signal processing unit 112 into data having a resolution set for recording as necessary. For example, the data is converted and temporarily stored in the SDRAM 104. The JPEG engine 114 compresses and encodes image data to generate encoded data. For example, the encoded data is once recorded in the SDRAM 104 and then recorded in the storage device 106.

また、ストレージデバイス106に記録された画像データ(符号化データ)は、JPEGエンジン114で伸張復号化され、解像度変換部113で解像度変換される。その後、画像データは、ビデオ出力エンコーダ116に出力されることで、モニタに画像を表示させることができる。   The image data (encoded data) recorded in the storage device 106 is decompressed and decoded by the JPEG engine 114 and the resolution is converted by the resolution converter 113. Thereafter, the image data is output to the video output encoder 116 so that the image can be displayed on the monitor.

本実施形態のデジタル画像処理部103には、カメラ信号前処理部111から内部バス118に対する画像データの入力位置に、RAWデータを圧縮するRAW圧縮部121が設けられる。これにより、内部バス118を通じてSDRAM104に伝送されるRAWデータのデータ量を低減することができる。また、内部バス118からカメラ信号処理部112に対する画像データの入力位置に、RAWデータを伸張するRAW伸張部122が設けられる。これにより、SDRAM104からカメラ信号処理部112に伝送されるRAWデータのデータ量を低減することができる。   The digital image processing unit 103 according to the present embodiment is provided with a RAW compression unit 121 that compresses RAW data at the input position of image data from the camera signal preprocessing unit 111 to the internal bus 118. Thereby, the amount of RAW data transmitted to the SDRAM 104 through the internal bus 118 can be reduced. In addition, a RAW expansion unit 122 that expands RAW data is provided at an input position of image data from the internal bus 118 to the camera signal processing unit 112. As a result, the amount of RAW data transmitted from the SDRAM 104 to the camera signal processing unit 112 can be reduced.

本実施形態によれば、撮像動作中の内部バス118の伝送負荷を軽減し、SDRAM104に対する書き込み/読み出し処理に要する時間を短縮することが可能となる。特に、圧縮/伸張の処理をできるだけ簡単にすることで、処理時間の短縮効果を上げることができる。また、バス上の伝送周波数を低減して、消費電力を抑制することもできる。   According to the present embodiment, the transmission load on the internal bus 118 during the imaging operation can be reduced, and the time required for the write / read processing for the SDRAM 104 can be shortened. In particular, by simplifying the compression / decompression process as much as possible, the effect of shortening the processing time can be increased. In addition, power consumption can be suppressed by reducing the transmission frequency on the bus.

また、本実施形態によれば、SDRAM104の容量を小さくすることができる。更に、SDRAM104の領域を他の処理に利用したり、複数フレーム分のRAWデータを格納して、連写できる枚数を増やしたり、あるいは連写速度を向上させたりなど、高画質化・高機能化に寄与する。従って、撮像処理やデータ記録処理に必要な時間を短くすることができる、高性能かつ小型、低コストの撮像装置100を実現できる。   Further, according to the present embodiment, the capacity of the SDRAM 104 can be reduced. In addition, use of the SDRAM 104 area for other processing, storing RAW data for multiple frames, increasing the number of images that can be shot continuously, or improving the shooting speed, etc. Contribute to. Therefore, it is possible to realize a high-performance, small, and low-cost imaging apparatus 100 that can shorten the time required for imaging processing and data recording processing.

また、RAW圧縮部121によるRAWデータの圧縮処理では、可逆圧縮手法を用いることで、RAWデータの品質を完全に保持できるが、非可逆圧縮であっても、圧縮歪みの発生量が、輝度/色差信号に変換された時点で、肉眼では感知できない程度となるならば、画質としては許容できる。一般に、輝度/色差信号に変換された時点のPSNR(Peak Signal to Noise Ratio)が50dB〜40dB程度であれば、圧縮歪みは許容されるレベルになる。   In the RAW data compression processing by the RAW compression unit 121, the quality of the RAW data can be completely retained by using a lossless compression method. If it becomes a level that cannot be detected with the naked eye when converted to a color difference signal, the image quality is acceptable. Generally, if a PSNR (Peak Signal to Noise Ratio) at the time of conversion to a luminance / color difference signal is about 50 dB to 40 dB, the compression distortion is at an acceptable level.

更に、本実施形態の撮像装置100は、RAWデータを圧縮する場合に、固定長で符号化できる。その結果、SDRAM104に対して読み書きするRAWデータの帯域を一定に保つことができ、内部バス118における伝送負荷を安定的に低減できる。また、カメラ信号処理部112におけるRAWデータの取り扱い(例えばSDRAM104からの読み出し制御処理)や、内部バス118を通じたRAWデータの伝送制御処理を、単純化することもできる。   Furthermore, when the RAW data is compressed, the imaging apparatus 100 according to the present embodiment can perform encoding with a fixed length. As a result, the bandwidth of RAW data read / written to / from the SDRAM 104 can be kept constant, and the transmission load on the internal bus 118 can be stably reduced. In addition, handling of RAW data in the camera signal processing unit 112 (for example, reading control processing from the SDRAM 104) and transmission control processing of RAW data through the internal bus 118 can be simplified.

例えば、可変長で符号化した場合、圧縮されたRAWデータをSDRAM104から読み出す際に、バースト状にアクセスしなければならない場合が多い。一方、固定長で符号化することにより、任意の位置のRAWデータのSDRAM104上のアドレスを簡単に計算し、読み出すことができる。従って、カメラ信号処理部112は、1Hの数分の一程度のディレイラインしか持たずに、全画面を部分的に(例えば、縦方向の短冊状に)処理するとしてもよい。また、デジタル画像処理部103内のDMA(Direct Memory Access)コントローラによりアクセスすることも可能となる。   For example, in the case of encoding with variable length, when reading the compressed RAW data from the SDRAM 104, it is often necessary to access in burst form. On the other hand, by encoding with a fixed length, the address on the SDRAM 104 of the RAW data at an arbitrary position can be easily calculated and read out. Therefore, the camera signal processing unit 112 may process the entire screen partially (for example, in the form of a strip in the vertical direction) with only a delay line that is about a fraction of 1H. Further, it can be accessed by a DMA (Direct Memory Access) controller in the digital image processing unit 103.

以下では、本実施形態の撮像装置100のRAW圧縮部121の構成について詳細に説明する。本実施形態の撮像装置100は、固定長の符号化が可能で、かつ、画像品質を良好に保つことができ、比較的簡単な処理で実現できる非可逆圧縮/伸張方法が用いられる。   Below, the structure of the RAW compression part 121 of the imaging device 100 of this embodiment is demonstrated in detail. The imaging apparatus 100 according to the present embodiment uses a lossy compression / decompression method that can perform fixed-length encoding, maintain good image quality, and can be realized with relatively simple processing.

なお、以下の例では、RAWデータ信号を1画素(ピクセル)当たり14ビットとする。また、例えば図6に示すように、同一色成分を持つ水平方向の20画素分を、1ブロックの符号化データに変換する。図6は、ベイヤ配列と抽出された同色1ラインを示す模式図である。量子化語長は、例えば2〜4ビットの可変とする。本実施形態のRAW圧縮部121は、20画素を1ブロックとして、この1ブロックを128ビットの固定長に圧縮する。その結果、1画素当たり6.4ビットとなる。通常、14ビットのデータは、20画素を1ブロックとすると、RAWデータを圧縮しない場合、1ブロックに対応するデータ量は280ビットとなる。一方、本実施形態によれば、280ビットのデータ量を128ビット分に圧縮でき、データ量を約46%に低減する圧縮率を達成できる。   In the following example, the raw data signal is 14 bits per pixel. For example, as shown in FIG. 6, 20 pixels in the horizontal direction having the same color component are converted into encoded data of one block. FIG. 6 is a schematic diagram showing a Bayer array and one extracted same color line. The quantization word length is variable, for example, 2 to 4 bits. The RAW compression unit 121 of this embodiment takes 20 pixels as one block, and compresses this one block to a fixed length of 128 bits. As a result, there are 6.4 bits per pixel. Normally, if 14-bit data has 20 pixels as one block, the amount of data corresponding to one block is 280 bits when RAW data is not compressed. On the other hand, according to the present embodiment, the data amount of 280 bits can be compressed to 128 bits, and a compression rate that reduces the data amount to about 46% can be achieved.

図2は、本実施形態に係るRAW圧縮部121を示すブロック図である。
図2に示すように、RAW圧縮部121は、折れ線圧縮部131、ブロック化部132、バッファ133、ブロック分割数決定部134、減算部135、量子化部136、量子化データバッファ137及びパッキング部138などを有する。
FIG. 2 is a block diagram showing the RAW compression unit 121 according to the present embodiment.
As shown in FIG. 2, the RAW compressing unit 121 includes a polygonal line compressing unit 131, a blocking unit 132, a buffer 133, a block division number determining unit 134, a subtracting unit 135, a quantizing unit 136, a quantized data buffer 137, and a packing unit. 138 and the like.

折れ線圧縮部131は、入力された14ビットのRAWデータを、折れ線を用いた近似により10ビットのデータに非線形で圧縮する。折れ線圧縮部131は、この後の圧縮手順の前に、できるだけ階調を下げておくことで、全体的な圧縮効率を向上させることを目的として設けられる。目的とする圧縮率によっては、省略されてもよい。なお、この場合には、後の図11で説明するRAW伸張部122の出力段に設けられる逆折れ線伸張部192についても、省略できる。   The polygonal line compression unit 131 nonlinearly compresses the input 14-bit RAW data into 10-bit data by approximation using a polygonal line. The polygonal line compression unit 131 is provided for the purpose of improving the overall compression efficiency by reducing the gradation as much as possible before the subsequent compression procedure. Depending on the target compression rate, it may be omitted. In this case, the reverse broken line extension unit 192 provided at the output stage of the RAW extension unit 122 described later with reference to FIG. 11 can also be omitted.

ここで、図9は、折れ線圧縮部131で用いられる折れ線の例を示すグラフである。
図9に示すグラフによって入力データの階調を変換する。この例では、人間の視覚特性に合わせて、入力データが小さいほど、すなわち暗いほど(または色がうすいほど)、高い階調を割り当てるようにしている。このような折れ線は、例えば色成分ごとに用意し、入力画素の色成分ごとに切り換えて利用してもよい。
Here, FIG. 9 is a graph showing an example of a broken line used in the broken line compression unit 131.
The gradation of the input data is converted by the graph shown in FIG. In this example, in accordance with human visual characteristics, a higher gradation is assigned as input data is smaller, that is, darker (or lighter in color). Such a polygonal line may be prepared for each color component, for example, and used by switching for each color component of the input pixel.

折れ線圧縮部131では、例えば、このような折れ線を用いて、入力データの階調を変換した後、変換後のデータを16で除算(すなわち4ビット分下位にシフト)して、10ビットデータに圧縮する。このとき、捨てられる下位ビットは、例えば四捨五入する。なお、以上のような演算に基づく、入力データと圧縮後の出力データとを対応付けて記憶したROMテーブルを用意し、折れ線圧縮部131では、このROMテーブルに従って入出力データの変換が行われてもよい。   In the polygonal line compression unit 131, for example, after converting the gradation of the input data using such a polygonal line, the converted data is divided by 16 (that is, shifted downward by 4 bits) to become 10-bit data. Compress. At this time, the discarded lower bits are rounded off, for example. A ROM table that stores the input data and the compressed output data in association with each other based on the above calculation is prepared, and the polygonal line compression unit 131 converts the input / output data according to the ROM table. Also good.

ブロック化部132は、折れ線圧縮部131から出力されたデータを、水平方向に隣接する20画素分の同色成分画素からなるブロックに分割し、分割したブロック毎に出力する。これにより、ブロック内のデータの相関が強くなり、この後の量子化処理による画質劣化を抑制することができる。   The blocking unit 132 divides the data output from the polygonal line compression unit 131 into blocks composed of the same color component pixels for 20 pixels adjacent in the horizontal direction, and outputs the divided blocks. Thereby, the correlation of the data in a block becomes strong, and the image quality deterioration by subsequent quantization processing can be suppressed.

例えば、図6に示すようなベイヤ配列の撮像素子が用いられた場合、出力データには、R成分とGr成分の繰り返しと、B成分とGb成分の繰り返しとが、1ラインごとに出現する。例えば、ブロック化部132への入力データに、R,Gr,R,Gr,・・・,R19,Gr19のように、R成分とGr成分が繰り返し現れる場合には、R,R,R,・・・,R19,Gr,Gr,・・・,Gr19のように、同色成分の画素が20個連続して現れるように、出力順序を変換して、ブロック化する。 For example, when a Bayer array image sensor as shown in FIG. 6 is used, in the output data, the repetition of the R component and the Gr component and the repetition of the B component and the Gb component appear for each line. For example, when the R component and the Gr component repeatedly appear in the input data to the blocking unit 132 as in R 0 , Gr 0 , R 1 , Gr 1 ,..., R 19 , Gr 19 , R 0 , R 1 , R 2 ,..., R 19 , Gr 0 , Gr 1 ,..., Gr 19 , and the output order is changed so that 20 pixels of the same color component appear continuously. To block.

バッファ133は、ブロック化部132からのデータを保持する。バッファ133は、ブロック分割数決定部134において最小値が算出されるまでの間、入力データに対応するブロックを保持し遅延時間合わせをする。   The buffer 133 holds data from the blocking unit 132. The buffer 133 holds the block corresponding to the input data and adjusts the delay time until the minimum value is calculated by the block division number determination unit 134.

ブロック分割数決定部134は、ブロックを更にサブブロックに分割するための分割数や、圧縮用の要素を決定する。ブロック分割数決定部134の詳細は後述する。ブロック分割数決定部134は、分割処理部の一例である。   The block division number determination unit 134 determines the division number for further dividing the block into sub-blocks and compression elements. Details of the block division number determination unit 134 will be described later. The block division number determination unit 134 is an example of a division processing unit.

減算部135は、ブロック化部132から出力された画素データから、ブロック分割数決定部134が出力した、対応するブロック内の最小値を減算する。この減算は、1ブロック内の画素に共通するDCオフセット分を、各画素のデータから差し引くことと等価である。   The subtracting unit 135 subtracts the minimum value in the corresponding block output from the block division number determining unit 134 from the pixel data output from the blocking unit 132. This subtraction is equivalent to subtracting the DC offset common to the pixels in one block from the data of each pixel.

量子化部136は、減算部135の出力データを、ブロック分割数決定部134から出力されるシフト量に従って量子化する。本実施形態では、一例として、2〜5ビットの可変長で量子化する。   The quantization unit 136 quantizes the output data of the subtraction unit 135 according to the shift amount output from the block division number determination unit 134. In this embodiment, as an example, quantization is performed with a variable length of 2 to 5 bits.

この量子化部136としては、例えば、整数型の除算器を利用して、減算部135の出力データをシフト量で除算する。また、量子化ステップを2のべき乗に限定した場合には、右シフタを適用でき、これにより回路規模を削減することができる。なお、圧縮処理側で右シフタを利用すると、伸張処理側の逆量子化においても同様に回路規模を削減できる。
量子化データバッファ137は、量子化部136から出力される20画素分の量子化データを一時的に保持する。
For example, the quantization unit 136 divides the output data of the subtraction unit 135 by the shift amount using an integer type divider. Also, when the quantization step is limited to a power of 2, a right shifter can be applied, thereby reducing the circuit scale. If the right shifter is used on the compression processing side, the circuit scale can be similarly reduced in the inverse quantization on the decompression processing side.
The quantized data buffer 137 temporarily holds the quantized data for 20 pixels output from the quantizing unit 136.

パッキング部138は、量子化データバッファ137及びブロック分割数決定部134からの出力データを利用して、1ブロック当たり128ビットの圧縮データにパッキングする。ブロック分割数決定部134からの出力データには、ブロック内の画素データの最小値、シフト量、サブブロックの座標(位置情報)、量子化データ20画素分及びどの形式で圧縮したかという圧縮タイプを示すフラグを図10に示すようにパッキングする。これにより、280ビットのデータ量を128ビット分に圧縮できる。パッキング部138は、圧縮データ生成部の一例である。   The packing unit 138 uses the output data from the quantized data buffer 137 and the block division number determination unit 134 to pack into compressed data of 128 bits per block. The output data from the block division number determination unit 134 includes a compression type that indicates the minimum value of pixel data in the block, the shift amount, the coordinates (position information) of sub-blocks, 20 pixels of quantized data, and in which format. Are packed as shown in FIG. As a result, the data amount of 280 bits can be compressed to 128 bits. The packing unit 138 is an example of a compressed data generation unit.

次に、図3〜5を参照して、本実施形態のブロック分割数決定部134について説明する。図3は、本実施形態に係るブロック分割数決定部134を示すブロック図である。ブロック分割数決定部134は、例えば、バッファ141、ブロック分割判断部142及びブロック分割用データ生成部143からなる。   Next, the block division number determination unit 134 of this embodiment will be described with reference to FIGS. FIG. 3 is a block diagram showing the block division number determination unit 134 according to the present embodiment. The block division number determination unit 134 includes, for example, a buffer 141, a block division determination unit 142, and a block division data generation unit 143.

バッファ141は、ブロック化部132からのデータを保持する。バッファ141は、ブロック分割判断部142においてサブブロックの座標やブロック分割判断終了信号などが出力されるまでの間、入力データに対応するブロックを保持し遅延時間合わせをする。   The buffer 141 holds data from the blocking unit 132. The buffer 141 holds the block corresponding to the input data and adjusts the delay time until the block division determination unit 142 outputs the coordinates of the subblock, the block division determination end signal, and the like.

ブロック分割判断部142は、図4に示すように、例えば、最大値最小値検出部151、差分算出部152、語長検出部153、領域検出部154、アドレスカウンタ155、変化点ラッチ部156、変化点カウンタ157、タイプ判断部158及び領域2値化部159からなる。ブロック分割数決定部134は、サブブロックを生成する、又はサブブロックを生成しないという判断や、サブブロック分割座標を生成する。図4は、本実施形態に係るブロック分割判断部142を示すブロック図である。ブロック分割判断部142は、分割決定部の一例である。   As illustrated in FIG. 4, the block division determination unit 142 includes, for example, a maximum value / minimum value detection unit 151, a difference calculation unit 152, a word length detection unit 153, a region detection unit 154, an address counter 155, a change point latch unit 156, It includes a change point counter 157, a type determination unit 158, and a region binarization unit 159. The block division number determination unit 134 determines whether to generate a subblock or not to generate a subblock, and generates subblock division coordinates. FIG. 4 is a block diagram illustrating the block division determination unit 142 according to the present embodiment. The block division determination unit 142 is an example of a division determination unit.

最大値最小値検出部151は、ブロック毎に、ブロック化された水平20画素のデータのうちから最大値(MAX)及び最小値(MIN)を検出する。最大値最小値検出部151は、検出した最大値(MAX)及び最小値(MIN)を差分算出部152及び領域検出部154に出力する。   The maximum value / minimum value detection unit 151 detects the maximum value (MAX) and the minimum value (MIN) from the data of the horizontal 20 pixels that are formed into blocks for each block. The maximum value / minimum value detection unit 151 outputs the detected maximum value (MAX) and minimum value (MIN) to the difference calculation unit 152 and the region detection unit 154.

差分算出部152は、1つのブロック内の最大値(MAX)及び最小値(MIN)の差分を計算して、1つのブロックでのダイナミックレンジ(DR0)を算出する。差分算出部152は、ダイナミックレンジ(DR0)を語長検出部153に出力する。   The difference calculation unit 152 calculates the difference between the maximum value (MAX) and the minimum value (MIN) in one block and calculates the dynamic range (DR0) in one block. The difference calculation unit 152 outputs the dynamic range (DR0) to the word length detection unit 153.

語長検出部153は、ダイナミックレンジ(DR0)から、1つのブロック内に存在する画素データのダイナミックレンジの桁数を検出する。語長検出部153は、検出したダイナミックレンジの桁数(DEPTH)を出力する。   The word length detection unit 153 detects the number of digits of the dynamic range of the pixel data existing in one block from the dynamic range (DR0). The word length detector 153 outputs the number of detected dynamic range digits (DEPTH).

領域検出部154は、最大値(MAX)及び最小値(MIN)と、以下の閾値とによって、画素データの入力波形が最大と最小の両端に振れるまでの遷移区間(遷移領域)を判断する。そして、遷移領域にある画素は、AREA_DET=1とし、最小値近傍にある画素は、AREA_DET=0とし、最大値近傍にある画素は、AREA_DET=2として、AREA_DETを出力する。図7に画素データの入力値(Pi)と領域との関係を示す。図7は、画素データの入力波形を示す説明図である。   The region detection unit 154 determines a transition section (transition region) until the input waveform of the pixel data swings between the maximum and minimum ends based on the maximum value (MAX) and the minimum value (MIN) and the following threshold value. A pixel in the transition area is set to AREA_DET = 1, a pixel in the vicinity of the minimum value is set to AREA_DET = 0, and a pixel in the vicinity of the maximum value is set to AREA_DET = 2 and outputs AREA_DET. FIG. 7 shows the relationship between pixel data input values (Pi) and regions. FIG. 7 is an explanatory diagram showing an input waveform of pixel data.

閾値は、例えば下記の通りである。
MIN≦Pi<(MAX−MIN)/4+MIN ・・・ AREA_DET=0
(MAX−MIN)/4+MIN≦Pi<3×(MAX−MIN)/4+MIN ・・・ AREA_DET=1
3×(MAX−MIN)/4+MIN≦Pi≦MAX ・・・ AREA_DET=2
The threshold value is as follows, for example.
MIN ≦ Pi <(MAX−MIN) / 4 + MIN... AREA_DET = 0
(MAX−MIN) / 4 + MIN ≦ Pi <3 × (MAX−MIN) / 4 + MIN... AREA_DET = 1
3 × (MAX−MIN) / 4 + MIN ≦ Pi ≦ MAX... AREA_DET = 2

なお、この閾値は一例であり、例えば、入力波形のヒストグラムや統計情報に基づいて、波形の傾向を閾値に反映させてもよい。閾値は、2つとしたが、これに限定されない。領域検出部154は、AREA_DETを変化点ラッチ部156及び領域2値化部159に出力する。   Note that this threshold value is an example. For example, a waveform trend may be reflected on the threshold value based on a histogram or statistical information of the input waveform. Although the threshold value is two, it is not limited to this. The region detection unit 154 outputs AREA_DET to the change point latch unit 156 and the region binarization unit 159.

アドレスカウンタ155は、入力される20画素の画素信号を数え上げる(カウントアップする)。アドレスカウンタ155は、20画素が入力される毎にブロック分割判断終了信号を後段のブロック分割用データ生成部143に出力し、自分自身を0(ゼロ)にリセットする。   The address counter 155 counts up (counts up) the input pixel signals of 20 pixels. The address counter 155 outputs a block division determination end signal to the subsequent block division data generation unit 143 every time 20 pixels are input, and resets itself to 0 (zero).

変化点ラッチ部156は、領域検出部154から出力されたAREA_DETの2ビット出力から領域の変化点を検出する。そして、変化点ラッチ部156は、領域の変化点(POSn(n=0,1,2))をサブブロックの切り替え座標候補(ブロックをサブブロックに分割するときの分割座標候補)として最大3つまで保持する。変化点ラッチ部156は、検出された変化点のアドレスカウンタ155から出力されたカウンタ値(本実施形態では0〜19)を保持して、そのカウンタ値を座標候補とする。変化点ラッチ部156は、変化点のカウンタ値(POSn(n=0,1,2)=0〜19)を出力する。   The change point latch unit 156 detects the change point of the region from the 2-bit output of AREA_DET output from the region detection unit 154. Then, the change point latch unit 156 has a maximum of three area change points (POSn (n = 0, 1, 2)) as sub-block switching coordinate candidates (division coordinate candidates when the block is divided into sub-blocks). Hold up. The change point latch unit 156 holds the counter value (0 to 19 in this embodiment) output from the address counter 155 of the detected change point, and uses the counter value as a coordinate candidate. The change point latch unit 156 outputs a counter value (POSn (n = 0, 1, 2) = 0 to 19) of the change point.

変化点カウンタ157は、変化点ラッチ部156で、変化点のカウンタの値が座標候補として保持される毎に、画素信号をカウントアップする。そして、変化点カウンタ157は、サブブロックの切り替え座標候補の数を数え、保持する。変化点カウンタ157は、切り替え座標候補の数(CNT1)を出力する。   The change point counter 157 counts up the pixel signal every time the change point latch unit 156 holds the value of the change point counter as a coordinate candidate. Then, the change point counter 157 counts and holds the number of sub-block switching coordinate candidates. The change point counter 157 outputs the number of switching coordinate candidates (CNT1).

タイプ判断部158は、サブブロックを生成する、又はサブブロックを生成しないという判断をする。サブブロックを生成する、即ち1つのブロックをサブブロックに分割するという判断は、1つのブロック内の画素データのレベルの振幅と、切り換え座標候補の数に基づく。例えば、語長検出部153で検出されたダイナミックレンジの桁数(DEPTH)が、入力信号の桁数(本実施形態では10桁)に対して、同じ桁数〜1/2以下の桁数の範囲にある場合(例えば、DEPTH=10又は9など)は、1つのブロック内の画素データの変化が大きい(振幅が大きい)。   The type determination unit 158 determines to generate a sub block or not to generate a sub block. The decision to generate a sub-block, ie to divide one block into sub-blocks, is based on the amplitude of the level of pixel data in one block and the number of switching coordinate candidates. For example, the number of dynamic range digits (DEPTH) detected by the word length detection unit 153 is the same as the number of digits of the input signal (in this embodiment, 10 digits) or less than 1/2. When it is within the range (for example, DEPTH = 10 or 9), the change in pixel data in one block is large (the amplitude is large).

タイプ判断部158は、1つのブロック内の振幅が大きく、かつ、1つのブロックを4つ以内のサブブロックに分割できる場合、サブブロックを生成すると判断する。タイプ判断部158は、それ以外の場合は、サブブロックを生成しないと判断し、1つのブロックをひとまとまりとして画素データを圧縮する。タイプは、下記のように決定される。タイプは、伸張時の手順を決めるために必要であるため、圧縮データに含まれる。1つのブロックを4つ以内のサブブロックに分割できる場合とは、変化点カウンタ157から出力された値が、CNT1≦3のときである。
type00:1つのブロックのみとする場合
type01:2つのサブブロックを生成する場合
type10:3つのサブブロックを生成する場合
type11:4つのサブブロックを生成する場合
タイプ判断部158は、決定されたタイプを出力する。
Type determination unit 158 determines that a sub-block is generated when the amplitude in one block is large and one block can be divided into four or less sub-blocks. In other cases, type determination unit 158 determines that no sub-block is generated, and compresses pixel data by taking one block as a group. The type is determined as follows. The type is included in the compressed data because it is necessary to determine the procedure for decompression. The case where one block can be divided into four or less sub-blocks is when the value output from the change point counter 157 is CNT1 ≦ 3.
type 00: when only one block is used type 01: when two sub-blocks are generated type 10: when three sub-blocks are generated type 11: when four sub-blocks are generated The type determination unit 158 determines the determined type. Output.

領域2値化部159は、最大4つのサブブロックのそれぞれのAREA_DETの値を保持する。そして、領域2値化部159は、サブブロック毎のAREA_DETの値を、遷移領域、最大値又は最小値近傍領域に応じて、2値化する。
具体的には、AREA_DET=0のとき、AREAn(n=0,1,2,3)=1とし、AREA_DET=1のとき、AREAn(n=0,1,2,3)=0とし、AREA_DET=2のとき、AREAn(n=0,1,2,3)=1とする。領域2値化部159は、AREAn(n=0,1,2,3)=0又は1を出力する。AREAn(n=0,1,2,3)は、4つ以内のサブブロックの各サブブロックを意味する。
The area binarization unit 159 holds AREA_DET values for each of up to four sub-blocks. Then, the area binarization unit 159 binarizes the AREA_DET value for each sub block according to the transition area, the maximum value, or the minimum value vicinity area.
Specifically, when AREA_DET = 0, ARAn (n = 0, 1, 2, 3) = 1, and when AREA_DET = 1, ARAn (n = 0, 1, 2, 3) = 0 and AREA_DET. When = 2, AREAn (n = 0, 1, 2, 3) = 1. The area binarization unit 159 outputs ARAn (n = 0, 1, 2, 3) = 0 or 1. AREAn (n = 0, 1, 2, 3) means each sub-block of up to four sub-blocks.

次に、図5を参照して、ブロック分割用データ生成部143について説明する。図5は、本実施形態に係るブロック分割用データ生成部143を示すブロック図である。
ブロック分割用データ生成部143は、図5に示すように、例えば、アドレスカウンタ161、変化点保持部162、ラッチパルス出力部163、区間幅計算部164、最大値最小値検出部165、差分算出部166、最小値ラッチ部167、セレクタ168、領域2値化値保持部169、量子化語長決定部170、シフト量計算部171、シフト量ラッチ部172、セレクタ173、変化点保持部174及びアドレスカウンタ175からなる。
ブロック分割用データ生成部143は、サブブロック単位での量子化に必要な要素を生成する。ブロック分割用データ生成部143は、サブブロック生成部の一例である。
Next, the block division data generation unit 143 will be described with reference to FIG. FIG. 5 is a block diagram showing the block division data generation unit 143 according to this embodiment.
As illustrated in FIG. 5, the block division data generation unit 143 includes, for example, an address counter 161, a change point holding unit 162, a latch pulse output unit 163, a section width calculation unit 164, a maximum / minimum value detection unit 165, and a difference calculation. Unit 166, minimum value latch unit 167, selector 168, region binarized value holding unit 169, quantization word length determination unit 170, shift amount calculation unit 171, shift amount latch unit 172, selector 173, change point holding unit 174, It consists of an address counter 175.
The block division data generation unit 143 generates elements necessary for quantization in subblock units. The block division data generation unit 143 is an example of a sub-block generation unit.

アドレスカウンタ161及びアドレスカウンタ175は、いずれも1つのブロック分の画素数を数え上げる。
アドレスカウンタ161は、ブロック分割判断終了信号を受けて、アドレスカウントスタート信号とする。アドレスカウンタ161の出力(CNT2)は、ラッチパルス出力部163の出力(latch2)を介して、最大値最小値検出部165、サブブロック毎の最小値を決定する最小値ラッチ部167、シフト量を決定するシフト量ラッチ部172を制御する。
Both the address counter 161 and the address counter 175 count the number of pixels for one block.
The address counter 161 receives the block division determination end signal and sets it as an address count start signal. The output (CNT2) of the address counter 161 is output via the output (latch2) of the latch pulse output unit 163, the maximum value / minimum value detection unit 165, the minimum value latch unit 167 for determining the minimum value for each subblock, and the shift amount. The shift amount latch unit 172 to be determined is controlled.

アドレスカウンタ175は、アドレスカウンタ161が20画素分のカウントを終了すると起動される。アドレスカウンタ175は、CONT信号を出力する。CONT信号は、タイプ(type00,01,10,11)に応じた分割数と、座標レジスタ(POS0’,1’,2’)に基づいてセレクタ173を切り替える制御をする。この制御によって、サブブロック毎に画素データの量子化が行われる。   The address counter 175 is activated when the address counter 161 finishes counting for 20 pixels. The address counter 175 outputs a CONT signal. The CONT signal controls to switch the selector 173 based on the number of divisions according to the type (type00, 01, 10, 11) and the coordinate registers (POS0 ', 1', 2 '). By this control, pixel data is quantized for each sub-block.

変化点保持部162及び変化点保持部174は、サブブロックの数に応じて、最大3つの座標を保持する。変化点保持部162は、変化点のカウンタ値(座標レジスタPOSn(n=0,1,2)=0〜19)を保持する。変化点保持部174は、変化点のカウンタ値(座標レジスタPOSn(n=0’,1’,2’)=0〜19)を保持する。座標レジスタPOS0’〜POS2’は、座標レジスタPOS0〜POS2のコピーであり、量子化終了後にパッキング部138で圧縮データとしてパックされるときに使用されるときまで保持される。   The change point holding unit 162 and the change point holding unit 174 hold a maximum of three coordinates according to the number of sub-blocks. The change point holding unit 162 holds a change point counter value (coordinate register POSn (n = 0, 1, 2) = 0 to 19). The change point holding unit 174 holds a change point counter value (coordinate registers POSn (n = 0 ′, 1 ′, 2 ′) = 0 to 19). The coordinate registers POS0 'to POS2' are copies of the coordinate registers POS0 to POS2, and are held until they are used when packed as compressed data by the packing unit 138 after the quantization.

ラッチパルス出力部163は、アドレスカウンタ161からのカウンタ値と変化点保持部162からの座標レジスタに基づいて、サブブロック単位でラッチパルス(latch2)を出力する。   The latch pulse output unit 163 outputs a latch pulse (latch2) in units of sub-blocks based on the counter value from the address counter 161 and the coordinate register from the change point holding unit 162.

区間幅計算部164は、タイプ(type00,01,10,00)によって、サブブロック分割数を検知する。区間幅計算部164は、座標の差分から区間幅を計算する。区間幅計算部164は、例えば、以下のとおり計算して、区間幅W0,W1,W2,W3を出力する。
type00の場合、区間幅W0=19である。区間幅W1,W2,W3は使用しない。
type01の場合、区間幅W0=POS0−0、W1=19−POS0である。区間幅W2,W3は使用しない。
type10の場合、区間幅W0=POS0−0、W1=POS1−POS0、W2=19−POS1である。区間幅W3は使用しない。
type11の場合、区間幅W0=POS0−0、W1=POS1−POS0、W2=POS2−POS1、W3=19−POS2である。
The section width calculation unit 164 detects the number of sub-block divisions based on the type (type00, 01, 10, 00). The section width calculation unit 164 calculates a section width from the coordinate difference. The section width calculation unit 164 calculates, for example, as follows and outputs the section widths W0, W1, W2, and W3.
In the case of type 00, the section width W0 = 19. The section widths W1, W2, and W3 are not used.
In the case of type01, the section widths W0 = POS0-0 and W1 = 19-POS0. The section widths W2 and W3 are not used.
In the case of type 10, the section width is W0 = POS0-0, W1 = POS1-POS0, and W2 = 19-POS1. The section width W3 is not used.
In the case of type 11, the section width W0 = POS0-0, W1 = POS1-POS0, W2 = POS2-POS1, and W3 = 19-POS2.

最大値最小値検出部165は、サブブロック単位で、サブブロック内での画素データの最大値及び最小値を検出する。最大値最小値検出部165は、検出した最大値及び最小値を差分算出部166及び最小値ラッチ部167に出力する。   The maximum value / minimum value detection unit 165 detects the maximum value and the minimum value of the pixel data in the sub block for each sub block. The maximum value / minimum value detection unit 165 outputs the detected maximum value and minimum value to the difference calculation unit 166 and the minimum value latch unit 167.

差分算出部166は、最大値最小値検出部165で検出されたサブブロック内の最大値及び最小値の差分を計算して、サブブロック単位でのダイナミックレンジ(DR1)を算出する。   The difference calculation unit 166 calculates the difference between the maximum value and the minimum value in the sub block detected by the maximum value / minimum value detection unit 165, and calculates the dynamic range (DR1) in units of sub blocks.

最小値ラッチ部167は、サブブロック単位にレジスタMINn(n=0,1,2,3)に最小値を順次保持する。
セレクタ168は、最小値ラッチ部167のレジスタMINn(n=0,1,2,3)から、サブブロック毎の最小値を順次読み出して、出力する。
領域2値化値保持部169は、領域2値化部159から出力されたAREAn(n=0,1,2,3)=0又は1を保持する。
The minimum value latch unit 167 sequentially holds the minimum value in the register MINn (n = 0, 1, 2, 3) in units of sub blocks.
The selector 168 sequentially reads out and outputs the minimum value for each sub-block from the register MINn (n = 0, 1, 2, 3) of the minimum value latch unit 167.
The area binarized value holding unit 169 holds ARAn (n = 0, 1, 2, 3) = 0 or 1 output from the area binarizing unit 159.

量子化語長決定部170は、サブブロック単位の量子化語長を決定する。量子化語長決定部170は、サブブロック毎に量子化語長(Qn(n=0,1,2,3)=2〜5)を出力する。ここで、決定される量子化語長は、2〜5である。   The quantization word length determination unit 170 determines the quantization word length in units of sub blocks. The quantization word length determination unit 170 outputs the quantization word length (Qn (n = 0, 1, 2, 3) = 2 to 5) for each sub-block. Here, the determined quantization word length is 2-5.

本実施形態のアルゴリズムとしては、サブブロックが、1つのブロックの入力波形のうち最大値及び最小値というレベル両端への遷移領域に該当し、サブブロックの区間幅が狭いとき、画素データの変化が激しい区間と判断する。そして、画素データの変化が激しい区間と判断されたサブブロックについては、優先的により多くの量子化語長を割り当てるとする。   According to the algorithm of the present embodiment, when a sub-block corresponds to a transition region to both ends of the maximum value and minimum value of the input waveform of one block and the section width of the sub-block is narrow, pixel data changes. Judged as a severe section. Then, it is assumed that a larger quantization word length is preferentially assigned to a sub-block that is determined to be a section in which the pixel data changes drastically.

量子化語長決定部170は、区間幅Wn(n=0,1,2,3)の値、AREAn(n=0,1,2,3)=0又は1、type(=00,01,10,11)を用いて、量子化語長を割り当てる順位を検出する。   The quantized word length determination unit 170 determines the value of the section width Wn (n = 0, 1, 2, 3), AREAn (n = 0, 1, 2, 3) = 0 or 1, type (= 00, 01, 10, 11) is used to detect the order in which the quantized word length is assigned.

1ブロックに割り当てられた語長(本実施形態では128ビット)のうち量子化データに使用できるビット数は、図10に示すデータ構造を有する圧縮データでは、タイプ毎にそれぞれ異なり、以下のとおりである。
type00:100ビット
type01:93ビット
type10:74ビット
type11:55ビット
Of the word length assigned to one block (128 bits in this embodiment), the number of bits that can be used for quantized data differs for each type of compressed data having the data structure shown in FIG. is there.
type00: 100 bits type01: 93 bits type10: 74 bits type11: 55 bits

これらの量子化データに使用できるビット数に基づいて、1つのブロック内の各画素に割り当てられる量子化語長の組み合わせは、例えば、以下のとおりに決定しておくことができる。
type00:20画素全て5ビット(計100ビット)
type01:最大13画素まで5ビット、残りの画素は4ビット(計93ビット)
type10:最大14画素まで4ビット、残りの画素は3ビット(計74ビット)
type11:最大15画素まで3ビット、残りの画素は2ビット(計55ビット)
Based on the number of bits that can be used for these quantized data, a combination of quantized word lengths assigned to each pixel in one block can be determined as follows, for example.
type00: All 20 pixels are 5 bits (total of 100 bits)
type01: 5 bits up to 13 pixels, 4 bits for the remaining pixels (total 93 bits)
type10: 4 bits up to 14 pixels, 3 bits for the remaining pixels (74 bits in total)
type11: 3 bits up to 15 pixels, 2 bits for the remaining pixels (total 55 bits)

更に、type01,10,11のように割りあてられる量子化語長が画素によって異なる場合、量子化語長の大きいものを割り当てるルールとしては、以下のとおりに決定しておくことができる。
1)AREAn=0(波形の遷移領域)に該当するサブブロックであって、区間幅Wが短いサブブロックの順に、上記の制限数以内で、各画素に量子化語長の大きいほうを割り当てる。
2)次に、依然として量子化語長の大きいほうを割り当てられる余裕がある場合は、AREAn=1に該当するサブブロックであって、区間幅Wが短いサブブロックの順に、上記の制限数以内で、各画素に量子化語長の大きいほうを割り当てる。
3)大きいほうの量子化語長が割り当てられなくなった時点で、残りのサブブロックは全て小さいほうの量子化語長が割り当てられる。
Furthermore, when the quantized word length assigned as in types 01, 10, and 11 differs depending on the pixel, the rule for assigning a larger quantized word length can be determined as follows.
1) Sub-blocks corresponding to AREAn = 0 (waveform transition region) and having a shorter section width W are assigned to the pixels having the larger quantization word length within the above-mentioned limit number.
2) Next, if there is still room to allocate the larger quantized word length, sub-blocks corresponding to ARAn = 1 and sub-blocks having a shorter section width W are within the above limit number. , The larger quantization word length is assigned to each pixel.
3) When the larger quantization word length is no longer assigned, the remaining sub-blocks are all assigned the smaller quantization word length.

次に、図8を参照して、量子化語長の割り当てについて一例を説明する。図8は、画素データの入力波形を示す説明図である。ここでは、圧縮対象のブロックが、type10であって、サブブロック数を3にするように分割する場合について説明する。   Next, an example of quantization word length assignment will be described with reference to FIG. FIG. 8 is an explanatory diagram showing an input waveform of pixel data. Here, a case will be described in which the block to be compressed is type 10 and division is performed so that the number of sub-blocks is 3.

type10であるため、上述したルールとしては、大きいほうの量子化語長は4ビットであり、最大14画素まで割り当てることができる。残りの画素は全て3ビットが割り当てられる。   Since it is type10, according to the rule described above, the larger quantization word length is 4 bits, and a maximum of 14 pixels can be allocated. All the remaining pixels are assigned 3 bits.

図8に示す入力波形によれば、対象とするブロック内の各サブブロックの区間幅Wと領域AREAは、次のとおりである。
W0=7 AREA0=1
W1=3 AREA1=0
W2=10 AREA2=1
According to the input waveform shown in FIG. 8, the section width W and the area AREA of each sub-block in the target block are as follows.
W0 = 7 AREA0 = 1
W1 = 3 AREA1 = 0
W2 = 10 AREA2 = 1

このとき、区間幅の大小関係は、W1<W0<W2となる。従って、上述したルールでは、W1,W0,W2の順に大きいほうの量子化語長を割り当てるようにしていく。まず、W1の区間へQ0=4ビットを割り当てる。次に、W0の区間へ量子化語長を割り当てる。最大14画素まで4ビットを割り当てられ、W0+W1<14であるため、W0の区間へQ1=4ビットを割り当てる。次に、W2の区間へ量子化語長を割り当てる。W2=10であるが、既に量子語長4ビットを10画素分割り当てているため、W2の区間へ4ビットを割り当てることはできない。そのため、W2の区間へQ2=3ビットを割り当てる。区間幅W3は、type10によれば、サブブロック分割数は3つなので該当なしとなり、Q3は計算しない。   At this time, the size relationship of the section width is W1 <W0 <W2. Therefore, in the above-described rule, the larger quantization word length is assigned in the order of W1, W0, and W2. First, Q0 = 4 bits are assigned to the section of W1. Next, a quantization word length is assigned to the interval of W0. Since 4 bits are allocated to a maximum of 14 pixels and W0 + W1 <14, Q1 = 4 bits are allocated to the section of W0. Next, a quantization word length is assigned to the section of W2. Although W2 = 10, since the quantum word length of 4 bits is already allocated for 10 pixels, 4 bits cannot be allocated to the section of W2. Therefore, Q2 = 3 bits are allocated to the section of W2. According to type 10, the section width W3 is not applicable because the number of sub-block divisions is 3, and Q3 is not calculated.

なお、この量子化語長の割当手順は、伸張処理側でも同様のルールで行われて、逆量子化処理がされる。また、本発明は割り当てる量子化語長の大きさや種類は上述した例に限定されない。このとき、タイプに応じて量子化データに使用できるビット数は限定されるが、圧縮処理側と伸張処理側で同じルールであればよい。   Note that this quantization word length assignment procedure is also performed on the decompression processing side according to the same rule, and the inverse quantization processing is performed. In the present invention, the size and type of the quantization word length to be assigned are not limited to the above-described examples. At this time, the number of bits that can be used for the quantized data is limited depending on the type, but the same rule may be used on the compression processing side and the expansion processing side.

シフト量計算部171は、サブブロック単位のダイナミックレンジ(DR1)と量子化語長(Qn(n=0,1,2,3)=2〜5)に基づいて、減算部135の出力を右に何ビットシフトするかを計算する。シフト量計算部171は、計算結果をシフト量ラッチ部172のレジスタSFTn(n=0,1,2,3)に出力する。   The shift amount calculation unit 171 outputs the output of the subtraction unit 135 to the right based on the dynamic range (DR1) in units of sub-blocks and the quantization word length (Qn (n = 0, 1, 2, 3) = 2 to 5). Calculate how many bits to shift. The shift amount calculation unit 171 outputs the calculation result to the register SFTn (n = 0, 1, 2, 3) of the shift amount latch unit 172.

シフト量ラッチ部172は、シフト量計算部171から出力されたシフト量をレジスタSFTn(n=0,1,2,3)に順次記録する。セレクタ173は、シフト量ラッチ部172のレジスタSFTn(n=0,1,2,3)から、サブブロック毎のシフト量を順次読み出して、出力する。   The shift amount latch unit 172 sequentially records the shift amount output from the shift amount calculation unit 171 in the register SFTn (n = 0, 1, 2, 3). The selector 173 sequentially reads out and outputs the shift amount for each subblock from the register SFTn (n = 0, 1, 2, 3) of the shift amount latch unit 172.

ここで、シフト量計算は、圧縮する領域(サブブロック)のダイナミックレンジ(DR1)と、出力したい量子化語長に基づいて、量子化部136で行われる右シフトの量を計算する。
例えば、10ビットを5ビットに量子化する場合、
0≦DR1≦31のとき、入力データ(減算部135からの出力データ)をそのまま出力する。
32≦DR1≦63のとき、入力データを1ビット分右へシフトする。
64≦DR1≦127のとき、入力データを2ビット分右へシフトする。
128≦DR1≦255のとき、入力データを3ビット分右へシフトする。
256≦DR1≦511のとき、入力データを4ビット分右へシフトする。
512≦DR1≦1023のとき、入力データを5ビット分右へシフトする。
Here, the shift amount calculation calculates the amount of right shift performed by the quantization unit 136 based on the dynamic range (DR1) of the region (subblock) to be compressed and the quantization word length to be output.
For example, when 10 bits are quantized to 5 bits,
When 0 ≦ DR1 ≦ 31, the input data (output data from the subtraction unit 135) is output as it is.
When 32 ≦ DR1 ≦ 63, the input data is shifted to the right by one bit.
When 64 ≦ DR1 ≦ 127, the input data is shifted to the right by 2 bits.
When 128 ≦ DR1 ≦ 255, the input data is shifted right by 3 bits.
When 256 ≦ DR1 ≦ 511, the input data is shifted right by 4 bits.
When 512 ≦ DR1 ≦ 1023, the input data is shifted right by 5 bits.

また、10ビットを4ビットに量子化する場合も、5ビットの例と同様に、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「6ビット右へシフトする」という処理をする。
10ビットを3ビットに量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「7ビット右へシフトする」という処理をする。10ビットを2ビットに量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「8ビット右へシフトする」という処理をする。
Also, when 10 bits are quantized to 4 bits, the process of “output as it is” to “shift to the right of 6 bits” is performed according to the dynamic range (DR1) as in the case of the 5 bits.
When quantizing 10 bits into 3 bits, processing of “output as it is” to “shift to the right of 7 bits” is performed according to the dynamic range (DR1). When quantizing 10 bits into 2 bits, processing of “output as it is” to “shift right by 8 bits” is performed according to the dynamic range (DR1).

次に、図11を参照して本実施形態に係るRAW伸張部122について説明する。図11は、本実施形態に係るRAW伸張部122を示すブロック図である。
図11に示すように、RAW伸張部122は、例えば、圧縮符号ラッチ部181、区間幅計算部182、量子化語長決定部183、アドレスカウンタ184、セレクタ185、符号シフタ186、セレクタ187、セレクタ188、逆量子化部189、加算部191及び逆折れ線伸張部192からなる。
Next, the RAW expansion unit 122 according to the present embodiment will be described with reference to FIG. FIG. 11 is a block diagram showing the RAW decompression unit 122 according to the present embodiment.
As illustrated in FIG. 11, the RAW decompression unit 122 includes, for example, a compression code latch unit 181, a section width calculation unit 182, a quantization word length determination unit 183, an address counter 184, a selector 185, a code shifter 186, a selector 187, and a selector. 188, an inverse quantization unit 189, an addition unit 191, and an inverse broken line extension unit 192.

圧縮符号ラッチ部181は、SDRAM104から読み出された128ビットの圧縮データを保持する。圧縮符号ラッチ部181は、図10に示す圧縮データのうち、MSB(Most Significant Bit)2ビットからタイプを判別して、各サブブロックのシフト量、最小値を保持する。圧縮符号ラッチ部181は、抽出部の一例である。   The compression code latch unit 181 holds 128-bit compressed data read from the SDRAM 104. The compression code latch unit 181 determines the type from 2 bits of MSB (Most Significant Bit) in the compressed data shown in FIG. 10, and holds the shift amount and the minimum value of each sub-block. The compression code latch unit 181 is an example of an extraction unit.

区間幅計算部182は、サブブロック切り替え座標の座標データ(POS0,1,2)を受け、座標データ(POS0,1,2)の差分を計算して、区間幅W0,1,2を算出する。区間幅計算部182は、RAW圧縮部121の区間幅計算部164と同様である。   The section width calculation unit 182 receives the coordinate data (POS0, 1, 2) of the sub-block switching coordinates, calculates the difference between the coordinate data (POS0, 1, 2), and calculates the section width W0, 1, 2. . The section width calculation unit 182 is the same as the section width calculation unit 164 of the RAW compression unit 121.

量子化語長決定部183は、区間幅計算部182で算出された区間幅W0,1,2,3及びタイプに基づいて、サブブロックの量子化語長を割り当て計算し、サブブロック毎の量子化語長(Q0,1,2,3)を決定する。量子化語長決定部183は、RAW圧縮部121の量子化語長決定部170と同様のアルゴリズムでサブブロック毎の量子化語長(Q0,1,2,3)を決定する。   The quantization word length determination unit 183 assigns and calculates the quantization word length of the subblock based on the section widths W0, 1, 2, 3 and the type calculated by the section width calculation unit 182 and calculates the quantum for each subblock. The chemical word length (Q0, 1, 2, 3) is determined. The quantized word length determining unit 183 determines the quantized word length (Q0, 1, 2, 3) for each sub-block using the same algorithm as the quantized word length determining unit 170 of the RAW compressing unit 121.

セレクタ185は、量子化語長決定部183で決定された量子化語長を受取、順次符号シフタ186に出力する。
アドレスカウンタ184は、タイプと座標データによって、伸張処理する画素が属するサブブロックの切り替え座標を検出し、セレクタ185、187、188を順次切り替える。
The selector 185 receives the quantized word length determined by the quantized word length determining unit 183 and sequentially outputs it to the code shifter 186.
The address counter 184 detects the switching coordinates of the sub-block to which the pixel to be expanded belongs based on the type and coordinate data, and sequentially switches the selectors 185, 187, and 188.

符号シフタ186は、圧縮符号ラッチ部181で保持されたデータのうち、タイプに応じた量子化データ(100ビット、93ビット、74ビット、55ビット)を受け取る。そして、符号シフタ186は、サブブロック単位の量子化語長(Q0,1,2,3)に基づいて、2〜5ビットの符号をシフト動作によって抽出し、逆量子化部189に出力する。   The code shifter 186 receives quantized data (100 bits, 93 bits, 74 bits, 55 bits) corresponding to the type among the data held by the compression code latch unit 181. Then, the code shifter 186 extracts a code of 2 to 5 bits by a shift operation based on the quantization word length (Q0, 1, 2, 3) in units of sub-blocks, and outputs the code to the inverse quantization unit 189.

セレクタ187は、圧縮符号ラッチ部181で保持された図10のデータ構造を有する圧縮データのうち、各サブブロックのシフト量を受け取り、順次逆量子化部189に出力する。セレクタ188は、圧縮符号ラッチ部181で保持された圧縮データのうち、図10のデータ構造を有する圧縮データのうち、各サブブロックの最小値を受け取り、順次加算部191に出力する。   The selector 187 receives the shift amount of each sub-block of the compressed data having the data structure of FIG. 10 held by the compression code latch unit 181, and sequentially outputs it to the inverse quantization unit 189. The selector 188 receives the minimum value of each sub-block of the compressed data having the data structure shown in FIG. 10 among the compressed data held by the compression code latch unit 181, and sequentially outputs it to the adder 191.

逆量子化部189は、符号シフタ186からの画素毎の量子化データを、セレクタ187からのシフト量に応じて、逆量子化する。本実施形態では、逆量子化部189は、2〜5ビットの符号を逆量子化して10ビットのデータを出力する。RAW圧縮部121の量子化部136で右シフタとして量子化した場合、逆量子化部189は、以下のような左シフタとしての計算をする。   The inverse quantization unit 189 inversely quantizes the quantized data for each pixel from the code shifter 186 according to the shift amount from the selector 187. In the present embodiment, the inverse quantization unit 189 inversely quantizes the 2 to 5 bit code and outputs 10 bit data. When the quantization unit 136 of the RAW compression unit 121 performs quantization as the right shifter, the inverse quantization unit 189 performs calculation as the left shifter as follows.

例えば、5ビットを10ビットに逆量子化する場合、
0≦DR1≦31のとき、入力データ(符号シフタ186からの出力データ)をそのまま出力する。
32≦DR1≦63のとき、入力データを1ビット分左へシフトする。
64≦DR1≦127のとき、入力データを2ビット分左へシフトする。
128≦DR1≦255のとき、入力データを3ビット分左へシフトする。
256≦DR1≦511のとき、入力データを4ビット分左へシフトする。
512≦DR1≦1023のとき、入力データを5ビット分左へシフトする。
For example, when dequantizing 5 bits to 10 bits,
When 0 ≦ DR1 ≦ 31, the input data (output data from the code shifter 186) is output as it is.
When 32 ≦ DR1 ≦ 63, the input data is shifted to the left by one bit.
When 64 ≦ DR1 ≦ 127, the input data is shifted to the left by 2 bits.
When 128 ≦ DR1 ≦ 255, the input data is shifted left by 3 bits.
When 256 ≦ DR1 ≦ 511, the input data is shifted to the left by 4 bits.
When 512 ≦ DR1 ≦ 1023, the input data is shifted left by 5 bits.

また、4ビットを10ビットに逆量子化する場合も、5ビットの例と同様に、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「6ビット左へシフトする」という処理をする。
3ビットを10ビットに逆量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「7ビット左へシフトする」という処理をする。2ビットを10ビットに逆量子化する場合は、ダイナミックレンジ(DR1)に応じて、「そのまま出力する」〜「8ビット左へシフトする」という処理をする。
Also, in the case of dequantizing 4 bits to 10 bits, as in the case of 5 bits, processing of “output as it is” to “shift to 6 bits left” is performed according to the dynamic range (DR1). .
When dequantizing 3 bits to 10 bits, processing of “output as it is” to “shift left by 7 bits” is performed according to the dynamic range (DR1). When 2 bits are inversely quantized to 10 bits, processing of “output as it is” to “shift left by 8 bits” is performed according to the dynamic range (DR1).

加算部191は、逆量子化部189が出力した符号に、サブブロック毎の共通DCオフセット値となる最小値を加算する。加算部191は、最小値を加算したデータを逆折れ線伸張部192に出力する。   The adder 191 adds the minimum value that is a common DC offset value for each sub-block to the code output from the inverse quantizer 189. The adding unit 191 outputs the data obtained by adding the minimum value to the reverse polygonal line extending unit 192.

逆折れ線伸張部192は、加算部191からのデータを、RAW圧縮部121の折れ線圧縮部131と逆の特性により、10ビットから14ビットのデータに伸張する。   The reverse broken line decompression unit 192 decompresses the data from the addition unit 191 from 10 bits to 14 bits with the reverse characteristics to those of the broken line compression unit 131 of the RAW compression unit 121.

ここで、図12は、逆折れ線伸張部192で用いられる折れ線の例を示す図である。
この図12の折れ線は、図9で示した折れ線圧縮部131における折れ線と、逆の特性により階調を変換するようになっている。なお、入力データと伸張後の出力データとを対応付けて記憶したROMテーブルを用意し、このROMテーブルに従って入出力データの変換が行われてもよい。なお、圧縮時に、折れ線圧縮部131による圧縮が適用されなかった場合には、伸張時には、この逆折れ線変換部192でのデータ変換もバイパスされる。
Here, FIG. 12 is a diagram illustrating an example of a polygonal line used in the reverse polygonal line extending unit 192.
The polygonal line in FIG. 12 is adapted to convert the gradation by characteristics opposite to those of the polygonal line compression unit 131 shown in FIG. A ROM table in which input data and decompressed output data are stored in association with each other may be prepared, and input / output data conversion may be performed according to the ROM table. If compression by the polygonal line compression unit 131 is not applied at the time of compression, data conversion at the reverse polygonal line conversion unit 192 is also bypassed at the time of decompression.

次に、図10を参照して、本実施形態で生成される圧縮データのデータ構造について説明する。図10は、パッキング部138により生成される1ブロック分の圧縮データのデータ構造を示す説明図である。
圧縮データは、本実施形態のRAW圧縮部で生成されたものであり、RAWデータの14ビットを折れ線圧縮部10ビットに変換し、更に水平方向の20画素単位でブロック化し、各画素を量子化語長2〜5ビットで符号化したものである。圧縮データは、ブロック毎に128ビットで構成される。
Next, the data structure of the compressed data generated in this embodiment will be described with reference to FIG. FIG. 10 is an explanatory diagram illustrating a data structure of compressed data for one block generated by the packing unit 138.
The compressed data is generated by the RAW compression unit of the present embodiment. 14 bits of the RAW data are converted into a 10-bit polygonal line compression unit, further divided into blocks of 20 pixels in the horizontal direction, and each pixel is quantized. It is encoded with a word length of 2 to 5 bits. The compressed data is composed of 128 bits for each block.

図10に示すように、圧縮時にサブブロック毎に分割しないtype00の圧縮データは、識別フラグ(2ビット)、ブロック内の最小値(10ビット)、ブロック内の例えば2のべき乗に変換したダイナミックレンジ(3ビット)、ブロックの量子化データ(100ビット)からなる。
一方、サブブロックに分割するtype01,10,11の圧縮データの場合、識別フラグ(2ビット)、サブブロック毎のサブブロック内の最小値(10ビット)、サブブロック毎のサブブロック内の例えば2のべき乗に変換したダイナミックレンジ(3ビット)、領域を示すAREAn(1ビット)、切り替え座標POSn(5ビット)、ブロックの量子化データ(93ビット,74ビット,55ビット)からなる。
As shown in FIG. 10, compressed data of type 00 that is not divided into sub-blocks at the time of compression includes an identification flag (2 bits), a minimum value in the block (10 bits), and a dynamic range converted into, for example, a power of 2 in the block. (3 bits), consisting of block quantized data (100 bits).
On the other hand, in the case of compressed data of types 01, 10, and 11 divided into sub-blocks, the identification flag (2 bits), the minimum value in the sub-block for each sub-block (10 bits), for example 2 in the sub-block for each sub-block It consists of a dynamic range (3 bits) converted to a power of AREA, ARAn (1 bit) indicating a region, switching coordinates POSn (5 bits), and quantized data (93 bits, 74 bits, 55 bits).

以上の構成のRAW圧縮部121およびRAW伸張部122によれば、量子化による画質劣化が最小限に抑制されるような、より適切なサブブロック分割が選択され、量子化処理が実行される。その結果、高画質な撮像画像を高速処理によって得ることができる。また、圧縮率を向上させることができるため、内部バス118の帯域を有効に使用することができ、連写機能による撮影時の応答速度の高速化を図ることができる。   According to the RAW compression unit 121 and the RAW expansion unit 122 configured as described above, more appropriate sub-block division is selected so that image quality deterioration due to quantization is suppressed to a minimum, and quantization processing is executed. As a result, a high-quality captured image can be obtained by high-speed processing. Further, since the compression rate can be improved, the bandwidth of the internal bus 118 can be used effectively, and the response speed at the time of shooting by the continuous shooting function can be increased.

以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。   The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention pertains can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that these also belong to the technical scope of the present invention.

本発明の第1の実施形態に係る撮像装置を示すブロック図である。1 is a block diagram illustrating an imaging apparatus according to a first embodiment of the present invention. 同実施形態に係るRAW圧縮部を示すブロック図である。It is a block diagram which shows the RAW compression part which concerns on the same embodiment. 同実施形態に係るブロック分割数決定部を示すブロック図である。It is a block diagram which shows the block division number determination part which concerns on the same embodiment. 同実施形態に係るブロック分割判断部を示すブロック図である。It is a block diagram which shows the block division judgment part which concerns on the same embodiment. 同実施形態に係るブロック分割用データ生成部を示すブロック図である。It is a block diagram which shows the data generation part for block division | segmentation which concerns on the same embodiment. ベイヤ配列と抽出された同色1ラインを示す模式図である。It is a schematic diagram which shows a Bayer arrangement | sequence and 1 line of the same color extracted. 画素データの入力波形を示す説明図である。It is explanatory drawing which shows the input waveform of pixel data. 画素データの入力波形を示す説明図である。It is explanatory drawing which shows the input waveform of pixel data. 折れ線圧縮部で用いられる折れ線の例を示すグラフである。It is a graph which shows the example of the broken line used in a broken line compression part. パッキング部により生成される1ブロック分の圧縮データのデータ構造を示す説明図である。It is explanatory drawing which shows the data structure of the compressed data for 1 block produced | generated by the packing part. 本発明の第1の実施形態に係るRAW伸張部を示すブロック図である。It is a block diagram which shows the RAW expansion | deployment part which concerns on the 1st Embodiment of this invention. 逆折れ線伸張部で用いられる折れ線の例を示す図である。It is a figure which shows the example of the broken line used in a reverse broken line extending | stretching part.

符号の説明Explanation of symbols

100 撮像装置
101 撮像素子
102 AFE回路
103 デジタル画像処理部
104 SDRAM
105 ROM
106 ストレージデバイス
111 カメラ信号前処理部
112 カメラ信号処理部
113 解像度変換部
114 JPEGエンジン
115 CPU
116 ビデオ出力エンコーダ
117 SDRAMコントローラ
121 RAW圧縮部
122 RAW伸張部
DESCRIPTION OF SYMBOLS 100 Image pick-up device 101 Image pick-up element 102 AFE circuit 103 Digital image processing part 104 SDRAM
105 ROM
106 Storage Device 111 Camera Signal Pre-Processing Unit 112 Camera Signal Processing Unit 113 Resolution Conversion Unit 114 JPEG Engine 115 CPU
116 video output encoder 117 SDRAM controller 121 RAW compression unit 122 RAW expansion unit

Claims (7)

撮像素子から出力された画素データを所定数毎に分割しブロックを生成するブロック化部と、
前記ブロック内の画素データのレベル変化に応じて前記ブロックを分割しサブブロックを生成する分割処理部と、
前記生成されたサブブロック毎に前記画素データレベルの変化量及び前記サブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成する量子化部と、
前記ブロック内の画素データのレベル変化に関する情報と前記量子化データを集約し圧縮データを生成する圧縮データ生成部と
を有する、画像情報処理装置。
A blocking unit that divides pixel data output from the image sensor into predetermined numbers and generates blocks;
A division processing unit that divides the block according to a level change of pixel data in the block and generates a sub-block;
A quantization unit that quantizes pixel data with a quantization word length determined according to a change amount of the pixel data level and a length of a section of the sub-block for each generated sub-block, and generates quantized data; ,
An image information processing apparatus, comprising: a compressed data generation unit that aggregates the quantized data and generates compressed data by combining information on a level change of pixel data in the block.
前記分割処理部は、前記ブロック内の画素データレベルの振幅値と変化量に応じて、前記ブロックを分割しサブブロックを生成する、請求項1に記載の画像情報処理装置。   The image information processing apparatus according to claim 1, wherein the division processing unit divides the block and generates a sub-block according to an amplitude value and a change amount of a pixel data level in the block. 前記分割処理部は、
前記ブロック内の画素データレベルの振幅値と変化量に基づいて前記ブロックを分割する数及び分割位置を決定する分割決定部と、
前記決定された分割数及び分割位置に応じて、前記ブロックを分割しサブブロックを生成するサブブロック生成部と
を有する、請求項1に記載の画像情報処理装置。
The division processing unit
A division determination unit that determines the number and division position of the block based on the amplitude value and change amount of the pixel data level in the block;
The image information processing apparatus according to claim 1, further comprising: a sub-block generation unit configured to divide the block and generate a sub-block according to the determined division number and division position.
圧縮データから、所定数の画素データからなるブロック内の画素データのレベル変化に関する情報と、前記ブロックが分割されたサブブロック毎に前記画素データレベルの変化量及び前記サブブロックの区間の長さに応じて決定された量子化語長で前記画素データが量子化された量子化データを抽出する抽出部と、
前記レベル変化に関する情報に基づいて、前記量子化データを逆量子化し逆量子化画素データを生成する逆量子化部と
を有する、画像情報処理装置。
From the compressed data, information on the level change of the pixel data in the block consisting of a predetermined number of pixel data, the amount of change in the pixel data level and the length of the section of the sub block for each sub block into which the block is divided An extraction unit for extracting quantized data obtained by quantizing the pixel data with a quantized word length determined according to the method;
An image information processing apparatus comprising: an inverse quantization unit that inversely quantizes the quantized data and generates inversely quantized pixel data based on information on the level change.
前記レベル変化に関する情報は、前記画素データのレベルの振幅値と変化量に関する情報である、請求項4に記載の画像情報処理装置。   The image information processing apparatus according to claim 4, wherein the information related to the level change is information related to an amplitude value and a change amount of the level of the pixel data. 撮像素子から出力された画素データを所定数毎に分割しブロックを生成するステップと、
前記ブロック内の画素データのレベル変化に応じて前記ブロックを分割しサブブロックを生成するステップと、
前記生成されたサブブロック毎に前記画素データレベルの変化量及び前記サブブロックの区間の長さに応じて決定された量子化語長で画素データを量子化し量子化データを生成するステップと、
前記ブロック内の画素データのレベル変化に関する情報と前記量子化データを集約し圧縮データを生成するステップと
を有する、画像情報処理方法。
Dividing the pixel data output from the image sensor every predetermined number to generate a block;
Dividing the block according to a level change of pixel data in the block to generate a sub-block;
Quantizing pixel data with a quantization word length determined according to a change amount of the pixel data level and a length of a section of the sub-block for each generated sub-block, and generating quantized data;
An image information processing method comprising: information on a level change of pixel data in the block; and a step of collecting the quantized data and generating compressed data.
圧縮データから、所定数の画素データからなるブロック内の画素データのレベル変化に関する情報と、前記ブロックが分割されたサブブロック毎に前記画素データレベルの変化量及び前記サブブロックの区間の長さに応じて決定された量子化語長で前記画素データが量子化された量子化データを抽出するステップと、
前記レベル変化に関する情報に基づいて、前記量子化データを逆量子化し逆量子化画素データを生成するステップと
を有する、画像情報処理方法。
From the compressed data, information on the level change of the pixel data in the block consisting of a predetermined number of pixel data, the amount of change in the pixel data level and the length of the section of the sub block for each sub block into which the block is divided Extracting the quantized data obtained by quantizing the pixel data with the quantized word length determined accordingly;
An image information processing method comprising: dequantizing the quantized data and generating dequantized pixel data based on the information on the level change.
JP2008140993A 2008-05-29 2008-05-29 Image information processing apparatus and image information processing method Withdrawn JP2009290556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008140993A JP2009290556A (en) 2008-05-29 2008-05-29 Image information processing apparatus and image information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008140993A JP2009290556A (en) 2008-05-29 2008-05-29 Image information processing apparatus and image information processing method

Publications (1)

Publication Number Publication Date
JP2009290556A true JP2009290556A (en) 2009-12-10

Family

ID=41459324

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008140993A Withdrawn JP2009290556A (en) 2008-05-29 2008-05-29 Image information processing apparatus and image information processing method

Country Status (1)

Country Link
JP (1) JP2009290556A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014103543A (en) * 2012-11-20 2014-06-05 Sony Corp Image sensor, and imaging device and method
JP2017135760A (en) * 2017-05-12 2017-08-03 ソニー株式会社 Imaging device and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014103543A (en) * 2012-11-20 2014-06-05 Sony Corp Image sensor, and imaging device and method
US9426376B2 (en) 2012-11-20 2016-08-23 Sony Corporation Image pickup element, imaging device, and imaging method
US9794488B2 (en) 2012-11-20 2017-10-17 Sony Corporation Image pickup element, imaging device, and imaging method
US10033935B2 (en) 2012-11-20 2018-07-24 Sony Corporation Image pickup element, imaging device, and imaging method
JP2017135760A (en) * 2017-05-12 2017-08-03 ソニー株式会社 Imaging device and method

Similar Documents

Publication Publication Date Title
JP4337911B2 (en) Imaging device, imaging circuit, and imaging method
JP4508132B2 (en) Imaging device, imaging circuit, and imaging method
KR101241662B1 (en) Image data processing device, image data processing method, and recording medium
US8538174B2 (en) Image processing device
JP5529685B2 (en) Image encoding method, image decoding method, image encoding device, and image decoding device
US9106250B2 (en) Image coding method and decoding method, image coding apparatus and decoding apparatus, camera, and imaging device
KR20070027605A (en) Image compression device, image compression method, and image compression program
US11336896B2 (en) Image encoding apparatus and image decoding apparatus, methods of controlling the same, and non-transitory computer-readable storage medium
JP6512916B2 (en) Image pickup apparatus, control method thereof and program
JP2008113070A (en) Imaging device and imaging method
JP4196039B2 (en) Image data compression method
US10497093B2 (en) Image processing apparatus for minimizing deterioration of image quality of a raw image
KR20180041441A (en) Apparatus for writing information on defect pixels, apparatus for correcting defect pixels, and method thereof
JP2008501261A (en) Image compression method for high speed and high quality image processing
US8462377B2 (en) Method, apparatus, and system for reduction of line processing memory size used in image processing
JP2009290556A (en) Image information processing apparatus and image information processing method
KR102199470B1 (en) Image-data compressing circuit, image-data compressing method, and photographing apparatus
JP2010074597A (en) Image processing device, image processing method, program and imaging device
US10516896B2 (en) Encoding device, encoding method, and storage medium
JP2021078008A (en) Image processing apparatus, image processing method and imaging apparatus
JP2006197181A (en) Signal processing apparatus and signal processing method for solid-state imaging device and image processing apparatus
JPH11298762A (en) Dark current noise removing device
JP2007228514A (en) Imaging apparatus and method
JP2010183401A (en) Image encoding device and method thereof

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110802