JP2018201143A - Picture encoder - Google Patents

Picture encoder Download PDF

Info

Publication number
JP2018201143A
JP2018201143A JP2017105472A JP2017105472A JP2018201143A JP 2018201143 A JP2018201143 A JP 2018201143A JP 2017105472 A JP2017105472 A JP 2017105472A JP 2017105472 A JP2017105472 A JP 2017105472A JP 2018201143 A JP2018201143 A JP 2018201143A
Authority
JP
Japan
Prior art keywords
unit
data
input
encoding
coefficient data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017105472A
Other languages
Japanese (ja)
Inventor
晃一 古谷
Koichi Furuya
晃一 古谷
真吾 柴田
Shingo Shibata
真吾 柴田
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.)
Shikino High Tech Co Ltd
Original Assignee
Shikino High Tech 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 Shikino High Tech Co Ltd filed Critical Shikino High Tech Co Ltd
Priority to JP2017105472A priority Critical patent/JP2018201143A/en
Publication of JP2018201143A publication Critical patent/JP2018201143A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a picture encoder capable of executing reversible compression and irreversible compression selectively, while making the circuit scale compact.SOLUTION: A picture encoder includes a frequency conversion part, a quantization part, a zigzag scan part, a coding part 6 and a first input changeover part, where the first input changeover part inputs image data while switching to the frequency conversion part and the coding part 6. The coding part 6 includes a distribution part 8 for outputting while dividing into DC coefficients and AC coefficients, AC component processing parts 10, 11 for encoding the AC coefficients inputted from the distribution part 8, a second input changeover part 9 for outputting the DC coefficients inputted from the distribution part 8, and image data inputted externally while switching, DC component processing parts 12, 13 for calculating the differential value of data outputted from the second input changeover part 9 before and after and encoding, and a code junction part 14 for sequentially joining the code data outputted from the DC component processing parts 12, 13, and outputting the code data, outputted from the DC component processing parts 12, 13 and the AC component processing parts 10, 11, while joining.SELECTED DRAWING: Figure 2

Description

本発明は、画像データを、ハフマン符号を用いて圧縮する画像符号化装置に関し、更に詳しくは、画像データを可逆圧縮と非可逆圧縮とに切り換えて圧縮可能な画像符号化装置に関する。   The present invention relates to an image coding apparatus that compresses image data using a Huffman code, and more particularly to an image coding apparatus that can compress image data by switching between lossless compression and lossy compression.

従来より、写真などの画像を取り扱う分野では、通信における負担等の軽減を目的として、原データである画像データをJPEG(Joint Photographic Experts Group)規格に従い符号化して圧縮する画像符号化装置が用いられている。   2. Description of the Related Art Conventionally, in the field of handling images such as photographs, an image encoding device that encodes and compresses image data as original data according to the JPEG (Joint Photographic Experts Group) standard has been used for the purpose of reducing the burden on communication. ing.

このような画像圧縮方式として、従来、符号化によって原データが失われるものの高い圧縮率が得られる非可逆圧縮方式(lossy)と、圧縮率は低いものの原データが失われない可逆圧縮方式(lossless)とが知られており、一般的な画像圧縮には非可逆圧縮方式が採用され、高画質が求められる分野では可逆圧縮方式が採用されている。   As such an image compression method, conventionally, an irreversible compression method (lossy) in which a high compression rate is obtained although the original data is lost by encoding, and a lossless compression method (lossless) in which the original data is not lost although the compression rate is low. The lossy compression method is used for general image compression, and the lossless compression method is used in fields where high image quality is required.

ところで、可逆圧縮方式の画像符号化装置と非可逆圧縮方式の画像符号化装置とは、一般的には、別々の装置として構成されているが、高圧縮率の画像圧縮と高画質の画像圧縮とを状況に応じて使い分けたい場合もあり、このような使い分けを可能にするために、従来、高圧縮率の画像圧縮機能(非可逆圧縮機能)と高画質の画像圧縮機能(可逆圧縮機能)との二つの機能を一つの装置に組み込んだ画像符号化装置が提案されている(下記特開2009−105700号公報も参照)。   By the way, the lossless compression type image encoding device and the lossy compression type image encoding device are generally configured as separate devices, but high compression rate image compression and high image quality image compression. Depending on the situation, there are cases where you want to use them properly. In order to enable such use, conventionally, a high-compression image compression function (lossy compression function) and a high-quality image compression function (reversible compression function) There has been proposed an image encoding apparatus in which the two functions are incorporated into one apparatus (see also Japanese Unexamined Patent Application Publication No. 2009-105700 below).

このような非可逆圧縮機能と可逆圧縮機能との二つの機能を備えた画像符号化装置の一般的な構成を図3及び図4に示す。図3に示すように、この画像符号化装置100は、非可逆圧縮部110、可逆圧縮部130、入力切換部101及び出力切換部102を備えて構成される。   FIG. 3 and FIG. 4 show a general configuration of an image encoding apparatus having such two functions of a lossy compression function and a lossless compression function. As shown in FIG. 3, the image encoding device 100 includes an irreversible compression unit 110, a lossless compression unit 130, an input switching unit 101, and an output switching unit 102.

前記非可逆圧縮部110は、DCT部111、量子化部112、ジグザグスキャン部113及びハフマン符号化部114から構成され、可逆圧縮部130はハフマン符号化部131から構成される。   The lossy compression unit 110 includes a DCT unit 111, a quantization unit 112, a zigzag scanning unit 113, and a Huffman encoding unit 114, and the lossless compression unit 130 includes a Huffman encoding unit 131.

前記DCT部111は、RGBの色データからYUVの輝度色差データに変換された画像データを8×8画素のブロック単位で処理し、ブロック単位の各画素の画像データをそれぞれ周波数成分(DCT(Discrete Cosine Transform)係数と呼ばれる)に変換して、1個のDC(Direct Current)係数と63個のAC(Alternating Current)係数からなる係数データを生成する処理を行う。   The DCT unit 111 processes image data converted from RGB color data to YUV luminance color difference data in units of 8 × 8 pixel blocks, and converts the image data of each pixel in block units to frequency components (DCT (Discrete)). (Referred to as a Cosine Transform coefficient) to generate coefficient data composed of one DC (Direct Current) coefficient and 63 AC (Alternating Current) coefficients.

また、前記量子化部112は、前記DCT部111によりブロック単位で生成された8×8個の各係数データ(数値)を、予め用意された量子化テーブル(8×8個の数値を有するテーブル)の対応した各数値によりそれぞれ除算することによって量子化する処理を行う。また、前記ジグザグスキャン部113は、前記量子化部112において、ブロック単位で量子化された8×8個の係数データをジグザグにスキャンすることによって直線状に並べる(即ち、1次元に配列する)処理を行い、前記ハフマン符号化部114は、前記ジグザグスキャン部113によって1次元に配列されたブロック単位の各係数データを、ハフマン符号を用い符号化することによって符号データを生成する処理を行う。   In addition, the quantization unit 112 converts each 8 × 8 coefficient data (numerical value) generated by the DCT unit 111 in units of blocks into a quantization table (a table having 8 × 8 numerical values) prepared in advance. ) Quantization is performed by dividing by each corresponding numerical value. In addition, the zigzag scanning unit 113 linearly arranges the 8 × 8 coefficient data quantized in block units in the quantization unit 112 by scanning in a zigzag manner (that is, arranges it in one dimension). The Huffman encoder 114 performs a process of generating code data by encoding the coefficient data in units of blocks arranged one-dimensionally by the zigzag scan unit 113 using a Huffman code.

