JP6081862B2 - Image encoding device - Google Patents

Image encoding device Download PDF

Info

Publication number
JP6081862B2
JP6081862B2 JP2013102719A JP2013102719A JP6081862B2 JP 6081862 B2 JP6081862 B2 JP 6081862B2 JP 2013102719 A JP2013102719 A JP 2013102719A JP 2013102719 A JP2013102719 A JP 2013102719A JP 6081862 B2 JP6081862 B2 JP 6081862B2
Authority
JP
Japan
Prior art keywords
data
replacement
unit
input
zero frequency
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
JP2013102719A
Other languages
Japanese (ja)
Other versions
JP2014225722A (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.)
Shikino High Tech Co Ltd
Original Assignee
Shikino High Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shikino High Tech Co Ltd filed Critical Shikino High Tech Co Ltd
Priority to JP2013102719A priority Critical patent/JP6081862B2/en
Priority to PCT/JP2014/061009 priority patent/WO2014185216A1/en
Publication of JP2014225722A publication Critical patent/JP2014225722A/en
Application granted granted Critical
Publication of JP6081862B2 publication Critical patent/JP6081862B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties

Description

本発明は、画像データを圧縮して符号化する画像符号化装置に関する。   The present invention relates to an image encoding apparatus that compresses and encodes image data.

従来より、通信における負担等の軽減を目的として、画像データを圧縮し、符号化する画像符号化装置が知られている。そして、近年では、より高い圧縮率で圧縮可能な符号化の規格が提案されている(非特許文献1参照)。   2. Description of the Related Art Conventionally, an image encoding device that compresses and encodes image data for the purpose of reducing a burden on communication is known. In recent years, an encoding standard that can be compressed at a higher compression rate has been proposed (see Non-Patent Document 1).

前記規格に従った画像符号化装置の概略構成を図6に示す。同図6に示すように、この画像符号化装置100は、色空間変換部110と、周波数変換部120と、量子化部130と、DC/LP/HP予測部140と、適応型スキャン部150と、VLC符号化部160と、ビットストリーム出力部170とからなる。   FIG. 6 shows a schematic configuration of an image encoding device according to the standard. As shown in FIG. 6, the image encoding apparatus 100 includes a color space conversion unit 110, a frequency conversion unit 120, a quantization unit 130, a DC / LP / HP prediction unit 140, and an adaptive scan unit 150. And a VLC encoding unit 160 and a bit stream output unit 170.

前記色空間変換部110は、入力された画像データを画素(ピクセル)毎に処理し、原画像データがRGBデータである場合には、YUVデータに変換し、画像データがCMYKデータである場合には、YUVKデータに変換する。   The color space conversion unit 110 processes the input image data for each pixel (pixel), and converts the original image data into YUV data when the original image data is RGB data, and converts the image data into CMYK data. Converts to YUVK data.

前記周波数変換部120は、前記色空間変換部110によって変換された画像データを、4×4画素を一つのブロックとしてラスター方向に順次処理し、各画素のデータを周波数帯域毎の係数に変換する処理を行う。この周波数変換部120では、1ブロック(4×4画素)に対して、4×4画素の左上の1画素がブランクで、残り15画素がHP係数である第1階層のデータと、4×4画素の左上の1画素がブランクで、残り15画素がLP係数である第2階層のデータと、1画素のDC係数からなる第3階層のデータとが生成され、1ブロック毎に、これらの第1階層データ、第2階層データ及び第3階層データが前記量子化部130に出力される。   The frequency conversion unit 120 sequentially processes the image data converted by the color space conversion unit 110 in a raster direction with 4 × 4 pixels as one block, and converts the data of each pixel into a coefficient for each frequency band. Process. In this frequency conversion unit 120, for one block (4 × 4 pixels), 1 × 4 pixels in the upper left of 4 × 4 pixels are blank, and the remaining 15 pixels are HP coefficients. The second layer data in which one pixel at the upper left of the pixel is blank and the remaining 15 pixels are LP coefficients and the third layer data composed of DC coefficients of one pixel are generated. The first layer data, the second layer data, and the third layer data are output to the quantization unit 130.

前記量子化部130は、前記周波数変換部120により係数化された第1階層データ、第2階層データ及び第3階層データを、それぞれ設定された量子化パラメータで除算して量子化する処理を行い、処理後の第1階層データ、第2階層データ及び第3階層データをDC/LP/HP予測部140に出力する。   The quantization unit 130 performs a process of dividing and quantizing the first layer data, the second layer data, and the third layer data that have been coefficientized by the frequency conversion unit 120 by respective set quantization parameters. The processed first tier data, second tier data, and third tier data are output to the DC / LP / HP prediction unit 140.

前記DC/LP/HP予測部140は、前記量子化部130から入力した、ブロック毎の前記第1階層データ、第2階層データ及び第3階層データについて、それぞれ、隣接するブロック間での係数値の比較を行って予測モードを導出し、予測モードに対し設定された演算式に従って、相関の高いブロック間で減算する処理を行う。そして、処理後の第1階層データ、第2階層データ及び第3階層データをブロック毎に適応型スキャン部150に出力する。   The DC / LP / HP prediction unit 140 uses the coefficient values between adjacent blocks for the first layer data, second layer data, and third layer data for each block input from the quantization unit 130, respectively. Are compared to derive a prediction mode, and a process of subtracting between blocks having high correlation is performed in accordance with an arithmetic expression set for the prediction mode. Then, the processed first layer data, second layer data, and third layer data are output to the adaptive scan unit 150 for each block.

前記適応型スキャン部150は、第1階層データ及び第2階層データについて、ブロック毎に、その係数データを、定められた手法によって入れ替える処理を行う。この入替処理は、ブロックの左上部側に非ゼロの係数を集めることで(逆に右下部側に係数値がゼロのものが集まる)、符号化の際の圧縮率を高めるために行われる。   The adaptive scan unit 150 performs processing for replacing the coefficient data of the first layer data and the second layer data by a predetermined method for each block. This replacement process is performed in order to increase the compression rate at the time of encoding by collecting non-zero coefficients on the upper left side of the block (conversely, those having zero coefficient values are collected on the lower right side).

前記適応型スキャン部150は、図7に示すように、P/S変換部151、係数データ入替処理部152、非ゼロデータ加算部153、比較・置換処理部154及びデータ記憶部155から構成され、比較・置換処理部154は、図9に示すように、セレクタ156、レジスタ157、比較部158及び置換部159から構成される。そして、この適応型スキャン部150においては、図8に示すような処理が実行される。   As shown in FIG. 7, the adaptive scan unit 150 includes a P / S conversion unit 151, a coefficient data replacement processing unit 152, a non-zero data addition unit 153, a comparison / replacement processing unit 154, and a data storage unit 155. As shown in FIG. 9, the comparison / replacement processing unit 154 includes a selector 156, a register 157, a comparison unit 158, and a replacement unit 159. In the adaptive scanning unit 150, processing as shown in FIG. 8 is executed.

以下、この適応型スキャン部150における処理について説明する。尚、以下では、第1階層データの処理について説明するが、第2階層データの処理についても同様である。また、図10〜図16は、適応型スキャン処理を説明するための説明図である。   Hereinafter, processing in the adaptive scanning unit 150 will be described. In the following, the processing of the first layer data will be described, but the same applies to the processing of the second layer data. 10 to 16 are explanatory diagrams for explaining the adaptive scan processing.

前記DC/LP/HP予測部140から出力された第1階層データは、図10及び図11に示すような4×4画素に対応するブロック単位で扱われる。尚、図10中の数字は、ブロック内での画素の位置(座標位置)を表しており、図11に示したHP係数をデータテーブル形式で表すと図12に示すものとなる。   The first layer data output from the DC / LP / HP prediction unit 140 is handled in units of blocks corresponding to 4 × 4 pixels as shown in FIGS. The numbers in FIG. 10 represent pixel positions (coordinate positions) in the block, and the HP coefficients shown in FIG. 11 are shown in FIG. 12 in the data table format.

前記入替処理は、前記量子化部により量子化された係数データZ(i)を、前記データ記憶部に記憶された入替データP(i)に基づいて、前記ブロック内で入替処理して、入替処理後のブロック単位の係数データZ’(i)を生成する。その後、非ゼロ度数を更新するための度数更新処理は、前記データ記憶部に記憶された非ゼロ度数データF(i)を読み出すとともに、前記入替処理後のブロック単位の係数データZ’(i)が非ゼロであるか否かを確認し、前記非ゼロである画素位置iの非ゼロ度数に1を加えて、前記読み出した非ゼロ度数データF(i)を更新し、更新後の非ゼロ度数データF’(i)とする。ついで、前記入替データP(i)と前記度数更新データF(i)を置換するための置換処理は、前記入替処理後の前記各座標位置iの係数データZ’(i)が非ゼロであった度数との関係を表す度数更新処理後の非ゼロ度数データF’(i)、及び前記ブロック内で係数データZ(i)を入れ替えるための入替データP(i)を用いて行われる。尚、入替データP(i)は、前記DC/LP/HP予測部140における予測モードに応じて予め設定されており、DC/LP/HP予測部140において導出された予測モードに対応した入替データP(i)が使用される。また、入替データP(i)、非ゼロ度数データF(i)は予め初期値が設定されている。この入替データP(i)及び非ゼロ度数データF(i)の初期値の一例を図13に示している。これら入替データP(i)及び非ゼロ度数データF(i)は前記データ記憶部155に格納されている。   In the replacement process, the coefficient data Z (i) quantized by the quantization unit is replaced in the block based on the replacement data P (i) stored in the data storage unit. The coefficient data Z ′ (i) for each block after processing is generated. Thereafter, in the frequency update process for updating the non-zero frequency, the non-zero frequency data F (i) stored in the data storage unit is read, and the coefficient data Z ′ (i) in block units after the replacement process is read out. Is updated to the non-zero frequency data F (i) read out by adding 1 to the non-zero frequency at the non-zero pixel position i, and the updated non-zero frequency The frequency data is F ′ (i). Next, in the replacement process for replacing the replacement data P (i) and the frequency update data F (i), the coefficient data Z ′ (i) at each coordinate position i after the replacement process is non-zero. This is performed using non-zero frequency data F ′ (i) after frequency update processing representing the relationship with frequency and replacement data P (i) for replacing coefficient data Z (i) in the block. The replacement data P (i) is preset according to the prediction mode in the DC / LP / HP prediction unit 140, and the replacement data corresponding to the prediction mode derived in the DC / LP / HP prediction unit 140. P (i) is used. In addition, initial values are set in advance for the replacement data P (i) and the non-zero frequency data F (i). An example of initial values of the replacement data P (i) and the non-zero frequency data F (i) is shown in FIG. These replacement data P (i) and non-zero frequency data F (i) are stored in the data storage unit 155.

DC/LP/HP予測部140から、予測モードに関する情報と、第1階層データとが1ブロック分ずつP/S変換部151に入力される。前記P/S変換部151は、まず、1ブロック分の第1階層データ(HP係数データ)である係数データZ(i)を係数データ入替処理部152に入力する。係数データ入替処理部152は、データ記憶部155より読み出した入替データP(i)の値(最初のブロックの場合は初期値となる)に従い、係数データZ(i)を並べ替えて、保持し、Z(1)〜Z(15)までの1ブロックの全ての係数データの並べ替えを終了した後、並べ替えた係数データZ’(1)〜Z’(15)をパラレルデータとしてVLC符号化部160に出力する。図14の入替後の係数データZ’(i)の欄に、この入替処理後のデータを示している。図14に示した例では、入替データP(i)にしたがって、入替処理前の座標位置2の係数データZ(2)(値は11)が新たなブロックの座標位置5に組み入れられ、同じく入替処理前の座標位置8の係数データZ(8)(値は9A)が新たなブロックの座標位置4に組み入れられている。この処理は、図8に示したステップS2に相当するものであり、このようにして生成された第1階層データを図16に示している。   From the DC / LP / HP prediction unit 140, information on the prediction mode and the first layer data are input to the P / S conversion unit 151 by one block. The P / S conversion unit 151 first inputs coefficient data Z (i), which is the first layer data (HP coefficient data) for one block, to the coefficient data replacement processing unit 152. The coefficient data replacement processing unit 152 rearranges and holds the coefficient data Z (i) according to the value of the replacement data P (i) read from the data storage unit 155 (which is an initial value in the case of the first block). After the rearrangement of all the coefficient data of one block from Z (1) to Z (15), the rearranged coefficient data Z ′ (1) to Z ′ (15) is VLC encoded as parallel data. Output to the unit 160. The post-replacement coefficient data Z ′ (i) column of FIG. 14 shows the data after the replacement process. In the example shown in FIG. 14, according to the replacement data P (i), the coefficient data Z (2) (value 11) at the coordinate position 2 before the replacement process is incorporated into the coordinate position 5 of the new block, and the replacement is also performed. Coefficient data Z (8) (value is 9A) at the coordinate position 8 before processing is incorporated into the coordinate position 4 of the new block. This process corresponds to step S2 shown in FIG. 8, and the first layer data generated in this way is shown in FIG.

