JP2013176157A - Image compression apparatus - Google Patents

Image compression apparatus Download PDF

Info

Publication number
JP2013176157A
JP2013176157A JP2013104164A JP2013104164A JP2013176157A JP 2013176157 A JP2013176157 A JP 2013176157A JP 2013104164 A JP2013104164 A JP 2013104164A JP 2013104164 A JP2013104164 A JP 2013104164A JP 2013176157 A JP2013176157 A JP 2013176157A
Authority
JP
Japan
Prior art keywords
data
symbol
zero
quantized data
quantized
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.)
Granted
Application number
JP2013104164A
Other languages
Japanese (ja)
Other versions
JP5612722B2 (en
Inventor
Yujiro Tani
祐次郎 谷
Yusuke Mizuno
雄介 水野
Hideki Oyasu
英輝 大安
Nobuhiro Minami
信広 南
Masahiro Moriyama
正弘 森山
Hiroshi Hasegawa
弘 長谷川
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.)
MegaChips Corp
Original Assignee
MegaChips 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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP2013104164A priority Critical patent/JP5612722B2/en
Publication of JP2013176157A publication Critical patent/JP2013176157A/en
Application granted granted Critical
Publication of JP5612722B2 publication Critical patent/JP5612722B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To accelerate symbol generation processing in HD Photo and to reduce a storage capacity to be used for the symbol generation processing.SOLUTION: A symbol generation part 15 serially receives a data string of quantization data. When the quantization data of a non-zero coefficient is received, pieces of information on the absolute value, the zero run, and the code of the non-zero coefficient are stored in registers. When the quantization data of the next non-zero coefficient is received, the pieces of information on the absolute value, the zero run and the code stored in the registers are updated. At that time, the contents of the registers which have been stored until immediately before the reception are outputted as symbol data of the immediately preceding non-zero coefficient.

Description

本発明は、静止画像データを圧縮する画像圧縮装置に関する。   The present invention relates to an image compression apparatus that compresses still image data.

静止画像データを圧縮するフォーマットとして、従来からJPEG(Joint Photographic Experts Group)形式が広く用いられている。また、JPEG形式より画像の劣化を防ぐことができ、圧縮率の高いHD Photo形式が策定されている。HD Photo形式の詳細については、非特許文献1、2に開示されている。   As a format for compressing still image data, a JPEG (Joint Photographic Experts Group) format has been widely used. In addition, the HD Photo format has been formulated which can prevent image degradation compared to the JPEG format and has a high compression rate. Details of the HD Photo format are disclosed in Non-Patent Documents 1 and 2.

HD Photoに基づく画像圧縮装置(以下、単に「画像圧縮装置」という)は、静止画像データをマクロブロック単位で周波数変換し、直流成分データと、二つの交流成分データとを生成する。二つの交流成分の一方は、「LowPass」と呼ばれる低域成分データであり、他方は、「HighPass」と呼ばれる高域成分データである。画像圧縮装置は、上述の各成分データに対して量子化および予測符号化を実行する。そして、各成分の量子化データは、エントロピー符号化され、ストリームとして出力される。   An image compression apparatus based on HD Photo (hereinafter simply referred to as “image compression apparatus”) frequency-converts still image data in units of macroblocks, and generates DC component data and two AC component data. One of the two AC components is low-frequency component data called “LowPass”, and the other is high-frequency component data called “HighPass”. The image compression apparatus performs quantization and predictive coding on each component data described above. The quantized data of each component is entropy-coded and output as a stream.

図9は、従来の画像圧縮装置100を示すブロック図である。画像圧縮装置100は、静止画像データをHD Photo形式の圧縮画像データに変換する装置である。画像圧縮装置100は、第1周波数変換部101、第2周波数変換部102、量子化部103、予測処理部104、シンボル生成部105、エントロピー符号化部106を備える。   FIG. 9 is a block diagram showing a conventional image compression apparatus 100. The image compression apparatus 100 is an apparatus that converts still image data into compressed image data in HD Photo format. The image compression apparatus 100 includes a first frequency conversion unit 101, a second frequency conversion unit 102, a quantization unit 103, a prediction processing unit 104, a symbol generation unit 105, and an entropy encoding unit 106.

第1周波数変換部101は、画像圧縮装置100が入力した静止画像データに対して、第1階層の周波数変換を実行し、第1階層の直流成分データと、第1階層の交流成分データとを出力する。   The first frequency conversion unit 101 performs frequency conversion of the first layer on the still image data input by the image compression apparatus 100, and generates DC component data of the first layer and AC component data of the first layer. Output.

第2周波数変換部102は、第1周波数変換部101が出力した第1階層の直流成分データに対してさらに周波数変換を実行し、第2階層の直流成分データと、第2階層の交流成分データとを出力する。   The second frequency conversion unit 102 further performs frequency conversion on the first layer DC component data output from the first frequency conversion unit 101, the second layer DC component data, and the second layer AC component data. Is output.

以下では、第1階層の交流成分データを高域成分データと呼ぶ。また、第2階層の直流成分データを単に直流成分データと呼び、第2階層の交流成分データを低域成分データと呼ぶ。   Hereinafter, the AC component data in the first layer is referred to as high-frequency component data. Further, the DC component data of the second hierarchy is simply called DC component data, and the AC component data of the second hierarchy is called low-frequency component data.

低域成分データと高域成分データとは、それぞれ15個の変換係数データを有している。具体的には、低域成分データは、15個の変換係数データからなるブロックをYUV3チャンネル分保有する。高域成分データは、15個の変換係数データからなるブロックを16ブロック有し、さらに、それら16ブロックが、それぞれYUV3チャンネル分の変換係数データを保有している。これに対して、直流成分データは、YUV各チャンネルについてそれぞれ1個の変換係数データを保有している。   Each of the low-frequency component data and the high-frequency component data has 15 conversion coefficient data. More specifically, the low-frequency component data holds 15 blocks of conversion coefficient data for YUV3 channels. The high-frequency component data has 16 blocks of 15 conversion coefficient data, and each of these 16 blocks has conversion coefficient data for YUV3 channels. On the other hand, the DC component data has one conversion coefficient data for each YUV channel.

量子化部103は、直流成分データ、低域成分データ、高域成分データに対する量子化処理を実行し、予測処理部104は、量子化データについて予測符号化処理を実行する。シンボル生成部105は、予測符号化された量子化データのビット列からシンボル列を生成し、エントロピー符号化部106は、シンボル化された量子化データに対するエントロピー符号化処理を実行し、圧縮画像データを生成する。   The quantization unit 103 performs a quantization process on the DC component data, the low-frequency component data, and the high-frequency component data, and the prediction processing unit 104 performs a prediction encoding process on the quantized data. The symbol generation unit 105 generates a symbol sequence from the bit sequence of the quantized data that has been predictively encoded, and the entropy encoding unit 106 performs an entropy encoding process on the quantized data that has been symbolized, and generates compressed image data. Generate.

“HD Photo−Photographic Still Image File Format”、[online]、平成18年11月7日、Microsoft Corporation、[平成20年4月14日検索]、インターネット<URL:http://www.microsoft.com/whdc/xps/hdphotodpk.mspx>“HD Photo-Photographic Still Image File Format”, [online], November 7, 2006, Microsoft Corporation, [April 14, 2008 Search], Internet <URL: http://www.microsoft.com /whdc/xps/hdphotodpk.mspx> “Coding of Still Pictures”、[online]、平成19年12月19日、International Organisation for Standardisation and International Electorotechnical Commission、[平成20年4月14日検索]、インターネット<URL:http://www.itscj.ipsj.or.jp/sc29/open/29view/29n9026t.doc>"Coding of Still Pictures", [online], December 19, 2007, International Organization for Standardization and International Electrical Commission, [April 14, 2008 Search], Internet <its: .ipsj.or.jp / sc29 / open / 29view / 29n9026t.doc>

図9に示すように、シンボル生成部105には、第1バッファ111と第2バッファ112とが接続されている。シンボル生成部105は、予測処理部104から出力された1ブロック分の量子化データを第1バッファ111に格納するタイミングで、第2バッファ112から1ブロック分の量子化データを取り出してシンボルデータを出力する。また、予測処理部104から出力された1ブロック分の量子化データを第2バッファ112に格納しているタイミングで、第1バッファ111から1ブロック分の量子化データを取り出してシンボルデータを出力する。このように、2つのバッファの入出力を切り替えることで処理の高速化を図っている。   As shown in FIG. 9, a first buffer 111 and a second buffer 112 are connected to the symbol generator 105. The symbol generation unit 105 extracts the quantized data for one block from the second buffer 112 at the timing when the quantized data for one block output from the prediction processing unit 104 is stored in the first buffer 111, and obtains the symbol data. Output. At the timing when the quantized data for one block output from the prediction processing unit 104 is stored in the second buffer 112, the quantized data for one block is extracted from the first buffer 111 and the symbol data is output. . In this way, the processing speed is increased by switching the input / output of the two buffers.