図4に示すように、ハフマン符号化部114は、マーカ記憶部115、分配器116、DC差分算出部117、DC成分符号化部118、ゼロランカウンタ部119、AC成分符号化部120及び符号連接部121から構成される。   As shown in FIG. 4, the Huffman encoding unit 114 includes a marker storage unit 115, a distributor 116, a DC difference calculation unit 117, a DC component encoding unit 118, a zero-run counter unit 119, an AC component encoding unit 120, and a code. The connecting part 121 is configured.

前記マーカ記憶部115は、詳しくは後述するマーカを記憶する機能部であり、マーカの一つとしてハフマン符号テーブルを定義するDHT(Define Huffman Table)マーカを記憶している。また、前記分配器116は、前記ジグザグスキャン部113からブロック単位で出力される係数データの内、DC係数データをDC差分算出部117に出力し、AC係数データを前記ゼロランカウンタ部119に出力する処理を行う。   The marker storage unit 115 is a functional unit that stores markers, which will be described in detail later, and stores a DHT (Define Huffman Table) marker that defines a Huffman code table as one of the markers. Further, the distributor 116 outputs DC coefficient data to the DC difference calculation unit 117 among the coefficient data output from the zigzag scanning unit 113 in units of blocks, and outputs AC coefficient data to the zero-run counter unit 119. Perform the process.

前記DC差分算出部117は、順次入力されるDC係数データを一時保持し、入力された現DC係数データと一つ前に入力された前DC係数データとの差分を算出して出力する処理を行い、DC成分符号化部118は、DC差分算出部117から出力された差分値を、前記マーカ記憶部115に格納されたDC成分用のハフマン符号化テーブルを用いて処理し、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して出力する処理を行う。   The DC difference calculation unit 117 temporarily stores sequentially input DC coefficient data, and calculates and outputs a difference between the input current DC coefficient data and the previous DC coefficient data input immediately before. The DC component encoding unit 118 processes the difference value output from the DC difference calculation unit 117 using the Huffman encoding table for DC component stored in the marker storage unit 115, and obtains group number information. A process of generating and outputting variable length code data in units of the encoded Huffman code and the subsequent additional bits related to the difference value is performed.

一方、前記ゼロランカウンタ部119は、順次入力されるAC係数データの値がゼロである場合に、値がゼロであるAC係数データが連続するその個数(ゼロラン情報)をカウントしてAC成分符号化部120に出力し、値がゼロでないAC係数データの場合には、そのままAC成分符号化部120に出力する処理部である。また、AC成分符号化部120は、前記ゼロランカウンタ部119から出力されるデータを、前記マーカ記憶部115に格納されたAC成分用のハフマン符号化テーブルを用いて処理し、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成して出力する処理を行う。   On the other hand, the zero-run counter unit 119 counts the number of consecutive AC coefficient data having a value of zero (zero-run information) when the value of the sequentially input AC coefficient data is zero, and determines the AC component code. In the case of AC coefficient data that is output to the encoding unit 120 and whose value is not zero, the processing unit outputs the AC coefficient data to the AC component encoding unit 120 as it is. Further, the AC component encoding unit 120 processes the data output from the zero-run counter unit 119 using the Huffman encoding table for the AC component stored in the marker storage unit 115, and the zero-run information and the group Processing for generating and outputting AC component variable length code data in units of additional bits related to the Huffman code obtained by encoding the number information and the AC coefficient value following the Huffman code is performed.

そして、前記符号連接部121は、前記マーカ記憶部115に格納された各種マーカ、前記DC成分符号化部118から出力される可変長符号データ、及び前記AC成分符号化部120から出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。   The code concatenation unit 121 includes various markers stored in the marker storage unit 115, variable length code data output from the DC component encoding unit 118, and variable output from the AC component encoding unit 120. The long code data is concatenated and output as one code data.

図5(a)に、このようにして生成される非可逆圧縮方式による符号データ(JPEGストリーム)のデータ構造を示す。図5(a)に示すように、この符号データは、各種マーカから構成される前部マーカ群と、符号化された圧縮画像データと、符号データの末尾を定義するEOI(End Of Image)マーカとを順次配置した構造を有する。   FIG. 5A shows the data structure of the code data (JPEG stream) generated by the lossy compression method as described above. As shown in FIG. 5A, this code data includes a front marker group composed of various markers, encoded compressed image data, and an EOI (End Of Image) marker that defines the end of the code data. Are sequentially arranged.

前記前部マーカ群には、符号データの先頭を定義するSOI(Start Of Image)マーカ、前記量子化テーブルを定義するDQT(Define Quantization Table)マーカ、フレームの開始を定義するとともに画像サイズを定義するSOF(Start Of Frame)マーカ、ハフマン符号テーブルを定義する前述したDHTマーカ、及び以降に圧縮画像データが存在することを定義するSOS(Start Of Scan)マーカが含まれる。また、圧縮画像データは、前記ブロック単位の可変長符号データが連続的に繋がった構造を有する。   The front marker group defines an SOI (Start Of Image) marker that defines the beginning of code data, a DQT (Define Quantization Table) marker that defines the quantization table, a frame start, and an image size. The SOF (Start Of Frame) marker, the DHT marker that defines the Huffman code table, and the SOS (Start Of Scan) marker that defines the presence of compressed image data thereafter are included. The compressed image data has a structure in which the variable length code data in units of blocks are continuously connected.

一方、前記ハフマン符号化部131は、マーカ記憶部132、差分算出部133、符号化部134及び符号連接部135から構成される。前記マーカ記憶部132は、前記マーカ記憶部115と同様に各種マーカを記憶する機能部であり、格納されるマーカの一つとしてハフマン符号テーブルを定義するDHTマーカを記憶している。   On the other hand, the Huffman encoding unit 131 includes a marker storage unit 132, a difference calculation unit 133, an encoding unit 134, and a code connecting unit 135. The marker storage unit 132 is a functional unit that stores various markers in the same manner as the marker storage unit 115, and stores a DHT marker that defines a Huffman code table as one of the stored markers.

前記差分算出部133は、順次入力される画像データを一時保持し、入力された現画像データと一つ前に入力された前画像データとの差分を算出して出力する処理を行い、符号化部134は、差分算出部133から出力された差分値を、前記マーカ記憶部132に格納されたDC成分用のハフマン符号化テーブルを用いて処理し、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して出力する処理を行う。   The difference calculating unit 133 temporarily stores sequentially input image data, performs a process of calculating and outputting a difference between the input current image data and the previous image data input immediately before, and performs encoding. The unit 134 processes the difference value output from the difference calculation unit 133 using the Huffman coding table for DC component stored in the marker storage unit 132, and encodes the group number information, and Subsequent processing for generating and outputting variable-length code data in units of additional bits related to the difference value is performed.

そして、前記符号連接部135は、前記マーカ記憶部132に格納された各種マーカ、及び前記符号化部134から出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。   The code concatenation unit 135 performs a process of concatenating various markers stored in the marker storage unit 132 and variable-length code data output from the encoding unit 134 and outputting the data as one code data.