次に、この入替処理後に、係数データ入替処理部152は、予測モードに関する情報を非ゼロデータ加算部153に出力し、ついで、入替処理後の第1階層データ(HP係数データ)Z’(1)〜Z’(15)を座標位置1から順に非ゼロデータ加算部153に入力する。   Next, after the replacement process, the coefficient data replacement processing unit 152 outputs information on the prediction mode to the non-zero data addition unit 153, and then the first hierarchical data (HP coefficient data) Z ′ (1 ) To Z ′ (15) are sequentially input from the coordinate position 1 to the non-zero data adding unit 153.

前記非ゼロデータ加算部153では、係数データ入替処理部152からのHP係数データZ’(i)の入力と同期して、前記データ記憶部155内から、対応する座標位置iの非ゼロ度数データF(i)を読み出し、係数データ入替処理部152から入力したHP係数データが非ゼロである場合には、読み出した非ゼロ度数データF(i)に1を加算し、HP係数データが非ゼロでない場合には、読み出した非ゼロ度数データF(i)をそのまま非ゼロ度数データF’(i)として前記比較・置換処理部154に出力する。   In the non-zero data adding unit 153, in synchronization with the input of the HP coefficient data Z ′ (i) from the coefficient data replacement processing unit 152, the non-zero frequency data of the corresponding coordinate position i is stored from the data storage unit 155. When F (i) is read and the HP coefficient data input from the coefficient data replacement processing unit 152 is non-zero, 1 is added to the read non-zero frequency data F (i), and the HP coefficient data is non-zero. If not, the read non-zero frequency data F (i) is output as it is to the comparison / replacement processing unit 154 as non-zero frequency data F ′ (i).

この処理は、図8に示したステップS6〜S8に相当するものであり、図14に、この加算処理後のデータを示している。図14に示した例では、座標位置4の係数データZ’(4)が9A、座標位置5の係数データZ’(5)が11で非ゼロであるため、座標位置4の非ゼロ度数データF(4)=28に1が加算されて更新後の非ゼロ度数データF’(4)が29となり、座標位置5の非ゼロ度数データF(5)=24に1が加算されて更新後の非ゼロ度数データF’(5)が25となっている。非ゼロデータ加算部153は、このようにして加算処理した座標位置i=1〜15の更新後の非ゼロ度数データF’(i)を座標位置iごとに比較・置換処理部154に出力する。   This process corresponds to steps S6 to S8 shown in FIG. 8, and FIG. 14 shows data after the addition process. In the example shown in FIG. 14, since the coefficient data Z ′ (4) at the coordinate position 4 is 9A and the coefficient data Z ′ (5) at the coordinate position 5 is 11 and non-zero, the non-zero frequency data at the coordinate position 4 1 is added to F (4) = 28 and the updated non-zero frequency data F ′ (4) becomes 29, and 1 is added to the non-zero frequency data F (5) = 24 at the coordinate position 5 and updated. The non-zero frequency data F ′ (5) is 25. The non-zero data addition unit 153 outputs the updated non-zero frequency data F ′ (i) of the coordinate position i = 1 to 15 thus added to the comparison / replacement processing unit 154 for each coordinate position i. .

比較・置換処理部154では、非ゼロデータ加算部153から出力した前後の非ゼロ度数データF’(i−1)とF’(i)とを比較し、F’(i)がF’(i−1)よりも大きい場合に、F’(i−1)とF’(i)とを置換して、F”(i−1)=F’(i)、F”(i)=F’(i−1)とする処理、及びデータ記憶部155から読み出した前後の入替データP(i−1)とP(i)とを置換して、P’(i−1)=P(i)、P’(i)=P(i−1)とする処理を行う。   The comparison / replacement processing unit 154 compares the non-zero frequency data F ′ (i−1) and F ′ (i) before and after being output from the non-zero data addition unit 153, and F ′ (i) is F ′ ( If it is larger than i−1), F ′ (i−1) and F ′ (i) are replaced, and F ″ (i−1) = F ′ (i), F ″ (i) = F The process of '(i-1) and the replacement data P (i-1) and P (i) before and after read from the data storage unit 155 are replaced, and P' (i-1) = P (i ), P ′ (i) = P (i−1).

具体的には、図9において、前記比較部158の下側の入力ポートに、座標位置1のF’(1)及びP(1)が入力されると、i=1の条件でセレクタ156により選択されたF’(1)とP(1)がそれぞれレジスタ157に一時記憶される。   Specifically, in FIG. 9, when F ′ (1) and P (1) at the coordinate position 1 are input to the lower input port of the comparison unit 158, the selector 156 performs the condition of i = 1. The selected F ′ (1) and P (1) are temporarily stored in the register 157, respectively.

ついで、座標位置2のF’(2)及びP(2)が入力されると、比較部158はレジスタ157からF’(1)及びP(1)を読み出し、F’(1)と非ゼロデータ加算部153から出力したF’(2)とを比較し、F’(1)<F’(2)であれば、置換実行信号(R(2)=1)とともにF’(1),F’(2),P(1)及びP(2)を置換部159に出力する。そして、置換部159は、座標位置1のF”(1)としてF’(2)を、座標位置1のP’(1)としてP(2)をデータ記憶部155に出力し、座標位置2のF”(2)としてF’(1)を、P’(2)としてP(1)をセレクタ156を介してそれぞれレジスタ157に一時記憶する。   Next, when F ′ (2) and P (2) at the coordinate position 2 are input, the comparison unit 158 reads F ′ (1) and P (1) from the register 157, and F ′ (1) and non-zero. F ′ (2) output from the data adder 153 is compared, and if F ′ (1) <F ′ (2), F ′ (1), F ′ (1), F ′ (2), P (1), and P (2) are output to the replacement unit 159. Then, the replacement unit 159 outputs F ′ (2) as F ″ (1) at the coordinate position 1 and P (2) as P ′ (1) at the coordinate position 1 to the data storage unit 155 to output the coordinate position 2 F ″ (2) as F ″ (2) and P (1) as P ′ (2) are temporarily stored in the register 157 via the selector 156, respectively.

一方、F’(1)≧F’(2)であれば、比較部158は置換非実行信号(R(2)=0)とともにF’(1),F’(2),P(1)及びP(2)を置換部159に出力し、置換部159は、座標位置1のF’(1)及びP(1)をF”(1)及びP’(1)としてデータ記憶部155に出力し、座標位置2のF’(2)及びP(2)をセレクタ156を介してそれぞれレジスタ157に一時記憶する。以後、残りの座標位置i=3〜15のF’(3〜15)及びP(3〜15)について、同様の処理を繰り返す。   On the other hand, if F ′ (1) ≧ F ′ (2), the comparison unit 158 performs F ′ (1), F ′ (2), P (1) together with the replacement non-execution signal (R (2) = 0). And P (2) are output to the replacement unit 159, and the replacement unit 159 stores F ′ (1) and P (1) at the coordinate position 1 as F ″ (1) and P ′ (1) in the data storage unit 155. And F ′ (2) and P (2) at the coordinate position 2 are temporarily stored in the register 157 via the selector 156. Thereafter, F ′ (3-15) at the remaining coordinate position i = 3 to 15 And P (3 to 15), the same processing is repeated.

以上の処理は、図8に示したステップS10〜S12に相当するものであり、図15にこの置換処理後のデータを示している。図15に示した例は、図14に示したものを置換処理したものであり、図14に示した置換前の状態でF’(4)>F’(3)となっているので、座標位置3のP(3)と座標位置4のP(4)とを置換し、座標位置3のF’(3)と座標位置4のF’(4)とを置換している。   The above processing corresponds to steps S10 to S12 shown in FIG. 8, and FIG. 15 shows data after the replacement processing. The example shown in FIG. 15 is obtained by replacing the one shown in FIG. 14, and F ′ (4)> F ′ (3) in the state before the replacement shown in FIG. P (3) at position 3 and P (4) at coordinate position 4 are replaced, and F ′ (3) at coordinate position 3 and F ′ (4) at coordinate position 4 are replaced.

尚、前記データ記憶部155に格納されたF(i)及びP(i)は、それぞれ、比較・置換処理部154から出力されるF”(i)及びP’(i)によって更新される。   The F (i) and P (i) stored in the data storage unit 155 are updated by F ″ (i) and P ′ (i) output from the comparison / replacement processing unit 154, respectively.

適応型スキャン部150では、以上のような処理が行われ、非ゼロの度数及び予め設定された入替データに従って、係数データが入れ替えられた第1階層データが生成される。また、第2階層データについても同様の処理が行われ、係数データが入れ替えられた第2階層データが生成される。尚、前記第3階層データについては、そのまま、前記VLC符号化部160に出力される。   In the adaptive scanning unit 150, the above-described processing is performed, and the first hierarchical data in which the coefficient data is replaced is generated in accordance with the non-zero frequency and preset replacement data. Similar processing is performed on the second layer data, and second layer data in which the coefficient data is replaced is generated. The third layer data is output to the VLC encoder 160 as it is.

前記VLC符号化部160は、前記適応型スキャン部150で処理された第1階層データ、2階層データ及び第3階層データに対してエントロピー符号化処理を施し、コードストリームを生成して、前記ビットストリーム出力部170に出力し、ビットストリーム出力部170は、入力された1画像データ分のビットストリームを1纏めにして1つのファイルを形成し、形成されたファイルを外部に出力する。   The VLC encoder 160 performs entropy encoding on the first layer data, the second layer data, and the third layer data processed by the adaptive scan unit 150, generates a code stream, and generates the bit The bit stream output unit 170 outputs a stream to the stream output unit 170. The bit stream output unit 170 collects the input bit streams for one image data as one, forms one file, and outputs the formed file to the outside.

JPEG XR勧告書ITU-T T.832 : Information technology -JPEG XR image coding system - Image coding specification. [online].Recommendation T.832(01/12). Approval 2012-01-13. Status : In force.Retrieved from the Internet : <URL : http://www.itu.int/rec/T-REC-T.832-201201-I/en>.JPEG XR Recommendation ITU-T T.832: Information technology -JPEG XR image coding system-Image coding specification. [Online] .Recommendation T.832 (01/12). Approval 2012-01-13. Status: In force. Retrieved from the Internet: <URL: http://www.itu.int/rec/T-REC-T.832-201201-I/en>.

ところで、圧縮対象の画像データは、技術進歩に伴う解像度の向上によって、そのデータ量が急増しており、上記従来の画像符号化装置100では、データ量の増加によって、その処理に長時間を要するため、更なる効率化が求められている。   By the way, the amount of data of image data to be compressed has increased rapidly due to the improvement in resolution accompanying technological advancement. In the conventional image encoding apparatus 100, the processing takes a long time due to the increase in data amount. Therefore, further efficiency is required.

