JP2005151327A - Pcm data compressing/decompressing method and apparatus - Google Patents

Pcm data compressing/decompressing method and apparatus Download PDF

Info

Publication number
JP2005151327A
JP2005151327A JP2003388049A JP2003388049A JP2005151327A JP 2005151327 A JP2005151327 A JP 2005151327A JP 2003388049 A JP2003388049 A JP 2003388049A JP 2003388049 A JP2003388049 A JP 2003388049A JP 2005151327 A JP2005151327 A JP 2005151327A
Authority
JP
Japan
Prior art keywords
bit group
bit
bits
sample
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003388049A
Other languages
Japanese (ja)
Inventor
Akira Nishibe
顕 西部
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.)
Renesas Micro Systems Co Ltd
Original Assignee
Renesas Micro Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Micro Systems Co Ltd filed Critical Renesas Micro Systems Co Ltd
Priority to JP2003388049A priority Critical patent/JP2005151327A/en
Publication of JP2005151327A publication Critical patent/JP2005151327A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To compress data so as to be smaller than a conventional PCM block compressing/decompressing system while keeping reversibility. <P>SOLUTION: PCM data resulting from encoding using quantizing bits 2<SP>m</SP>((m) is a positive integer.) are divided into each set of (n) ((n) is a positive integer of ≥2.) to generate a sample block, and a set of bits in the 2<SP>m</SP>bits is divided into a first set of (i) bits ((i) is 0 or an integer of ≤(2<SP>m</SP>-1).) and a second set of 2<SP>m</SP>-i bits for each sample in the sample block, and divided into a sample of which the value can be represented only with the second set of bits, and a sample of which the value can not be represented only with the second set of bits. The number of required bits is (2<SP>m</SP>-i) for the first one and is 2<SP>m</SP>for the latter one and by calculating the total number of required bits for the block while changing the value of the number (i) of bits, the value of the number (i) of bits is determined to minimize the data amount of the entire block, and the number of bits is converted to represent the value of the first sample only with the second set of bits. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、PCMデータの圧縮・伸長処理に関し、さらに言えば、PCM方式で符号化されたデータを可逆(無損失)性を維持しながら圧縮・伸長することができる、PCMデータ圧縮・伸長方法及び装置に関する。   The present invention relates to PCM data compression / decompression processing. More specifically, the present invention relates to a PCM data compression / decompression method capable of compressing / decompressing data encoded by the PCM method while maintaining lossless (lossless) performance. And an apparatus.

ここで、PCMとは、パルス符号変調(Pulse Code Modulation)を意味し、具体的にはアナログ電気信号を標本化、量子化そして符号化することによってデジタル電気信号に変換することを言う。また、「標本化」とは、連続的なアナログ信号の振幅値を離散的な周期T(T=1/fs、ただしfsは標本化周波数)で区切り、その振幅の瞬間値インパルスを取り出してインパルス列を生成することをいう。生成されたインパルスの各々は、サンプル(標本)と呼ばれる。「量子化」とは、標本化によって生成されたサンプル列の最大振幅値をその正値から負値まで単位振幅ごとに分割して基準値を設定し、同サンプル列のアナログ振幅を前記基準値のうちの最も近いものに近似して数値化することをいう。「符号化」とは、量子化により振幅を数値化されたサンプル列中の各サンプル(固有の振幅値を持つ)を「0」と「1」の2値からなる符号(振幅一定のパルス列あるいはビット列)で表現することをいう。   Here, PCM means pulse code modulation, specifically, converting an analog electric signal into a digital electric signal by sampling, quantizing and encoding. “Sampling” means that the amplitude value of a continuous analog signal is divided by a discrete period T (T = 1 / fs, where fs is a sampling frequency), and an instantaneous value impulse of the amplitude is taken out to obtain an impulse. To create a sequence. Each of the generated impulses is called a sample. “Quantization” means that the maximum amplitude value of a sample sequence generated by sampling is divided into unit amplitudes from the positive value to the negative value to set a reference value, and the analog amplitude of the sample sequence is set to the reference value. It means to approximate to the closest one of them. “Encoding” means that each sample (having a unique amplitude value) in a sample sequence whose amplitude is digitized by quantization is a code (a pulse sequence having a constant amplitude or a binary amplitude of “0” and “1”). This is expressed in terms of a bit string.

PCMデータの圧縮・伸長処理は、オーディオ機器がデジタル化された当初は、CD(Compact Disk)に代表されるパルス符号変調(PCM)による「非圧縮符号化方式」で行うのが主流であった。しかし、近年はMP3、WMAなどの「圧縮符号化方式」が主流となりつつある。これは、オーディオ・データを磁気ディスクに記録する場合や回線を通じて伝送する場合を想定すると、非圧縮符号方式で符号化した場合のデータ量(データ・サイズ)が大きすぎるためである。他方、圧縮符号化方式には、データ量を少なくできる反面、音質の劣化という難点がある。つまり、圧縮符号化方式ではデータ量と音質とはトレードオフの関係にある。このため、従来は、データの記録・伝送が容易であるという利点を重視して、圧縮符号化方式で処理されたオーディオ・データにより得られる音質に対して、それなりに満足していたユーザが多かったと思われるが、不満を抱いているユーザも相当数存在していた。最近は、技術の進歩によりデータ記録・伝送機能が向上したため、ユーザの間には、非圧縮符号化方式で処理した場合の音質あるいはそれに近い良好な音質を保ちながら、圧縮によりデータ量を可能な限り小さくして欲しい、という要望(すなわち、データ量をより小さくできる可逆圧縮方式に対する要望)が強くなってきている。   The compression / decompression processing of PCM data was mainly performed by “uncompressed encoding method” by pulse code modulation (PCM) represented by CD (Compact Disk) when the audio equipment was digitized. . However, in recent years, “compression encoding methods” such as MP3 and WMA are becoming mainstream. This is because, assuming that audio data is recorded on a magnetic disk or transmitted via a line, the amount of data (data size) when encoded by the uncompressed encoding method is too large. On the other hand, the compression encoding method can reduce the amount of data, but has a problem of deterioration in sound quality. That is, in the compression encoding method, the data amount and the sound quality are in a trade-off relationship. For this reason, in the past, many users were satisfied with the sound quality obtained from audio data processed by the compression coding method, with an emphasis on the advantage of easy data recording and transmission. There seemed to be many users who were dissatisfied. Recently, the data recording / transmission function has been improved due to the advancement of technology. Therefore, the amount of data can be reduced by compression while maintaining the sound quality when processed by the non-compression coding method or the good sound quality close to it. There is an increasing demand for reducing the data size as much as possible (that is, a request for a lossless compression method capable of reducing the amount of data).

従来、PCM方式により符号化したデータ(以下、PCMデータという)をその情報量を損なわずに圧縮し、また圧縮したそのPCMデータを伸長して再生する技術(すなわち可逆圧縮・伸長技術)としては、「PCMブロック化圧縮・伸長方式」が知られている。この方式では、アナログ信号を所定の最大量子化ビット数で標本化・量子化・符号化して得られたデジタル・データ(PCMデータ)について、「サンプル」を一定数毎にまとめてブロック化する。こうして生成されたブロックを、ここでは「サンプル・ブロック」(以下、単にブロックとも言う)と呼ぶ。その後、これらサンプル・ブロックの各々に含まれる全サンプルの最大値(最大振幅)を表現するために必要な量子化ビット数をブロック毎に算出する。そして、算出された量子化ビット数を当該ブロック用の量子化ビット数として定義して、当該ブロック中の全サンプルを再度符号化することにより、当該ブロック中の総ビット数(データ量)減少させる。このように、使用する量子化ビット数をサンプル・ブロック毎に変更・最適化することにより、PCMデータに含まれる情報量を損なうことなく当該データの圧縮を可能としている。この方式は、演算量が少ないと共に容易に実現できる、という利点がある。   Conventionally, as a technique for compressing data encoded by the PCM method (hereinafter referred to as PCM data) without damaging the amount of information, and decompressing and reproducing the compressed PCM data (that is, lossless compression / decompression technique) “PCM block compression / decompression method” is known. In this method, “samples” of a digital data (PCM data) obtained by sampling, quantizing, and encoding an analog signal with a predetermined maximum number of quantization bits are collectively block-formed. The block generated in this way is called a “sample block” (hereinafter also simply referred to as a block). After that, the number of quantization bits necessary to express the maximum value (maximum amplitude) of all samples included in each of these sample blocks is calculated for each block. Then, the calculated number of quantization bits is defined as the number of quantization bits for the block, and all the samples in the block are encoded again, thereby reducing the total number of bits (data amount) in the block. . In this way, by changing and optimizing the number of quantization bits used for each sample block, the data can be compressed without impairing the amount of information contained in the PCM data. This method has an advantage that it can be easily realized with a small amount of calculation.

上述した従来の「PCMブロック化圧縮・伸長方式」には次のような問題点があった。   The conventional “PCM block compression / decompression method” described above has the following problems.

第一に、PCM符号化に使用した最大量子化ビット数を必要とするサンプル・データがサンプル・ブロック中に一つでも存在すると、換言すれば、あるサンプル・ブロック中に含まれる全サンプルの最大値を表現するために必要な量子化ビット数が、PCM符号化に使用する最大量子化ビット数に等しいかそれに近い場合には、そのサンプル・ブロックは「無圧縮」あるいは「低圧縮」となってしまうことである。このため、「無圧縮ブロック」や「低圧縮ブロック」が増加しやすく、その結果、PCMデータ全体の圧縮率(圧縮後のデータ量/元のデータ量)が低下しやすい。   First, there is at least one sample data in the sample block that requires the maximum number of quantization bits used for PCM coding, in other words, the maximum of all samples contained in a sample block. If the number of quantization bits required to represent a value is equal to or close to the maximum number of quantization bits used for PCM encoding, the sample block is “no compression” or “low compression”. It is to end up. For this reason, “non-compressed blocks” and “low-compressed blocks” tend to increase, and as a result, the compression ratio of the entire PCM data (data amount after compression / original data amount) tends to decrease.

第一の問題点の生じる理由は、各サンプル・ブロックに使用する量子化ビット数が、当該サンプル・ブロック内の全サンプルの最大値を表現するために必要な量子化ビット数で一意に決まってしまうことにある。あるサンプル・ブロック内の一つのサンプルの値を表現するために最大量子化ビット数が必要であれば、他の大多数のサンプルの値が十分に小さい値であってもそれらは無視されてしまい、そのサンプル・ブロックは「無圧縮ブロック」となってしまうのである。   The reason for the first problem is that the number of quantization bits used for each sample block is uniquely determined by the number of quantization bits necessary to express the maximum value of all samples in the sample block. There is to be. If the maximum number of quantization bits is needed to represent the value of one sample in a sample block, it will be ignored even if the majority of other samples are small enough. The sample block becomes an “uncompressed block”.

第二の問題点は、サンプル・ブロック長(以下、単にブロック長ともいう)、すなわちサンプル・ブロック中に含まれるサンプルの総数に応じて、圧縮率(圧縮性能)が大きく変化するため、圧縮処理に最適なブロック長を決定することが困難なことである。   The second problem is that the compression ratio (compression performance) varies greatly depending on the sample block length (hereinafter also simply referred to as the block length), that is, the total number of samples included in the sample block. It is difficult to determine the optimal block length for.

第二の問題点の生じる理由は、ブロック長を大きくすると、各サンプルの値(振幅値)の変化に対する追従性が悪化し、その結果、上記第一の問題点で述べたように、例えば、無音区間を含むサンプル・ブロック中に一つでも最大量子化ビット数を必要とするサンプルが存在すると、そのサンプル・ブロック全体が無圧縮ブロックとなるからである。逆に、ブロック長を小さくすると、サンプル・ブロック中のデータ量に対する管理用データ量の比率が高まり、その結果としてブロック内圧縮効率が低下してしまうからである。   The reason for the occurrence of the second problem is that if the block length is increased, the followability to changes in the value of each sample (amplitude value) deteriorates. As a result, as described in the first problem, for example, This is because if there is even one sample that requires the maximum number of quantization bits in a sample block including a silent section, the entire sample block becomes an uncompressed block. Conversely, if the block length is reduced, the ratio of the management data amount to the data amount in the sample block increases, and as a result, the intra-block compression efficiency decreases.

本発明は、上述した二つの問題点を考慮してなされたものであり、その主な目的は、可逆性を保持しながら、従来のPCMブロック化圧縮・伸長方式によった場合よりもデータ量を小さく圧縮できるPCMデータ圧縮方法及び装置、並びにその方法で圧縮されたPCMデータを伸長することができるPCMデータ伸長方法及び装置を提供することにある。   The present invention has been made in consideration of the above-mentioned two problems, and its main object is to maintain the reversibility and to increase the data volume compared to the conventional PCM block compression / decompression method. PCM data compressing method and apparatus capable of compressing the PCM data, and a PCM data decompressing method and apparatus capable of decompressing PCM data compressed by the method.

本発明の他の目的は、従来のPCMブロック化圧縮・伸長方式によった場合よりもサンプル・ブロック長に対する圧縮率(圧縮性能)の依存性が小さく、圧縮処理に最適なブロック長の設定が容易である、可逆性のPCMデータ圧縮方法及び装置、並びにその方法で圧縮されたPCMデータを伸長することができるPCMデータ伸長方法及び装置を提供することにある。   Another object of the present invention is that the dependency of the compression ratio (compression performance) on the sample block length is smaller than that in the case of the conventional PCM block compression / decompression method, and an optimum block length for compression processing is set. It is an object of the present invention to provide an easy and reversible PCM data compression method and apparatus, and a PCM data decompression method and apparatus capable of decompressing PCM data compressed by the method.