図5(b)に、このようにして生成される可逆圧縮方式による符号データ(JPEGストリーム)のデータ構造を示す。図5(b)に示すように、この符号データは、各種マーカから構成される前部マーカ群と、符号化された圧縮画像データと、符号データの末尾を定義するEOI(End Of Image)マーカとを順次配置した構造を有する。尚、可逆圧縮方式における符号データの前部マーカ群は、DQTマーカを有していない点において、非可逆圧縮方式における符号データの前部マーカ群とは、その内容が異なる。   FIG. 5B shows the data structure of the code data (JPEG stream) generated in this way by the lossless compression method. As shown in FIG. 5B, this code data includes a front marker group composed of various markers, encoded compressed image data, and an EOI (End Of Image) marker that defines the end of the code data. Are sequentially arranged. The front marker group of code data in the lossless compression method is different from the front marker group of code data in the lossy compression method in that it does not have a DQT marker.

そして、前記入力切換部101は、外部から入力される切換信号により、画像データを、非可逆圧縮部110と可逆圧縮部130とに切り換えて入力する。具体的には、非可逆圧縮を要求する信号を受信すると、入力切換部101は画像データを非可逆圧縮部110に入力し、可逆圧縮を要求する信号を受信すると、入力切換部101は画像データを可逆圧縮部130に入力する。   The input switching unit 101 switches the image data to the irreversible compression unit 110 and the reversible compression unit 130 in accordance with a switching signal input from outside. Specifically, when a signal requesting lossy compression is received, the input switching unit 101 inputs image data to the lossy compression unit 110, and when receiving a signal requesting lossless compression, the input switching unit 101 receives image data. Is input to the lossless compression unit 130.

同様に、出力切換部102は、外部から入力される切換信号により、非可逆圧縮部110によって生成される符号データと、可逆圧縮部130によって生成される符号データとを切り換えて外部に出力する。具体的には、出力切換部102は、非可逆圧縮を要求する信号を受信すると、非可逆圧縮部110によって生成された符号データを出力し、可逆圧縮を要求する信号を受信すると、可逆圧縮部130によって生成された符号データを出力する。   Similarly, the output switching unit 102 switches between the code data generated by the lossy compression unit 110 and the code data generated by the lossless compression unit 130 according to a switching signal input from outside and outputs the code data to the outside. Specifically, when the output switching unit 102 receives a signal requesting lossy compression, the output switching unit 102 outputs the code data generated by the lossy compression unit 110, and when receiving a signal requesting lossless compression, the lossless compression unit The code data generated by 130 is output.

以上の構成を備えた画像符号化装置100によれば、非可逆圧縮を要求する信号が入力されると、入力切換部101を介して画像データが非可逆圧縮部110に入力され、当該非可逆圧縮部110によって生成された符号データが出力切換部102を介して外部に出力される。一方、可逆圧縮を要求する信号が入力されると、入力切換部101を介して画像データが可逆圧縮部130に入力され、当該可逆圧縮部130によって生成された符号データが出力切換部102を介して外部に出力される。このように、この画像符号化装置100によれば、画像データを、可逆圧縮方式又は非可逆圧縮方式のいずれかによって選択的に圧縮することができる。   According to the image coding apparatus 100 having the above configuration, when a signal requesting irreversible compression is input, image data is input to the irreversible compression unit 110 via the input switching unit 101, and Code data generated by the compression unit 110 is output to the outside via the output switching unit 102. On the other hand, when a signal requesting lossless compression is input, the image data is input to the lossless compression unit 130 via the input switching unit 101, and the code data generated by the lossless compression unit 130 is output via the output switching unit 102. Output to the outside. Thus, according to the image encoding device 100, the image data can be selectively compressed by either the lossless compression method or the lossy compression method.

特開2009−105700号公報JP 2009-105700 A

ところで、上述した従来の画像符号化装置100は、単に、非可逆圧縮部110と可逆圧縮部130とを並設したものであり、この画像符号化装置100を電子回路で構築した場合には、非可逆圧縮及び可逆圧縮に対してそれぞれ対応する電子回路が必要であるため、これらを別々の装置、即ち、それぞれ独立した電子回路とし構成した場合に比べて、回路規模は差ほど変わらないものであり、コスト的にあまりメリットが無いものであった。   By the way, the above-described conventional image encoding device 100 simply includes the irreversible compression unit 110 and the lossless compression unit 130 arranged in parallel, and when the image encoding device 100 is constructed by an electronic circuit, Since electronic circuits corresponding to irreversible compression and reversible compression are required, the circuit scale is not much different from the case where they are configured as separate devices, i.e., independent electronic circuits. There was no merit in terms of cost.

近年では、絶えず電子回路の小型が探求されており、画像符号化装置においても、回路規模の更なる小型化が求められている。そして、回路規模を小型にすることによって、装置の製造コストを低廉にすることができる。   In recent years, there has been a continuous search for electronic circuit miniaturization, and image coding apparatuses are also required to have a smaller circuit scale. And the manufacturing cost of an apparatus can be made low by making a circuit scale small.

本発明は以上の実情に鑑みなされたものであって、可逆圧縮と非可逆圧縮とを選択的に実行可能であり、しかも従来に比べて、回路規模の小型化を図ることができる画像符号化装置の提供を、その目的とする。   The present invention has been made in view of the above circumstances, and is capable of selectively executing lossless compression and lossy compression, and can further reduce the circuit scale as compared with the prior art. The purpose is to provide a device.

