JP2010050697A - Apparatus and method for compressing/decompressing image - Google Patents

Apparatus and method for compressing/decompressing image Download PDF

Info

Publication number
JP2010050697A
JP2010050697A JP2008212708A JP2008212708A JP2010050697A JP 2010050697 A JP2010050697 A JP 2010050697A JP 2008212708 A JP2008212708 A JP 2008212708A JP 2008212708 A JP2008212708 A JP 2008212708A JP 2010050697 A JP2010050697 A JP 2010050697A
Authority
JP
Japan
Prior art keywords
packing
data
encoded data
unit
encoding
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.)
Withdrawn
Application number
JP2008212708A
Other languages
Japanese (ja)
Inventor
Kunihiko Yahagi
萩 邦 彦 矢
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008212708A priority Critical patent/JP2010050697A/en
Publication of JP2010050697A publication Critical patent/JP2010050697A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an apparatus and method for compressing/decompressing an image for improving processing speed of decoding processing. <P>SOLUTION: An encoder 10 is provided with: an encoding part 101 which performs variable length encoding to a symbol value to generate encoded data; a first packing part 102 which packs N prefixes and N suffixes to generate first packing data for one pixel of the generated encoded data; and a second packing part 103 which packs the first packing data generated by the first packing part 102 by unit of prescribed pixels to generate second packing data. A decoder 30 is provided with: an unpacking part 301 which unpacks the second packing data generated by the second packing part 103 to segment the head of the encoded data; a register 302 which stores the encoded data whose head is segmented; and a decoding part 303 which decodes the encoded data stored in the register 302. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像データの圧縮および伸張に用いられる画像圧縮伸張装置および画像圧縮伸張方法に関する。   The present invention relates to an image compression / decompression apparatus and an image compression / decompression method used for compressing and decompressing image data.

符号化データのあるシンボルを可変長符号であるプレフィックスと固定長符号であるサフィックスとを用いて符号化する場合には、符号化装置は、プレフィックスとサフィックスとを交互に並べ、それらをパッキングして、パッキングデータを生成する。このような符号化データを復号化するための復号化装置は、N(Nは自然数)個のシンボルに対応する符号化データを1サイクルで処理するために、以下のような処理を行う。   When encoding a symbol with encoded data using a prefix that is a variable length code and a suffix that is a fixed length code, the encoding device alternately arranges the prefix and the suffix, and packs them. Generate packing data. A decoding apparatus for decoding such encoded data performs the following processing in order to process encoded data corresponding to N (N is a natural number) symbols in one cycle.

前提として、あるサイクルで処理すべき符号化データがMSB(Most Significant Bit)側に詰められてレジスタに格納されているとする。はじめに、復号化装置は、レジスタのMSB側に詰められて格納されているデータを1つ目(N=1)のシンボルに対応する復号化部に入力するとともに、この符号化データから、1つ目のシンボルに対応するプレフィックスの符号長を算出し、その算出結果に1つ目のシンボルに対応するサフィックスの固定長を加算して、1つ目のシンボルの符号長を算出する。次に、復号化装置は、レジスタに格納されている符号化データを1つ目のシンボルの符号長を用いて左シフトした値(以下、「左シフトデータ」という)を2つ目(N=2)のシンボルに対応する復号化部に入力する。このとき、復号化装置は、N個目の左シフトデータをレジスタのMSB側に詰めて格納する。   It is assumed that encoded data to be processed in a certain cycle is packed on the MSB (Most Significant Bit) side and stored in a register. First, the decoding apparatus inputs the data packed and stored on the MSB side of the register to the decoding unit corresponding to the first (N = 1) symbol, and from this encoded data, The code length of the prefix corresponding to the first symbol is calculated, and the fixed length of the suffix corresponding to the first symbol is added to the calculation result to calculate the code length of the first symbol. Next, the decoding apparatus obtains a second value (N = N == left shift data) obtained by shifting the encoded data stored in the register to the left using the code length of the first symbol. Input to the decoding unit corresponding to the symbol of 2). At this time, the decoding apparatus packs and stores the Nth left shift data on the MSB side of the register.

しかしながら、一般的な画像データは、1つの画素が3つのコンポーネントからなる(すなわち、N=3である)ので、各コンポーネントが上記各シンボルに相当すると考えると、1サイクルで3つのシンボルを復号化する必要がある。このとき、復号化装置のクロック周波数が高い場合には、シンボルの符号長の算出およびシフト演算がタイミングのクリティカルパスになるので、復号化処理の処理速度を向上させることができない。
特開平8−116266号公報
However, in general image data, since one pixel is composed of three components (that is, N = 3), assuming that each component corresponds to each symbol, three symbols are decoded in one cycle. There is a need to. At this time, when the clock frequency of the decoding apparatus is high, the calculation of the symbol code length and the shift operation become a critical path of timing, so the processing speed of the decoding process cannot be improved.
JP-A-8-116266