(1) 本発明のPCMデータ圧縮方法は、
元データを量子化ビット数2(mは正の整数)でPCM方式により符号化して得られたPCMデータを、n個(nは2以上の正の整数)のサンプル毎に区切ってn個のサンプルからなるサンプル・ブロックを生成するステップと、
前記サンプル・ブロック中の各サンプルについて、ビット数2のビット群をビット数i(iは0または(2−1)以下の整数)の第1ビット群とビット数(2−i)の第2ビット群とに分割するステップと、
前記サンプル・ブロック中の全サンプルについて、前記第2ビット群だけでその値を表現できるものと、前記第2ビット群だけではその値を表現できないものとに分割するステップと、
前記第2ビット群だけでその値を表現できる前記サンプルについては、必要ビット数を前記第2ビット群のビット数(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては、必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出するステップと、
前記ビット数iの値を変えながら算出した前記サンプル・ブロックの前記総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定するステップと、
前記サンプル・ブロック中の全サンプルのうち、決定された前記ビット数iの値を用いて前記第2ビット群だけでその値を表現できるものについて、前記第2ビット群だけで表現されるようにビット数変換するステップと
を備えてなることを特徴とする。
(1) The PCM data compression method of the present invention includes:
N pieces of PCM data obtained by encoding the original data by the PCM method with a quantization bit number of 2 m (m is a positive integer) divided into n samples (n is a positive integer of 2 or more). Generating a sample block of samples of
For each sample in the sample block, a bit group having a bit number of 2 m is a first bit group having a bit number i (i is an integer equal to or less than 0 or (2 m −1)) and a bit number (2 m −i). Dividing into a second bit group of:
Dividing all the samples in the sample block into ones whose values can be expressed only by the second bit group and those whose values cannot be expressed only by the second bit group;
For the sample whose value can be expressed only by the second bit group, the required number of bits is the number of bits of the second bit group (2 m -i), and the value cannot be expressed only by the second bit group. For samples, the required number of bits is 2 m , and the total required number of bits of the sample block is calculated while changing the value of the number of bits i;
Determining the value of the bit number i based on the total required number of bits of the sample block calculated while changing the value of the bit number i so that the total data amount of the sample block is minimized; ,
Of all samples in the sample block, those values that can be expressed only by the second bit group using the determined value of the number of bits i are expressed only by the second bit group. And a step of converting the number of bits.

本発明のPCMデータ圧縮方法では、元データを量子化ビット数2(mは正の整数)でPCM方式により符号化して得られたPCMデータを、n個(nは2以上の正の整数)のサンプル毎に区切ってn個のサンプルからなるサンプル・ブロックを生成する。次に、前記サンプル・ブロック中の各サンプルについて、ビット数2のビット群をビット数i(iは0または(2−1)以下の整数)の第1ビット群とビット数(2−i)の第2ビット群とに分割する。また、前記サンプル・ブロック中の全サンプルについて、前記第2ビット群だけでその値を表現できるものと、前記第2ビット群だけではその値を表現できないものとに分割する。そして、前記第2ビット群だけでその値を表現できる前記サンプルについては、必要ビット数を前記第2ビット群のビット数(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては、必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出する。その後、前記ビット数iの値を変えながら算出した前記サンプル・ブロックの総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定し、決定した前記ビット数iの値を用いて前記第2ビット群だけでその値を表現できる前記サンプルについて、前記第2ビット群だけで表現されるようにビット数変換する。よって、各サンプル・ブロック内においてデータ圧縮効率が向上し、当該PCMデータ全体の圧縮率を上昇できる、すなわち、従来のPCMブロック化圧縮・伸長方式によった場合よりもデータ量を小さく圧縮できる。 In the PCM data compression method of the present invention, n pieces (n is a positive integer of 2 or more) of PCM data obtained by encoding the original data with the quantization bit number 2 m (m is a positive integer) by the PCM method. ) To generate a sample block consisting of n samples. Next, for each sample in the sample block, a bit group having a bit number of 2 m is converted into a first bit group having a bit number i (i is an integer equal to or less than 0 or (2 m −1)) and the bit number (2 m -I) is divided into the second bit group. In addition, all the samples in the sample block are divided into ones whose values can be expressed only by the second bit group and those whose values cannot be expressed only by the second bit group. For the sample whose value can be expressed only by the second bit group, the required number of bits is set to the number of bits of the second bit group (2 m -i), and the value is expressed only by the second bit group. For the samples that cannot be used, the required number of bits is set to 2 m , and the total necessary number of bits of the sample block is calculated while changing the value of the number of bits i. Thereafter, based on the total required number of bits of the sample block calculated while changing the value of the number of bits i, the value of the number of bits i is determined so that the total data amount of the sample block is minimized, Using the determined value of the number of bits i, the number of bits for which the value can be expressed only by the second bit group is converted so that the sample can be expressed only by the second bit group. Therefore, the data compression efficiency is improved in each sample block, and the compression rate of the entire PCM data can be increased, that is, the data amount can be compressed smaller than in the case of the conventional PCM block compression / decompression method.

また、圧縮した前記PCMデータを伸長する際には、前記サンプル・ブロックについて前記第1ビット群のビット数iの設定値を判別すると共に、当該サンプル・ブロック中の前記サンプルの各々について前記第1ビット群の使用の有無を判別することにより、前記第1ビット群を使用した前記サンプルの各々を量子化ビット数2により表現したものに再生できる。圧縮の際に情報の損失はないので、可逆性は保持される。 Further, when decompressing the compressed PCM data, the set value of the number of bits i of the first bit group is determined for the sample block, and the first value for each of the samples in the sample block is determined. By discriminating whether or not a bit group is used, each of the samples using the first bit group can be reproduced as a representation expressed by a quantization bit number of 2 m . There is no loss of information during compression, so reversibility is maintained.

さらに、本発明のPCMデータ圧縮方法では、前記第2ビット群だけでその値を表現できる前記サンプルについては、必要ビット数を前記第2ビット群のビット数(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては、必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出してから、前記ビット数iの値を変えながら算出した前記サンプル・ブロックの総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定する。このため、各サンプル・ブロックの量子化ビット数が、当該サンプル・ブロック内のサンプル・データの最大値を表現するために必要な量子化ビット数で一意に決まる従来のPCMブロック化圧縮・伸長方式によった場合よりも、サンプル・ブロック長に対する圧縮率(圧縮性能)の依存性が小さくなり、圧縮処理に最適なブロック長の設定が容易となる。 Furthermore, in the PCM data compression method of the present invention, for the sample whose value can be expressed only by the second bit group, the required number of bits is set to the number of bits (2 m −i) of the second bit group, and the second For the sample whose value cannot be expressed only by the 2-bit group, the required number of bits is set to 2 m , the total number of necessary bits of the sample block is calculated while changing the value of the number of bits i, and then the number of bits Based on the total necessary number of bits of the sample block calculated while changing the value of i, the value of the number of bits i is determined so that the total data amount of the sample block is minimized. Therefore, the conventional PCM block compression / decompression method in which the number of quantization bits of each sample block is uniquely determined by the number of quantization bits necessary to express the maximum value of the sample data in the sample block Therefore, the dependency of the compression ratio (compression performance) on the sample block length becomes smaller, and it becomes easier to set the optimum block length for the compression processing.

以上述べたように、本発明のPCMデータ圧縮方法によれば、可逆性を保持しながら、従来のPCMブロック化圧縮・伸長方式によった場合よりもデータ量を小さく圧縮できると共に、同方式よりもサンプル・ブロック長に対する圧縮率(圧縮性能)の依存性を小さくして圧縮処理に最適なブロック長の設定を容易化することができる。   As described above, according to the PCM data compression method of the present invention, while maintaining reversibility, the data amount can be compressed smaller than in the case of the conventional PCM block compression / decompression method, In addition, the dependence of the compression ratio (compression performance) on the sample block length can be reduced, and the setting of the optimum block length for the compression processing can be facilitated.

PCMデータを構成する多数のサンプルを所定のブロック長を持つサンプル・ブロックに分割した場合、そのサンプル・ブロック内のあるサンプルの値を表現するために必要な量子化ビット数が、最大量子化ビット数に等しいかそれに近いビット数であっても、それ以外のサンプルの値を表現するために必要な量子化ビット数はそれよりはるかに小さいことがある。このような場合、従来の「PCMブロック化圧縮・伸長方式」では、当該ブロック全体の量子化ビット数として、最大量子化ビット数に等しいかそれに近いビット数を使用することになるから、そのブロック内の一つのサンプル・データを表現するために最大量子化ビット数またはそれに近いビット数が必要であれば、他の大多数のサンプルの値が十分小さくてもそれらは無視されてしまい、そのブロックは「無圧縮ブロック」や「低圧縮ブロック」となってしまう。したがって、当該PCMデータ全体の圧縮率(圧縮後のデータ量/元のデータ量)も低くなりやすい。   When a large number of samples constituting PCM data are divided into sample blocks having a predetermined block length, the number of quantization bits necessary to express the value of a certain sample in the sample block is the maximum quantization bit. Even if the number of bits is equal to or close to the number, the number of quantization bits required to represent the values of the other samples may be much smaller. In such a case, the conventional “PCM block compression / decompression method” uses the number of bits equal to or close to the maximum number of quantization bits as the number of quantization bits of the entire block. If the maximum number of quantization bits is required to represent one sample data in the block, it is ignored even if the value of the majority of other samples is sufficiently small. Becomes “uncompressed block” or “low-compressed block”. Therefore, the compression ratio of the entire PCM data (data amount after compression / original data amount) tends to be low.

これに対し、本発明のPCMデータ圧縮方法によれば、前記サンプル・ブロックに含まれるサンプルの各々をビット数i(iは0または(2−1)以下の整数)の第1ビット群とビット数(2−i)の第2ビット群とに分割すると共に、前記第2ビット群だけでその値を表現できる前記サンプルと、前記第2ビット群だけではその値を表現できない前記サンプルとに分割する。そして、前記第2ビット群だけでその値を表現できる前記サンプルについては必要ビット数を(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出する。算出した前記サンプル・ブロックの総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定する。このため、前記サンプル・ブロックの全データ量を小さくすることができる。換言すれば、前記サンプル・ブロックに含まれるサンプル毎に、最大量子化ビット数が必要か否かを考慮して、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を定義(決定)することができる。このため、上記のようなサンプル・ブロックが「無圧縮ブロック」や「低圧縮ブロック」となる恐れが低下し、その結果、当該PCMデータ全体の圧縮率が上昇するのである。 On the other hand, according to the PCM data compression method of the present invention, each sample included in the sample block is represented by a first bit group having a bit number i (i is 0 or an integer equal to or less than (2 m −1)). The sample is divided into the second bit group of the number of bits (2 m −i), and the sample whose value can be expressed only by the second bit group, and the sample whose value cannot be expressed only by the second bit group, Divide into For the sample whose value can be expressed only by the second bit group, the required number of bits is (2 m -i), and for the sample whose value cannot be expressed only by the second bit group, the required number of bits is set. As 2 m , the total necessary number of bits of the sample block is calculated while changing the value of the number of bits i. Based on the calculated required total number of bits of the sample block, the value of the number of bits i is determined so that the total data amount of the sample block is minimized. For this reason, the total data amount of the sample block can be reduced. In other words, considering the necessity of the maximum number of quantization bits for each sample included in the sample block, the value of the number of bits i so that the total data amount of the sample block is minimized. Can be defined (determined). For this reason, the possibility that the above-described sample blocks become “uncompressed blocks” or “low-compressed blocks” is reduced, and as a result, the compression ratio of the entire PCM data is increased.

本発明のPCMデータ圧縮方法の好ましい例では、前記第2ビット群だけではその値を表現できない前記サンプルについては、前記第1ビット群と前記第2ビット群の双方を用いて表現する。   In a preferred example of the PCM data compression method of the present invention, the sample whose value cannot be expressed only by the second bit group is expressed by using both the first bit group and the second bit group.

本発明のPCMデータ圧縮方法の他の好ましい例では、前記第2ビット群だけを用いて表現された前記サンプルと、前記第1ビット群と前記第2ビット群の双方を用いて表現された前記サンプルとを用いて、前記サンプル・ブロック用のビット・ストリームを生成するステップをさらに含む。前記ビット・ストリームは、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えている。   In another preferred example of the PCM data compression method of the present invention, the sample expressed using only the second bit group, and the sample expressed using both the first bit group and the second bit group. And generating a bit stream for the sample block using the samples. The bit stream includes a first bit group bit number display unit indicating a set value of the bit number i, a first bit group use display unit indicating whether or not the first bit group is used for each sample, And a data bit storage unit in which data bits for the sample block are stored.

(2) 本発明のPCMデータ圧縮装置は、
元データを量子化ビット数2(mは正の整数)でPCM方式により符号化して得られたPCMデータを、n個(nは2以上の正の整数)のサンプル毎に区切ってn個のサンプルからなるサンプル・ブロックを生成する手段と、
前記サンプル・ブロック中の各サンプルについて、ビット数2のビット群をビット数i(iは0または(2−1)以下の整数)の第1ビット群とビット数(2−i)の第2ビット群とに分割する手段と、
前記サンプル・ブロック中の全サンプルについて、前記第2ビット群だけでその値を表現できるものと、前記第2ビット群だけではその値を表現できないものとに分割する手段と、
前記第2ビット群だけでその値を表現できる前記サンプルについては、必要ビット数を前記第2ビット群のビット数(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては、必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出する手段と、
前記ビット数iの値を変えながら算出した前記サンプル・ブロックの総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定する手段と、
前記サンプル・ブロック中の全サンプルのうち、決定された前記ビット数iの値を用いて前記第2ビット群だけでその値を表現できるものについて、前記第2ビット群だけで表現されるようにビット数変換する手段と
を備えてなることを特徴とする。
(2) The PCM data compression apparatus of the present invention
N pieces of PCM data obtained by encoding the original data by the PCM method with a quantization bit number of 2 m (m is a positive integer) divided into n samples (n is a positive integer of 2 or more). Means for generating a sample block consisting of
For each sample in the sample block, a bit group having a bit number of 2 m is a first bit group having a bit number i (i is an integer equal to or less than 0 or (2 m −1)) and a bit number (2 m −i). Means for dividing into a second bit group of
Means for dividing all samples in the sample block into ones whose values can be expressed only by the second bit group and ones whose value cannot be expressed only by the second bit group;
For the sample whose value can be expressed only by the second bit group, the required number of bits is the number of bits of the second bit group (2 m -i), and the value cannot be expressed only by the second bit group. For the sample, a means for calculating the total required number of bits of the sample block while changing the value of the number of bits i, with the required number of bits being 2 m ,
Means for determining the value of the bit number i based on the total necessary number of bits of the sample block calculated while changing the value of the bit number i so that the total data amount of the sample block is minimized;
Of all samples in the sample block, those values that can be expressed only by the second bit group using the determined value of the number of bits i are expressed only by the second bit group. And a means for converting the number of bits.

本発明のPCMデータ圧縮装置では、本発明のPCMデータ圧縮方法について上記(1)で説明したのと同じ理由により、可逆性を保持しながら、従来のPCMブロック化圧縮・伸長方式によった場合よりもデータ量を小さく圧縮できると共に、同方式よりもサンプル・ブロック長に対する圧縮率(圧縮性能)の依存性を小さくして圧縮処理に最適なブロック長の設定を容易化することができる。   In the PCM data compression apparatus of the present invention, when the PCM data compression method of the present invention is based on the conventional PCM block compression / decompression method while maintaining reversibility for the same reason as described in (1) above. In addition, the data amount can be compressed smaller than that, and the dependence of the compression ratio (compression performance) on the sample block length can be made smaller than that of the same method to facilitate the setting of the optimum block length for the compression processing.

本発明のPCMデータ圧縮装置の好ましい例では、前記第2ビット群だけでその値を表現できる前記サンプルについて前記第2ビット群だけで表現されるようにビット数変換する前記手段が、前記第2ビット群だけではその値を表現できない前記サンプルについては、前記第1ビット群と前記第2ビット群の双方を用いて表現する。   In a preferred example of the PCM data compression apparatus of the present invention, the means for converting the number of bits so that the sample whose value can be expressed only by the second bit group is expressed by only the second bit group, The sample whose value cannot be expressed only by the bit group is expressed by using both the first bit group and the second bit group.

本発明のPCMデータ圧縮装置の他の好ましい例では、前記第2ビット群だけでその値を表現できる前記サンプルについて前記第2ビット群だけで表現されるようにビット数変換する前記手段が、前記第2ビット群だけで表現された前記サンプルと、前記第1ビット群と前記第2ビット群の双方で表現された前記サンプルとを用いて、前記サンプル・ブロック用のビット・ストリームを生成する。前記ビット・ストリームは、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えている。   In another preferred example of the PCM data compression device of the present invention, the means for converting the number of bits so that the sample whose value can be expressed only by the second bit group is expressed by only the second bit group, A bit stream for the sample block is generated using the samples represented by only the second bit group and the samples represented by both the first bit group and the second bit group. The bit stream includes a first bit group bit number display unit indicating a set value of the bit number i, a first bit group use display unit indicating whether or not the first bit group is used for each sample, And a data bit storage unit in which data bits for the sample block are stored.

(3) 本発明のPCMデータ伸長方法は、上記(1)に述べた本発明のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長する方法であって、
圧縮された前記PCMデータから、前記サンプル・ブロックについて前記ビット数iの設定値を判別するステップと、
圧縮された前記PCMデータから、前記サンプル・ブロック中の前記サンプルの各々について前記第1ビット群の使用の有無を判定するステップと、
判別した前記ビット数iの設定値と前記第1ビット群の使用の有無の判定結果とを用いて、圧縮された前記PCMデータを伸長するステップとを備えてなることを特徴とする。
(3) A PCM data decompression method of the present invention is a method of decompressing the PCM data compressed by the PCM data compression method of the present invention described in (1) above.
Determining a set value of the number of bits i for the sample block from the compressed PCM data;
Determining from the compressed PCM data whether the first bit group is used for each of the samples in the sample block; and
A step of decompressing the compressed PCM data using the determined set value of the number of bits i and the determination result of whether or not the first bit group is used.

本発明のPCMデータ伸長方法では、圧縮された前記PCMデータから、前記サンプル・ブロックについて前記第1ビット群の前記ビット数iの設定値を判別し、また前記サンプル・ブロック中の前記サンプルの各々について前記第1ビット群の使用の有無を判定する。そして、判別した前記ビット数iの設定値と前記第1ビット群の使用の有無の判定結果とを用いて、圧縮された前記PCMデータを伸長する。このため、上記(1)に述べた本発明のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長することができる。   In the PCM data decompression method of the present invention, the set value of the number of bits i of the first bit group is determined for the sample block from the compressed PCM data, and each of the samples in the sample block is determined. Whether or not the first bit group is used is determined. Then, the compressed PCM data is decompressed using the determined set value of the number of bits i and the determination result of whether or not the first bit group is used. Therefore, the PCM data compressed by the PCM data compression method of the present invention described in (1) above can be expanded.

本発明のPCMデータ伸長方法の好ましい例では、圧縮された前記PCMデータが、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えており、前記第1ビット群ビット数表示部を読みとって前記第1ビット群の前記ビット数iの設定値を判別し、前記第1ビット群使用表示部を読みとって前記第1ビット群の使用の有無を前記サンプル毎に判定する。   In a preferred example of the PCM data decompression method of the present invention, the compressed PCM data includes a first bit group bit number display unit indicating a set value of the bit number i, and whether or not the first bit group is used. A first bit group use display section shown for each sample; and a data bit storage section in which data bits for the sample block are stored, and reading the first bit group bit number display section A set value of the number of bits i of the first bit group is discriminated, and the first bit group use display section is read to determine whether or not the first bit group is used for each sample.

(4) 本発明のPCMデータ伸長装置は、上記(1)に述べた本発明のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長する装置であって、
圧縮された前記PCMデータから、前記サンプル・ブロックについて前記ビット数iの設定値を判別するビット数判別手段と、
圧縮された前記PCMデータから、前記サンプル・ブロック中の前記サンプルの各々について前記第1ビット群の使用の有無を判定する第1ビット群使用判定手段と、
判別した前記ビット数iの設定値と前記第1ビット群の使用の有無の判定結果とを用いて、圧縮された前記PCMデータを伸長するデータ伸長手段とを備えてなることを特徴とする。
(4) A PCM data decompression apparatus of the present invention is an apparatus for decompressing the PCM data compressed by the PCM data compression method of the present invention described in (1) above.
A bit number discriminating means for discriminating a set value of the bit number i for the sample block from the compressed PCM data;
First bit group usage determining means for determining whether or not the first bit group is used for each of the samples in the sample block from the compressed PCM data;
Data decompression means for decompressing the compressed PCM data using the determined set value of the number of bits i and the determination result of whether or not the first bit group is used is provided.

本発明のPCMデータ伸長装置では、本発明のPCMデータ伸長方法について上記(3)で説明したのと同じ理由により、本発明のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長することができる。   In the PCM data decompression apparatus of the present invention, the PCM data compressed by the PCM data compression method of the present invention can be decompressed for the same reason as described in the above (3) for the PCM data decompression method of the present invention. .

本発明のPCMデータ伸長装置の好ましい例では、圧縮された前記PCMデータが、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えており、前記ビット数判別手段は前記第1ビット群ビット数表示部を読みとって前記ビット数iの設定値を判別し、前記第1ビット群使用判定手段は前記第1ビット群使用表示部を読みとって前記第1ビット群の使用の有無を判定する。   In a preferred example of the PCM data decompression apparatus according to the present invention, the compressed PCM data includes a first bit group bit number display unit indicating the set value of the bit number i, and whether or not the first bit group is used. A first bit group use display section for each sample; and a data bit storage section for storing the data bits for the sample block, wherein the bit number discrimination means includes the first bit group bit number The display unit is read to determine the set value of the number of bits i, and the first bit group use determination unit reads the first bit group use display unit to determine whether or not the first bit group is used.

本発明のPCMデータ圧縮方法及び装置では、可逆性を保持しながら、従来のPCMブロック化圧縮・伸長方式によった場合よりもデータ量を小さく圧縮できると共に、同方式よりもサンプル・ブロック長に対する圧縮率(圧縮性能)の依存性を小さくして圧縮処理に最適なブロック長の設定を容易化することができる。   In the PCM data compression method and apparatus of the present invention, while maintaining reversibility, it is possible to compress the data amount smaller than in the case of the conventional PCM block compression / decompression method, and to the sample block length than the same method. Setting the optimum block length for the compression processing can be facilitated by reducing the dependency of the compression rate (compression performance).

本発明のPCMデータ伸長方法及び装置では、本発明のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長することができる。   In the PCM data decompression method and apparatus of the present invention, the PCM data compressed by the PCM data compression method of the present invention can be decompressed.

以下、本発明の好適な実施の形態について、添付図面を参照して詳細に説明する。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the accompanying drawings.

(全体構成)
図5は、本発明の一実施形態に係るPCMデータ圧縮装置及びPCMデータ伸長装置が組み込まれたオーディオ・データ処理システムの構成を示す機能ブロック図である。
(overall structure)
FIG. 5 is a functional block diagram showing a configuration of an audio data processing system in which a PCM data compression apparatus and a PCM data decompression apparatus according to an embodiment of the present invention are incorporated.

図5のオーディオ・データ処理システムは、アナログ音響入力装置1と、デジタル変調器2と、圧縮処理装置3と、データ記録装置またはデータ伝送装置4と、伸長処理装置5と、アナログ復調器6と、アナログ音響出力装置7とを有している。このシステムは、音声や音楽等のアナログ音響(音波)データをPCM符号化した後、可逆性を保持しながら圧縮して記録または伝送することができ、さらに、圧縮して記録または伝送したデータを必要に応じて伸長して元のアナログ音響(音波)を再生することが可能である。   The audio data processing system of FIG. 5 includes an analog sound input device 1, a digital modulator 2, a compression processing device 3, a data recording device or data transmission device 4, an expansion processing device 5, and an analog demodulator 6. And an analog sound output device 7. This system is capable of PCM encoding analog sound (sound wave) data such as voice and music, then compressing and recording or transmitting while maintaining reversibility, and further compressing and recording or transmitting data The original analog sound (sound wave) can be reproduced by expanding as necessary.

アナログ音響入力装置1は、音声や音楽等のアナログ音響データ(音波)をアナログ電気信号に変換し、アナログ・オーディオ・データを生成して出力する。換言すれば、アナログ音響入力装置1はマイクロフォンと同様の機能を実施する。   The analog sound input device 1 converts analog sound data (sound wave) such as voice or music into an analog electric signal, and generates and outputs analog audio data. In other words, the analog sound input device 1 performs the same function as the microphone.

デジタル変調器2は、アナログ・デジタル・コンバータ(ADC)であり、アナログ音響入力装置1より送られるアナログ・オーディオ・データに対してデジタル変調(PCM符号化)を行い、PCMオーディオ・データを生成して出力する。   The digital modulator 2 is an analog-digital converter (ADC), and performs digital modulation (PCM encoding) on analog audio data sent from the analog sound input device 1 to generate PCM audio data. Output.

圧縮処理装置3は、本発明の一実施形態に係るPCMデータ圧縮装置であり、デジタル変調器2から送られるPCMオーディオ・データに対して可逆(無損失)圧縮を行って、オーディオ・データのビット・ストリームを生成・出力する。   The compression processing device 3 is a PCM data compression device according to an embodiment of the present invention. The compression processing device 3 performs lossless compression on the PCM audio data sent from the digital modulator 2, so that bits of the audio data are obtained. -Generate and output a stream.

データ記録装置またはデータ伝送装置4は、圧縮処理装置3から送られるオーディオ・データのビット・ストリームを所定の記録媒体(メモリ、ハードディスク、フロッピィディスク、コンパクト・ディスク等)に記録し、あるいは当該ビット・ストリームを有線・無線のアナログ回線網やデジタル回線網等の伝送路を通じて所定箇所に伝送する。   The data recording device or data transmission device 4 records the bit stream of the audio data sent from the compression processing device 3 on a predetermined recording medium (memory, hard disk, floppy disk, compact disk, etc.), or The stream is transmitted to a predetermined location through a transmission path such as a wired / wireless analog circuit network or digital circuit network.

伸長処理装置5は、本発明の一実施形態に係るPCMデータ伸長装置であり、データ記録装置またはデータ伝送装置4から送られるオーディオ・データのビット・ストリームに対して伸長処理を行って、PCMオーディオ・データを生成・出力する。伸長により生成されたPCMオーディオ・データは、デジタル変調器2が出力したPCMオーディオ・データと完全に同一(ビット一致)である。   The decompression processing device 5 is a PCM data decompression device according to an embodiment of the present invention. The decompression processing device 5 performs decompression processing on a bit stream of audio data sent from the data recording device or the data transmission device 4 to obtain PCM audio.・ Generate and output data. The PCM audio data generated by the decompression is completely the same as the PCM audio data output from the digital modulator 2 (bit match).

アナログ復調器6は、デジタル変調器2と逆の動作を行うデジタル・アナログ・コンバータ(DAC)であり、伸長処理装置5より送られるPCMオーディオ・データに対してデジタル復調(PCM復号化)を行い、アナログ・オーディオ・データを生成して出力する。   The analog demodulator 6 is a digital-analog converter (DAC) that performs the reverse operation of the digital modulator 2, and performs digital demodulation (PCM decoding) on the PCM audio data sent from the decompression processing unit 5. Generates and outputs analog audio data.

アナログ音響出力装置7は、アナログ復調器6より出力されるアナログ・オーディオ・データ(アナログ電気信号)をアナログ音響データ(音波)に変換し、元の音響を再生する。換言すれば、アナログ音響出力装置7はスピーカと同様の機能を実施する。   The analog sound output device 7 converts the analog audio data (analog electric signal) output from the analog demodulator 6 into analog sound data (sound wave) and reproduces the original sound. In other words, the analog sound output device 7 performs the same function as the speaker.

(圧縮処理装置3の構成)
次に、図3を参照しながら圧縮処理装置(PCMデータ圧縮装置)3の構成を説明する。
(Configuration of compression processing apparatus 3)
Next, the configuration of the compression processing apparatus (PCM data compression apparatus) 3 will be described with reference to FIG.

図3に示すように、圧縮処理装置3は、サンプル・ブロック生成手段31とサンプル分割手段32とデータ圧縮手段33とを備えている。   As shown in FIG. 3, the compression processing device 3 includes a sample block generation unit 31, a sample division unit 32, and a data compression unit 33.

サンプル・ブロック生成手段31は、図6に示すように、デジタル変調器2より送られるPCMオーディオ・データ(2ビットのPCM符号化されたデジタル音響データ)(mは正の整数)をn個(nは2以上の正の整数)集めてサンプル・ブロックを生成する。こうして、第1ブロック、第2ブロック、・・・・・というように、PCMオーディオ・データのサンプル・ブロックの系列を生成する。 As shown in FIG. 6, the sample block generation means 31 receives n pieces of PCM audio data (2 m- bit PCM encoded digital acoustic data) (m is a positive integer) sent from the digital modulator 2. (N is a positive integer greater than or equal to 2) Collect to generate a sample block. In this way, a sequence of sample blocks of PCM audio data, such as a first block, a second block,... Is generated.

サンプル・ビット群分割手段32は、図7に示すように、各サンプル・ブロック内の各サンプルの2ビット・データ(ビット数2のビット群)を、ビット数iの「上位ビット群(第1ビット群)」とビット数(2−i)の「下位ビット群(第2ビット群)」に分割する。そして、(2−i)ビットで表現可能なサンプルについては、下位ビット群のみで表現するようにし、(2−i)ビットで表現できないサンプルについては、上位ビット群と下位ビット群の双方を用いて表現するようにする。ビット数iは、次のようにして決定する。 As shown in FIG. 7, the sample bit group dividing means 32 converts 2 m bit data (bit group of 2 m bits) of each sample in each sample block into “higher bit group ( 1st bit group) ”and“ lower bit group (second bit group) ”of the number of bits (2 m −i). A sample that can be represented by (2 m -i) bits is represented only by a lower bit group, and a sample that cannot be represented by (2 m -i) bits is both an upper bit group and a lower bit group. Use to express. The number of bits i is determined as follows.

まず、サンプル・ブロック中の全サンプルについて、下位ビット群だけでその値を表現できるものと、下位ビット群だけではその値を表現できないものとに分割する。そして、下位ビット群だけでその値を表現できるサンプルについては、必要ビット数を下位ビット群のビット数(2−i)とし、下位ビット群だけではその値を表現できないサンプルについては、必要ビット数を2として、ビット数iの値を変えながらサンプル・ブロックの総必要ビット数を算出する。その後、ビット数iの値を変えながら算出した当該サンプル・ブロックの総必要ビット数を互いに比較して、そのサンプル・ブロックの総必要ビット数すなわち全データ量が最小となるように、ビット数iの値を決定するのである。ビット数iの値が決定されると、それを用いて当該ブロック内の各サンプルを上位ビット群と下位ビット群の組み合わせに変換する。 First, all the samples in the sample block are divided into those in which the value can be expressed only by the lower bit group and those in which the value cannot be expressed only by the lower bit group. For samples whose value can be represented only by the lower bit group, the required number of bits is set to the number of bits of the lower bit group (2 m -i). The number of bits is 2 m , and the total necessary number of bits of the sample block is calculated while changing the value of the bit number i. Thereafter, the total required number of bits of the sample block calculated while changing the value of the number of bits i are compared with each other so that the total required number of bits of the sample block, that is, the total amount of data is minimized. The value of is determined. When the value of the number of bits i is determined, it is used to convert each sample in the block into a combination of an upper bit group and a lower bit group.

すなわち、図8に示すように、iの値を0から(2−1)まで0、1、2、・・・・、(2−1)と順に変化させて、当該ブロック内の全サンプルの総必要ビット数をそれぞれ算出し、得られた総必要ビット数が最小になる時のiの値を選択して、当該ブロックの上位ビット群のビット数iに設定する。そして、決定されたビット数iを用いて、当該ブロック中の各サンプルのデータ・ビット群をiビットの上位ビット群と(2−i)ビットの下位ビット群に分割する。換言すれば、各サンプルのデータ・ビット群を、上位ビット群と下位ビット群の組み合わせに変換するのである。 That is, as shown in FIG. 8, 0,1,2 values of i from 0 to (2 m -1), ····, by changing the order and (2 m -1), all in the block The total required number of samples is calculated, and the value of i when the obtained total required number of bits is minimized is selected and set to the number of bits i of the upper bit group of the block. Then, using the determined number of bits i, the data bit group of each sample in the block is divided into an i-bit upper bit group and a (2 m -i) -bit lower bit group. In other words, the data bit group of each sample is converted into a combination of an upper bit group and a lower bit group.

データ圧縮手段33は、決定されたビット数iを用いてiビットの上位ビット群と(2−i)ビットの下位ビット群に分割された各サンプルが、下位ビット群の(2−i)ビットで表現可能か否かを判定する。そして、(2−i)ビットで表現可能と判定されたサンプルについては、その上位ビット群を削除して(2−i)ビットの下位ビット群のみで表現するように変換する。こうして、当該サンプルについてはデータ圧縮が行われる。他方、(2−i)ビットで表現できないと判定されたサンプルについては、そのような変換は行われず、上位ビット群と下位ビット群の双方を使って表現する。つまり、最大量子化ビット数の2ビットで表現されたまま保持され、データ圧縮は行われない。このようにして当該ブロックは圧縮され、図9に示すようなデータ構造を持つビット・ストリームが生成される。このデータ構造は、当該ビット・ストリームの先端に「上位ビット群ビット数表示部」が配置され、その次に「上位ビット群使用表示部」が配置され、その次に「データ・ビット格納部」が配置されている。なお、これら三つの領域の配置順序はこれに限定されない。 The data compression means 33 uses the determined number of bits i to divide each sample divided into an upper bit group of i bits and a lower bit group of (2 m -i) bits into (2 m -i ) Determine whether or not it can be expressed in bits. Then, for a sample determined to be expressible with (2 m -i) bits, the upper bit group is deleted and converted to be expressed only with the lower bit group of (2 m -i) bits. Thus, data compression is performed on the sample. On the other hand, samples that are determined not to be expressed with (2 m -i) bits are not subjected to such conversion, and are expressed using both the upper bit group and the lower bit group. That is, it is held as expressed in 2 m bits, which is the maximum number of quantization bits, and data compression is not performed. In this way, the block is compressed, and a bit stream having a data structure as shown in FIG. 9 is generated. In this data structure, an “upper bit group bit number display section” is arranged at the top of the bit stream, followed by an “upper bit group use display section”, and then a “data bit storage section”. Is arranged. Note that the arrangement order of these three regions is not limited to this.

「上位ビット群ビット数表示部」には、当該サンプル・ブロックの「ビット数i」の設定値[0〜(2−1)のいずれかの整数]が配置される。このビット数iの設定値は、mビット・データである。「上位ビット群使用表示部」には、「上位ビット群使用フラグ」が配置される。この上位ビット群使用フラグは、1サンプル当たり1ビットで表現されるから、nビット・データである。例えば、あるサンプルが「上位ビット群使用」の場合には対応する上位ビット群使用フラグの値を1とし、「上位ビット群使用」でない場合には同フラグの値を0とする。「データ・ビット格納部」には、オーディオ・データの本体である「データ・ビット・ストリーム」が配置される。このデータ・ビット・ストリームは、n個のサンプルのデータ・ビットを圧縮して所定の順序(例えばn個のサンプルの時間的順序)で並べることによって得られたビット群である。データ・ビット・ストリーム中のデータの最小ビット数は(1×n)ビットであり、その最大ビット数は(2×n)ビットである。したがって、nサンプルからなる当該ブロックのデータ総量(総ビット数)は、最小値が[m+n+(1×n)]ビットとなり、その最大値が[m+n+(2×n)]ビットとなる。 In the “upper bit group bit number display section”, a set value [any integer of 0 to (2 m −1)] of “bit number i” of the sample block is arranged. The set value of the number of bits i is m-bit data. In the “upper bit group use display portion”, an “upper bit group use flag” is arranged. Since the upper bit group use flag is expressed by 1 bit per sample, it is n-bit data. For example, if a certain sample is “use upper bit group”, the value of the corresponding upper bit group use flag is 1, and if it is not “use upper bit group”, the value of the flag is 0. In the “data bit storage unit”, a “data bit stream” that is the main body of the audio data is arranged. This data bit stream is a group of bits obtained by compressing data bits of n samples and arranging them in a predetermined order (eg, temporal order of n samples). The minimum number of bits of data in the data bit stream is (1 × n) bits, and the maximum number of bits is (2 m × n) bits. Therefore, the total amount of data (total number of bits) of the block consisting of n samples has a minimum value of [m + n + (1 × n)] bits and a maximum value of [m + n + (2 m × n)] bits.

(圧縮処理装置3の動作)
次に、図1のフローチャートを参照しながら、上記構成を持つ圧縮処理装置(PCMデータ圧縮装置)3の動作(PCMデータ圧縮方法)を説明する。
(Operation of the compression processing device 3)
Next, the operation (PCM data compression method) of the compression processing apparatus (PCM data compression apparatus) 3 having the above configuration will be described with reference to the flowchart of FIG.

まず、ステップE1では、デジタル復調器2から送られるPCMデータのサンプル列を順に入力する。ステップE2では、一つのサンプル・ブロックを形成するn個のサンプルが蓄積されたか否かを判定する。判定結果がNoであればステップE1に戻り、判定結果がYesであればステップE3に進む。こうしてステップE1とステップE2を必要回数繰り返して実施することにより、n個のサンプル含むサンプル・ブロックが生成される。これらのステップE1〜E2はサンプル・ブロック生成手段31が実行する。   First, in step E1, a sample sequence of PCM data sent from the digital demodulator 2 is sequentially input. In step E2, it is determined whether n samples forming one sample block have been accumulated. If a determination result is No, it will return to step E1, and if a determination result is Yes, it will progress to step E3. In this way, by repeating step E1 and step E2 as many times as necessary, a sample block including n samples is generated. These steps E1 to E2 are executed by the sample block generating means 31.

ステップE3では、ループ・カウンタiの値を初期化する、すなわちi=0にセットする。次のステップE4では、ループ・カウンタiの値が上限値(2−1)を越えたか否かを判定する。この場合、判定結果はNoであるからステップE5に進み、当該ブロック内の各サンプルについて上位ビット群のビット数iをi=0に設定したと仮定してそれらサンプルの値を表現するのに必要な総ビット数をサンプル毎に算出する。そして、ステップE6に進み、ループ・カウンタiの値をi=i+1(すなわちi=1)に設定してからステップE4に戻って、ループ・カウンタiの値が(2−1)を越えたか否かを判定する。ステップE4での判定結果はNoであるから再びステップE5に進み、当該ブロック内の各サンプルについて上位ビット数iをi=1に設定したと仮定して当該サンプルの値を表現するのに必要な総ビット数をサンプル毎に算出する。 In step E3, the value of the loop counter i is initialized, i.e., i = 0. In the next step E4, it is determined whether or not the value of the loop counter i exceeds the upper limit value (2 m −1). In this case, since the determination result is No, the process proceeds to step E5, and it is necessary to express the values of these samples on the assumption that the bit number i of the upper bit group is set to i = 0 for each sample in the block. The total number of bits is calculated for each sample. Then, the process proceeds to step E6, where the value of the loop counter i is set to i = i + 1 (that is, i = 1), and then the process returns to step E4 to determine whether the value of the loop counter i exceeds (2 m −1). Determine whether or not. Since the determination result in step E4 is No, the process proceeds again to step E5, and it is necessary to express the value of the sample on the assumption that the upper bit number i is set to i = 1 for each sample in the block. The total number of bits is calculated for each sample.

この時、当該サンプル・ブロック中の全サンプルについて、ビット数(2−i)の下位ビット群だけでその値を表現できるものと、下位ビット群だけではその値を表現できないものとに分割し、下位ビット群だけでその値を表現できるサンプルについては、必要ビット数を下位ビット群のビット数(2−i)とし、下位ビット群だけではその値を表現できないサンプルについては、必要ビット数を2として、当該サンプル・ブロックの総必要ビット数を算出する。以後、ループ・カウンタiの値が(2−1)を越えたと判定されるまで、つまりi=(2−1)となるまで、同じ動作を繰り返す。 At this time, all samples in the sample block are divided into those that can represent the value only by the lower bit group of the number of bits (2 m -i) and those that cannot represent the value only by the lower bit group. For a sample whose value can be expressed only by the lower bit group, the required number of bits is the number of bits of the lower bit group (2 m -i). For a sample whose value cannot be expressed only by the lower bit group, the required number of bits Is 2 m , and the total necessary number of bits of the sample block is calculated. Thereafter, the same operation is repeated until it is determined that the value of the loop counter i exceeds (2 m −1), i.e., i = (2 m −1).

この状況を図8に示す。「上位ビット群」のビット数iがi=0の場合は、図8の上の図のようになり、当該ブロックの全サンプルがビット数2の下位ビット群のみで表現されることになる。この時の当該ブロック中の全サンプルを表現するのに必要な総データ量(総必要ビット数)を計算する。i=1、2、・・・(<(2−1))の場合は、図8の中の図のようになり、当該ブロックの全サンプルがビット数iの上位ビット群とビット数(2−i)の下位ビット群とを組み合わせて表現されることになる。i=(2−1)の場合は、図8の下の図のようになり、当該ブロックの全サンプルがビット数(2−1)の上位ビット群とビット数1の下位ビット群とを組み合わせて表現されることになる。i=1、2、・・・、(2−1)の時についても、当該ブロック中の全サンプルを表現するのに必要なデータ量の総和(総必要ビット数)をそれぞれ計算する。 This situation is shown in FIG. When the bit number i of the “upper bit group” is i = 0, as shown in the upper diagram of FIG. 8, all the samples of the block are expressed only by the lower bit group of 2 m bits. . At this time, the total amount of data (total number of required bits) necessary to express all the samples in the block is calculated. When i = 1, 2,... (<(2 m −1)), the result is as shown in FIG. 2 m -i) and the lower bit group. In the case of i = (2 m −1), as shown in the lower diagram of FIG. 8, all the samples of the block are divided into an upper bit group having a bit number (2 m −1) and a lower bit group having a bit number 1. Will be expressed in combination. Also when i = 1, 2,... (2 m −1), the total amount of data (total number of necessary bits) necessary to express all the samples in the block is calculated.

ステップE4での判定結果がYes、すなわちループ・カウンタiの値が上限値(2−1)を越えたと判定されると、ステップE7に進み、当該ブロックに使用するiの値を決定する。このiの値は、ステップE3〜E6の実行によって得られる当該ブロック中の全サンプルのデータ量の総和(必要総ビット数)が最小になる時のiの値に設定される。こうして設定されるiの値が、当該サンプル・ブロックの全サンプルに対して適用される「上位ビット群」のビット数iとなる。iの値は0〜(2−1)のいずれかの整数である。ステップE3〜E7はサンプル・ビット群分割手段32が実行する。 If the determination result in step E4 is Yes, that is, if it is determined that the value of the loop counter i exceeds the upper limit value (2 m −1), the process proceeds to step E7, and the value of i used for the block is determined. The value of i is set to the value of i when the total sum (required total number of bits) of all the samples in the block obtained by executing steps E3 to E6 is minimized. The value of i set in this way is the number of bits i of the “upper bit group” applied to all samples of the sample block. The value of i is an integer from 0 to (2 m −1). Steps E3 to E7 are executed by the sample / bit group dividing means 32.

ステップE7で当該サンプル・ブロックに使用される「上位ビット群」のビット数iの値が決定されると、次のステップE8に進む。ステップE8では、まず、決定されたiの値を用いてiビットの上位ビット群と(2−i)ビットの下位ビット群に分割された各サンプルが、(2−i)ビットで表現可能か否かを判定する。そして、(2−i)ビットで表現可能と判定されたサンプルについては、その上位ビット群を削除して(2−i)ビットの下位ビット群のみで表現するように変換せしめられる。こうして、当該サンプルについてはデータ圧縮が行われる。他方、(2−i)ビットで表現できないと判定されたサンプルについては、そのような変換は行われず、上位ビット群と下位ビット群の双方を使って表現される。つまり、最大量子化ビット数の2ビットで表現されたまま保持され、データ圧縮は行われない。ステップE8はデータ圧縮手段33が実行する。 When the value of the number of bits i of the “upper bit group” used for the sample block is determined in step E7, the process proceeds to the next step E8. In step E8, each sample divided into an i-bit high-order bit group and a (2 m -i) -bit low-order bit group using the determined i value is represented by (2 m -i) bits. Determine whether it is possible. For samples determined to be expressible with (2 m -i) bits, the upper bit group is deleted and converted to be expressed only with the lower bit group of (2 m -i) bits. Thus, data compression is performed on the sample. On the other hand, samples that are determined not to be expressed with (2 m -i) bits are not subjected to such conversion, and are expressed using both the upper bit group and the lower bit group. That is, it is held as expressed in 2 m bits, which is the maximum number of quantization bits, and data compression is not performed. Step E8 is executed by the data compression means 33.

なお、こうして決定された「ビット数i」の設定値[0〜(2−1)のいずれかの整数]は、図9の「上位ビット群ビット数表示部」に格納される。0〜(2−1)の値はmビットで表現できるから、「上位ビット群ビット数表示部」のデータ量(総ビット数)はmビットである。 The set value [any integer of 0 to (2 m −1)] of “number of bits i” determined in this way is stored in the “upper bit group bit number display section” of FIG. Since the value of 0 to (2 m −1) can be expressed by m bits, the data amount (total number of bits) of the “upper bit group bit number display portion” is m bits.

図9の「上位ビット群使用表示部」にサンプル毎に配置される「上位ビット群使用フラグ」は、次のように決定される。すなわち、(2−i)ビットで表現可能と判定されたサンプルについては、(2−i)ビットの下位ビット群のみで表現されるので、上位ビット群は使用されていなく、したがって「上位ビット群使用フラグ」の値は「0」とされる。(2−i)ビットで表現できないと判定されたサンプルについては、上位ビット群と下位ビット群の双方を使って表現されるので、「上位ビット群使用フラグ」の値は「1」とされる。「上位ビット群使用表示部」には、n個の上位ビット群使用フラグが並ぶことになるから、「上位ビット群使用表示部」のデータ量(総ビット数)はnビットである。 The “upper bit group use flag” arranged for each sample in the “upper bit group use display section” of FIG. 9 is determined as follows. That is, for the samples determined to be expressed by (2 m -i) bits, since the (2 m -i) is represented by only the lower bit group of bits, the upper bit group is not being used, thus "Top The value of the “bit group use flag” is set to “0”. A sample determined not to be expressed in (2 m −i) bits is expressed using both the upper bit group and the lower bit group, so the value of the “upper bit group use flag” is set to “1”. The Since n upper bit group use flags are arranged in the “upper bit group use display section”, the data amount (total number of bits) of the “upper bit group use display section” is n bits.

以上のようにして当該ブロック内のサンプル毎にデータ圧縮のための最適化が行われることにより、元のPCMオーディオ・データは圧縮される。こうして圧縮された当該サンプル・ブロックのデータ本体(データ・ビット・ストリーム)は、図9の「データ・ビット格納部」に所定の順序(例えばn個のサンプルの時間的順序)で格納される。その後、図9に示すデータ構造を持つビット・ストリームに構成されて出力される(ステップE9)。   The original PCM audio data is compressed by performing optimization for data compression for each sample in the block as described above. The data body (data bit stream) of the sample block thus compressed is stored in the “data bit storage unit” in FIG. 9 in a predetermined order (for example, the temporal order of n samples). Thereafter, it is formed into a bit stream having the data structure shown in FIG. 9 and output (step E9).

なお、図9のビット・ストリームは、サンプル・ブロック毎に生成・出力されるので、実際は図9のデータ構造がサンプル・ブロックの総数分、繰り返されることになる。   Since the bit stream of FIG. 9 is generated and output for each sample block, the data structure of FIG. 9 is actually repeated for the total number of sample blocks.

(伸長処理装置5の構成)
次に、図4を参照しながら伸長処理装置(PCMデータ伸長装置)5の構成を説明する。
(Configuration of decompression processing device 5)
Next, the configuration of the decompression processing device (PCM data decompression device) 5 will be described with reference to FIG.

図4に示すように、伸長処理装置(PCMデータ伸長装置)5は、ビット数判別手段51と上位ビット群使用判定手段52とデータ伸長手段53とを備えている。   As shown in FIG. 4, the decompression processing device (PCM data decompression device) 5 includes a bit number discrimination means 51, an upper bit group use judgment means 52, and a data decompression means 53.

ビット数判別手段51は、サンプル・ブロック毎に図9のデータ構造を持つビット・ストリームについて、サンプル・ブロック毎に最初のmビットの「上位ビット群ビット数表示部」を調べて当該mビット・データが表現する値を読みとり、もって当該ブロックの上位ビット数iの設定値を判別する。   The bit number discriminating means 51 checks the first m bits “upper bit group bit number display section” for each sample block for the bit stream having the data structure of FIG. The value represented by the data is read, and the set value of the upper bit number i of the block is determined.

上位ビット群使用判定手段52は、サンプル・ブロック毎に、最初のmビットに続くnビットの「上位ビット群使用フラグ」を調べて各ビットが表現する値を読みとり、もって当該ブロック中の各サンプルについて上位ビット使用の有無を判定する。「上位ビット群使用フラグ」は、「上位ビット群使用表示部」に配置されている。   For each sample block, the upper bit group use determining means 52 checks the n-bit “upper bit group use flag” following the first m bits, reads the value represented by each bit, and thereby reads each sample in the block. Whether or not upper bits are used is determined. The “upper bit group use flag” is arranged in the “upper bit group use display section”.

データ伸長手段53は、サンプル・ブロック毎に、「上位ビット使用フラグ」に続く「データ・ビット格納部」に格納されているPCMデータの本体であるデータ・ビット・ストリームを調べる。そして、各サンプル・ブロック中で「上位ビット群の使用有り」と判定された各サンプルは、(2−i)ビットの下位ビット群のみで表現されているものであり、(2−i)ビットに圧縮されているものであるから、例えば当該サンプルの上位に値「0」を持つビットをi個付加することにより、元の2ビットのサンプルに伸長・再生する。これに対し、各サンプル・ブロック中で「上位ビット群の使用なし」と判定された各サンプルは、iビットの上位ビット群と(2−i)ビットの下位ビット群の双方で表現されており、圧縮されていないから、上位ビット群に続いて下位ビット群をそのまま並べることにより、元の2ビットのサンプルを再生する。こうしてサンプル・ブロック毎に伸長・再生されたサンプルは、再びサンプル・ブロック毎に順に配置され、元のPCMオーディオ・データに変換されて出力される。 The data decompression unit 53 examines the data bit stream that is the main body of the PCM data stored in the “data bit storage unit” following the “upper bit use flag” for each sample block. Each sample determined to be “use of upper bit group” in each sample block is represented by only the lower bit group of (2 m −i) bits, and (2 m −i ) Since it is compressed into bits, for example, by adding i bits having the value “0” to the upper part of the sample, the original 2 m- bit sample is expanded and reproduced. On the other hand, each sample determined as “no use of upper bit group” in each sample block is expressed by both an upper bit group of i bits and a lower bit group of (2 m −i) bits. Since it is not compressed, the original 2 m- bit sample is reproduced by arranging the lower bit group as it is after the upper bit group. The samples expanded and reproduced for each sample block in this way are again arranged in order for each sample block, converted into the original PCM audio data, and output.

(伸長処理装置5の動作)
次に、図2のフローチャートを参照しながら、上記構成を持つ伸長処理装置5の動作(PCMデータ伸長方法)を説明する。
(Operation of the decompression processing device 5)
Next, the operation (PCM data decompression method) of the decompression processing apparatus 5 having the above configuration will be described with reference to the flowchart of FIG.

まず、ステップD1では、データ記録装置またはデータ伝送装置4から送られる図9のデータ構造を持つビット・ストリームを順に入力する。ステップD2では、そのビット・ストリームについて、サンプル・ブロック毎に最初のmビットの「上位ビット群ビット数表示部」を調べて当該mビット・データが表現する値を読みとり、もって当該ブロックの上位ビット数iの設定値を判別する。ステップD1〜D2は、ビット数判別手段51が実行する。   First, in step D1, the bit stream having the data structure shown in FIG. 9 sent from the data recording device or the data transmission device 4 is sequentially input. In step D2, the first m bits of the “upper bit group bit number display section” for each sample block are checked for the bit stream, the value represented by the m bit data is read, and the upper bits of the block are read. The set value of the number i is determined. Steps D1 and D2 are executed by the bit number discrimination means 51.

次のステップD3では、サンプル・ブロック毎に、最初のmビットに続くnビットの「上位ビット使用フラグ」を調べて各ビットが表現する値を読みとり、もって当該ブロック中の各サンプルが上位ビット群を使用しているか否かを判定する。このステップD3は、上位ビット群使用判定手段52が実行する。   In the next step D3, for each sample block, the n-bit “upper bit use flag” following the first m bits is checked to read the value represented by each bit, and thus each sample in the block is assigned to the upper bit group. Whether or not is used. This step D3 is executed by the upper bit group use determining means 52.

次のステップD4では、サンプル・ブロック毎に、「上位ビット使用フラグ」に続く「データ・ビット格納部」に格納されたPCMデータ本体であるデータ・ビット・ストリームを調べる。そして、「上位ビット使用フラグ」の値から「上位ビット群の使用有り」と判定された各サンプルについては、(2−i)ビットに圧縮されているから、例えば当該サンプルの上位に値「0」を持つビットをi個付加することにより、元の2ビットのサンプルに伸長・再生する。「上位ビット使用フラグ」の値から「上位ビット群の使用なし」と判定された各サンプルは、圧縮されていないから、上位ビット群に続いて下位ビット群をそのまま並べることにより、元の2ビットのサンプルを再生する。ステップD4はサンプル・データ伸長手段53が実行する。 In the next step D4, for each sample block, the data bit stream which is the PCM data body stored in the “data bit storage unit” following the “upper bit use flag” is examined. Since each sample determined to be “use of upper bit group” from the value of “upper bit use flag” is compressed to (2 m −i) bits, for example, the value “ By adding i bits having “0”, the original 2 mbit sample is expanded and reproduced. Since each sample determined as “no use of upper bit group” from the value of the “upper bit use flag” is not compressed, by arranging the lower bit group as it is after the upper bit group, the original 2 m Play a bit sample. Step D4 is executed by the sample data decompression means 53.

次のステップD5では、一つのサンプル・ブロックを形成するn個のサンプル・データが蓄積されたか否かを判定する。判定結果がNoであればステップD4に戻り、判定結果がYesであれば次のステップD6に進む。こうしてステップD4とステップD5を必要回数繰り返して実施することにより、n個のサンプル・データを含むサンプル・ブロックが生成される。ステップD5もサンプル・データ伸長手段53が実行する。   In the next step D5, it is determined whether or not n sample data forming one sample block have been accumulated. If the determination result is No, the process returns to Step D4, and if the determination result is Yes, the process proceeds to the next Step D6. By repeating step D4 and step D5 as many times as necessary, a sample block including n sample data is generated. Step D5 is also executed by the sample data decompression means 53.

ステップD6では、こうして伸長・再生されたPCMデータのサンプル・ブロックが出力されるが、その時にこれらのサンプル・ブロックは所定の順に配置され、元のPCMオーディオ・データに変換される。ステップD6もサンプル・データ伸長手段53が実行する。   In step D6, sample blocks of PCM data thus expanded / reproduced are output. At that time, these sample blocks are arranged in a predetermined order and converted to original PCM audio data. Step D6 is also executed by the sample data decompression means 53.

以上詳細に述べたように、本発明の一実施形態に係るPCMデータ圧縮装置(圧縮処理装置)3では、元データを量子化ビット数2(mは正の整数)でPCM方式により符号化して得られたPCMオーディオ・データを、n個(nは2以上の正の整数)のサンプル毎に区切ってn個のサンプルからなるサンプル・ブロックを生成する。そして、前記サンプル・ブロック中の各サンプルについて、ビット数2のビット群を、ビット数iの上位ビット群(第1ビット群)とビット数(2−i)の下位ビット群(第2ビット群)とに分割する。上位ビット群のビット数iの値は、前記サンプル・ブロックの全データ量(総必要ビット数)が最小となるように設定する。その後、設定された前記ビット数iの値を用いて前記第2ビット群だけで表現できる前記サンプルについて、前記第2ビット群だけで表現されるように変換する。このように、前記サンプル・ブロックに含まれるサンプル毎に、当該サンプル・ブロックの全データ量(必要総ビット数)が最小となるように設定された前記ビット数iを用いて、ビット数(2−i)の前記第2ビット群だけで表現できる前記サンプルについて前記第2ビット群だけで表現されるように変換するので、各サンプル・ブロック内においてデータ圧縮効率が向上し、当該PCMデータ全体の圧縮率を上昇できる、すなわち、従来のPCMブロック化圧縮・伸長方式によった場合よりもデータ量を小さく圧縮できる。 As described above in detail, in the PCM data compression apparatus (compression processing apparatus) 3 according to an embodiment of the present invention, the original data is encoded by the PCM method with the quantization bit number 2 m (m is a positive integer). The PCM audio data obtained in this way is divided into n samples (n is a positive integer equal to or greater than 2) to generate a sample block consisting of n samples. Then, for each sample in the sample block, a bit group having a bit number of 2 m is converted into an upper bit group having a bit number i (first bit group) and a lower bit group having a bit number (2 m -i) (second bit group). Bit group). The value of the number of bits i of the upper bit group is set so that the total data amount (total number of required bits) of the sample block is minimized. Thereafter, the sample that can be expressed only by the second bit group using the set value of the number of bits i is converted to be expressed only by the second bit group. In this way, for each sample included in the sample block, the number of bits (2) using the bit number i set so that the total data amount (required total number of bits) of the sample block is minimized. Since the sample that can be expressed only by the second bit group of ( m− i) is converted so as to be expressed by only the second bit group, the data compression efficiency is improved in each sample block, and the entire PCM data The compression rate can be increased, that is, the data amount can be compressed smaller than in the conventional PCM block compression / decompression method.

また、圧縮した前記PCMオーディオ・データを伸長する際には、前記サンプル・ブロックについて上位ビット群のビット数iの設定値を判別すると共に、当該サンプル・ブロック中の前記サンプルの各々について上位ビット群の使用の有無を判別することにより、上位ビット群を使用した前記サンプルの各々を量子化ビット数2により表現したものに再生できる。圧縮の際に情報の損失はないので、可逆性は保持される。よって、良好な音質を保ちながらデータ量を小さくすることができる。 When decompressing the compressed PCM audio data, the set value of the number of bits i of the upper bit group for the sample block is determined, and the upper bit group for each of the samples in the sample block By discriminating the presence / absence of use, each of the samples using the higher-order bit group can be reproduced to be expressed by a quantization bit number of 2 m . There is no loss of information during compression, so reversibility is maintained. Therefore, the data amount can be reduced while maintaining good sound quality.

さらに、本発明の一実施形態に係るPCMデータ圧縮装置3では、前記サンプル・ブロックに含まれるサンプル毎に、当該サンプル・ブロックの全データ量(必要総ビット数)が最小となるように前記ビット数iの値を決定するので、各サンプル・ブロックの量子化ビット数が、当該サンプル・ブロック内のサンプル・データの最大値を表現するために必要な量子化ビット数で一意に決まる従来のPCMブロック化圧縮・伸長方式によった場合よりも、サンプル・ブロック長に対する圧縮率(圧縮性能)の依存性が小さくなり、圧縮処理に最適なブロック長の設定が容易となる。   Furthermore, in the PCM data compression apparatus 3 according to an embodiment of the present invention, for each sample included in the sample block, the bit is set so that the total data amount (required total number of bits) of the sample block is minimized. Since the value of the number i is determined, the conventional PCM in which the number of quantization bits of each sample block is uniquely determined by the number of quantization bits necessary to represent the maximum value of the sample data in the sample block The dependence of the compression rate (compression performance) on the sample block length becomes smaller than in the case of using the block compression / decompression method, and it becomes easy to set the optimum block length for the compression processing.

また、PCMデータ伸長装置5では、サンプル・ブロック毎に図9のデータ構造を持つビット群からなるビット・ストリームについて、サンプル・ブロック毎に最初のmビットを調べて当該mビット・データが表現する値を読みとり、もって当該ブロック用の上位ビット群のビット数iの設定値を判別する。そして、最初のmビットに続くnビットを調べて各ビットが表現する値を読み取ることにより、当該ブロック中の各サンプルについて上位ビット群使用の有無を判定する。そして、それらnビットに続くビット・ストリームを調べることによって圧縮されたサンプルを2ビットに伸長して再生する。「上位ビット群使用なし」と判定されたサンプルは、圧縮されていないから、上位ビット群に続いて下位ビット群をそのまま並べることにより、元の2ビットのサンプルを再生する。このため、PCMデータ圧縮装置3で圧縮されたPCMオーディオ・データを、良好な音質を保ちながら伸長・再生することができる。 Further, in the PCM data decompression device 5, with respect to a bit stream composed of a bit group having the data structure of FIG. 9 for each sample block, the first m bits are examined for each sample block and the m-bit data is expressed. The value is read to determine the set value of the number of bits i of the upper bit group for the block. Then, by checking n bits following the first m bits and reading a value represented by each bit, it is determined whether or not the upper bit group is used for each sample in the block. The compressed sample is then decompressed to 2 m bits and reproduced by examining the bit stream following those n bits. Since the sample determined as “no use of upper bit group” is not compressed, the original 2 mbit sample is reproduced by arranging the lower bit group as it is after the upper bit group. Therefore, the PCM audio data compressed by the PCM data compression device 3 can be expanded / reproduced while maintaining good sound quality.

(具体例)
次に、本発明の理解をいっそう容易にするため、上述した実施形態においてm=4、n=44100とした具体例について説明する。
(Concrete example)
Next, in order to make the understanding of the present invention easier, a specific example in which m = 4 and n = 44100 in the above-described embodiment will be described.

デジタル変調器2が、アナログ音響入力装置1より送られるアナログ・オーディオ・データに対して、一般的なデジタル音楽データ・フォーマットである、サンプリング周波数44.1kHz、量子化ビット数(量子化精度)16(=2)ビットでデジタル変調(PCM符号化)されたPCMオーディオ・データを生成・出力する場合について説明する。 The digital modulator 2 is a general digital music data format for analog audio data sent from the analog sound input device 1, and has a sampling frequency of 44.1 kHz and a quantization bit number (quantization accuracy) of 16. A case will be described in which PCM audio data digitally modulated (PCM encoded) with (= 2 4 ) bits is generated and output.

この場合、圧縮処理装置(PCMデータ圧縮装置)3は、1秒当たり705600ビット(44100サンプル×16ビット)で入力されるデジタル音響データについて、441個のサンプルを1個のサンプル・ブロック(10ミリ秒分のサンプル数に相当)として取り扱う(図10参照)。各サンプル・ブロック内の各サンプルの16ビット・データを、ビット数iの上位ビット群と、ビット数(16−i)の下位ビット群に分割し、(16−i)ビットで表現可能なサンプルについて圧縮処理を行う(図11)。上位ビット数iの値は、0〜15の範囲で、各サンプル・ブロック毎に当該ブロック内の全サンプルのデータ量(ビット数)の総和が最小になるように設定する。   In this case, the compression processing device (PCM data compression device) 3 converts 441 samples into one sample block (10 mm) for digital audio data input at 705600 bits (44100 samples × 16 bits) per second. (Corresponding to the number of samples per second) (see FIG. 10). The 16-bit data of each sample in each sample block is divided into an upper bit group having a bit number i and a lower bit group having a bit number (16-i), and can be expressed by (16-i) bits. A compression process is performed for (FIG. 11). The value of the upper bit number i is set in the range of 0 to 15 so that the sum of the data amount (bit number) of all the samples in the block is minimized for each sample block.

図1のステップE2では、一つのサンプル・ブロックを形成する441個のサンプルが蓄積されたか否かを判定する。判定結果がNoであればステップE1に戻り、判定結果がYesであればステップE3に進む。こうしてステップE1とステップE2を必要回数繰り返して実施することにより、441個のサンプル・データを含むサンプル・ブロックが生成される。ステップE4では、ループ・カウンタiの値が(2−1)=16−1=15を越えたか否かを判定する。そして、ループ・カウンタiの値が15を越えたと判定されるまで同じ動作を繰り返す。 In step E2 of FIG. 1, it is determined whether or not 441 samples forming one sample block have been accumulated. If a determination result is No, it will return to step E1, and if a determination result is Yes, it will progress to step E3. In this way, by repeating Step E1 and Step E2 as many times as necessary, a sample block including 441 sample data is generated. In step E4, it is determined whether or not the value of the loop counter i exceeds (2 4 -1) = 16-1 = 15. The same operation is repeated until it is determined that the value of the loop counter i exceeds 15.

ステップE4での判定結果がYes、すなわちループ・カウンタiの値が15を越えたと判定されると、ステップE7で当該ブロックに使用するiの値を決定する。このiの値は、当該サンプル・ブロックの上位ビット群のビット数iであり、0〜15の範囲のいずれかの値をとる(図12を参照)。   If the determination result in step E4 is Yes, that is, if it is determined that the value of the loop counter i exceeds 15, the value of i to be used for the block is determined in step E7. The value of i is the number of bits i of the upper bit group of the sample block, and takes any value in the range of 0 to 15 (see FIG. 12).

16ビットで量子化されたサンプルは、−32768〜+32767の値をとることができる。例えばi=5の場合、上位ビット群のビット数は5ビット、下位ビット群のビット数は11ビットとなるから、下位ビット群は−1024〜+1023の値をとることができる。したがって、あるサンプルの値(振幅)が−1024〜+1023の範囲内にあれば、そのサンプルは11ビットすなわち下位ビットのみで表現できる。すなわち、データ圧縮できることになる。サンプルの値が−1024〜+1023の範囲を越えているときは、そのまま16ビットで表現する(図11を参照)。これらの処理は1ブロック(441サンプル)単位で行う。   Samples quantized with 16 bits can take values from -32768 to +32767. For example, when i = 5, the number of bits of the upper bit group is 5 bits, and the number of bits of the lower bit group is 11 bits. Therefore, the lower bit group can take values from −1024 to +1023. Therefore, if the value (amplitude) of a sample is within the range of -1024 to +1023, the sample can be expressed by 11 bits, that is, only the lower bits. That is, data can be compressed. When the sample value exceeds the range of -1024 to +1023, it is expressed as it is in 16 bits (see FIG. 11). These processes are performed in units of one block (441 samples).

例えば、あるサンプル・ブロックにおいて、全441サンプルのうちの200サンプルが−1024〜+1023の範囲内に収まり、残りの241サンプルがその範囲外であるとすると、当該ブロック中の全サンプルを表現するのに必要な総ビット数は、
200サンプル×11ビット+241サンプル×16ビット=4851ビットである。
For example, in a sample block, if 200 samples out of all 441 samples fall within the range of -1024 to +1023, and the remaining 241 samples are outside the range, all samples in the block are represented. The total number of bits required for
200 samples × 11 bits + 241 samples × 16 bits = 4851 bits.

ステップE4〜E6では、これと同様の計算をiの値をi=0からi=15まで1ずつ変えながら16回行い、i=0〜15のそれぞれについて当該ブロックに必要な総ビット数を計算する。そして、それら総ビット数の中で値が最小となる時のiの値を採用し、当該ブロックの上位ビット群のビット数に設定する(ステップE7)。   In steps E4 to E6, the same calculation is performed 16 times while changing the value of i by 1 from i = 0 to i = 15, and the total number of bits necessary for the block is calculated for each of i = 0 to 15 To do. Then, the value of i at which the value is the smallest among the total number of bits is adopted and set to the number of bits of the upper bit group of the block (step E7).

ステップE8〜E9では、決定されたビット数iの値を用いて、図13に示すデータ構造を持つ当該ブロックのビット・ストリームを生成して出力する。このビット・ストリームは、図13に示すように、三つの領域から構成される。   In steps E8 to E9, a bit stream of the block having the data structure shown in FIG. 13 is generated and output using the determined value of the number of bits i. As shown in FIG. 13, this bit stream is composed of three areas.

すなわち、最初の4ビットは、上位ビット群のビット数iの設定値(0〜15)を示す「上位ビット群ビット数表示部」である。続く441ビットは、「上位ビット使用フラグ(上位ビット群使用表示部)」で、上位ビットを使用しているか否かを示す。換言すれば、各サンプルの値が(16−i)ビットで表現できる範囲内にあるか否かを示す(1サンプル毎に1ビットが使用される)。残りの部分が圧縮されたオーディオ・データの本体であり、第1サンプルから第441サンプルまでが順に左(先頭に近い側)から詰めて格納されている。例えばi=5の場合に、上位ビット群使用フラグのビット群が、1,0,1,0,0,1・・・・と続いているならば、オーディオ・データ(本体)は上位ビット群使用フラグの端に隣接して左端から右側に向かって16ビット、11ビット、16ビット、11ビット、11ビット、16ビット・・・・・と順に詰めて格納されるのである。なお、これは、上位ビット使用フラグの値が「1」の場合に「上位ビット使用」、「0」の場合に「上位ビット使用せず」と定義した場合であるが、これとは逆に、上位ビット使用フラグの値が「0」の場合に「上位ビット使用」、「1」の場合に「上位ビット使用せず」と定義した場合も、同様にしてデータ格納が可能である。   That is, the first 4 bits are an “upper bit group bit number display portion” indicating a set value (0 to 15) of the bit number i of the upper bit group. The subsequent 441 bits indicate whether or not the upper bits are used in the “upper bit use flag (upper bit group use display section)”. In other words, it indicates whether or not the value of each sample is within a range that can be expressed by (16-i) bits (one bit is used for each sample). The remaining part is the main body of the compressed audio data, and the first sample to the 441th sample are sequentially packed from the left (side closer to the head) and stored. For example, when i = 5, if the bit group of the upper bit group use flag continues as 1, 0, 1, 0, 0, 1,..., The audio data (main body) is the upper bit group. Adjacent to the end of the use flag, 16 bits, 11 bits, 16 bits, 11 bits, 11 bits, 16 bits,... Note that this is a case where “higher bit use” is defined when the value of the upper bit use flag is “1”, and “no higher bit use” is defined when “0”. Similarly, data can be stored even when “upper bit use” is defined when the value of the upper bit use flag is “0” and “no upper bit use” is defined when “1”.

伸長処理装置(PCMデータ伸長装置)5は、ステップD1では、データ記録装置またはデータ伝送装置4から送られる図13のデータ構造を持つビット・ストリームを順に入力する。ステップD2では、そのビット・ストリームについて、サンプル・ブロック毎に最初の4ビットを調べてそれが表現する値を読みとり、もって当該ブロックの上位ビット数iの設定値を判別する。次のステップD3では、最初の4ビットに続く441ビットの「上位ビット群使用フラグ」を調べて各ビットが表現する値を読みとり、もって当該ブロック中の各サンプルについて上位ビット群使用の有無を判定する。   In step D1, the decompression processing device (PCM data decompression device) 5 sequentially inputs a bit stream having the data structure of FIG. 13 sent from the data recording device or the data transmission device 4. In step D2, for the bit stream, the first 4 bits are examined for each sample block, and the value represented by it is read to determine the set value of the number of upper bits i of the block. In the next step D3, the “higher bit group use flag” of 441 bits following the first four bits is examined to read the value represented by each bit, and thereby whether or not the upper bit group is used for each sample in the block is determined. To do.

次のステップD4では、「上位ビット群使用フラグ」に続くPCMデータ本体であるデータ・ビット・ストリームを調べ、そして、各サンプルの上位ビット群使用の有無に応じて(16−i)ビット(i=1〜15)に圧縮された各サンプル・データを元の16ビットに伸長する。そして、次のステップD5において、一つのサンプル・ブロックを形成する441個のサンプル・データが蓄積されたか否かを判定する。判定結果がNoであればステップD4に戻り、判定結果がYesであれば次のステップD6に進む。こうしてステップD4とステップD5を必要回数繰り返して実施することにより、441個のサンプルを含むサンプル・ブロックが生成される。ステップD6では、こうして生成されPCMオーディオ・データのサンプルがサンプル・ブロックの形で出力される。   In the next step D4, the data bit stream which is the PCM data body following the “upper bit group use flag” is checked, and (16-i) bits (i = 1 to 15), each sample data compressed to 16 bits is decompressed. Then, in the next step D5, it is determined whether or not 441 sample data forming one sample block have been accumulated. If the determination result is No, the process returns to Step D4, and if the determination result is Yes, the process proceeds to the next Step D6. By repeating step D4 and step D5 as many times as necessary, a sample block containing 441 samples is generated. In step D6, the PCM audio data samples thus generated are output in the form of sample blocks.

(変形例)
上述した実施形態は本発明を具体化した例を示すものであり、したがって本発明はこの実施形態に限定されるものではなく、本発明の趣旨を外れることなく種々の変形が可能であることは言うまでもない。例えば、上記実施形態では、一般的なデジタル音楽データ・フォーマットである、標本周波数44.1kHz、量子化ビット数16ビットでデジタル変調(PCM符号化)されたPCMオーディオ・データについて具体例を挙げているが、本発明によれば圧縮・伸長の処理に可逆性が保証されるため、どのようなデータにも適用が可能である。例えば、差分PCMデータ、適応差分PCMデータのような、ゼロクロスを含む交流成分を有するデータや総体的に振幅値の小さいデータに適用することにより、いっそう高い圧縮効率を得ることが可能である。
(Modification)
The embodiment described above shows an example in which the present invention is embodied. Therefore, the present invention is not limited to this embodiment, and various modifications can be made without departing from the spirit of the present invention. Needless to say. For example, in the above-described embodiment, a specific example is given of PCM audio data digitally modulated (PCM encoded) with a sampling frequency of 44.1 kHz and a quantization bit number of 16 bits, which is a general digital music data format. However, according to the present invention, reversibility is ensured in the compression / decompression process, and therefore it can be applied to any data. For example, it is possible to obtain higher compression efficiency by applying to data having an AC component including zero cross, such as differential PCM data and adaptive differential PCM data, or data having a small overall amplitude value.

また、上述した実施形態ではオーディオ・データの圧縮・伸長について述べているが、本発明はこれに限定されず、元データを量子化ビット数2でPCM方式で符号化して得られるPCMデータであれば、オーディオ・データ以外の任意のデータにも本発明を適用することができる。 In the above-described embodiment, audio data compression / decompression is described. However, the present invention is not limited to this, and PCM data obtained by encoding original data with a quantization bit number of 2 m by the PCM method. If so, the present invention can be applied to arbitrary data other than audio data.

本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ伸長処理装置(伸張処理装置)の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the PCM data expansion | extension processing apparatus (expansion processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ伸長処理装置(伸張処理装置)の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the PCM data expansion | extension processing apparatus (decompression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置とPCMデータ伸長処理装置が組み込まれたオーディオ・データ処理システムの構成を示す機能ブロック図である。1 is a functional block diagram showing a configuration of an audio data processing system in which a PCM data compression processing device and a PCM data decompression processing device according to an embodiment of the present invention are incorporated. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)におけるPCMデータのサンプルのブロック化を一般的に示す概念図である。It is a conceptual diagram which shows generally the block formation of the sample of PCM data in the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)におけるPCMデータのサンプルを二分割する方法を一般的に示す概念図である。It is a conceptual diagram which shows generally the method to divide the sample of PCM data into two in the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)におけるPCMデータのサンプルの上位ビット群のビット数iを算出する方法を一般的に示す概念図である。It is a conceptual diagram which shows generally the method of calculating the bit number i of the high-order bit group of the sample of PCM data in the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)で圧縮されたPCMデータのサンプル・ブロックのデータ構造を一般的に示す概念図である。It is a conceptual diagram which shows generally the data structure of the sample block of the PCM data compressed with the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)におけるPCMデータのサンプルのブロック化を具体的に示す概念図である。It is a conceptual diagram which concretely shows block formation of the sample of PCM data in the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)におけるPCMデータのサンプルを二分割する方法を具体的に示す概念図である。It is a conceptual diagram which shows concretely the method to divide the sample of PCM data into two in the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)におけるPCMデータのサンプルの上位ビット群のビット数iを算出する方法を具体的に示す概念図である。It is a conceptual diagram which shows concretely the method to calculate the bit number i of the high-order bit group of the sample of PCM data in the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention. 本発明の一実施形態に係るPCMデータ圧縮処理装置(圧縮処理装置)で圧縮されたPCMデータのサンプル・ブロックのデータ構造を具体的に示す概念図である。It is a conceptual diagram which shows concretely the data structure of the sample block of PCM data compressed with the PCM data compression processing apparatus (compression processing apparatus) which concerns on one Embodiment of this invention.