上記課題を解決するための本発明は、
画像データを、複行複列の所定画素数のブロック単位で周波数変換により係数化して、DC係数データ及びAC係数データを生成する周波数変換部と、
前記周波数変換部により生成された前記ブロック単位のDC係数データ及びAC係数データをそれぞれ量子化する量子化部と、
前記量子化部により量子化された前記ブロック単位のDC係数データ及びAC係数データをジグザグにスキャンして一列のデータに配列するジグザグスキャン部と、
前記ジグザグスキャン部により配列された前記ブロック単位のDC係数データ及びAC係数データを符号化する符号化部とを備えた画像符号化装置において、
前記画像データを、前記周波数変換部と前記符号化部とに切り換えて入力する第1入力切換部を更に備え、
前記符号化部は、
入力されたAC係数データをAC成分用のハフマン符号化テーブルを用いて処理し、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成するAC成分処理部と、
入力された現データと、その1つ前に入力された前データとの差分値を算出し、算出した差分値をDC成分用のハフマン符号化テーブルを用いて処理し、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成するDC成分処理部と、
前記DC成分処理部及び前記AC成分処理部に接続し、前記DC成分処理部からのみ可変長符号データが出力される場合には、出力される可変長符号データを順次連接して出力するとともに、前記DC成分処理部及び前記AC成分処理部から可変長符号データが出力される場合には、前記DC成分処理部及び前記AC成分処理部から出力される可変長符号データを順次連接して出力する符号連接部と、
前記ジグザグスキャン部に接続し、前記ジグザグスキャン部から出力される係数データをDC係数データとAC係数データとに分けて出力するとともに、前記AC係数データを前記AC成分処理部に出力するデータ分配部と、
前記データ分配部に接続し、前記データ分配部から出力されるDC係数データと前記第1入力切換部から入力される画像データとを切り換えて前記DC成分処理部に入力する第2入力切換部とを備えた画像符号化装置に係る。
The present invention for solving the above problems is as follows.
A frequency conversion unit that generates image coefficient data and AC coefficient data by converting image data into coefficients by frequency conversion in units of a predetermined number of pixels in double rows and multiple columns;
A quantization unit that quantizes each of the block-unit DC coefficient data and AC coefficient data generated by the frequency conversion unit;
A zigzag scanning unit that zigzags the block unit DC coefficient data and the AC coefficient data quantized by the quantization unit to arrange them in a line;
In an image encoding device including an encoding unit that encodes the DC coefficient data and the AC coefficient data in units of blocks arranged by the zigzag scanning unit,
A first input switching unit for switching and inputting the image data to the frequency conversion unit and the encoding unit;
The encoding unit includes:
The input AC coefficient data is processed using the AC component Huffman coding table, and the Huffman code obtained by encoding the zero-run information and the group number information, and the subsequent AC bits in units of additional bits related to the AC coefficient value. An AC component processing unit that generates component variable-length code data;
The difference value between the input current data and the previous data input immediately before is calculated, the calculated difference value is processed using a Huffman encoding table for DC components, and group number information is encoded A DC component processing unit that generates variable length code data in units of additional Huffman codes and subsequent additional bits related to the difference value;
When variable length code data is output only from the DC component processing unit connected to the DC component processing unit and the AC component processing unit, the output variable length code data is sequentially connected and output, and When variable length code data is output from the DC component processing unit and the AC component processing unit, the variable length code data output from the DC component processing unit and the AC component processing unit are sequentially connected and output. A sign concatenation,
A data distribution unit that is connected to the zigzag scanning unit and outputs the coefficient data output from the zigzag scanning unit separately into DC coefficient data and AC coefficient data, and outputs the AC coefficient data to the AC component processing unit When,
A second input switching unit that is connected to the data distribution unit and switches between the DC coefficient data output from the data distribution unit and the image data input from the first input switching unit, and is input to the DC component processing unit; The present invention relates to an image encoding device comprising:

この画像符号化装置によれば、外部から非可逆圧縮を要求する信号が入力されると、第1入力切換部はこの要求信号を受信して、入力される画像データを前記周波数変換部に入力する処理を行う。   According to this image encoding apparatus, when a signal requesting lossy compression is input from the outside, the first input switching unit receives this request signal and inputs the input image data to the frequency conversion unit. Perform the process.

そして、前記周波数変換部では、入力された画像データが前記ブロック単位で周波数変換により係数化されて、DC係数データ及びAC係数データが生成され、ついで、生成されたDC係数データ及びAC係数データがそれぞれ量子化部によって量子化され、量子化された前記ブロック単位のDC係数データ及びAC係数データがジグザグスキャン部により一列に配列されて、前記符号化部のデータ分配部に順次入力される。   In the frequency conversion unit, the input image data is converted into coefficients by frequency conversion in units of blocks to generate DC coefficient data and AC coefficient data, and then the generated DC coefficient data and AC coefficient data are The block unit DC coefficient data and the AC coefficient data quantized by the quantization unit are arranged in a line by the zigzag scanning unit and sequentially input to the data distribution unit of the encoding unit.

前記データ分配部は、前記ジグザグスキャン部から出力される係数データの内、DC係数データを前記第2入力切換部に出力し、AC係数データをAC成分処理部に出力する。そして、前記第2入力切換部は、外部から非可逆圧縮を要求する信号が入力される場合にはこれを受信して、前記データ分配部から入力されるDC係数データを前記DC成分処理部に入力する処理を行い、DC成分処理部は、順次入力される現DC係数データと、その1つ前に入力された前DC係数データとの差分値を算出し、算出した差分値をDC成分用のハフマン符号化テーブルを用い処理して、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して、前記符号連接部に出力する。   The data distribution unit outputs DC coefficient data among the coefficient data output from the zigzag scanning unit to the second input switching unit, and outputs AC coefficient data to the AC component processing unit. The second input switching unit receives a signal requesting irreversible compression from the outside, and receives the DC coefficient data input from the data distribution unit to the DC component processing unit. The DC component processing unit calculates a difference value between the current DC coefficient data that is sequentially input and the previous DC coefficient data that is input immediately before it, and the calculated difference value is used for the DC component. To generate variable length code data in units of additional bits related to the difference value, and a Huffman code obtained by encoding the group number information, and then to the code concatenation unit. Output.

一方、AC成分符号化部では、順次入力されるAC係数データをAC成分用のハフマン符号化テーブルを用い処理して、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成して、前記符号連接部に入力する。   On the other hand, the AC component encoding unit processes sequentially input AC coefficient data using an AC component Huffman encoding table, encodes the zero-run information and the group number information, and the subsequent AC coefficients. AC component variable-length code data is generated in units of additional bits related to numerical values, and input to the code concatenation unit.

そして、順次前記DC成分処理部及び前記AC成分処理部から出力される可変長符号データは、前記符号連接部により連接され、非可逆圧縮方式によって圧縮された符号データとして外部に出力される。   Then, the variable length code data sequentially output from the DC component processing unit and the AC component processing unit are concatenated by the code concatenating unit and output to the outside as code data compressed by the lossy compression method.

一方、外部から可逆圧縮を要求する信号が入力されると、前記第1入力切換部はこの要求信号を受信して、入力される画像データを前記符号化部の第2入力切換部に入力する。そして、第2入力切換部は、外部から前記可逆圧縮を要求する信号が入力される場合にはこれを受信して、前記第1入力切換部から順次入力される画像データを前記DC成分処理部に入力する処理を行い、DC成分処理部は、順次入力される現画像データと、その1つ前に入力された前画像データとの差分値を算出し、算出した差分値をDC成分用のハフマン符号化テーブルを用い処理して、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して、前記符号連接部に出力する。   On the other hand, when a signal requesting lossless compression is input from the outside, the first input switching unit receives this request signal and inputs the input image data to the second input switching unit of the encoding unit. . The second input switching unit receives the signal requesting the lossless compression from the outside, and receives the signal to input the image data sequentially input from the first input switching unit to the DC component processing unit. The DC component processing unit calculates a difference value between the current image data sequentially input and the previous image data input immediately before it, and the calculated difference value is used for the DC component. Process using the Huffman coding table to generate a Huffman code obtained by coding the group number information, and variable length code data in units of additional bits related to the difference value, and output to the code concatenation unit To do.

そして、DC成分処理部から順次出力される可変長符号データは、符号連接部により連接され、可逆圧縮方式によって圧縮された符号データとして外部に出力される。   The variable-length code data sequentially output from the DC component processing unit is concatenated by the code concatenation unit and output to the outside as code data compressed by the lossless compression method.

このように、本発明に係る画像符号化装置によれば、外部から可逆圧縮又は非可逆圧縮を要求する信号を入力することで、入力された要求に応じて画像データを圧縮した符号データ(圧縮画像データ)が生成され、出力される。   As described above, according to the image coding apparatus according to the present invention, by inputting a signal requesting lossless compression or lossy compression from the outside, code data (compression data) obtained by compressing image data in accordance with the input request. Image data) is generated and output.