特に、前記適応型スキャン部150では、前後の非ゼロ度数F’(i−1)とF’(i)とを比較した後、非ゼロ度数F’(i)及び入替データP(i)について置換処理を、当該処理を1サイクルとして、係数データの数だけ、前記サイクルを繰り返す処理を行うので、第1階層データ及び第2階層データの総数と同じサイクル数だけ処理を繰り返さなければならず、その処理に長時間を要していた。このため、この従来の適応型スキャン部150の処理は、当該画像符号化装置100における処理効率を低下させるネック要因の一つになっていた。尚、前記1サイクルの処理は、1クロック内で処理されるものであり、レジスタ157を用いた電子回路では、データの読み出しのタイミングとしてクロックが用いられるため、従来の適応型スキャン部150における処理時間は、1クロックのサイクル数倍(=1クロック×サイクル数)の時間を要していた。   In particular, the adaptive scan unit 150 compares the preceding and following non-zero frequencies F ′ (i−1) and F ′ (i), and then compares the non-zero frequencies F ′ (i) and the replacement data P (i). Since the replacement process is a process in which the process is repeated as many times as the number of coefficient data, the process must be repeated as many times as the total number of first layer data and second layer data, The process took a long time. For this reason, the processing of the conventional adaptive scanning unit 150 has become one of the bottleneck factors that reduce the processing efficiency of the image coding apparatus 100. The one-cycle processing is performed within one clock. In the electronic circuit using the register 157, the clock is used as the data read timing. Therefore, the processing in the conventional adaptive scan unit 150 is performed. The time required a time multiple of one clock cycle (= 1 clock × cycle number).

本発明は、以上の実情に鑑み、なされたものであって、適応型スキャン部の処理効率を高めることで、全体的な処理効率を高めることが可能な画像符号化装置の提供を、その目的とする。   The present invention has been made in view of the above circumstances, and it is an object of the present invention to provide an image encoding device capable of improving the overall processing efficiency by increasing the processing efficiency of the adaptive scanning unit. And

上記課題を解決するため、本発明の画像符号化装置は、
画像データを所定画素数のブロック単位で周波数変換して係数化する周波数変換部と、
前記周波数変換部により係数化されたブロック単位のn個の係数データを量子化する量子化部と、
前記ブロックの画素位置iと、各画素位置iの係数データZ(i)が非ゼロであった度数との関係を表す非ゼロ度数データF(i)、及び前記ブロック内で係数データZ(i)を入れ替えるための入替データP(i)であって、現在の画素位置iと、当該画素位置iの係数データZ(i)を、入れ替えによって組み入れるべき画素位置i’との関係を表す入替データP(i)を用いて、前記量子化部により量子化されたブロック単位の係数データZ(i)を該ブロック内で入替処理する適応型スキャン部と、
前記入替処理後のブロック単位の係数データZ’(i)を符号化して圧縮する符号化部とを少なくとも備えた画像符号化装置において、
前記適応型スキャン部は、
前記非ゼロ度数データF(i)及び入替データP(i)を記憶するデータ記憶部と、
前記量子化部により量子化された係数データZ(i)を、前記データ記憶部に記憶された入替データP(i)に基づいて、前記ブロック内で入替処理する係数データ入替処理部と、
前記データ記憶部に記憶された非ゼロ度数データF(i)を読み出すとともに、前記入替処理後のブロック単位の係数データZ’(i)が非ゼロであるか否かを確認して、前記非ゼロである画素位置iの非ゼロ度数に1を加えて、前記読み出した非ゼロ度数データF(i)を更新し、更新後の非ゼロ度数データF’(i)とする度数更新処理部と、
前記度数更新処理部によって更新された非ゼロ度数データF’(i)を用い、前後するF’(i−1)とF’(i)とを順次比較し、F’(i−1)とF’(i)、P(i−1)とP(i)とを置換すべきか否かの置換情報R(i)を生成する置換情報生成処理部と、
前記データ記憶部に記憶された入替データP(i)を読み出すとともに、前記置換情報生成処理部によって生成された置換情報R(i)に基づいて、前記度数更新処理部により更新されたF’(i−1)とF’(i)、及び前記読み出したP(i−1)とP(i)との置換処理を行い、置換処理後の非ゼロ度数データF”(i)及び入替データP’(i)で前記データ記憶部に記憶された非ゼロ度数データF(i)及び入替データP(i)を更新する置換処理部とを備えた画像符号化装置に係る。但し、前記nは2以上の整数であり、前記iは1〜nの整数である。
In order to solve the above-described problem, an image encoding device according to the present invention includes:
A frequency conversion unit that converts the frequency of image data into a block unit of a predetermined number of pixels to generate a coefficient;
A quantization unit that quantizes the n coefficient data in units of blocks that have been coefficientized by the frequency conversion unit;
Non-zero frequency data F (i) representing the relationship between the pixel position i of the block and the frequency at which the coefficient data Z (i) at each pixel position i was non-zero, and coefficient data Z (i ) Is replacement data P (i) for replacing the current pixel position i and the replacement data representing the relationship between the pixel position i ′ to which the coefficient data Z (i) of the pixel position i should be incorporated by replacement. An adaptive scanning unit that uses P (i) to replace the block unit coefficient data Z (i) quantized by the quantization unit in the block;
An image encoding device including at least an encoding unit that encodes and compresses the coefficient data Z ′ (i) in block units after the replacement process;
The adaptive scan unit includes:
A data storage unit for storing the non-zero frequency data F (i) and replacement data P (i);
A coefficient data replacement processing unit that performs a replacement process on the coefficient data Z (i) quantized by the quantization unit in the block based on the replacement data P (i) stored in the data storage unit;
The non-zero frequency data F (i) stored in the data storage unit is read out, and it is confirmed whether or not the block-unit coefficient data Z ′ (i) after the replacement processing is non-zero. A frequency update processing unit that adds 1 to the non-zero frequency at the pixel position i that is zero, updates the read non-zero frequency data F (i), and sets the updated non-zero frequency data F ′ (i) as an update, ,
Using the non-zero frequency data F ′ (i) updated by the frequency update processing unit, F ′ (i−1) and F ′ (i) are sequentially compared, and F ′ (i−1) and A replacement information generation processing unit for generating replacement information R (i) indicating whether or not F ′ (i), P (i−1) and P (i) should be replaced;
The replacement data P (i) stored in the data storage unit is read, and F ′ (updated by the frequency update processing unit based on the replacement information R (i) generated by the replacement information generation processing unit. i-1) and F ′ (i) and the read P (i-1) and P (i) are replaced, and the non-zero frequency data F ″ (i) and replacement data P after the replacement are processed. '(I) relates to an image encoding device including a replacement processing unit for updating non-zero frequency data F (i) and replacement data P (i) stored in the data storage unit, where n is It is an integer greater than or equal to 2, and said i is an integer of 1-n.

また、本発明の画像符号化装置では、
前記置換処理部は、(n−1)個の置換器を備え、
前記各置換器は、それぞれ、3つの入力ポートA,B,C及び2つの出力ポートD,Eを有し、
j番目の置換器の出力ポートEは、(j+1)番目の置換器の入力ポートAに順次接続され、
1番目の置換器の入力ポートAには、前記非ゼロ度数データF’(1)及び入替データP(1)が入力され、j番目の前記置換の入力ポートBには、前記非ゼロ度数データF’(j+1)及び入替データP(j+1)が入力され、j番目の前記置換の入力ポートCには、前記置換情報R(j+1)が入力されるとともに、各置換器では、前記入力ポートCから入力された置換情報R(j+1)に従って置換処理が実行されて、置換処理後の非ゼロ度数データF”(j)及び入替データP’(j)が前記各置換器の出力ポートDから出力され、(n−1)番目の置換器の出力ポートEから、置換処理後の非ゼロ度数データF”(n)及び入替データP’(n)が出力されるように構成される。但し、前記nは2以上の整数であり、前記iは1〜nの整数である。また、jは1〜(n−1)の整数である。
In the image encoding device of the present invention,
The replacement processing unit includes (n-1) replacers,
Each replacer has three input ports A, B, C and two output ports D, E,
The output port E of the jth replacer is sequentially connected to the input port A of the (j + 1) th replacer,
The first to the input port A of the replacement unit, the non-zero frequency data F '(1) and replacement data P (1) is input to the input port B of the j th of said replacement unit, the non-zero frequency data F '(j + 1) and replacement data P (j + 1) are input, j-th wherein the input port C of the replacement unit of the with replacement information R (j + 1) are input, each substituted instrument, the input The replacement process is executed according to the replacement information R (j + 1) input from the port C, and the non-zero frequency data F ″ (j) and replacement data P ′ (j) after the replacement process are output ports D of the respective replacers. The non-zero frequency data F ″ (n) and replacement data P ′ (n) after the replacement processing are output from the output port E of the (n−1) th replacer. However, said n is an integer greater than or equal to 2, and said i is an integer of 1-n. J is an integer of 1 to (n-1).

上記構成を備えた本発明に係る画像符号化装置によれば、まず、1画像分の画像データが周波数変換部に入力される。そして、周波数変換部において、画像データは所定画素数のブロック単位で周波数変換されて係数化され、ついで、係数化されたブロック単位の係数データは、量子化部において量子化され、DC/LP/HP予測部140において、予測モードを導出するとともに、相関の高いブロック間で減算する処理を行った後、適応型スキャン部に入力される。   According to the image coding apparatus according to the present invention having the above-described configuration, first, image data for one image is input to the frequency conversion unit. Then, in the frequency conversion unit, the image data is frequency converted and coefficientized in units of a block of a predetermined number of pixels, and then the coefficient data of the block unit thus quantized is quantized in the quantization unit, and is converted into DC / LP / The HP prediction unit 140 derives a prediction mode and performs a process of subtracting between highly correlated blocks, and then inputs the prediction mode to the adaptive scanning unit.

適応型スキャン部では、ブロックの画素位置iと、各画素位置iの係数データZ(i)が非ゼロであった度数との関係を表す非ゼロ度数データF(i)、及び前記ブロック内で係数データZ(i)を入れ替えるための入替データP(i)であって、現在の画素位置iと、当該画素位置iの係数データZ(i)を、入れ替えによって組み入れるべき画素位置i’との関係を表す入替データP(i)を用いて、前記量子化されたブロック単位の係数データZ(i)を該ブロック内で入れ替える処理が行われ、入れ替え後のブロック単位の係数データZ’(i)が符号化部において符号化され、圧縮される。   In the adaptive scanning unit, the non-zero frequency data F (i) representing the relationship between the pixel position i of the block and the frequency at which the coefficient data Z (i) at each pixel position i is non-zero, and within the block Replacement data P (i) for replacing the coefficient data Z (i) between the current pixel position i and the pixel position i ′ where the coefficient data Z (i) at the pixel position i is to be incorporated by replacement. Using the replacement data P (i) representing the relationship, the quantized block unit coefficient data Z (i) is replaced in the block, and the block unit coefficient data Z ′ (i) after replacement is performed. ) Is encoded and compressed in the encoding unit.

そして、前記適応型スキャン部における処理は、
前記量子化後のブロック単位の係数データZ(i)が非ゼロであるか否かを確認して、前記非ゼロである画素位置iの非ゼロ度数に1を加えて、非ゼロ度数データF(i)を更新し、更新後の非ゼロ度数データF’(i)とする、前記度数更新処理部による処理と、
前記度数更新処理部によって更新された非ゼロ度数データF’(i)を用い、前後するF’(i−1)とF’(i)とを順次比較し、F’(i−1)とF’(i)、P(i−1)とP(i)とを置換すべきかどうかの置換情報R(i)を生成する、前記置換情報生成処理部による処理と、
前記置換情報生成処理によって生成された置換情報R(i)に基づいて、F’(i−1)とF’(i)、P(i−1)とP(i)との置換処理を行う前記置換処理部による処理と、
入替データP(i)に基づいて、係数データZ(i)を前記ブロック内で入替処理する、前記係数データ入替処理部による処理とからなる。
And the processing in the adaptive scanning unit is as follows:
It is checked whether or not the quantized block-unit coefficient data Z (i) is non-zero, and 1 is added to the non-zero frequency of the non-zero pixel position i to obtain non-zero frequency data F (I) is updated and the updated non-zero frequency data F ′ (i) is processed by the frequency update processing unit;
Using the non-zero frequency data F ′ (i) updated by the frequency update processing unit, F ′ (i−1) and F ′ (i) are sequentially compared, and F ′ (i−1) and F ′ (i), processing by the replacement information generation processing unit that generates replacement information R (i) indicating whether or not P (i−1) and P (i) should be replaced;
Based on the replacement information R (i) generated by the replacement information generation process, the replacement process of F ′ (i−1) and F ′ (i), P (i−1) and P (i) is performed. Processing by the replacement processing unit;
This processing includes processing by the coefficient data replacement processing unit that replaces the coefficient data Z (i) in the block based on the replacement data P (i).

