JP2009081782A - Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof - Google Patents

Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof Download PDF

Info

Publication number
JP2009081782A
JP2009081782A JP2007250884A JP2007250884A JP2009081782A JP 2009081782 A JP2009081782 A JP 2009081782A JP 2007250884 A JP2007250884 A JP 2007250884A JP 2007250884 A JP2007250884 A JP 2007250884A JP 2009081782 A JP2009081782 A JP 2009081782A
Authority
JP
Japan
Prior art keywords
data
huffman
bit length
common redundant
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007250884A
Other languages
Japanese (ja)
Inventor
Akira Usami
陽 宇佐見
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.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2007250884A priority Critical patent/JP2009081782A/en
Publication of JP2009081782A publication Critical patent/JP2009081782A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve compression efficiency by solving a problem wherein, when the level of an input sample is small, its compression efficiency deteriorates owing to Huffman coding processing to data subjected to common redundance portion removal in order to convert the data into Huffman coding data. <P>SOLUTION: The methods and appratuses includes: a common redundancy portion removing means 12 to remove a redundancy portion common to each sample constituting a block; an high-order portion/low-order portion separating means 13 which separates data so that data not subjected to Huffman processing but subjected to common redundancy portion removal is superposed on a bit stream when the bit length of the data from which the common redundancy portion is removed is equal or less than the minimum bit length of data subjected to Huffman coding; and a multiplexer 16 which prevents supplementary information HI specifing a Huffman coding algorithm from being superposed on the bit stream when the bit length of the data subjected to common redundancy portion removal is equal to or less than the minimum bit length of data subjected to Huffman coding. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、デジタルオーディオ信号を伝送記録するロスレス(可逆)圧縮の符号化および復号に関する。   The present invention relates to encoding and decoding of lossless (reversible) compression for transmitting and recording a digital audio signal.

デジタルオーディオ信号の圧縮には様々な方法があるが、これらの圧縮方法は2つに大別される。一つ目は、デジタルオーディオ信号が時系列に並ぶサンプルデータの自己相関性や相互相関性、あるいは複数チャンネルのチャンネル間相関などに依存する冗長成分のみを圧縮して情報量を削減して伝送記録する符号化方法で、可逆(ロスレス)圧縮方法と呼ばれる。二つ目は、高効率を得るために人間の聴覚特性を利用して、知覚されにくい鈍感な成分を省くこと(すなわち劣化)を許容して、大幅に情報量を削減して伝送記録する符号化方法で、非可逆(ロッシー)圧縮方法と呼ばれる。後者は、一般に前者とともに用いられ、伝送記録ビットレートの低い通信手段や記録メディアで多用される。しかし、高品位な音質を求める場合は、音質劣化の無い前者のロスレス圧縮方法でなければならない。以下では、ロスレス圧縮に限定して説明する。   There are various methods for compressing a digital audio signal, and these compression methods are roughly classified into two methods. The first is transmission recording by reducing the amount of information by compressing only redundant components that depend on autocorrelation and cross-correlation of sample data in which digital audio signals are arranged in time series, or correlation between channels of multiple channels. This encoding method is called a lossless compression method. The second is a code that uses human auditory characteristics to obtain high efficiency, allows the omission of insensitive components that are difficult to perceive (ie, degrades), and greatly reduces the amount of information transmitted and recorded. And is referred to as a lossy compression method. The latter is generally used together with the former and is frequently used in communication means and recording media having a low transmission recording bit rate. However, when a high quality sound quality is required, the former lossless compression method without sound quality deterioration must be used. In the following, the description will be limited to lossless compression.

ロスレス圧縮方法の従来技術の一例としては、特許文献1に記載された「ロスレス圧縮符号方法とその装置およびロスレス圧縮復号方法とその装置」がある。この従来技術の目的は、膨大な情報量となる96kHz・24bit・6chのモードで、74分のデジタルオーディオデータを劣化のない高品位な音質で、例えば4.7GBのDVDのように限られた容量の記録媒体に記録するために、元のデータの情報量を削減するロスレス圧縮符号化/復号方法およびその装置を提供するものである。   As an example of the prior art of the lossless compression method, there is a “lossless compression encoding method and apparatus and lossless compression decoding method and apparatus” described in Patent Document 1. The purpose of this prior art is a 96 kHz, 24 bit, 6 ch mode, which is a huge amount of information, and 74 minutes of digital audio data with high quality sound without deterioration and limited to, for example, a 4.7 GB DVD The present invention provides a lossless compression encoding / decoding method and apparatus for reducing the amount of information of original data for recording on a recording medium having a capacity.

そのために、前述の従来技術のロスレス圧縮では、所定ビット長で表される時系列の入力サンプルを所定の時間毎に区切った所定数のサンプルからなるブロックを単位として、サンプル間の相関成分を除去するとともに、相関除去特性を指定する補助情報を得る。相関成分を除去した後のサンプルについて冗長ランレングスを求め、ブロック内の冗長ランレングスの最小値、すなわちブロック内の各サンプルに共通の冗長部(以下、共通冗長部と呼ぶ)のランレングスを検出して、各サンプルから共通冗長部を除去するとともに、共通冗長部のランレングス情報を得る。共通冗長部を除去したデータをハフマン符号化してハフマン符号化データを得るとともに、ハフマン符号化アルゴリズムを指定する補助情報を得る。このようにして得られた共通冗長部のランレングス情報と、サンプル毎のハフマン符号化データと、相関除去特性およびハフマン符号化アルゴリズムを指定する補助情報とをビットストリームに重畳する。   Therefore, in the above-described lossless compression of the prior art, the correlation component between samples is removed in units of a block consisting of a predetermined number of samples obtained by dividing a time-series input sample represented by a predetermined bit length every predetermined time. At the same time, auxiliary information specifying the correlation removal characteristic is obtained. The redundant run length is obtained for the sample after removing the correlation component, and the minimum value of the redundant run length in the block, that is, the run length of the redundant portion common to each sample in the block (hereinafter referred to as a common redundant portion) is detected. Then, the common redundant part is removed from each sample, and the run length information of the common redundant part is obtained. The data from which the common redundant part is removed is Huffman-encoded to obtain Huffman-encoded data, and auxiliary information for specifying the Huffman encoding algorithm is obtained. The run length information of the common redundant portion obtained in this way, the Huffman encoded data for each sample, and auxiliary information specifying the correlation removal characteristics and the Huffman encoding algorithm are superimposed on the bitstream.

このようにして、前述のロスレス圧縮では、入力サンプルのサンプル間相関を除去し、共通冗長部を除去した後のデータから、さらにデータ分布の偏りを利用して効果的にデータ圧縮をして、入力サンプルの情報エントロピーに近い情報量まで圧縮する。   In this way, in the lossless compression described above, the data after removing the correlation between the samples of the input samples and removing the common redundant part is further effectively compressed using the data distribution bias, Compress to the amount of information close to the information entropy of the input sample.

また、サンプル間の相関成分の除去において、予測器または予測フィルタで予測したデータと実データとの差すなわち予測残差を取り出す。例えば、これらの予測器または予測フィルタは、入力サンプルの整数レンジ以上の整数演算回路からなる。   Further, in removing the correlation component between samples, the difference between the data predicted by the predictor or the prediction filter and the actual data, that is, the prediction residual is extracted. For example, these predictors or prediction filters are composed of integer arithmetic circuits having an integer range of input samples or more.

また、複数の相関除去特性を備えて、最大の圧縮効率となる相関除去特性を選択して用いるとともに、選択した相関除去特性を指定する補助情報をビットストリームに重畳する。   In addition, a plurality of correlation removal characteristics are provided, and a correlation removal characteristic that provides the maximum compression efficiency is selected and used, and auxiliary information that specifies the selected correlation removal characteristic is superimposed on the bitstream.

また、ハフマン符号化において、共通冗長部を除去したデータの所定ビット長の上位部データに対してのみハフマン符号化を施し、残りの下位部データが有る場合にはそのままビットストリームに重畳する。   Also, in Huffman coding, Huffman coding is performed only on the upper part data of a predetermined bit length from the data from which the common redundant part is removed, and if there is remaining lower part data, it is directly superimposed on the bit stream.

また、複数のハフマン符号化アルゴリズムを備えて、最大の圧縮効率となるハフマン符号化アルゴリズムを選択して用いるとともに、選択したハフマン符号化アルゴリズムを指定する補助情報をビットストリームに重畳する。   In addition, a plurality of Huffman encoding algorithms are provided, and the Huffman encoding algorithm that provides the maximum compression efficiency is selected and used, and auxiliary information that specifies the selected Huffman encoding algorithm is superimposed on the bitstream.

また、前述の従来技術のロスレス圧縮復号では、前述したロスレス圧縮符号化によって生成されるビットストリームを入力し、ハフマン符号化アルゴリズムを指定する補助情報を取り出し、ハフマン復号を施す。更に、ブロック内の共通の冗長部のランレングス情報を取り出して、ハフマン復号を施した後のデータに、ブロック内の共通の冗長部を付加する。更に、相関除去特性を指定する補助情報を取り出し、サンプル間の相関成分を復元する処理を施す。このようにして、前述の従来技術のロスレス圧縮復号では、入力されるビットストリームから元のデジタルオーディオデータを劣化無く完全に復元して出力する。   Further, in the above-described lossless compression decoding of the prior art, a bit stream generated by the above-described lossless compression encoding is input, auxiliary information specifying a Huffman encoding algorithm is extracted, and Huffman decoding is performed. Further, the run length information of the common redundant part in the block is extracted, and the common redundant part in the block is added to the data after the Huffman decoding. Further, auxiliary information specifying the correlation removal characteristic is extracted, and a process of restoring the correlation component between samples is performed. In this way, in the above-described lossless compression decoding of the prior art, the original digital audio data is completely restored from the input bit stream without deterioration and output.

また、ハフマン復号において、所定のハフマン符号語に一致する部分の上位部データと、共通冗長部のランレングス情報に基づく所定ビット長の下位部データに分けて、上位部データに対してのみハフマン復号を施す。   Also, in Huffman decoding, Huffman decoding is performed only on the upper part data by dividing the upper part data corresponding to the predetermined Huffman codeword into lower part data having a predetermined bit length based on the run length information of the common redundant part. Apply.

また、ハフマン復号において、ハフマン符号化アルゴリズムを指定する補助情報を取り出し、この補助情報に基づいて備え持つ複数のハフマン符号化テーブルの中のいずれか一つを選択し、所定のハフマン符号語に一致する部分にハフマン復号を施して上位部データを復元する。   Also, in Huffman decoding, auxiliary information specifying a Huffman encoding algorithm is extracted, and one of a plurality of Huffman encoding tables provided based on this auxiliary information is selected to match a predetermined Huffman codeword Huffman decoding is performed on the part to be restored to restore the upper part data.

また、相関成分を復元する処理において、予測器または予測フィルタで予測したデータと実データとの和を取り出す。例えば、これらの予測器または予測フィルタは、出力サンプルの整数レンジ以上の整数演算回路からなる。   Further, in the process of restoring the correlation component, the sum of the data predicted by the predictor or the prediction filter and the actual data is extracted. For example, these predictors or prediction filters are composed of integer arithmetic circuits having an integer range of output samples or more.

図6は、前述の従来技術のロスレス圧縮符号化装置1の構成図である。図6において、相関成分除去手段11は、所定の時間毎に区切った所定数Nのサンプルからなるブロックを単位として、時系列の入力サンプルIN(i)(iは0<=i<Nとなる整数)のサンプル間の相関成分を除去したデータD1(j,i)を出力する。相関成分除去手段11は、複数の相関除去特性を備え持ち、jは複数の相関除去特性のうちの1つを指定するインデックスを表す。   FIG. 6 is a block diagram of the above-described lossless compression encoding apparatus 1 of the prior art. In FIG. 6, the correlation component removing unit 11 uses time-series input samples IN (i) (i is 0 <= i <N) with a block made up of a predetermined number N of samples divided every predetermined time as a unit. Data D1 (j, i) from which correlation components between (integer) samples are removed is output. The correlation component removal unit 11 has a plurality of correlation removal characteristics, and j represents an index for designating one of the plurality of correlation removal characteristics.