そして、この画像符号化装置では、可逆圧縮と非可逆圧縮とを同一の符号化部において処理するようにしたので、当該画像符号化装置を電子回路で構築した場合に、可逆圧縮と非可逆圧縮とを別々の電子回路で構成した従来の画像符号化装置に比べて、その回路規模の小型化を図ることができ、その製造コストの低廉化を図ることができる。   In this image encoding device, lossless compression and lossy compression are processed in the same encoding unit. Therefore, when the image encoding device is constructed by an electronic circuit, lossless compression and lossy compression are performed. Compared to a conventional image encoding apparatus configured with separate electronic circuits, the circuit scale can be reduced, and the manufacturing cost can be reduced.

以上説明したように、本発明に係る画像符号化装置によれば、可逆圧縮又は非可逆圧縮の要求信号を入力することで、当該要求に応じて画像データを圧縮した符号データが生成され、外部に出力される。   As described above, according to the image coding apparatus according to the present invention, by inputting a request signal for lossless compression or lossy compression, code data obtained by compressing image data in response to the request is generated. Is output.

そして、この画像符号化装置では、可逆圧縮と非可逆圧縮とを同一の符号化部において処理するようにしたので、当該画像符号化装置を電子回路で構築した場合に、可逆圧縮と非可逆圧縮とを別々の電子回路で構成した従来の画像符号化装置に比べて、その回路規模の小型化を図ることができ、製造コストの低廉化を図ることができる。   In this image encoding device, lossless compression and lossy compression are processed in the same encoding unit. Therefore, when the image encoding device is constructed by an electronic circuit, lossless compression and lossy compression are performed. Compared to a conventional image encoding apparatus configured with separate electronic circuits, the circuit scale can be reduced, and the manufacturing cost can be reduced.

本発明の一実施形態に係る画像符号化装置の概略構成を示したブロック図である。It is the block diagram which showed schematic structure of the image coding apparatus which concerns on one Embodiment of this invention. 本実施形態に係る画像符号化装置のハフマン符号化部の構成を示したブロック図である。It is the block diagram which showed the structure of the Huffman encoding part of the image coding apparatus which concerns on this embodiment. 従来の画像符号化装置の概略構成を示したブロック図である。It is the block diagram which showed schematic structure of the conventional image coding apparatus. 従来の画像符号化装置におけるハフマン符号化部の構成を示したブロック図である。It is the block diagram which showed the structure of the Huffman encoding part in the conventional image coding apparatus. 圧縮した符号データのデータ構造を示す説明図であり、(a)は非可逆圧縮方式により圧縮した符号データのデータ構造を示した説明図、(b)は可逆圧縮方式により圧縮した符号データのデータ構造を示した説明図である。It is explanatory drawing which shows the data structure of the compressed code data, (a) is explanatory drawing which showed the data structure of the code data compressed by the lossy compression system, (b) is the data of the code data compressed by the lossless compression system It is explanatory drawing which showed the structure.

以下、本発明の一実施形態について図面を参照しながら説明する。図1に示すように、この画像符号化装置1は、第1入力切換部2、DCT部3、量子化部4、ジグザグスキャン部5及びハフマン符号化部6から構成される。尚、この前記画像符号化装置1は、適宜電子回路を備えた電子ディバイス(半導体集積回路等)によって実現することができる。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. As shown in FIG. 1, the image encoding device 1 includes a first input switching unit 2, a DCT unit 3, a quantization unit 4, a zigzag scanning unit 5, and a Huffman encoding unit 6. The image encoding device 1 can be realized by an electronic device (semiconductor integrated circuit or the like) provided with an electronic circuit as appropriate.

前記第1入力切換部2は、外部から選択的に入力される可逆圧縮を要求する信号、及び非可逆圧縮を要求する信号を受信し、非可逆圧縮を要求する信号を受信した場合には、順次入力される画像データをDCT部3に入力し、可逆圧縮を要求する信号を受信した場合には、順次入力される画像データを、詳しくは後述する第2入力切換部9に入力する処理を行う。   When the first input switching unit 2 receives a signal requesting reversible compression selectively input from the outside and a signal requesting irreversible compression, and receiving a signal requesting irreversible compression, When the sequentially input image data is input to the DCT unit 3 and a signal requesting lossless compression is received, a process of inputting the sequentially input image data to the second input switching unit 9 described later in detail. Do.

前記DCT部3は、上述した従来のDCT部111と同様に、RGBの色データからYUVの輝度色差データに変換された画像データを8×8画素のブロック単位で処理し、ブロック単位の各画素の画像データをそれぞれ周波数変換して、1個のDC係数と63個のAC係数からなる係数データを生成する処理を行う。   Similar to the conventional DCT unit 111 described above, the DCT unit 3 processes image data converted from RGB color data to YUV luminance color difference data in units of 8 × 8 pixels, and each pixel in units of blocks. Each of the image data is frequency-converted to generate coefficient data composed of one DC coefficient and 63 AC coefficients.

また、前記量子化部4は、上述した従来の量子化部112と同様に、前記DCT部3によりブロック単位で生成された8×8個の各係数データ(数値)を、予め用意された量子化テーブル(8×8個の数値を有するテーブル)の対応した各数値によりそれぞれ除算することによって量子化する処理を行う。   Also, the quantization unit 4, similar to the above-described conventional quantization unit 112, uses 8 × 8 coefficient data (numerical values) generated by the DCT unit 3 in units of blocks, The quantization process is performed by dividing each of the corresponding numerical values in the quantization table (table having 8 × 8 numerical values).

また、前記ジグザグスキャン部5は、上述した従来のジグザグスキャン部5と同様に、ブロック単位で量子化された8×8個の係数データをジグザグにスキャンすることによって直線状に並べる(即ち、1次元に配列する)処理を行う。   Similarly to the conventional zigzag scanning unit 5 described above, the zigzag scanning unit 5 linearly arranges 8 × 8 coefficient data quantized in units of blocks in a zigzag manner (that is, 1 Process).

前記ハフマン符号化部6は、図2に示すように、マーカ記憶部7、分配器8、ゼロランカウンタ部10、AC成分符号化部11、差分算出部12、DC成分符号化部13及び符号連接部14から構成される。   As shown in FIG. 2, the Huffman encoding unit 6 includes a marker storage unit 7, a distributor 8, a zero-run counter unit 10, an AC component encoding unit 11, a difference calculation unit 12, a DC component encoding unit 13, and a code. It is composed of a connecting part 14.

前記マーカ記憶部7は、上述した従来のマーカ記憶部115と同様に各種マーカを記憶する機能部であり、具体的には、このマーカ記憶部7には、符号データの前部マーカ群を構成する前記SOIマーカ、DQTマーカ、SOFマーカ、DHTマーカ及びSOSマーカ、並びに符号データの末尾を定義するEOIマーカが格納される。   The marker storage unit 7 is a functional unit that stores various markers in the same manner as the conventional marker storage unit 115 described above. Specifically, the marker storage unit 7 includes a front marker group of code data. The SOI marker, DQT marker, SOF marker, DHT marker, SOS marker, and EOI marker that defines the end of the code data are stored.