図10は、第1バッファ111あるいは第2バッファ112に格納される量子化データの格納形式を示す図である。ここでは、図に示すように、15個の量子化データからなる1ブロックのデータ列{0,0,3,0,0,3,10,0,0,0、−1,0,2,0,0}が、第1バッファ111に記憶される場合を例に説明する。   FIG. 10 is a diagram illustrating a storage format of the quantized data stored in the first buffer 111 or the second buffer 112. Here, as shown in the figure, a block of 15 quantized data strings {0, 0, 3, 0, 0, 3, 10, 0, 0, 0, -1, 0, 2, A case where 0, 0} is stored in the first buffer 111 will be described as an example.

まず、1番目と2番目の量子化データは、零係数であるので、第1バッファ111には量子化データは格納されない。3番目の量子化データは3であり、非零係数であるので、絶対値(ABS)=3、零ラン(ZERO_RUN)=2、符号(SIGN)=0が第1バッファ111に格納される。零ランは、ブロック内で非零係数の前に存在する零係数の連続する数である。符号は0が正、1が負を示している。なお、シンボル生成部105は、零ランをカウントするためのレジスタを有している。   First, since the first and second quantized data have zero coefficients, no quantized data is stored in the first buffer 111. Since the third quantized data is 3 and is a non-zero coefficient, absolute value (ABS) = 3, zero run (ZERO_RUN) = 2, and code (SIGN) = 0 are stored in the first buffer 111. A zero run is a continuous number of zero coefficients present before non-zero coefficients in a block. The sign indicates that 0 is positive and 1 is negative. The symbol generation unit 105 has a register for counting zero runs.

続いて、4番目と5番目の量子化データも零係数であるので、第1バッファ111には量子化データは格納されない。6番目の量子化データは3であり、非零係数であるので、{ABS,ZERO_RUN,SIGN}={3,2,0}が第1バッファ111に格納される。さらに、7番目の量子化データは10であり、非零係数であるので、{ABS,ZERO_RUN,SIGN}={10,0,0}が第1バッファ111に格納される。   Subsequently, since the fourth and fifth quantized data also have zero coefficients, no quantized data is stored in the first buffer 111. Since the sixth quantized data is 3, which is a non-zero coefficient, {ABS, ZERO_RUN, SIGN} = {3, 2, 0} is stored in the first buffer 111. Further, since the seventh quantized data is 10 and is a non-zero coefficient, {ABS, ZERO_RUN, SIGN} = {10, 0, 0} is stored in the first buffer 111.

続いて、8番目、9番目、10番目は零係数であり、第1バッファ111に量子化データは格納されない。11番目については、{ABS,ZERO_RUN,SIGN}={1,3,1}が、13番目については、{2,1,0}がそれぞれ格納される。そして、最後の零係数については、例外的に、{0,2,0}が格納される。   Subsequently, the eighth, ninth, and tenth are zero coefficients, and the quantized data is not stored in the first buffer 111. For the eleventh, {ABS, ZERO_RUN, SIGN} = {1, 3, 1} is stored, and for the thirteenth, {2, 1, 0} is stored. For the last zero coefficient, {0, 2, 0} is exceptionally stored.

このように第1バッファ111に1ブロック分の量子化データのデータ列がシンボル化された状態で格納される。そして、次に、第2バッファ112に次のブロックの量子化データが格納されるタイミングで、第1バッファ111に格納されている量子化データがシンボルデータとして出力される。このとき、あわせてインデックスが生成され、シンボルデータの一部として出力される。   In this manner, the data string of the quantized data for one block is stored in the first buffer 111 in a symbolized state. Then, at the timing when the quantized data of the next block is stored in the second buffer 112, the quantized data stored in the first buffer 111 is output as symbol data. At this time, an index is also generated and output as part of the symbol data.

図11は、シンボルデータの出力内容を示す図である。図11は、図10で示した量子化データのデータ列から生成されるシンボルデータを示している。図中、二重線の上は、シンボル生成部105が入力する量子化データの内容を示し、二重線より下は、シンボル生成部105より出力されるシンボルデータの内容を示している。シンボルデータにおいて、ABS,ZERO_RUN,SIGNは、第1バッファ111に格納されているABS,ZERO_RUN,SIGNと同様である。ただし、ABSは、HD photoの仕様により1が減算されたものがシンボルデータとして出力される。   FIG. 11 is a diagram showing the output contents of the symbol data. FIG. 11 shows symbol data generated from the data sequence of the quantized data shown in FIG. In the figure, the upper part of the double line indicates the content of the quantized data input by the symbol generation unit 105, and the lower part of the double line indicates the content of the symbol data output from the symbol generation unit 105. In the symbol data, ABS, ZERO_RUN, and SIGN are the same as ABS, ZERO_RUN, and SIGN stored in the first buffer 111. However, the ABS is obtained by subtracting 1 in accordance with the HD photo specification and is output as symbol data.

シンボルデータ中のINDEXは、本願発明の実施の形態の中で詳しく説明するが、ここでは詳しい説明を省略する。INDEXは、非零係数の絶対値と1との関係を示す情報や、非零係数に後続する量子化データの情報を含んでいる。   The INDEX in the symbol data will be described in detail in the embodiment of the present invention, but the detailed description is omitted here. The INDEX includes information indicating the relationship between the absolute value of the non-zero coefficient and 1 and information on the quantized data subsequent to the non-zero coefficient.

このように、シンボルデータは、零係数に対応するタイミングでは出力されず、非零係数に対応するタイミングで間欠的に出力される。1ブロックの量子化データの数は15個であるので、第1バッファ111あるいは第2バッファ112からシンボルデータを出力するには15個分のデータ出力タイミングが必要である。一方、第1バッファ111あるいは第2バッファ112に量子化データを格納するタイミングも15個分のデータ入力タイミングが必要である。このようにして、2つのバッファのうち一方のバッファへの量子化データの入力タイミングと他方のバッファからのシンボルデータの出力タイミングが同期され、効率よく、高速にシンボルを生成することが可能となっている。   As described above, the symbol data is not output at the timing corresponding to the zero coefficient, but is intermittently output at the timing corresponding to the non-zero coefficient. Since the number of quantized data in one block is 15, in order to output symbol data from the first buffer 111 or the second buffer 112, 15 data output timings are required. On the other hand, the timing for storing the quantized data in the first buffer 111 or the second buffer 112 also requires 15 data input timings. In this way, the input timing of the quantized data to one of the two buffers and the output timing of the symbol data from the other buffer are synchronized, and it is possible to generate symbols efficiently and at high speed. ing.

しかし、このタイミングがずれる場合が存在する。上述したように、高域成分データと低域成分データとは、15個の量子化データからなるブロックの集合であるが、直流成分データは、YUVあわせて3個の量子化データのみからなる。   However, there is a case where this timing is shifted. As described above, the high frequency component data and the low frequency component data are a set of blocks including 15 quantized data, but the direct current component data includes only 3 quantized data including YUV.

高域成分データから直流成分データへの切り替えタイミングに注目すると、第1バッファ111に対しては直流成分データが3データ分の期間を費やして入力されることになるが、第2バッファ112からは15データ分の期間を費やしてシンボルデータが出力される。このため第1バッファ111への入力タイミングに空き時間が生じることになる。   When attention is paid to the switching timing from the high-frequency component data to the DC component data, the DC component data is input to the first buffer 111 in a period of three data. Symbol data is output over a period of 15 data. For this reason, idle time occurs at the input timing to the first buffer 111.

また、直流成分データから低域成分データへの切り替えタイミングに注目すると、第1バッファ111からは3データ分の期間を費やしてシンボルデータが出力されることになるが、第2バッファ112に対しては低域成分データが15データ分の期間を費やして入力されることになる。このため、シンボルデータの出力タイミングに空き時間が生じることになる。   Further, when attention is paid to the switching timing from the DC component data to the low-frequency component data, the symbol data is output from the first buffer 111 over a period of three data. The low-frequency component data is input over a period of 15 data. For this reason, idle time occurs in the output timing of the symbol data.

このように、2つのバッファを利用して高速化を図っているものの、1マクロブロックごとに12データ分の入出力の空き時間が2回発生することになり、さらなる高速化が望まれている。   As described above, although two buffers are used for speeding up, 12 macro data input / output idle times are generated twice for each macroblock, and further speeding is desired. .

