[go: up one dir, main page]

JP6675253B2 - Image decoding apparatus and method, and image processing apparatus - Google Patents

Image decoding apparatus and method, and image processing apparatus Download PDF

Info

Publication number
JP6675253B2
JP6675253B2 JP2016077580A JP2016077580A JP6675253B2 JP 6675253 B2 JP6675253 B2 JP 6675253B2 JP 2016077580 A JP2016077580 A JP 2016077580A JP 2016077580 A JP2016077580 A JP 2016077580A JP 6675253 B2 JP6675253 B2 JP 6675253B2
Authority
JP
Japan
Prior art keywords
data
boundary
decoding
image
pixel
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.)
Active
Application number
JP2016077580A
Other languages
Japanese (ja)
Other versions
JP2017005686A (en
JP2017005686A5 (en
Inventor
孝幸 長島
孝幸 長島
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to US15/169,993 priority Critical patent/US9928452B2/en
Publication of JP2017005686A publication Critical patent/JP2017005686A/en
Publication of JP2017005686A5 publication Critical patent/JP2017005686A5/ja
Application granted granted Critical
Publication of JP6675253B2 publication Critical patent/JP6675253B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、圧縮された画像データの復号処理に関する。   The present invention relates to a process for decoding compressed image data.

データ量が膨大な高解像度の画像データには、より少ないメモリ資源で画像データを記憶したり、より短時間にネットワーク転送するために画像圧縮技術が適用される。一方、画像圧縮技術には、画像品位を損わないことが求められる。特許文献1は、データ量をより小さくし、画像品位をより損わない画像圧縮技術として、画像を一つ以上の画素からなる一つ以上の領域に分割して、領域ごとにデータ圧縮方式を切り換える技術を開示する。   An image compression technique is applied to high-resolution image data having an enormous data amount in order to store the image data with less memory resources or to transfer the image data to a network in a shorter time. On the other hand, image compression technology is required not to impair image quality. Patent Literature 1 discloses an image compression technique for reducing an amount of data and reducing image quality by dividing an image into one or more regions each including one or more pixels. A technique for switching is disclosed.

画像を一つ以上の領域に分割し、データ圧縮方式を切り替える技術として、画像データを、領域の境界データ(以下、領域境界データ)と、領域の圧縮データ(以下、領域圧縮データ)に符号化する技術が存在する。領域境界データは、境界の座標を特定する情報と、境界の右側の領域のデータ圧縮方式と領域圧縮データを特定する属性情報を含む。   As a technique for dividing an image into one or more regions and switching a data compression method, image data is encoded into region boundary data (hereinafter, region boundary data) and region compressed data (hereinafter, region compressed data). There are technologies to do this. The region boundary data includes information for specifying the coordinates of the boundary, and data compression method and attribute information for specifying the region compressed data for the region on the right side of the boundary.

上記の技術は、データ圧縮方式として、ロスレス圧縮方式のランレングス符号化と、ロッシー圧縮方式のJPEGを採用する。従って、ロッシー圧縮方式を適用する領域(以下、ロッシー圧縮領域)は、例えば水平、垂直とも八画素からなる最小符号化単位(MCU)の整数倍のサイズでなければならないという制約がある。このため、ロッシー圧縮領域は、ロスレス圧縮方式が適用された領域(以下、ロスレス圧縮領域)と重複する不要な画素を含む。   The above technique employs lossless compression run-length encoding and lossy compression JPEG as data compression schemes. Therefore, there is a restriction that the area to which the lossy compression method is applied (hereinafter, lossy compression area) must be an integral multiple of the minimum coding unit (MCU) composed of eight pixels both horizontally and vertically. For this reason, the lossy compression area includes unnecessary pixels overlapping with the area to which the lossless compression method is applied (hereinafter, lossless compression area).

そのため、ロッシー圧縮領域とロスレス圧縮領域が混在する符号データを復号する装置は、次の二段階のステップを実行する。第一のステップにおいて、ロッシー圧縮領域のデータ(以下、ロッシー圧縮データ)を復号してメモリに書き出す。次の第二のステップにおいて、境界の座標を特定し、ロスレス圧縮領域のデータ(以下、ロスレス圧縮データ)を復号してメモリに書き出すが、その際、第一のステップにおいてロスレス圧縮領域に書き出された画素データに上書きする。   Therefore, an apparatus that decodes code data in which a lossy compression area and a lossless compression area coexist performs the following two steps. In a first step, data in a lossy compression area (hereinafter, lossy compression data) is decoded and written to a memory. In the next second step, the coordinates of the boundary are specified, and the data of the lossless compressed area (hereinafter, lossless compressed data) is decoded and written to the memory. At this time, in the first step, the data is written to the lossless compressed area. Overwrite the pixel data.

このように、ロッシー圧縮データとロスレス圧縮データを有する圧縮画像の伸長結果をメモリに書き出す際、ロッシー圧縮データの伸長結果をロスレス圧縮データの伸長結果で上書きする画素が存在する。その結果、システムバス帯域およびメモリ帯域を余分に消費することになる。   As described above, when writing the decompression result of the compressed image having the lossy compression data and the lossless compression data to the memory, there are pixels that overwrite the decompression result of the lossy compression data with the decompression result of the lossless compression data. As a result, the system bus band and the memory band are consumed extra.

米国特許第5,883,976号明細書U.S. Patent No. 5,883,976

本発明は上記問題に鑑みなされたものである。そして、本願発明は、第1の方式により圧縮された第1の画像データと、第2の方式により圧縮された第2の画像データが混在する場合、第1の画像データの伸長結果に第2の画像データの伸長結果を上書きすることなく、画像データを復号する技術を提供する。   The present invention has been made in view of the above problems. Then, when the first image data compressed by the first method and the second image data compressed by the second method are mixed, the present invention provides the second image in the decompression result of the first image data. A technique for decoding image data without overwriting the decompression result of the image data.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

画像を領域ごとに第1の方式により圧縮された第1のデータと、前記画像における一部領域について、前記第1の方式とは異なる第2の方式により圧縮された第2のデータが混在するデータを復号し、前記画像を出力する画像復号装置であって、
前記第1のデータを復号し、画像を構成する各画素の画素データを出力する第1の復号手段と、
前記第2の方式によって圧縮された圧縮領域を示す境界情報に基づき、前記圧縮領域の前記第2のデータを復号する第2の復号手段と、
前記第2の復号手段から得られる前記画像を構成する各画素の画素データをメモリに書き込む書き込み手段とを有し、
前記第1の復号手段は、前記各画素の画素データを前記第2の復号手段に出力し、
前記第2の復号手段は、
前記境界情報に基づいて処理対象画素が前記圧縮領域かどうかを判定し、
前記圧縮領域を除く画素については前記第1の復号手段から取得した画素データを前記書き込み手段に出力し、前記圧縮領域に含まれる画素については前記第2の復号手段が復号して得られる画素データを前記書き込み手段に出力することを特徴とする。
First data obtained by compressing an image by a first method for each area and second data obtained by compressing a partial area of the image by a second method different from the first method are mixed. An image decoding device that decodes data and outputs the image,
First decoding means for decoding the first data and outputting pixel data of each pixel constituting an image;
Second decoding means for decoding the second data in the compressed area based on boundary information indicating a compressed area compressed by the second method;
Writing means for writing pixel data of each pixel constituting the image obtained from the second decoding means to a memory,
The first decoding means outputs pixel data of each pixel to the second decoding means,
The second decryption means includes:
Determine whether the processing target pixel is the compression area based on the boundary information,
Pixel data obtained from the first decoding unit is output to the writing unit for pixels other than the compressed region, and pixel data obtained by decoding by the second decoding unit for pixels included in the compressed region. Is output to the writing means.

本発明によれば、第1の方式により圧縮された第1の画像データと、第2の方式により圧縮された第2の画像データが混在する場合、第1の画像データの伸長結果に第2の画像データの伸長結果を上書きすることなく、画像データを復号することができる。   According to the present invention, when the first image data compressed by the first method and the second image data compressed by the second method are mixed, the second image data is decompressed in the first image data. The image data can be decoded without overwriting the decompression result of the image data.

ソースビットマップデータのメモリイメージを示す図。The figure which shows the memory image of source bitmap data. 16×16画素の矩形領域の一例を示す図。The figure which shows an example of the rectangular area of 16x16 pixels. 矩形領域の境界情報およびロスレス圧縮データのフォーマット例を示す図。FIG. 6 is a diagram showing a format example of boundary information of a rectangular area and lossless compressed data. 矩形領域のロスレス圧縮データを説明する図。FIG. 4 is a diagram for explaining lossless compressed data of a rectangular area. 実施例の画像復号装置の構成例を示すブロック図。FIG. 2 is a block diagram illustrating a configuration example of an image decoding device according to the embodiment. ロスレス復号部の構成例を示すブロック図。FIG. 3 is a block diagram illustrating a configuration example of a lossless decoding unit. ロスレス復号部の復号処理を含む、画素データの出力処理を説明するフローチャート。9 is a flowchart for describing pixel data output processing, including decoding processing of a lossless decoding unit. 後続境界の取得処理を説明するフローチャート。9 is a flowchart illustrating a process of acquiring a subsequent boundary. ラインが未終了の場合の処理領域と継続境界キューの更新処理を説明するフローチャート。9 is a flowchart for describing processing for updating a processing area and a continuation boundary queue when a line is not completed. ラインが終了の場合の処理領域と継続境界キューの更新処理を説明するフローチャート。9 is a flowchart for describing processing for updating a processing area and a continuation boundary queue when a line ends. ロスレス圧縮領域の復号処理を説明するフローチャート。9 is a flowchart for explaining a lossless compression area decoding process. ビットマップデータの一例を示す図。The figure which shows an example of bitmap data. 画像復号装置を含む画像処理装置のシステム構成例を示すブロック図。FIG. 2 is a block diagram illustrating a system configuration example of an image processing device including an image decoding device. ロスレス復号部の各パラメータを説明する図。FIG. 4 is a diagram for explaining each parameter of a lossless decoding unit. 画像復号装置の変形例を示すブロック図。FIG. 13 is a block diagram showing a modification of the image decoding device. 画像復号装置を適用したレンダリングシステムを有する画像処理装置の構成例を示すブロック図。FIG. 2 is a block diagram illustrating a configuration example of an image processing device having a rendering system to which the image decoding device is applied.

以下、本発明にかかる実施例の画像復号装置および画像復号方法を図面を参照して詳細に説明する。なお、実施例は特許請求の範囲にかかる本発明を限定するものではなく、また、実施例において説明する構成の組み合わせのすべてが本発明の解決手段に必須とは限らない。なお、以下では、画素の走査方向が、左から右、かつ、上から下に向かうラスタースキャンであるものとして説明するが、走査方向に制限はない。   Hereinafter, an image decoding apparatus and an image decoding method according to an embodiment of the present invention will be described in detail with reference to the drawings. It should be noted that the embodiments do not limit the present invention according to the claims, and all combinations of the configurations described in the embodiments are not necessarily essential to the solution of the present invention. In the following, the description will be given assuming that the scanning direction of the pixels is a raster scan from left to right and from top to bottom, but there is no limitation on the scanning direction.

[符号データの構造]
画像復号装置について説明する前に、符号データの構造を説明する。図1に、ソースビットマップデータのメモリイメージ10を示す。メモリイメージ10は、ページやフレームなどの描画領域に含まれるビットマップデータであり、ビットマップヘッダ11と圧縮データ12を含む。
[Structure of code data]
Before describing the image decoding apparatus, the structure of code data will be described. FIG. 1 shows a memory image 10 of source bitmap data. The memory image 10 is bitmap data included in a drawing area such as a page or a frame, and includes a bitmap header 11 and compressed data 12.

ビットマップヘッダ11は、ページやフレームなどの描画領域に含まれるビットマップ(ビットマップ1、2、…、B)ごとに定義されるヘッダの集合である。例えば、ビットマップ1のヘッダには、ビットマップサイズ111、チャネル数112、ビット精度113、ロスレス圧縮データのポインタの集合であるポインタマップ114、ロッシー圧縮データのポインタの集合であるポインタマップ115が含まれる。なお、以下では、ロスレス圧縮データを「ロスレスデータ」、ロッシー圧縮データを「ロッシーデータ」と呼ぶ場合がある。   The bitmap header 11 is a set of headers defined for each bitmap (bitmaps 1, 2,..., B) included in a drawing area such as a page or a frame. For example, the header of the bitmap 1 includes a bitmap size 111, a channel number 112, a bit precision 113, a pointer map 114 which is a set of pointers of lossless compressed data, and a pointer map 115 which is a set of pointers of lossy compressed data. It is. Hereinafter, the lossless compressed data may be referred to as “lossless data”, and the lossy compressed data may be referred to as “lossy data”.

圧縮データ12は、ページやフレームなどの描画領域に含まれるビットマップ(ビットマップ1、2、…、B)ごとの圧縮データの集合である。そして、ビットマップ1の圧縮データは、矩形領域1、2、…、WHのロスレスデータ117、118、…、119、および、矩形領域1、2、…、WHのロッシーデータ120、121、…、122を含む。   The compressed data 12 is a set of compressed data for each bitmap (bitmaps 1, 2,..., B) included in a drawing area such as a page or a frame. , WH lossless data 117, 118,..., 119, and rectangular areas 1, 2,..., WH lossy data 120, 121,. Includes 122.

各ビットマップは、m×m画素(例えば64×64画素)の矩形領域に分割され、例えばビットマップ1はW×H個の矩形領域を含む。ビットマップのサイズがm×m画素の整数倍ではない場合は、m×m画素の整数倍になるように、ビットマップの外側にパディングが付加され、その後、ビットマップが矩形領域に分割され、矩形領域にデータ圧縮が施される。   Each bitmap is divided into rectangular areas of m × m pixels (for example, 64 × 64 pixels). For example, bitmap 1 includes W × H rectangular areas. If the size of the bitmap is not an integer multiple of m × m pixels, padding is added outside the bitmap so as to be an integer multiple of m × m pixels, and then the bitmap is divided into rectangular regions, Data compression is performed on the rectangular area.

ビットマップサイズ111は、対応するビットマップの幅と高さがm×m画素の矩形領域の何倍かを示す。チャネル数112は、色成分の数を示し、RGBデータは3チャネル、CMYKデータは4チャネル、YUVデータは3チャネル、白黒(BW)は1チャネルである。ビット精度113は、1チャネル当りのビット深さを示す。   The bitmap size 111 indicates how many times the width and height of the corresponding bitmap are larger than the rectangular area of m × m pixels. The channel number 112 indicates the number of color components. RGB data has three channels, CMYK data has four channels, YUV data has three channels, and monochrome (BW) has one channel. The bit precision 113 indicates the bit depth per channel.

ポインタマップ114は、ロスレスデータのポインタの集合であり、各ポインタは対応する矩形領域のロスレスデータの先頭アドレスを示す。ポインタマップ115は、ロッシーデータのポインタの集合であり、各ポインタは対応する矩形領域のロッシーデータの先頭アドレスを示す。   The pointer map 114 is a set of pointers of the lossless data, and each pointer indicates the head address of the lossless data in the corresponding rectangular area. The pointer map 115 is a set of pointers to lossy data, and each pointer indicates the start address of the lossy data in the corresponding rectangular area.

ロスレスデータ117、118、…、119は、ビットマップ1の各矩形領域の少なくとも一部の画像データをロスレス圧縮して得られるデータである。各ロスレスデータは、対応する矩形領域内の境界情報と、単色領域の色情報を含む。   The lossless data 117, 118,..., 119 are data obtained by losslessly compressing at least a part of the image data of each rectangular area of the bitmap 1. Each lossless data includes boundary information in a corresponding rectangular area and color information of a single color area.

ロッシーデータ120、121、…、122は、ビットマップ1の各矩形領域の画像データをロッシー圧縮して得られるデータである。各ロッシーデータは、対応する矩形領域の最小符号化単位(MCU)ごとの圧縮データの集合である。実施例のロッシー圧縮には、例えば、JPEGを用いるとする。JPEGのMCUは8×8画素であり、矩形領域が64×64画素とすると、各ロッシーデータは8×8=64のMCUそれぞれに対応するJPEGデータの集合である。   The lossy data 120, 121,..., 122 are data obtained by lossy compression of the image data of each rectangular area of the bitmap 1. Each lossy data is a set of compressed data for each minimum coding unit (MCU) of the corresponding rectangular area. For example, JPEG is used for the lossy compression of the embodiment. Assuming that the MCU of JPEG is 8 × 8 pixels and the rectangular area is 64 × 64 pixels, each lossy data is a set of JPEG data corresponding to each of 8 × 8 = 64 MCUs.

図2は、m=16とした場合の、16×16画素の矩形領域20の一例を示す。図2において、太実線は矩形領域20の端(画素集合の境界)を示し、水平、垂直の破線はJPEGのMCUに相当する8×8画素の境界を示す。矩形領域20は、例えば、次の領域を含む。
第一の領域21:ロスレス圧縮領域、
第二の領域22:ロッシー圧縮領域、
第三の領域23:ロスレス圧縮領域、
第四の領域24:ロスレス圧縮領域、
第五の領域25:ロッシー圧縮領域、
第六の領域26:ロスレス圧縮領域、
第七の領域27:ロスレス圧縮領域、
第八の領域28:ロッシー圧縮領域。
FIG. 2 shows an example of a rectangular area 20 of 16 × 16 pixels when m = 16. In FIG. 2, a thick solid line indicates an end (boundary of a pixel set) of the rectangular area 20, and horizontal and vertical broken lines indicate a boundary of 8 × 8 pixels corresponding to a JPEG MCU. The rectangular area 20 includes, for example, the following areas.
First area 21: lossless compression area,
Second area 22: lossy compression area,
Third area 23: lossless compression area,
Fourth area 24: lossless compression area,
Fifth area 25: lossy compression area,
Sixth area 26: lossless compression area,
Seventh area 27: lossless compression area,
Eighth area 28: Lossy compression area.

矩形領域20において、隣接する同一色の画素はロスレス圧縮領域に区分される。ただし、実施例で用いるJPEGは、所定の矩形領域ごとに符号化する方式である。そこで図2に示す矩形領域20の場合、次のように二つの圧縮方式によって圧縮される。矩形領域20のデータのうち、ロスレス圧縮領域の画素のデータがロスレス圧縮方式で符号化(以下、ロスレス符号化)される。また、ロスレス圧縮領域の全画素を、圧縮効率を考慮して設定された所定の画素値で置き換えた後、矩形領域20のデータはロッシー圧縮方式で符号化(以下、ロッシー符号化)される。   In the rectangular area 20, adjacent pixels of the same color are divided into lossless compression areas. However, JPEG used in the embodiment is a method of encoding for each predetermined rectangular area. Therefore, in the case of the rectangular area 20 shown in FIG. 2, compression is performed by two compression methods as follows. Of the data in the rectangular area 20, data of pixels in the lossless compression area are encoded by a lossless compression method (hereinafter, lossless encoding). After replacing all the pixels in the lossless compression area with predetermined pixel values set in consideration of the compression efficiency, the data in the rectangular area 20 is encoded by a lossy compression method (hereinafter, lossy encoding).

図3により矩形領域20の境界情報およびロスレス圧縮データ41のフォーマット例を説明する。図3(A)は境界情報を示し、太実線は水平方向ライン(以下、ライン)上のロスレス圧縮領域の開始画素を示す属性「開始境界」に対応し、太破線はライン上のロスレス圧縮領域の終端画素を示す属性「終端境界」に対応する。つまり、あるロスレス圧縮領域は、各ラインについて、開始境界の画素から始まり、終端境界の画素で終わる。   A format example of the boundary information of the rectangular area 20 and the lossless compressed data 41 will be described with reference to FIG. FIG. 3 (A) shows the boundary information. The bold solid line corresponds to the attribute “start boundary” indicating the start pixel of the lossless compression area on the horizontal line (hereinafter, “line”), and the bold broken line is the lossless compression area on the line. Corresponding to the attribute “termination boundary” indicating the termination pixel of. That is, a certain lossless compression area starts with the pixel at the start boundary and ends with the pixel at the end boundary for each line.

開始境界と終端境界は、符号化装置によって、互いに交わらないように生成される。また、開始境界と終端境界は、一対の境界情報として生成される。ロスレス圧縮領域における、図3(A)に示す開始境界と終端境界の各対と、図2に示す領域の間の対応関係は次のようになる。
開始境界31と終端境界32:第一の領域21、
開始境界33と終端境界34:第三の領域23、
開始境界35と終端境界36:第四の領域24、
開始境界37と終端境界38:第六の領域26、
開始境界39と終端境界40:第七の領域27。
The start boundary and the end boundary are generated by the encoding device so as not to cross each other. The start boundary and the end boundary are generated as a pair of boundary information. In the lossless compression area, the correspondence between each pair of the start boundary and the end boundary shown in FIG. 3A and the area shown in FIG. 2 is as follows.
Start boundary 31 and end boundary 32: first region 21,
Start boundary 33 and end boundary 34: third region 23,
Start boundary 35 and end boundary 36: fourth region 24,
Start boundary 37 and end boundary 38: sixth region 26,
Start boundary 39 and end boundary 40: seventh region 27.

図3(B)はロスレス圧縮データ41のフォーマット例を示す。ロスレス圧縮データ41は、矩形領域20のロスレス圧縮データに相当する。境界数411は、矩形領域20における開始境界と終端境界の対の数Eを示す。境界0のヘッダ412は、一番目のロスレス圧縮領域の開始境界と終端境界のヘッダ情報である。境界E-1のヘッダ413は、E-1番目のロスレス圧縮領域の開始境界と終端境界のヘッダ情報である。   FIG. 3B shows a format example of the lossless compressed data 41. The lossless compressed data 41 corresponds to the lossless compressed data of the rectangular area 20. The boundary number 411 indicates the number E of pairs of the start boundary and the end boundary in the rectangular area 20. The header 412 at the boundary 0 is header information of the start boundary and the end boundary of the first lossless compression area. The header 413 of the boundary E-1 is header information of the start boundary and the end boundary of the E-1st lossless compression area.

境界0の軌跡データ414は、境界0の水平方向座標X(以下、座標X)を特定するためのデータであり、関数、各ラインにおける座標X、各ラインにおける座標Xの差分などを用いることができる。境界E-1の軌跡データ415は、境界E-1の座標Xを特定するためのデータである。エッジヘッダ42は、各ヘッダ情報412、413のフォーマットを示し、次の値が格納される。
領域色(RegionColour)421:ロスレス圧縮領域の色、
先頭Y座標(Start Y-Position)422:開始境界の開始点の垂直方向座標Y(以下、座標Y)、
開始X座標(Enabling X-Position)423:開始境界の開始点の水平方向座標X、
末尾Y座標(End Y-Position)424:開始境界の終端点の垂直方向座標Y、
終端X座標(Disabling X-Position)425:終端境界の開始点の水平方向座標X。
The trajectory data 414 of the boundary 0 is data for specifying the horizontal coordinate X (hereinafter, coordinate X) of the boundary 0, and may use a function, a coordinate X of each line, a difference between the coordinates X of each line, and the like. it can. The locus data 415 of the boundary E-1 is data for specifying the coordinates X of the boundary E-1. The edge header 42 indicates the format of each of the header information 412 and 413, and stores the following values.
Region color (RegionColour) 421: Color of lossless compression region,
Start Y-Position 422: Vertical coordinate Y (hereinafter, coordinate Y) of the start point of the start boundary,
Starting X-Position 423: Horizontal coordinate X of the start point of the start boundary,
End Y-Position 424: The vertical coordinate Y of the end point of the start boundary,
Disabling X-Position 425: Horizontal coordinate X of the start point of the end boundary.

なお、終端境界の開始点および終端点の座標Yは、対をなす開始境界の開始点および終端点の座標Yに等しい。また、境界ヘッダ412、413は、先頭Y座標422の昇順にソートされる。先頭Y座標422が同じヘッダは、開始X座標423の昇順にソートされる。言い替えれば、矩形領域20を左上から右下に向かって走査する順に、境界ヘッダが整列されて、メモリに格納される。   Note that the coordinates Y of the start point and the end point of the end boundary are equal to the coordinates Y of the start point and the end point of the paired start boundary. The boundary headers 412 and 413 are sorted in ascending order of the leading Y coordinate 422. Headers having the same start Y coordinate 422 are sorted in ascending order of the start X coordinate 423. In other words, the boundary headers are arranged in the order in which the rectangular area 20 is scanned from upper left to lower right, and stored in the memory.

各ラインにおいて、ロスレス圧縮領域の開始情報を示す開始境界の座標Xから、ロスレス圧縮領域の終端情報を示す終端境界の座標Xまでは、領域色421に定義された色の画素になる。一つのライン上で終端境界と次の開始境界の間にギャップがなければ、ロスレス圧縮領域が隣接していることが示される。また、一つのライン上で終端境界と次の開始境界の間にギャップがある場合は、ロスレス圧縮領域の間にロッシー圧縮領域があり、終端境界の右隣から次の開始境界の左隣までが、ロッシー圧縮データを伸長して得られる画素になる。   In each line, from the coordinate X of the start boundary indicating the start information of the lossless compression area to the coordinate X of the end boundary indicating the end information of the lossless compression area, pixels of the color defined as the area color 421 are obtained. If there is no gap between the end boundary and the next start boundary on one line, it indicates that the lossless compression regions are adjacent. Also, if there is a gap between the end boundary and the next start boundary on one line, there is a lossy compression region between the lossless compression regions, and the area from the right of the end boundary to the left of the next start boundary is , Pixels obtained by expanding the lossy compressed data.

また、ラインの左端(X=0)に開始座標が存在しない場合は、ラインの左端(X=0)から最初に出現する開始境界の座標Xの左隣までが、ロッシー圧縮データを伸長して得られる画素になる。ライン上に開始座標が存在しない場合は、当該ラインはすべてロッシー圧縮領域であり、ラインの左端(X=0)から右端(例えばX=15)までが、ロッシー圧縮データを伸長して得られる画素になる。   If there is no start coordinate at the left end of the line (X = 0), the lossy compressed data is expanded from the left end of the line (X = 0) to the left of the first appearing start coordinate X. The resulting pixel. If there is no start coordinate on the line, the line is a lossy compression area, and the pixels from the left end (X = 0) to the right end (for example, X = 15) of the line are obtained by expanding the lossy compressed data. become.

矩形領域20のロッシー圧縮領域の画像データのデータ圧縮方式がJPEGの場合、前述のとおり、ロッシー圧縮データは8×8画素のMCUが垂直、水平に二つずつ並んだ合計四つMCUからなり、矩形領域20の全画素を含む。従って、ロッシー圧縮データを伸長すると、図2に示すロスレス圧縮領域21、23、24、26、27と重複する画素が復号されることになる。ただし、ロッシー圧縮データを復号して得られるロスレス圧縮領域21、23、24、26、27の画素値は、置き換えた所定の画素値であることに注意されたい。   When the data compression method of the image data in the lossy compression area of the rectangular area 20 is JPEG, as described above, the lossy compression data is composed of a total of four MCUs in which two 8 × 8 pixel MCUs are vertically and horizontally arranged two by two, Includes all pixels in the rectangular area 20. Therefore, when the lossy compressed data is expanded, pixels overlapping with the lossless compression areas 21, 23, 24, 26, and 27 shown in FIG. 2 are decoded. However, it should be noted that the pixel values of the lossless compression areas 21, 23, 24, 26, and 27 obtained by decoding the lossy compressed data are predetermined replaced pixel values.

図4により矩形領域20のロスレス圧縮データを説明する。なお、以下の説明では、色成分のチャネル数が3であり、色空間がRGBであるものとして説明する。矩形領域20にはロスレス圧縮領域21、23、24、26、27に対応する五対の開始境界と終端境界があるので、境界数E=5である。境界0は第一の領域21に対応する。境界0のヘッダには、図4に示すように、領域色「0xFF0000」として設定されている。つまり、第一の領域21は、R=255、G=00、B=00の色の画素で構成されていることを示す。また、開始境界31と終端境界32の先頭Y座標「0」、開始境界31の開始X座標「0」、開始境界31と終端境界32の末尾Y座標「9」、終端境界32の終端X座標「2」が設定される。   The lossless compressed data of the rectangular area 20 will be described with reference to FIG. In the following description, it is assumed that the number of channels of the color component is 3, and the color space is RGB. Since the rectangular area 20 has five pairs of start and end boundaries corresponding to the lossless compression areas 21, 23, 24, 26, and 27, the number of boundaries E = 5. The boundary 0 corresponds to the first area 21. In the header at the boundary 0, as shown in FIG. 4, the area color is set as “0xFF0000”. That is, the first area 21 is composed of pixels of colors R = 255, G = 00, and B = 00. Also, the start Y coordinate “0” of the start boundary 31 and the end boundary 32, the start X coordinate “0” of the start boundary 31, the end Y coordinate “9” of the start boundary 31 and the end boundary 32, and the end X coordinate of the end boundary 32 "2" is set.

同様に、境界1は第三の領域23に、境界2は第四の領域24に、境界3は第六の領域26に、境界4は第七の領域27にそれぞれ対応し、境界1から境界4の各ヘッダには図4に示すデータが設定される。   Similarly, boundary 1 corresponds to third region 23, boundary 2 corresponds to fourth region 24, boundary 3 corresponds to sixth region 26, boundary 4 corresponds to seventh region 27, and boundary 1 corresponds to boundary 7. Data shown in FIG. 4 is set in each header of No. 4.

境界0の開始境界の軌跡は、ラインY=0からラインY=9の間にあり、ラインのY座標の昇順に、X座標は0、0、0、0、0、0、1、2、3、4である。境界0の開始境界の軌跡データとして、走査順のライン間のX座標の差分「0、0、0、0、0、+1、+1、+1、+1」が設定される。また、境界0の終端境界の軌跡は、ラインY=0からラインY=9の間にあり、ラインのY座標の昇順に、X座標は2、5、5、6、7、6、6、6、5、5である。境界0の終端境界の軌跡データとして、走査順のライン間のX座標の差分「+3、0、+1、+1、-1、0、0、-1、0」が設定される。このようにして、第一の領域21の非線形な境界が定義できることになる。   The locus of the start boundary of boundary 0 is between line Y = 0 and line Y = 9, and the X coordinate is 0, 0, 0, 0, 0, 0, 1, 2, in the ascending order of the Y coordinate of the line. 3 and 4. As the trajectory data of the start boundary of the boundary 0, a difference “0, 0, 0, 0, 0, +1, +1, +1, +1” of the X coordinate between the lines in the scanning order is set. The trajectory of the end boundary of boundary 0 is between line Y = 0 and line Y = 9, and the X coordinate is 2, 5, 5, 6, 7, 6, 6, 6, 5, and 5. As the trajectory data of the end boundary of the boundary 0, a difference “+3, 0, +1, +1, −1, 0, 0, −1, 0” of the X coordinate between the lines in the scanning order is set. In this way, a non-linear boundary of the first region 21 can be defined.

境界1は、第三の領域23に対応する。それ故、境界1の開始境界および終端境界の軌跡はラインY=0からラインY=11の間にある。
境界2は、第四の領域24に対応する。それ故、境界2の開始境界および終端境界の軌跡はラインY=2からラインY=9の間にある。
境界3は、第六の領域26に対応する。それ故、境界3の開始境界および終端境界の軌跡はラインY=7からラインY=13の間にある。
境界4は、第七の領域27に対応する。それ故、境界4の開始境界および終端境界の軌跡はラインY=11からラインY=13の間にある。
以上のようにして、図4に示すような、軌跡データが設定される。
The boundary 1 corresponds to the third area 23. Therefore, the trajectory of the start boundary and the end boundary of boundary 1 is between line Y = 0 and line Y = 11.
The boundary 2 corresponds to the fourth area 24. Therefore, the trajectory of the start boundary and the end boundary of boundary 2 is between line Y = 2 and line Y = 9.
The boundary 3 corresponds to the sixth area 26. Therefore, the trajectory of the start boundary and the end boundary of boundary 3 is between line Y = 7 and line Y = 13.
The boundary 4 corresponds to the seventh region 27. Therefore, the trajectory of the start boundary and the end boundary of boundary 4 is between line Y = 11 and line Y = 13.
As described above, the trajectory data as shown in FIG. 4 is set.

以下では、境界情報を参照することで、ロッシー圧縮方式により圧縮された画像データと、ロスレス圧縮方式により圧縮された画像データが混在する画像データの復号を、画素データの上書きなしに行う復号処理を説明する。   Hereinafter, by referring to the boundary information, a decoding process of decoding image data in which image data compressed by the lossy compression method and image data compressed by the lossless compression method are mixed without overwriting pixel data is described. explain.

[第1実施例]
[画像復号装置の構成]
図5のブロック図により実施例の画像復号装置の構成例を示す。制御部51は、メモリ55に格納されたソースビットマップデータ、および、復号結果の画素を書き込むためのバッファ領域のアドレスとサイズを示すバッファ情報を読み込む。制御部51は、ビットマップヘッダ11を解釈して、ロッシー復号部52、ロスレス復号部53、および、書出処理部54を制御する。なお、メモリ44に格納される復号対象のソースビットマップデータの発生源は問わないので、図示していない。
[First embodiment]
[Configuration of Image Decoding Device]
FIG. 5 is a block diagram showing an example of the configuration of the image decoding apparatus according to the embodiment. The control unit 51 reads the source bitmap data stored in the memory 55 and the buffer information indicating the address and size of the buffer area for writing the decoded pixel. The control unit 51 interprets the bitmap header 11 and controls the lossy decoding unit 52, the lossless decoding unit 53, and the writing processing unit 54. Since the source of the source bitmap data to be decoded stored in the memory 44 does not matter, it is not shown.

ロッシー復号部52は、制御部51の制御に従い、メモリ55に格納されたロッシー圧縮データを読み込み、ロッシー圧縮データを復号して、復号結果の画素データをロスレス復号部53に出力する。ロッシー復号部52は、例えばJPEGデコーダと16×8画素分のバッファ56を備え、垂直1×水平2のMCUの復号結果の並べ替え処理を行って、矩形領域内の画素データを16画素のラインごとに、順次、ロスレス復号部53に出力する。ロッシー復号部52は、バッファ56に画素データが格納されている状態を有効とする。本実施例においてロッシー復号部52は、専用の回路によって実現されるものとする。ロッシー復号部52から出力される各画素データは、メモリ55に格納されることなくロスレス復号部53に出力される。   Under the control of the control unit 51, the lossy decoding unit 52 reads the lossy compressed data stored in the memory 55, decodes the lossy compressed data, and outputs the decoded pixel data to the lossless decoding unit 53. The lossy decoding unit 52 includes, for example, a JPEG decoder and a buffer 56 for 16 × 8 pixels, performs rearrangement processing of decoding results of the vertical 1 × horizontal 2 MCU, and converts pixel data in the rectangular area into 16-pixel lines. , And sequentially output to the lossless decoding unit 53. The lossy decoding unit 52 validates the state in which the pixel data is stored in the buffer 56. In this embodiment, the lossy decoding unit 52 is realized by a dedicated circuit. Each pixel data output from the lossy decoding unit 52 is output to the lossless decoding unit 53 without being stored in the memory 55.

ロスレス復号部53は、制御部51の制御に従い、メモリ55に格納されたロスレス圧縮データを復号することで矩形領域の画素データを生成する。ロスレス復号部53は、ロッシー復号部52から出力される画素データを入力し、各画素につきロッシー復号部52から出力される画素データまたはロスレス圧縮データを復号した画素データのいずれかを選択し、書出処理部54に出力する。   The lossless decoding unit 53 generates pixel data of a rectangular area by decoding the lossless compressed data stored in the memory 55 under the control of the control unit 51. The lossless decoding unit 53 receives the pixel data output from the lossy decoding unit 52, selects one of the pixel data output from the lossy decoding unit 52 and the pixel data obtained by decoding the lossless compressed data for each pixel, and writes it. Output to the output processing unit 54.

本実施例においてロスレス復号部53は、CPUとは別に設けられ、かつ専用のワークメモリを有するプロセッサが、専用のプログラムメモリまたは共用のシステムメモリからプログラムを読み出して実行するソフト処理によって実現されるものとする。ロスレス復号部53を実現するプロセッサは、他の構成とデータ送受信を行うための1つ以上のインタフェースを有している。特にロスレス復号部53とロッシー復号部52とを接続するインタフェースは、ロッシー復号部52からは、前述の有効を通知するvalid信号、およびロスレス復号部53がロッシー復号部52のバッファ56から画素データを読み込もうとしているready状態を示すready信号を有する。また、インターフェースはロッシー復号部52からのデータ転送を行うデータ信号を有する。   In this embodiment, the lossless decoding unit 53 is provided separately from the CPU, and is realized by software processing in which a processor having a dedicated work memory reads and executes a program from a dedicated program memory or a shared system memory. And The processor that realizes the lossless decoding unit 53 has one or more interfaces for performing data transmission and reception with other components. In particular, an interface for connecting the lossless decoding unit 53 and the lossy decoding unit 52 includes, from the lossy decoding unit 52, a valid signal for notifying the above-described validity, and the lossless decoding unit 53 transmitting pixel data from the buffer 56 of the lossy decoding unit 52. It has a ready signal indicating a ready state to be read. Further, the interface has a data signal for performing data transfer from the lossy decoding unit 52.

書出処理部54は、制御部51の制御に従い、ロスレス復号部53から出力される画素データを書き込むべきアドレスを計算し、画素データをメモリ55のバッファ領域に書き出す。なお本実施形態では、書出処理部54も、ロスレス復号部53を実現するプロセッサが、プログラムを読み出して実行するソフト処理によって実現されるものとする。   Under the control of the control unit 51, the writing processing unit 54 calculates an address to which the pixel data output from the lossless decoding unit 53 is to be written, and writes the pixel data to the buffer area of the memory 55. In the present embodiment, the write-out processing unit 54 is also realized by a processor that realizes the lossless decoding unit 53 by software processing that reads and executes a program.

●ロスレス復号部
図6のブロック図によりロスレス復号部53の構成例を示す。復号制御部73は、後述するロスレス復号部53の各構成を制御して、画像復号処理を行う。なお、画像復号処理の詳細は後述する。
[Lossless Decoding Unit] A configuration example of the lossless decoding unit 53 is shown in the block diagram of FIG. The decoding control unit 73 controls each component of the lossless decoding unit 53, which will be described later, and performs an image decoding process. The details of the image decoding process will be described later.

境界読込部61は、後述する「新規境界」(または新規境界情報)としてメモリ55から読み出された境界データを一時記憶する新規境界バッファと、未処理の新規境界の数を示すカウンタである境界残数RNを有す。境界読込部61は、メモリ55に格納されたロスレス圧縮データから境界数E(図4参照)を読み込み、読み込んだ境界数Eをカウンタである境界残数RNに設定する。また、境界ヘッダと、対応する軌跡データの集合(以下、境界データ)を読み込み、読み込んだ境界データを新規境界バッファに格納する。新規境界バッファから境界データが出力される際に、境界残数RNはデクリメントされ、当該境界データが新規境界バッファから削除される。以下では、新規境界バッファに格納された境界データが示す開始境界と終端境界の対を「新規境界」(または新規境界情報)と呼ぶ。 The boundary reading unit 61 includes a new boundary buffer for temporarily storing boundary data read from the memory 55 as “new boundary” (or new boundary information) described later, and a boundary as a counter indicating the number of unprocessed new boundaries. It has a remaining number R N. Boundary reading unit 61 reads the number of boundaries from lossless compression data stored in the memory 55 E (see FIG. 4), sets the read boundary number E in the boundary remaining number R N is a counter. Also, a boundary header and a set of corresponding trajectory data (hereinafter, boundary data) are read, and the read boundary data is stored in a new boundary buffer. When the boundary data from the new boundary buffer is outputted, the boundary remaining number R N is decremented, the boundary data is deleted from the new boundary buffer. Hereinafter, a pair of the start boundary and the end boundary indicated by the boundary data stored in the new boundary buffer is referred to as “new boundary” (or new boundary information).

継続境界キュー62は、後述する「後続境界」(または後続境界情報)として選択された境界データが入力されるFIFOと、FIFOから取り出された境界データを一時記憶する継続境界バッファを備える。以下では、継続境界バッファに格納された境界データが示す開始境界と終端境界の対を「継続境界」(または継続境界情報)と呼ぶ。   The continuous boundary queue 62 includes a FIFO into which boundary data selected as “subsequent boundary” (or subsequent boundary information) described later is input, and a continuous boundary buffer that temporarily stores boundary data extracted from the FIFO. Hereinafter, a pair of the start boundary and the end boundary indicated by the boundary data stored in the continuation boundary buffer is referred to as “continuation boundary” (or continuation boundary information).

また、継続境界キュー62は、FIFO内の境界データの数を管理するための変数として、注目ライン上の境界の数を示すカウンタである境界残数RLcと、次ライン上の境界の数を示すカウンタである境界残数CLnを有す。詳細は後述するが、境界残数RLcは、継続境界バッファから境界データが読み出される際にデクリメントされる。また、境界残数CLnは、FIFOに境界データが入力される際にインクリメントされる。そして、注目ラインがインクリメントされる際、境界残数CLnが境界残数RLcにコピーされて、境界残数CLnがクリアされる。 Further, the continuation boundary queue 62 stores, as variables for managing the number of boundary data in the FIFO, a boundary remaining number R Lc which is a counter indicating the number of boundaries on the line of interest and the number of boundaries on the next line. It has a boundary remaining number C Ln which is a counter shown. Although details will be described later, the boundary remaining number R Lc is decremented when boundary data is read from the continuous boundary buffer. The boundary remaining number C Ln is incremented when boundary data is input to the FIFO. Then, when the line of interest is incremented, the boundary remaining number C Ln is copied to the boundary remaining number R Lc , and the boundary remaining number C Ln is cleared.

境界比較部63は、新規境界と継続境界を比較して、Y座標が小さい境界データ、または、Y座標が同じ場合はX座標が小さい境界データを選択する選択情報を生成する。また、新規境界が存在し、かつ、継続境界が存在しない場合は、新規境界を選択する選択情報を生成する。他方、新規境界が存在せず、かつ、継続境界が存在する場合は継続境界を選択する選択情報を生成する。   The boundary comparison unit 63 compares the new boundary with the continuation boundary, and generates selection information for selecting boundary data having a small Y coordinate or boundary data having a small X coordinate when the Y coordinates are the same. When a new boundary exists and no continuation boundary exists, selection information for selecting a new boundary is generated. On the other hand, when a new boundary does not exist and a continuation boundary exists, selection information for selecting a continuation boundary is generated.

境界選択部64は、境界比較部63から入力される選択情報に従い新規境界または継続境界を後続境界として選択し、選択した後続境界を後続境界記憶部65に格納する。処理領域記憶部66は、後続境界から取得される処理領域を記憶する。処理領域は、注目ラインのロスレス圧縮領域であり、画素データを復号する領域である。   The boundary selection unit 64 selects a new boundary or a continuation boundary as a subsequent boundary according to the selection information input from the boundary comparison unit 63, and stores the selected subsequent boundary in the subsequent boundary storage unit 65. The processing area storage unit 66 stores the processing area acquired from the subsequent boundary. The processing area is a lossless compression area of the line of interest, and is an area for decoding pixel data.

画素数計算部67は、後続境界記憶部65に記憶された後続境界と、処理領域記憶部66に記憶された処理領域に基づき、注目ラインにおけるロスレス圧縮領域の画素数N1やロッシー圧縮領域の画素数N2を計算する。   Based on the subsequent boundary stored in the subsequent boundary storage unit 65 and the processing area stored in the processing area storage unit 66, the pixel number calculation unit 67 calculates the pixel number N1 of the lossless compression area and the pixel of the lossy compression area in the line of interest. Calculate the number N2.

画素選択制御部69は、画素数計算部67によって計算された画素数N1、N2に従い画素を処理するための画素選択情報を生成する。領域色抽出部70は、後続境界記憶部65に記憶された後続境界が示す境界色を画素データとして画素選択部72に出力する。   The pixel selection control unit 69 generates pixel selection information for processing pixels according to the pixel numbers N1 and N2 calculated by the pixel number calculation unit 67. The region color extraction unit 70 outputs the boundary color indicated by the subsequent boundary stored in the subsequent boundary storage unit 65 to the pixel selection unit 72 as pixel data.

画素読込部71は、画素選択情報に基づき、ロッシー復号部52が出力する画素データを読み込み、読み込んだ画素データを画素選択部72に出力する。画素読込部71は、画素選択情報に基づいてロッシー復号部52のバッファ56から画素を読み込むため、前述のインタフェースを介してready信号をアサートしてロッシー復号部52にready状態であることを通知する。valid信号とready信号が共にアサートされているとき、すなわちロッシー復号部52が有効状態でありロスレス復号部53がready状態のとき、画素読込部71はバッファ56から画素データを読み込む。なお、インターフェースを介してvalid信号かつready信号の両方がアサートされていない場合は、valid信号かつready信号の両方がアサートされるまで待機する。   The pixel reading unit 71 reads the pixel data output by the lossy decoding unit 52 based on the pixel selection information, and outputs the read pixel data to the pixel selection unit 72. The pixel reading unit 71 asserts the ready signal via the above-described interface to notify the lossy decoding unit 52 that the pixel is in the ready state in order to read the pixel from the buffer 56 of the lossy decoding unit 52 based on the pixel selection information. . When both the valid signal and the ready signal are asserted, that is, when the lossy decoding unit 52 is in the valid state and the lossless decoding unit 53 is in the ready state, the pixel reading unit 71 reads the pixel data from the buffer 56. If both the valid signal and the ready signal are not asserted via the interface, the process waits until both the valid signal and the ready signal are asserted.

画素選択部72は、画素選択情報に基づき、領域色抽出部70が出力する画素データ、または、画素読込部71が出力する画素データを選択的に書出処理部54に出力する。従って画素選択部72は、各画素につき、領域色抽出部70が出力する画素データ、または、画素読込部71が出力する画素データのいずれかのデータを出力する。ここで領域色抽出部70が出力する画素データを選択された画素における、画素読込部71が出力する画素データは、破棄される。   The pixel selection unit 72 selectively outputs the pixel data output by the area color extraction unit 70 or the pixel data output by the pixel reading unit 71 to the writing processing unit 54 based on the pixel selection information. Therefore, the pixel selection unit 72 outputs, for each pixel, either pixel data output by the area color extraction unit 70 or pixel data output by the pixel reading unit 71. Here, the pixel data output by the pixel reading unit 71 in the pixel for which the pixel data output by the area color extraction unit 70 is selected is discarded.

●ロスレス復号部の動作の概要
詳細は後述するが、図2に示す矩形領域20を例に、ロスレス復号部53の処理手順の概要を説明する。図14によりロスレス復号部53の各パラメータを説明する。境界読込部61は、境界数E=5を境界残数RNに設定し、第一のロスレス圧縮領域21の境界データ(以下、境界データ21)を読み込み、新規境界バッファに格納する。この時点で、継続境界キュー62と継続境界バッファは空である(図14の状態0)。
Outline of Operation of Lossless Decoding Unit Although details will be described later, an outline of a processing procedure of the lossless decoding unit 53 will be described using the rectangular area 20 shown in FIG. 2 as an example. Each parameter of the lossless decoding unit 53 will be described with reference to FIG. Boundary reading unit 61, a boundary number of E = 5 is set to the boundary remaining number R N, the boundary data of the first lossless compression region 21 (hereinafter, the boundary data 21) reads and stores the new boundary buffer. At this point, the continuation boundary queue 62 and the continuation boundary buffer are empty (state 0 in FIG. 14).

境界比較部63は、継続境界バッファが空であるから、後続境界として新規境界を選択する。その結果、継続境界キュー62のFIFOに境界データ21が入力され、境界残数RNがデクリメントされる(状態1)。復号制御部73は、境界データ21を参照して、矩形領域20の先頭ライン(ライン0)の左端から三画素分の画素データとして0xFF0000を出力する。 Since the continuous boundary buffer is empty, the boundary comparing unit 63 selects a new boundary as a subsequent boundary. As a result, the boundary data 21 is inputted to the FIFO of the continuation boundary queue 62, the boundary remaining number R N is decremented (state 1). The decoding control unit 73 outputs 0xFF0000 as pixel data of three pixels from the left end of the first line (line 0) of the rectangular area 20 with reference to the boundary data 21.

境界読込部61は、第二のロスレス圧縮領域23の境界データ(以下、境界データ23)を読み込み、新規境界バッファに格納する。一方、継続境界キュー62は、FIFOから取り出した境界データ21を継続境界バッファに格納する(状態2)。   The boundary reading unit 61 reads boundary data of the second lossless compression area 23 (hereinafter, boundary data 23) and stores the boundary data in a new boundary buffer. On the other hand, the continuation boundary queue 62 stores the boundary data 21 extracted from the FIFO in the continuation boundary buffer (state 2).

境界比較部63は、新規境界(境界データ23)と継続境界(境界データ21)を比較して、後続境界として新規境界を選択する。その結果、FIFOに境界データ23が入力され、境界残数RNがデクリメントされる(状態3)。復号制御部73は、境界データ23を参照して、先頭ライン(ライン0)の四画素目から七画素分の画素データとして画素読込部71が読み込んだ画素データを出力する。さらに、11画素目から右端までの画素データとして0x00FF00を出力し、注目ラインをインクリメントする。 The boundary comparison unit 63 compares the new boundary (boundary data 23) with the continuation boundary (boundary data 21), and selects a new boundary as a subsequent boundary. Consequently, FIFO boundary data 23 is input to the boundary remaining number R N is decremented (state 3). The decoding control unit 73 outputs the pixel data read by the pixel reading unit 71 as pixel data of seven pixels from the fourth pixel of the first line (line 0) with reference to the boundary data 23. Further, 0x00FF00 is output as pixel data from the eleventh pixel to the right end, and the line of interest is incremented.

境界読込部61は、第三のロスレス圧縮領域24の境界データ(以下、境界データ24)を読み込み、新規境界バッファに格納する。一方、継続境界バッファには境界データ21が格納されたままである(状態4)。   The boundary reading unit 61 reads boundary data of the third lossless compression area 24 (hereinafter, boundary data 24) and stores the boundary data in a new boundary buffer. On the other hand, the boundary data 21 is still stored in the continuous boundary buffer (state 4).

境界比較部63は、新規境界(境界データ24)と継続境界(境界データ21)を比較して、後続境界として継続境界を選択する。その結果、FIFOに境界データ21が入力される(状態5)。復号制御部73は、境界データ21を参照して、注目ライン(ライン1)の左端から六画素分の画素データとして0xFF0000を出力する。   The boundary comparison unit 63 compares the new boundary (boundary data 24) with the continuation boundary (boundary data 21), and selects a continuation boundary as a subsequent boundary. As a result, the boundary data 21 is input to the FIFO (state 5). The decoding control unit 73 outputs 0xFF0000 as pixel data of six pixels from the left end of the line of interest (line 1) with reference to the boundary data 21.

継続境界キュー62は、継続境界バッファに境界データ23を格納する。一方、新規境界バッファは境界データ24が格納されたままである(状態6)。   The continuation boundary queue 62 stores the boundary data 23 in the continuation boundary buffer. On the other hand, the new boundary buffer keeps storing the boundary data 24 (state 6).

境界比較部63は、新規境界(境界データ24)と継続境界(境界データ23)を比較して、後続境界として継続境界を選択する。その結果、FIFOに境界データ23が入力される(状態7)。復号制御部73は、境界データ23を参照して、注目ライン(ライン1)の七画素目から三画素分の画素データとして画素読込部71が読み込んだ画素データを出力する。さらに、10画素目から右端までの画素データとして0x00FF00を出力し、注目ラインをインクリメントする。   The boundary comparing unit 63 compares the new boundary (boundary data 24) with the continuation boundary (boundary data 23), and selects a continuation boundary as a subsequent boundary. As a result, the boundary data 23 is input to the FIFO (state 7). The decoding control unit 73 outputs the pixel data read by the pixel reading unit 71 as pixel data of three pixels from the seventh pixel of the line of interest (line 1) with reference to the boundary data 23. Further, 0x00FF00 is output as pixel data from the tenth pixel to the right end, and the line of interest is incremented.

継続境界キュー62は、継続境界バッファには境界データ21を格納する。一方、新規境界バッファは境界データ24が格納されたままである(状態8)。   The continuation boundary queue 62 stores the boundary data 21 in the continuation boundary buffer. On the other hand, the new boundary buffer keeps storing the boundary data 24 (state 8).

境界比較部63は、新規境界(境界データ24)と継続境界(境界データ21)を比較して、後続境界として継続境界を選択する。その結果、FIFOに境界データ21が入力される(状態9)。復号制御部73は、境界データ21を参照して、注目ライン(ライン2)の左端から六画素分の画素データとして0xFF0000を出力する。   The boundary comparison unit 63 compares the new boundary (boundary data 24) with the continuation boundary (boundary data 21), and selects a continuation boundary as a subsequent boundary. As a result, the boundary data 21 is input to the FIFO (state 9). The decoding control unit 73 outputs 0xFF0000 as pixel data of six pixels from the left end of the line of interest (line 2) with reference to the boundary data 21.

継続境界キュー62は、継続境界バッファに境界データ23を格納する。一方、新規境界バッファは境界データ24が格納されたままである(状態10)。   The continuation boundary queue 62 stores the boundary data 23 in the continuation boundary buffer. On the other hand, the new boundary buffer keeps storing the boundary data 24 (state 10).

境界比較部63は、新規境界(境界データ24)と継続境界(境界データ23)を比較して、後続境界として新規境界を選択する。その結果、FIFOに境界データ24が入力される(状態11)。復号制御部73は、境界データ24を参照して、注目ライン(ライン2)の八画素目から二画素分の画素データとして画素読込部71が読み込んだ画素データを出力する。さらに、九画素目から二画素分の画素データとして0x0000FFを出力する。   The boundary comparing unit 63 compares the new boundary (boundary data 24) with the continuous boundary (boundary data 23), and selects a new boundary as a subsequent boundary. As a result, the boundary data 24 is input to the FIFO (state 11). The decoding control unit 73 outputs the pixel data read by the pixel reading unit 71 as pixel data of two pixels from the eighth pixel of the line of interest (line 2) with reference to the boundary data 24. Further, 0x0000FF is output as pixel data of two pixels from the ninth pixel.

境界読込部61は、境界残数RNをデクリメントし、第四のロスレス圧縮領域26の境界データ(以下、境界データ26)を読み込み、新規境界バッファに格納する。一方、継続境界バッファには境界データ23が格納されたままである(状態12)。 Boundary reading unit 61 decrements the border remaining number R N, the boundary data of the fourth lossless compression region 26 (hereinafter, the boundary data 26) reads and stores the new boundary buffer. On the other hand, the boundary data 23 is still stored in the continuous boundary buffer (state 12).

境界比較部63は、新規境界(境界データ26)と継続境界(境界データ23)を比較して、後続境界として継続境界を選択する。その結果、継続境界キュー62のFIFOに境界データ23が入力される(状態13)。復号制御部73は、境界データ23を参照して、注目ライン(ライン2)の12画素目から右端までの画素データとして0x00FF00を出力し、注目ラインをインクリメントする。   The boundary comparing unit 63 compares the new boundary (boundary data 26) with the continuation boundary (boundary data 23), and selects a continuation boundary as a subsequent boundary. As a result, the boundary data 23 is input to the FIFO of the continuous boundary queue 62 (state 13). The decoding control unit 73 outputs 0x00FF00 as pixel data from the twelfth pixel to the right end of the line of interest (line 2) with reference to the boundary data 23, and increments the line of interest.

継続境界キュー62は、継続境界バッファに境界データ21を格納する。一方、新規境界バッファは境界データ26が格納されたままである(状態14)。以降の説明は省略するが、矩形領域20の最終ラインまで上記の処理手順が繰り返され、矩形領域20の復号が完了する。また、上記では、境界残数R Lc 、R Ln の変化の説明を省略したが、詳細は後述する。 The continuation boundary queue 62 stores the boundary data 21 in the continuation boundary buffer. On the other hand, the new boundary buffer keeps storing the boundary data 26 (state 14). Although the following description is omitted, the above processing procedure is repeated up to the last line of the rectangular area 20, and decoding of the rectangular area 20 is completed. In the above description, the description of the change in the remaining boundary numbers R Lc and R Ln is omitted, but the details will be described later.

●復号処理
図7のフローチャートによりロスレス復号部53の復号処理を含む、画素データの出力処理を説明する。なお、図7に示す処理は、一つの矩形領域分の処理を示し、矩形領域の数分、繰り返し実行される。復号制御部73は、ロスレス復号部53を初期化する(S61)。初期化には、ソースビットマップデータのアドレスの記憶、境界読込部61による境界数Eの取得と境界残数RNの設定、継続境界キュー62の境界残数RLc、RLnのクリア、注目ラインのX座標の初期化などが含まれる。
[Decoding Process] The output process of the pixel data including the decoding process of the lossless decoding unit 53 will be described with reference to the flowchart of FIG. Note that the processing shown in FIG. 7 indicates processing for one rectangular area, and is repeatedly executed for the number of rectangular areas. The decoding control unit 73 initializes the lossless decoding unit 53 (S61). The initialization, the storage of the address of the source bit map data, setting the acquisition and border remaining number R N boundary number E by Boundary reading unit 61, the boundary remaining number R Lc continuous boundary queue 62, clearing of R Ln, attention Initialization of the X coordinate of the line is included.

次に、復号制御部73は、注目ラインが矩形領域の最終ラインか否かを判定し(S62)、注目ラインが最終ラインの場合は当該矩形領域の復号処理を終了する。注目ラインが最終ラインではない場合、復号制御部73は、境界読込部61、継続境界キュー62、境界判定部63を用いて、後述する後続境界の取得(S63)を実行する。   Next, the decoding control unit 73 determines whether or not the line of interest is the last line of the rectangular area (S62). If the line of interest is the last line, the decoding processing of the rectangular area ends. When the line of interest is not the last line, the decoding control unit 73 uses the boundary reading unit 61, the continuation boundary queue 62, and the boundary determination unit 63 to execute acquisition of a subsequent boundary (S63) described later.

次に、復号制御部73は、取得した後続境界が注目ラインにおける一番目の境界に対応するか否かを判定する(S64)。後続境界が一番目の境界であれば後続境界の左側はロッシー圧縮領域である。この場合、復号制御部73は、画素数計算部67、画素選択部72を用いて、左側ロッシー圧縮領域の処理を行う(S65)。   Next, the decoding control unit 73 determines whether or not the acquired subsequent boundary corresponds to the first boundary of the line of interest (S64). If the subsequent boundary is the first boundary, the left side of the subsequent boundary is a lossy compression area. In this case, the decoding control unit 73 uses the pixel number calculation unit 67 and the pixel selection unit 72 to process the left lossy compression area (S65).

左側ロッシー圧縮領域の処理は、注目ライン上の、後続境界の開始境界のX座標に基づきロッシー圧縮領域の画素数N2を算出し、画素読込部71が読み込んだ画素データのうち、画素数N2分の画素データを書出処理部54に出力する処理である。言い替えれば、注目ラインの左端から開始境界の直前までの画素データが出力される。ただし、一番目の境界の開始境界のX座標が0の場合はロスレス圧縮領域の左側にロッシー圧縮領域は存在しないが、画素数N2=0になるため、実質的にステップS65の処理は行われない。   The processing of the left-side lossy compression area calculates the number of pixels N2 of the lossy compression area based on the X coordinate of the start boundary of the subsequent boundary on the line of interest, and calculates the number of pixels N2 of the pixel data read by the pixel reading unit 71. This is a process of outputting the pixel data of (1) to the writing processing unit 54. In other words, pixel data from the left end of the line of interest to immediately before the start boundary is output. However, when the X coordinate of the start boundary of the first boundary is 0, there is no lossy compression area to the left of the lossless compression area, but since the number of pixels N2 = 0, the processing of step S65 is substantially performed. Absent.

次に、復号制御部73は、後述するライン終了フラグを判定し(S66)、ライン終了フラグが真の場合はラインが終了の場合の処理領域と継続境界キューの更新を行う(S67)。また、ライン終了フラグが偽の場合はラインが未終了の場合の処理領域と継続境界キューの更新を行う(S68)。続いて、復号制御部73は、ロスレス圧縮領域の復号(S69)を行う。ステップS67、S68、S69の処理の詳細は後述する。   Next, the decoding control unit 73 determines a line end flag described later (S66), and if the line end flag is true, updates the processing area and the continuation boundary queue when the line is ended (S67). If the line end flag is false, the processing area and the continuation boundary queue when the line is not finished are updated (S68). Subsequently, the decoding control unit 73 performs decoding of the lossless compressed area (S69). Details of the processing in steps S67, S68, and S69 will be described later.

次に、復号制御部73は、処理領域が注目ラインの右端に達したか否かを判定する(S70)。処理領域が注目ラインの右端に達していない場合は注目ラインの境界残数RLc>0か否かを判定する(S71)。処理領域が注目ラインの右端に達せず、かつ、境界残数RLc>0の場合は処理領域の右側にロスレス圧縮領域が存在するため、復号制御部73は、処理をステップS63に戻す。 Next, the decoding control unit 73 determines whether or not the processing area has reached the right end of the line of interest (S70). If the processing area has not reached the right end of the line of interest, it is determined whether the remaining number of boundaries R Lc of the line of interest is greater than 0 (S71). If the processing area does not reach the right end of the line of interest and the remaining number of boundaries R Lc > 0, the lossless compression area exists on the right side of the processing area, and the decoding control unit 73 returns the process to step S63.

また、処理領域が注目ラインの右端に達せず、境界残数RLc=0の場合は処理領域の右側にはロッシー圧縮領域だけが存在する。この場合、復号制御部73は、画素数計算部67、画素選択部72を用いて、右側ロッシー圧縮領域の処理を行う(S72)。 When the processing area does not reach the right end of the line of interest and the remaining number of boundaries R Lc = 0, only the lossy compression area exists on the right side of the processing area. In this case, the decoding control unit 73 uses the pixel number calculation unit 67 and the pixel selection unit 72 to process the right lossy compression area (S72).

右側ロッシー圧縮領域の処理は、注目ライン上の、後続境界の終端境界のX座標に基づきロッシー圧縮領域の画素数N2を算出し、画素読込部71が読み込んだ画素データのうち、画素数N2分の画素データを書出処理部54に出力する処理である。言い替えれば、注目ラインの終端境界の直後から右端までの画素データが出力される。   The processing of the right-side lossy compression area calculates the number of pixels N2 of the lossy compression area based on the X coordinate of the end boundary of the subsequent boundary on the line of interest, and calculates the number of pixels N2 of the pixel data read by the pixel reading unit 71. This is a process of outputting the pixel data of (1) to the writing processing unit 54. In other words, pixel data from immediately after the end boundary of the line of interest to the right end is output.

処理領域が注目ラインの右端に達した場合、または、右側ロッシー圧縮領域の処理を行った後、復号制御部73は、処理をステップS62に戻す。   When the processing area has reached the right end of the line of interest or after performing the processing for the right lossy compression area, the decoding control unit 73 returns the processing to step S62.

●後続境界の取得処理
図8のフローチャートにより後続境界の取得処理(S63)を説明する。復号制御部73は、ライン終了フラグを偽に初期化する(S81)。次に、境界読込部61は、境界データを取得する必要性を判定するために境界残数RNと新規境界バッファの状態を判定する(S82)。そして、境界残数RN>0、かつ、新規境界バッファが空の場合はメモリ55から境界データを取得して、取得した境界データを新規境界バッファに格納する(S83)。
The following boundary acquisition process (S63) will be described with reference to the flowchart of FIG. The decoding control unit 73 initializes the line end flag to false (S81). Next, the boundary reading unit 61 determines the state of the boundary remaining number R N and the new boundary buffer to determine the need to obtain the boundary data (S82). If the remaining boundary number R N > 0 and the new boundary buffer is empty, the boundary data is acquired from the memory 55, and the acquired boundary data is stored in the new boundary buffer (S83).

一方、継続境界キュー62は、継続境界データを設定する必要性を判定するために注目ラインの境界残数RLcと継続境界バッファの状態を判定する(S84)。そして、境界残数RLc>0、かつ、継続境界バッファが空の場合は、FIFOから取り出した境界データを継続境界バッファに格納する(S85)。 On the other hand, the continuation boundary queue 62 determines the remaining number RLc of the boundary of the line of interest and the state of the continuation boundary buffer in order to determine the necessity of setting the continuation boundary data (S84). If the remaining number of boundaries R Lc > 0 and the continuous boundary buffer is empty, the boundary data extracted from the FIFO is stored in the continuous boundary buffer (S85).

次に、境界比較部63は、境界選択部64を制御して後続境界を選択する(S86)。後続境界が新規境界に等しい場合は後続境界として新規境界が選択され、新規境界が後続境界記憶部に格納される(S87)。「後続境界=新規境界」とは、新規境界バッファが空ではなく継続境界バッファが空の場合、または、注目ラインにおいて新規境界のX座標が継続境界のX座標より小さい場合である。この場合、境界読込部61は、境界残数RNをデクリメントし、新規境界バッファを空にする(S88)。 Next, the boundary comparing unit 63 controls the boundary selecting unit 64 to select a subsequent boundary (S86). If the subsequent boundary is equal to the new boundary, a new boundary is selected as the subsequent boundary, and the new boundary is stored in the subsequent boundary storage unit (S87). “Subsequent boundary = new boundary” means that the new boundary buffer is not empty and the continuous boundary buffer is empty, or that the X coordinate of the new boundary is smaller than the X coordinate of the continuous boundary in the line of interest. In this case, the boundary reading unit 61 decrements the border remaining number R N, emptying the new boundary buffer (S88).

また、後続境界が継続境界に等しい場合は後続境界として継続境界が選択され、継続境界が後続境界記憶部に格納される(S89)。「後続境界=継続境界」とは、継続境界バッファが空ではなく新規境界バッファが空の場合、または、注目ラインにおいて継続境界のX座標が新規境界のX座標より小さい場合である。この場合、継続境界キュー62は、注目ラインの境界残数RLcをデクリメントし、継続境界バッファを空にする(S90)。 If the subsequent boundary is equal to the continuation boundary, the continuation boundary is selected as the subsequent boundary, and the continuation boundary is stored in the subsequent boundary storage unit (S89). “Subsequent boundary = continuous boundary” means that the continuous boundary buffer is not empty and the new boundary buffer is empty, or that the X coordinate of the continuous boundary is smaller than the X coordinate of the new boundary in the line of interest. In this case, the continuation boundary queue 62 decrements the remaining line boundary number R Lc of the line of interest, and empties the continuation boundary buffer (S90).

また、新規境界バッファが空、かつ、継続境界バッファが空の場合、境界比較部63は、後続境界が存在しないことを示すために後続境界記憶部65を空にする(S91)。   When the new boundary buffer is empty and the continuous boundary buffer is empty, the boundary comparison unit 63 empties the subsequent boundary storage unit 65 to indicate that there is no subsequent boundary (S91).

「後続境界=新規境界」の場合、復号制御部73は、新規境界の先頭Y座標と注目ラインのY座標を判定する(S92)。両者が一致する場合、注目ラインに後続境界が存在し、後続境界の取得処理が終了する。   When “subsequent boundary = new boundary”, the decoding control unit 73 determines the start Y coordinate of the new boundary and the Y coordinate of the line of interest (S92). If they match, a subsequent boundary exists in the line of interest, and the process of acquiring the subsequent boundary ends.

また「後続境界=継続境界」の場合、復号制御部73は、境界残数RLcを判定する(S93)。境界残数RLcが1以上(RLc>0)場合は注目ライン上に未処理の境界が存在する。この場合、復号制御部73は、後続境界の取得処理を終了する。また、境界残数RLcが0(RLc=0)場合は後続境界が注目ライン上の最後の境界である。 If “subsequent boundary = continuous boundary”, the decoding control unit 73 determines the number of remaining boundaries R Lc (S93). When the remaining number of boundaries R Lc is 1 or more (R Lc > 0), an unprocessed boundary exists on the target line. In this case, the decoding control unit 73 ends the subsequent boundary acquisition processing. When the remaining number of boundaries R Lc is 0 (R Lc = 0), the subsequent boundary is the last boundary on the line of interest.

下記の何れかの場合は注目ラインに後続境界が存在せず、復号制御部73は、ライン終了フラグを真に設定し(S94)、後続境界の取得処理を終了する。
・後続境界記憶部65を空にした場合(S91)、
・新規境界の先頭Y座標≠注目ラインのY座標の場合(S92)、
・注目ラインの境界残数RLc=0の場合(S93)。
●ラインが未終了の場合の処理領域と継続境界キューの更新
図9のフローチャートによりラインが未終了の場合の処理領域と継続境界キュー62の更新処理(S68)を説明する。復号制御部73は、更新後の処理領域として、注目ラインの、後続境界の開始境界のX座標から終端境界のX座標を設定する(S101)。
In any of the following cases, there is no subsequent boundary in the line of interest, and the decoding control unit 73 sets the line end flag to true (S94), and ends the subsequent boundary acquisition processing.
When the subsequent boundary storage unit 65 is empty (S91),
-If the start Y coordinate of the new boundary ≠ the Y coordinate of the line of interest (S92),
-When the remaining number of boundaries R Lc = 0 of the line of interest is (S93).
Update of Processing Area and Continuation Boundary Queue When Line is Not Completed The update processing (S68) of the processing area and continuation boundary queue 62 when the line is not completed will be described with reference to the flowchart of FIG. The decoding control unit 73 sets the X coordinate of the end boundary from the X coordinate of the start boundary of the subsequent boundary of the target line as the updated processing area (S101).

次に、復号制御部73は、処理領域記憶部66に記憶された更新前の処理領域の右端と、更新後の処理領域の左端が連続するか否かを判定する(S102)。両者が連続しない場合は更新前の処理領域と更新後の処理領域の間にロッシー圧縮領域が存在する。この場合、復号制御部73は、画素数計算部67、画素選択制御部69、画素読込部71、画素選択部72を用いて、中間ロッシー圧縮領域の処理を行う(S103)。   Next, the decoding control unit 73 determines whether the right end of the pre-update processing area stored in the processing area storage unit 66 and the left end of the post-update processing area are continuous (S102). If the two are not continuous, there is a lossy compression area between the processing area before update and the processing area after update. In this case, the decoding control unit 73 performs processing of the intermediate lossy compression area using the pixel number calculation unit 67, the pixel selection control unit 69, the pixel reading unit 71, and the pixel selection unit 72 (S103).

中間ロッシー圧縮領域の処理は、注目ライン上の、更新前後の処理領域のX座標に基づきロッシー圧縮領域の画素数N2を算出し、画素読込部71が読み込んだ画素データのうち、画素数N2分の画素データを書出処理部54に出力する処理である。言い替えれば、更新前の処理領域と更新後の処理領域の間の画素データが出力される。   In the processing of the intermediate lossy compression area, the number of pixels N2 of the lossy compression area is calculated based on the X coordinate of the processing area before and after the update on the target line, and the pixel data read by the pixel reading unit 71 is equivalent to the number of pixels N2. This is a process of outputting the pixel data of (1) to the writing processing unit 54. In other words, pixel data between the processing area before the update and the processing area after the update is output.

次に、復号制御部73は、更新後の処理領域を処理領域記憶部66に格納し(S104)、後続境界の末尾Y座標と注目ラインのY座標が一致するか否かを判定する(S105)。   Next, the decoding control unit 73 stores the updated processing area in the processing area storage unit 66 (S104), and determines whether the end Y coordinate of the subsequent boundary matches the Y coordinate of the line of interest (S105). ).

後続境界の末尾Y座標と注目ラインのY座標が一致する場合、次のロスレス圧縮領域の復号(S69)によって、当該後続境界の復号処理が完了するため、当該後続境界を継続境界キュー62に保持する必要がない。一方、後続境界の末尾Y座標と注目ラインのY座標が一致しない場合は当該後続境界を継続境界キュー62に保持する必要がある。従って、後続境界の末尾Y座標と注目ラインのY座標が一致しない場合、復号制御部73は、後続境界を継続境界キュー62のFIFOに入力し、次ラインの境界残数RLnをインクリメントする(S106)。 When the trailing Y coordinate of the succeeding boundary matches the Y coordinate of the line of interest, the decoding of the succeeding boundary is completed by decoding the next lossless compressed area (S69). No need to do. On the other hand, if the end Y coordinate of the subsequent boundary does not match the Y coordinate of the line of interest, the subsequent boundary needs to be held in the continuous boundary queue 62. Therefore, when the end Y coordinate of the subsequent boundary does not match the Y coordinate of the line of interest, the decoding control unit 73 inputs the subsequent boundary to the FIFO of the continuous boundary queue 62 and increments the remaining number R Ln of boundary of the next line ( S106).

以上で、ラインが未終了の場合の処理領域と継続境界キュー62の更新処理が終了する。   Thus, the processing for updating the processing area and the continuation boundary queue 62 when the line is not completed is completed.

●ラインが終了の場合の処理領域と継続境界キューの更新
図10のフローチャートによりラインが終了の場合の処理領域と継続境界キュー62の更新処理(S67)を説明する。復号制御部73は、注目ラインのY座標をインクリメントし(S111)、継続境界キュー62の次ラインの境界残数RLnを注目ラインの境界残数RLcにコピーして(S112)、境界残数RLnをクリアする(S113)。
Update of Processing Area and Continuation Boundary Queue When Line Ends The update processing (S67) of the processing area and continuation boundary queue 62 when the line ends will be described with reference to the flowchart of FIG. The decoding control unit 73 increments the Y coordinate of the line of interest (S111), copies the remaining number R Ln of the next line of the continuous boundary queue 62 to the remaining number R Lc of the line of interest (S112), and The number R Ln is cleared (S113).

次に、復号制御部73は、後続境界として新規境界が選択されたか否かの判定(S114)、継続境界が選択されたか否かの判定(S115)を行い、判定結果に基づき処理を分岐する。   Next, the decoding control unit 73 determines whether a new boundary is selected as a subsequent boundary (S114), determines whether a continuous boundary is selected (S115), and branches the process based on the determination result. .

「後続境界=新規境界」の場合は注目ラインから新規境界の先頭Y座標の前ラインまでロスレス圧縮領域が存在しない。この場合、復号制御部73は、更新Y座標として後続境界の先頭Y座標を設定する(S116)。そして、条件(注目ラインのY座標<更新Y座標)が満たされる間、ラインのロッシー圧縮領域の処理と、注目ラインのインクリメントを繰り返す(S117)。   In the case of “subsequent boundary = new boundary”, there is no lossless compression area from the target line to the line before the leading Y coordinate of the new boundary. In this case, the decoding control unit 73 sets the leading Y coordinate of the subsequent boundary as the updated Y coordinate (S116). Then, while the condition (Y coordinate of target line <updated Y coordinate) is satisfied, the process of the lossy compression area of the line and the increment of the target line are repeated (S117).

ラインのロッシー圧縮領域の処理は、条件を満たすラインについて、矩形領域の幅をロッシー圧縮領域の画素数N2として、画素読込部71が読み込んだ画素データのうち、画素数N2分の画素データを書出処理部54に出力する処理である。言い替えれば、ライン全体の画素データが出力される。   In the process of the line lossy compression area, for the line satisfying the condition, the width of the rectangular area is set to the pixel number N2 of the lossy compression area, and the pixel data of the pixel number N2 of the pixel data read by the pixel reading unit 71 is written. This is a process of outputting to the output processing unit 54. In other words, pixel data of the entire line is output.

次に、復号制御部73は、注目ラインの、後続境界の開始境界のX座標から終端境界のX座標を更新後の処理領域に設定し、更新後の処理領域を処理領域記憶部66に格納し(S118)、処理をステップS123に進める。   Next, the decoding control unit 73 sets the X coordinate of the end boundary from the X coordinate of the start boundary of the subsequent boundary to the updated processing area in the target line, and stores the updated processing area in the processing area storage unit 66. (S118), and the process proceeds to step S123.

また「後続境界=継続境界」の場合、復号制御部73は、注目ラインの、後続境界の開始境界のX座標から矩形領域の右端のX座標を更新後の処理領域に設定し、更新後の処理領域を処理領域記憶部66に格納し(S119)、処理をステップS123に進める。   In the case of “subsequent boundary = continuous boundary”, the decoding control unit 73 sets the X coordinate of the right end of the rectangular area from the X coordinate of the start boundary of the subsequent boundary of the target line in the updated processing area, and The processing area is stored in the processing area storage unit 66 (S119), and the process proceeds to step S123.

また、後続境界として何れの新規境界も継続境界も選択されなかった場合、言い替えれば、後続境界が存在しない場合、注目ラインから矩形領域の最終ラインまでロスレス圧縮領域が存在しない。この場合、復号制御部73は、更新Y座標として最終ラインのY座標を設定する(S120)。そして、条件(注目ラインのY座標≦更新Y座標)が満たされる間、ステップS117と同様に、ラインのロッシー圧縮領域の処理と、注目ラインのインクリメントを実行する(S121)。続いて、復号制御部73は、処理領域記憶部66を空にして(S122)、処理領域と継続境界キュー62の更新処理を終了する。   Further, when neither a new boundary nor a continuation boundary is selected as the subsequent boundary, in other words, when there is no subsequent boundary, there is no lossless compression area from the target line to the last line of the rectangular area. In this case, the decoding control unit 73 sets the Y coordinate of the last line as the updated Y coordinate (S120). Then, as long as the condition (Y coordinate of the line of interest ≦ updated Y coordinate) is satisfied, the process of the lossy compression area of the line and the increment of the line of interest are executed as in step S117. Subsequently, the decoding control unit 73 empties the processing area storage unit 66 (S122), and ends the processing for updating the processing area and the continuous boundary queue 62.

後続境界が存在する場合、復号制御部73は、後続境界を継続境界キュー62のFIFOに入力し、次ラインの境界残数RLnをインクリメントして(S123)、処理領域と継続境界キュー62の更新処理を終了する。 When there is a subsequent boundary, the decoding control unit 73 inputs the subsequent boundary to the FIFO of the continuous boundary queue 62, increments the remaining number R Ln of the boundary of the next line (S123), and outputs the processing area and the continuous boundary queue 62. The update processing ends.

●ロスレス圧縮領域の復号
図11のフローチャートによりロスレス圧縮領域の復号処理(S69)を説明する。復号制御部73は、処理領域記憶部66が空か否かを判定し(S131)、処理領域記憶部66が空の場合(処理領域が設定されていない)場合は、ロスレス圧縮領域の復号処理を終了する。
[Decoding of Lossless Compressed Area] The decoding processing (S69) of the lossless compressed area will be described with reference to the flowchart of FIG. The decoding control unit 73 determines whether or not the processing area storage unit 66 is empty (S131). If the processing area storage unit 66 is empty (the processing area is not set), the decoding processing of the lossless compression area is performed. To end.

処理領域記憶部66に処理領域が格納されている場合、復号制御部73は、画素数計算部67、画素選択制御部69、領域色抽出部70、画素選択部72を用いて、処理領域の、後続境界が示す領域色の画素データを書出処理部54に出力する(S132)。また、復号制御部73は、処理領域において、画素読込部71が入力した画素データを削除する(S133)。これにより、注目ラインの処理領域(ロスレス圧縮領域)の画素データが復号される。   When the processing region is stored in the processing region storage unit 66, the decoding control unit 73 uses the pixel number calculation unit 67, the pixel selection control unit 69, the region color extraction unit 70, and the pixel selection unit 72 to set the processing region. Then, the pixel data of the area color indicated by the subsequent boundary is output to the writing processing unit 54 (S132). Further, the decoding control unit 73 deletes the pixel data input by the pixel reading unit 71 in the processing area (S133). As a result, the pixel data of the processing area (lossless compression area) of the target line is decoded.

[画像復号動作]
以下では、上記の画像復号装置を含むシステムにおける画像復号動作について説明する。
●ビットマップデータの構成
図12にビットマップデータの一例を示す。図12(A)はビットマップデータのメモリイメージを示す。図12(A)は、ビットマップデータが一つのビットマップ1を含み、ビットマップ1が、水平、垂直方向それぞれ二つの矩形領域(矩形領域1、矩形領域2、矩形領域3、矩形領域4)を含む場合のビットマップデータの一例を示す。つまり、ビットマップ1のヘッダが記憶され、ヘッダの後に、矩形領域のロスレス圧縮データと、矩形領域のロッシー圧縮データが記憶されている。
[Image decoding operation]
Hereinafter, an image decoding operation in a system including the above-described image decoding device will be described.
● Configuration of Bitmap Data FIG. 12 shows an example of bitmap data. FIG. 12A shows a memory image of bitmap data. FIG. 12A shows that the bitmap data includes one bitmap 1, and the bitmap 1 has two rectangular areas in the horizontal and vertical directions (rectangular area 1, rectangular area 2, rectangular area 3, and rectangular area 4). 9 shows an example of bitmap data in the case of including. That is, the header of the bitmap 1 is stored, and lossless compressed data of the rectangular area and lossy compressed data of the rectangular area are stored after the header.

図12(B)はビットマップ1のヘッダの構成例を示す。「ビットマップサイズ」フィールドが示すように、ビットマップ1は、水平方向Wが2、垂直方向Hが2の計4個の矩形領域から構成される。「チャネル数」フィールドが示すように、ビットマップ1は、RGB3チャネルを有す。「ビット精度」フィールドが示すように、各チャネルは8ビットである。   FIG. 12B shows a configuration example of the header of bitmap 1. As indicated by the “bitmap size” field, the bitmap 1 is composed of a total of four rectangular areas, two in the horizontal direction W and two in the vertical direction H. As indicated by the “number of channels” field, bitmap 1 has three RGB channels. As indicated by the "bit precision" field, each channel is 8 bits.

ロスレス圧縮データのポインタマップは、上から順に、矩形領域1のロスレス圧縮データの先頭アドレス、…、矩形領域4のロスレス圧縮データ先頭アドレスを示す。ロッシー圧縮データのポインタマップは、上から順に、矩形領域1のロッシー圧縮データの先頭アドレス、…、矩形領域4のロッシー圧縮データ先頭アドレスを示す。   The pointer map of the lossless compressed data indicates the head address of the lossless compressed data of the rectangular area 1,..., The head address of the lossless compressed data of the rectangular area 4 in order from the top. The pointer map of the lossy compressed data indicates, in order from the top, the start address of the lossy compressed data of the rectangular area 1,..., The start address of the lossy compressed data of the rectangular area 4.

●画像処理装置の構成
図13のブロック図により上記の画像復号装置を含む画像処理装置のシステム構成例を示す。
Configuration of Image Processing Device FIG. 13 is a block diagram showing an example of a system configuration of an image processing device including the above-described image decoding device.

CPU141は、RAM142をワークメモリとして、ROMやフラッシュメモリなどを含む記憶部143に格納されたOSや各種プログラムを実行してシステム全体を制御する。外部インタフェイス(外部I/F)144は、外部の装置(例えば情報処理装置やスキャナ)と接続するためのUSBカードや、ネットワークに接続するためのEthernet(登録商標)カードなど通信インタフェイスである。   The CPU 141 controls the entire system by executing the OS and various programs stored in the storage unit 143 including the ROM and the flash memory using the RAM 142 as a work memory. The external interface (external I / F) 144 is a communication interface such as a USB card for connecting to an external device (for example, an information processing device or a scanner) or an Ethernet (registered trademark) card for connecting to a network. .

画像復号装置145は、上述した画像復号装置であり、外部I/F144を介して入力される符号化圧縮された画像データの復号処理を行う。画像処理装置146は、画像復号装置145が復号した画像データに例えば高画質化処理を施したり、画像データを印刷装置147の入力データフォーマットに変換するなどの画像処理を行う。印刷装置147は、入力される画像データに基づき、記録材(トナーやインク)を用いて記録媒体に画像を形成する。   The image decoding device 145 is the above-described image decoding device, and performs a decoding process on the encoded and compressed image data input via the external I / F 144. The image processing device 146 performs image processing such as performing high-quality processing on the image data decoded by the image decoding device 145 or converting the image data into the input data format of the printing device 147, for example. The printing device 147 forms an image on a recording medium using a recording material (toner or ink) based on the input image data.

インターコネクト148は、共有バスやスイッチなどによって構成された、CPU141、RAM142、記憶部143、外部I/F144、画像復号装置145、画像処理装置146、印刷装置147の間のデータ転送路である。   The interconnect 148 is a data transfer path between the CPU 141, the RAM 142, the storage unit 143, the external I / F 144, the image decoding device 145, the image processing device 146, and the printing device 147, which is configured by a shared bus, a switch, and the like.

外部I/F144は、図示しない情報処理装置やプリントサーバからシリアルバスやネットワークを介して、ソースビットマップデータを受信する。外部I/F144は、割込信号などによって、データを受信したことをCPU141に通知する。CPU141は、外部I/F144を制御して、ソースビットマップデータをRAM142に転送する。図12(A)は、RAM142に記憶されたソースビットマップデータのメモリイメージを示している。   The external I / F 144 receives source bitmap data from an information processing device or a print server (not shown) via a serial bus or a network. The external I / F 144 notifies the CPU 141 that the data has been received by an interrupt signal or the like. The CPU 141 controls the external I / F 144 to transfer the source bitmap data to the RAM 142. FIG. 12A shows a memory image of the source bitmap data stored in the RAM 142.

CPU141は、ソースビットマップデータの先頭アドレス0x3000_0000と、復号指示を画像復号装置145に通知する。復号指示の通知方法として、画像復号装置145が、ソースビットマップデータのアドレスと復号指示を受信する制御レジスタを備え、CPU141が当該制御レジスタにソースビットマップデータのアドレスと復号指示を書き込む手法が知られている。また、CPU141は、画像復号装置145に、復号データを書き込むバッファの先頭アドレスを通知する。   The CPU 141 notifies the image decoding device 145 of the start address 0x3000_0000 of the source bitmap data and the decoding instruction. As a method of notifying the decoding instruction, there is known a method in which the image decoding device 145 includes a control register for receiving the address of the source bitmap data and the decoding instruction, and the CPU 141 writes the address of the source bitmap data and the decoding instruction to the control register. Have been. Further, the CPU 141 notifies the image decoding device 145 of the head address of the buffer in which the decoded data is to be written.

復号指示を受けた画像復号装置145の(図5に示す)制御部51は、アドレス0x3000_0000から、ビットマップ1のヘッダを読み込み、ビットマップサイズ(W、H)に基づき、四つ矩形領域の存在を認識する。そして、制御部51は、矩形領域の数4、チャネル数3、ビット精度8をロッシー復号部52、ロスレス復号部53、書出処理部54に通知する。この通知により、ロッシー復号部52、ロスレス復号部53、書出処理部54は、復号結果を3チャネル、各チャネル8ビットとして転送するように設定される。   The control unit 51 (shown in FIG. 5) of the image decoding device 145 that has received the decoding instruction reads the header of the bitmap 1 from the address 0x3000_0000, and based on the bitmap size (W, H), the presence of four rectangular areas. Recognize. Then, the control unit 51 notifies the lossy decoding unit 52, the lossless decoding unit 53, and the writing processing unit 54 of the number 4 of rectangular areas, the number of channels 3, and the bit precision 8. With this notification, the lossy decoding unit 52, the lossless decoding unit 53, and the writing processing unit 54 are set to transfer the decoding result as 3 channels and 8 bits for each channel.

次に制御部51は、図2(B)に示すロスレス圧縮データのポインタマップから矩形領域1のロスレスデータのポインタを読み出し、当該ポインタをロスレス復号部53に転送する。また、ロッシー圧縮データのポインタマップから矩形領域1のロッシーデータのポインタを読み出し、当該ポインタをロッシー復号部52に転送する。   Next, the control unit 51 reads the pointer of the lossless data of the rectangular area 1 from the pointer map of the lossless compressed data shown in FIG. 2B, and transfers the pointer to the lossless decoding unit 53. Further, the pointer of the lossy data of the rectangular area 1 is read from the pointer map of the lossy compressed data, and the pointer is transferred to the lossy decoding unit 52.

ロッシー復号部52は、ポインタが示すアドレス0x3000_0410からロッシーデータを読み出して、当該データを復号し、復号結果の画素データをライン順(Y座標の昇順)かつX座標の昇順にロスレス復号部53に転送する。   The lossy decoding unit 52 reads the lossy data from the address 0x3000_0410 indicated by the pointer, decodes the data, and transfers the decoded pixel data to the lossless decoding unit 53 in line order (ascending order of Y coordinate) and in ascending order of X coordinate. I do.

ロスレス復号部53は、ポインタが示すアドレス0x3000_0010からロスレスデータを読み出し、当該データを復号し、復号結果の画素データをライン順(Y座標の昇順)かつX座標の昇順に書出処理部54に転送する。   The lossless decoding unit 53 reads the lossless data from the address 0x3000_0010 indicated by the pointer, decodes the data, and transfers the decoded pixel data to the writing processing unit 54 in line order (ascending order of Y coordinate) and in ascending order of X coordinate. I do.

このように、任意の境界を挟んでロッシー圧縮領域とロスレス圧縮領域が混在する矩形領域において、境界情報を参照しながらラスタ順にロッシー圧縮データの伸長結果またはロスレス圧縮データの伸長結果を出力する。そのため、ロッシー圧縮データの伸長結果の全てをメモリに格納しロスレス圧縮領域はロスレス圧縮データの伸長結果により上書きすることなく、当該矩形領域の符号化圧縮された画像データを得られる。言い替えれば、インターコネクト148を介してRAM142に転送される画素データは、ロッシー圧縮データから復号されたロッシー圧縮領域の画素データ、および/または、ロスレス圧縮データから復号されたロスレス圧縮領域の画素データである。つまり、ロッシー圧縮データから復号されたロスレス圧縮領域の画素データのインターコネクト148を介した転送が不要になり、システムバス帯域およびメモリ帯域の余分な消費を防ぐことができる。   As described above, in a rectangular area in which the lossy compression area and the lossless compression area are mixed with an arbitrary boundary interposed therebetween, the expansion result of the lossy compression data or the expansion result of the lossless compression data is output in raster order while referring to the boundary information. Therefore, all of the expansion results of the lossy compressed data are stored in the memory, and the encoded data of the rectangular area can be obtained without overwriting the lossless compressed area with the expansion results of the lossless compressed data. In other words, the pixel data transferred to the RAM 142 via the interconnect 148 is pixel data of the lossy compression area decoded from the lossy compression data, and / or pixel data of the lossless compression area decoded from the lossless compression data. . That is, it is not necessary to transfer pixel data in the lossless compression area decoded from the lossy compression data via the interconnect 148, so that unnecessary consumption of the system bus band and the memory band can be prevented.

[変形例]
図15のブロック図により画像復号装置の変形例を示す。図15に示す画像復号装置は、画素数計算部67の代わりに、座標管理部74を備える。座標管理部74は、ビットマップデータにおける復号中の画素の座標を管理し、画素の座標が、開始境界を右端とするロスレス圧縮領域に属すか、終端境界を右端とするロッシー圧縮領域に属すかを示す制御情報を生成する。つまり、一画素ごとに判定処理を行う。
[Modification]
A modified example of the image decoding device is shown by the block diagram of FIG. The image decoding device illustrated in FIG. 15 includes a coordinate management unit 74 instead of the pixel number calculation unit 67. The coordinate management unit 74 manages the coordinates of the pixel being decoded in the bitmap data, and determines whether the coordinates of the pixel belong to a lossless compression area with the start boundary at the right end or a lossy compression area with the end boundary at the right end. Is generated. That is, the determination process is performed for each pixel.

座標管理部74は、復号対象のビットマップデータ(水平、垂直の画素数をそれぞれH、Wとする)の原点座標(0, 0)から、座標(W-1, H-1)まで逐次カウントアップする。つまり(0, 0)、…、(W-1, 0)、(0, 1)、…、(W-1, 1)、…、(0, H-1)、…、(W-1, H-1)のように、主走査線方向に座標をカウントアップし、右端に達すると副走査線方向に座標をカウントアップする。つまり、座標管理部74はラスタースキャン順に座標を示すデータを生成する。そして、座標管理部74は、画素選択制御部69に対して、常に一画素を処理する制御情報を生成する。   The coordinate management unit 74 sequentially counts from the origin coordinates (0, 0) to the coordinates (W-1, H-1) of the bitmap data to be decoded (the horizontal and vertical pixel numbers are H and W, respectively). Up. That is, (0, 0), ..., (W-1, 0), (0, 1), ..., (W-1, 1), ..., (0, H-1), ..., (W-1, As shown in H-1), the coordinates are counted up in the main scanning line direction, and when reaching the right end, the coordinates are counted up in the sub scanning line direction. That is, the coordinate management unit 74 generates data indicating the coordinates in the raster scan order. Then, the coordinate management unit 74 generates control information for always processing one pixel for the pixel selection control unit 69.

[第2実施例]
以下、本発明にかかる第2実施例の画像復号装置および画像復号方法を説明する。なお、第2実施例において、第1実施例と略同様の構成については、同一の符号を付して、その詳細な説明を省略する場合がある。
[Second embodiment]
Hereinafter, an image decoding apparatus and an image decoding method according to the second embodiment of the present invention will be described. In the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof may be omitted.

図16のブロック図により第2実施例の画像復号装置を適用したレンダリングシステムを有する画像処理装置の構成例を示す。なお、図13に示す構成と略同様の構成には同一符号を付して、その詳細説明を省略する。   An example of the configuration of an image processing apparatus having a rendering system to which the image decoding apparatus according to the second embodiment is applied is shown in the block diagram of FIG. Note that the same components as those shown in FIG. 13 are denoted by the same reference numerals, and detailed description thereof will be omitted.

図16に示すレンダリングシステムは、ページ記述言語(PDL)によって記述された印刷データを、中間データに変換し、中間データに基づいてレンダリングを行い、ビットマップデータを生成する。印刷データは一個以上の描画要素を含み、描画要素はテキスト、グラフィック図形、ビットマップイメージを含む。   The rendering system shown in FIG. 16 converts print data described in a page description language (PDL) into intermediate data, performs rendering based on the intermediate data, and generates bitmap data. The print data includes one or more drawing elements, and the drawing elements include text, graphic figures, and bitmap images.

中間データ生成部151は、CPU141が実行するソフトウェアとして実装され、RAM142から読み出した印刷データを中間データに変換し、中間データをRAM142に書き込む。生成される中間データは、レンダラ制御情報、各描画要素の境界情報、塗り情報および合成(ブレンド)情報、並びに、ビットマップイメージを含む。また、中間データに含まれるビットマップイメージは、多くの場合、符号化圧縮されている。   The intermediate data generation unit 151 is implemented as software executed by the CPU 141, converts print data read from the RAM 142 into intermediate data, and writes the intermediate data into the RAM 142. The generated intermediate data includes renderer control information, boundary information of each drawing element, paint information and combination (blend) information, and a bitmap image. In addition, the bitmap image included in the intermediate data is often encoded and compressed.

レンダラ制御部152は、中間データに含まれるレンダラ制御情報に基づきレンダラ155を制御する。レンダラ制御部152は、画像復号装置の制御部51の機能を包含するとともに、描画要素処理部153、レンダラ書出処理部154に制御情報を出力する。   The renderer control unit 152 controls the renderer 155 based on the renderer control information included in the intermediate data. The renderer control unit 152 includes the function of the control unit 51 of the image decoding device, and outputs control information to the rendering element processing unit 153 and the renderer writing processing unit 154.

描画要素処理部153は、中間データに含まれる描画要素の境界情報、塗り情報および合成情報を読み込み、ページを構成する画素データを生成し、レンダラ書出処理部154に出力する。描画要素がビットマップイメージの場合、描画要素処理部153は、制御情報に基づき、RAM142からビットマップイメージを読み込み、必要に応じて補間処理を行ったビットマップイメージにグラフィック図形やテキストの画素を合成する。   The drawing element processing unit 153 reads the boundary information, the painting information, and the combination information of the drawing element included in the intermediate data, generates pixel data forming a page, and outputs the pixel data to the renderer writing processing unit 154. When the drawing element is a bitmap image, the drawing element processing unit 153 reads the bitmap image from the RAM 142 based on the control information, and synthesizes a graphic figure or text pixel with the bitmap image subjected to the interpolation processing as necessary. I do.

レンダラ書出処理部154は、描画要素処理部153から入力される画素データを、RAM142の所定のアドレスに書き込む。   The renderer writing processing unit 154 writes the pixel data input from the drawing element processing unit 153 to a predetermined address of the RAM 142.

レンダラ155は、画像復号部と中間データ処理部によって構成される。画像復号部は、レンダラ制御部152、ロッシー復号部52、ロスレス復号部53、書出処理部54によって構成される。中間データ処理部は、レンダラ制御部152、描画要素処理部153、レンダラ書出処理部154によって構成される。前述したように、レンダラ制御部152は、画像復号部と中間データ処理部の構成要素である。   The renderer 155 includes an image decoding unit and an intermediate data processing unit. The image decoding unit includes a renderer control unit 152, a lossy decoding unit 52, a lossless decoding unit 53, and a writing processing unit 54. The intermediate data processing unit includes a renderer control unit 152, a rendering element processing unit 153, and a renderer writing processing unit 154. As described above, the renderer control unit 152 is a component of the image decoding unit and the intermediate data processing unit.

中間データに符号化圧縮された画像データが含まれる場合、レンダラ制御部152は、中間データのレンダラ制御情報に従い、圧縮符号化された画像データの復号制御情報を画像復号部に出力する。画像復号部は、第1実施例において説明したように符号化圧縮されたビットマップイメージを復号し、復号結果をRAM142に書き込む。   When the intermediate data includes the encoded and compressed image data, the renderer control unit 152 outputs the decoding control information of the compression-encoded image data to the image decoding unit according to the renderer control information of the intermediate data. The image decoding unit decodes the bitmap image encoded and compressed as described in the first embodiment, and writes the decoding result into the RAM 142.

次に、レンダラ制御部152は、中間データのレンダラ制御情報に従い、中間データ処理部に制御情報を出力する。描画要素処理部153は、画像復号部によって復号され、RAM142に書き込まれたビットマップイメージを読み込み、ビットマップイメージに他の描画要素の画素データを合成する。   Next, the renderer control unit 152 outputs control information to the intermediate data processing unit according to the renderer control information of the intermediate data. The drawing element processing unit 153 reads the bitmap image decoded by the image decoding unit and written in the RAM 142, and combines the bitmap image with pixel data of another drawing element.

描画要素処理部153は、合成処理によって得た各画素データをレンダラ書出処理部154に出力する。レンダラ書出処理部154は、RAM142の所定のアドレスに画素データを書き込む。以上のレンダリング処理によって、印刷データはビットマップデータに変換され、RAM142に格納される。   The drawing element processing unit 153 outputs each pixel data obtained by the synthesis processing to the renderer writing processing unit 154. The renderer writing processing unit 154 writes pixel data to a predetermined address of the RAM 142. By the above rendering processing, the print data is converted into bitmap data and stored in the RAM 142.

[その他の実施例]
本発明は、上述の実施形態の一以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける一以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、一以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Examples]
The present invention supplies a program realizing one or more functions of the above-described embodiments to a system or an apparatus via a network or a storage medium, and one or more processors in a computer of the system or the apparatus read and execute the program. Processing can also be realized. It can also be realized by a circuit (for example, an ASIC) that realizes one or more functions.