符号の説明Explanation of symbols

1 アナログ音響入力装置
2 デジタル変調器
3 圧縮処理装置(PCMデータ圧縮装置)
31 サンプル・ブロック生成手段
32 サンプル・ビット群分割手段
33 データ圧縮手段
4 データ記録装置またはデータ伝送装置
5 伸長処理装置(PCMデータ伸長装置)
51 ビット数判別手段
52 上位ビット群使用判定手段
53 データ伸長手段
6 アナログ復調器
7 アナログ音響出力装置
DESCRIPTION OF SYMBOLS 1 Analog sound input device 2 Digital modulator 3 Compression processing apparatus (PCM data compression apparatus)
31 Sample block generation means 32 Sample bit group division means 33 Data compression means 4 Data recording device or data transmission device 5 Decompression processing device (PCM data expansion device)
51 Bit number discriminating means 52 Upper bit group use judging means 53 Data decompressing means 6 Analog demodulator 7 Analog sound output device

Claims (10)

元データを量子化ビット数2(mは正の整数)でPCM方式により符号化して得られたPCMデータを、n個(nは2以上の正の整数)のサンプル毎に区切ってn個のサンプルからなるサンプル・ブロックを生成するステップと、
前記サンプル・ブロック中の各サンプルについて、ビット数2のビット群をビット数i(iは0または(2−1)以下の整数)の第1ビット群とビット数(2−i)の第2ビット群とに分割するステップと、
前記サンプル・ブロック中の全サンプルについて、前記第2ビット群だけでその値を表現できるものと、前記第2ビット群だけではその値を表現できないものとに分割するステップと、
前記第2ビット群だけでその値を表現できる前記サンプルについては、必要ビット数を前記第2ビット群のビット数(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては、必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出するステップと、
前記ビット数iの値を変えながら算出した前記サンプル・ブロックの前記総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定するステップと、
前記サンプル・ブロック中の全サンプルのうち、決定された前記ビット数iの値を用いて前記第2ビット群だけでその値を表現できるものについて、前記第2ビット群だけで表現されるようにビット数変換するステップと
を備えてなることを特徴とするPCMデータ圧縮方法。
N pieces of PCM data obtained by encoding the original data by the PCM method with a quantization bit number of 2 m (m is a positive integer) divided into n samples (n is a positive integer of 2 or more). Generating a sample block of samples of
For each sample in the sample block, a bit group having a bit number of 2 m is a first bit group having a bit number i (i is an integer equal to or less than 0 or (2 m −1)) and a bit number (2 m −i). Dividing into a second bit group of:
Dividing all the samples in the sample block into ones whose values can be expressed only by the second bit group and those whose values cannot be expressed only by the second bit group;
For the sample whose value can be expressed only by the second bit group, the required number of bits is the number of bits of the second bit group (2 m -i), and the value cannot be expressed only by the second bit group. For samples, the required number of bits is 2 m , and the total required number of bits of the sample block is calculated while changing the value of the number of bits i;
Determining the value of the bit number i based on the total required number of bits of the sample block calculated while changing the value of the bit number i so that the total data amount of the sample block is minimized; ,
Of all samples in the sample block, those values that can be expressed only by the second bit group using the determined value of the number of bits i are expressed only by the second bit group. A PCM data compression method comprising: converting the number of bits.
前記第2ビット群だけではその値を表現できない前記サンプルについては、前記第1ビット群と前記第2ビット群の双方を用いて表現する請求項1に記載のPCMデータ圧縮方法。 The PCM data compression method according to claim 1, wherein the sample whose value cannot be expressed only by the second bit group is expressed by using both the first bit group and the second bit group. 前記第2ビット群だけで表現された前記サンプルと、前記第1ビット群と前記第2ビット群の双方で表現された前記サンプルとを用いて、前記サンプル・ブロック用のビット・ストリームを生成するステップをさらに含んでおり、
前記ビット・ストリームは、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えている請求項1または2に記載のPCMデータ圧縮方法。
A bit stream for the sample block is generated using the samples represented only by the second bit group and the samples represented by both the first bit group and the second bit group. Further comprising steps,
The bit stream includes a first bit group bit number display unit indicating a set value of the bit number i, a first bit group use display unit indicating whether or not the first bit group is used for each sample, 3. The PCM data compression method according to claim 1, further comprising a data bit storage unit in which data bits for the sample block are stored.
元データを量子化ビット数2(mは正の整数)でPCM方式により符号化して得られたPCMデータを、n個(nは2以上の正の整数)のサンプル毎に区切ってn個のサンプルからなるサンプル・ブロックを生成する手段と、
前記サンプル・ブロック中の各サンプルについて、ビット数2のビット群をビット数i(iは0または(2−1)以下の整数)の第1ビット群とビット数(2−i)の第2ビット群とに分割する手段と、
前記サンプル・ブロック中の全サンプルについて、前記第2ビット群だけでその値を表現できるものと、前記第2ビット群だけではその値を表現できないものとに分割する手段と、
前記第2ビット群だけでその値を表現できる前記サンプルについては、必要ビット数を前記第2ビット群のビット数(2−i)とし、前記第2ビット群だけではその値を表現できない前記サンプルについては、必要ビット数を2として、前記ビット数iの値を変えながら前記サンプル・ブロックの総必要ビット数を算出する手段と、
前記ビット数iの値を変えながら算出した前記サンプル・ブロックの総必要ビット数に基づいて、前記サンプル・ブロックの全データ量が最小となるように前記ビット数iの値を決定する手段と、
前記サンプル・ブロック中の全サンプルのうち、決定された前記ビット数iの値を用いて前記第2ビット群だけでその値を表現できるものについて、前記第2ビット群だけで表現されるようにビット数変換する手段と
を備えてなることを特徴とするPCMデータ圧縮装置。
N pieces of PCM data obtained by encoding the original data by the PCM method with a quantization bit number of 2 m (m is a positive integer) divided into n samples (n is a positive integer of 2 or more). Means for generating a sample block consisting of
For each sample in the sample block, a bit group having a bit number of 2 m is a first bit group having a bit number i (i is an integer equal to or less than 0 or (2 m −1)) and a bit number (2 m −i). Means for dividing into a second bit group of
Means for dividing all samples in the sample block into ones whose values can be expressed only by the second bit group and ones whose value cannot be expressed only by the second bit group;
For the sample whose value can be expressed only by the second bit group, the required number of bits is the number of bits of the second bit group (2 m -i), and the value cannot be expressed only by the second bit group. For the sample, a means for calculating the total required number of bits of the sample block while changing the value of the number of bits i, with the required number of bits being 2 m ,
Means for determining the value of the bit number i based on the total necessary number of bits of the sample block calculated while changing the value of the bit number i so that the total data amount of the sample block is minimized;
Of all samples in the sample block, those values that can be expressed only by the second bit group using the determined value of the number of bits i are expressed only by the second bit group. A PCM data compression apparatus comprising means for converting the number of bits.
前記第2ビット群だけでその値を表現できる前記サンプルについて前記第2ビット群だけで表現されるようにビット数変換する前記手段が、前記第2ビット群だけではその値を表現できない前記サンプルについては、前記第1ビット群と前記第2ビット群の双方を用いて表現する請求項4に記載のPCMデータ圧縮装置。 For the sample whose value can be expressed only by the second bit group, the means for converting the number of bits so that the value can be expressed only by the second bit group. The PCM data compression apparatus according to claim 4, wherein the PCM data compression apparatus is expressed using both the first bit group and the second bit group. 前記第2ビット群だけでその値を表現できる前記サンプルについて前記第2ビット群だけで表現されるようにビット数変換する前記手段が、前記第2ビット群だけで表現された前記サンプルと、前記第1ビット群と前記第2ビット群の双方で表現された前記サンプルとを用いて、前記サンプル・ブロック用のビット・ストリームを生成し、
前記ビット・ストリームは、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えている請求項4または5に記載のPCMデータ圧縮装置。
The means for converting the number of bits so that the sample whose value can be expressed only by the second bit group is expressed only by the second bit group, the sample expressed only by the second bit group, Generating a bit stream for the sample block using the samples represented by both the first bit group and the second bit group;
The bit stream includes a first bit group bit number display unit indicating a set value of the bit number i, a first bit group use display unit indicating whether or not the first bit group is used for each sample, 6. The PCM data compression apparatus according to claim 4, further comprising a data bit storage unit in which data bits for the sample block are stored.
請求項1に記載のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長する方法であって、
圧縮された前記PCMデータから、前記サンプル・ブロックについて前記ビット数iの設定値を判別するステップと、
圧縮された前記PCMデータから、前記サンプル・ブロック中の前記サンプルの各々について前記第1ビット群の使用の有無を判定するステップと、
判別した前記ビット数iの設定値と前記第1ビット群の使用の有無の判定結果とを用いて、圧縮された前記PCMデータを伸長するステップと
を備えてなることを特徴とするPCMデータ伸長方法。
A method for decompressing the PCM data compressed by the PCM data compression method according to claim 1, comprising:
Determining a set value of the number of bits i for the sample block from the compressed PCM data;
Determining from the compressed PCM data whether the first bit group is used for each of the samples in the sample block; and
Decompressing the compressed PCM data using the determined set value of the number of bits i and the determination result of whether or not the first bit group is used. PCM data decompression comprising: Method.
圧縮された前記PCMデータが、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えており、
前記第1ビット群ビット数表示部を読みとって前記第1ビット群の前記ビット数iの設定値を判別し、前記第1ビット群使用表示部を読みとって前記第1ビット群の使用の有無を前記サンプル毎に判定する請求項7に記載のPCMデータ伸長方法。
The compressed PCM data includes a first bit group bit number display unit indicating the set value of the bit number i, and a first bit group use display unit indicating whether or not the first bit group is used for each sample. A data bit storage unit in which data bits for the sample block are stored,
The first bit group bit number display section is read to determine the set value of the bit number i of the first bit group, and the first bit group use display section is read to determine whether the first bit group is used. The PCM data decompression method according to claim 7, wherein determination is performed for each sample.
請求項1に記載のPCMデータ圧縮方法によって圧縮された前記PCMデータを伸長する装置であって、
圧縮された前記PCMデータから、前記サンプル・ブロックについて前記ビット数iの設定値を判別するビット数判別手段と、
圧縮された前記PCMデータから、前記サンプル・ブロック中の前記サンプルの各々について前記第1ビット群の使用の有無を判定する第1ビット群使用判定手段と、
判別した前記ビット数iの設定値と前記第1ビット群の使用の有無の判定結果とを用いて、圧縮された前記PCMデータを伸長するデータ伸張手段と
を備えてなることを特徴とするPCMデータ伸長装置。
An apparatus for decompressing the PCM data compressed by the PCM data compression method according to claim 1,
A bit number discriminating means for discriminating a set value of the bit number i for the sample block from the compressed PCM data;
First bit group usage determining means for determining whether or not the first bit group is used for each of the samples in the sample block from the compressed PCM data;
PCM comprising data decompression means for decompressing the compressed PCM data using the determined set value of the number of bits i and the determination result of whether or not the first bit group is used Data decompressor.
圧縮された前記PCMデータが、前記ビット数iの設定値を示す第1ビット群ビット数表示部と、前記第1ビット群の使用の有無を前記サンプル毎に示す第1ビット群使用表示部と、前記サンプル・ブロック用のデータ・ビットが格納されるデータ・ビット格納部とを備えており、
前記ビット数判別手段が、前記第1ビット群ビット数表示部を読みとって前記第1ビット群の前記ビット数iの設定値を判別し、
前記第1ビット群使用判定手段が、前記第1ビット群使用表示部を読みとって前記第1ビット群の使用の有無を前記サンプル毎に判定する請求項9に記載のPCMデータ伸長装置。
The compressed PCM data includes a first bit group bit number display unit indicating the set value of the bit number i, and a first bit group use display unit indicating whether or not the first bit group is used for each sample. A data bit storage unit in which data bits for the sample block are stored,
The bit number determining means reads the first bit group bit number display unit to determine a set value of the bit number i of the first bit group;
10. The PCM data decompression apparatus according to claim 9, wherein the first bit group use determining means reads the first bit group use display section and determines whether or not the first bit group is used for each sample.
JP2003388049A 2003-11-18 2003-11-18 Pcm data compressing/decompressing method and apparatus Pending JP2005151327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003388049A JP2005151327A (en) 2003-11-18 2003-11-18 Pcm data compressing/decompressing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003388049A JP2005151327A (en) 2003-11-18 2003-11-18 Pcm data compressing/decompressing method and apparatus

Publications (1)

Publication Number Publication Date
JP2005151327A true JP2005151327A (en) 2005-06-09

Family

ID=34695247

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003388049A Pending JP2005151327A (en) 2003-11-18 2003-11-18 Pcm data compressing/decompressing method and apparatus

Country Status (1)

Country Link
JP (1) JP2005151327A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009156971A (en) * 2007-12-25 2009-07-16 Nippon Telegr & Teleph Corp <Ntt> Encoding device, decoding device, encoding method, decoding method, encoding program, decoding program and recording medium
JP2014103497A (en) * 2012-11-19 2014-06-05 Nintendo Co Ltd Data compression apparatus, data compression program, data compression system and data compression method
JP2014103496A (en) * 2012-11-19 2014-06-05 Nintendo Co Ltd Data compression apparatus, data compression program, data compression system, data compression method, data expansion apparatus and data compression/expansion system
US9979415B2 (en) 2015-02-16 2018-05-22 Mitsubishi Electric Corporation Data compression apparatus, data decompression apparatus, data compression method, data compression method, and computer readable medium
US10229688B2 (en) 2012-08-01 2019-03-12 Nintendo Co., Ltd. Data compression apparatus, computer-readable storage medium having stored therein data compression program, data compression system, data compression method, data decompression apparatus, data compression/decompression apparatus, and data structure of compressed data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009156971A (en) * 2007-12-25 2009-07-16 Nippon Telegr & Teleph Corp <Ntt> Encoding device, decoding device, encoding method, decoding method, encoding program, decoding program and recording medium
US10229688B2 (en) 2012-08-01 2019-03-12 Nintendo Co., Ltd. Data compression apparatus, computer-readable storage medium having stored therein data compression program, data compression system, data compression method, data decompression apparatus, data compression/decompression apparatus, and data structure of compressed data
JP2014103497A (en) * 2012-11-19 2014-06-05 Nintendo Co Ltd Data compression apparatus, data compression program, data compression system and data compression method
JP2014103496A (en) * 2012-11-19 2014-06-05 Nintendo Co Ltd Data compression apparatus, data compression program, data compression system, data compression method, data expansion apparatus and data compression/expansion system
US9979415B2 (en) 2015-02-16 2018-05-22 Mitsubishi Electric Corporation Data compression apparatus, data decompression apparatus, data compression method, data compression method, and computer readable medium

Similar Documents

Publication Publication Date Title
KR100684051B1 (en) Data Processing of Bitstream Signals
US20020165631A1 (en) Audio signal processing with adaptive noise-shaping modulation
JPWO2010074200A1 (en) Coding apparatus and decoding apparatus for adaptive differential pulse code modulation
JP2005328533A (en) Method and apparatus for encoding/decoding digital signal utilizing linear quantization by blocks
JP2005151327A (en) Pcm data compressing/decompressing method and apparatus
JPH08204577A (en) Method and device for data encoding and those for decoding
WO2020095706A1 (en) Coding device, decoding device, code string data structure, coding method, decoding method, coding program, and decoding program
JPH07199996A (en) Device and method for waveform data encoding, decoding device for waveform data, and encoding and decoding device for waveform data
KR20060051158A (en) Information processing apparatus, information processing method, and program
WO1997016818A1 (en) Method and system for compressing a speech signal using waveform approximation
JP2007142547A (en) Coding method and decoding method, and coder and decoder employing same
JP4508599B2 (en) Data compression method
JP3166218B2 (en) Data compression / expansion apparatus and electronic musical instrument using the same
JP7432386B2 (en) Program, information processing method, and information processing device
JPWO2019021552A1 (en) Encoding device, decoding device, data structure of code string, encoding method, decoding method, encoding program, decoding program
JP5466618B2 (en) Encoding device, decoding device, encoding method, decoding method, and program thereof
EP2244260A1 (en) Data conversion device, program and method
JP4109124B2 (en) Time series signal encoding device
JP2004198559A (en) Encoding method and decoding method for time-series signal
JP3912304B2 (en) Compressed data structure, waveform generation device, and waveform storage device
JP4556866B2 (en) High efficiency encoding program and high efficiency encoding apparatus
KR100776432B1 (en) Apparatus for writing and playing audio and audio coding method in the apparatus
JP2001148632A (en) Encoding device, encoding method and recording medium
WO2020129718A1 (en) Conversion device, encoding device, decoding device, methods of conversion device, encoding device, and decoding device, and program
US20050025251A1 (en) Method of optimizing compression rate in adaptive differential pulse code modulation (ADPCM)