従来のように、前後する非ゼロ度数データF’(i−1)とF’(i)とを比較した後、F’(i−1)とF’(i)、P(i−1)とP(i)とを置換するようにすると、係数データZ(i)の数だけ、その処理サイクルを繰り返さなければならないが、本発明のように、比較処理と置換処理とを切り離し、比較処理によって予め置換情報を生成した後、この置換情報を基に置換処理を施すことで、前記度数更新処理部、置換情報生成処理部及び置換処理部における処理を、複数の係数データZ(i)群について1サイクルで処理することができる。   As before, after comparing the preceding and following non-zero frequency data F ′ (i−1) and F ′ (i), F ′ (i−1), F ′ (i), and P (i−1) And P (i) are replaced by the number of coefficient data Z (i), the processing cycle must be repeated. However, as in the present invention, the comparison process and the replacement process are separated, and the comparison process is performed. After the replacement information is generated in advance, by performing replacement processing based on the replacement information, the processing in the frequency update processing unit, replacement information generation processing unit, and replacement processing unit is performed by a plurality of coefficient data Z (i) groups. Can be processed in one cycle.

尚、この1サイクルの処理は、処理のタイミングとして用いられるクロックの、1クロック内で処理されるものである。   Note that this one-cycle processing is performed within one clock of a clock used as processing timing.

上記構成を備えた本発明に係る画像符号化装置によれば、あらかじめ置換情報生成部にて生成された置換情報を用いて各置換器での置換を実施するので、置換情報生成の遅延時間を最小に抑えることができ、置換処理部の動作周波数特性の劣化を抑制しつつ、1サイクルでの処理効率を向上させることができる。   According to the image coding apparatus according to the present invention having the above-described configuration, the replacement information is generated by the replacement information using the replacement information generated in advance by the replacement information generation unit. Processing efficiency in one cycle can be improved while suppressing deterioration of the operating frequency characteristics of the replacement processing unit.

また、本発明の画像符号化装置では、
前記度数更新処理部、置換情報生成処理部及び置換処理部は、それぞれ、前記1ブロックを構成するn個の係数データZ(i)群を、1サイクルでの処理数をm個として、複数サイクル繰り返して処理するように構成される。但し、前記nは3以上の整数であり、前記mは2以上の整数で、前記nより小さい整数である。また、前記iは1〜nの整数である。
In the image encoding device of the present invention,
Each of the frequency update processing unit, the replacement information generation processing unit, and the replacement processing unit has a plurality of cycles in which n coefficient data Z (i) groups constituting the one block are set to m in one cycle. It is configured to process repeatedly. However, n is an integer of 3 or more, and m is an integer of 2 or more, and is an integer smaller than the n. The i is an integer from 1 to n.

また、本発明の画像符号化装置では、
前記1ブロックを構成するn個の係数データZ(i)群を、1サイクルでの処理数をm個として、複数サイクル繰り返して処理するように構成されてなり、
前記置換処理部は、1サイクルで処理する前記係数データZ(i)群の数をm個として、1番目から(m−1)番目までの(m−1)個の置換器を備え、
前記各置換器は、それぞれ、3つの入力ポートA,B,C及び2つの出力ポートD,Eを有し、
k番目の置換器の出力ポートEは、k+1番目の置換器の入力ポートAに順次接続され、
前記1番目の置換器の入力ポートAには、非ゼロ度数データF’(a)及び入替データP(a)が入力され、k番目の前記置換の入力ポートBには、前記非ゼロ度数データF’(a+1)及び入替データP(a+1)が入力され、k番目の前記置換の入力ポートCには、前記置換情報R(a+1)が入力されるとともに、各置換器では、前記入力ポートCから入力された置換情報R(a+1)に従って置換処理が実行されて、置換処理後の非ゼロ度数データF”(a)及び入替データP’(a)が前記各置換器の出力ポートDから出力され、(m−1)番目の置換器の出力ポートEから、置換処理後の非ゼロ度数データF”(a+1)及び入替データP’(a+1)が出力されるように構成されていることを特徴とする。但し、前記nは3以上の整数であり、前記iは1〜nの整数である。また、前記mは2以上の整数で、前記nより小さい整数であり、前記kは1〜(m−1)の整数である。また、前記aはa=[k+(r−1)×(m−1)]であり、前記rは繰り返し時の回数である。
In the image encoding device of the present invention,
The n coefficient data Z (i) group constituting one block is configured to repeatedly process a plurality of cycles, with the number of processes in one cycle being m.
The replacement processing unit includes (m−1) number of replacers from the first to (m−1) th, where m is the number of coefficient data Z (i) groups processed in one cycle,
Each replacer has three input ports A, B, C and two output ports D, E,
The output port E of the kth replacer is sequentially connected to the input port A of the k + 1th replacer,
The input port A of the first shifter, a non-zero frequency data F '(a) and replacement data P (a) is input to the input port B of the k-th of said replacement unit, the non-zero frequency data F '(a + 1) and replacement data P (a + 1) is input, k-th wherein the input port C of the replacement unit of the with replacement information R (a + 1) is input, at each substitutable instrument, the input The replacement process is executed according to the replacement information R (a + 1) input from the port C, and the non-zero frequency data F ″ (a) and replacement data P ′ (a) after the replacement process are output to the output port D of each replacer. And the non-zero frequency data F ″ (a + 1) and replacement data P ′ (a + 1) after the replacement process are output from the output port E of the (m−1) th replacer. It is characterized by that. However, said n is an integer greater than or equal to 3, and said i is an integer of 1-n. The m is an integer of 2 or more and is an integer smaller than the n, and the k is an integer of 1 to (m−1). Further, a is a = [k + (r−1) × (m−1)], and r is the number of repetitions.

上記構成を備えた本発明に係る画像符号化装置によれば、1サイクルでの置換処理の処理数を可変にすることで、1ブロックの係数データの処理を複数サイクルに分割することができる。   According to the image coding apparatus according to the present invention having the above-described configuration, the processing of coefficient data of one block can be divided into a plurality of cycles by making the number of replacement processes in one cycle variable.

上記構成を備えた本発明に係る画像符号化装置によれば、あらかじめ置換情報生成部にて生成された置換情報を用いて各置換器での置換を実施するので、置換情報生成の遅延時間を最小に抑えることができ、サイクル分割した各1サイクルで処理できる置換処理器の数をより多く取ることも可能になる。   According to the image coding apparatus according to the present invention having the above-described configuration, the replacement information is generated by the replacement information using the replacement information generated in advance by the replacement information generation unit. It is possible to minimize the number of replacement processors that can be processed in each cycle divided into cycles.

したがって、本発明に係る適応型スキャン部によれば、従来の適応型スキャン部に比べて、その処理時間が短く、効率的に置換処理を行うことができる。   Therefore, according to the adaptive scan unit of the present invention, the processing time is shorter than that of the conventional adaptive scan unit, and the replacement process can be performed efficiently.

以上のように、本発明によれば、適応型スキャン部の処理時間を従来に比べて短くすることができ、効率的に置換処理を行うことができる。この結果、従来に比べて、画像符号化装置の全体の処理速度を速めることができ、効率的な符号化処理を実現することができる。   As described above, according to the present invention, the processing time of the adaptive scanning unit can be shortened compared to the conventional case, and the replacement process can be performed efficiently. As a result, the overall processing speed of the image encoding device can be increased compared to the conventional case, and an efficient encoding process can be realized.

本発明の一実施形態に係る画像符号化装置の概略構成を示したブロック図である。It is the block diagram which showed schematic structure of the image coding apparatus which concerns on one Embodiment of this invention. 本実施形態に係る適応型スキャン部の構成を示したブロック図である。It is the block diagram which showed the structure of the adaptive type scan part which concerns on this embodiment. 本実施形態に係る置換情報生成部における処理を説明するための説明図である。It is explanatory drawing for demonstrating the process in the replacement information generation part which concerns on this embodiment. 本実施形態に係る置換情報生成部における処理を説明するための説明図である。It is explanatory drawing for demonstrating the process in the replacement information generation part which concerns on this embodiment. 本実施形態に係る置換処理部の構成を示したブロック図である。It is the block diagram which showed the structure of the replacement process part which concerns on this embodiment. 従来の画像符号化装置の概略構成を示したブロック図である。It is the block diagram which showed schematic structure of the conventional image coding apparatus. 従来の適応型スキャン部の構成を示したブロック図である。It is the block diagram which showed the structure of the conventional adaptive type scanning part. 従来の適応型スキャン部における処理手順を示したフローチャートである。It is the flowchart which showed the process sequence in the conventional adaptive type scanning part. 従来の比較・置換処理部の構成を示したブロック図である。It is the block diagram which showed the structure of the conventional comparison and replacement process part. 従来の適応型スキャン処理のブロック内での画素位置を説明するための説明図である。It is explanatory drawing for demonstrating the pixel position within the block of the conventional adaptive scanning process. 従来の適応型スキャン処理のブロック内でのHP係数の一例を説明するための説明図である。It is explanatory drawing for demonstrating an example of the HP coefficient within the block of the conventional adaptive type scanning process. 従来の適応型スキャン処理のHP係数をデータテーブル形式にした一例を説明するための説明図である。It is explanatory drawing for demonstrating an example which made the HP coefficient of the conventional adaptive type scanning process into the data table format. 従来の適応型スキャン処理の入替データと非ゼロ度数データの初期値の一例を説明するための説明図である。It is explanatory drawing for demonstrating an example of the initial value of the replacement data and the non-zero frequency data of the conventional adaptive scanning process. 従来の適応型スキャン処理の係数データの入替と非ゼロ度数の更新を説明するための説明図である。It is explanatory drawing for demonstrating replacement | exchange of the coefficient data of a conventional adaptive type scanning process, and update of a non-zero frequency. 従来の適応型スキャン処理の置換後の入替データと非ゼロ度数データを説明するための説明図である。It is explanatory drawing for demonstrating the replacement data and the non-zero frequency data after the replacement of the conventional adaptive scanning process. 従来の適応型スキャン処理のブロック内での置換後のHP係数の一例を説明するための説明図である。It is explanatory drawing for demonstrating an example of the HP coefficient after substitution within the block of the conventional adaptive scan process.

以下、本発明の具体的な実施形態について、図面を参照しながら説明する。尚、図1は本実施形態に係る画像符号化装置1の構成を示したブロック図である。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the image encoding device 1 according to this embodiment.

図1に示すように、本例の画像符号化装置1は、図6の従来の画像符号化装置100における適応型スキャン部150に代えて、これとはその構成が異なる適応型スキャン部10を備えるもので、この点においてのみ、従来の画像符号化装置100とその構成が異なっている。したがって、他の構成については、上記画像符号化装置100におけるものと同一の符号を付して、その詳しい説明は省略する。   As shown in FIG. 1, the image encoding device 1 of this example includes an adaptive scanning unit 10 having a configuration different from that of the adaptive scanning unit 150 in the conventional image encoding device 100 of FIG. 6. Only in this respect, the configuration of the conventional image encoding device 100 is different. Therefore, the other components are denoted by the same reference numerals as those in the image encoding device 100, and detailed description thereof is omitted.