前記分配器8は、前記ジグザグスキャン部5から前記ブロック単位で出力される係数データの内、DC係数データを第2入力切換部9に出力し、AC係数データを前記ゼロランカウンタ部10に出力する処理を行う。そして、前記第2入力切換部9は、前記第1入力切換部2と同様に、外部から選択的に入力される可逆圧縮を要求する信号、及び非可逆圧縮を要求する信号を受信し、非可逆圧縮を要求する信号を受信した場合には、前記分配器8から順次入力されるDC係数データを前記差分算出部12に入力し、可逆圧縮を要求する信号を受信した場合には、前記第1入力切換部2から順次入力される画像データを前記差分算出部12に入力する処理を行う。   The distributor 8 outputs DC coefficient data to the second input switching unit 9 among the coefficient data output from the zigzag scanning unit 5 in units of blocks, and outputs AC coefficient data to the zero-run counter unit 10. Perform the process. Similarly to the first input switching unit 2, the second input switching unit 9 receives a signal requesting reversible compression selectively input from the outside and a signal requesting irreversible compression. When a signal requesting lossless compression is received, DC coefficient data sequentially input from the distributor 8 is input to the difference calculation unit 12, and when a signal requesting lossless compression is received, the first A process of inputting image data sequentially input from the 1-input switching unit 2 to the difference calculation unit 12 is performed.

前記ゼロランカウンタ部10は、前記分配器8から順次入力されるAC係数データの値がゼロである場合に、値がゼロであるAC係数データが連続するその個数(ゼロラン情報)をカウントしてAC成分符号化部11に出力し、値がゼロでないAC係数データの場合には、そのままAC成分符号化部11に出力する処理を行う。   When the value of the AC coefficient data sequentially input from the distributor 8 is zero, the zero run counter unit 10 counts the number (zero run information) of consecutive AC coefficient data having a value of zero. In the case of AC coefficient data that is output to the AC component encoding unit 11 and whose value is not zero, a process of outputting to the AC component encoding unit 11 as it is is performed.

そして、AC成分符号化部11は、前記ゼロランカウンタ部10から出力されるデータを、前記マーカ記憶部7に格納されたAC成分用のハフマン符号化テーブルを用い処理して、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成して出力する処理を行う。   Then, the AC component encoding unit 11 processes the data output from the zero run counter unit 10 using the Huffman encoding table for the AC component stored in the marker storage unit 7 to obtain the zero run information and the group Processing for generating and outputting AC component variable length code data in units of additional bits related to the Huffman code obtained by encoding the number information and the AC coefficient value following the Huffman code is performed.

一方、前記差分算出部12は、前記第2入力切換部9から順次出力されるDC係数データ又は画像データを処理する機能部であり、前記第2入力切換部9から順次出力されるデータを入力して一時保持し、入力された現データと一つ前に入力された前データとの差分を算出して出力する処理を行う。   On the other hand, the difference calculation unit 12 is a functional unit that processes DC coefficient data or image data sequentially output from the second input switching unit 9, and inputs data sequentially output from the second input switching unit 9. Then, a process of temporarily holding and calculating and outputting a difference between the input current data and the previous data input immediately before is performed.

また、前記DC成分符号化部13は、差分算出部12から出力された差分値を、前記マーカ記憶部7に格納されたDC成分用のハフマン符号化テーブルを用い処理して、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して出力する処理を行う。尚、非可逆圧縮においてDC係数データの差分値を符号化するハフマン符号化テーブルと、可逆圧縮において画像データの差分値を符号化するハフマン符号化テーブルとは、同じテーブルが用いることができ、本例では同じテーブルを用いている。   Further, the DC component encoding unit 13 processes the difference value output from the difference calculation unit 12 using the Huffman encoding table for DC component stored in the marker storage unit 7 to obtain group number information. A process of generating and outputting variable length code data in units of the encoded Huffman code and the subsequent additional bits related to the difference value is performed. Note that the same table can be used as the Huffman encoding table for encoding the difference value of the DC coefficient data in the lossy compression and the Huffman encoding table for encoding the difference value of the image data in the lossless compression. The same table is used in the example.

前記符号連接部14は、前記DC成分符号化部13からのみ可変長符号データが出力される場合、即ち、可逆圧縮の場合には、前記マーカ記憶部7に格納された各種マーカの内、可逆圧縮用のマーカを読み出して、読み出したマーカ、前記DC成分符号化部13から順次出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。   When the variable-length code data is output only from the DC component encoding unit 13, that is, in the case of lossless compression, the code connecting unit 14 is a reversible among the various markers stored in the marker storage unit 7. The compression marker is read out, and the read marker and the variable length code data sequentially output from the DC component encoding unit 13 are concatenated and output as one code data.

一方、前記DC成分符号化部13及び前記AC成分符号化部11から可変長符号データが出力される場合、即ち、非可逆圧縮の場合には、前記符号連接部14は、前記マーカ記憶部7に格納された各種マーカの内、非可逆圧縮用のマーカを読み出して、読み出したマーカ、前記DC成分符号化部13から出力される可変長符号データ及び前記AC成分符号化部11から出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。   On the other hand, when variable-length code data is output from the DC component encoding unit 13 and the AC component encoding unit 11, that is, in the case of lossy compression, the code concatenating unit 14 includes the marker storage unit 7 Among the various markers stored in, the lossy compression marker is read out, the read marker, the variable length code data output from the DC component encoding unit 13 and the AC component encoding unit 11 are output. The variable length code data is concatenated and output as one code data.

尚、上述したように、可逆圧縮用のマーカと非可逆圧縮用のマーカとは、可逆圧縮用の前部マーカ群がDQTマーカを有していない点において、非可逆圧縮用の前部マーカ群とは、その内容が異なり、可逆圧縮による符号データは図5(b)に示したデータ構造を有し、非可逆圧縮による符号データは図5(a)に示したデータ構造を有する。   As described above, the lossless compression marker and the lossy compression marker are the lossy compression front marker group in that the lossless compression front marker group does not have a DQT marker. The code data by reversible compression has the data structure shown in FIG. 5B, and the code data by lossy compression has the data structure shown in FIG. 5A.

以上の構成を備えた本例の画像符号化装置1によれば、外部から非可逆圧縮を要求する信号が入力される場合には、第1入力切換部2はこの要求信号を受信して、入力される画像データを前記DCT部3に入力し、DCT部3では、入力された画像データが前記ブロック単位で周波数変換により係数化されて、DC係数データ及びAC係数データが生成され、ついで、生成されたDC係数データ及びAC係数データがそれぞれ前記量子化部4により量子化され、量子化された前記ブロック単位のDC係数データ及びAC係数データが前記ジグザグスキャン部5により一列に配列されて、前記ハフマン符号化部6の分配器8に順次入力される。   According to the image encoding device 1 of the present example having the above configuration, when a signal requesting lossy compression is input from the outside, the first input switching unit 2 receives this request signal, The input image data is input to the DCT unit 3. In the DCT unit 3, the input image data is coefficientized by frequency conversion in units of blocks to generate DC coefficient data and AC coefficient data. The generated DC coefficient data and AC coefficient data are respectively quantized by the quantizing unit 4, and the quantized DC coefficient data and AC coefficient data in units of blocks are arranged in a line by the zigzag scanning unit 5, The signals are sequentially input to the distributor 8 of the Huffman encoder 6.