本発明の目的は、復号化処理の処理速度を向上させるための画像圧縮伸張装置および画像圧縮伸張方法を提供することである。   An object of the present invention is to provide an image compression / decompression apparatus and an image compression / decompression method for improving the processing speed of a decoding process.

本発明の第1態様によれば、
画像データのシンボル値を符号化して、符号化データを生成する符号化装置と、前記符号化装置によって生成された符号化データを復号化する復号化装置と、を備える画像圧縮伸張装置であって、
前記符号化装置は、
所定の符号化方式に従って前記シンボル値を可変長符号化して、前記符号化データを生成する符号化部と、
前記符号化部によって生成された符号化データの1画素を構成するN(Nは自然数)個のシンボルに対応するN個のプレフィックスおよびN個のサフィックスを、前記N個のプレフィックスの後に前記N個のサフィックスが配置されるようにパッキングして、第1パッキングデータを生成する第1パッキング部と、
前記第1パッキング部によって生成された第1パッキングデータを所定画素単位でパッキングして、第2パッキングデータを生成する第2パッキング部と、を備え、
前記復号化装置は、
前記第2パッキング部によって生成された第2パッキングデータをアン・パッキングして、次に復号化すべき符号化データの先頭を切り出すアン・パッキング部と、
前記アン・パッキング部によって先頭が切り出された符号化データを格納するレジスタと、
前記レジスタに格納された符号化データを復号化する復号化部を備えることを特徴とする画像圧縮伸張装置が提供される。
According to the first aspect of the present invention,
An image compression / decompression apparatus comprising: an encoding device that encodes symbol values of image data to generate encoded data; and a decoding device that decodes encoded data generated by the encoding device. ,
The encoding device includes:
An encoding unit for variable-length encoding the symbol value according to a predetermined encoding method to generate the encoded data;
N prefixes and N suffixes corresponding to N (N is a natural number) symbols constituting one pixel of the encoded data generated by the encoding unit are set to the N prefixes after the N prefixes. A first packing unit that packs so that the suffix is arranged and generates first packing data;
A second packing unit that packs the first packing data generated by the first packing unit in units of predetermined pixels and generates second packing data;
The decoding device
An unpacking unit that unpacks the second packing data generated by the second packing unit and cuts out the beginning of the encoded data to be decoded;
A register for storing the encoded data cut out by the unpacking unit;
An image compression / decompression apparatus comprising a decoding unit that decodes encoded data stored in the register is provided.

本発明の第2態様によれば、
画像データの圧縮および伸張を行うための画像圧縮伸張方法であって、
所定の符号化方式に従って前記画像データのシンボル値を可変長符号化して、符号化データを生成し、
前記符号化データの1画素を構成するN(Nは自然数)個のシンボルに対応するN個のプレフィックスおよびN個のサフィックスを、前記N個のプレフィックスの後に前記N個のサフィックスが配置されるようにパッキングして、第1パッキングデータを生成し、
前記第1パッキングデータを所定画素単位でパッキングして、第2パッキングデータを生成し、
前記第2パッキングデータをアン・パッキングし、符号化データを生成して、その符号化データをレジスタに格納し、
前記レジスタに格納された符号化データを復号化することを特徴とする画像圧縮伸張方法が提供される。
According to a second aspect of the invention,
An image compression / decompression method for compressing and decompressing image data,
Variable-length encoding the symbol value of the image data according to a predetermined encoding method to generate encoded data;
N prefixes and N suffixes corresponding to N (N is a natural number) symbols constituting one pixel of the encoded data are arranged, and the N suffixes are arranged after the N prefixes. To generate first packing data,
Packing the first packing data in units of predetermined pixels to generate second packing data;
Unpacking the second packing data, generating encoded data, and storing the encoded data in a register;
An image compression / decompression method is provided, wherein the encoded data stored in the register is decoded.

本発明によれば、復号化処理の処理速度を向上させることができる。   According to the present invention, the processing speed of the decoding process can be improved.

以下、本発明の実施例について図面を参照して説明する。なお、以下の実施例は、本発明の実施の一形態であって、本発明の範囲を限定するものではない。   Embodiments of the present invention will be described below with reference to the drawings. The following examples are one embodiment of the present invention and do not limit the scope of the present invention.

はじめに、本発明の実施例1について説明する。本発明の実施例1は、N個のプレフィックスと、N個のプレフィックスの後に配置されるN個のサフィックスと、から構成されるパッキングデータを用いて行われる復号化処理の例である。ここで、本発明の実施例1では、各プレフィックスの符号長は未知であり、各サフィックスの符号長は既知であるとする。   First, Example 1 of the present invention will be described. The first embodiment of the present invention is an example of a decoding process performed using packing data including N prefixes and N suffixes arranged after the N prefixes. Here, in Embodiment 1 of the present invention, it is assumed that the code length of each prefix is unknown and the code length of each suffix is known.

図1は、本発明の実施例1に係る画像圧縮伸張装置1の構成を示すブロック図である。   FIG. 1 is a block diagram illustrating a configuration of an image compression / decompression apparatus 1 according to Embodiment 1 of the present invention.

図1に示すように、本発明の実施例1に係る画像圧縮伸張装置1は、符号化装置10と、メモリサブシステム20と、復号化装置30と、を備えている。   As shown in FIG. 1, the image compression / decompression apparatus 1 according to the first embodiment of the present invention includes an encoding device 10, a memory subsystem 20, and a decoding device 30.

また、図1に示すように、符号化装置10は、符号化部101と、第1パッキング部102と、第2パッキング部103と、を備えている。   As illustrated in FIG. 1, the encoding device 10 includes an encoding unit 101, a first packing unit 102, and a second packing unit 103.

また、図1に示すように、符号化部101は、外部装置(図示せず)から画像データを読み出し(11)、所定の符号化方式に従って画像データのシンボル値を可変長符号化し、各シンボルに対応するプレフィックスおよびサフィックスを第1パッキング部102に送る(12)。たとえば、符号化部101は、DPCM(Differential Pulse Code Modulation)処理などの予測符号化モジュールおよび量子化モジュール、ならびに逆量子化モジュールおよび逆予測符号化モジュールを含んでいる。この場合には、DPCM処理によって算出された複数の画像データの間の差分値がシンボル値となる。   As shown in FIG. 1, the encoding unit 101 reads image data from an external device (not shown) (11), variable-codes the symbol value of the image data according to a predetermined encoding method, The prefix and suffix corresponding to are sent to the first packing unit 102 (12). For example, the encoding unit 101 includes a prediction encoding module and a quantization module such as DPCM (Differential Pulse Code Modulation) processing, and an inverse quantization module and an inverse prediction encoding module. In this case, the difference value between the plurality of image data calculated by the DPCM process becomes the symbol value.

また、図1に示すように、第1パッキング部102は、符号化部101によって生成された符号化データの1画素を構成するN個のシンボルについて、N個のプレフィックスおよびN個のサフィックスを、N個のプレフィックスの後にN個のサフィックスが配置されるようにパッキングし、1画素分の第1パッキングデータ(図2を参照)を生成して、第2パッキング部103に送る(13)。Nは、符号化部101の符号化方式に従って定められる値であって、1画素分のコンポーネントの数を示す値である。たとえば、輝度信号Yと色差信号Cb,Crとの関係が、Y:Cb:Cr=4:4:4の場合にはN=3であり、Y:Cb:Cr=4:2:2の場合にはN=2である。   As shown in FIG. 1, the first packing unit 102 adds N prefixes and N suffixes to N symbols that constitute one pixel of the encoded data generated by the encoding unit 101. Packing is performed so that N suffixes are arranged after N prefixes, first packing data for one pixel (see FIG. 2) is generated, and sent to the second packing unit 103 (13). N is a value determined according to the encoding method of the encoding unit 101 and is a value indicating the number of components for one pixel. For example, when the relationship between the luminance signal Y and the color difference signals Cb and Cr is Y: Cb: Cr = 4: 4: 4, N = 3, and Y: Cb: Cr = 4: 2: 2. N = 2.

図2は、本発明の実施例1に係るN=3のときの第1パッキングデータのデータ構造を示す概略図である。   FIG. 2 is a schematic diagram illustrating a data structure of the first packing data when N = 3 according to the first embodiment of the present invention.

図2に示すように、N=3のときの第1パッキングデータは、i番目乃至i+2番目のシンボルに対応するプレフィックス(Prefix(i),(i+1),(i+2))を含むプレフィックス部と、そのプレフィックス部の後に配置されるi番目乃至i+2番目のシンボルに対応するサフィックス(Suffix(i),(i+1),(i+2))を含むサフィックス部と、から構成されるデータ構造を有する。各プレフィックスは可変長符号であり、各サフィックスは固定長符号である。   As shown in FIG. 2, the first packing data when N = 3 includes a prefix part including prefixes (Prefix (i), (i + 1), (i + 2)) corresponding to the i-th to i + 2th symbols, And a suffix part including suffixes (Suffix (i), (i + 1), (i + 2)) corresponding to the i-th to i + 2th symbols arranged after the prefix part. Each prefix is a variable length code, and each suffix is a fixed length code.

また、図1に示すように、第2パッキング部103は、第1パッキング部102から送られた1画素分の第1パッキングデータを順次受け取り、M(Mは2以上の整数)画素分の第1パッキングデータをパッキングし、第2パッキングデータ(図3を参照)を生成する。そして、第2パッキング部103は、後述するバス201のバス幅分の第2パッキングデータが生成されたときに、それらの第2パッキングデータを後述するバス201に出力する(14)。Mは、第2パッキングデータを構成する画素数を示す値である。   Further, as shown in FIG. 1, the second packing unit 103 sequentially receives the first packing data for one pixel sent from the first packing unit 102, and the first packing data for M (M is an integer of 2 or more) pixels. One packing data is packed to generate second packing data (see FIG. 3). Then, when second packing data corresponding to the bus width of the bus 201 described later is generated, the second packing unit 103 outputs the second packing data to the bus 201 described later (14). M is a value indicating the number of pixels constituting the second packing data.

図3は、本発明の実施例1に係るM=32のときの第2パッキングデータのデータ構造を示す概略図である。   FIG. 3 is a schematic diagram illustrating a data structure of the second packing data when M = 32 according to the first embodiment of the present invention.

図3に示すように、M=32のときの第2パッキングデータは、32画素分の第1パッキングデータから構成されるデータ構造を有する。したがって、N=3の場合には、M=32のときの第2パッキングデータは、96個のプレフィックスおよび96個のサフィックスを含む。   As shown in FIG. 3, the second packing data when M = 32 has a data structure composed of the first packing data for 32 pixels. Therefore, when N = 3, the second packing data when M = 32 includes 96 prefixes and 96 suffixes.

また、図1に示すように、メモリサブシステム20は、バス201と、システムメモリコントローラ202と、システムメモリ203と、DMA(Direct Memory Access)コントローラ(図示せず)と、を備えている。   As shown in FIG. 1, the memory subsystem 20 includes a bus 201, a system memory controller 202, a system memory 203, and a DMA (Direct Memory Access) controller (not shown).

また、図1に示すように、バス201は、第2パッキング部103、システムメモリコントローラ202、および後述するアン・パッキング部301に接続されている。また、バス201は、第2パッキング部103、システムメモリコントローラ202、および後述するアン・パッキング部301との間で所定のバス幅(たとえば、64bitまたは32bit)分のデータを転送する。   As shown in FIG. 1, the bus 201 is connected to the second packing unit 103, the system memory controller 202, and an unpacking unit 301 described later. The bus 201 transfers data for a predetermined bus width (for example, 64 bits or 32 bits) to the second packing unit 103, the system memory controller 202, and an unpacking unit 301 described later.

また、図1に示すように、システムメモリコントローラ202は、システムメモリ203を制御する。また、システムメモリコントローラ202は、第2パッキング部103から出力されたバス幅分の第2パッキングデータをバス201経由で受け取り(21)、その第2パッキングデータをシステムメモリ203に書き込む(22)。また、システムメモリコントローラ202は、システムメモリ203に記憶された第2パッキングデータを読み出し(22)、その第2パッキングデータを後述するアン・パッキング部301にバス201経由で出力する(21,31)。   Further, as shown in FIG. 1, the system memory controller 202 controls the system memory 203. Further, the system memory controller 202 receives the second packing data corresponding to the bus width output from the second packing unit 103 via the bus 201 (21), and writes the second packing data into the system memory 203 (22). The system memory controller 202 reads the second packing data stored in the system memory 203 (22), and outputs the second packing data to the unpacking unit 301 described later via the bus 201 (21, 31). .

また、図1に示すように、システムメモリ203は、システムメモリコントローラ202の制御に基づいて、第2パッキング部103から送られた第2パッキングデータを含む様々なデータを記憶可能である。   As shown in FIG. 1, the system memory 203 can store various data including the second packing data sent from the second packing unit 103 based on the control of the system memory controller 202.

なお、DMAコントローラ(図示せず)は、第2パッキング部103、バス201、システムメモリコントローラ202、およびシステムメモリ203のそれぞれの間でデータの転送を制御する。   A DMA controller (not shown) controls data transfer among the second packing unit 103, the bus 201, the system memory controller 202, and the system memory 203.

また、図1に示すように、復号化装置30は、アン・パッキング部301と、レジスタ302と、復号化部303と、を備えている。   As illustrated in FIG. 1, the decoding device 30 includes an unpacking unit 301, a register 302, and a decoding unit 303.

また、図1に示すように、アン・パッキング部301は、符号化データを格納するデータバッファを備えている。また、アン・パッキング部301は、データバッファに空きがあるときに、バス201からバス幅分の第2パッキングデータを受け取り(31)、その第2パッキングデータをデータバッファに格納する。また、アン・パッキング部301は、レジスタ302に格納された符号化データに含まれるN個のプレフィックスの符号長の合計値およびN個のサフィックスの符号長の合計値に基づいてN個のシンボルの符号長の合計値を算出する。また、アン・パッキング部301は、レジスタ302に格納された符号化データとデータバッファに格納された符号化データとを連接し、レジスタ302に対してN個のシンボルの符号長の合計値でシフト演算を行い、次に復号化すべきN個のシンボルの符号化データの先頭を切り出して、その符号化データをレジスタ302に格納する(32)。また、アン・パッキング部301は、レジスタ302に少なくとも1画素分の符号化データが常に格納されているようにする。また、アン・パッキング部301は、これらの処理を実現するための加算器およびシフト演算器、ならびに符号と符号長の関係を示すテーブルを備えている。   As shown in FIG. 1, the unpacking unit 301 includes a data buffer that stores encoded data. The unpacking unit 301 receives second packing data corresponding to the bus width from the bus 201 when the data buffer is empty (31), and stores the second packing data in the data buffer. In addition, the unpacking unit 301 generates N symbols based on the total code length of N prefixes and the total code length of N suffixes included in the encoded data stored in the register 302. The total code length is calculated. Also, the unpacking unit 301 concatenates the encoded data stored in the register 302 and the encoded data stored in the data buffer, and shifts the register 302 by the total value of the code lengths of N symbols. An operation is performed, and the beginning of the encoded data of N symbols to be decoded next is cut out and the encoded data is stored in the register 302 (32). Further, the unpacking unit 301 ensures that the encoded data for at least one pixel is always stored in the register 302. The unpacking unit 301 includes an adder and a shift calculator for realizing these processes, and a table indicating the relationship between the code and the code length.

また、図1に示すように、レジスタ302は、少なくとも1画素分の符号化データをMSB側に詰めて格納する。   Also, as shown in FIG. 1, the register 302 stores encoded data for at least one pixel packed in the MSB side.

図4は、本発明の実施例1に係る復号化装置30の復号化処理の処理手順を示すフローチャートである。   FIG. 4 is a flowchart showing the processing procedure of the decoding process of the decoding device 30 according to the first embodiment of the present invention.

図4に示すように、はじめに、復号化工程(S401)が行われる。復号化工程(S401)では、復号化部303が、レジスタ302に格納された符号化データをMSB側から読み出し、その符号化データを復号化して、外部装置(図示せず)に出力する。   As shown in FIG. 4, first, a decoding step (S401) is performed. In the decoding step (S401), the decoding unit 303 reads the encoded data stored in the register 302 from the MSB side, decodes the encoded data, and outputs it to an external device (not shown).

次に、図4に示すように、プレフィックス符号長算出工程(S402)が行われる。プレフィックス符号長算出工程(S402)では、アン・パッキング部301が、レジスタ302のMSB側に詰められて格納されているN個のプレフィックスを参照して、N個のプレフィックスの符号長の合計値を算出する。N=3の場合には、プレフィックス符号長算出工程(S402)の算出結果は、Prefix(i)乃至Prefix(i+2)の符号長の合計である。   Next, as shown in FIG. 4, a prefix code length calculation step (S402) is performed. In the prefix code length calculation step (S402), the unpacking unit 301 refers to the N prefixes that are packed and stored on the MSB side of the register 302, and calculates the total code length of the N prefixes. calculate. When N = 3, the calculation result of the prefix code length calculation step (S402) is the sum of the code lengths of Prefix (i) to Prefix (i + 2).

次に、図4に示すように、シンボル符号長算出工程(S403)が行われる。シンボル符号長算出工程(S403)では、アン・パッキング部301が、プレフィックス符号長算出工程(S402)の算出結果に既知のサフィックスの符号長の合計値を加算する。   Next, as shown in FIG. 4, a symbol code length calculation step (S403) is performed. In the symbol code length calculation step (S403), the unpacking unit 301 adds the total value of the code lengths of known suffixes to the calculation result of the prefix code length calculation step (S402).

次に、図4に示すように、シフト演算工程(S404)が行われる。シフト演算工程(S404)では、アン・パッキング部301が、シンボル符号長算出工程(S403)の算出結果に基づいてレジスタ302に格納された符号化データを左シフトするためのシフト演算を行う。このとき、レジスタ302に格納された符号化データが左シフトされた左シフトデータが、次に符号化される符号化データとなる。   Next, as shown in FIG. 4, a shift calculation step (S404) is performed. In the shift calculation step (S404), the unpacking unit 301 performs a shift calculation for left-shifting the encoded data stored in the register 302 based on the calculation result of the symbol code length calculation step (S403). At this time, the left shift data obtained by shifting the encoded data stored in the register 302 to the left becomes the encoded data to be encoded next.

S401乃至S405は、次に復号化される符号化データが存在する限り繰り返される(S405−NO)。   S401 to S405 are repeated as long as there is encoded data to be decoded next (S405-NO).

図4に示すように、本発明の実施例1に係る復号化処理は、次に復号化される符号化データが存在しない場合に終了する(S405−YES)。   As shown in FIG. 4, the decoding process according to the first embodiment of the present invention ends when there is no encoded data to be decoded next (S405-YES).

なお、本発明の実施例1では、符号化部101は、ゴロム・ライス符号方式に従ってシンボル値を符号化して、符号化データを生成しても良い。この場合には、プレフィックスの可変長符号は、Unary符号となる。   In the first embodiment of the present invention, the encoding unit 101 may generate encoded data by encoding a symbol value in accordance with the Golomb-Rice encoding method. In this case, the variable length code of the prefix is an Unary code.

本発明の実施例1によれば、プレフィックス符号長算出工程(図4のS402)の直前では、レジスタ302は、Prefix(i)をMSB側に詰めて格納し、シフト演算工程(図4のS405)の直後では、Prefix(i+N)をMSB側に詰めて格納する。すなわち、従来技術においてクリティカルパスであるシンボル符号長算出工程(S403)およびシフト演算工程(S404)を1回行うだけでN個のシンボルに対応する符号化データの復号化処理を行うことができる。その結果、そのクリティカルパスが復号化処理に与える影響を軽減することができ、ひいては、復号化処理の処理速度を向上させることができる。   According to the first embodiment of the present invention, immediately before the prefix code length calculation step (S402 in FIG. 4), the register 302 stores Prefix (i) packed in the MSB side and stores the shift calculation step (S405 in FIG. 4). Immediately after (), Prefix (i + N) is packed and stored on the MSB side. That is, it is possible to perform decoding processing of encoded data corresponding to N symbols by performing the symbol code length calculation step (S403) and the shift calculation step (S404), which are critical paths, in the conventional technique only once. As a result, it is possible to reduce the influence of the critical path on the decoding process, and as a result, the processing speed of the decoding process can be improved.

次に、本発明の実施例2について説明する。本発明の実施例2は、サフィックスの符号長がシンボル毎に異なるような符号化データに対して行われる復号化処理の例である。なお、本発明の実施例1と同様の内容についての説明は省略する。ここで、本発明の実施例2では、各プレフィックスおよび各サフィックスの符号長は未知であるとする。   Next, a second embodiment of the present invention will be described. The second embodiment of the present invention is an example of a decoding process performed on encoded data in which the suffix code length is different for each symbol. In addition, the description about the content similar to Example 1 of this invention is abbreviate | omitted. Here, in the second embodiment of the present invention, it is assumed that the code length of each prefix and each suffix is unknown.

図1に示すように、本発明の実施例2に係る第2パッキング部103は、M画素分の第1パッキングデータと後述するヘッダをパッキングし、第2パッキングデータ(図5を参照)を生成して、バス201に出力する(14)。   As illustrated in FIG. 1, the second packing unit 103 according to the second embodiment of the present invention packs first packing data for M pixels and a header to be described later, and generates second packing data (see FIG. 5). Then, the data is output to the bus 201 (14).

図5は、本発明の実施例2に係るN=3,M=32のときの第2パッキングデータのデータ構造を示す概略図である。   FIG. 5 is a schematic diagram illustrating a data structure of the second packing data when N = 3 and M = 32 according to the second embodiment of the present invention.

図5に示すように、本発明の実施例2に係る第2パッキングデータは、ヘッダおよび32画素分の第1パッキングデータから構成されるデータ構造を有する。ヘッダには、第1パッキングデータのN個のサフィックス(Suffix(i),(i+1),(i+2))の符号長が含まれている。   As shown in FIG. 5, the second packing data according to the second embodiment of the present invention has a data structure including a header and first packing data for 32 pixels. The header includes the code length of N suffixes (Suffix (i), (i + 1), (i + 2)) of the first packing data.

また、図4に示すように、本発明の実施例2に係る復号化処理では、シンボル符号長算出工程(S403)において、アン・パッキング部301が、レジスタ302に格納された第2パッキングデータのヘッダを参照して、サフィックスの符号長の合計値を算出し、プレフィックス符号長算出工程(S402)の算出結果に算出されたサフィックスの符号長の合計値を加算する。   Also, as shown in FIG. 4, in the decoding process according to the second embodiment of the present invention, in the symbol code length calculation step (S403), the unpacking unit 301 stores the second packing data stored in the register 302. The total code length of the suffix is calculated with reference to the header, and the calculated code length of the suffix is added to the calculation result of the prefix code length calculation step (S402).

本発明の実施例2によれば、第2パッキングデータにN個のサフィックスの符号長を示すデータを含むヘッダが付加されるので、シンボル毎にサフィックスの符号長が異なるような符号化データに対して行われる復号化処理の処理速度を向上させることができる。   According to the second embodiment of the present invention, since a header including data indicating the code length of N suffixes is added to the second packing data, the encoded data having a different code length of the suffix for each symbol. The processing speed of the decryption process performed in this way can be improved.

本発明の実施例1に係る画像圧縮伸張装置1の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image compression / decompression device 1 according to Embodiment 1 of the present invention. 本発明の実施例1に係るN=3のときの第1パッキングデータのデータ構造を示す概略図である。It is the schematic which shows the data structure of the 1st packing data at the time of N = 3 concerning Example 1 of this invention. 本発明の実施例1に係るM=32のときの第2パッキングデータのデータ構造を示す概略図である。It is the schematic which shows the data structure of the 2nd packing data in case M = 32 which concerns on Example 1 of this invention. 本発明の実施例1に係る復号化装置30の復号化処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the decoding process of the decoding apparatus 30 which concerns on Example 1 of this invention. 本発明の実施例2に係るN=3,M=32のときの第2パッキングデータのデータ構造を示す概略図である。It is the schematic which shows the data structure of the 2nd packing data in case of N = 3 and M = 32 based on Example 2 of this invention.

符号の説明Explanation of symbols

1 画像圧縮伸張装置
10 符号化装置
101 符号化部
102 第1パッキング部
103 第2パッキング部
20 メモリサブシステム
201 バス
202 システムメモリコントローラ
203 システムメモリ
30 復号化装置
301 アン・パッキング部
302 レジスタ
303 復号化部
DESCRIPTION OF SYMBOLS 1 Image compression / decompression apparatus 10 Encoding apparatus 101 Encoding part 102 1st packing part 103 2nd packing part 20 Memory subsystem 201 Bus 202 System memory controller 203 System memory 30 Decoding apparatus 301 Unpacking part 302 Register 303 Decoding Part

Claims (5)

画像データのシンボル値を符号化して、符号化データを生成する符号化装置と、前記符号化装置によって生成された符号化データを復号化する復号化装置と、を備える画像圧縮伸張装置であって、
前記符号化装置は、
所定の符号化方式に従って前記シンボル値を可変長符号化して、前記符号化データを生成する符号化部と、
前記符号化部によって生成された符号化データの1画素を構成するN(Nは自然数)個のシンボルに対応するN個のプレフィックスおよびN個のサフィックスを、前記N個のプレフィックスの後に前記N個のサフィックスが配置されるようにパッキングして、第1パッキングデータを生成する第1パッキング部と、
前記第1パッキング部によって生成された第1パッキングデータを所定画素単位でパッキングして、第2パッキングデータを生成する第2パッキング部と、を備え、
前記復号化装置は、
前記第2パッキング部によって生成された第2パッキングデータをアン・パッキングして、次に復号化すべき符号化データの先頭を切り出すアン・パッキング部と、
前記アン・パッキング部によって先頭が切り出された符号化データを格納するレジスタと、
前記レジスタに格納された符号化データを復号化する復号化部を備えることを特徴とする画像圧縮伸張装置。
An image compression / decompression apparatus comprising: an encoding device that encodes symbol values of image data to generate encoded data; and a decoding device that decodes encoded data generated by the encoding device. ,
The encoding device includes:
An encoding unit for variable-length encoding the symbol value according to a predetermined encoding method to generate the encoded data;
N prefixes and N suffixes corresponding to N (N is a natural number) symbols constituting one pixel of the encoded data generated by the encoding unit are set to the N prefixes after the N prefixes. A first packing unit that packs so that the suffix is arranged and generates first packing data;
A second packing unit that packs the first packing data generated by the first packing unit in units of predetermined pixels and generates second packing data;
The decoding device
An unpacking unit that unpacks the second packing data generated by the second packing unit and cuts out the beginning of the encoded data to be decoded;
A register for storing the encoded data cut out by the unpacking unit;
An image compression / decompression apparatus comprising: a decoding unit that decodes encoded data stored in the register.
前記アン・パッキング部は、前記N個のプレフィックスの符号長の合計値および前記N個のサフィックスの符号長の合計値に基づいて前記N個のシンボルの符号長の合計値を算出し、その算出結果に基づいて前記レジスタに対するシフト演算を行う請求項1に記載の画像圧縮伸張装置。   The unpacking unit calculates a total value of code lengths of the N symbols based on a total value of code lengths of the N prefixes and a total value of code lengths of the N suffixes. The image compression / decompression apparatus according to claim 1, wherein a shift operation is performed on the register based on a result. 前記第2パッキング部は、前記N個のサフィックスの符号長をヘッダとして付加して、前記第2パッキングデータを生成する請求項1に記載の画像圧縮伸張装置。   The image compression / decompression device according to claim 1, wherein the second packing unit adds the code length of the N suffixes as a header to generate the second packing data. 画像データの圧縮および伸張を行うための画像圧縮伸張方法であって、
所定の符号化方式に従って前記画像データのシンボル値を可変長符号化して、符号化データを生成し、
前記符号化データの1画素を構成するN(Nは自然数)個のシンボルに対応するN個のプレフィックスおよびN個のサフィックスを、前記N個のプレフィックスの後に前記N個のサフィックスが配置されるようにパッキングして、第1パッキングデータを生成し、
前記第1パッキングデータを所定画素単位でパッキングして、第2パッキングデータを生成し、
前記第2パッキングデータをアン・パッキングし、次に復号化すべき符号化データの先頭を切り出して、その符号化データをレジスタに格納し、
前記レジスタに格納された符号化データを復号化することを特徴とする画像圧縮伸張方法。
An image compression / decompression method for compressing and decompressing image data,
Variable-length encoding the symbol value of the image data according to a predetermined encoding method to generate encoded data;
N prefixes and N suffixes corresponding to N (N is a natural number) symbols constituting one pixel of the encoded data are arranged, and the N suffixes are arranged after the N prefixes. To generate first packing data,
Packing the first packing data in units of predetermined pixels to generate second packing data;
Unpacking the second packing data, cutting out the beginning of the encoded data to be decoded, and storing the encoded data in a register;
An image compression / decompression method, wherein the encoded data stored in the register is decoded.
前記N個のプレフィックスの符号長の合計値および前記N個のサフィックスの符号長の合計値に基づいて前記N個のシンボルの符号長の合計値を算出し、その算出結果に基づいて前記レジスタに対するシフト演算を行う請求項4に記載の画像圧縮伸張方法。   A total value of the code lengths of the N symbols is calculated based on a total value of the code lengths of the N prefixes and a total value of the code lengths of the N suffixes. 5. The image compression / decompression method according to claim 4, wherein a shift operation is performed.
JP2008212708A 2008-08-21 2008-08-21 Apparatus and method for compressing/decompressing image Withdrawn JP2010050697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008212708A JP2010050697A (en) 2008-08-21 2008-08-21 Apparatus and method for compressing/decompressing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008212708A JP2010050697A (en) 2008-08-21 2008-08-21 Apparatus and method for compressing/decompressing image