前記適応型スキャン部10は、図2に示すように、係数データ入替処理部20、度数更新処理部30、置換情報生成処理部40、置換処理部50、及びデータ記憶部60から構成される。   As shown in FIG. 2, the adaptive scanning unit 10 includes a coefficient data replacement processing unit 20, a frequency update processing unit 30, a replacement information generation processing unit 40, a replacement processing unit 50, and a data storage unit 60.

この適応型スキャン部10においても、上述した適応型スキャン部150と同様に、前記DC/LP/HP予測部140から出力される第1階層データ及び第2階層データについて、図10及び図11に示すような4×4画素に対応するブロック単位で処理し、ブロック内で係数データZ(i)を入れ替える処理を行う。尚、以下では、第1階層データの処理について説明するが、第2階層データの処理についても同様である。   In the adaptive scan unit 10 as well, the first layer data and the second layer data output from the DC / LP / HP prediction unit 140 are shown in FIG. 10 and FIG. Processing is performed in units of blocks corresponding to 4 × 4 pixels as shown, and processing for replacing the coefficient data Z (i) in the block is performed. In the following, the processing of the first layer data will be described, but the same applies to the processing of the second layer data.

入替処理は、各座標位置iの係数データZ(i)が非ゼロであった度数との関係を表す非ゼロ度数データF(i)、及び前記ブロック内で係数データZ(i)を入れ替えるための入替データP(i)を用いて行われる。入替データP(i)は、前記DC/LP/HP予測部140における予測モードに応じて予め設定されており、DC/LP/HP予測部140において導出された予測モードに対応した入替データP(i)が使用される。また、入替データP(i)及び非ゼロ度数データF(i)は予め初期値が設定されている。これら入替データP(i)及び非ゼロ度数データF(i)は前記データ記憶部60に格納されている。   The replacement process replaces the non-zero frequency data F (i) representing the relationship with the frequency where the coefficient data Z (i) at each coordinate position i is non-zero, and the coefficient data Z (i) in the block. The replacement data P (i) is used. The replacement data P (i) is set in advance according to the prediction mode in the DC / LP / HP prediction unit 140, and the replacement data P () corresponding to the prediction mode derived in the DC / LP / HP prediction unit 140. i) is used. Further, the replacement data P (i) and the non-zero frequency data F (i) are set in advance with initial values. These replacement data P (i) and non-zero frequency data F (i) are stored in the data storage unit 60.

DC/LP/HP予測部140は、導出された予測モードに関する情報と、第1階層データZ(i)を1ブロック分ずつ係数データ入替処理部20に入力し、係数データ入替処理部20は、データ記憶部60より読み出した入替データP(i)の値(最初のブロックの場合は初期値となる)に従い、係数データZ(i)を並べ替え、VLC符号化部160に出力する。   The DC / LP / HP prediction unit 140 inputs the information related to the derived prediction mode and the first layer data Z (i) to the coefficient data replacement processing unit 20 for each block, and the coefficient data replacement processing unit 20 The coefficient data Z (i) is rearranged according to the value of the replacement data P (i) read from the data storage unit 60 (which is the initial value in the case of the first block), and is output to the VLC encoding unit 160.

この後、係数データ入替処理部20は、まず、予測モードに関する情報を度数更新処理部30に出力し、ついで、1ブロック分の第1階層データ(HP係数データ)の内、入替処理後の座標位置1〜8の係数データZ’(i=1〜8)を度数更新処理部30に入力し、ついで、入替処理後の座標位置8〜15の係数データZ’(i=8〜15)を度数更新処理部30に入力する。以後、同様にして、係数データ入替処理部20は、DC/LP/HP予測部140から入力されたブロック単位のデータを度数更新処理部30に入力する。   Thereafter, the coefficient data replacement processing unit 20 first outputs information on the prediction mode to the frequency update processing unit 30, and then the coordinates after replacement processing in the first layer data (HP coefficient data) for one block. Coefficient data Z ′ (i = 1 to 8) at positions 1 to 8 is input to the frequency update processing unit 30, and then the coefficient data Z ′ (i = 8 to 15) at coordinate positions 8 to 15 after the replacement process is input. Input to the frequency update processing unit 30. Thereafter, similarly, the coefficient data replacement processing unit 20 inputs the data in block units input from the DC / LP / HP prediction unit 140 to the frequency update processing unit 30.

前記度数更新処理部30は、係数データ入替処理部20から座標位置1〜8の入替処理後の係数データZ’(i=1〜8)が入力されるのと同期して、前記データ記憶部60内の、座標位置1〜8の非ゼロ度数データF(i=1〜8)を読み出し、係数データZ’(i=1〜8)が非ゼロである座標位置iに対応する非ゼロ度数データF(i)に1を加算して、更新された非ゼロ度数データF’(i)を生成し、生成した非ゼロ度数データF’(i)を置換情報生成処理部40に出力する処理を行う。   The frequency update processing unit 30 is synchronized with the input of coefficient data Z ′ (i = 1 to 8) after the replacement processing of the coordinate positions 1 to 8 from the coefficient data replacement processing unit 20. 60, the non-zero frequency data F (i = 1 to 8) of the coordinate positions 1 to 8 is read, and the non-zero frequency corresponding to the coordinate position i where the coefficient data Z ′ (i = 1 to 8) is non-zero. A process of adding 1 to the data F (i) to generate updated non-zero frequency data F ′ (i) and outputting the generated non-zero frequency data F ′ (i) to the replacement information generation processing unit 40 I do.

この処理は、加算器を並設した回路を用いて行われ、1サイクル処理で、8個の非ゼロ度数データF(i)を更新し、度数更新処理部30は、次に、入力される座標位置8〜15の入替処理後の係数データ’Z(i=8〜15)に基づいて、同様に、非ゼロ度数データF(i=8〜15)を更新して非ゼロ度数データF’(i)を生成し、生成した非ゼロ度数データF’(i)を置換情報生成処理部40に出力する。そして、度数更新処理部30は、この処理を前記ブロック単位で繰り返して、1つの画像データについて処理を行う。尚、更新後の非ゼロ度数データF’(i=1〜15)は、図14に例示したものと同様である。   This process is performed by using a circuit in which adders are arranged in parallel. In one cycle process, eight non-zero frequency data F (i) are updated, and the frequency update processing unit 30 is input next. Similarly, the non-zero frequency data F (i = 8 to 15) is updated based on the coefficient data 'Z (i = 8 to 15) after the replacement processing of the coordinate positions 8 to 15, and the non-zero frequency data F'. (I) is generated, and the generated non-zero frequency data F ′ (i) is output to the replacement information generation processing unit 40. Then, the frequency update processing unit 30 repeats this processing for each block and performs processing for one image data. The updated non-zero frequency data F ′ (i = 1 to 15) is the same as that illustrated in FIG. 14.

置換情報生成処理部40は、度数更新処理部30から出力した8個の更新後の非ゼロ度数データF’(i=1〜8)を基に、置換情報R(i)を生成する。この置換情報R(i)は、前後の非ゼロ度数F’(i−1)とF’(i)とを比較し、F’(i)がF’(i−1)よりも大きい場合に、後述の置換処理部50において、F’(i−1)とF’(i)とを置換して、F”(i−1)=F’(i)、F”(i)=F’(i−1)とする処理、及びP(i−1)とP(i)とを置換して、P’(i−1)=P(i)、P’(i)=P(i−1)とする処理を行うための情報である。   The replacement information generation processing unit 40 generates replacement information R (i) based on the eight updated non-zero frequency data F ′ (i = 1 to 8) output from the frequency update processing unit 30. This replacement information R (i) compares the preceding and following non-zero frequencies F ′ (i−1) and F ′ (i), and when F ′ (i) is larger than F ′ (i−1). In a replacement processing unit 50 described later, F ′ (i−1) and F ′ (i) are replaced, and F ″ (i−1) = F ′ (i), F ″ (i) = F ′. (I-1) and P (i-1) and P (i) are replaced, and P '(i-1) = P (i), P' (i) = P (i- This is information for performing the processing 1).

具体的には、前記置換情報はフラグからなり、図3に示すように、以下の条件でフラグを生成する。
1)F’(i)>F’(i−1)についてはこの条件が真であれば”Y”(「Yes」の意味、以下同様)。
2)F’(i)=F’(i−1)についてはこの条件が真であれば”Y”。
3)F’(i)>F’(i−1)の条件が真であれば、置換情報R(i)を1にする。
4)座標位置の判断でF’(i)>F’(i−1)の条件が偽の場合でも、F’(i)=F’(i−1)の条件が真であり、かつ、前の座標位置の置換情報R(i)が1であれば、置換情報R(i)を1にする。
5)上記3)及び4)以外の場合には、置換情報R(i)を0にする。
Specifically, the replacement information includes a flag, and the flag is generated under the following conditions as shown in FIG.
1) For F ′ (i)> F ′ (i−1), if this condition is true, “Y” (meaning “Yes”, and so on).
2) For F ′ (i) = F ′ (i−1), “Y” if this condition is true.
3) If the condition of F ′ (i)> F ′ (i−1) is true, the replacement information R (i) is set to 1.
4) Even when the condition of F ′ (i)> F ′ (i−1) is false in the determination of the coordinate position, the condition of F ′ (i) = F ′ (i−1) is true, and If the replacement information R (i) at the previous coordinate position is 1, the replacement information R (i) is set to 1.
5) In cases other than the above 3) and 4), the replacement information R (i) is set to 0.

上述したように、F’(i)がF’(i−1)よりも大きい場合に、F’(i−1)とF’(i)との置換、及びP(i−1)とP(i)との置換を行うが、図3に示すように、F‘(2)>F’(1)で、F’(2)〜F’(5)が同値の場合、F’(1)〜F’(5)を順次置換していく必要があるので、上記3)及び4)に記載した条件で、座標位置2〜5の置換情報R(i)を1にする。   As described above, when F ′ (i) is larger than F ′ (i−1), the substitution between F ′ (i−1) and F ′ (i), and P (i−1) and P As shown in FIG. 3, when F ′ (2)> F ′ (1) and F ′ (2) to F ′ (5) are equivalent, as shown in FIG. 3, F ′ (1 ) To F ′ (5) need to be sequentially replaced, so that the replacement information R (i) at the coordinate positions 2 to 5 is set to 1 under the conditions described in 3) and 4) above.

前記置換情報生成処理部40では、以上のようにして、置換情報R(i)を生成する。そして、前記置換情報生成処理部40は、度数更新処理部30から出力した8個の非ゼロ度数データF’(i=1〜8)から生成した置換情報R(i=2〜8)及び非ゼロ度数データF’(i=1〜8)を前記置換処理部50に出力する。また、データ記憶部60から読み出した入替データP(i=1〜8)も前記置換処理部50に出力し、置換処理部50は、置換情報R(i=2〜8)を基に置換した非ゼロ度数データF”(i=1〜8)及び入替データP’(i=1〜8)をデータ記憶部60に出力する。   The replacement information generation processing unit 40 generates replacement information R (i) as described above. The replacement information generation processing unit 40 generates replacement information R (i = 2 to 8) and non-generation information generated from the eight non-zero frequency data F ′ (i = 1 to 8) output from the frequency update processing unit 30. Zero frequency data F ′ (i = 1 to 8) is output to the replacement processing unit 50. The replacement data P (i = 1 to 8) read from the data storage unit 60 is also output to the replacement processing unit 50, and the replacement processing unit 50 performs replacement based on the replacement information R (i = 2 to 8). The non-zero frequency data F ″ (i = 1 to 8) and the replacement data P ′ (i = 1 to 8) are output to the data storage unit 60.