また、共通冗長部除去手段12は、相関成分除去手段11で相関成分を除去した後のデータD1(j,i)のサンプル毎のビット列で同一ビット値が連続する長さを表す冗長ランレングスを求めるとともに、ブロック内の冗長ランレングスの最小値すなわちブロックの共通冗長部のランレングスを検出して、共通冗長部を除去したデータD2(j,i)を出力する。また、共通冗長部除去手段12は共通冗長部のランレングス情報CRB(j)を出力する。   Further, the common redundant part removing unit 12 calculates a redundant run length representing a length in which the same bit value continues in the bit string for each sample of the data D1 (j, i) after the correlation component is removed by the correlation component removing unit 11. At the same time, the minimum value of the redundant run length in the block, that is, the run length of the common redundant portion of the block is detected, and data D2 (j, i) from which the common redundant portion is removed is output. Further, the common redundant part removing unit 12 outputs the run length information CRB (j) of the common redundant part.

また、上位部・下位部分離手段13は、共通冗長部を除去したデータD2(j,i)から、ハフマン符号化を施す所定ビット長の上位部データU1(j,i)と、残りの下位部データL1(j,i)に分離して各々を出力する。   Further, the upper part / lower part separating means 13 performs the upper part data U1 (j, i) having a predetermined bit length subjected to Huffman coding and the remaining lower part from the data D2 (j, i) from which the common redundant part is removed. Each is divided into partial data L1 (j, i) and output.

ハフマン符号化手段14は、分離された上位部データU1(j,i)にハフマン符号化を施してハフマン符号化データH1(k,j,i)を出力する。ここで、ハフマン符号化手段14は複数のハフマン符号化アルゴリズムを備え、kは複数のハフマン符号化アルゴリズムのうちの1つを指定するためのインデックスを表す。   The Huffman encoding means 14 performs Huffman encoding on the separated higher-order data U1 (j, i) and outputs Huffman encoded data H1 (k, j, i). Here, the Huffman encoding means 14 includes a plurality of Huffman encoding algorithms, and k represents an index for designating one of the plurality of Huffman encoding algorithms.

また、最大効率データ出力手段15は、下位部データL1(j,i)とハフマン符号化データH1(k,j,i)の組合せの中から最大の圧縮効率となるように相関除去特性とハフマン符号化アルゴリズムのいずれか一つずつを選択し、ビットストリームに重畳する下位部データL2(i)とハフマン符号化データH2(i)を出力する。更に、選択した相関除去特性を指定するインデックスjを補助情報DIとして出力するとともに、選択したハフマン符号化アルゴリズムを指定するインデックスkを補助情報HIとして出力する。   Further, the maximum efficiency data output means 15 has a correlation removal characteristic and a Huffman so that the maximum compression efficiency is obtained from the combination of the lower order data L1 (j, i) and the Huffman encoded data H1 (k, j, i). Any one of the encoding algorithms is selected, and lower order data L2 (i) and Huffman encoded data H2 (i) to be superimposed on the bit stream are output. Further, the index j specifying the selected correlation removal characteristic is output as auxiliary information DI, and the index k specifying the selected Huffman coding algorithm is output as auxiliary information HI.

マルチプレクサ16は、ブロック内の共通冗長部のランレングス情報CRB(DI)と、相関除去特性を指定する補助情報DIと、ハフマン符号化アルゴリズムを指定する補助情報HIと、下位部データL2(i)とハフマン符号化データH2(i)とをビットストリームSTに重畳して出力する。   The multiplexer 16 includes the run length information CRB (DI) of the common redundant part in the block, the auxiliary information DI specifying the correlation removal characteristic, the auxiliary information HI specifying the Huffman coding algorithm, and the lower part data L2 (i). And Huffman encoded data H2 (i) are superimposed on the bit stream ST and output.

図7は、図6の相関成分除去手段11の一例を示す内部構成図である。図7において、相関成分除去手段11は2つの遅延器と2つの演算器を備え、入力される時系列の入力サンプルIN(i)に対して、遅延器111で遅延される1サンプル期間前の入力サンプルIN(i−1)との差を演算器112で求め、こうして得られる1次差分値を相関成分を除去したデータD1(1,i)として出力する。更に、1次差分値で表されるデータD1(1,i)に対して、遅延器113で遅延される1サンプル期間前の1次差分値のデータD1(1,i−1)との差を演算器114で求め、こうして得られる2次差分値を相関成分を除去したデータD1(2,i)として出力する。ただし、図7においては最大の圧縮効率となるようにするためには相関成分を除去しない入力サンプルIN(i)を選択する方が好ましい場合に、入力サンプルIN(i)を選択可能とするために、入力サンプルIN(i)をD1(0,i)として出力する。   FIG. 7 is an internal block diagram showing an example of the correlation component removing unit 11 of FIG. In FIG. 7, the correlation component removing unit 11 includes two delay units and two arithmetic units. The input sample IN (i) of the time series input is one sample period before the delay by the delay unit 111. A difference from the input sample IN (i−1) is obtained by the calculator 112, and the primary difference value obtained in this way is output as data D1 (1, i) from which the correlation component is removed. Further, the difference between the data D1 (1, i) represented by the primary difference value and the data D1 (1, i-1) of the primary difference value before the one sample period delayed by the delay unit 113. Is obtained by the computing unit 114, and the secondary difference value thus obtained is output as data D1 (2, i) from which the correlation component is removed. However, in FIG. 7, the input sample IN (i) can be selected when it is preferable to select the input sample IN (i) from which the correlation component is not removed in order to obtain the maximum compression efficiency. The input sample IN (i) is output as D1 (0, i).

図7では、簡単のために入力サンプルの相関成分を除去する方法として、1次差分値および2次差分値を求め、これらを相関成分を除去したデータとして出力する構成としているが、別の予測器または予測フィルタを用いて相関成分を除去するようにしてもよい。更に、3つ以上の相関除去特性を備え持つようにしてもよい。   In FIG. 7, as a method for removing the correlation component of the input sample for the sake of simplicity, the primary difference value and the secondary difference value are obtained and output as data from which the correlation component is removed. The correlation component may be removed using a detector or a prediction filter. Furthermore, you may make it have three or more correlation removal characteristics.

図8は、図6の共通冗長部除去手段12の内部構成図である。図8において、まずブロックのサンプル数Nの個数分のデータD1(j,i)を遅延バッファ121に入力し保持する。冗長ランレングス検出部122は、D1(j,i)のサンプル毎のビット列において同一ビット値が連続する長さを表す冗長ランレングスを順次求める。共通冗長ランレングス検出部123は、サンプル毎に求めた冗長ランレングスの最小値すなわちブロックの各サンプルに共通の冗長部のランレングスを検出し、共通冗長部のランレングス情報CRB(j)として出力する。共通冗長部の除去部124は、共通冗長部のランレングス情報CRB(j)に基づいてD1(j,i)の共通冗長部を除去したデータD2(j,i)を出力する。   FIG. 8 is an internal block diagram of the common redundant part removing means 12 of FIG. In FIG. 8, first, data D1 (j, i) for the number of samples N of the block is input to the delay buffer 121 and held. The redundant run length detection unit 122 sequentially obtains redundant run lengths representing the length of the same bit value in the bit string for each sample of D1 (j, i). The common redundant run length detection unit 123 detects the minimum redundant run length obtained for each sample, that is, the run length of the redundant portion common to each sample of the block, and outputs the run length information CRB (j) of the common redundant portion. To do. The common redundant part removing unit 124 outputs data D2 (j, i) obtained by removing the common redundant part of D1 (j, i) based on the run length information CRB (j) of the common redundant part.

以下では、説明を簡単にするために、ブロック内のサンプル数Nを6、入力されるサンプル当たりのビット長WLを16ビットとする。また、ハフマン符号化手段で用いるハフマン符号化テーブルの所定ビット長のインデックスIDXのビット長IBを6ビットとする。   In the following, for simplicity of explanation, the number of samples N in the block is 6 and the bit length WL per input sample is 16 bits. Further, the bit length IB of the index IDX having a predetermined bit length in the Huffman coding table used in the Huffman coding means is 6 bits.

図9は、相関成分を除去した後のデータD1(j,i)とサンプル毎に検出される冗長ランレングスRB(j,i)、共通冗長部を除去したデータD2(j,i)、共通冗長部のランレングス情報CRB(j)を表す説明図である。図8の冗長ランレングス検出部122によりデータD1(j,i)のサンプル毎の冗長ランレングスRB(j,i)が検出される。図9においては、冗長ランレングスRB(j,i)={7,6,8,12,9,10}が各々検出される。   FIG. 9 shows data D1 (j, i) after removing the correlation component, redundant run length RB (j, i) detected for each sample, data D2 (j, i) from which the common redundant part is removed, common It is explanatory drawing showing the run length information CRB (j) of a redundant part. The redundant run length detection unit 122 in FIG. 8 detects the redundant run length RB (j, i) for each sample of the data D1 (j, i). In FIG. 9, redundant run lengths RB (j, i) = {7, 6, 8, 12, 9, 10} are detected.

共通冗長ランレングス検出部123は、冗長ランレングスRB(j,i)のうち最小のRB(j,1)=6をブロックの共通冗長部のランレングスを表す共通冗長ランレングス情報CRB(j)=6として出力する。共通冗長部の除去部124は、共通冗長ランレングス情報CRB(j)=6に基づいて、データD1(j,i)から共通冗長部を除去した10ビットのデータD2(j,i)を出力する。   The common redundant run length detection unit 123 uses the minimum redundant RB (j, 1) = 6 among the redundant run lengths RB (j, i) as the common redundant run length information CRB (j) indicating the run length of the common redundant part of the block. = 6 is output. The common redundant part removing unit 124 outputs 10-bit data D2 (j, i) obtained by removing the common redundant part from the data D1 (j, i) based on the common redundant run length information CRB (j) = 6. To do.

図10は、図6の上位部・下位部分離手段13において、入力される共通冗長部を除去したデータD2(j,i)と、分離される上位部データU1(j,i)と下位部データL1(j,i)を表す説明図である。図10において、上位部・下位部分離手段13は、共通冗長部を除去した10ビットのデータD2(j,i)からハフマン符号化テーブルのインデックスIDXのビット長IB、すなわち上位6ビットを上位部データU1(j,i)として出力し、残りの下位4ビットを下位部データL1(j,i)として出力する。   FIG. 10 shows the data D2 (j, i) from which the common redundant part is inputted, the separated upper part data U1 (j, i) and the lower part in the upper part / lower part separating means 13 of FIG. It is explanatory drawing showing data L1 (j, i). In FIG. 10, the upper part / lower part separating means 13 converts the bit length IB of the index IDX of the Huffman coding table from the 10-bit data D2 (j, i) from which the common redundant part is removed, that is, the upper 6 bits to the upper part. Data U1 (j, i) is output and the remaining lower 4 bits are output as lower data L1 (j, i).

図11は、図6のハフマン符号化手段14で入力される上位部データU1(j,i)に施すハフマン符号化アルゴリズムで用いるハフマン符号化テーブルの一例を示す表である。上位部データU1(j,i)をインデックスIDXとして、対応する符号長HLN(IDX)のハフマン符号語HCW(IDX)が選択されハフマン符号化データH1(k,j,i)として出力される。   FIG. 11 is a table showing an example of a Huffman encoding table used in the Huffman encoding algorithm applied to the higher order data U1 (j, i) input by the Huffman encoding means 14 of FIG. The Huffman code word HCW (IDX) having the corresponding code length HLN (IDX) is selected with the higher order data U1 (j, i) as the index IDX, and is output as Huffman encoded data H1 (k, j, i).