また、第1バッファ111あるいは第2バッファ112には、最大で、ABSとして量子化データのビット長×15のデータサイズが必要であり、ZERO_RUNとして4ビット×15のデータサイズが必要であり、SIGNとして1ビット×15のデータサイズが必要である。したがって、2つのバッファをあわせると、量子化データのビット長を32ビットとすれば、(32+4+1)×15×2ビットのサイズが必要である。HD Photoが搭載される電子機器には小型化および省電力化に対する高い要求が存在することを考慮すると、バッファサイズも極力小さくすることが望まれる。   Further, the first buffer 111 or the second buffer 112 requires a data size of the bit length of the quantized data × 15 as ABS, and a data size of 4 bits × 15 as ZERO_RUN, and SIGN As a result, a data size of 1 bit × 15 is required. Therefore, when the two buffers are combined, if the bit length of the quantized data is 32 bits, a size of (32 + 4 + 1) × 15 × 2 bits is required. Considering that there is a high demand for miniaturization and power saving in an electronic device on which HD Photo is mounted, it is desirable to reduce the buffer size as much as possible.

そこで、本発明は前記問題点に鑑み、HD Photoにおけるシンボル生成処理の高速化と、シンボル生成処理に使用する記憶容量の縮小化を実現することを目的とする。   In view of the above problems, an object of the present invention is to realize a high-speed symbol generation process in HD Photo and a reduction in storage capacity used for the symbol generation process.

上記課題を解決するため、発明1の画像圧縮装置は、画像データを周波数変換して周波数変換データを生成する周波数変換部と、周波数変換データを量子化して量子化データを生成する量子化部と、量子化データをシンボル化してシンボルデータを生成するシンボル生成部と、シンボルデータを符号化して符号化データを生成する符号化部と、を備え、前記シンボル生成部は、複数のブロックで構成される量子化データのデータ列をシリアルに入力する量子化データ入力部と、1つの非零係数の量子化データの絶対値、符号、および、零ラン情報を記憶可能な量子化データ情報記憶部と、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、前記量子化データ情報記憶部に記憶されている1つ前の非零係数の量子化データの絶対値、符号、および、零ラン情報をシンボルデータとして出力するシンボルデータ出力部と、を有することを特徴とする。   In order to solve the above-described problem, an image compression apparatus according to a first aspect of the present invention includes a frequency conversion unit that frequency-converts image data to generate frequency conversion data, and a quantization unit that quantizes the frequency conversion data to generate quantization data. A symbol generation unit that converts the quantized data into symbols to generate symbol data, and an encoding unit that encodes the symbol data to generate encoded data, and the symbol generation unit includes a plurality of blocks. A quantized data input unit for serially inputting a data string of quantized data, a quantized data information storing unit capable of storing absolute value, sign, and zero run information of quantized data of one non-zero coefficient; When the quantized data to be processed input by the quantized data input unit is a non-zero coefficient, the amount of the previous non-zero coefficient stored in the quantized data information storage unit The absolute value of the data, code, and characterized by having a symbol data output unit for outputting the zero run information as the symbol data.

発明2は、発明1の画像圧縮装置において、前記量子化データ情報記憶部は、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、入力した非零係数の直前に入力した零係数の連続数により記憶内容が更新される第1記憶部と、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、入力した非零係数の絶対値により記憶内容が更新される第2記憶部と、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、入力した非零係数の符号により記憶内容が更新される第3記憶部と、を含み、前記シンボルデータ出力部は、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、更新前の前記第1、第2および第3記憶部の記憶内容を1つ前の非零係数のシンボルデータとして出力することを特徴とする。   A second aspect of the present invention is the image compression apparatus according to the first aspect, wherein the quantized data information storage unit has a non-zero coefficient input when the quantized data to be processed input by the quantized data input unit is a non-zero coefficient. When the first storage unit whose stored contents are updated by the continuous number of zero coefficients input immediately before and the quantized data to be processed input by the quantized data input unit are non-zero coefficients, the input non-zero coefficients When the second storage unit in which the stored content is updated with the absolute value of and the quantized data to be processed input by the quantized data input unit is a non-zero coefficient, the stored content is represented by the code of the input non-zero coefficient. A third storage unit to be updated, and the symbol data output unit, when the quantized data to be processed input by the quantized data input unit is a non-zero coefficient, the first and second before update 2 and 3 memory storage And outputs the contents as the symbol data of the previous non-zero coefficient.

発明3は、発明2の画像圧縮装置において、前記第1記憶部は、前記量子化データ入力部が入力した処理対象の量子化データが零係数である場合、ブロック内で連続する零係数のカウント数をインクリメントして更新する第1.1記憶部と、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、前記第1.1記憶部に格納されている零係数のカウント数により記憶内容が更新される第1.2記憶部と、を含むことを特徴とする。   A third aspect of the present invention is the image compression apparatus according to the second aspect, wherein when the quantized data to be processed input by the quantized data input section has zero coefficients, the first storage section counts zero coefficients that are consecutive in the block. In the case where the 1.1 storage unit that increments and updates the number and the quantized data to be processed input by the quantized data input unit is a non-zero coefficient, it is stored in the 1.1 storage unit And a 1.2th storage unit in which the stored contents are updated by the count number of the zero coefficient.

発明4は、発明2または発明3の画像圧縮装置において、前記シンボル生成部は、さらに、前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、1つ前の非零係数の量子化データに関するインデックスデータを生成するインデックス生成部、を有し、前記シンボルデータ出力部は、更新前の前記第1、第2および第3記憶部の記憶内容とあわせてインデックスデータを出力するインデックス出力部、を含み、インデックスデータは、更新前の前記第2記憶部に記憶されている絶対値と1との関係を示す絶対値情報と、ブロック内の次の量子化データが零係数であるか非零係数であるか、あるいはブロック内の後続の量子化データが全て零係数であるかを示す後続情報と、を含むことを特徴とする。   A fourth aspect of the present invention is the image compression apparatus according to the second or third aspect, wherein the symbol generation unit further includes the previous one when the quantized data to be processed input by the quantized data input unit is a non-zero coefficient. An index generation unit that generates index data related to quantized data of non-zero coefficients, and the symbol data output unit includes index data together with storage contents of the first, second, and third storage units before update. The index data includes absolute value information indicating the relationship between the absolute value stored in the second storage unit before update and 1 and the next quantized data in the block. Including subsequent information indicating whether the coefficient is a zero coefficient or a non-zero coefficient, or whether the subsequent quantized data in the block are all zero coefficients.

発明5は、発明1ないし発明4のいずれかの画像圧縮装置において、前記周波数変換部は、入力した画像データを周波数変換し、第1直流成分と第1交流成分とを出力する第1周波数変換部と、前記第1直流成分を入力して周波数変換し、第2直流成分と第2交流成分とを出力する第2周波数変換部と、を有し、量子化データのデータ列は、最初に第2直流成分に対応するブロック、次に第2交流成分に対応する複数のブロック、最後に第1交流成分に対応する複数のブロックの順序で1つのマクロブロックを構成するとともに、前記順序で構成されるマクロブロックが繰り返し出現するデータ列であり、各ブロックにおいて最後の非零係数の量子化データに対応するシンボルデータは、次のブロックの最初の非零係数の量子化データの出現時に出力されることを特徴とする。   A fifth aspect of the present invention is the image compression device according to any one of the first to fourth aspects of the present invention, wherein the frequency conversion unit performs frequency conversion on input image data and outputs a first DC component and a first AC component. And a second frequency conversion unit that inputs the first DC component and performs frequency conversion, and outputs a second DC component and a second AC component. A macro block is configured in the order of a block corresponding to the second DC component, a plurality of blocks corresponding to the second AC component, and finally a plurality of blocks corresponding to the first AC component. Is a data string in which repeated macroblocks appear, and the symbol data corresponding to the quantized data of the last nonzero coefficient in each block is the appearance of the quantized data of the first nonzero coefficient of the next block Characterized in that it is output to.

本発明の画像圧縮装置は、量子化データ情報記憶部において1つの非零係数の量子化データの絶対値、符号、および、零ラン情報を記憶し、入力した処理対象の量子化データが非零係数である場合、量子化データ情報記憶部に記憶されている1つ前の非零係数の量子化データの絶対値、符号、および、零ラン情報をシンボルデータとして出力する。これにより、ブロック内の全ての非零係数の量子化データを一旦バッファに格納するという処理が不要になり、処理に必要な記憶容量のサイズを小さくすることができる。   The image compression apparatus of the present invention stores the absolute value, sign, and zero run information of one non-zero coefficient quantized data in the quantized data information storage unit, and the input quantized data to be processed is non-zero. If it is a coefficient, the absolute value, sign, and zero run information of the quantized data of the previous non-zero coefficient stored in the quantized data information storage unit are output as symbol data. As a result, the process of temporarily storing all the non-zero coefficient quantized data in the block in the buffer becomes unnecessary, and the size of the storage capacity required for the process can be reduced.