前記分配器8では、前記ジグザグスキャン部5から出力される係数データの内、DC係数データを前記第2入力切換部9に出力し、AC係数データをゼロランカウンタ部10に出力する。そして、前記第2入力切換部9は、非可逆圧縮に係る前記要求信号を受信して、前記分配器8から入力されるDC係数データを前記差分算出部12に出力し、当該差分算出部12では順次入力される前後のDC係数データの差分を算出して前記DC成分符号化部13に出力し、DC成分符号化部13は入力された差分値を前記マーカ記憶部7に格納されたDC成分用のハフマン符号化テーブルを用い処理して、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して、前記符号連接部14に入力する。   The distributor 8 outputs DC coefficient data among the coefficient data output from the zigzag scanning unit 5 to the second input switching unit 9 and outputs AC coefficient data to the zero-run counter unit 10. Then, the second input switching unit 9 receives the request signal related to irreversible compression, outputs the DC coefficient data input from the distributor 8 to the difference calculation unit 12, and the difference calculation unit 12 Calculates the difference between the DC coefficient data before and after sequentially input and outputs the difference to the DC component encoding unit 13, and the DC component encoding unit 13 stores the input difference value in the DC stored in the marker storage unit 7. Processing using the component Huffman coding table to generate a Huffman code obtained by coding group number information and variable length code data in units of additional bits related to the difference value following the Huffman code. Input to section 14.

一方、前記ゼロランカウンタ部10では、前記分配器8から順次入力されるAC係数データの値がゼロである場合に、値がゼロであるAC係数データが連続するその個数(ゼロラン情報)をカウントしてAC成分符号化部11に出力し、値がゼロでないAC係数データの場合には、そのままAC成分符号化部11に出力する処理が行われ、前記AC成分符号化部11は、前記ゼロランカウンタ部10から出力されるデータを、前記マーカ記憶部7に格納されたAC成分用のハフマン符号化テーブルを用い処理して、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成して、前記符号連接部14に入力する。   On the other hand, when the value of the AC coefficient data sequentially input from the distributor 8 is zero, the zero run counter unit 10 counts the number of consecutive AC coefficient data having a value of zero (zero run information). In the case of AC coefficient data having a value that is not zero, the AC component encoding unit 11 performs a process of outputting the AC component data as it is to the AC component encoding unit 11. The data output from the run counter unit 10 is processed using the AC component Huffman encoding table stored in the marker storage unit 7 to encode the zero run information and the group number information, and to this The variable length code data of the AC component in units of additional bits related to the subsequent AC coefficient value is generated and input to the code concatenation unit 14.

そして、符号連接部14において、前記マーカ記憶部7に格納された非可逆圧縮用のマーカ、並びに順次DC成分符号化部13及びAC成分符号化部11から出力される可変長符号データが連接され、非可逆圧縮方式によって圧縮された符号データとして外部に出力される。   In the code concatenation unit 14, the lossy compression markers stored in the marker storage unit 7 and the variable length code data sequentially output from the DC component encoding unit 13 and the AC component encoding unit 11 are concatenated. The data is output to the outside as code data compressed by a lossy compression method.

一方、外部から可逆圧縮を要求する信号が入力される場合には、前記第1入力切換部2はこの要求信号を受信して、順次入力される画像データを前記ハフマン符号化部6の第2入力切換部9に入力する。そして、第2入力切換部9は、前記可逆圧縮に係る要求信号を受信すると、前記第1入力切換部2から順次入力される画像データを前記差分算出部12に入力し、差分算出部12は順次入力される前後の画像データの差分を算出してDC成分符号化部13に出力し、DC成分符号化部13は入力された差分値を前記マーカ記憶部7に格納されたDC成分用のハフマン符号化テーブルを用い処理して、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して、前記符号連接部14に入力する。   On the other hand, when a signal requesting reversible compression is input from the outside, the first input switching unit 2 receives the request signal, and sequentially inputs image data to the second Huffman encoding unit 6. Input to the input switching unit 9. When the second input switching unit 9 receives the request signal related to the lossless compression, the second input switching unit 9 inputs the image data sequentially input from the first input switching unit 2 to the difference calculating unit 12, and the difference calculating unit 12 The difference between the image data before and after sequentially input is calculated and output to the DC component encoding unit 13, and the DC component encoding unit 13 uses the input difference value for the DC component stored in the marker storage unit 7. Processing using the Huffman coding table generates Huffman code obtained by coding the group number information, and variable length code data in units of additional bits related to the difference value following the Huffman code. input.

そして、符号連接部14において、前記マーカ記憶部7に格納された可逆圧縮用のマーカ、及びDC成分符号化部13から順次出力される可変長符号データが連接され、可逆圧縮方式によって圧縮された符号データとして外部に出力される。   In the code concatenation unit 14, the lossless compression marker stored in the marker storage unit 7 and the variable length code data sequentially output from the DC component encoding unit 13 are concatenated and compressed by the lossless compression method. It is output to the outside as code data.

このように、本例の画像符号化装置1によれば、外部から可逆圧縮又は非可逆圧縮を要求する信号を入力することで、入力された要求に応じて画像データを圧縮した符号データ(圧縮画像データ)が生成され、出力される。   As described above, according to the image encoding device 1 of the present example, by inputting a signal requesting lossless compression or lossy compression from the outside, code data (compressed) that compresses image data in accordance with the input request. Image data) is generated and output.

また、この画像符号化装置1では、可逆圧縮と非可逆圧縮とを同一のハフマン符号化部6において処理するようにしたので、当該画像符号化装置1を電子回路で構築する場合に、可逆圧縮と非可逆圧縮とを別々の電子回路で構成した場合に比べて、その回路規模の小型化を図ることができ、その製造コストの低廉化を図ることができる。   Further, in this image encoding device 1, the lossless compression and the lossy compression are processed by the same Huffman encoding unit 6, so that when the image encoding device 1 is constructed by an electronic circuit, the lossless compression is performed. Compared with the case where the lossy compression and the lossy compression are configured by separate electronic circuits, the circuit scale can be reduced, and the manufacturing cost can be reduced.

以上、本発明の一実施形態について説明したが、本発明が採り得る具体的な態様は、何らこれに限定されるものではない。   As mentioned above, although one Embodiment of this invention was described, the specific aspect which this invention can take is not limited to this at all.

例えば、上述した画像符号化装置1は、CPU、RAM、ROMなどを含むコンピュータからこれを構成することができ、前記第1入力切換部2、DCT部3、量子化部4及びジグザグスキャン部5は、適宜コンピュータプログラムによってその機能を実現することができる。また、ハフマン符号化部6における、分配器8、第2入力切換部9、ゼロランカウンタ部10、AC成分符号化部11、差分算出部12、DC成分符号化部13及び符号連接部14も適宜コンピュータプログラムによってその機能を実現することができ、マーカ記憶部7はRAMなどの適宜記憶媒体から構成することができる。   For example, the above-described image encoding device 1 can be configured from a computer including a CPU, a RAM, a ROM, and the like. The first input switching unit 2, the DCT unit 3, the quantization unit 4, and the zigzag scanning unit 5. The function can be realized by a computer program as appropriate. Further, the distributor 8, the second input switching unit 9, the zero run counter unit 10, the AC component encoding unit 11, the difference calculation unit 12, the DC component encoding unit 13 and the code concatenation unit 14 in the Huffman encoding unit 6 are also provided. The function can be realized by an appropriate computer program, and the marker storage unit 7 can be configured from an appropriate storage medium such as a RAM.