例えば、U1(j,i)=[000000]([]内は、ビット列のパターンを表す)の場合には、符号長HLN(0)が4ビットのハフマン符号語HCW(0)=[0000]が出力され、U1(j,i)が[110111]の場合には、符号長HLN(55)が10ビットのハフマン符号語HCW(55)=[1111110111]が出力される。一般に、ハフマン符号化アルゴリズムに用いられるハフマン符号化テーブルにおいては、インデックスの出現頻度分布における出現頻度の高いインデックスに対して短符号長のハフマン符号語、出現頻度の低いインデックスに対して長符号長のハフマン符号語という具合に、可変長のハフマン符号語が割当てられる。こうすることで、出現頻度の高いインデックスに短符号長を割当てられて全体の情報量の削減が図られる。また、インデックスの出現頻度分布の異なる複数のハフマン符号化アルゴリズムを備えることにより、最大の圧縮効率となるハフマン符号化アルゴリズムを選択して用いる。   For example, in the case of U1 (j, i) = [000000] (inside [] represents a bit string pattern), a Huffman codeword HCW (0) = [0000] having a code length HLN (0) of 4 bits. When U1 (j, i) is [110111], the Huffman code word HCW (55) = [1111110111] having a code length HLN (55) of 10 bits is output. In general, in the Huffman coding table used in the Huffman coding algorithm, a short code length Huffman code word is used for an index with a high appearance frequency in an index appearance frequency distribution, and a long code length is used for an index with a low appearance frequency. A variable-length Huffman codeword is assigned in the form of a Huffman codeword. By doing so, a short code length is assigned to an index having a high appearance frequency, and the total amount of information can be reduced. In addition, by providing a plurality of Huffman encoding algorithms having different index appearance frequency distributions, a Huffman encoding algorithm that provides the maximum compression efficiency is selected and used.

図12は、図6の上位部・下位部分離手段13から出力される上位部データU1(j,i)を図11のハフマン符号化テーブルを用いてハフマン符号化を施した場合のハフマン符号化データH1(1,j,i)を表す説明図である。上位部データU1(j,i)をインデックスIDXとして、図11のハフマン符号化テーブルの対応するハフマン符号語HCW(IDX)がハフマン符号化データH1(1,j,i)として変換出力される。図12においては、6ビットの上位部データU1(j,i)の総ビット数が36ビット(=6ビット×6サンプル)であるのに対して、出力されるハフマン符号化データH1(1,j,i)の総ビット数が33ビットになることを表す。   12 shows the Huffman coding when the upper part data U1 (j, i) output from the upper part / lower part separating means 13 of FIG. 6 is subjected to Huffman coding using the Huffman coding table of FIG. It is explanatory drawing showing data H1 (1, j, i). Using the higher order data U1 (j, i) as an index IDX, the corresponding Huffman code word HCW (IDX) in the Huffman coding table of FIG. 11 is converted and output as Huffman coded data H1 (1, j, i). In FIG. 12, the total number of bits of the 6-bit upper part data U1 (j, i) is 36 bits (= 6 bits × 6 samples), whereas the output Huffman encoded data H1 (1, This represents that the total number of bits of j, i) is 33 bits.

ただし、上位部データU1(j,i)の組合せによっては、出現頻度が小さいとみなされるデータが多く現れ、結果として元の6ビットよりも長い符号長HLN(IDX)のハフマン符号語HCW(IDX)へ数多く変換され、ハフマン符号化データH1(k,j,i)の総ビット数が上位部データU1(j,i)の総ビット数よりも大きくなる場合がある。このように、圧縮効率を最大にするためには上位部データU1(j,i)を伝送するのが好ましい場合にこれを選択可能にするために、上位部データU1(j,i)をハフマン符号化データH1(0,j,i)として出力する。   However, depending on the combination of the upper part data U1 (j, i), a lot of data that appears to have a low appearance frequency appears, and as a result, a Huffman codeword HCW (IDX) having a code length HLN (IDX) longer than the original 6 bits ), And the total number of bits of the Huffman encoded data H1 (k, j, i) may be larger than the total number of bits of the higher order data U1 (j, i). As described above, in order to maximize the compression efficiency, when it is preferable to transmit the high order data U1 (j, i), the high order data U1 (j, i) is converted to Huffman so that it can be selected. Output as encoded data H1 (0, j, i).

図13は、図8の共通冗長ランレングス検出部123で検出されるブロック内の共通冗長部のランレングスが、データD1(j,i)のサンプル当りのビット長WLからハフマン符号化テーブルのインデックスのビット長IBを差し引いた(WL-IB)以上の場合の共通冗長部の除去を表す説明図である。図13において、ブロック内の共通冗長部のランレングスが(WL−IB)以上の場合は、ブロック内の共通冗長部のランレングスを(WL−HB)として共通冗長部を除去する。すなわち、共通冗長ランレングス情報CRB(j)を(WL−IB)とし、共通冗長部を除去したデータD2(j,i)はデータD1(j,i)の下位IBビットの部分となる。このようにして共通冗長部を除去した場合には、共通冗長部を除去したデータD2(j,i)から上位部・下位部分離手段13によって分離する上位部データU1(j,i)を共通冗長部を除去したデータD2(j,i)と同一とし、下位部データL1(j,i)を出力しない。   FIG. 13 shows the run length of the common redundant part in the block detected by the common redundant run length detection part 123 of FIG. 8 from the bit length WL per sample of the data D1 (j, i) to the index of the Huffman coding table. It is explanatory drawing showing the removal of a common redundant part in the case where it is more than (WL-IB) which deducted bit length IB. In FIG. 13, when the run length of the common redundant portion in the block is (WL-IB) or more, the run length of the common redundant portion in the block is set to (WL-HB), and the common redundant portion is removed. That is, the common redundant run length information CRB (j) is set to (WL-IB), and the data D2 (j, i) from which the common redundant portion is removed becomes the lower IB bit portion of the data D1 (j, i). When the common redundant part is removed in this way, the upper part data U1 (j, i) separated by the upper part / lower part separating means 13 from the data D2 (j, i) from which the common redundant part is removed is shared. It is the same as the data D2 (j, i) from which the redundant part is removed, and the lower part data L1 (j, i) is not output.

図14は、図13で表される上位部データU1(j,i)にハフマン符号化を施した場合のハフマン符号化データH1(k,j,i)を表す説明図である。図14においては、6ビットの上位部データU1(j,i)の総ビット数が36ビット(=6ビット×6サンプル)であるのに対して、出力されるハフマン符号化データH1(k,j,i)の総ビット数が24ビットに削減される。   FIG. 14 is an explanatory diagram showing the Huffman encoded data H1 (k, j, i) when the Huffman encoding is applied to the higher order data U1 (j, i) shown in FIG. In FIG. 14, the total number of bits of the 6-bit upper part data U1 (j, i) is 36 bits (= 6 bits × 6 samples), whereas the output Huffman encoded data H1 (k, The total number of bits j, i) is reduced to 24 bits.

図15は、前述の従来技術のロスレス圧縮復号装置2の構成図である。図15において、デマルチプレクサ21は、入力されるビットストリームSTからブロック内の共通冗長部のランレングスを表す共通冗長ランレングス情報CRB2と、相関除去特性を指定する補助情報DIと、ハフマン符号化アルゴリズムを指定する補助情報HIと、下位部データL3(i)とハフマン符号化データH3(i)とを抽出する。   FIG. 15 is a configuration diagram of the above-described lossless compression decoding apparatus 2 of the prior art. In FIG. 15, the demultiplexer 21 includes common redundant run-length information CRB2 indicating the run length of the common redundant portion in the block from the input bit stream ST, auxiliary information DI specifying the correlation removal characteristic, and a Huffman coding algorithm. Auxiliary information HI for designating, subordinate data L3 (i) and Huffman encoded data H3 (i) are extracted.

ハフマン復号手段22は、ハフマン符号化アルゴリズムを指定する補助情報HIで示されるハフマン符号化テーブルの符号長HLN(IDX)で抽出したビット列で表されるハフマン符号化データH3(i)とハフマン符号化テーブルのハフマン符号語HCW(IDX)との一致検出を行い、一致するハフマン符号語HCW(IDX)に対応するインデックスIDXを上位部データU2(i)として出力する。ここで、出力される上位部データU2(i)は図6のハフマン符号化手段14に入力される上位部データU1(j,i)と同一の所定ビット長である。   The Huffman decoding means 22 includes Huffman encoded data H3 (i) represented by a bit string extracted by the code length HLN (IDX) of the Huffman encoding table indicated by the auxiliary information HI designating the Huffman encoding algorithm, and Huffman encoding. A match with the Huffman code word HCW (IDX) in the table is detected, and the index IDX corresponding to the matching Huffman code word HCW (IDX) is output as the upper data U2 (i). Here, the output higher order data U2 (i) has the same predetermined bit length as the higher order data U1 (j, i) input to the Huffman encoding means 14 of FIG.

上位部・下位部結合手段23は、上位部データU2(i)と下位部データL3(i)とを結合したデータD3(i)を出力する。共通冗長部付加手段24は、データD3(i)にブロック内の共通冗長部のランレングス情報CRB2に基づいて共通冗長部を付加したデータD4(i)を出力する。共通冗長部を付加したデータD4(i)は、図6の共通冗長部除去手段12に入力されるデータD1(j,i)と同一のビット長である。相関成分復元手段25は、相関除去特性を指定する補助情報DIに基づいて、共通冗長部が付加されたデータD4(i)に図6の相関成分除去手段11の逆変換処理を施し、出力サンプルOUT(i)を復元して出力する。   The upper part / lower part combining means 23 outputs data D3 (i) obtained by combining the upper part data U2 (i) and the lower part data L3 (i). The common redundant part adding means 24 outputs data D4 (i) obtained by adding the common redundant part to the data D3 (i) based on the run length information CRB2 of the common redundant part in the block. The data D4 (i) with the common redundant part added has the same bit length as the data D1 (j, i) input to the common redundant part removing means 12 in FIG. The correlation component restoration unit 25 performs the inverse transformation process of the correlation component removal unit 11 of FIG. 6 on the data D4 (i) to which the common redundant portion is added based on the auxiliary information DI that specifies the correlation removal characteristic, and outputs the output sample. OUT (i) is restored and output.

図16は、ビットストリームSTから取り出されるハフマン符号化データH3(i)および下位部データL3(i)と、ハフマン符号化データH3(i)から復元される上位部データU2(i)と、上位部データU2(i)と下位部データL3(i)とを結合したデータD3(i)とを表す説明図である。   FIG. 16 shows Huffman encoded data H3 (i) and lower part data L3 (i) extracted from the bitstream ST, upper part data U2 (i) restored from Huffman encoded data H3 (i), and upper part It is explanatory drawing showing data D3 (i) which combined partial data U2 (i) and lower order data L3 (i).

図15のハフマン復号手段22によって、図11のハフマン符号化テーブルに基づいて符号長HLN(IDX)で抽出したビット列で表されるハフマン符号化データH3(i)とハフマン符号化テーブルのハフマン符号語HCW(IDX)との一致検出を行い、一致するハフマン符号語HCW(IDX)に対応するインデックスIDXを上位部データU2(i)として出力する。このようにして復元された上位部データU2(i)とビットストリームSTから取り出される下位部データL3(i)が上位部・下位部結合手段23によって結合され、データD3(i)として出力される。データD3(i)のビット長は、出力サンプルのサンプル当りの所定ビット長WLからブロックの共通冗長部のランレングスCRB2を差し引いた(WL−CRB2)である。   Huffman decoding means 22 in FIG. 15 performs Huffman encoded data H3 (i) represented by a bit string extracted with code length HLN (IDX) based on the Huffman encoding table in FIG. 11 and a Huffman codeword in the Huffman encoding table. Match detection with HCW (IDX) is performed, and the index IDX corresponding to the matching Huffman codeword HCW (IDX) is output as the higher-order data U2 (i). The upper part data U2 (i) restored in this way and the lower part data L3 (i) extracted from the bit stream ST are combined by the upper part / lower part combining means 23 and output as data D3 (i). . The bit length of the data D3 (i) is (WL-CRB2) obtained by subtracting the run length CRB2 of the common redundant portion of the block from the predetermined bit length WL per sample of the output samples.