また、直流成分データ、低域成分データ、高域成分データの切り替わりタイミングにおいても、処理時間に無駄な空き時間を生じさせることがなく、処理速度が向上する。   Further, at the switching timing of the DC component data, the low frequency component data, and the high frequency component data, the processing speed is improved without causing unnecessary idle time in the processing time.

また、直流成分データ、低域成分データ、高域成分データで、処理を共通化させることが可能である。   Further, it is possible to share the processing with the DC component data, the low-frequency component data, and the high-frequency component data.

本実施の形態に係る画像圧縮装置のブロック図である。It is a block diagram of the image compression apparatus which concerns on this Embodiment. マクロブロックの構成を示す図である。It is a figure which shows the structure of a macroblock. 第1階層の周波数変換の概念図である。It is a conceptual diagram of the frequency conversion of a 1st hierarchy. 第2階層の周波数変換の概念図である。It is a conceptual diagram of the frequency conversion of a 2nd hierarchy. シンボルデータのデータ構成を示す図である。It is a figure which shows the data structure of symbol data. シンボル生成部のレジスタに格納されるデータの遷移図である。It is a transition diagram of the data stored in the register | resistor of a symbol production | generation part. シンボルデータの出力タイミングとデータの内容を示す図である。It is a figure which shows the output timing of symbol data, and the content of data. ブロックの切り替わりタイミングにおいて出力されるシンボルデータの内容を示す図である。It is a figure which shows the content of the symbol data output in the switching timing of a block. 従来の画像圧縮装置のブロック図である。It is a block diagram of the conventional image compression apparatus. 従来の画像圧縮装置においてバッファに格納される量子化データのデータ形式を示す図である。It is a figure which shows the data format of the quantization data stored in a buffer in the conventional image compression apparatus. 従来の画像圧縮装置においてシンボルデータの出力タイミングとデータの内容を示す図である。It is a figure which shows the output timing of symbol data, and the content of data in the conventional image compression apparatus.

<1.画像圧縮装置の構成とHD photoの処理の流れ>
以下、図面を参照しつつ本発明の実施の形態について説明する。図1は、本実施の形態に係る画像圧縮装置10の構成を示すブロック図である。図1に示す画像圧縮装置10は、静止画像データをHD Photo形式の圧縮画像データに変換する装置である。
<1. Configuration of image compression device and HD photo processing flow>
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of an image compression apparatus 10 according to the present embodiment. The image compression apparatus 10 shown in FIG. 1 is an apparatus that converts still image data into compressed image data in HD Photo format.

画像圧縮装置10は、第1周波数変換部11、第2周波数変換部12、量子化部13、予測処理部14、シンボル生成部15、エントロピー符号化部16を備える。   The image compression apparatus 10 includes a first frequency conversion unit 11, a second frequency conversion unit 12, a quantization unit 13, a prediction processing unit 14, a symbol generation unit 15, and an entropy encoding unit 16.

画像圧縮装置10に入力される静止画像データは、図示しない前処理部において、色変換処理、フィルタ処理などが行われる。たとえばRGB形式の静止画像データは、色変換によりYUV444形式に変換される。そして、フィルタ処理後の静止画像データが、第1周波数変換部11に入力される。   The still image data input to the image compression apparatus 10 is subjected to color conversion processing, filter processing, and the like in a preprocessing unit (not shown). For example, still image data in RGB format is converted to YUV444 format by color conversion. Then, the still image data after the filter processing is input to the first frequency conversion unit 11.

画像圧縮装置10は、マクロブロック単位で画像に対する圧縮処理を実行する。図2は、マクロブロックの構成を示す図である。図2に示すように、1ブロックは、4×4の画素(16画素)で構成される。1マクロブロックは、4×4のブロック(16ブロック)で構成される。つまり、1マクロブロックは、16×16の画素(256画素)で構成される。図2において、マクロブロックを構成する各ブロックを、左上から右方向に順に、ブロックB01、B02・・・B16とする。   The image compression apparatus 10 performs a compression process on an image in units of macro blocks. FIG. 2 is a diagram illustrating a configuration of a macroblock. As shown in FIG. 2, one block is composed of 4 × 4 pixels (16 pixels). One macro block is composed of 4 × 4 blocks (16 blocks). That is, one macroblock is composed of 16 × 16 pixels (256 pixels). In FIG. 2, the blocks constituting the macroblock are referred to as blocks B01, B02... B16 in order from the upper left to the right.

このような構成のマクロブロックが、YUVのチャンネルごとに存在しており、YUV各チャンネルのマクロブロックが画像圧縮装置10において処理される。以下に説明する各処理は、各色チャンネルで共通の処理である。   A macroblock having such a configuration exists for each YUV channel, and the macroblock of each YUV channel is processed in the image compression apparatus 10. Each process described below is a process common to each color channel.

第1周波数変換部11は、画像圧縮装置10が入力した静止画像データに対して、第1階層の周波数変換を実行し、第1階層の直流成分データDa01〜Da16と、第1階層の交流成分データHP01〜HP16とを出力する。第1階層の交流成分データHP01〜HP16は、HD Photo形式における「Highpass(HP)」成分に対応する。以下では、第1階層の交流成分データHP01〜HP16を高域成分データHP01〜HP16と呼ぶ。   The first frequency conversion unit 11 performs frequency conversion of the first layer on the still image data input by the image compression apparatus 10, and DC component data Da01 to Da16 of the first layer and AC component of the first layer Data HP01 to HP16 are output. The AC component data HP01 to HP16 in the first layer correspond to the “Highpass (HP)” component in the HD Photo format. Hereinafter, the AC component data HP01 to HP16 in the first hierarchy are referred to as high-frequency component data HP01 to HP16.

図3は、第1階層の直流成分データDa01〜Da16と高域成分データHP01〜HP16とを示す概念図である。図3に示すように、ブロックごとに第1階層の直流成分データDa01〜Da16と、高域成分データHP01〜HP16が生成されている。高域成分データHP01〜HP16は、ブロックB01〜B16にそれぞれ対応する。第1階層の直流成分データDa01〜Da16は、それぞれ1個の変換係数データを有している。高域成分データHP01〜HP16は、それぞれ15個の変換係数データを有している。   FIG. 3 is a conceptual diagram showing DC component data Da01 to Da16 and high-frequency component data HP01 to HP16 in the first layer. As shown in FIG. 3, the DC component data Da01 to Da16 of the first hierarchy and the high frequency component data HP01 to HP16 are generated for each block. The high frequency component data HP01 to HP16 correspond to the blocks B01 to B16, respectively. The DC component data Da01 to Da16 in the first layer each have one piece of conversion coefficient data. Each of the high frequency component data HP01 to HP16 has 15 pieces of conversion coefficient data.

第2周波数変換部12は、第1周波数変換部11が出力した第1階層の直流成分データDa01〜Da16に対して周波数変換を実行し、第2階層の直流成分データDbと、第2階層の交流成分データLPとを出力する。第2階層の直流成分データDbは、HD Photo形式における直流成分に対応する。第2階層の交流成分データLPは、HD Photo形式における「Lowpass(LP)」成分に対応する。以下では、第2階層の直流成分データDbを単に直流成分データDbと呼び、第2階層の交流成分データLPを低域成分データLPと呼ぶ。   The second frequency conversion unit 12 performs frequency conversion on the first layer DC component data Da01 to Da16 output from the first frequency conversion unit 11, and performs the second layer DC component data Db and the second layer DC component data Db. AC component data LP is output. The second layer DC component data Db corresponds to the DC component in the HD Photo format. The AC component data LP of the second layer corresponds to the “Lowpass (LP)” component in the HD Photo format. Hereinafter, the DC component data Db in the second hierarchy is simply referred to as DC component data Db, and the AC component data LP in the second hierarchy is referred to as low-frequency component data LP.

図4は、第2階層の周波数変換に伴うデータの変化を示す図である。第2階層の周波数変換により、直流成分データDbと、低域成分データLPとが生成される。直流成分データDbは、1個の変換係数データを有しており、低域成分データLPは、15個の変換係数データを有している。   FIG. 4 is a diagram illustrating a change in data accompanying the frequency conversion of the second layer. The DC component data Db and the low frequency component data LP are generated by the frequency conversion of the second layer. The DC component data Db has one conversion coefficient data, and the low frequency component data LP has 15 conversion coefficient data.