1 画像符号化装置
2 第1入力切換部
3 DCT部
4 量子化部
5 ジグザグスキャン部
6 ハフマン符号化部
7 マーカ記憶部
8 分配器
9 第2入力切換部
10 ゼロランカウンタ部
11 AC成分符号化部
12 差分算出部
13 DC成分符号化部
14 符号連接部
DESCRIPTION OF SYMBOLS 1 Image coding apparatus 2 1st input switching part 3 DCT part 4 Quantization part 5 Zigzag scanning part 6 Huffman encoding part 7 Marker memory | storage part 8 Distributor 9 2nd input switching part 10 Zero run counter part 11 AC component encoding Unit 12 difference calculation unit 13 DC component encoding unit 14 code concatenation unit

Claims (1)

画像データを、複行複列の所定画素数のブロック単位で周波数変換により係数化して、DC係数データ及びAC係数データを生成する周波数変換部と、
前記周波数変換部により生成された前記ブロック単位のDC係数データ及びAC係数データをそれぞれ量子化する量子化部と、
前記量子化部により量子化された前記ブロック単位のDC係数データ及びAC係数データをジグザグにスキャンして一列のデータに配列するジグザグスキャン部と、
前記ジグザグスキャン部により配列された前記ブロック単位のDC係数データ及びAC係数データを符号化する符号化部とを備えた画像符号化装置において、
前記画像データを、前記周波数変換部と前記符号化部とに切り換えて入力する第1入力切換部を更に備え、
前記符号化部は、
入力されたAC係数データをAC成分用のハフマン符号化テーブルを用いて処理し、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成するAC成分処理部と、
入力された現データと、その1つ前に入力された前データとの差分値を算出し、算出した差分値をDC成分用のハフマン符号化テーブルを用いて処理し、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成するDC成分処理部と、
前記DC成分処理部及び前記AC成分処理部に接続し、前記DC成分処理部からのみ可変長符号データが出力される場合には、出力される可変長符号データを順次連接して出力するとともに、前記DC成分処理部及び前記AC成分処理部から可変長符号データが出力される場合には、前記DC成分処理部及び前記AC成分処理部から出力される可変長符号データを順次連接して出力する符号連接部と、
前記ジグザグスキャン部に接続し、前記ジグザグスキャン部から出力される係数データをDC係数データとAC係数データとに分けて出力するとともに、前記AC係数データを前記AC成分処理部に出力するデータ分配部と、
前記データ分配部に接続し、前記データ分配部から出力されるDC係数データと前記第1入力切換部から入力される画像データとを切り換えて前記DC成分処理部に入力する第2入力切換部とを備えていることを特徴とする画像符号化装置。


A frequency conversion unit that generates image coefficient data and AC coefficient data by converting image data into coefficients by frequency conversion in units of a predetermined number of pixels in double rows and multiple columns;
A quantization unit that quantizes each of the block-unit DC coefficient data and AC coefficient data generated by the frequency conversion unit;
A zigzag scanning unit that zigzags the block unit DC coefficient data and the AC coefficient data quantized by the quantization unit to arrange them in a line;
In an image encoding device including an encoding unit that encodes the DC coefficient data and the AC coefficient data in units of blocks arranged by the zigzag scanning unit,
A first input switching unit for switching and inputting the image data to the frequency conversion unit and the encoding unit;
The encoding unit includes:
The input AC coefficient data is processed using the AC component Huffman coding table, and the Huffman code obtained by encoding the zero-run information and the group number information, and the subsequent AC bits in units of additional bits related to the AC coefficient value. An AC component processing unit that generates component variable-length code data;
The difference value between the input current data and the previous data input immediately before is calculated, the calculated difference value is processed using a Huffman encoding table for DC components, and group number information is encoded A DC component processing unit that generates variable length code data in units of additional Huffman codes and subsequent additional bits related to the difference value;
When variable length code data is output only from the DC component processing unit connected to the DC component processing unit and the AC component processing unit, the output variable length code data is sequentially connected and output, and When variable length code data is output from the DC component processing unit and the AC component processing unit, the variable length code data output from the DC component processing unit and the AC component processing unit are sequentially connected and output. A sign concatenation,
A data distribution unit that is connected to the zigzag scanning unit and outputs the coefficient data output from the zigzag scanning unit separately into DC coefficient data and AC coefficient data, and outputs the AC coefficient data to the AC component processing unit When,
A second input switching unit that is connected to the data distribution unit and switches between the DC coefficient data output from the data distribution unit and the image data input from the first input switching unit, and is input to the DC component processing unit; An image encoding device comprising:


JP2017105472A 2017-05-29 2017-05-29 Picture encoder Pending JP2018201143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017105472A JP2018201143A (en) 2017-05-29 2017-05-29 Picture encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017105472A JP2018201143A (en) 2017-05-29 2017-05-29 Picture encoder

Publications (1)

Publication Number Publication Date
JP2018201143A true JP2018201143A (en) 2018-12-20

Family

ID=64668389

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017105472A Pending JP2018201143A (en) 2017-05-29 2017-05-29 Picture encoder

Country Status (1)

Country Link
JP (1) JP2018201143A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020138352A1 (en) * 2018-12-26 2020-07-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020138352A1 (en) * 2018-12-26 2020-07-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device

Similar Documents

Publication Publication Date Title
JP3992303B2 (en) Signal compression apparatus, signal expansion apparatus, signal compression method, and signal expansion method
JP2018532316A (en) Video decoder adaptation for high dynamic range (HDR) video coding using core video standards
KR102120571B1 (en) Entropy coding techniques for display stream compression (DSC) of non-4:4:4 chroma sub-sampling
JP2014520493A (en) Lossless coding and related signaling methods for composite video
US20060067582A1 (en) Progressive JPEG decoding system
EP1292152B1 (en) Image processing apparatus, and image processing method
TWI705693B (en) Apparatus and method for vector-based entropy coding for display stream compression
KR101710619B1 (en) Method and apparatus for successively encoding/decoding image
JP2018201143A (en) Picture encoder
US8233729B2 (en) Method and apparatus for generating coded block pattern for highpass coefficients
US20090304073A1 (en) Systems and Methods for the Bandwidth Efficient Processing of Data
JPH0487460A (en) Picture processor
JP3952116B2 (en) Image compression apparatus and method
JP2019022040A (en) Image decoding device
JP4241517B2 (en) Image encoding apparatus and image decoding apparatus
CN107925771B (en) Method, system, storage medium and imaging device for video processing
US11943477B2 (en) Methods and apparatus for successive intra block prediction
JP7121584B2 (en) Image encoding device and its control method and program
US10841595B2 (en) Methods and apparatus for transform coefficient encoding and decoding
KR100740646B1 (en) Method for controling bit rate in encoding type of jpeg image and apparatus tehrefor
JP2668900B2 (en) High efficiency coding device
JP6821184B2 (en) Image decoder
US20210076047A1 (en) System, apparatus and method for data compaction and decompaction
JPH10163880A (en) Data decoder
CN114157871A (en) Video encoding and decoding method, device, equipment and storage medium

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20190520

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20190618