Publications (1)

Publication Number Publication Date
JP2010050697A true JP2010050697A (en) 2010-03-04

Family

ID=42067430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008212708A Withdrawn JP2010050697A (en) 2008-08-21 2008-08-21 Apparatus and method for compressing/decompressing image

Country Status (1)

Country Link
JP (1) JP2010050697A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011111696A1 (en) 2010-03-08 2011-09-15 旭化成ケミカルズ株式会社 Foam composition, method for producing same, and foam
US8941515B1 (en) 2013-09-17 2015-01-27 Kabushiki Kaisha Toshiba Encoder, decoder and data processing system
JP2016226026A (en) * 2011-06-24 2016-12-28 サン パテント トラスト Decoding method and decoding device
JP2016226027A (en) * 2011-07-18 2016-12-28 サン パテント トラスト Decoding method and decoding device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011111696A1 (en) 2010-03-08 2011-09-15 旭化成ケミカルズ株式会社 Foam composition, method for producing same, and foam
JP2016226026A (en) * 2011-06-24 2016-12-28 サン パテント トラスト Decoding method and decoding device
JP2016226027A (en) * 2011-07-18 2016-12-28 サン パテント トラスト Decoding method and decoding device
US8941515B1 (en) 2013-09-17 2015-01-27 Kabushiki Kaisha Toshiba Encoder, decoder and data processing system

Similar Documents

Publication Publication Date Title
KR100975062B1 (en) A Variable Length Coding apparatus and a Variable Length Coding method
CN111263169B (en) Spatial decorrelation and re-correlation method, processing device, data compression and decompression system
US6798833B2 (en) Video frame compression/decompression hardware system
JP4139330B2 (en) Improved variable length decoder
GB2530312A (en) Data compression
JP4468858B2 (en) Data encoding apparatus, data encoding method, and program
JP6681383B2 (en) Encoder, decoder and method
JP6045123B2 (en) Encoder, decoder and method
EP2648411A1 (en) Image encoding device, and image encoding method
JP4907487B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing program for executing the method
JP4098187B2 (en) Variable length code decoding apparatus and method
JP2010050697A (en) Apparatus and method for compressing/decompressing image
RU2611249C1 (en) Entropy modifier and method to use it
JP4769477B2 (en) Encoded data conversion method and encoded data converter
JP2013016897A (en) Variable-length code decoder, code system and variable-length code decoding method
JP5105191B2 (en) Image processing device
JP2008199100A (en) Device for decoding variable length code
JPH01171324A (en) High efficient encoder
JP2010103748A (en) Encoding device, decoding device, image forming device, and program
KR100686354B1 (en) Huffman decoding method and device for using variable length tree
US11824566B2 (en) Data decompression device, data compression device, and memory system
JP2010004272A (en) Image decoder
KR100460758B1 (en) Method for packing and unpacking variable length code
JP4095454B2 (en) Data decoding apparatus and data decoding method
JP2009017232A (en) Arithmetic encoding device and image encoding device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111101