このように、静止画像データに対して第1階層の周波数変換が実行され、さらに第1階層の直流成分データDa01〜Da16に対して第2階層の周波数変換が実行される。画像圧縮装置10は、静止画像データに対する周波数変換をマクロブロック単位で階層的に実行して、直流成分データDb、低域成分データLP、高域成分データHP01〜HP16を生成する。   As described above, the first layer frequency conversion is executed on the still image data, and the second layer frequency conversion is executed on the first layer DC component data Da01 to Da16. The image compression apparatus 10 hierarchically executes frequency conversion for still image data in units of macro blocks to generate DC component data Db, low-frequency component data LP, and high-frequency component data HP01 to HP16.

このようにして生成された低域成分データLPと高域成分データHP01〜HP16は、それぞれ15個の変換係数データを有している。具体的には、低域成分データLPは、15個の変換係数データからなるブロックをYUV3チャンネル分保有する。高域成分データHP01〜HP16は、15個の変換係数データからなるブロックを16ブロック有し、さらに、それら16ブロックが、それぞれYUV3チャンネル分の変換係数データを保有している。これに対して、直流成分データDbは、YUV各チャンネルについてそれぞれ1個の変換係数データを保有している。   The low-frequency component data LP and the high-frequency component data HP01 to HP16 generated in this way each have 15 conversion coefficient data. Specifically, the low-frequency component data LP holds blocks of 15 conversion coefficient data for YUV3 channels. The high-frequency component data HP01 to HP16 have 16 blocks of 15 conversion coefficient data, and each of these 16 blocks holds conversion coefficient data for YUV3 channels. On the other hand, the DC component data Db has one conversion coefficient data for each YUV channel.

量子化部13は、直流成分データDb、低域成分データLP、高域成分データHP01〜HP16に対する量子化処理を実行して量子化データを生成する。予測処理部14は、量子化データについて予測符号化処理を実行する。予測符号化された量子化データは、シンボル生成部15に入力される。   The quantization unit 13 performs quantization processing on the DC component data Db, the low-frequency component data LP, and the high-frequency component data HP01 to HP16 to generate quantized data. The prediction processing unit 14 performs a prediction encoding process on the quantized data. The predictive-coded quantized data is input to the symbol generator 15.

シンボル生成部15は、予測符号化された量子化データのビット列からシンボル列を生成する。シンボル生成部15の処理内容は本発明の特徴部分であり、その詳しい処理内容は後で説明する。シンボル生成部15は、生成したシンボル列をエントロピー符号化部16に出力する。   The symbol generation unit 15 generates a symbol string from the bit string of the quantized data subjected to predictive coding. The processing content of the symbol generation unit 15 is a characteristic part of the present invention, and the detailed processing content will be described later. The symbol generation unit 15 outputs the generated symbol string to the entropy encoding unit 16.

エントロピー符号化部16は、シンボル化された量子化データに対するエントロピー符号化処理を実行し、圧縮画像データを生成する。圧縮画像データは、1マクロブロック単位のビットストリームとして出力される。   The entropy encoding unit 16 performs entropy encoding processing on the quantized data that has been symbolized to generate compressed image data. The compressed image data is output as a bit stream in units of one macro block.

<2.シンボルのデータ構成>
次に、シンボル生成部15において生成されるシンボルデータのデータ構成について説明する。図5は、シンボルデータのデータ構成を示す図である。HD Photoにおけるシンボルデータは、絶対値(ABS)、インデックス(INDEX)、符号(SIGN)、零ラン(ZERO_RUN)、フレックスビット長(FLEXBIT)から構成される。
<2. Symbol data structure>
Next, the data structure of the symbol data generated in the symbol generator 15 will be described. FIG. 5 is a diagram showing a data structure of symbol data. Symbol data in HD Photo includes an absolute value (ABS), an index (INDEX), a code (SIGN), a zero run (ZERO_RUN), and a flex bit length (FLEXBIT).

絶対値(ABS)は、非零係数の絶対値から1を減算した値が設定される。符号(SIGN)は、非零係数の符号がプラスの場合は0、マイナスの場合は1が設定される。零ラン(ZERO_RUN)には、ブロック内において非零係数の直前に存在する連続する零係数の数が設定される。フレックスビット長(FLEXBIT)には、量子化データの下位ビットのうちフレックスビットに割り当てられるビット幅が設定される。   As the absolute value (ABS), a value obtained by subtracting 1 from the absolute value of the non-zero coefficient is set. The sign (SIGN) is set to 0 when the sign of the non-zero coefficient is positive, and is set to 1 when the sign is negative. In the zero run (ZERO_RUN), the number of consecutive zero coefficients existing immediately before the non-zero coefficient in the block is set. In the flex bit length (FLEXBIT), a bit width assigned to a flex bit among lower bits of quantized data is set.

インデックス(INDEX)には、FIRST_INDEXとNEXT_INDEXとが存在する。FIRST_INDEXは、ブロック内の最初の非零係数に対して設定されるINDEXであり、NEXT_INDEXは、2番目以降の全ての非零係数に対して設定されるINDEXである。   The index (INDEX) includes FIRST_INDEX and NEXT_INDEX. FIRST_INDEX is an INDEX set for the first non-zero coefficient in the block, and NEXT_INDEX is an INDEX set for all the second and subsequent non-zero coefficients.

FIRST_INDEXの最下位ビット[0]には、最初の非零係数の前に零ランがあるか否かが設定される。零ランがある場合には0が、ない場合には1が設定される。   Whether or not there is a zero run before the first non-zero coefficient is set in the least significant bit [0] of FIRST_INDEX. If there is a zero run, 0 is set, otherwise 1 is set.

FIRST_INDEXの第1ビット[1]には、対応する非零係数の絶対値が1であるか否かが設定される。絶対値が1である場合には0、絶対値が1でない場合には1が設定される。   Whether or not the absolute value of the corresponding non-zero coefficient is 1 is set in the first bit [1] of FIRST_INDEX. When the absolute value is 1, 0 is set, and when the absolute value is not 1, 1 is set.

FIRST_INDEXの第2、第3ビット[3:2]には、対応する非零係数より後続の量子化データの情報が設定される。対応する非零係数より以降の量子化データが、全て零係数であれば、EOB(End Of Block)であることを示す00が設定される。対応する非零係数の直後に非零係数が存在すれば01が、直後に零係数が存在すれば10が設定される。   In the second and third bits [3: 2] of FIRST_INDEX, information of subsequent quantized data is set from the corresponding non-zero coefficient. If the quantized data after the corresponding non-zero coefficient is all zero coefficients, 00 indicating EOB (End Of Block) is set. If a non-zero coefficient exists immediately after the corresponding non-zero coefficient, 01 is set, and if a zero coefficient exists immediately after it, 10 is set.

NEXT_INDEXの最下位ビット[0]には、対応する非零係数の絶対値が1であるか否かが設定される。絶対値が1である場合には0、絶対値が1でない場合には1が設定される。   Whether or not the absolute value of the corresponding non-zero coefficient is 1 is set in the least significant bit [0] of NEXT_INDEX. When the absolute value is 1, 0 is set, and when the absolute value is not 1, 1 is set.

NEXT_INDEXの第1、第2ビット[2:1]には、対応する非零係数より後続の量子化データの情報が設定される。対応する非零係数より以降の量子化データが、全て零係数であれば、EOBであることを示す00が設定される。対応する非零係数の直後に非零係数が存在すれば01が、直後に零係数が存在すれば10が設定される。   In the first and second bits [2: 1] of NEXT_INDEX, information of subsequent quantized data is set from the corresponding non-zero coefficient. If the quantized data after the corresponding non-zero coefficient is all zero coefficients, 00 indicating EOB is set. If a non-zero coefficient exists immediately after the corresponding non-zero coefficient, 01 is set, and if a zero coefficient exists immediately after it, 10 is set.

<3.シンボル生成部が備えるレジスタの種類>
図1に示すように、シンボル生成部15は、第1レジスタ51、第2レジスタ52、第3レジスタ53、第4レジスタ54、第5レジスタ55、第6レジスタ56を備えている。
<3. Types of Registers in Symbol Generation Unit>
As shown in FIG. 1, the symbol generator 15 includes a first register 51, a second register 52, a third register 53, a fourth register 54, a fifth register 55, and a sixth register 56.

