JP2018201143A - Picture encoder - Google Patents
Picture encoder Download PDFInfo
- 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
Links
Images
Abstract
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
前記非可逆圧縮部110は、DCT部111、量子化部112、ジグザグスキャン部113及びハフマン符号化部114から構成され、可逆圧縮部130はハフマン符号化部131から構成される。
The
前記DCT部111は、RGBの色データからYUVの輝度色差データに変換された画像データを8×8画素のブロック単位で処理し、ブロック単位の各画素の画像データをそれぞれ周波数成分(DCT(Discrete Cosine Transform)係数と呼ばれる)に変換して、1個のDC(Direct Current)係数と63個のAC(Alternating Current)係数からなる係数データを生成する処理を行う。
The
また、前記量子化部112は、前記DCT部111によりブロック単位で生成された8×8個の各係数データ(数値)を、予め用意された量子化テーブル(8×8個の数値を有するテーブル)の対応した各数値によりそれぞれ除算することによって量子化する処理を行う。また、前記ジグザグスキャン部113は、前記量子化部112において、ブロック単位で量子化された8×8個の係数データをジグザグにスキャンすることによって直線状に並べる(即ち、1次元に配列する)処理を行い、前記ハフマン符号化部114は、前記ジグザグスキャン部113によって1次元に配列されたブロック単位の各係数データを、ハフマン符号を用い符号化することによって符号データを生成する処理を行う。
In addition, the
図4に示すように、ハフマン符号化部114は、マーカ記憶部115、分配器116、DC差分算出部117、DC成分符号化部118、ゼロランカウンタ部119、AC成分符号化部120及び符号連接部121から構成される。
As shown in FIG. 4, the Huffman
前記マーカ記憶部115は、詳しくは後述するマーカを記憶する機能部であり、マーカの一つとしてハフマン符号テーブルを定義するDHT(Define Huffman Table)マーカを記憶している。また、前記分配器116は、前記ジグザグスキャン部113からブロック単位で出力される係数データの内、DC係数データをDC差分算出部117に出力し、AC係数データを前記ゼロランカウンタ部119に出力する処理を行う。
The
前記DC差分算出部117は、順次入力されるDC係数データを一時保持し、入力された現DC係数データと一つ前に入力された前DC係数データとの差分を算出して出力する処理を行い、DC成分符号化部118は、DC差分算出部117から出力された差分値を、前記マーカ記憶部115に格納されたDC成分用のハフマン符号化テーブルを用いて処理し、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して出力する処理を行う。
The DC
一方、前記ゼロランカウンタ部119は、順次入力されるAC係数データの値がゼロである場合に、値がゼロであるAC係数データが連続するその個数(ゼロラン情報)をカウントしてAC成分符号化部120に出力し、値がゼロでないAC係数データの場合には、そのままAC成分符号化部120に出力する処理部である。また、AC成分符号化部120は、前記ゼロランカウンタ部119から出力されるデータを、前記マーカ記憶部115に格納されたAC成分用のハフマン符号化テーブルを用いて処理し、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成して出力する処理を行う。
On the other hand, the zero-
そして、前記符号連接部121は、前記マーカ記憶部115に格納された各種マーカ、前記DC成分符号化部118から出力される可変長符号データ、及び前記AC成分符号化部120から出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。
The
図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
前記差分算出部133は、順次入力される画像データを一時保持し、入力された現画像データと一つ前に入力された前画像データとの差分を算出して出力する処理を行い、符号化部134は、差分算出部133から出力された差分値を、前記マーカ記憶部132に格納されたDC成分用のハフマン符号化テーブルを用いて処理し、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して出力する処理を行う。
The
そして、前記符号連接部135は、前記マーカ記憶部132に格納された各種マーカ、及び前記符号化部134から出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。
The
図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
同様に、出力切換部102は、外部から入力される切換信号により、非可逆圧縮部110によって生成される符号データと、可逆圧縮部130によって生成される符号データとを切り換えて外部に出力する。具体的には、出力切換部102は、非可逆圧縮を要求する信号を受信すると、非可逆圧縮部110によって生成された符号データを出力し、可逆圧縮を要求する信号を受信すると、可逆圧縮部130によって生成された符号データを出力する。
Similarly, the
以上の構成を備えた画像符号化装置100によれば、非可逆圧縮を要求する信号が入力されると、入力切換部101を介して画像データが非可逆圧縮部110に入力され、当該非可逆圧縮部110によって生成された符号データが出力切換部102を介して外部に出力される。一方、可逆圧縮を要求する信号が入力されると、入力切換部101を介して画像データが可逆圧縮部130に入力され、当該可逆圧縮部130によって生成された符号データが出力切換部102を介して外部に出力される。このように、この画像符号化装置100によれば、画像データを、可逆圧縮方式又は非可逆圧縮方式のいずれかによって選択的に圧縮することができる。
According to the
ところで、上述した従来の画像符号化装置100は、単に、非可逆圧縮部110と可逆圧縮部130とを並設したものであり、この画像符号化装置100を電子回路で構築した場合には、非可逆圧縮及び可逆圧縮に対してそれぞれ対応する電子回路が必要であるため、これらを別々の装置、即ち、それぞれ独立した電子回路とし構成した場合に比べて、回路規模は差ほど変わらないものであり、コスト的にあまりメリットが無いものであった。
By the way, the above-described conventional
近年では、絶えず電子回路の小型が探求されており、画像符号化装置においても、回路規模の更なる小型化が求められている。そして、回路規模を小型にすることによって、装置の製造コストを低廉にすることができる。 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.
以下、本発明の一実施形態について図面を参照しながら説明する。図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
前記第1入力切換部2は、外部から選択的に入力される可逆圧縮を要求する信号、及び非可逆圧縮を要求する信号を受信し、非可逆圧縮を要求する信号を受信した場合には、順次入力される画像データをDCT部3に入力し、可逆圧縮を要求する信号を受信した場合には、順次入力される画像データを、詳しくは後述する第2入力切換部9に入力する処理を行う。
When the first
前記DCT部3は、上述した従来のDCT部111と同様に、RGBの色データからYUVの輝度色差データに変換された画像データを8×8画素のブロック単位で処理し、ブロック単位の各画素の画像データをそれぞれ周波数変換して、1個のDC係数と63個のAC係数からなる係数データを生成する処理を行う。
Similar to the
また、前記量子化部4は、上述した従来の量子化部112と同様に、前記DCT部3によりブロック単位で生成された8×8個の各係数データ(数値)を、予め用意された量子化テーブル(8×8個の数値を有するテーブル)の対応した各数値によりそれぞれ除算することによって量子化する処理を行う。
Also, the quantization unit 4, similar to the above-described
また、前記ジグザグスキャン部5は、上述した従来のジグザグスキャン部5と同様に、ブロック単位で量子化された8×8個の係数データをジグザグにスキャンすることによって直線状に並べる(即ち、1次元に配列する)処理を行う。
Similarly to the conventional
前記ハフマン符号化部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-
前記マーカ記憶部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
前記分配器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
前記ゼロランカウンタ部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
そして、AC成分符号化部11は、前記ゼロランカウンタ部10から出力されるデータを、前記マーカ記憶部7に格納されたAC成分用のハフマン符号化テーブルを用い処理して、ゼロラン情報及びグループ番号情報を符号化したハフマン符号、並びにこれに続くAC係数値に係る付加ビットを単位としたAC成分の可変長符号データを生成して出力する処理を行う。
Then, the AC component encoding unit 11 processes the data output from the zero
一方、前記差分算出部12は、前記第2入力切換部9から順次出力されるDC係数データ又は画像データを処理する機能部であり、前記第2入力切換部9から順次出力されるデータを入力して一時保持し、入力された現データと一つ前に入力された前データとの差分を算出して出力する処理を行う。
On the other hand, the
また、前記DC成分符号化部13は、差分算出部12から出力された差分値を、前記マーカ記憶部7に格納されたDC成分用のハフマン符号化テーブルを用い処理して、グループ番号情報を符号化したハフマン符号、並びにこれに続く前記差分値に係る付加ビットを単位とした可変長符号データを生成して出力する処理を行う。尚、非可逆圧縮においてDC係数データの差分値を符号化するハフマン符号化テーブルと、可逆圧縮において画像データの差分値を符号化するハフマン符号化テーブルとは、同じテーブルが用いることができ、本例では同じテーブルを用いている。
Further, the DC
前記符号連接部14は、前記DC成分符号化部13からのみ可変長符号データが出力される場合、即ち、可逆圧縮の場合には、前記マーカ記憶部7に格納された各種マーカの内、可逆圧縮用のマーカを読み出して、読み出したマーカ、前記DC成分符号化部13から順次出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。
When the variable-length code data is output only from the DC
一方、前記DC成分符号化部13及び前記AC成分符号化部11から可変長符号データが出力される場合、即ち、非可逆圧縮の場合には、前記符号連接部14は、前記マーカ記憶部7に格納された各種マーカの内、非可逆圧縮用のマーカを読み出して、読み出したマーカ、前記DC成分符号化部13から出力される可変長符号データ及び前記AC成分符号化部11から出力される可変長符号データを連接して一つの符号データとして出力する処理を行う。
On the other hand, when variable-length code data is output from the DC
尚、上述したように、可逆圧縮用のマーカと非可逆圧縮用のマーカとは、可逆圧縮用の前部マーカ群が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
前記分配器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
一方、前記ゼロランカウンタ部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
そして、符号連接部14において、前記マーカ記憶部7に格納された非可逆圧縮用のマーカ、並びに順次DC成分符号化部13及びAC成分符号化部11から出力される可変長符号データが連接され、非可逆圧縮方式によって圧縮された符号データとして外部に出力される。
In the
一方、外部から可逆圧縮を要求する信号が入力される場合には、前記第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
そして、符号連接部14において、前記マーカ記憶部7に格納された可逆圧縮用のマーカ、及びDC成分符号化部13から順次出力される可変長符号データが連接され、可逆圧縮方式によって圧縮された符号データとして外部に出力される。
In the
このように、本例の画像符号化装置1によれば、外部から可逆圧縮又は非可逆圧縮を要求する信号を入力することで、入力された要求に応じて画像データを圧縮した符号データ(圧縮画像データ)が生成され、出力される。
As described above, according to the
また、この画像符号化装置1では、可逆圧縮と非可逆圧縮とを同一のハフマン符号化部6において処理するようにしたので、当該画像符号化装置1を電子回路で構築する場合に、可逆圧縮と非可逆圧縮とを別々の電子回路で構成した場合に比べて、その回路規模の小型化を図ることができ、その製造コストの低廉化を図ることができる。
Further, in this
以上、本発明の一実施形態について説明したが、本発明が採り得る具体的な態様は、何らこれに限定されるものではない。 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
1 画像符号化装置
2 第1入力切換部
3 DCT部
4 量子化部
5 ジグザグスキャン部
6 ハフマン符号化部
7 マーカ記憶部
8 分配器
9 第2入力切換部
10 ゼロランカウンタ部
11 AC成分符号化部
12 差分算出部
13 DC成分符号化部
14 符号連接部
DESCRIPTION OF
Claims (1)
前記周波数変換部により生成された前記ブロック単位の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:
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)
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 |
-
2017
- 2017-05-29 JP JP2017105472A patent/JP2018201143A/en active Pending
Cited By (1)
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 |