そして、置換情報生成処理部40は、次に、度数更新処理部30から出力した8個の非ゼロ度数データF’(i=8〜15)について同様に処理して置換情報R(i=9〜15)を生成し(図4参照)、置換情報R(i=9〜15)及び非ゼロ度数データF’(i=9〜15)、データ記憶部60から読み出した入替データP(i=9〜15)を前記置換処理部50に出力し、置換処理部50は、置換情報R(i=9〜15)を基に置換した非ゼロ度数データF”(i=9〜15)及び入替データP’(i=9〜15)をデータ記憶部60に出力する。   Then, the replacement information generation processing unit 40 performs the same processing on the eight non-zero frequency data F ′ (i = 8 to 15) output from the frequency update processing unit 30 to perform replacement information R (i = 9). To 15) (see FIG. 4), replacement information R (i = 9 to 15) and non-zero frequency data F ′ (i = 9 to 15), replacement data P (i = 9 to 15) are output to the replacement processing unit 50. The replacement processing unit 50 replaces the non-zero frequency data F ″ (i = 9 to 15) and the replacement based on the replacement information R (i = 9 to 15). Data P ′ (i = 9 to 15) is output to the data storage unit 60.

置換情報生成処理部40は、このようにして、2サイクルで1ブロック分の置換情報R(i=2〜15)を生成し、この処理をブロック単位で繰り返して、1つの画像データについて処理を行う。   In this way, the replacement information generation processing unit 40 generates replacement information R (i = 2 to 15) for one block in two cycles, and repeats this processing in units of blocks to process one image data. Do.

この置換処理部50は、図5に示すように、並設された7個の置換器、即ち、第1置換器61,第2置換器62,第3置換器63,第4置換器64,第5置換器65,第6置換器66及び第7置換器67と、レジスタ68とセレクタ69とを備えている。前記第1〜7置換器61〜67は,それぞれ、非ゼロ度数データF’(i)及び入替データP(i)が入力される入力ポートAと、非ゼロ度数データF’(i+1)及び入替データP(i+1)が入力される入力ポートBと、置換情報R(i+1)が入力される入力ポートCと、置換後の非ゼロ度数データF”(i)及び入替データP’(i)を出力する出力ポートDと、置換後の非ゼロ度数データF”(i+1)及び入替データP’(i+1)を出力する出力ポートEとを備えている。   As shown in FIG. 5, the replacement processing unit 50 includes seven replacement units arranged in parallel, that is, a first replacement unit 61, a second replacement unit 62, a third replacement unit 63, a fourth replacement unit 64, A fifth replacer 65, a sixth replacer 66, a seventh replacer 67, a register 68, and a selector 69 are provided. The first to seventh replacers 61 to 67 are respectively input port A to which non-zero frequency data F ′ (i) and replacement data P (i) are input, and non-zero frequency data F ′ (i + 1) and replacement. Input port B to which data P (i + 1) is input, input port C to which replacement information R (i + 1) is input, non-zero frequency data F ″ (i) and replacement data P ′ (i) after replacement An output port D that outputs data and an output port E that outputs non-zero frequency data F ″ (i + 1) and replacement data P ′ (i + 1) after replacement are provided.

そして、第1置換器61の非ゼロ度数データF”(i+1)及び入替データP’(i+1)を出力する出力ポートEは、第2置換器62の非ゼロ度数データF’(i)及び入替データP(i)を入力する入力ポートAに接続され、同様にして、第2〜6置換器62〜66の非ゼロ度数データF”(i+1)及び入替データP’(i+1)を出力する出力ポートEは、第3〜7置換器63〜67の非ゼロ度数データF’(i)及び入替データP(i)を入力する入力ポートAにそれぞれ接続されている。斯くして、第1〜第6置換器61〜66から出力される非ゼロ度数データF”(i+1)及び入替データP’(i+1)は、それぞれ第2〜第7置換器62〜67に対して非ゼロ度数データF’(i)及び入替データP(i)として入力される。   The output port E that outputs the non-zero frequency data F ″ (i + 1) and the replacement data P ′ (i + 1) of the first replacer 61 is connected to the non-zero frequency data F ′ (i) of the second replacer 62 and the replacement. Similarly, the output connected to the input port A for inputting the data P (i) and outputting the non-zero frequency data F ″ (i + 1) and the replacement data P ′ (i + 1) of the second to sixth replacers 62 to 66. The port E is connected to an input port A for inputting the non-zero frequency data F ′ (i) and replacement data P (i) of the third to seventh replacers 63 to 67, respectively. Thus, the non-zero frequency data F ″ (i + 1) and replacement data P ′ (i + 1) output from the first to sixth replacers 61 to 66 are respectively sent to the second to seventh replacers 62 to 67. Are input as non-zero frequency data F ′ (i) and replacement data P (i).

また、各第1〜7置換器61〜67の非ゼロ度数データF”(i)及び入替データP’(i)を出力する出力ポートDは、テーブルデータ記憶部60に接続され、第7置換器67の非ゼロ度数データF”(i+1)及び入替データP’(i+1)を出力する出力ポートEもテーブルデータ記憶部60に接続されている。尚、この第7置換器67の非ゼロ度数データF”(i+1)及び入替データP’(i+1)を出力する出力ポートEは、前記レジスタ68にも接続され、非ゼロ度数データF”(8)及び入替データP’(8)のみ、レジスタ68に出力される。また、レジスタ68の出力ポートは、セレクタ69を介し、第1置換器61の非ゼロ度数データF’(i)及び入替データP(i)を入力する入力ポートAに接続され、各ブロックの初回のi=1のセレクト条件で、置換情報生成処理部40から出力した非ゼロ度数データF’(1)及びデータ記憶部60から読み出された入替データP(1)が第1置換器61に入力され、それ以外のセレクト条件で、このレジスタ68に保持された非ゼロ度数データF”(8)及び入替データP’(8)が第1置換器61の入力ポートAに入力される。   Further, the output port D that outputs the non-zero frequency data F ″ (i) and the replacement data P ′ (i) of each of the first to seventh replacers 61 to 67 is connected to the table data storage unit 60, and the seventh replacement An output port E that outputs the non-zero frequency data F ″ (i + 1) and replacement data P ′ (i + 1) of the device 67 is also connected to the table data storage unit 60. The output port E that outputs the non-zero frequency data F ″ (i + 1) and replacement data P ′ (i + 1) of the seventh replacer 67 is also connected to the register 68, and the non-zero frequency data F ″ (8 ) And replacement data P ′ (8) only are output to the register 68. The output port of the register 68 is connected to the input port A for inputting the non-zero frequency data F ′ (i) and the replacement data P (i) of the first replacer 61 via the selector 69, and the first time of each block The non-zero frequency data F ′ (1) output from the replacement information generation processing unit 40 and the replacement data P (1) read from the data storage unit 60 are sent to the first replacement unit 61 under the selection condition of i = 1. The non-zero frequency data F ″ (8) and replacement data P ′ (8) held in the register 68 are input to the input port A of the first replacer 61 under other selection conditions.

斯くして、この置換処理部50では、まず、前記置換情報生成処理部40から置換情報R(i=2〜8)及び非ゼロ度数データF’(i=1〜8)、データ記憶部60から入替データP(i=1〜8)が、それぞれ、第1〜7置換器61〜67に入力される。即ち、F’(1),P(1),F’(2),P(2)及びR(2)が第1置換器61に入力され、F’(3),P(3)及びR(3)が第2置換器62に入力され、同様にして、第3〜7置換器63〜67に、それぞれ、F’(i=4〜8),P(i=4〜8)及びR(i=4〜8)が入力される。   Thus, in the replacement processing unit 50, first, the replacement information R (i = 2 to 8) and the non-zero frequency data F ′ (i = 1 to 8), the data storage unit 60 from the replacement information generation processing unit 40. The replacement data P (i = 1 to 8) is input to the first to seventh replacers 61 to 67, respectively. That is, F ′ (1), P (1), F ′ (2), P (2) and R (2) are input to the first replacer 61, and F ′ (3), P (3) and R (3) is input to the second replacer 62, and similarly, F ′ (i = 4 to 8), P (i = 4 to 8) and R are respectively input to the third to seventh replacers 63 to 67. (I = 4 to 8) is input.

そして、第1置換器61では、置換情報R(2)に基づいて非ゼロ度数データF’(1)とF’(2)との置換処理及び入替データP(1)とP(2)との置換処理が行われる。即ち、置換情報R(2)が1であれば、F”(1)としてF’(2)が出力され、P’(1)としてP(2)が出力されるとともに、第2置換器62にF’(2)としてF’(1)が入力され、P(2)としてP(1)が入力される。一方、置換情報R(2)が0であれば、F”(1)としてF’(1)が出力され、P’(1)としてP(1)が出力されるとともに、第2置換器62にF’(2)としてF’(2)が入力され、P(2)としてP(2)が入力される。   Then, in the first replacer 61, based on the replacement information R (2), replacement processing of the non-zero frequency data F ′ (1) and F ′ (2) and replacement data P (1) and P (2) The replacement process is performed. That is, if the replacement information R (2) is 1, F ′ (2) is output as F ″ (1), P (2) is output as P ′ (1), and the second replacer 62 F ′ (1) is input as F ′ (2) and P (1) is input as P (2). On the other hand, if the replacement information R (2) is 0, F ′ (1) F '(1) is output, P (1) is output as P' (1), and F '(2) is input as F' (2) to the second replacer 62, and P (2) P (2) is input as

第2〜7置換器62〜67においても、同様の処理が行われ、第2〜7置換器62〜67から、それぞれ、F”(i=2〜8)及びP’(i=2〜8)が出力される。そして、このようにして出力されたF”(i=1〜8)及びP’(i=1〜8)がデータ記憶部60に入力される。また、F”(8)及びP’(8)については、レジスタ68にも入力され、次の処理のために、このレジスタ68に保持される。   In the second to seventh replacers 62 to 67, the same processing is performed. From the second to seventh replacers 62 to 67, F ″ (i = 2 to 8) and P ′ (i = 2 to 8), respectively. Then, F ″ (i = 1 to 8) and P ′ (i = 1 to 8) output in this way are input to the data storage unit 60. Further, F ″ (8) and P ′ (8) are also input to the register 68 and held in this register 68 for the next processing.

次に、前記置換情報生成処理部40から、置換情報R(i=9〜15)、非ゼロ度数データF’(i=9〜15)及びデータ記憶部60から入替データP(i=9〜15)が、それぞれ、第1〜7置換器61〜67に入力される。また、第1置換器61には、レジスタ68からF”(8)及びP’(8)がセレクタ69を介してF’(8)及びP(8)として入力される。   Next, replacement information R (i = 9 to 15), non-zero frequency data F ′ (i = 9 to 15), and replacement data P (i = 9 to 15) are input to the first to seventh replacers 61 to 67, respectively. Further, F ″ (8) and P ′ (8) are input from the register 68 to the first replacer 61 as F ′ (8) and P (8) through the selector 69.

そして、第1〜7置換器61〜67において、上記と同様の置換処理が行われ、置換後のF”(i=8〜15)及びP’(i=8〜15)が出力され、これらがデータ記憶部60に入力され、データ記憶部60では、置換処理部50から入力されるF”(i=1〜15)及びP’(i=1〜15)によって、F(i)及びP(i)が更新される。   Then, in the first to seventh replacers 61 to 67, the same replacement process as described above is performed, and F ″ (i = 8 to 15) and P ′ (i = 8 to 15) after replacement are output. Is input to the data storage unit 60. In the data storage unit 60, F (i) and P are input by F ″ (i = 1 to 15) and P ′ (i = 1 to 15) input from the replacement processing unit 50. (I) is updated.

置換処理部50は、このようにして、2サイクルで1ブロック分の置換処理を実行し、この処理をブロック単位で繰り返して、1つの画像データについて処理を行う。1ブロック処理後のF”(i)及びP’(i)は、図15に例示したようになる。   In this way, the replacement processing unit 50 performs replacement processing for one block in two cycles, and repeats this processing in units of blocks to perform processing on one image data. F ″ (i) and P ′ (i) after one block processing are as illustrated in FIG.

以上の構成を備えた本例の画像符号化装置1によれば、まず、外部から前記色空間変換部110に1画像分の画像データが入力され、この画像データが色変換処理され、処理後の画像データが周波数変換部120に入力される。   According to the image coding apparatus 1 of the present example having the above configuration, first, image data for one image is input from the outside to the color space conversion unit 110, and the image data is subjected to color conversion processing. Are input to the frequency converter 120.

周波数変換部120では、4×4画素を一つのブロックとしてラスター方向に順次処理し、各画素のデータを周波数帯域毎の係数に変換する処理を行い、処理後の第1階層データ、第2階層データ及び第3階層データをブロック毎に量子化部130に出力する。   The frequency conversion unit 120 sequentially processes 4 × 4 pixels as one block in the raster direction, converts the data of each pixel into a coefficient for each frequency band, and processes the first layer data and the second layer after processing. The data and the third layer data are output to the quantization unit 130 for each block.

量子化部130では、周波数変換部120により係数化された第1階層データ、第2階層データ及び第3階層データを、それぞれ設定された量子化パラメータで除算して量子化する処理を行い、処理後の第1階層データ、第2階層データ及び第3階層データを、ブロック毎にDC/LP/HP予測部140に出力し、DC/LP/HP予測部140では、同じくブロック毎の第1階層データ、第2階層データ及び第3階層データについて予測モードを導出するとともに、相関の高いブロック間で減算する処理を行い、処理後の第1階層データ、第2階層データ及び第3階層データをブロック毎に適応型スキャン部10に出力する。   The quantization unit 130 performs a process of dividing the first layer data, the second layer data, and the third layer data that have been coefficientized by the frequency conversion unit 120 by dividing by the set quantization parameter, respectively, The subsequent first layer data, second layer data, and third layer data are output to the DC / LP / HP prediction unit 140 for each block, and the DC / LP / HP prediction unit 140 similarly uses the first layer for each block. The prediction mode is derived for the data, the second tier data, and the third tier data, and the process of subtracting between the highly correlated blocks is performed, and the first tier data, the second tier data, and the third tier data after processing are blocked. Each time, the data is output to the adaptive scan unit 10.

適応型スキャン部10では、前記DC/LP/HP予測部140から入力された第1階層データ及び第2階層データについて、4×4画素に対応するブロック単位で処理し、ブロック内で係数データZ(i)を入れ替える処理を行い、処理後の第1階層データ及び第2階層データをVLC符号化処理部160に出力する。入替処理後、入替処理を行うための入替データP’(i=1〜8)を生成し、次ブロックの処理ために入替データP(i=1〜8)を更新する処理と、P’(i=8〜15)を生成し、次ブロックの処理ために入替データP(i=8〜15)を更新する処理との2つのサイクルを実行することで生成する。したがって、本例の適応型スキャン部10によれば、入替データP’(i)を生成するのに、係数データの数と同じサイクル数を繰り返す必要があった従来の適応型スキャン部150に比べて、その処理時間が短く、効率的に入替処理を行うことができる。尚、本実施例では、係数の入替処理後、次ブロックの処理のために、入替データP(i=1〜15)を更新している。非特許文献1の仕様とは異なるが、入替データP(i=1〜15)の更新後、同じブロックの係数の入替処理をする構成としてもよい。尚、DC/LP/HP予測部140から入力された第3階層データは、そのままVLC符号化処理部160に出力される。   The adaptive scanning unit 10 processes the first layer data and the second layer data input from the DC / LP / HP prediction unit 140 in units of blocks corresponding to 4 × 4 pixels, and generates coefficient data Z in the block. The process of replacing (i) is performed, and the processed first layer data and second layer data are output to the VLC encoding processing unit 160. After replacement processing, replacement data P ′ (i = 1 to 8) for performing replacement processing is generated, and replacement data P (i = 1 to 8) is updated for processing of the next block, and P ′ ( i = 8 to 15) is generated by executing two cycles of processing for updating the replacement data P (i = 8 to 15) for processing of the next block. Therefore, according to the adaptive scanning unit 10 of this example, in order to generate the replacement data P ′ (i), it is necessary to repeat the same number of cycles as the number of coefficient data, compared with the conventional adaptive scanning unit 150. Thus, the processing time is short and the replacement process can be performed efficiently. In this embodiment, the replacement data P (i = 1 to 15) is updated for the processing of the next block after the coefficient replacement processing. Although it is different from the specification of Non-Patent Document 1, a configuration may be adopted in which the replacement processing of the coefficients of the same block is performed after the replacement data P (i = 1 to 15) is updated. Note that the third layer data input from the DC / LP / HP prediction unit 140 is output to the VLC encoding processing unit 160 as it is.

VLC符号化処理部160では、前記適応型スキャン部10から出力された第1階層データ、2階層データ及び第3階層データに対してエントロピー符号化処理を施し、コードストリームを生成して、ビットストリーム出力部170に出力し、ビットストリーム出力部170では、入力された1画像データ分のコードストリームを1纏めにして1つのファイルを形成し、形成されたファイルを外部に出力する。   The VLC encoding processing unit 160 performs entropy encoding processing on the first layer data, the second layer data, and the third layer data output from the adaptive scan unit 10, generates a code stream, and generates a bit stream. The output is performed by the output unit 170. The bit stream output unit 170 forms a single file by combining the input code streams for one image data, and outputs the formed file to the outside.

以上詳述したように、本例の画像符号化装置1によれば、その適応型スキャン部10において、係数データZ(i)を入れ替える処理を行うための入替データP’(i)が、P’(i=1〜8)を生成する処理と、P’(i=8〜15)を生成する処理の2つのサイクルを実行することで生成されるので、従来の適応型スキャン部150に比べて、その処理時間が短く、効率的に入替処理を行うことができ、その結果、従来に比べて、画像符号化装置1全体の処理速度を速めることができ、効率的な符号化処理を実現することができる。   As described in detail above, according to the image encoding device 1 of this example, the replacement data P ′ (i) for performing the process of replacing the coefficient data Z (i) in the adaptive scan unit 10 is P Since it is generated by executing two cycles of processing for generating '(i = 1 to 8) and processing for generating P' (i = 8 to 15), compared to the conventional adaptive scanning unit 150 Therefore, the processing time is short and the replacement process can be performed efficiently. As a result, the processing speed of the entire image encoding device 1 can be increased compared to the conventional case, and an efficient encoding process is realized. can do.

尚、1サイクルの処理は、処理のタイミングとして用いられるクロックの、1クロック内で処理されるものであり、したがって、本例では、2クロックで1つのブロックの適応型スキャンが実行される。   Note that one cycle of processing is performed within one clock of the clock used as processing timing, and therefore, in this example, one block of adaptive scan is executed in two clocks.

以上、本発明の一実施形態について説明したが、本発明が採り得る具体的な態様は、何らこれに限定されるものではない。例えば、上例では、適応型スキャン部10における入替データP’(i)の生成処理を2サイクルで生成するようにしているが、これに限られるものではなく、3以上のサイクルで入替データP’(i)を生成するようにしても良く、また、可能であれば、1サイクルで1ブロック15個のデータを処理して入替データP’(i)を生成するようにしても良い。   As mentioned above, although one Embodiment of this invention was described, the specific aspect which this invention can take is not limited to this at all. For example, in the above example, the generation process of the replacement data P ′ (i) in the adaptive scanning unit 10 is generated in two cycles. However, the present invention is not limited to this, and the replacement data P in three or more cycles. '(I) may be generated, and if possible, replacement data P' (i) may be generated by processing 15 blocks of data in one cycle.

この場合、処理サイクルの数に応じて、処理する係数データZ(i)群の数を設定する必要があるが、前記置換処理部50における置換器の数は、1サイクルで処理する係数データZ(i)群の数に応じて設定される。即ち、置換器の数は、(1サイクルで処理する係数データZ(i)群の数−1)個となる。ただし、本発明の趣旨から言って、係数データの数よりも少ないサイクル数で処理することが肝要である。   In this case, although it is necessary to set the number of coefficient data Z (i) groups to be processed according to the number of processing cycles, the number of replacers in the replacement processing unit 50 is the coefficient data Z processed in one cycle. (I) It is set according to the number of groups. That is, the number of replacers is (the number of coefficient data Z (i) groups processed in one cycle minus 1). However, for the purpose of the present invention, it is important to process the number of cycles smaller than the number of coefficient data.

1 画像符号化装置
10 適応型スキャン部
20 係数データ入替処理部
30 度数更新処理部
40 置換情報生成処理部
50 置換処理部
60 データ記憶部
61 第1置換器
62 第2置換器
63 第3置換器
64 第4置換器
65 第5置換器
66 第6置換器
67 第7置換器
68 レジスタ
69 セレクタ
110 色空間変換部
120 周波数変換部
130 量子化部
140 DC/LP/HP予測部
150 適応型スキャン部
151 P/S変換部
152 係数データ入替処理部
153 非ゼロデータ加算部
154 比較・置換処理部
155 データ記憶部
156 セレクタ
157 レジスタ
158 比較部
159 置換部
160 VLC符号化部
170 ビットストリーム出力部
DESCRIPTION OF SYMBOLS 1 Image coding apparatus 10 Adaptive scanning part 20 Coefficient data replacement | exchange part 30 Frequency update processing part 40 Replacement information generation processing part 50 Replacement | exchange part 60 Data memory | storage part 61 1st substitution device 62 2nd substitution device 63 3rd substitution device 64 Fourth replacement unit 65 Fifth replacement unit 66 Sixth replacement unit 67 Seventh replacement unit 68 Register 69 Selector 110 Color space conversion unit 120 Frequency conversion unit 130 Quantization unit 140 DC / LP / HP prediction unit 150 Adaptive scan unit 151 P / S conversion section 152 Coefficient data replacement processing section 153 Non-zero data addition section 154 Comparison / replacement processing section 155 Data storage section 156 Selector 157 Register 158 Comparison section 159 Replacement section 160 VLC encoding section 170 Bit stream output section

Claims (4)

画像データを所定画素数のブロック単位で周波数変換して係数化する周波数変換部と、
前記周波数変換部により係数化されたブロック単位のn個の係数データを量子化する量子化部と、
前記ブロックの画素位置iと、各画素位置iの係数データZ(i)が非ゼロであった度数との関係を表す非ゼロ度数データF(i)、及び前記ブロック内で係数データZ(i)を入れ替えるための入替データP(i)であって、現在の画素位置iと、当該画素位置iの係数データZ(i)を、入れ替えによって組み入れるべき画素位置i’との関係を表す入替データP(i)を用いて、前記量子化部により量子化されたブロック単位の係数データZ(i)を該ブロック内で入替処理する適応型スキャン部と、
前記入替処理後のブロック単位の係数データZ’(i)を符号化して圧縮する符号化部とを少なくとも備えた画像符号化装置において、
前記適応型スキャン部は、
前記非ゼロ度数データF(i)及び入替データP(i)を記憶するデータ記憶部と、
前記量子化部により量子化された係数データZ(i)を、前記データ記憶部に記憶された入替データP(i)に基づいて、前記ブロック内で入替処理する係数データ入替処理部と、
前記データ記憶部に記憶された非ゼロ度数データF(i)を読み出すとともに、前記入替処理後のブロック単位の係数データZ’(i)が非ゼロであるか否かを確認し、前記非ゼロである画素位置iの非ゼロ度数に1を加えて、前記読み出した非ゼロ度数データF(i)を更新し、更新後の非ゼロ度数データF’(i)とする度数更新処理部と、
前記度数更新処理部によって更新された非ゼロ度数データF’(i)を用い、前後するF’(i−1)とF’(i)とを順次比較し、F’(i−1)とF’(i)、P(i−1)とP(i)とを置換すべきか否かの置換情報R(i)を生成する置換情報生成処理部と、
前記データ記憶部に記憶された入替データP(i)を読み出すとともに、前記置換情報生成処理部によって生成された置換情報R(i)に基づいて、前記度数更新処理部により更新されたF’(i−1)とF’(i)、及び前記読み出したP(i−1)とP(i)との置換処理を行い、置換処理後の非ゼロ度数データF”(i)及び入替データP’(i)で前記データ記憶部に記憶された非ゼロ度数データF(i)及び入替データP(i)を更新する置換処理部とを備えて構成されることを特徴とする画像符号化装置。但し、前記nは2以上の整数であり、前記iは1〜nの整数である。
A frequency conversion unit that converts the frequency of image data into a block unit of a predetermined number of pixels to generate a coefficient;
A quantization unit that quantizes the n coefficient data in units of blocks that have been coefficientized by the frequency conversion unit;
Non-zero frequency data F (i) representing the relationship between the pixel position i of the block and the frequency at which the coefficient data Z (i) at each pixel position i was non-zero, and coefficient data Z (i ) Is replacement data P (i) for replacing the current pixel position i and the replacement data representing the relationship between the pixel position i ′ to which the coefficient data Z (i) of the pixel position i should be incorporated by replacement. An adaptive scanning unit that uses P (i) to replace the block unit coefficient data Z (i) quantized by the quantization unit in the block;
An image encoding device including at least an encoding unit that encodes and compresses the coefficient data Z ′ (i) in block units after the replacement process;
The adaptive scan unit includes:
A data storage unit for storing the non-zero frequency data F (i) and replacement data P (i);
A coefficient data replacement processing unit that performs a replacement process on the coefficient data Z (i) quantized by the quantization unit in the block based on the replacement data P (i) stored in the data storage unit;
The non-zero frequency data F (i) stored in the data storage unit is read out, and it is confirmed whether or not the coefficient data Z ′ (i) of the block unit after the replacement process is non-zero, and the non-zero A frequency update processing unit that adds 1 to the non-zero frequency at the pixel position i and updates the read non-zero frequency data F (i) to be updated non-zero frequency data F ′ (i);
Using the non-zero frequency data F ′ (i) updated by the frequency update processing unit, F ′ (i−1) and F ′ (i) are sequentially compared, and F ′ (i−1) and A replacement information generation processing unit for generating replacement information R (i) indicating whether or not F ′ (i), P (i−1) and P (i) should be replaced;
The replacement data P (i) stored in the data storage unit is read, and F ′ (updated by the frequency update processing unit based on the replacement information R (i) generated by the replacement information generation processing unit. i-1) and F ′ (i) and the read P (i-1) and P (i) are replaced, and the non-zero frequency data F ″ (i) and replacement data P after the replacement are processed. An image encoding device comprising: a non-zero frequency data F (i) and replacement data P (i) stored in the data storage unit in (i) and a replacement processing unit P (i) However, n is an integer of 2 or more, and i is an integer of 1 to n.
前記度数更新処理部、置換情報生成処理部及び置換処理部は、それぞれ、前記1ブロックを構成するn個の係数データZ(i)群を、1サイクルでの処理数をm個として、複数サイクル繰り返して処理するように構成されていることを特徴とする請求項1記載の画像符号化装置。但し、前記nは、3以上の整数であり、前記mは2以上の整数で、前記nより小さい整数である。また、前記iは1〜nの整数である。   Each of the frequency update processing unit, the replacement information generation processing unit, and the replacement processing unit has a plurality of cycles in which n coefficient data Z (i) groups constituting the one block are set to m in one cycle. The image coding apparatus according to claim 1, wherein the image coding apparatus is configured to repeatedly perform processing. However, said n is an integer greater than or equal to 3, and said m is an integer greater than or equal to 2, and is an integer smaller than said n. The i is an integer from 1 to n. 前記置換処理部は、(n−1)個の置換器を備え、
前記各置換器は、それぞれ、3つの入力ポートA,B,C及び2つの出力ポートD,Eを有し、
j番目の置換器の出力ポートEは、(j+1)番目の置換器の入力ポートAに順次接続され、
1番目の置換器の入力ポートAには、前記非ゼロ度数データF’(1)及び入替データP(1)が入力され、j番目の前記置換の入力ポートBには、前記非ゼロ度数データF’(j+1)及び入替データP(j+1)が入力され、j番目の前記置換の入力ポートCには、前記置換情報R(j+1)が入力されるとともに、各置換器では、前記入力ポートCから入力された置換情報R(j+1)に従って置換処理が実行されて、置換処理後の非ゼロ度数データF”(j)及び入替データP’(j)が前記各置換器の出力ポートDから出力され、(n−1)番目の置換器の出力ポートEから、置換処理後の非ゼロ度数データF”(n)及び入替データP’(n)が出力されるように構成されていることを特徴とする請求項1記載の画像符号化装置。但し、前記nは2以上の整数であり、前記iは1〜nの整数である。また、前記jは1〜(n−1)の整数である。
The replacement processing unit includes (n-1) replacers,
Each replacer has three input ports A, B, C and two output ports D, E,
The output port E of the jth replacer is sequentially connected to the input port A of the (j + 1) th replacer,
The first to the input port A of the replacement unit, the non-zero frequency data F '(1) and replacement data P (1) is input to the input port B of the j th of said replacement unit, the non-zero frequency data F '(j + 1) and replacement data P (j + 1) are input, j-th wherein the input port C of the replacement unit of the with replacement information R (j + 1) are input, each substituted instrument, the input The replacement process is executed according to the replacement information R (j + 1) input from the port C, and the non-zero frequency data F ″ (j) and replacement data P ′ (j) after the replacement process are output ports D of the respective replacers. And the non-zero frequency data F ″ (n) and replacement data P ′ (n) after the replacement process are output from the output port E of the (n−1) th replacer. The image coding apparatus according to claim 1. However, said n is an integer greater than or equal to 2, and said i is an integer of 1-n. The j is an integer from 1 to (n-1).
前記1ブロックを構成するn個の係数データZ(i)群を、1サイクルでの処理数をm個として、複数サイクル繰り返して処理するように構成されてなり、
前記置換処理部は、1サイクルで処理する前記係数データZ(i)群の数をm個として、1番目から(m−1)番目までの(m−1)個の置換器を備え、
前記各置換器は、それぞれ、3つの入力ポートA,B,C及び2つの出力ポートD,Eを有し、
k番目の置換器の出力ポートEは、k+1番目の置換器の入力ポートAに順次接続され、
前記1番目の置換器の入力ポートAには、非ゼロ度数データF’(a)及び入替データP(a)が入力され、k番目の前記置換の入力ポートBには、前記非ゼロ度数データF’(a+1)及び入替データP(a+1)が入力され、k番目の前記置換の入力ポートCには、前記置換情報R(a+1)が入力されるとともに、各置換器では、前記入力ポートCから入力された置換情報R(a+1)に従って置換処理が実行されて、置換処理後の非ゼロ度数データF”(a)及び入替データP’(a)が前記各置換器の出力ポートDから出力され、(m−1)番目の置換器の出力ポートEから、置換処理後の非ゼロ度数データF”(a+1)及び入替データP’(a+1)が出力されるように構成されていることを特徴とする請求項2記載の画像符号化装置。但し、前記nは、3以上の整数であり、前記iは1〜nの整数である。また、前記mは2以上の整数で、前記nより小さい整数であり、前記kは1〜(m−1)の整数である。また、前記aは、a=[k+(r−1)×(m−1)]であり、前記rは繰り返し時の回数である。
The n coefficient data Z (i) group constituting one block is configured to repeatedly process a plurality of cycles, with the number of processes in one cycle being m.
The replacement processing unit includes (m−1) number of replacers from the first to (m−1) th, where m is the number of coefficient data Z (i) groups processed in one cycle,
Each replacer has three input ports A, B, C and two output ports D, E,
The output port E of the kth replacer is sequentially connected to the input port A of the k + 1th replacer,
The input port A of the first shifter, a non-zero frequency data F '(a) and replacement data P (a) is input to the input port B of the k-th of said replacement unit, the non-zero frequency data F '(a + 1) and replacement data P (a + 1) is input, k-th wherein the input port C of the replacement unit of the with replacement information R (a + 1) is input, at each substitutable instrument, the input The replacement process is executed according to the replacement information R (a + 1) input from the port C, and the non-zero frequency data F ″ (a) and replacement data P ′ (a) after the replacement process are output to the output port D of each replacer. And the non-zero frequency data F ″ (a + 1) and replacement data P ′ (a + 1) after the replacement process are output from the output port E of the (m−1) th replacer. The image code according to claim 2, Device. However, said n is an integer greater than or equal to 3, and said i is an integer of 1-n. The m is an integer of 2 or more and is an integer smaller than the n, and the k is an integer of 1 to (m−1). The a is a = [k + (r−1) × (m−1)], and the r is the number of repetitions.
JP2013102719A 2013-05-15 2013-05-15 Image encoding device Active JP6081862B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2013102719A JP6081862B2 (en) 2013-05-15 2013-05-15 Image encoding device
PCT/JP2014/061009 WO2014185216A1 (en) 2013-05-15 2014-04-18 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013102719A JP6081862B2 (en) 2013-05-15 2013-05-15 Image encoding device

Publications (2)

Publication Number Publication Date
JP2014225722A JP2014225722A (en) 2014-12-04
JP6081862B2 true JP6081862B2 (en) 2017-02-15

Family

ID=51898197

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013102719A Active JP6081862B2 (en) 2013-05-15 2013-05-15 Image encoding device

Country Status (2)

Country Link
JP (1) JP6081862B2 (en)
WO (1) WO2014185216A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5421609B2 (en) * 2009-02-17 2014-02-19 キヤノン株式会社 Scan conversion device, image encoding device, and control method thereof
JP5302769B2 (en) * 2009-05-14 2013-10-02 キヤノン株式会社 Scan conversion apparatus, image encoding apparatus, and control method thereof
JP2012129888A (en) * 2010-12-16 2012-07-05 Samsung Electronics Co Ltd Image encoding apparatus and image encoding method
JP6087511B2 (en) * 2011-04-19 2017-03-01 キヤノン株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
WO2014185216A1 (en) 2014-11-20
JP2014225722A (en) 2014-12-04

Similar Documents

Publication Publication Date Title
WO2012046996A2 (en) Method for encoding/decoding block information using quad tree, and device for using same
US10455244B2 (en) Method and device for entropy encoding or entropy decoding video signal for high-capacity parallel processing
CN107105208A (en) A kind of lossless coding and coding/decoding method of Bayer images
JP2010515317A (en) Apparatus and method for encoding transform coefficient block
JP6208993B2 (en) Image decoding apparatus and decoding processing method of image decoding apparatus
JP2014241579A (en) Video compression device
JPWO2009087783A1 (en) Encoding data generation apparatus, encoding data generation method, decoding apparatus, and decoding method
JP4745865B2 (en) Encoding apparatus and method
JP3796432B2 (en) Filter processing apparatus and filter processing method
KR20220019285A (en) Method and encoder for encoding a sequence of frames
US11677932B2 (en) Image processing device
US7512281B2 (en) Image processing apparatus that can generate coded data applicable to progressive reproduction
JP5966347B2 (en) Image processing apparatus and method
JP6081862B2 (en) Image encoding device
KR20200006908A (en) Method and system of grouping entropy coding group for transform mode
WO2013068733A1 (en) Context adaptive data encoding
JP2009232454A (en) Method and apparatus for generating coded block pattern for high-pass coefficient
US20150023410A1 (en) Method for simultaneously coding quantized transform coefficients of subgroups of frame
Ahmadvand et al. A new pipelined architecture for JPEG2000 MQ-coder
JP6081869B2 (en) Image decoding device
WO2015045601A1 (en) Image decoding device
WO2012118359A2 (en) Method for determining color difference component quantization parameter and device using the method
JPH11155143A (en) Image compression coding/decoding method, image compression coding and decoding device, image compression coding transmission method, image compression coding transmission system, and record medium with image compression coding and decoding program recorded therein
JP6185375B2 (en) Image encoding device
JP6204171B2 (en) Image encoding apparatus and image decoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160307

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161027

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161128

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: 20161220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170119

R150 Certificate of patent or registration of utility model

Ref document number: 6081862

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250