第1レジスタ51は、零ランをカウントするための零カウントレジスタである。1ブロック内の量子化データのデータ数は15であるので、第1レジスタ51は、4ビットの記憶容量を備えている。   The first register 51 is a zero count register for counting zero runs. Since the number of quantized data in one block is 15, the first register 51 has a 4-bit storage capacity.

第2レジスタ52は、シンボルデータとして出力するための零ランを格納する零ランレジスタである。第2レジスタ52も4ビットの記憶容量を備えている。   The second register 52 is a zero run register that stores a zero run to be output as symbol data. The second register 52 also has a 4-bit storage capacity.

第3レジスタ53は、シンボルデータとして出力するための非零係数の絶対値を格納するためのABSレジスタである。本実施の形態においては、量子化データのデータ幅は32ビットとする。したがって、第3レジスタ53は32ビットの記憶容量を備えている。ただし、第3レジスタ53には、非零係数の絶対値がそのままの値で格納される。シンボルデータとして出力されるときには、1を減算した値が出力される。   The third register 53 is an ABS register for storing an absolute value of a non-zero coefficient to be output as symbol data. In the present embodiment, the data width of the quantized data is 32 bits. Therefore, the third register 53 has a 32-bit storage capacity. However, the third register 53 stores the absolute value of the non-zero coefficient as it is. When output as symbol data, a value obtained by subtracting 1 is output.

第4レジスタ54は、シンボルデータとして出力するための非零係数の符号を格納するためのSIGNレジスタである。符号は、上述したように0か1の情報が記録されるので、第4レジスタ54は1ビットの記憶容量を備えている。   The fourth register 54 is a SIGN register for storing a sign of a non-zero coefficient to be output as symbol data. As described above, since 0 or 1 information is recorded in the code, the fourth register 54 has a storage capacity of 1 bit.

第5レジスタ55は、ファーストフラグを設定する1stフラグレジスタである。第5レジスタ55にはブロック内の最初の非零係数が出現するまでは1が設定され、非零係数が出現した後は0が設定される。第5レジスタ55は、1ビットの記憶容量を備えている。   The fifth register 55 is a 1st flag register that sets a first flag. The fifth register 55 is set to 1 until the first non-zero coefficient in the block appears, and is set to 0 after the non-zero coefficient appears. The fifth register 55 has a 1-bit storage capacity.

第6レジスタ56は、ポジションデータ設定するPOSレジスタである。ポジションデータは、現在の処理対象の量子化データが、ブロック内で何番目のデータであるかを示すデータである。ポジションデータは、非零係数が入力される直前に格納されていた情報と零カウント情報とから決定することができる。   The sixth register 56 is a POS register for setting position data. The position data is data indicating the number of the current quantized data to be processed in the block. The position data can be determined from the information stored immediately before the non-zero coefficient is input and the zero count information.

<4.シンボル生成処理>
上記のような構成のシンボル生成部15により、シンボルデータが生成される処理の流れについて説明する。
<4. Symbol generation processing>
A flow of processing in which symbol data is generated by the symbol generation unit 15 configured as described above will be described.

図6は、量子化データとしてデータ列{0,0,3,0,0,3,10,0,0,0,−1,0,2,0,0}が入力された場合に、シンボル生成部15の各レジスタに設定される値を示している。シンボル生成部15は、量子化データのデータ列を先頭から順にシリアルに入力する。   FIG. 6 shows symbols when a data string {0, 0, 3, 0, 0, 3, 10, 0, 0, 0, −1, 0, 2, 0, 0} is input as quantized data. The values set in the registers of the generation unit 15 are shown. The symbol generator 15 serially inputs a data sequence of quantized data from the top.

まず、シンボル生成部15は、先頭の0番目のデータ{0}を入力する。このタイミングで、零カウントが1インクリメントされ、零カウントレジスタ(第1レジスタ51)に1が設定される。また、{0}は零係数であるので、ABSレジスタ(第3レジスタ53)、SIGNレジスタ(第4レジスタ54)は不定である。また、零ランレジスタ(第2レジスタ52)とPOSレジスタ(第6レジスタ56)には0が設定される。1stフラグレジスタ(第5レジスタ55)には、初期値として1が設定される。   First, the symbol generation unit 15 inputs the first 0th data {0}. At this timing, the zero count is incremented by 1, and 1 is set in the zero count register (first register 51). Since {0} is a zero coefficient, the ABS register (third register 53) and the SIGN register (fourth register 54) are undefined. Also, 0 is set in the zero run register (second register 52) and the POS register (sixth register 56). The first flag register (fifth register 55) is set to 1 as an initial value.

次の1番目のデータ{0}が入力されると、零カウントレジスタ(第1レジスタ51)が1インクリメントされ2が設定される。その他のレジスタはデータが更新されることはない。   When the next first data {0} is input, the zero count register (first register 51) is incremented by 1 and set to 2. Data is not updated in other registers.

続いて2番目のデータ{3}が入力されると、{3}は非零係数であるので、ABSレジスタ(第3レジスタ53)に3が設定され、SIGNレジスタ(第4レジスタ54)に符号プラスを示す0が設定される。また、零ランレジスタ(第2レジスタ52)には、零カウントレジスタ(第1レジスタ51)に格納されている直前の零カウント数2が設定され、零カウントレジスタ(第1レジスタ51)は0に初期化される。また、非零係数が出現したので、POSレジスタ(第6レジスタ56)には、2が設定される。   Subsequently, when the second data {3} is input, since {3} is a non-zero coefficient, 3 is set in the ABS register (third register 53) and the sign is stored in the SIGN register (fourth register 54). 0 indicating a plus is set. The zero run register (second register 52) is set to the zero count number 2 immediately before being stored in the zero count register (first register 51), and the zero count register (first register 51) is set to zero. It is initialized. Since a non-zero coefficient has appeared, 2 is set in the POS register (sixth register 56).

このように、シンボル生成部15に、2番目のデータとして最初の非零係数が入力されると、ABS,SIGN,零ラン等の2番目のデータの情報がレジスタ内に格納される。この時点では、2番目のデータはシンボルデータとして出力されるのではなく、レジスタ内に保持されることになる。   As described above, when the first non-zero coefficient is input as the second data to the symbol generator 15, the information of the second data such as ABS, SIGN, zero run, etc. is stored in the register. At this time, the second data is not output as symbol data but is held in a register.

3番目および4番目のデータも{0}である。したがって、第2、第3、第4、第6レジスタのデータは更新されない。零カウントレジスタ(第1レジスタ51)は、1、2と順にインクリメントされる。1stフラグレジスタ(第5レジスタ55)は、最初の非零係数が出現した後は、0で固定される。   The third and fourth data are also {0}. Therefore, the data in the second, third, fourth, and sixth registers are not updated. The zero count register (first register 51) is incremented in order of 1, 2. The 1st flag register (fifth register 55) is fixed at 0 after the first non-zero coefficient appears.

シンボル生成部15が、3番目および4番目のデータを入力している間も、第2、第3、第4レジスタ52,53,54は、2番目のデータのABS,SIGN,零ランの情報を保持している。   While the symbol generator 15 is inputting the third and fourth data, the second, third, and fourth registers 52, 53, and 54 are the ABS, SIGN, and zero run information of the second data. Holding.

5番目のデータ{3}が入力されると、{3}は非零係数であるので、ABSレジスタ(第3レジスタ53)に、3が設定され、SIGNレジスタ(第4レジスタ54)に符号プラスを示す0が設定される。また、零ランレジスタ(第2レジスタ52)には、零カウントレジスタ(第1レジスタ51)に格納されている直前の零カウント数2が設定され、零カウントレジスタ(第1レジスタ51)は0に初期化される。また、非零係数が出現したので、POSレジスタ(第6レジスタ56)には、5が設定される。   When the fifth data {3} is input, since {3} is a non-zero coefficient, 3 is set in the ABS register (third register 53), and a sign plus is added to the SIGN register (fourth register 54). Is set to 0. The zero run register (second register 52) is set to the zero count number 2 immediately before being stored in the zero count register (first register 51), and the zero count register (first register 51) is set to zero. It is initialized. Since a non-zero coefficient has appeared, 5 is set in the POS register (sixth register 56).