前述したように、従来技術のロスレス圧縮符号化では、相関成分除去手段で入力サンプルの相関性を除去し、共通冗長部を除去し、ハフマン圧縮手段でデータの出現頻度分布の偏りを利用してハフマン符号化データに変換して更にデータ圧縮をして、補助情報を付加して入力サンプルよりも少ない情報量のビットストリームを生成する。   As described above, in the lossless compression coding of the prior art, the correlation component removing unit removes the correlation of the input samples, the common redundant part is removed, and the Huffman compression unit uses the bias of the appearance frequency distribution of the data. It converts to Huffman encoded data, further compresses the data, adds auxiliary information, and generates a bitstream with a smaller amount of information than the input samples.

また、従来技術のロスレス圧縮復号では、ビットストリームをハフマン復号手段でビットストリームから取り出されるハフマン符号化データにハフマン復号を施し、共通冗長部を付加し、相関性を復元するようにして全く劣化の無い出力サンプルを出力する。これにより、入力サンプルの持つ情報エントロピーに近い情報量にまで圧縮が可能となり、限られた記憶容量の記録媒体へ、より長時間に亘って記録/再生することを可能にしている。
特許第3723740号公報
Further, in the lossless compression decoding of the prior art, the Huffman decoding is performed on the Huffman encoded data extracted from the bitstream by the Huffman decoding means, a common redundant part is added, and the correlation is restored so that the degradation is completely eliminated. Output missing output samples. As a result, it is possible to compress the amount of information close to the information entropy of the input sample, and it is possible to record / reproduce data on a recording medium having a limited storage capacity for a longer time.
Japanese Patent No. 3723740

しかしながら、従来技術のロスレス圧縮符号化では、小さいレベルのサンプルが入力される場合において、ハフマン符号化テーブルの所定ビット長のインデックスIDXのビット長IBのデータを残すようにブロックの共通冗長部を除去するとともに、共通冗長部を除去したデータを上位部データとしてハフマン符号化を施すために、少なくともハフマン符号語の最小ビット長のハフマン符号化データと、且つハフマン符号化アルゴリズムを指定する補助情報をビットストリームに重畳するために圧縮効率が低下するという課題がある。   However, in the lossless compression coding of the prior art, when a small level sample is input, the common redundant part of the block is removed so that the data of the bit length IB of the index IDX of the predetermined bit length of the Huffman coding table remains. In addition, in order to perform Huffman coding using the data from which the common redundant part is removed as the upper part data, at least the Huffman coded data having the minimum bit length of the Huffman codeword and auxiliary information for designating the Huffman coding algorithm are bits. There is a problem in that the compression efficiency is lowered because the stream is superimposed on the stream.

本発明のロスレス圧縮符号化方法は、所定ビット長で表され、時系列に並んで入力されるサンプルのデータから、所定の時間毎に区切った所定の数のサンプルよりなるブロックを単位として、前記サンプル間の相関成分を除去する相関成分除去ステップと、前記相関成分を除去した後のデータから、前記ブロック内の各サンプルの冗長ランレングスの最小値に相当するビット長の各サンプルに共通な共通冗長部を除去する共通冗長部除去ステップと、前記共通冗長部を除去したデータのビット長が、ハフマン符号化で得られるデータの最小ビット長以下の場合はハフマン符号化を行わないようにするとともに、前記共通冗長部を除去したデータのビット長が、前記ハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記共通冗長部を除去したデータをハフマン符号化してハフマン符号化データを得るハフマン符号化ステップと、前記共通冗長部のランレングス情報と、サンプル毎の前記共通冗長部を除去したデータもしくは前記サンプル毎のハフマン符号化データとをビットストリームに重畳する重畳ステップとを備えたものである。   The lossless compression encoding method of the present invention is expressed by a predetermined bit length, and a block composed of a predetermined number of samples divided every predetermined time from sample data input side by side in time series. A common component common to each sample having a bit length corresponding to the minimum redundant run length of each sample in the block from the correlation component removing step for removing the correlation component between samples and the data after removing the correlation component A common redundant part removing step for removing the redundant part, and if the bit length of the data from which the common redundant part is removed is equal to or smaller than the minimum bit length of the data obtained by Huffman coding, the Huffman coding is not performed. When the bit length of the data from which the common redundant part is removed is larger than the minimum bit length of the data obtained by the Huffman coding, the common Huffman encoding step for obtaining Huffman encoded data by Huffman encoding the data from which the long part has been removed, the run length information of the common redundant part, the data from which the common redundant part is removed for each sample, or the Huffman for each sample A superimposing step of superimposing the encoded data on the bit stream.

また、さらに、前記共通冗長部を除去したデータを、所定ビット長の上位部データと、残りの下位部データとに分離する上位部・下位部分離ステップを備え、前記共通冗長部を除去したデータのビット長がハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記ハフマン符号化ステップにおいて、前記上位部データをハフマン符号化してハフマン符号化データを得ると共に、前記重畳ステップにおいて、前記下位部データを前記ビットストリームに重畳することを特徴とするものである。   Further, the data from which the common redundant part is removed is further provided with an upper part / lower part separating step for separating the data from which the common redundant part is removed into upper part data having a predetermined bit length and the remaining lower part data. Is larger than the minimum bit length of data obtained by Huffman coding, in the Huffman coding step, the higher order data is Huffman coded to obtain Huffman coded data, and in the superposition step, The lower part data is superimposed on the bit stream.

また、前記ハフマン符号化ステップは複数のハフマン符号化アルゴリズムを有し、さらに、前記共通冗長部を除去した後のデータのビット長が全ての前記ハフマン符号化アルゴリズムのハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記複数のハフマン符号化アルゴリズムの中から、前記ブロック内での圧縮効率が最大となるハフマン符号化アルゴリズムを選択する最大効率アルゴリズム選択ステップを備え、前記重畳ステップにおいて、さらに、前記選択したハフマン符号化アルゴリズムを示すパラメータを前記ビットストリームに重畳することを特徴とするものである。   Further, the Huffman encoding step has a plurality of Huffman encoding algorithms, and further, the bit length of the data after removing the common redundant portion is the data obtained by Huffman encoding of all the Huffman encoding algorithms. A maximum efficiency algorithm selection step of selecting a Huffman encoding algorithm that maximizes the compression efficiency in the block from the plurality of Huffman encoding algorithms when the bit length is greater than the minimum bit length, Furthermore, a parameter indicating the selected Huffman encoding algorithm is superimposed on the bit stream.

また、前記重畳ステップにおいて、前記共通冗長部を除去したデータのビット長が全ての前記ハフマン符号化アルゴリズムのハフマン符号化で得られるデータの最小ビット長以下の場合に、前記パラメータを前記ビットストリームに重畳しないことを特徴とするものである。   In the superimposing step, when the bit length of the data from which the common redundant portion is removed is equal to or less than the minimum bit length of data obtained by Huffman coding of all the Huffman coding algorithms, the parameter is added to the bit stream. It does not overlap.

また本発明のロスレス圧縮復号方法は、共通冗長部のランレングス情報とサンプルごとの共通冗長部を除去したデータもしくはサンプルごとのハフマン符号化データとが重畳されたビットストリームを入力とするロスレス圧縮復号方法であって、前記ビットストリームから前記共通冗長部のランレングス情報と前記サンプルごとの共通冗長部を除去したデータもしくは前記サンプルごとのハフマン符号化データとを抽出する抽出ステップと、前記抽出したサンプルごとのハフマン符号化データにハフマン復号を施してハフマン復号データを出力するハフマン復号ステップと、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化で得られるデータの最小ビット長よりも大きい場合に、前記ハフマン復号ステップでハフマン復号したハフマン復号データに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加し、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化で得られるデータの最小ビット長以下の場合に、前記抽出した前記サンプルごとの共通冗長部を除去したデータに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加する共通冗長部付加ステップと、前記共通冗長部を付加したデータに前記サンプル間の相関成分を付加して元のサンプルを復元する相関成分復元ステップとを備えたものである。   Further, the lossless compression decoding method of the present invention is a lossless compression decoding using a bit stream in which run length information of a common redundant portion and data obtained by removing the common redundant portion for each sample or Huffman encoded data for each sample are superimposed. An extraction step of extracting run length information of the common redundant portion and data obtained by removing the common redundant portion for each sample or Huffman encoded data for each sample from the bitstream, and the extracted sample A Huffman decoding step of performing Huffman decoding on each Huffman encoded data and outputting Huffman decoded data, and a bit length obtained by subtracting a bit length of the run length information of the extracted common redundant portion from the predetermined bit length of the sample The minimum bit of data obtained by the Huffman coding. When larger than the length, add a common redundant part based on the run length information of the extracted common redundant part to the Huffman decoded data Huffman decoded in the Huffman decoding step, the extracted from the predetermined bit length of the sample When the bit length obtained by subtracting the bit length of the run length information of the common redundant portion is equal to or smaller than the minimum bit length of the data obtained by the Huffman coding, the extracted data is obtained by removing the common redundant portion for each of the extracted samples. A common redundant portion adding step for adding a common redundant portion based on the run length information of the common redundant portion, and a correlation for restoring the original sample by adding a correlation component between the samples to the data to which the common redundant portion is added A component restoration step.

また、前記ビットストリームには、さらに、前記サンプルごとの共通冗長部を除去したデータから前記ハフマン符号化の符号語長に相当するビット長の上位部データを除去した下位部データが重畳され、前記抽出ステップにおいて、前記下位部データが抽出され、さらに、前記ハフマン復号データを上位部とし、前記抽出した下位部データを下位部としてこれらを結合する上位部・下位部結合ステップを備え、前記共通冗長部付加ステップにおいて、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化の符号後長よりも大きい場合に、前記ハフマン復号ステップでハフマン復号した前記ハフマン復号データに代えて、前記上位部・下位部結合ステップで結合したデータに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加することを特徴とするものである。   Further, the bit stream is further superimposed with lower part data obtained by removing upper part data having a bit length corresponding to the codeword length of the Huffman coding from data obtained by removing the common redundant part for each sample, In the extracting step, the low order part data is extracted, and further includes a high order part / low order part combining step of combining the Huffman decoded data as a high order part and combining the extracted low order part data as a low order part. The Huffman decoding step when the bit length obtained by subtracting the extracted bit length of the run length information of the common redundant portion from the predetermined bit length of the sample is greater than the post-code length of the Huffman coding In place of the Huffman-decoded data that was Huffman-decoded in Step 1, the higher-order / lower-order combination step It is characterized in adding a common redundant portion on the basis of the said extracted common redundant portion runlength information data.

また、前記ビットストリームには、さらに、複数のハフマン符号化アルゴリズムの1つを示すハフマン符号化アルゴリズム情報が重畳され、前記抽出ステップにおいて、前記ハフマン符号化アルゴリズム情報が抽出され、前記ハフマン復号ステップにおいて、前記抽出したハフマン符号化アルゴリズム情報に基づいたハフマン符号化アルゴリズムでハフマン復号を施すことを特徴とするものである。   Further, Huffman encoding algorithm information indicating one of a plurality of Huffman encoding algorithms is superimposed on the bitstream, and in the extraction step, the Huffman encoding algorithm information is extracted, and in the Huffman decoding step, , Huffman decoding is performed using a Huffman encoding algorithm based on the extracted Huffman encoding algorithm information.

前記構成により本発明のロスレス圧縮符号化方法は、共通冗長部を除去したデータのビット長が、ハフマン符号化で得られるデータの最小ビット長以下の場合はハフマン符号化を行わないようにすることにより、ビットストリームに重畳するデータの総ビット数を削減できる。また、このとき、ハフマン符号化アルゴリズムを示すパラメータを前記ビットストリームに重畳しないことにより、さらに総ビット数を削減できる。   With the above configuration, the lossless compression encoding method of the present invention prevents Huffman encoding when the bit length of the data from which the common redundant portion is removed is equal to or less than the minimum bit length of the data obtained by Huffman encoding. As a result, the total number of bits of data to be superimposed on the bit stream can be reduced. At this time, the total number of bits can be further reduced by not superimposing the parameter indicating the Huffman coding algorithm on the bit stream.

また、本発明のロスレス圧縮復号方法は、前記ロスレス圧縮符号化方法により総ビット数の削減されたビットストリームから、元のサンプルを復元できる。   Also, the lossless compression decoding method of the present invention can restore the original sample from the bitstream whose total number of bits has been reduced by the lossless compression encoding method.

以下本発明を実施するための最良の形態について、図面を参照しながら説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

(実施の形態1)
図1は、本発明の実施の形態1におけるロスレス圧縮符号化装置1の構成図である。図1において、相関成分除去手段11は、所定の時間毎に区切った所定数Nのサンプルからなるブロックを単位として、時系列の入力サンプルIN(i)(iは0<=i<Nとなる整数)のサンプル間の相関成分を除去したデータD1(j,i)を出力する。相関成分除去手段11は、複数の相関除去特性を備え、jは複数の相関除去特性のうちの1つを指定するインデックスを表す。
(Embodiment 1)
FIG. 1 is a configuration diagram of a lossless compression coding apparatus 1 according to Embodiment 1 of the present invention. In FIG. 1, the correlation component removing unit 11 uses time-series input samples IN (i) (i is 0 <= i <N) with a block composed of a predetermined number N of samples divided every predetermined time as a unit. Data D1 (j, i) from which correlation components between (integer) samples are removed is output. The correlation component removal unit 11 includes a plurality of correlation removal characteristics, and j represents an index that designates one of the plurality of correlation removal characteristics.

また、共通冗長部除去手段12は、相関成分除去手段11で相関成分を除去した後のデータD1(j,i)のサンプル毎のビット列で同一ビット値が連続する長さを表す冗長ランレングスを求めるとともに、ブロック内の冗長ランレングスの最小値、すなわちブロック内の共通冗長部のランレングスを検出して、共通冗長部を除去したデータD2(j,i)を出力する。また、共通冗長部除去手段12は、共通の冗長部のビット長を表すランレングス情報CRB(j)を出力する。   Further, the common redundant part removing unit 12 calculates a redundant run length representing a length in which the same bit value continues in the bit string for each sample of the data D1 (j, i) after the correlation component is removed by the correlation component removing unit 11. At the same time, the minimum value of the redundant run length in the block, that is, the run length of the common redundant portion in the block is detected, and data D2 (j, i) from which the common redundant portion is removed is output. Further, the common redundant part removing unit 12 outputs run length information CRB (j) indicating the bit length of the common redundant part.

また、上位部・下位部分離手段13は、共通の冗長部を除去したデータD2(j,i)から、ハフマン符号化を施す所定ビット長の上位部データU1(j,i)と、残りの下位部データL1(j,i)に分離して各々を出力する。ハフマン符号化手段14は、分離された上位部データU1(j,i)にハフマン符号化を施してハフマン符号化データH1(k,j,i)を出力する。ここで、ハフマン符号化手段14は複数のハフマン符号化アルゴリズムを備え、kは複数のハフマン符号化アルゴリズムのうちの1つを指定するためのインデックスを表す。   Further, the upper part / lower part separating means 13 performs the upper part data U1 (j, i) having a predetermined bit length to be subjected to Huffman coding from the data D2 (j, i) from which the common redundant part is removed, and the remaining Each is divided into lower order data L1 (j, i) and output. The Huffman encoding means 14 performs Huffman encoding on the separated higher-order data U1 (j, i) and outputs Huffman encoded data H1 (k, j, i). Here, the Huffman encoding means 14 includes a plurality of Huffman encoding algorithms, and k represents an index for designating one of the plurality of Huffman encoding algorithms.

また、最大効率データ出力手段15は、下位部データL1(j,i)とハフマン符号化データH1(k,j,i)の組合せの中から最大の圧縮効率となるように相関除去特性とハフマン符号化アルゴリズムのいずれか一つずつを選択して、ビットストリームに重畳する下位部データL2(i)とハフマン符号化データH2(j)を出力する。更に、選択した相関除去特性を指定するインデックスjを補助情報DIとして出力する。また、選択したハフマン符号化アルゴリズムを指定するインデックスkを補助情報HIとして出力する。   Further, the maximum efficiency data output means 15 has a correlation removal characteristic and a Huffman so that the maximum compression efficiency is obtained from the combination of the lower order data L1 (j, i) and the Huffman encoded data H1 (k, j, i). Any one of the encoding algorithms is selected, and lower order data L2 (i) and Huffman encoded data H2 (j) to be superimposed on the bit stream are output. Further, an index j specifying the selected correlation removal characteristic is output as auxiliary information DI. In addition, an index k specifying the selected Huffman coding algorithm is output as auxiliary information HI.

マルチプレクサ16は、ブロック内の共通冗長部のランレングス情報CRB(DI)と、相関除去特性を指定する補助情報DIと、ハフマン符号化アルゴリズムを指定する補助情報HIと、下位部データL2(i)とハフマン符号化データH2(i)とをビットストリームSTに重畳して出力する。   The multiplexer 16 includes the run length information CRB (DI) of the common redundant part in the block, the auxiliary information DI specifying the correlation removal characteristic, the auxiliary information HI specifying the Huffman coding algorithm, and the lower part data L2 (i). And Huffman encoded data H2 (i) are superimposed on the bit stream ST and output.

ここで、図1において、相関成分除去手段11は前述の従来技術のロスレス圧縮符号化装置と同一である。   Here, in FIG. 1, the correlation component removing unit 11 is the same as the above-described lossless compression coding apparatus of the prior art.

しかしながら、図8の共通冗長ランレングス検出部123で検出されるブロック内の共通冗長部のランレングスが、データD1(j,i)のサンプル当りのビット長WLからハフマン符号化テーブルのハフマン符号語の符号長HLNの最小値HBを差し引いた(WL−HB)以上の場合の共通冗長部の除去方法については、前述の従来技術のロスレス圧縮符号化装置における共通冗長部の除去方法と異なり、これによって共通冗長部除去手段12、上位部・下位部分離手段13、ハフマン符号化手段14と最大効率データ出力手段15において処理内容が異なる。ただし、共通冗長部のランレングスが(WL−HB)よりも小さい場合の処理は、前述の従来技術のロスレス圧縮符号化装置と同一である。   However, the run length of the common redundant portion in the block detected by the common redundant run length detection unit 123 of FIG. 8 is calculated from the bit length WL per sample of the data D1 (j, i) from the Huffman codeword of the Huffman coding table. The common redundant portion removal method when the minimum value HB of the code length HLN is equal to or greater than (WL-HB) is different from the common redundant portion removal method in the lossless compression coding apparatus of the prior art described above. The processing contents of the common redundant part removing means 12, the upper part / lower part separating means 13, the Huffman coding means 14 and the maximum efficiency data output means 15 are different. However, the processing in the case where the run length of the common redundant portion is smaller than (WL-HB) is the same as that of the above-described lossless compression encoding device of the prior art.

図2は、共通冗長ランレングス検出部123で検出されるブロック内の共通冗長部のランレングスが、データD1(j,i)のサンプル当りのビット長WL(ここでは16ビット)からハフマン符号化テーブルのハフマン符号語の符号長HLNの最小値HB(ここでは4ビット)を差し引いた(WL−HB)(ここでは12ビット)以上の場合の共通冗長部の除去を表す説明図である。本発明のロスレス圧縮符号化装置では、図2に示すように共通冗長部のランレングスが(WL−HB)以上の場合においても、検出した共通冗長部のランレングスのビット長で共通冗長部を除去する。すなわち、共通冗長部を除去したデータD2(j,i)はデータD1(j,i)の下位(WL−CRB(j))ビットの部分となる。このようにして共通冗長部を除去した場合には、上位部・下位部分離手段13は、上位部データU1(j,i)を出力せずに、共通冗長部を除去したデータD2(j,i)を下位部データL1(j,i)として出力する。   FIG. 2 shows that the run length of the common redundant portion in the block detected by the common redundant run length detection unit 123 is Huffman-coded from the bit length WL (16 bits in this case) per sample of the data D1 (j, i). It is explanatory drawing showing the removal of a common redundant part in the case of (WL-HB) (here 12 bits) more than the minimum value HB (here 4 bits) of code length HLN of the Huffman codeword of a table. In the lossless compression coding apparatus according to the present invention, as shown in FIG. 2, even when the run length of the common redundant portion is (WL-HB) or more, the common redundant portion is detected with the detected bit length of the run length of the common redundant portion. Remove. That is, the data D2 (j, i) from which the common redundant portion is removed becomes a lower (WL-CRB (j)) bit portion of the data D1 (j, i). When the common redundant part is removed in this way, the upper part / lower part separating means 13 does not output the upper part data U1 (j, i), but the data D2 (j, i) is output as the lower part data L1 (j, i).

こうすることにより、ビットストリームに重畳するデータの総ビット数が18ビット(=3ビット×6サンプル)となり、前述の従来技術のロスレス圧縮符号化において、共通冗長部のランレングスを(WL−HB)として共通冗長部を除去した後のデータD2(j,i)を上位部データU1(j,i)としてハフマン符号化を施して得られるハフマン符号化データを表す図14の総ビット数の24ビットに比べて情報量を削減することができる。なお、本発明の実施の形態1によれば、ブロック内の共通冗長部のランレングスが(WL−HB)以上の場合に、ハフマン符号化アルゴリズムを指定する補助情報HIをビットストリームに重畳しないようにすることで、更なる情報量の削減ができる。   As a result, the total number of bits of data to be superimposed on the bit stream becomes 18 bits (= 3 bits × 6 samples), and the run length of the common redundant portion is (WL-HB) in the above-described lossless compression coding of the prior art. ), The data D2 (j, i) after removing the common redundant portion is used as Huffman coding data as the upper portion data U1 (j, i). The amount of information can be reduced compared to bits. According to the first embodiment of the present invention, when the run length of the common redundant part in the block is (WL-HB) or more, the auxiliary information HI specifying the Huffman coding algorithm is not superimposed on the bitstream. By doing so, the amount of information can be further reduced.

また、図2に示すような、共通冗長部を除去したデータD2(j,i)から下位部データL1(j,i)のみを出力し、上位部データU1(j,i)を出力しない場合は、ハフマン符号化手段14においてハフマン符号化に係る一連の処理を行わないようにするため、共通冗長部のランレングス情報CRB(j)をハフマン符号化手段14に入力する。こうすることにより、ハフマン符号化に係る処理を削減することができる。また、このような場合にはハフマン符号化手段14からハフマン符号化データH1(k,j,i)は出力されないため、最大効率のデータを検出する際にハフマン符号化データH1(k,j,i)を用いないようにするために、最大効率データ出力手段15に共通冗長部のランレングス情報CRB(j)を入力する。更に、マルチプレクサ16では、入力される共通冗長部のランレングス情報CRB(j)に基づいて、ハフマン符号化アルゴリズムを指定する補助情報HIをビットストリームに重畳しないようにする。   Further, as shown in FIG. 2, only the lower part data L1 (j, i) is output from the data D2 (j, i) from which the common redundant part is removed, and the upper part data U1 (j, i) is not output. Inputs the run length information CRB (j) of the common redundant portion to the Huffman encoding unit 14 so that the Huffman encoding unit 14 does not perform a series of processes related to the Huffman encoding. In this way, processing related to Huffman coding can be reduced. In such a case, since the Huffman encoded data H1 (k, j, i) is not output from the Huffman encoding means 14, the Huffman encoded data H1 (k, j, In order not to use i), the run-length information CRB (j) of the common redundant portion is inputted to the maximum efficiency data output means 15. Further, the multiplexer 16 prevents the auxiliary information HI specifying the Huffman coding algorithm from being superimposed on the bitstream based on the input run length information CRB (j) of the common redundant portion.

ここで、データD1(j,i)のサンプルあたりのビット長WLが16ビットで、ハフマン符号化テーブルが図11に示すものである場合について、本発明の実施の形態1による情報量削減の効果を図3を用いて説明する。   Here, in the case where the bit length WL per sample of the data D1 (j, i) is 16 bits and the Huffman coding table is as shown in FIG. 11, the effect of reducing the amount of information according to the first embodiment of the present invention. Will be described with reference to FIG.

図3は、従来技術と実施の形態1との場合において、共通冗長部のビット長が9〜15ビットの各場合におけるハフマン符号化処理の有無、上位部データU(j,i)のビット長、下位部データL(j,i)のビット長、ハフマン符号語のビット長、および下位部データとハフマン符号語との合計ビット長を示している。図3から、共通冗長部ビット長が12ビット以上のとき、すなわち(WL−HB)以上のとき、実施の形態1の合計ビット長が従来技術の合計ビット長よりも小さくなって、情報量が削減できていることが解る。   FIG. 3 shows the presence / absence of the Huffman encoding process and the bit length of the higher order data U (j, i) in each case where the bit length of the common redundant portion is 9 to 15 bits in the case of the conventional technique and the first embodiment. , The bit length of the lower part data L (j, i), the bit length of the Huffman codeword, and the total bit length of the lower part data and the Huffman codeword. From FIG. 3, when the common redundant part bit length is 12 bits or more, that is, (WL-HB) or more, the total bit length of the first embodiment becomes smaller than the total bit length of the prior art, and the amount of information is reduced. You can see that it has been reduced.

また、共通冗長部のビット長が11ビットのとき、もし、共通冗長部のビット長が12ビット以上の場合と同様にハフマン符号化を行わなかった場合には、下位部データのビット長は5ビットとなるため、必ずしも従来技術よりも合計ビット長が小さくなるとは限らないことが解る。   Also, when the bit length of the common redundant part is 11 bits, if the Huffman coding is not performed as in the case where the bit length of the common redundant part is 12 bits or more, the bit length of the lower order data is 5 It can be seen that the total bit length is not necessarily smaller than that of the prior art because it is a bit.

ところで、共通冗長部のビット長CRB(j)は相関除去特性を指定するインデックスjが異なると、(WL−HB)以上になったり、それより小さくなったりと変化するため、最大効率データ出力手段15には、異なる処理に基づくデータが混在して入力されるが、それらの中から最大効率となるものを検出すればよい。   By the way, since the bit length CRB (j) of the common redundant portion changes to (WL-HB) or less when the index j specifying the correlation removal characteristic is different, the maximum efficiency data output means 15, data based on different processes are mixedly input, and it is only necessary to detect the data having the maximum efficiency.

図4は、本発明の実施の形態1におけるロスレス圧縮復号装置2の構成図である。図4において、デマルチプレクサ21は入力されるビットストリームSTからブロック内の共通冗長部のランレングスを表す共通冗長ランレングス情報CRB2と、相関除去特性を指定する補助情報DIと、ハフマン符号化アルゴリズムを指定する補助情報HIと、下位部データL3(i)とハフマン符号化データH3(i)とを抽出する。   FIG. 4 is a configuration diagram of the lossless compression decoding apparatus 2 according to Embodiment 1 of the present invention. In FIG. 4, the demultiplexer 21 receives common redundant run-length information CRB2 indicating the run length of the common redundant portion in the block from the input bit stream ST, auxiliary information DI specifying the correlation removal characteristic, and a Huffman encoding algorithm. The auxiliary information HI to be designated, the lower part data L3 (i), and the Huffman encoded data H3 (i) are extracted.

ハフマン復号手段22は、ハフマン符号化アルゴリズムを指定する補助情報HIで示されるハフマン符号化テーブルの符号長HLN(IDX)で抽出したビット列で表されるハフマン符号化データH3(i)とハフマン符号化テーブルのハフマン符号語HCW(IDX)との一致検出を行い、一致するハフマン符号語HCW(IDX)に対応するインデックスIDXを上位部データU2(i)として出力する。ここで、出力される上位部データU2(i)は、図1のハフマン符号化手段14に入力される上位部データU1(j,i)と同一の所定ビット長である。ただし、共通冗長部のランレングス情報CRB2に基づいて、共通冗長部のランレングスが(WL−HB)以上の場合には、ビットストリームSTにハフマン符号化データは重畳されないため、前述のハフマン符号化データの復号に係る処理は実行せずに、上位部データU2(i)も出力しない。   The Huffman decoding means 22 includes Huffman encoded data H3 (i) represented by a bit string extracted by the code length HLN (IDX) of the Huffman encoding table indicated by the auxiliary information HI designating the Huffman encoding algorithm, and Huffman encoding. A match with the Huffman code word HCW (IDX) in the table is detected, and the index IDX corresponding to the matching Huffman code word HCW (IDX) is output as the upper data U2 (i). Here, the output higher order data U2 (i) has the same predetermined bit length as the higher order data U1 (j, i) input to the Huffman encoding means 14 of FIG. However, based on the run length information CRB2 of the common redundant part, when the run length of the common redundant part is (WL-HB) or more, the Huffman encoded data is not superimposed on the bit stream ST. The processing related to data decoding is not executed, and the higher order data U2 (i) is not output.

上位部・下位部結合手段23は上位部データU2(i)と下位部データL3(i)とを結合したデータD3(i)を出力する。   The upper part / lower part combining means 23 outputs data D3 (i) obtained by combining the upper part data U2 (i) and the lower part data L3 (i).

共通冗長部付加手段24は、データD3(i)に共通冗長部のランレングス情報CRB2に基づいて共通冗長部を付加したデータD4(i)を出力する。共通冗長部を付加したデータD4(i)は、図1の共通冗長部除去手段12に入力されるデータD1(j,i)と同一のビット長である。また、前述したように共通冗長部のランレングスが(WL−HB)以上の場合には、上位部データU2(i)は出力されないので、下位部データL3(i)に対して共通冗長部のランレングス情報CRB2に基づく共通冗長部を付加したデータD4(i)を出力する。   The common redundant part adding means 24 outputs data D4 (i) obtained by adding the common redundant part to the data D3 (i) based on the run length information CRB2 of the common redundant part. The data D4 (i) with the common redundant portion added has the same bit length as the data D1 (j, i) input to the common redundant portion removing means 12 in FIG. Further, as described above, when the run length of the common redundant part is (WL-HB) or more, the upper part data U2 (i) is not output, so that the common redundant part is not output with respect to the lower part data L3 (i). Data D4 (i) with a common redundant part added based on the run length information CRB2 is output.

相関成分復元手段25は、相関除去特性を指定する補助情報DIに基づいて、共通冗長部が付加されたデータD4(i)に図1の相関成分除去手段11の逆変換処理を施し、出力サンプルOUT(i)を復元して出力する。   The correlation component restoration unit 25 performs the inverse conversion process of the correlation component removal unit 11 of FIG. 1 on the data D4 (i) to which the common redundant portion is added based on the auxiliary information DI that specifies the correlation removal characteristic, and outputs the output sample. OUT (i) is restored and output.

また、前述の実施の形態1におけるロスレス圧縮符号化装置の各構成手段の機能は、ソフトウェアプログラムによってコンピュータ又は、デジタルシグナルプロセッサ(DSP)上で実現することも可能である。   In addition, the function of each component of the lossless compression coding apparatus according to the first embodiment can be realized on a computer or a digital signal processor (DSP) by a software program.

図5は、本発明のロスレス圧縮符号化方法をDSP上で実現した場合のソフトウェア処理フロー図である。図5に示す一連のソフトウェア処理は、所定の時間毎に区切った所定数Nの入力サンプルIN(i)(0<=i<N)からなるブロックを単位に実行されるものである。まず、ブロック先頭で初期化を行う(S1)。次に、ブロックのN個のサンプルに対して(S2)、相関除去特性に応じて相関成分を除去したデータを求める。図5においては、1次差分値D1(1,i)と、2次差分値D1(2,i)を算出する。このとき同時に、D1(0,i)に入力サンプルIN(i)をセットする(S3)。次に、算出したD(j,i)(0<=j<=2,0<=i<N)に対して、共通冗長部のランレングス情報CRB(j)を検出して、共通冗長部を各々除去する(S4)。   FIG. 5 is a software processing flowchart when the lossless compression encoding method of the present invention is realized on a DSP. The series of software processing shown in FIG. 5 is executed in units of blocks each including a predetermined number N of input samples IN (i) (0 <= i <N) divided at predetermined time intervals. First, initialization is performed at the head of the block (S1). Next, for the N samples of the block (S2), data from which the correlation component is removed is obtained according to the correlation removal characteristic. In FIG. 5, a primary difference value D1 (1, i) and a secondary difference value D1 (2, i) are calculated. At the same time, the input sample IN (i) is set in D1 (0, i) (S3). Next, for the calculated D (j, i) (0 <= j <= 2, 0 <= i <N), the run length information CRB (j) of the common redundant part is detected, and the common redundant part is detected. Are removed (S4).

次に、共通冗長部を除去したD(0,i)、D(1,i)、D(2,i)に対して(S5)、各々のCRB(j)に基づいて、CRB(j)が入力サンプルのビット長(WL)からハフマン符号化テーブルのハフマン符号語の符号長HLNの最小値(HB)を差し引いた(WL−HB)よりも小さい場合には、上位部を分離した後にハフマン符号化処理を施してハフマン符号化データH1(k,j,i)を得る(S6、S7)。ここで、kはハフマン符号化アルゴリズムを指定するインデックスである。   Next, for D (0, i), D (1, i), D (2, i) with the common redundant portion removed (S5), CRB (j) based on each CRB (j) Is smaller than (WL-HB) obtained by subtracting the minimum value (HB) of the code length HLN of the Huffman codeword of the Huffman coding table from the bit length (WL) of the input sample, the Huffman is separated after separating the upper part. Encoding processing is performed to obtain Huffman encoded data H1 (k, j, i) (S6, S7). Here, k is an index that specifies the Huffman coding algorithm.

次に、CRB(j)に基づいて下位部を分離する(S8)。次に、最大圧縮効率のデータを出力するための相関除去特性およびハフマン符号化アルゴリズムの最適な組合せの選択を行う(S9)。最後に、選択された相関除去特性を指定する補助情報DIとハフマン符号化アルゴリズムを指定する補助情報HIと、対応する共通冗長ランレングス情報CRB(DI)、およびデータをビットストリームに重畳して出力する(S10)。これにより、図1に示すロスレス圧縮符号装置と同様の処理が行われる。   Next, the lower part is separated based on CRB (j) (S8). Next, the optimum combination of the correlation removal characteristic and the Huffman coding algorithm for outputting the data with the maximum compression efficiency is selected (S9). Finally, the auxiliary information DI specifying the selected correlation removal characteristic, the auxiliary information HI specifying the Huffman coding algorithm, the corresponding common redundant run length information CRB (DI), and the data are superimposed on the bit stream and output. (S10). Thereby, the same processing as the lossless compression coding apparatus shown in FIG. 1 is performed.

尚、本発明の実施の形態1のロスレス圧縮復号方法のソフトウェア処理については、図5のロスレス圧縮符号方法の逆の手順で行い、ビットストリームから出力サンプルの復元を行うが、ここでの説明は省略する。   Note that the software processing of the lossless compression decoding method according to the first embodiment of the present invention is performed in the reverse procedure of the lossless compression coding method of FIG. 5 and the output samples are restored from the bitstream. Omitted.

以上、説明したように本発明のロスレス圧縮符号化方法および装置によれば、入力されるサンプルのレベルが小さい場合に、共通冗長部を除去したデータを下位部データとし、ハフマン符号語の最小の符号長よりも小さいデータでビットストリームに重畳するとともに、且つハフマン符号化アルゴリズムを指定する補助情報をビットストリームに重畳しないようにすることで、圧縮効率を向上することができ、従来技術よりも圧縮効率を向上したロスレス圧縮符号化方法および装置を実現することができる。これにより、限られた容量の記録媒体への記録時間の長時間化を可能にする。   As described above, according to the lossless compression coding method and apparatus of the present invention, when the input sample level is small, the data from which the common redundant part is removed is used as the lower part data, and the minimum of the Huffman codeword is set. By superimposing data smaller than the code length on the bitstream and not superimposing auxiliary information specifying the Huffman encoding algorithm on the bitstream, the compression efficiency can be improved, and compression is performed more than in the prior art. A lossless compression encoding method and apparatus with improved efficiency can be realized. This makes it possible to extend the recording time on a recording medium having a limited capacity.

本発明の実施の形態1におけるロスレス圧縮符号化装置の構成図Configuration diagram of lossless compression coding apparatus according to Embodiment 1 of the present invention 本発明の実施の形態1における共通冗長部の除去を表す説明図Explanatory drawing showing the removal of a common redundant part in Embodiment 1 of this invention 本発明の実施の形態1における情報量削減の効果を表す説明図Explanatory drawing showing the effect of the information amount reduction in Embodiment 1 of this invention 本発明の実施の形態1におけるロスレス圧縮復号装置の構成図Configuration diagram of lossless compression decoding apparatus in Embodiment 1 of the present invention 本発明の実施の形態1におけるロスレス圧縮符号化方法のソフトウェア処理フロー図Software processing flow diagram of the lossless compression encoding method in Embodiment 1 of the present invention 従来技術のロスレス圧縮符号装置の構成図Configuration diagram of lossless compression coding apparatus of the prior art 相関成分除去手段の内部構成図Correlation component removal unit internal configuration diagram 共通冗長部除去手段の内部構成図Internal configuration diagram of common redundant part removal means 共通冗長部の除去を表す説明図Explanatory drawing showing removal of common redundant part 上位部・下位部の分離を表す説明図Explanatory drawing showing separation of upper part and lower part ハフマン符号化テーブルを表す図Diagram showing Huffman coding table ハフマン符号化を表す説明図Explanatory drawing showing Huffman coding 従来技術の共通冗長部の除去を表す説明図Explanatory drawing showing removal of common redundant part in the prior art 従来技術のハフマン符号化を表す説明図Explanatory drawing showing prior art Huffman coding 従来技術のロスレス圧縮復号装置の構成図Configuration diagram of lossless compression decoding apparatus of the prior art 従来技術のハフマン復号および上位部・下位部結合を表す説明図Explanatory drawing showing Huffman decoding of prior art and upper part / lower part combination

符号の説明Explanation of symbols

1 ロスレス圧縮符号化装置
2 ロスレス圧縮復号装置
11 相関成分除去手段
12 共通冗長部除去手段
13 上位部・下位部分離手段
14 ハフマン符号化手段
15 最大効率データ出力手段
16 マルチプレクサ
21 デマルチプレクサ
22 ハフマン復号手段
23 上位部・下位部結合手段
24 共通冗長部付加手段
25 相関成分復元手段
DESCRIPTION OF SYMBOLS 1 Lossless compression coding apparatus 2 Lossless compression decoding apparatus 11 Correlation component removal means 12 Common redundant part removal means 13 Upper part / lower part separation means 14 Huffman coding means 15 Maximum efficiency data output means 16 Multiplexer 21 Demultiplexer 22 Huffman decoding means 23 upper part / lower part combining means 24 common redundant part adding means 25 correlation component restoring means

Claims (14)

所定ビット長で表され、時系列に並んで入力されるサンプルのデータから、所定の時間毎に区切った所定の数のサンプルよりなるブロックを単位として、前記サンプル間の相関成分を除去する相関成分除去ステップと、
前記相関成分を除去した後のデータから、前記ブロック内の各サンプルの冗長ランレングスの最小値に相当するビット長の各サンプルに共通な共通冗長部を除去する共通冗長部除去ステップと、
前記共通冗長部を除去したデータのビット長が、ハフマン符号化で得られるデータの最小ビット長以下の場合はハフマン符号化を行わないようにするとともに、前記共通冗長部を除去したデータのビット長が、前記ハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記共通冗長部を除去したデータをハフマン符号化してハフマン符号化データを得るハフマン符号化ステップと、
前記共通冗長部のランレングス情報と、サンプル毎の前記共通冗長部を除去したデータもしくは前記サンプル毎のハフマン符号化データとをビットストリームに重畳する重畳ステップとを備えるロスレス圧縮符号化方法。
Correlation component for removing a correlation component between samples in units of a block consisting of a predetermined number of samples divided by a predetermined time from sample data expressed in a predetermined bit length and input in chronological order A removal step;
A common redundant part removing step for removing a common redundant part common to each sample of a bit length corresponding to the minimum value of the redundant run length of each sample in the block from the data after removing the correlation component;
When the bit length of the data from which the common redundant portion is removed is equal to or smaller than the minimum bit length of data obtained by Huffman coding, the Huffman coding is not performed, and the bit length of the data from which the common redundant portion is removed Is larger than the minimum bit length of data obtained by the Huffman coding, a Huffman coding step for obtaining Huffman coded data by performing Huffman coding on the data from which the common redundant portion has been removed, and
A lossless compression encoding method comprising: a superimposing step of superimposing the run length information of the common redundant part and the data from which the common redundant part is removed for each sample or the Huffman encoded data for each sample on a bitstream.
さらに、前記共通冗長部を除去したデータを、所定ビット長の上位部データと、残りの下位部データとに分離する上位部・下位部分離ステップを備え、
前記共通冗長部を除去したデータのビット長がハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記ハフマン符号化ステップにおいて、前記上位部データをハフマン符号化してハフマン符号化データを得ると共に、前記重畳ステップにおいて、前記下位部データを前記ビットストリームに重畳することを特徴とする請求項1に記載のロスレス圧縮符号化方法。
Furthermore, it comprises an upper part / lower part separation step for separating the data from which the common redundant part is removed into upper part data of a predetermined bit length and remaining lower part data,
When the bit length of the data from which the common redundant part is removed is larger than the minimum bit length of data obtained by Huffman coding, the Huffman coding step obtains Huffman coded data by performing Huffman coding on the higher order data. The lossless compression encoding method according to claim 1, wherein in the superimposing step, the lower-order data is superimposed on the bitstream.
前記ハフマン符号化ステップは複数のハフマン符号化アルゴリズムを有し、
さらに、前記共通冗長部を除去した後のデータのビット長が全ての前記ハフマン符号化アルゴリズムのハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記複数のハフマン符号化アルゴリズムの中から、前記ブロック内での圧縮効率が最大となるハフマン符号化アルゴリズムを選択する最大効率アルゴリズム選択ステップを備え、
前記重畳ステップにおいて、さらに、前記選択したハフマン符号化アルゴリズムを示すパラメータを前記ビットストリームに重畳することを特徴とする請求項1に記載のロスレス圧縮符号化方法。
The Huffman encoding step includes a plurality of Huffman encoding algorithms;
Further, when the bit length of the data after removing the common redundant portion is larger than the minimum bit length of the data obtained by Huffman coding of all the Huffman coding algorithms, the plurality of Huffman coding algorithms A maximum efficiency algorithm selection step for selecting a Huffman coding algorithm that maximizes the compression efficiency within the block,
The lossless compression encoding method according to claim 1, wherein in the superimposing step, a parameter indicating the selected Huffman encoding algorithm is further superimposed on the bitstream.
前記重畳ステップにおいて、前記共通冗長部を除去したデータのビット長が全ての前記ハフマン符号化アルゴリズムのハフマン符号化で得られるデータの最小ビット長以下の場合に、前記パラメータを前記ビットストリームに重畳しないことを特徴とする請求項3に記載のロスレス圧縮符号化方法。 In the superimposing step, the parameter is not superimposed on the bit stream when the bit length of the data from which the common redundant portion is removed is equal to or less than the minimum bit length of data obtained by Huffman coding of all the Huffman coding algorithms. The lossless compression encoding method according to claim 3. 所定ビット長で表され、時系列に並んで入力されるサンプルのデータから、所定の時間毎に区切った所定の数のサンプルよりなるブロックを単位として、前記サンプル間の相関成分を除去する相関成分除去手段と、
前記相関成分を除去した後のデータから、前記ブロック内の各サンプルの冗長ランレングスの最小値に相当するビット長の各サンプルに共通な共通冗長部を除去する共通冗長部除去手段と、
前記共通冗長部を除去したデータのビット長が、ハフマン符号化で得られるデータの最小ビット長以下の場合はハフマン符号化を行わないようにするとともに、前記共通冗長部を除去したデータのビット長が、前記ハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記共通冗長部を除去したデータをハフマン符号化してハフマン符号化データを得るハフマン符号化手段と、
前記共通冗長部のランレングス情報と、サンプル毎の前記共通冗長部を除去したデータもしくは前記サンプル毎のハフマン符号化データとをビットストリームに重畳するマルチプレクサとを備えるロスレス圧縮符号化装置。
Correlation component for removing a correlation component between samples in units of a block consisting of a predetermined number of samples divided by a predetermined time from sample data expressed in a predetermined bit length and input in chronological order Removal means;
A common redundant part removing means for removing a common redundant part common to each sample having a bit length corresponding to the minimum value of the redundant run length of each sample in the block from the data after removing the correlation component;
When the bit length of the data from which the common redundant portion is removed is equal to or smaller than the minimum bit length of data obtained by Huffman coding, the Huffman coding is not performed, and the bit length of the data from which the common redundant portion is removed Is larger than the minimum bit length of the data obtained by the Huffman coding, Huffman coding means for obtaining Huffman coded data by Huffman coding the data from which the common redundant portion is removed,
A lossless compression encoding apparatus comprising: run length information of the common redundant portion; and a multiplexer that superimposes data obtained by removing the common redundant portion for each sample or Huffman encoded data for each sample on a bit stream.
さらに、前記共通冗長部を除去したデータを、所定ビット長の上位部データと、残りの下位部データとに分離する上位部・下位部分離手段を備え、
前記共通冗長部を除去したデータのビット長がハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記ハフマン符号化ステップにおいて、前記上位部データをハフマン符号化してハフマン符号化データを得ると共に、前記重畳ステップにおいて、前記下位部データを前記ビットストリームに重畳することを特徴とする請求項5に記載のロスレス圧縮符号化装置。
Furthermore, the data obtained by removing the common redundant part is provided with upper part / lower part separating means for separating the upper part data of a predetermined bit length and the remaining lower part data,
When the bit length of the data from which the common redundant part is removed is larger than the minimum bit length of data obtained by Huffman coding, the Huffman coding step obtains Huffman coded data by performing Huffman coding on the higher order data. The lossless compression encoding apparatus according to claim 5, wherein, in the superimposing step, the low-order data is superimposed on the bitstream.
前記ハフマン符号化手段は複数のハフマン符号化アルゴリズムを有し、
さらに、前記共通冗長部を除去した後のデータのビット長が全ての前記ハフマン符号化アルゴリズムのハフマン符号化で得られるデータの最小ビット長より大きい場合に、前記複数のハフマン符号化アルゴリズムの中から、前記ブロック内での圧縮効率が最大となるハフマン符号化アルゴリズムを選択する最大効率アルゴリズム選択手段を備え、
前記マルチプレクサは、さらに、選択した前記ハフマン符号化アルゴリズムを示すパラメータを前記ビットストリームに重畳することを特徴とする請求項5に記載のロスレス圧縮符号化装置。
The Huffman encoding means has a plurality of Huffman encoding algorithms,
Further, when the bit length of the data after removing the common redundant portion is larger than the minimum bit length of the data obtained by Huffman coding of all the Huffman coding algorithms, the plurality of Huffman coding algorithms , Comprising a maximum efficiency algorithm selection means for selecting a Huffman coding algorithm that maximizes the compression efficiency within the block,
The lossless compression encoding apparatus according to claim 5, wherein the multiplexer further superimposes a parameter indicating the selected Huffman encoding algorithm on the bitstream.
前記マルチプレクサは、前記共通冗長部を除去したデータのビット長が全ての前記ハフマン符号化アルゴリズムのハフマン符号化で得られるデータの最小ビット長以下の場合に、前記パラメータを前記ビットストリームに重畳しないことを特徴とする請求項7に記載のロスレス圧縮符号化装置。 The multiplexer does not superimpose the parameter on the bitstream when the bit length of the data from which the common redundant portion is removed is equal to or less than the minimum bit length of data obtained by Huffman coding of all the Huffman coding algorithms. The lossless compression encoding apparatus according to claim 7. 請求項1記載のロスレス圧縮符号化方法で、前記共通冗長部のランレングス情報と前記サンプルごとの共通冗長部を除去したデータもしくは前記サンプルごとのハフマン符号化データとが重畳されたビットストリームを入力とするロスレス圧縮復号方法であって、
前記ビットストリームから前記共通冗長部のランレングス情報と前記サンプルごとの共通冗長部を除去したデータもしくは前記サンプルごとのハフマン符号化データとを抽出する抽出ステップと、
前記抽出したサンプルごとのハフマン符号化データにハフマン復号を施してハフマン復号データを出力するハフマン復号ステップと、
前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化で得られるデータの最小ビット長よりも大きい場合に、前記ハフマン復号ステップでハフマン復号したハフマン復号データに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加し、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化で得られるデータの最小ビット長以下の場合に、前記抽出した前記サンプルごとの共通冗長部を除去したデータに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加する共通冗長部付加ステップと、
前記共通冗長部を付加したデータに前記サンプル間の相関成分を付加して元のサンプルを復元する相関成分復元ステップとを備えるロスレス圧縮復号方法。
2. The lossless compression encoding method according to claim 1, wherein a bitstream in which run length information of the common redundant portion and data obtained by removing the common redundant portion for each sample or Huffman encoded data for each sample is superimposed is input. Lossless compression decoding method,
An extraction step for extracting the run length information of the common redundant portion and the data obtained by removing the common redundant portion for each sample or the Huffman encoded data for each sample from the bitstream;
A Huffman decoding step of performing Huffman decoding on the extracted Huffman encoded data for each sample and outputting Huffman decoded data;
When the bit length obtained by subtracting the bit length of the extracted run length information of the common redundant portion from the predetermined bit length of the sample is larger than the minimum bit length of the data obtained by the Huffman coding, the Huffman decoding step A common redundant part is added to the Huffman-decoded Huffman decoded data based on the extracted run length information of the common redundant part, and the bit length of the extracted run length information of the common redundant part is subtracted from the predetermined bit length of the sample. When the extracted bit length is equal to or less than the minimum bit length of the data obtained by the Huffman coding, the extracted common redundant portion for each sample is removed, and the data is shared based on the run length information of the extracted common redundant portion. A common redundant part adding step for adding a redundant part;
A lossless compression decoding method comprising: a correlation component restoration step of restoring an original sample by adding a correlation component between the samples to the data to which the common redundant part is added.
前記ビットストリームには、さらに、前記サンプルごとの共通冗長部を除去したデータから前記ハフマン符号化の符号語長に相当するビット長の上位部データを除去した下位部データが重畳され、
前記抽出ステップにおいて、前記下位部データが抽出され、
さらに、前記ハフマン復号データを上位部とし、前記抽出した下位部データを下位部としてこれらを結合する上位部・下位部結合ステップを備え、
前記共通冗長部付加ステップにおいて、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化の符号後長よりも大きい場合に、前記ハフマン復号ステップでハフマン復号した前記ハフマン復号データに代えて、前記上位部・下位部結合ステップで結合したデータに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加することを特徴とする請求項9に記載のロスレス圧縮復号方法。
The bitstream is further superimposed with lower part data obtained by removing upper part data having a bit length corresponding to the codeword length of the Huffman coding from data obtained by removing the common redundant part for each sample,
In the extraction step, the lower part data is extracted,
Further, the Huffman decoded data is an upper part, and the extracted lower part data is used as a lower part, and an upper part / lower part combining step for combining them is provided.
In the common redundant part adding step, when the bit length obtained by subtracting the bit length of the extracted run length information of the common redundant part from the predetermined bit length of the sample is larger than the post-code length of the Huffman coding, Instead of the Huffman decoded data subjected to Huffman decoding in the Huffman decoding step, a common redundant part is added to the data combined in the upper part / lower part combining step based on the run length information of the extracted common redundant part The lossless compression decoding method according to claim 9.
前記ビットストリームには、さらに、複数のハフマン符号化アルゴリズムの1つを示すハフマン符号化アルゴリズム情報が重畳され、
前記抽出ステップにおいて、前記ハフマン符号化アルゴリズム情報が抽出され、
前記ハフマン復号ステップにおいて、前記抽出したハフマン符号化アルゴリズム情報に基づいたハフマン符号化アルゴリズムでハフマン復号を施すことを特徴とする請求項9に記載のロスレス圧縮復号方法。
Huffman encoding algorithm information indicating one of a plurality of Huffman encoding algorithms is further superimposed on the bitstream,
In the extraction step, the Huffman coding algorithm information is extracted,
10. The lossless compression decoding method according to claim 9, wherein in the Huffman decoding step, Huffman decoding is performed with a Huffman encoding algorithm based on the extracted Huffman encoding algorithm information.
請求項5記載のロスレス圧縮符号化装置で、前記共通冗長部のランレングス情報と前記サンプルごとの共通冗長部を除去したデータもしくは前記サンプルごとのハフマン符号化データとが重畳されたビットストリームを入力とするロスレス圧縮復号装置であって、
前記ビットストリームから前記共通冗長部のランレングス情報と前記サンプルごとの共通冗長部を除去したデータもしくは前記サンプルごとのハフマン符号化データとを抽出する抽出手段と、
前記抽出したサンプルごとのハフマン符号化データにハフマン復号を施してハフマン復号データを出力するハフマン復号手段と、
前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化で得られるデータの最小ビット長よりも大きい場合に、前記ハフマン復号ステップでハフマン復号したハフマン復号データに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加し、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化で得られるデータの最小ビット長以下の場合に、前記抽出した前記サンプルごとの共通冗長部を除去したデータに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加する共通冗長部付加手段と、
前記共通冗長部を付加したデータに前記サンプル間の相関成分を付加して元のサンプルを復元する相関成分復元手段とを備えるロスレス圧縮復号装置。
6. The lossless compression coding apparatus according to claim 5, wherein a bit stream in which run length information of the common redundant portion and data obtained by removing the common redundant portion for each sample or Huffman encoded data for each sample is superimposed is input. Lossless compression decoding device,
Extraction means for extracting the run length information of the common redundant portion and the data obtained by removing the common redundant portion for each sample or the Huffman encoded data for each sample from the bitstream;
Huffman decoding means for performing Huffman decoding on the extracted Huffman encoded data for each sample and outputting Huffman decoded data;
When the bit length obtained by subtracting the bit length of the extracted run length information of the common redundant portion from the predetermined bit length of the sample is larger than the minimum bit length of the data obtained by the Huffman coding, the Huffman decoding step A common redundant part is added to the Huffman decoded Huffman decoded data based on the extracted run length information of the common redundant part, and the bit length of the extracted common redundant part run length information is subtracted from the predetermined bit length of the sample. If the extracted bit length is equal to or less than the minimum bit length of the data obtained by the Huffman coding, the extracted common redundant portion for each sample is removed, and the data is shared based on the run length information of the extracted common redundant portion. Common redundant part adding means for adding a redundant part;
A lossless compression decoding apparatus comprising: a correlation component restoring unit that restores an original sample by adding a correlation component between the samples to the data to which the common redundant portion is added.
前記ビットストリームには、さらに、前記サンプルごとの共通冗長部を除去したデータから前記ハフマン符号化の符号語長に相当するビット長の上位部データを除去した下位部データが重畳され、
前記抽出手段は、前記下位部データを抽出し、
さらに、前記ハフマン復号データを上位部とし、前記抽出した下位部データを下位部としてこれらを結合する上位部・下位部結合手段を備え、
前記共通冗長部付加は、前記サンプルの所定ビット長から前記抽出した前記共通冗長部のランレングス情報のビット長を差し引いたビット長が前記ハフマン符号化の符号後長よりも大きい場合に、前記ハフマン復号手段でハフマン復号した前記ハフマン復号データに代えて、前記上位部・下位部結合手段で結合したデータに前記抽出した共通冗長部のランレングス情報に基づいて共通冗長部を付加することを特徴とする請求項12に記載のロスレス圧縮復号装置。
The bitstream is further superimposed with lower part data obtained by removing upper part data having a bit length corresponding to the codeword length of the Huffman coding from data obtained by removing the common redundant part for each sample,
The extraction means extracts the lower part data,
Furthermore, the Huffman decoded data is an upper part, and the extracted lower part data is used as a lower part.
The common redundant part addition is performed when the bit length obtained by subtracting the extracted bit length of the run length information of the common redundant part from the predetermined bit length of the sample is larger than the post-code length of the Huffman coding. Instead of the Huffman decoded data that has been Huffman-decoded by the decoding means, a common redundant part is added to the data combined by the upper part / lower part combining means based on the run length information of the extracted common redundant part The lossless compression decoding apparatus according to claim 12.
前記ビットストリームには、さらに、複数のハフマン符号化アルゴリズムの1つを示すハフマン符号化アルゴリズム情報が重畳され、
前記抽出手段は、前記ハフマン符号化アルゴリズム情報を抽出し、
前記ハフマン復号手段は、前記抽出したハフマン符号化アルゴリズム情報に基づいたハフマン符号化アルゴリズムでハフマン復号を施すことを特徴とする請求項12に記載のロスレス圧縮復号装置。
Huffman encoding algorithm information indicating one of a plurality of Huffman encoding algorithms is further superimposed on the bitstream,
The extraction means extracts the Huffman coding algorithm information,
13. The lossless compression decoding apparatus according to claim 12, wherein the Huffman decoding means performs Huffman decoding with a Huffman encoding algorithm based on the extracted Huffman encoding algorithm information.
JP2007250884A 2007-09-27 2007-09-27 Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof Pending JP2009081782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007250884A JP2009081782A (en) 2007-09-27 2007-09-27 Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007250884A JP2009081782A (en) 2007-09-27 2007-09-27 Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof

Publications (1)

Publication Number Publication Date
JP2009081782A true JP2009081782A (en) 2009-04-16

Family

ID=40656187

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007250884A Pending JP2009081782A (en) 2007-09-27 2007-09-27 Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof

Country Status (1)

Country Link
JP (1) JP2009081782A (en)

Similar Documents

Publication Publication Date Title
KR101221918B1 (en) A method and an apparatus for processing a signal
TWI515720B (en) Method of compressing a digitized audio signal, method of decoding an encoded compressed digitized audio signal, and machine readable storage medium
JP5111381B2 (en) Signal processing method and signal processing apparatus
JP5384780B2 (en) Lossless audio encoding method, lossless audio encoding device, lossless audio decoding method, lossless audio decoding device, and recording medium
JP5330453B2 (en) Signal processing method and apparatus, encoding and decoding method, and apparatus therefor
KR101395174B1 (en) Compression coding and decoding method, coder, decoder, and coding device
JP4888335B2 (en) Encoding method and apparatus, and program
JP2007279761A (en) Apparatus for encoding/decoding scalable lossless audio and method therefor
JP4359312B2 (en) Signal encoding apparatus, decoding apparatus, method, program, recording medium, and signal codec method
KR100307596B1 (en) Lossless coding and decoding apparatuses of digital audio data
JP4831117B2 (en) Speech encoding method and speech decoding method
JP2009081782A (en) Lossless compression coding method, apparatus thereof, and lossless compression expanding method, and apparatus thereof
JP4367450B2 (en) Audio signal transmission method and audio signal decoding method
JP2007142547A (en) Coding method and decoding method, and coder and decoder employing same
KR100433984B1 (en) Method and Apparatus for Encoding/decoding of digital audio
JP4139704B2 (en) Time series signal encoding apparatus and decoding apparatus
KR101425355B1 (en) Parametric audio encoding and decoding apparatus and method thereof
JP4109124B2 (en) Time series signal encoding device
JP2004198559A (en) Encoding method and decoding method for time-series signal
JP4184817B2 (en) Time series signal encoding method and apparatus
JP2005004119A (en) Sound signal encoding device and sound signal decoding device
JP2004070120A (en) Encoding device, decoding device and recording medium for time-series signal
JP6130128B2 (en) Data structure of compressed data, recording medium, data compression apparatus, data compression system, data compression program, and data compression method
JP4148259B2 (en) Speech encoding method and speech decoding method
GB2425011A (en) Encoding video data using a transformation function