なおロッシー復号部52は、CPUとは別に設けられ、かつ専用のワークメモリを有するプロセッサが、専用のプログラムメモリまたは共用のシステムメモリからプログラムを読み出して実行するソフト処理によっても実現可能である。またロスレス復号部53は、同様の機能を実現する回路によっても実現可能である。さらに、ロッシー復号部52とロスレス復号部53が共にプロセッサであってもよく、ロッシー復号部52とロスレス復号部53が共に専用の回路であってもよい。   Note that the lossy decoding unit 52 can also be realized by software processing in which a processor provided separately from the CPU and having a dedicated work memory reads and executes a program from a dedicated program memory or a shared system memory. The lossless decoding unit 53 can also be realized by a circuit that realizes the same function. Further, both the lossy decoding unit 52 and the lossless decoding unit 53 may be processors, and both the lossy decoding unit 52 and the lossless decoding unit 53 may be dedicated circuits.

52 … ロッシー復号部、53 … ロスレス復号部 52: Lossy decoding unit, 53: Lossless decoding unit

Claims (20)

画像を領域ごとに第1の方式により圧縮された第1のデータと、前記画像における一部領域について、前記第1の方式とは異なる第2の方式により圧縮された第2のデータが混在するデータを復号し、前記画像を出力する画像復号装置であって、
前記第1のデータを復号し、画像を構成する各画素の画素データを出力する第1の復号手段と、
前記第2の方式によって圧縮された圧縮領域を示す境界情報に基づき、前記圧縮領域の前記第2のデータを復号する第2の復号手段と、
前記第2の復号手段から得られる前記画像を構成する各画素の画素データをメモリに書き込む書き込み手段とを有し、
前記第1の復号手段は、前記各画素の画素データを前記第2の復号手段に出力し、
前記第2の復号手段は、
前記境界情報に基づいて処理対象画素が前記圧縮領域かどうかを判定し、
前記圧縮領域を除く画素については前記第1の復号手段から取得した画素データを前記書き込み手段に出力し、前記圧縮領域に含まれる画素については前記第2の復号手段が復号して得られる画素データを前記書き込み手段に出力する
ことを特徴とする画像復号装置。
First data obtained by compressing an image by a first method for each area and second data obtained by compressing a partial area of the image by a second method different from the first method are mixed. An image decoding device that decodes data and outputs the image,
First decoding means for decoding the first data and outputting pixel data of each pixel constituting an image;
Second decoding means for decoding the second data in the compressed area based on boundary information indicating a compressed area compressed by the second method;
Writing means for writing pixel data of each pixel constituting the image obtained from the second decoding means to a memory,
The first decoding means outputs pixel data of each pixel to the second decoding means,
The second decryption means includes:
Determine whether the processing target pixel is the compression area based on the boundary information,
Pixel data obtained from the first decoding unit is output to the writing unit for pixels other than the compressed region, and pixel data obtained by decoding by the second decoding unit for pixels included in the compressed region. Is output to the writing means.
前記第1の復号手段から得られる画素データのうち、前記圧縮領域に含まれる画素の画素データは、前記メモリに格納されないことを特徴とする請求項1に記載の画像復号装置。   2. The image decoding apparatus according to claim 1, wherein, of the pixel data obtained from the first decoding unit, pixel data of a pixel included in the compression area is not stored in the memory. 前記書き込み手段は、前記画像を構成する各画素について、1回ずつ画素データを前記メモリに書き込むことを特徴とする請求項1に記載の画像復号装置。   2. The image decoding apparatus according to claim 1, wherein the writing unit writes pixel data to the memory once for each pixel constituting the image. 前記第2の復号手段は、
新規境界情報として前記境界情報を取得する取得手段と、
継続境界情報として前記境界情報を保持する保持手段と、
前記新規境界情報と前記継続境界情報の一方を、後続する前記圧縮領域を示す後続境界情報として選択する選択手段と、
前記後続境界情報を前記保持手段に入力し、前記後続境界情報に基づき前記圧縮領域の前記第2のータの復号および前記画素データの選択を行う制御手段と
を有することを特徴とする請求項1乃至3のいずれか1項に記載の画像復号装置。
The second decryption means includes:
Acquisition means for acquiring the boundary information as new boundary information,
Holding means for holding the boundary information as continuation boundary information;
Selecting means for selecting one of the new boundary information and the continuation boundary information as subsequent boundary information indicating the succeeding compressed area;
Claims the subsequent boundary information input to said holding means, and having a control unit for decoding and selection of the pixel data of the second data of the compressed area based on the subsequent boundary information Item 4. The image decoding device according to any one of Items 1 to 3.
前記境界情報は、ラインごとに前記圧縮領域の左端を示す開始情報および前記圧縮領域の右端を示す終端情報を含み、
前記制御手段は、前記ラインごとに、前記後続境界情報が示す前記開始情報および前記終端情報に基づき前記圧縮領域の前記第2のータの復号および前記画素データの選択を行う
ことを特徴とする請求項4に記載の画像復号装置。
The boundary information includes, for each line, start information indicating the left end of the compressed area and end information indicating the right end of the compressed area,
Wherein said control means includes a characterized in that it is carried out in each of the lines, the selection of decoding and the pixel data of the second data of the compressed area based on the start information and the end information the indicating subsequent boundary information The image decoding apparatus according to claim 4, wherein
前記境界情報は、さらに、前記圧縮領域の色情報を含み、
前記制御手段は、前記圧縮領域の前記第2のータの復号として、前記開始情報が示す画素の座標から前記終端情報が示す画素の座標まで、前記画素データとして前記色情報を出力する
ことを特徴とする請求項5に記載の画像復号装置。
The boundary information further includes color information of the compression area,
The control means, as a decoding of the second data of the compressed region, from said start information of the pixel shown coordinates to the coordinates of the pixel indicated by the end information, to output the color information as the pixel data The image decoding apparatus according to claim 5, wherein:
前記保持手段は、前記後続境界情報の入力の数を管理するための第1のカウンタ、および、注目ラインに関して保持する前記継続境界情報の数を管理するための第2のカウンタを有する
ことを特徴とする請求項4乃至6のいずれか1項に記載の画像復号装置。
The holding unit includes a first counter for managing the number of inputs of the subsequent boundary information, and a second counter for managing the number of continuation boundary information held for a line of interest. The image decoding device according to any one of claims 4 to 6, wherein
前記保持手段は、前記継続境界情報を入力の順に出力し、前記後続境界情報として前記継続境界情報が選択されると前記第2のカウンタをデクリメントする
ことを特徴とする請求項7に記載の画像復号装置。
The image according to claim 7, wherein the holding unit outputs the continuation boundary information in the order of input, and decrements the second counter when the continuation boundary information is selected as the subsequent boundary information. Decoding device.
前記後続境界情報として前記新規境界情報が選択され、前記新規境界情報が示す前記圧縮領域の先頭ラインと前記注目ラインが1致しない第1の場合、前記後続境界情報として前記継続境界情報が選択され、前記第2のカウンタが0を示す第2の場合、あるいは、前記後続境界情報として選択すべき境界情報が存在しない第3の場合、前記保持手段は前記第1のカウンタの情報を前記第2のカウンタにコピーして前記第1のカウンタをクリアし、前記制御手段は前記注目ラインの座標をインクリメントする
ことを特徴とする請求項8に記載の画像復号装置。
If the new boundary information is selected as the subsequent boundary information, and if the first line of the compressed area indicated by the new boundary information does not coincide with the line of interest, the continuation boundary information is selected as the subsequent boundary information. In the second case where the second counter indicates 0, or in the third case where there is no boundary information to be selected as the subsequent boundary information, the holding unit stores the information of the first counter in the second The image decoding apparatus according to claim 8, wherein the first counter is cleared by copying to the counter, and the control unit increments the coordinates of the line of interest.
前記第1の場合、前記制御手段は、前記注目ラインの座標が前記後続境界情報が示す前記圧縮領域の先頭ラインに達しない間、前記注目ラインの座標のインクリメントと、前記第1の復号手段が復号した画素データの選択を繰り返す
ことを特徴とする請求項9に記載の画像復号装置。
In the first case, while the coordinates of the line of interest do not reach the head line of the compression area indicated by the subsequent boundary information, the control unit may increment the coordinates of the line of interest and determine whether the first decoding unit The image decoding apparatus according to claim 9, wherein selection of decoded pixel data is repeated.
前記第3の場合、前記制御手段は、前記注目ラインの座標が前記画像最終ラインの座標に達するまで、前記注目ラインの座標のインクリメントと、前記第1の復号手段が復号した画素データの選択を繰り返す
ことを特徴とする請求項9又は10に記載の画像復号装置。
In the third case, the control unit increments the coordinates of the line of interest and selects the pixel data decoded by the first decoding unit until the coordinates of the line of interest reaches the coordinates of the last line of the image. 11. The image decoding device according to claim 9, wherein
前記取得手段は、前記画像含まれる前記圧縮領域の数を取得して、前記圧縮領域の残数を管理するための第3のカウンタを有し、前記後続境界情報として前記新規境界情報が選択されると前記第3のカウンタをデクリメントする
ことを特徴とする請求項4乃至11のいずれか1項に記載の画像復号装置。
The acquisition unit acquires the number of the compression region included in the image, a third counter for managing the remaining number of the compression region, the new boundary information is selected as the subsequent boundary information The image decoding device according to any one of claims 4 to 11, wherein the third counter is decremented when done.
前記取得手段は、前記デクリメントの後、前記第3のカウンタが前記圧縮領域の存在を示す場合、前記新規境界情報の取得を行う
ことを特徴とする請求項12に記載の画像復号装置。
The image decoding apparatus according to claim 12, wherein the acquisition unit acquires the new boundary information when the third counter indicates the presence of the compression area after the decrement.
前記第1の方式はロッシー圧縮方式であり、前記第2の方式はロスレス圧縮方式であることを特徴とする請求項1乃至13のいずれか1項に記載の画像復号装置。   14. The image decoding apparatus according to claim 1, wherein the first method is a lossy compression method, and the second method is a lossless compression method. 前記第2の復号手段は、連続する2つの前記境界情報に基づき、前記第1のータの選択を行うことを特徴とする請求項4に記載の画像復号装置。 Said second decoding means, the image decoding apparatus according to claim 4, based on two of the boundary information to be contiguous, and performs selection of the first data. 前記第2のータを選択する領域では、前記第1のータは破棄されることを特徴とする請求項15に記載の画像復号装置。 Wherein in the second region for selecting the data, the image decoding apparatus according to claim 15, wherein the first data is discarded. 前記第1の復号手段は、専用ハードウェアによって構成され、
前記第2の復号手段は、専用のワークメモリを有するプロセッサによって構成され、前記プロセッサが前記第2の復号手段として機能させるためのプログラムを実行する
ことを特徴とする請求項1乃至16のいずれか1項に記載の画像復号装置。
The first decoding means is constituted by dedicated hardware,
The second decoding unit is configured by a processor having a dedicated work memory, and the processor executes a program for causing the processor to function as the second decoding unit. 2. The image decoding device according to claim 1.
請求項1乃至17のいずれか1項に記載の画像復号装置を用いてレンダリングを行う画像処理装置。   An image processing device that performs rendering using the image decoding device according to claim 1. 画像を領域ごとに第1の方式により圧縮された第1のデータと、前記画像における一部領域について、前記第1の方式とは異なる第2の方式により圧縮された第2のデータが混在するデータを復号し、前記画像を出力する画像復号装置の制御方法であって。
第1の復号手段が、前記第1のデータを復号し、画像を構成する各画素の画素データを出力し、
第2の復号手段が、前記第2の方式によって圧縮された圧縮領域を示す境界情報に基づき、前記圧縮領域の前記第2のデータを復号し、
書き込み手段が、前記第2のデータの復号で得られる前記画像を構成する各画素の画素データをメモリに書き込み、
前記第1のデータの復号で得られた各画素の画素データは前記第2のデータの復号処理に渡され、
前記第2のデータの復号では、
前記境界情報に基づいて処理対象画素が前記圧縮領域かどうかを判定し、
前記圧縮領域を除く画素については前記第1のデータの復号で得られた画素データが前記書き込み対象として出力され、前記圧縮領域に含まれる画素については前記第2のデータの復号で得られた画素データが前記書き込み対象として出力される
を特徴とする画像復号方法。
First data obtained by compressing an image by a first method for each area and second data obtained by compressing a partial area of the image by a second method different from the first method are mixed. A method for controlling an image decoding device that decodes data and outputs the image.
First decoding means for decoding the first data, outputting pixel data of each pixel constituting an image,
A second decoding unit that decodes the second data of the compression area based on boundary information indicating a compression area compressed by the second method;
Writing means writes pixel data of each pixel constituting the image obtained by decoding the second data to a memory,
Pixel data of each pixel obtained by decoding the first data is passed to a decoding process of the second data,
In the decoding of the second data,
Determine whether the processing target pixel is the compression area based on the boundary information,
For pixels other than the compressed region, pixel data obtained by decoding the first data is output as the writing target, and for pixels included in the compressed region, pixels obtained by decoding the second data An image decoding method, wherein data is output as the writing target.
コンピュータを請求項1乃至17のいずれか1項に記載の画像復号装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each unit of the image decoding device according to any one of claims 1 to 17 .
JP2016077580A 2015-06-05 2016-04-07 Image decoding apparatus and method, and image processing apparatus Active JP6675253B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/169,993 US9928452B2 (en) 2015-06-05 2016-06-01 Image decoding apparatus and method therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015115036 2015-06-05
JP2015115036 2015-06-05

Publications (3)

Publication Number Publication Date
JP2017005686A JP2017005686A (en) 2017-01-05
JP2017005686A5 JP2017005686A5 (en) 2019-05-16
JP6675253B2 true JP6675253B2 (en) 2020-04-01

Family

ID=57752457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016077580A Active JP6675253B2 (en) 2015-06-05 2016-04-07 Image decoding apparatus and method, and image processing apparatus

Country Status (1)

Country Link
JP (1) JP6675253B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6902861B2 (en) 2016-12-12 2021-07-14 キヤノン株式会社 Coding device, coding method, decoding device, decoding method and generation method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3612035B2 (en) * 2000-11-29 2005-01-19 株式会社アクセル Image processing device
JP2010028796A (en) * 2008-07-22 2010-02-04 Toshiba Corp Image forming apparatus, image converting device, and image forming method
JP4991816B2 (en) * 2009-09-30 2012-08-01 シャープ株式会社 Image processing device

Also Published As

Publication number Publication date
JP2017005686A (en) 2017-01-05

Similar Documents

Publication Publication Date Title
EP0469851B1 (en) Image processing apparatus
JP4854309B2 (en) Data storage control device
JP2008042688A (en) Image processing apparatus and control method thereof, and computer program and computer readable storage medium
US8855438B2 (en) Image processing apparatus, image processing method of image processing apparatus, and program
JP3453407B2 (en) Image processing apparatus, image output apparatus, image output system, and method thereof
JP2002176553A (en) Picture processor, its method, program, and storage medium
US7062087B1 (en) System and method for optimizing color compression using transparency control bits
CN101715038A (en) Image processing apparatus, compression method, and extension method
JP5893379B2 (en) Image compression apparatus, image compression method, and computer program
US20110019911A1 (en) Image processing method, image processing apparatus, and computer-readable medium
JP4405878B2 (en) Image processing apparatus, image processing method, program, and storage medium
US9928452B2 (en) Image decoding apparatus and method therefor
JP6675253B2 (en) Image decoding apparatus and method, and image processing apparatus
JP2017024321A (en) Image processor, image formation device, and image processing time prediction method and program
CA2346761C (en) Method, system, program, and data structure for generating raster objects
JP2008042345A (en) Image processing method and image processor
US9800760B1 (en) Fast drawing of unrotated delta row encoded images
US20110158523A1 (en) Image encoding apparatus, control method, and computer-readable medium
JP3346051B2 (en) Image processing device
JP6775558B2 (en) Image stretcher and its control method and program
JP2002051221A (en) Device, system and method for encoding and decoding image and storage medium
US10182178B2 (en) Parallel fast drawing of unrotated delta row encoded images
US9049404B2 (en) Image processing apparatus and method that perform multiple image processes, and storage medium storing a program thereof, for decompressing a compressed image according to first and second information indicating image processing to be performed
JP2017087514A (en) Image processing device, image processing method, and program
JP6140973B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190328

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190328

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200128

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200210

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200310

R151 Written notification of patent or utility model registration

Ref document number: 6675253

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151