シンボル生成部15が5番目のデータ{3}を入力すると、このように、第2、第3、第4レジスタ52,53,54が更新される。したがって、シンボル生成部15は、5番目のデータによって第2、第3、第4レジスタ52,53,54の内容が更新される前に、第2、第3、第4レジスタ52,53,54に格納されているデータを2番目のデータのシンボルデータとして出力するのである。つまり、新たな非零係数が出現した時点でレジスタに格納されている1つ前の非零係数のシンボルデータを出力し、レジスタには新たに出現した非零係数の情報を保持するのである。ただし、ABSについては1を減算した値がシンボルデータとして使用される。   When the symbol generator 15 inputs the fifth data {3}, the second, third, and fourth registers 52, 53, and 54 are updated in this way. Therefore, the symbol generator 15 changes the second, third, and fourth registers 52, 53, and 54 before the contents of the second, third, and fourth registers 52, 53, and 54 are updated with the fifth data. Is output as symbol data of the second data. That is, the symbol data of the previous non-zero coefficient stored in the register is output when a new non-zero coefficient appears, and the information of the non-zero coefficient that has newly appeared is held in the register. However, for ABS, a value obtained by subtracting 1 is used as symbol data.

図7に、シンボル生成部15から出力されるシンボルデータの内容を示す。図7は、図6に示すデータ列{0,0,3,0,0,3,10,0,0,0,−1,0,2,0,0}がブロックNo.40として入力されている場合を示している。   FIG. 7 shows the contents of the symbol data output from the symbol generator 15. 7 shows that the data string {0, 0, 3, 0, 0, 3, 10, 0, 0, 0, −1, 0, 2, 0, 0} shown in FIG. The case where it is input as 40 is shown.

図7において、二重線より上は、シンボル生成部15が入力する量子化データの情報を示し、二重線より下は、シンボル生成部15より出力されるシンボルデータの内容を示している。   In FIG. 7, the information above the double line indicates the information of the quantized data input by the symbol generation unit 15, and the part below the double line indicates the content of the symbol data output from the symbol generation unit 15.

図7に示すように、5番目のデータ{3}が入力されるタイミングで、2番目のデータ{3}のシンボルデータが出力されている。つまり、ABSとして2、FIRST_INDEXとして1010、ZERO_RUNとして2、SIGNとして0がシンボルデータとして出力されている。なお、FIRST_INDEXは5番目の量子化データを入力したタイミングでシンボル生成部15により生成される。   As shown in FIG. 7, the symbol data of the second data {3} is output at the timing when the fifth data {3} is input. That is, 2 as ABS, 1010 as FIRST_INDEX, 2 as ZERO_RUN, and 0 as SIGN are output as symbol data. The FIRST_INDEX is generated by the symbol generation unit 15 at the timing when the fifth quantized data is input.

また、ブロックNo.40の2番目の量子化データを入力するタイミングで出力されているシンボルデータは、ブロックNo.39の最後の非零係数に対応するシンボルデータである。   Also, block No. The symbol data output at the timing when the second quantized data of 40 is input is the block number. This is symbol data corresponding to the last 39 non-zero coefficients.

再び、図6を参照する。6番目のデータ{10}が入力されると、{10}は非零係数であるので、ABSレジスタ(第3レジスタ53)に、10が設定され、SIGNレジスタ(第4レジスタ54)に符号プラスを示す0が設定される。また、零ランレジスタ(第2レジスタ52)には、直前の零カウント数0が設定され、零カウントレジスタ(第1レジスタ51)は0に初期化される。また、非零係数が出現したので、POSレジスタ(第6レジスタ56)には、6が設定される。   Reference is again made to FIG. When the sixth data {10} is input, since {10} is a non-zero coefficient, 10 is set in the ABS register (third register 53), and a sign plus is added to the SIGN register (fourth register 54). Is set to 0. The zero run register (second register 52) is set to the previous zero count number 0, and the zero count register (first register 51) is initialized to zero. Since a non-zero coefficient has appeared, 6 is set in the POS register (sixth register 56).

シンボル生成部15が、6番目のデータを入力すると、このように、第2、第3、第4レジスタ52,53,54が更新される。したがって、シンボル生成部15は、6番目のデータによって第2、第3、第4レジスタ52,53,54の内容が更新される前に、第2、第3、第4レジスタ52,53,54に格納されているデータを5番目のデータのシンボルデータとして出力するのである。ただし、ABSについては1を減算した値がシンボルデータとして使用される。   When the symbol generator 15 inputs the sixth data, the second, third, and fourth registers 52, 53, and 54 are updated in this way. Therefore, the symbol generator 15 changes the second, third, and fourth registers 52, 53, and 54 before the contents of the second, third, and fourth registers 52, 53, and 54 are updated with the sixth data. Is output as symbol data of the fifth data. However, for ABS, a value obtained by subtracting 1 is used as symbol data.

再び、図7を参照する。6番目のデータ{10}が入力されるタイミングで、5番目のデータ{3}のシンボルデータが出力されている。つまり、ABSとして2、NEXT_INDEXとして011、ZERO_RUNとして2、SIGNとして0がシンボルデータとして出力されている。なお、NEXT_INDEXは6番目の量子化データが入力されるタイミングでシンボル生成部15により生成される。   Again referring to FIG. At the timing when the sixth data {10} is input, the symbol data of the fifth data {3} is output. That is, 2 as ABS, 011 as NEXT_INDEX, 2 as ZERO_RUN, and 0 as SIGN are output as symbol data. NEXT_INDEX is generated by the symbol generation unit 15 at the timing when the sixth quantized data is input.

このように本実施の形態のシンボル生成部15は、単一の量子化データの情報を記憶するレジスタを備える構成としながら、HD Photoに準拠したシンボルデータを生成し、出力可能である。   As described above, the symbol generation unit 15 according to the present embodiment can generate and output symbol data compliant with HD Photo while having a configuration that includes a register that stores information of a single quantized data.

従来技術で説明した図9に示すタイプの画像圧縮装置であれば、ブロック内の全ての非零係数の情報を一旦、バッファに格納する必要があった。しかも、処理を高速化するために、そのようなバッファが2面必要であった。これに対して、本実施の形態のシンボル生成部15は、ブロック内の1つの非零係数の情報のみを保持する構成であるので、シンボル生成部15が利用する記憶装置の容量を格段に減少させることができる。   With the image compression apparatus of the type shown in FIG. 9 described in the prior art, it is necessary to temporarily store all non-zero coefficient information in the block in the buffer. In addition, two such buffers are required to speed up the processing. On the other hand, since the symbol generation unit 15 of the present embodiment is configured to hold only information of one non-zero coefficient in the block, the capacity of the storage device used by the symbol generation unit 15 is significantly reduced. Can be made.

たとえば、上記の実施の形態であれば、各レジスタに必要な記憶容量は、第1レジスタ51で4ビット、第2レジスタ52で4ビット、第3レジスタ53で32ビット、第4レジスタ54で1ビット、第5レジスタ55で1ビット、第6レジスタ56で4ビットである。つまり、合計で、46ビットの記憶容量があれば足りる。上述した従来の構成では、2枚のバッファ全体で(32+4+1)×15×2ビットのサイズが必要であったので、大幅に記憶サイズを小さくすることができる。   For example, in the above embodiment, the storage capacity required for each register is 4 bits for the first register 51, 4 bits for the second register 52, 32 bits for the third register 53, and 1 for the fourth register 54. 1 bit for the fifth register 55 and 4 bits for the sixth register 56. In other words, a total storage capacity of 46 bits is sufficient. In the conventional configuration described above, since the size of (32 + 4 + 1) × 15 × 2 bits is necessary for the entire two buffers, the storage size can be greatly reduced.

また、本実施の形態のシンボル生成部15の処理内容によれば、従来の構成で説明したように、直流成分データから低域成分データへの切り替わり、高域成分データから直流成分データへの切り替わりで空き時間が発生することはない。したがって、シンボルデータの生成処理の速度を向上させることができる。   Further, according to the processing content of the symbol generation unit 15 of the present embodiment, as described in the conventional configuration, switching from DC component data to low-frequency component data and switching from high-frequency component data to DC component data are performed. There is no free time. Therefore, the speed of the symbol data generation process can be improved.

さらに、本実施の形態の方法であれば、直流成分データ、低域成分データ、高域成分データによって処理の区別をする必要はない。非零係数の情報を一旦レジスタに保持し、次の非零係数の出現時に、保持している直前の非零係数の情報に基づいてシンボルデータを出力するというルールを全ての成分のデータに共通して適用できる。   Furthermore, according to the method of the present embodiment, it is not necessary to distinguish between processes based on DC component data, low-frequency component data, and high-frequency component data. A common rule for all component data is that non-zero coefficient information is temporarily stored in a register, and symbol data is output based on the previous non-zero coefficient information when the next non-zero coefficient appears. Can be applied.

一般的には、第N番目のブロックの最後の非零係数に関するシンボルデータは、第N+1番目のブロックの最初の非零係数の出現時に出力される。   In general, the symbol data related to the last non-zero coefficient of the Nth block is output when the first nonzero coefficient of the (N + 1) th block appears.

図8は、高域成分データ、直流成分データ、低域成分データの切り替わり部分で出力されるシンボルデータの出力例を示す図である。直流成分データのブロック(ブロックNo.53)の最後の非零係数{40}に関するシンボルデータは、低域成分データの最初のブロック(ブロックNo.54)の最初の非零係数の出現時に出力されている。なお、直流成分データについては、シンボルデータとしてABSとSIGNだけが出力される。また、直流成分データについては、ABSとして量子化データの絶対値がそのまま(1を減算しない値)が設定される。   FIG. 8 is a diagram illustrating an output example of symbol data output at a switching portion of high-frequency component data, DC component data, and low-frequency component data. Symbol data relating to the last non-zero coefficient {40} of the block of DC component data (block No. 53) is output when the first non-zero coefficient of the first block (block No. 54) of low-frequency component data appears. ing. For DC component data, only ABS and SIGN are output as symbol data. For the DC component data, the absolute value of the quantized data is set as it is as ABS (a value not subtracting 1).

また、高域成分データの最後のブロック(ブロックNo.52)の最後の非零係数{1}に関するシンボルデータは、直流成分データの最初の非零係数の出現時に出力されている。   The symbol data related to the last non-zero coefficient {1} of the last block (block No. 52) of the high-frequency component data is output when the first non-zero coefficient of the DC component data appears.

また、低域成分データの最後のブロックの最後の非零係数に関するシンボルデータは、高域成分データの最初のブロックの最初の非零係数の出現時に出力される。   The symbol data related to the last non-zero coefficient of the last block of the low-frequency component data is output when the first non-zero coefficient of the first block of the high-frequency component data appears.

このように、直流成分データ、低域成分データ、高域成分データにわたって処理方式を統一することができるので、処理回路の大部分を共通化させることが可能である。あるいはソフトウェア処理を行うのであれば、アルゴリズムの大部分を共通化させることが可能である。   Thus, since the processing method can be unified over the DC component data, the low-frequency component data, and the high-frequency component data, it is possible to share most of the processing circuits. Alternatively, if software processing is performed, most of the algorithms can be shared.

10 画像圧縮装置
11 第1周波数変換部
12 第2周波数変換部
13 量子化部
15 シンボル生成部
51〜56 第1〜第6レジスタ
DESCRIPTION OF SYMBOLS 10 Image compression apparatus 11 1st frequency conversion part 12 2nd frequency conversion part 13 Quantization part 15 Symbol generation part 51-56 1st-6th register

Claims (1)

画像データを周波数変換して周波数変換データを生成する周波数変換部と、
周波数変換データを量子化して量子化データを生成する量子化部と、
前記量子化部が生成した量子化データに対して予測符号化処理を実行する予測処理部と、
量子化データをシンボル化してシンボルデータを生成するシンボル生成部と、
シンボルデータを符号化して符号化データを生成する符号化部と、
を備え、
前記シンボル生成部は、
複数のブロックで構成される、前記予測処理部により取得される前記予測符号化処理が実行された後の量子化データのデータ列をシリアルに入力する量子化データ入力部と、
記憶容量が1つ分の量子化データの情報を記憶する容量である量子化データ情報記憶部であって、前記量子化データ入力部にシリアルに入力された量子化データのデータ列を入力とし、1つの非零係数の量子化データの絶対値、符号、および、零ラン情報を記憶可能な前記量子化データ情報記憶部と、
前記量子化データ入力部が入力した処理対象の量子化データが非零係数である場合、前記量子化データ情報記憶部に記憶されている1つ前の非零係数の量子化データの絶対値、符号、および、零ラン情報をシンボルデータとして出力するシンボルデータ出力部と、
を有することを特徴とする画像圧縮装置。
A frequency conversion unit that converts the frequency of image data to generate frequency conversion data;
A quantization unit that quantizes the frequency conversion data to generate quantized data;
A prediction processing unit that performs predictive coding processing on the quantized data generated by the quantization unit;
A symbol generator for symbolizing quantized data to generate symbol data;
An encoding unit that encodes symbol data to generate encoded data;
With
The symbol generator is
A quantized data input unit configured to serially input a data string of quantized data after the predictive encoding process acquired by the predictive processing unit, which is configured by a plurality of blocks,
A quantized data information storage unit that is a capacity for storing information of quantized data for one storage capacity, and input a data string of quantized data serially input to the quantized data input unit, The quantized data information storage unit capable of storing absolute value, sign, and zero run information of quantized data of one non-zero coefficient;
When the quantized data to be processed input by the quantized data input unit is a non-zero coefficient, the absolute value of the quantized data of the previous non-zero coefficient stored in the quantized data information storage unit, A symbol, and a symbol data output unit that outputs zero run information as symbol data;
An image compression apparatus comprising:
JP2013104164A 2013-05-16 2013-05-16 Image compression device Expired - Fee Related JP5612722B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013104164A JP5612722B2 (en) 2013-05-16 2013-05-16 Image compression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013104164A JP5612722B2 (en) 2013-05-16 2013-05-16 Image compression device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008299318A Division JP5307520B2 (en) 2008-11-25 2008-11-25 Image compression device

Publications (2)

Publication Number Publication Date
JP2013176157A true JP2013176157A (en) 2013-09-05
JP5612722B2 JP5612722B2 (en) 2014-10-22

Family

ID=49268583

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013104164A Expired - Fee Related JP5612722B2 (en) 2013-05-16 2013-05-16 Image compression device

Country Status (1)

Country Link
JP (1) JP5612722B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015103982A (en) * 2013-11-26 2015-06-04 株式会社シキノハイテック Image encoding device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10224804A (en) * 1996-09-20 1998-08-21 At & T Corp Video coder providing scanning adaptability and tacit coefficient prediction for video image coding and intra-coding
JP2000059234A (en) * 1998-08-10 2000-02-25 Mitsubishi Electric Corp Variable length encoding processor
JP2004336247A (en) * 2003-05-02 2004-11-25 Canon Inc Image coding method, image coder and computer program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10224804A (en) * 1996-09-20 1998-08-21 At & T Corp Video coder providing scanning adaptability and tacit coefficient prediction for video image coding and intra-coding
JP2000059234A (en) * 1998-08-10 2000-02-25 Mitsubishi Electric Corp Variable length encoding processor
US6144322A (en) * 1998-08-10 2000-11-07 Mitsubishi Denki Kabushiki Kaisha Variable length code processor with encoding and/or decoding
JP2004336247A (en) * 2003-05-02 2004-11-25 Canon Inc Image coding method, image coder and computer program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015103982A (en) * 2013-11-26 2015-06-04 株式会社シキノハイテック Image encoding device

Also Published As

Publication number Publication date
JP5612722B2 (en) 2014-10-22

Similar Documents

Publication Publication Date Title
JP4540585B2 (en) Encoding device and decoding device
JP6431487B2 (en) Data encoder, data decoder and method
EP1946246A2 (en) Extended amplitude coding for clustered transform coefficients
JP2003023635A (en) Video frame compression/decompression hardware system
KR101314458B1 (en) Compression using range coding with virtual sliding window
JP2016512004A5 (en)
JP2008514142A (en) Multi-technology entropy coding system and method
US20150326859A1 (en) Video quantization-parameter encoding method, video quantization-parameter decoding method, device, and program
JP4181887B2 (en) Variable length coding apparatus and method
JPS6376525A (en) Method for probability fitting in arithmetic encoding system
JP5612722B2 (en) Image compression device
JP5307520B2 (en) Image compression device
KR100667595B1 (en) Variable length decoder
US8970405B2 (en) Method and apparatus for entropy decoding
JP2007295157A (en) Unit, method and program for data coding, and information recording medium having recorded data coding program
Ahmadvand et al. A new pipelined architecture for JPEG2000 MQ-coder
EP3149947B1 (en) Dedicated arithmetic encoding instruction
JP2007074648A (en) Cabac decoding apparatus
KR20180031944A (en) Video decoder and electronic system including the same
JP6635312B2 (en) Image processing apparatus and method
JP2013009272A (en) Image encoding apparatus, method, and program, and image decoding apparatus, method, and program
KR101130271B1 (en) A context-based adaptive variable length coding device for H.264/AVC
JP2002094387A (en) Code-processing method and code processor
US20140159928A1 (en) Decoding apparatus, encoding apparatus, decoding method, and encoding method
JP2003264704A (en) Image decoder, image decoding program, image encoder and image encoding program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140530

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20140603

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140718

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140819

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140904

R150 Certificate of patent or registration of utility model

Ref document number: 5612722

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees