JP2013219611A - Encoder and encoding method, and decoder and decoding method - Google Patents

Encoder and encoding method, and decoder and decoding method Download PDF

Info

Publication number
JP2013219611A
JP2013219611A JP2012089654A JP2012089654A JP2013219611A JP 2013219611 A JP2013219611 A JP 2013219611A JP 2012089654 A JP2012089654 A JP 2012089654A JP 2012089654 A JP2012089654 A JP 2012089654A JP 2013219611 A JP2013219611 A JP 2013219611A
Authority
JP
Japan
Prior art keywords
pixel
prediction
value
decoded
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012089654A
Other languages
Japanese (ja)
Inventor
Eiji Matsumoto
栄治 松本
Hideki Aiba
英樹 相羽
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.)
JVCKenwood Corp
Original Assignee
JVCKenwood Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2012089654A priority Critical patent/JP2013219611A/en
Publication of JP2013219611A publication Critical patent/JP2013219611A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable an appropriate compression coding of image data having different images alternately on every other line.SOLUTION: A decoding prediction error is generated by compressing and expanding a prediction error which is a prediction error of an encoding object pixel X, and is added to a prediction value which is outputted from a prediction pixel selection part, for generating a prediction value of the pixel X. A storage part stores a first prediction value of the pixel X, a second prediction value of a left neighbor pixel of the pixel X on a line which includes the pixel X, and a third prediction value of a plurality of pixels close to the pixel X included in a line just before the current line in coding order. In a case of general image coding, a prediction mode is selected based on the first, second, and third pixels stored in the storage part, and a prediction value is selected within the storage part by a prediction pixel selection part, according to the selected prediction value. In a case of LBL system image coding, the prediction mode is forcibly set to "Left", and the prediction pixel selection part selects the second prediction value in the storage part and outputs it.

Description

本発明は、画像データを圧縮符号化する際に用いて好適な符号化装置および符号化方法、ならびに、復号装置および復号方法に関する。   The present invention relates to an encoding device and an encoding method, and a decoding device and a decoding method suitable for use in compression encoding image data.

近年、デジタルハイビジョン放送やHD(High Definition)画像に対応する録画装置の普及、デジタルカメラの高解像度化などにより、家庭で使用するテレビジョン受像機などにおいても、大画面化および高解像度化が進んでいる。このため、テレビジョン受像機において画像処理を行うLSI(Large-Scale Integration)についても、HD画像(1920画素×1080ライン)に対応したLSIの需要が高まっている。   In recent years, with the spread of digital high-definition broadcasts and HD (High Definition) image recording devices, and the higher resolution of digital cameras, the size and resolution of television receivers used at home has increased. It is out. For this reason, as for LSI (Large-Scale Integration) that performs image processing in a television receiver, the demand for LSIs that support HD images (1920 pixels × 1080 lines) is increasing.

ところで、画像処理において、エンハンサやフレームレート変換処理などは、1フレーム以上の画像データをDDR SDRAM(Double-Data-Rate Synchronous Dynamic Random Access Memory)といった、高速なアクセスが可能なメモリに格納する必要がある。このような画像データを格納するためのメモリは、高速なアクセスが要求されるために高価であり、また、上述したHD画像の画像データを複数フレーム格納するためには、大容量のメモリが複数個必要になる場合もあり、製品のコストアップや、部品点数増加の要因となっている。   By the way, in image processing, enhancer, frame rate conversion processing, etc. needs to store image data of one frame or more in a memory capable of high-speed access such as DDR SDRAM (Double-Data-Rate Synchronous Dynamic Random Access Memory). is there. Such a memory for storing image data is expensive because high-speed access is required, and a plurality of large-capacity memories are used to store a plurality of frames of the above-described HD image data. In some cases, it is necessary to increase the product cost and the number of parts.

そのため、画像データを圧縮符号化してメモリに格納する技術が従来から開発されている。画像データの圧縮符号化方式の一つとして、MPEG(Moving Pictures Experts Group)方式が知られているが、アルゴリズムが複雑であるため回路をLSI化した場合に大面積を占めることになり、画像の高画質化処理に特化した信号処理用LSIや、安価な画像処理用LSIに適用するには不向きである。特許文献1では、符号化対象画素の符号化に先行して、符号化対象画素に対してライン方向に隣接し、既に符号化が完了した画素の画素値を用いて1次元で符号化対象画素の画素値を予測することで、圧縮符号化を行う方法が開示されている。   Therefore, a technique for compressing and encoding image data and storing it in a memory has been conventionally developed. The MPEG (Moving Pictures Experts Group) method is known as one of the compression coding methods of image data. However, since the algorithm is complicated, it takes up a large area when the circuit is made into an LSI. It is not suitable for application to a signal processing LSI specialized in high image quality processing or an inexpensive image processing LSI. In Patent Document 1, prior to encoding of a pixel to be encoded, the pixel to be encoded is one-dimensionally using pixel values of pixels that are adjacent to the pixel to be encoded in the line direction and have already been encoded. A method of performing compression encoding by predicting the pixel value of is disclosed.

また、符号化対象画素が含まれるラインに対して、符号化順で1つ前のラインの、符号化対象画素に対応する位置およびその近傍の画素の画素値をさらに用いて、2次元で当該符号化対象画素の画素値を予測して圧縮符号化を行う方法も知られている。この2次元で画素値を予測する方法を用いることで、1次元で画素値を予測した場合に対して符号化効率を向上させることが可能となる。   Further, with respect to the line including the encoding target pixel, the pixel value of the pixel corresponding to the encoding target pixel and the neighboring pixels of the line immediately before in the encoding order is further used in two dimensions. A method of performing compression encoding by predicting a pixel value of a pixel to be encoded is also known. By using this method of predicting pixel values in two dimensions, it is possible to improve the encoding efficiency compared to the case of predicting pixel values in one dimension.

ところで、近年では、2次元の画像を立体的に見せる、所謂3D映像に関する技術が発達し、3D映像を供給するための装置も、普及してきている。3D映像の伝送フォーマットの一つとして、右目用および左目用の映像信号を1ラインおきに交互に配置して表示させる、LBL(ラインバイライン:Line-by-Line)方式がある。   By the way, in recent years, a technique related to so-called 3D video that shows a two-dimensional image stereoscopically has been developed, and an apparatus for supplying 3D video has also become widespread. As one of 3D video transmission formats, there is an LBL (Line-by-Line) system in which video signals for right eye and left eye are alternately arranged every other line.

特開平7−15347号公報Japanese Patent Laid-Open No. 7-15347

LBL方式では、隣接するライン間の相関が一般の映像に対して小さいと考えられる。そのため、LBL方式による映像信号に対して、上述した2次元で画素値を予測する圧縮符号化方式を適用した場合、符号化対象画素位置以外で予測方向を決定すると、予測方向が実際の符号化対象画素位置において予測誤差が最小となる予測方向と異なる場合が生じる可能性がある。この場合、縦方向での予測誤差が大きくなることがあり、場合によっては、予測誤差が下方向に伝播してしまう可能性があるという問題点があった。   In the LBL method, it is considered that the correlation between adjacent lines is small with respect to a general video. Therefore, when the above-described compression encoding method for predicting pixel values in two dimensions is applied to a video signal based on the LBL method, if the prediction direction is determined at a position other than the encoding target pixel position, the prediction direction is actually encoded. There may be a case in which the prediction error is different from the prediction direction in which the prediction error is minimized at the target pixel position. In this case, the prediction error in the vertical direction may increase, and in some cases, the prediction error may propagate downward.

本発明は、上記に鑑みてなされたものであって、ライン毎に交互に異なる画像を配した画像データを適切に圧縮符号化可能とすることを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to appropriately compress and encode image data in which different images are arranged alternately for each line.

上述した課題を解決し、目的を達成するために、第1の発明は、入力画素の画素値と、画素値を予測した第1の予測値との誤差である予測誤差を取得する予測誤差取得部と、予測誤差を圧縮する圧縮部と、圧縮部で圧縮された予測誤差を伸長する伸長部と、伸長部で伸長された予測誤差と、第1の予測値とを加算して第2の予測値を生成する加算部と、少なくとも、第2の予測値と、入力画素が含まれるラインに対して符号化順で1つ前のラインの、入力画素に近接する画素に対応する第3の予測値と、入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とを記憶する記憶部と、第2の予測値と、第3の予測値と、第4の予測値とのうち少なくとも2の予測値に基づき求めた第1の予測値を出力する予測値出力部とを有し、予測値出力部は、予め定められた制御信号を受信した場合に、第2の予測値と第4の予測値とに基づき第1の予測値を求め、制御信号を受信しない場合に、第2の予測値と、第3の予測値と、第4の予測値とに基づき第1の予測値を求めることを特徴とする。   In order to solve the above-described problem and achieve the object, the first invention acquires a prediction error that is an error between a pixel value of an input pixel and a first prediction value obtained by predicting the pixel value. A compression unit that compresses the prediction error, a decompression unit that decompresses the prediction error compressed by the compression unit, a prediction error decompressed by the decompression unit, and the first prediction value, An adder for generating a prediction value; at least a second prediction value; and a third line corresponding to a pixel adjacent to the input pixel in the previous line in the coding order with respect to the line including the input pixel A storage unit that stores a prediction value and a fourth prediction value corresponding to the pixel immediately before the input pixel in the encoding order; a second prediction value; a third prediction value; A predicted value output unit that outputs a first predicted value obtained based on at least two predicted values of The value output unit obtains the first predicted value based on the second predicted value and the fourth predicted value when a predetermined control signal is received, and receives the second predicted value when the control signal is not received. The first predicted value is obtained based on the predicted value, the third predicted value, and the fourth predicted value.

また、第2の発明は、入力画素の画素値と、画素値を予測した第1の予測値との誤差である予測誤差を取得する予測誤差取得ステップと、予測誤差を圧縮する圧縮ステップと、圧縮ステップにより圧縮された予測誤差を伸長する伸長ステップと、伸長ステップにより伸長された予測誤差と、第1の予測値とを加算して第2の予測値を生成する加算ステップと、少なくとも、第2の予測値と、入力画素が含まれるラインに対して符号化順で1つ前のラインの、入力画素に近接する画素に対応する第3の予測値と、入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とを記憶部に記憶する記憶ステップと、記憶部に記憶される第2の予測値と、第3の予測値と、第4の予測値とのうち少なくとも2の予測値に基づき求めた第1の予測値を出力する予測値出力ステップとを有し、予測値出力ステップは、予め定められた制御信号を受信した場合に、第2の予測値と第4の予測値とに基づき第1の予測値を求め、制御信号を受信しない場合に、第2の予測値と、第3の予測値と、第4の予測値とに基づき第1の予測値を求めることを特徴とする。   Further, the second invention is a prediction error acquisition step for acquiring a prediction error that is an error between the pixel value of the input pixel and the first prediction value for which the pixel value is predicted, a compression step for compressing the prediction error, An expansion step for expanding the prediction error compressed by the compression step, an addition step for adding the prediction error expanded by the expansion step and the first prediction value to generate a second prediction value, and at least a first 2 prediction values, a third prediction value corresponding to a pixel close to the input pixel in a line immediately preceding in the encoding order with respect to the line including the input pixel, and an encoding order with respect to the input pixel The storage step of storing the fourth prediction value corresponding to the previous pixel in the storage unit, the second prediction value stored in the storage unit, the third prediction value, and the fourth prediction value And the first prediction obtained based on at least two prediction values. A predicted value output step for outputting a value, and the predicted value output step receives the first control value based on the second predicted value and the fourth predicted value when a predetermined control signal is received. When the control signal is not received, the first predicted value is obtained based on the second predicted value, the third predicted value, and the fourth predicted value.

また、第3の発明は、入力画素の画素値と、画素値を予測した第1の予測値との誤差である予測誤差を圧縮符号化した出力を伸長し、伸長した予測誤差と、第1の予測値とを加算して第2の予測値を生成し、所定の制御信号が受信されない場合に第2の予測値と、入力画素が含まれるラインに対して符号化順で1つ前のラインの、入力画素に近接する画素に対応する第3の予測値と、入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とに基づき第1の予測値を求め、所定の制御信号が受信された場合に第2の予測値と第4の予測値とに基づき第1の予測値を求め、予測誤差を圧縮符号化した圧縮予測誤差に対して復号処理を行う復号装置であって、圧縮予測誤差を伸長する伸長部と、伸長部で伸長された圧縮予測誤差に対して復号予測値を加算して第1の復号画素として出力する加算部と、第1の復号画素と、第1の復号画素が含まれるラインに対して復号順で1つ前のラインの、第1の復号画素に近接する第2の復号画素と、第1の復号画素に対して復号順で1つ前の第3の復号画素とのうち少なくとも2の復号画素に基づき求めた復号予測値を出力する予測値出力部とを有し、予測値出力部は、予め定められた制御信号を受信した場合に、第1の復号画素と第3の復号画素とに基づき復号予測値を求め、制御信号を受信しない場合に、第1の復号画素と、第2の復号画素と、第3の復号画素とに基づき復号予測値を求めることを特徴とする。   In addition, the third invention expands an output obtained by compressing and encoding a prediction error that is an error between the pixel value of the input pixel and the first prediction value obtained by predicting the pixel value, To generate a second predicted value. When a predetermined control signal is not received, the second predicted value and the line including the input pixel are preceded by the coding order. The first predicted value is calculated based on the third predicted value corresponding to the pixel adjacent to the input pixel in the line and the fourth predicted value corresponding to the pixel preceding by one in the encoding order with respect to the input pixel. When a predetermined control signal is received, a first prediction value is obtained based on the second prediction value and the fourth prediction value, and a decoding process is performed on the compressed prediction error obtained by compression-coding the prediction error. A decoding device that performs decompression on the compression prediction error and decompression on the compression prediction error decompressed by the decompression unit. An adder that adds the decoded prediction values and outputs the result as a first decoded pixel; a first decoded pixel; and a first of the previous line in decoding order with respect to the line that includes the first decoded pixel A decoded prediction value obtained based on at least two decoded pixels of the second decoded pixel adjacent to the first decoded pixel and the third decoded pixel immediately preceding the first decoded pixel in the decoding order is output A predicted value output unit that obtains a decoded predicted value based on the first decoded pixel and the third decoded pixel when receiving a predetermined control signal, and the control signal output unit In a case where the received decoding value is not received, a decoded prediction value is obtained based on the first decoded pixel, the second decoded pixel, and the third decoded pixel.

また、第4の発明は、入力画素の画素値と、画素値を予測した第1の予測値との誤差である予測誤差を圧縮符号化した出力を伸長し、伸長した予測誤差と、第1の予測値とを加算して第2の予測値を生成し、所定の制御信号が受信されない場合に第2の予測値と、入力画素が含まれるラインに対して符号化順で1つ前のラインの、入力画素に近接する画素に対応する第3の予測値と、入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とに基づき第1の予測値を求め、所定の制御信号が受信された場合に第2の予測値と第4の予測値とに基づき第1の予測値を求め、予測誤差を圧縮符号化した圧縮予測誤差に対して復号処理を行う復号方法であって、圧縮予測誤差を伸長する伸長ステップと、伸長ステップにより伸長された圧縮予測誤差に対して復号予測値を加算して第1の復号画素として出力する加算ステップと、第1の復号画素と、第1の復号画素が含まれるラインに対して復号順で1つ前のラインの、第1の復号画素に近接する第2の復号画素と、第1の復号画素に対して復号順で1つ前の第3の復号画素とのうち少なくとも2の復号画素に基づき求めた復号予測値を出力する予測値出力ステップとを有し、予測値出力ステップは、予め定められた制御信号を受信した場合に、第1の復号画素と第3の復号画素とに基づき復号予測値を求め、制御信号を受信しない場合に、第1の復号画素と、第2の復号画素と、第3の復号画素とに基づき復号予測値を求めることを特徴とする。   According to a fourth aspect of the present invention, an output obtained by compressing and encoding a prediction error, which is an error between a pixel value of an input pixel and a first prediction value obtained by predicting the pixel value, is expanded, the expanded prediction error, To generate a second predicted value. When a predetermined control signal is not received, the second predicted value and the line including the input pixel are preceded by the coding order. The first predicted value is calculated based on the third predicted value corresponding to the pixel adjacent to the input pixel in the line and the fourth predicted value corresponding to the pixel preceding by one in the encoding order with respect to the input pixel. When a predetermined control signal is received, a first prediction value is obtained based on the second prediction value and the fourth prediction value, and a decoding process is performed on the compressed prediction error obtained by compression-coding the prediction error. A decompression step for decompressing a compression prediction error, and a decompression step performed by the decompression step. An addition step of adding a decoded prediction value to a prediction error and outputting the result as a first decoded pixel, a first decoded pixel, and a line including the first decoded pixel, one line before the decoding order. Calculated based on at least two decoded pixels of the second decoded pixel adjacent to the first decoded pixel in the line and the third decoded pixel immediately preceding the first decoded pixel in the decoding order. A predicted value output step for outputting a decoded predicted value, and the predicted value output step receives a decoded control value based on the first decoded pixel and the third decoded pixel when a predetermined control signal is received. When the control signal is not received, a decoded prediction value is obtained based on the first decoded pixel, the second decoded pixel, and the third decoded pixel.

本発明によれば、ライン毎に交互に異なる画像を配した画像データを適切に圧縮符号化することができるという効果を奏する。   According to the present invention, there is an effect that image data in which different images are alternately arranged for each line can be appropriately compressed and encoded.

図1は、各実施形態に適用可能な符号化装置の一例の構成を概略的に示すブロック図である。FIG. 1 is a block diagram schematically showing an exemplary configuration of an encoding apparatus applicable to each embodiment. 図2は、出力処理部で生成されるパケットの一例の構成を示す図である。FIG. 2 is a diagram illustrating an exemplary configuration of a packet generated by the output processing unit. 図3は、信号first_wordの状態と出力処理部の出力との関係について説明するための図である。FIG. 3 is a diagram for explaining the relationship between the state of the signal first_word and the output of the output processing unit. 図4は、各実施形態に適用可能な復号装置の一例の構成を概略的に示すブロック図である。FIG. 4 is a block diagram schematically showing a configuration of an example of a decoding device applicable to each embodiment. 図5は、1次元の予測に基づき符号化処理を行う符号化部の一例の構成を示すブロック図である。FIG. 5 is a block diagram illustrating a configuration of an example of an encoding unit that performs an encoding process based on one-dimensional prediction. 図6は、1次元の予測処理を用いて符号化された符号化データの復号処理を行う復号部の一例の構成を示すブロック図である。FIG. 6 is a block diagram illustrating a configuration of an example of a decoding unit that performs decoding processing of encoded data encoded using a one-dimensional prediction process. 図7は、2次元の予測処理についてより具体的に説明するための図である。FIG. 7 is a diagram for more specifically explaining the two-dimensional prediction process. 図8は、2次元の予測処理を用いた符号化処理を行うための既知の符号化部の一例の構成を示すブロック図である。FIG. 8 is a block diagram illustrating a configuration of an example of a known encoding unit for performing an encoding process using a two-dimensional prediction process. 図9は、符号化装置から出力される信号の例を示す図である。FIG. 9 is a diagram illustrating an example of a signal output from the encoding device. 図10は、2次元の予測処理を用いて符号化された符号化データの復号処理を行う既知の復号部の一例の構成を示すブロック図である。FIG. 10 is a block diagram illustrating a configuration of an example of a known decoding unit that performs a decoding process of encoded data encoded using a two-dimensional prediction process. 図11は、第1の実施形態による符号化部の一例の構成を示すブロック図である。FIG. 11 is a block diagram illustrating an exemplary configuration of the encoding unit according to the first embodiment. 図12は、第1の実施形態による復号部の一例の構成を示すブロック図である。FIG. 12 is a block diagram illustrating an exemplary configuration of the decoding unit according to the first embodiment. 図13は、第2の実施形態による画像処理装置の一例の構成を示すブロック図である。FIG. 13 is a block diagram illustrating a configuration of an example of an image processing apparatus according to the second embodiment.

以下に添付図面を参照して、符号化装置および符号化方法、ならびに、復号装置および復号方法の実施形態を詳細に説明する。図1は、各実施形態に適用可能な符号化装置1の一例の構成を概略的に示す。符号化装置1は、画像データを符号化するもので、入力処理部10、符号化部11および出力処理部12を有する。   Exemplary embodiments of an encoding device, an encoding method, and a decoding device and a decoding method will be described below in detail with reference to the accompanying drawings. FIG. 1 schematically shows a configuration of an example of an encoding apparatus 1 applicable to each embodiment. The encoding device 1 encodes image data, and includes an input processing unit 10, an encoding unit 11, and an output processing unit 12.

符号化装置1に対して、入力画像データとして画素データが順次、入力される。入力処理部10は、入力された1ラインの画素データを予め定められた画素数毎に分割して、画素ブロックを形成する。また、入力処理部10は、画素ブロックの先頭の画素データのタイミングを示す信号first_wordを出力する(図示しない)。信号first_wordは、画素ブロックの先頭の画素データのタイミングでハイ(High)状態とされ、その他のタイミングではロー(Low)状態とされる信号である。   Pixel data is sequentially input as input image data to the encoding device 1. The input processing unit 10 divides the input pixel data of one line for each predetermined number of pixels to form a pixel block. The input processing unit 10 outputs a signal first_word indicating the timing of the top pixel data of the pixel block (not shown). The signal first_word is a signal that is set to a high state at the timing of the top pixel data of the pixel block and is set to a low state at other timings.

入力処理部10から出力された画素ブロックは、符号化部11に供給され、画素ブロックに含まれる画素データが所定の符号化方式で符号化される。符号化部11で画素データが符号化された符号化データは、出力処理部12に供給される。出力処理部12は、メモリを有し、供給された符号化データをメモリを利用して所定サイズのパケットに詰め込んで、符号化ブロックとして出力する。   The pixel block output from the input processing unit 10 is supplied to the encoding unit 11, and pixel data included in the pixel block is encoded by a predetermined encoding method. The encoded data obtained by encoding the pixel data in the encoding unit 11 is supplied to the output processing unit 12. The output processing unit 12 has a memory, packs the supplied encoded data into a packet of a predetermined size using the memory, and outputs the packet as an encoded block.

図2は、出力処理部12で生成されるパケットの一例の構成を示す。この例では、パケットは、全体が予め定められたサイズのTビットのデータ長を有する。例えば、出力処理部12が持つフリップフロップ(Flip Flop)といった記憶素子に符号化ブロックが保持され、パケットが構成される。このとき、図2の右側に示す符号化ブロックの先頭が最下位ビットLSB(Least Significant Bit)、図2の左側に示す符号化ブロックの後端が最上位ビットMSB(Most Significant Bit)とされる。   FIG. 2 shows an exemplary configuration of a packet generated by the output processing unit 12. In this example, the packet has a data length of T bits having a predetermined size as a whole. For example, a coding block is held in a storage element such as a flip-flop (Flip Flop) included in the output processing unit 12 to form a packet. At this time, the head of the encoded block shown on the right side of FIG. 2 is the least significant bit LSB (Least Significant Bit), and the rear end of the encoded block shown on the left side of FIG. 2 is the most significant bit MSB (Most Significant Bit). .

Nビットのデータ長を有するデータD0が、符号化ブロック内の予め定められた位置から詰め込まれる。この例では、データD0は、符号化ブロックのLSB側から詰め込まれるものとする。データD0としては、上述の信号first_wordの状態に応じて、ラインの先頭の画素データが原画素データとしてそのまま用いられる。この原画素データは、復号時の基準となる画素データである。   Data D0 having a data length of N bits is packed from a predetermined position in the encoded block. In this example, data D0 is packed from the LSB side of the encoded block. As the data D0, the pixel data at the head of the line is used as it is as the original pixel data according to the state of the signal first_word. This original pixel data is pixel data that serves as a reference at the time of decoding.

データD0の次から、画素データが符号化された符号化データC1、C2、…、C(i−2)、C(i−1)として例示されるように、MSB側に向けて順次、符号化ブロックに詰め込まれていく。なお、符号化データC1、C2、…、C(i−2)、C(i−1)は、それぞれMビット(M<N)のデータ長を有する。符号化ブロックの最上位ビットMSBには、1ビットの制御信号を含む領域Fが配され、パケット全体のデータ量がTビットとされる。   From the next to the data D0, as illustrated as encoded data C1, C2,..., C (i-2), C (i-1) obtained by encoding pixel data, the codes are sequentially encoded toward the MSB side. It will be packed in the block. The encoded data C1, C2,..., C (i-2), C (i-1) each have a data length of M bits (M <N). In the most significant bit MSB of the encoded block, an area F including a 1-bit control signal is arranged, and the data amount of the entire packet is T bits.

図3を用いて、信号first_wordの状態と出力処理部12の出力との関係について説明する。図3(a)は、クロックを示し、例えばクロック毎に1の画素データが符号化部11に入力されるものとする。図3(b)は、信号first_wordの状態を示す。図3(c)は、出力処理部12からパケットに詰め込まれて出力される符号化データを示す。   The relationship between the state of the signal first_word and the output of the output processing unit 12 will be described with reference to FIG. FIG. 3A shows a clock. For example, one pixel data is input to the encoding unit 11 for each clock. FIG. 3B shows the state of the signal first_word. FIG. 3C shows encoded data output from the output processing unit 12 after being packed into a packet.

信号first_wordは、出力処理部12から出力される各パケット#1、#2、…の先頭から1画素データ分の期間、ハイ状態とされ、その他の期間でロー状態とされる。信号first_wordがハイ状態において、符号化部11から原画素データが出力され、この原画素データがデータD0として用いられ、各パケット#1、#2、…の先頭に詰め込まれる。   The signal first_word is in a high state for a period of one pixel data from the beginning of each packet # 1, # 2,... Output from the output processing unit 12, and is in a low state in other periods. When the signal first_word is in the high state, the original pixel data is output from the encoding unit 11, and this original pixel data is used as the data D0 and packed at the head of each packet # 1, # 2,.

一方、信号first_wordがロー状態では、符号化部11から画素データが符号化された符号化データが出力される。この符号化データは、各パケット#1、#2、…において、データD0の次から、図2に符号化データC1、C2、…、C(i−2)、C(i−1)として例示されるように、MSB側に向けて順次、詰め込まれていく。   On the other hand, when the signal first_word is in the low state, the encoded data obtained by encoding the pixel data is output from the encoding unit 11. This encoded data is illustrated as encoded data C1, C2,..., C (i-2), C (i-1) in FIG. 2 from the next of the data D0 in each packet # 1, # 2,. As shown in the figure, it is sequentially packed toward the MSB side.

図4は、各実施形態に適用可能な復号装置2の一例の構成を概略的に示す。復号装置2は、上述した符号化装置1で符号化された画像データを復号するもので、入力処理部20、復号部21および出力処理部22を有する。入力処理部20に対して、それぞれ図2を用いて説明した構成のパケット#1、#2、…が順次入力される。   FIG. 4 schematically shows a configuration of an example of a decoding device 2 applicable to each embodiment. The decoding device 2 decodes the image data encoded by the encoding device 1 described above, and includes an input processing unit 20, a decoding unit 21, and an output processing unit 22. Packets # 1, # 2,... Configured as described with reference to FIG.

入力処理部20は、入力されたパケットから、符号化データD0、C1、C2、…、C(i−2)、C(i−1)を切り出して順次復号部21に供給する。このとき、入力処理部20は、各パケット#1、#2、…が入力されると、それぞれの先頭データD0に対応して信号first_wordをハイ状態とし、先頭データD0の出力が終了すると、信号first_wordをロー状態とする。また、入力処理部20は、各パケット#1、#2、…の最上位ビットMSBの領域Fから制御信号を取り出す。入力処理部20は、信号first_wordと、制御信号とを復号部21に供給する。   The input processing unit 20 cuts out the encoded data D0, C1, C2,..., C (i-2), C (i-1) from the input packet and sequentially supplies them to the decoding unit 21. At this time, when each packet # 1, # 2,... Is input, the input processing unit 20 sets the signal first_word to the high state corresponding to each head data D0, and when the output of the head data D0 is completed, Set first_word to the low state. Further, the input processing unit 20 extracts a control signal from the region F of the most significant bit MSB of each packet # 1, # 2,. The input processing unit 20 supplies the signal first_word and the control signal to the decoding unit 21.

復号部21は、入力処理部20から供給された符号化データを復号して復号データを出力する。このとき、復号部21は、信号first_wordがハイ状態であれば、符号化データD0が供給されたとして、当該符号化データD0をそのまま復号データとして出力する。また、信号first_wordがロー状態であれば、符号化データC1、C2、…、C(i−2)、C(i−1)が供給されたとして、所定の方法で復号し、復号データを出力する。   The decoding unit 21 decodes the encoded data supplied from the input processing unit 20 and outputs decoded data. At this time, if the signal first_word is in a high state, the decoding unit 21 outputs the encoded data D0 as it is as decoded data, assuming that the encoded data D0 is supplied. If the signal first_word is in the low state, the encoded data C1, C2,..., C (i-2), C (i-1) are supplied and decoded by a predetermined method, and the decoded data is output. To do.

出力処理部22は、復号部21から出力された復号データを、予め定められたフォーマットに整形して、出力データとして復号装置2から出力する。   The output processing unit 22 shapes the decoded data output from the decoding unit 21 into a predetermined format, and outputs the output data from the decoding device 2 as output data.

(既知の符号化処理の第1の例)
ここで、理解を容易とするために、実施形態に係る符号化部11の前提となる符号化処理の第1の例について説明する。先ず、符号化対象画素に対してライン上で隣接する画素の情報を用いて1次元で予測値を求めて符号化を行う符号化処理について説明する。図5は、1次元の予測に基づき符号化処理を行う符号化部11Aの一例の構成を示す。符号化部11Aは、減算器100と、予測誤差圧縮部101と、出力セレクタ102と、予測部103とを有する。また、予測部103は、予測誤差伸長部110と、加算器111と、予測値セレクタ112と、記憶部113とを有する。
(First example of known encoding process)
Here, in order to facilitate understanding, a first example of an encoding process that is a premise of the encoding unit 11 according to the embodiment will be described. First, a description will be given of an encoding process in which encoding is performed by obtaining a prediction value in one dimension using information on pixels adjacent to the encoding target pixel on the line. FIG. 5 illustrates an exemplary configuration of an encoding unit 11A that performs an encoding process based on one-dimensional prediction. The encoding unit 11A includes a subtractor 100, a prediction error compression unit 101, an output selector 102, and a prediction unit 103. In addition, the prediction unit 103 includes a prediction error expansion unit 110, an adder 111, a prediction value selector 112, and a storage unit 113.

符号化部11Aの動作について説明する。入力処理部10から出力された符号化対象の画素データが、例えばクロックに従い順次、符号化部11Aに入力される。符号化対象画素データは、減算器100の被減算入力端と、出力セレクタ102の選択入力端102Aと、予測値セレクタ112の選択入力端112Aとにそれぞれ入力される。減算器100の減算入力端には、予測部103から画素単位で出力される予測値が入力される。減算器100は、画素データの画素値(以下、単に画素データと呼ぶ)から予測値を減算して、予測誤差値を出力し、予測誤差圧縮部101に供給する。   The operation of the encoding unit 11A will be described. The encoding target pixel data output from the input processing unit 10 is sequentially input to the encoding unit 11A, for example, according to a clock. The encoding target pixel data is input to the subtracted input terminal of the subtracter 100, the selection input terminal 102A of the output selector 102, and the selection input terminal 112A of the prediction value selector 112, respectively. A prediction value output in units of pixels from the prediction unit 103 is input to the subtraction input terminal of the subtracter 100. The subtracter 100 subtracts the prediction value from the pixel value of the pixel data (hereinafter simply referred to as pixel data), outputs a prediction error value, and supplies the prediction error compression unit 101 to the prediction error value.

予測誤差圧縮部101は、予測誤差値を所定の圧縮方式で圧縮し、データ量を削減する。例えば、予測誤差圧縮部101は、予め定められた量子化テーブルに従い予測誤差値を量子化して、予測誤差値のデータ量を圧縮する。圧縮予測誤差値は、予測部103の予測誤差伸長部110に供給されると共に、出力セレクタ102の選択入力端102Bに入力される。   The prediction error compression unit 101 compresses the prediction error value by a predetermined compression method, and reduces the data amount. For example, the prediction error compression unit 101 quantizes the prediction error value according to a predetermined quantization table, and compresses the data amount of the prediction error value. The compressed prediction error value is supplied to the prediction error expansion unit 110 of the prediction unit 103 and is input to the selection input terminal 102B of the output selector 102.

出力セレクタ102は、入力処理部10から供給される信号first_wordの値に従い、選択入力端102Aおよび102Bのうち一方を選択し、選択された側の入力端に入力されたデータを、符号化データとして符号化部11Aから出力する。出力セレクタ102は、例えば信号first_wordがハイ状態であれば選択入力端102Aを選択し、入力された符号化対象画素データを原画素データのまま符号化データとして出力する。一方、出力セレクタ102は、例えば信号first_wordがロー状態であれば選択入力端102Bを選択し、圧縮予測誤差値を符号化データとして出力する。   The output selector 102 selects one of the selected input terminals 102A and 102B according to the value of the signal first_word supplied from the input processing unit 10, and uses the data input to the selected input terminal as encoded data. Output from the encoding unit 11A. For example, if the signal first_word is in a high state, the output selector 102 selects the selection input terminal 102A, and outputs the input encoding target pixel data as encoded data as the original pixel data. On the other hand, the output selector 102 selects the selection input terminal 102B, for example, if the signal first_word is in a low state, and outputs the compressed prediction error value as encoded data.

予測誤差伸長部110は、予測誤差圧縮部101で用いた量子化テーブルに対応する逆量子化テーブルに従い、予測誤差圧縮部101で予測誤差値が圧縮された圧縮予測誤差値を伸長し、圧縮前の予測誤差値を復元した復元予測誤差値を出力する。復元予測誤差値は、加算器111の一方の入力端に入力される。加算器111は、一方の入力端に入力された復元予測誤差値と、後述する記憶部113から1画素分遅延されて出力された予測値とを加算して、加算値を予測値セレクタ112の選択入力端112Bに入力する。加算器111から出力される加算値は、予測誤差圧縮部101から出力された圧縮予測誤差値を復号した復号値となる。   The prediction error decompression unit 110 decompresses the compressed prediction error value obtained by compressing the prediction error value in the prediction error compression unit 101 according to the inverse quantization table corresponding to the quantization table used in the prediction error compression unit 101, and before compression. A restored prediction error value obtained by restoring the prediction error value of is output. The restoration prediction error value is input to one input terminal of the adder 111. The adder 111 adds the restored prediction error value input to one input terminal and the predicted value output after being delayed by one pixel from the storage unit 113 described later, and adds the added value to the predicted value selector 112. Input to the selection input terminal 112B. The addition value output from the adder 111 is a decoded value obtained by decoding the compressed prediction error value output from the prediction error compression unit 101.

予測値セレクタ112は、信号first_wordの値に従い、選択入力端112Aおよび112Bのうち一方を選択し、選択された側の入力端に入力されたデータを、予測誤差圧縮部101から出力された圧縮予測誤差値を復号した復号値として出力する。予測値セレクタ112は、例えば信号first_wordがハイ状態であれば選択入力端112Aを選択し、符号化対象画素データを当該復号値として出力する。一方、予測値セレクタ112は、信号first_wordがロー状態であれば選択入力端112Bを選択し、加算器111から出力された復号値を出力する。   The prediction value selector 112 selects one of the selection input terminals 112A and 112B in accordance with the value of the signal first_word, and the compressed prediction output from the prediction error compression unit 101 is input to the data input to the selected input terminal. The error value is output as a decoded value. For example, if the signal first_word is in a high state, the prediction value selector 112 selects the selection input terminal 112A, and outputs the encoding target pixel data as the decoded value. On the other hand, if the signal first_word is in the low state, the prediction value selector 112 selects the selection input terminal 112B and outputs the decoded value output from the adder 111.

予測値セレクタ112から出力された復号値は、記憶部113に供給される。記憶部113は、例えばバッファメモリであって、供給された復号値を保持する。記憶部113に保持された復号値は、1画素分遅延されて、符号化対象画素データを符号化した符号化データを復号して当該符号化対象画素データの値を予測する予測値として記憶部113から出力される。記憶部113から出力された予測値は、減算器100の減算入力端に入力されると共に、加算器111の他方の入力端に入力される。   The decoded value output from the predicted value selector 112 is supplied to the storage unit 113. The storage unit 113 is a buffer memory, for example, and holds the supplied decoded value. The decoded value held in the storage unit 113 is delayed by one pixel, and is stored as a predicted value for decoding the encoded data obtained by encoding the encoding target pixel data and predicting the value of the encoding target pixel data. 113 is output. The predicted value output from the storage unit 113 is input to the subtraction input terminal of the subtracter 100 and is input to the other input terminal of the adder 111.

このように、符号化部11Aでは、符号化対象画素データの、当該符号化対象画素データの符号化順で1つ前の符号化対象画素データに基づく予測値に対する予測誤差の値を予測誤差圧縮部101で圧縮して、符号化データとして出力する。   As described above, the encoding unit 11A performs prediction error compression on the prediction error value of the encoding target pixel data with respect to the prediction value based on the previous encoding target pixel data in the encoding order of the encoding target pixel data. The data is compressed by the unit 101 and output as encoded data.

このとき、符号化対象画素データによる画素ブロックの先頭の画素データのタイミングで信号first_wordをハイ状態とし、その他のタイミングでは信号first_wordをロー状態とする。これにより、画素ブロックの先頭の画素データ毎に、予測値として符号化対象画素データすなわち原画素データがそのまま用いられると共に、原画素データが符号化データとして出力される。したがって、符号化データは、画素ブロック毎に、符号化データとして含まれる原画素データを基準として復号することができる。   At this time, the signal first_word is set to the high state at the timing of the top pixel data of the pixel block based on the encoding target pixel data, and the signal first_word is set to the low state at other timings. As a result, for each pixel data at the head of the pixel block, the encoding target pixel data, that is, the original pixel data is used as it is as the predicted value, and the original pixel data is output as the encoded data. Therefore, the encoded data can be decoded with respect to the original pixel data included as the encoded data for each pixel block.

符号化部11Aで符号化された符号化データからなる符号化ブロックは、図2を用いて説明したように、出力処理部12において予め定められたフォーマットでパケットに詰め込まれて、符号化装置1から出力される。   As described with reference to FIG. 2, the encoding block including the encoded data encoded by the encoding unit 11A is packed into a packet in a predetermined format in the output processing unit 12, and the encoding device 1 Is output from.

(既知の復号処理の第1の例)
次に、上述の符号化部11Aで1次元の予測処理を用いて符号化された符号化データを復号する復号処理について説明する。図6は、1次元の予測処理を用いて符号化された符号化データの復号処理を行う復号部21Aの一例の構成を示す。復号部21Aは、出力セレクタ202、予測誤差伸長部200、加算器201および記憶部203を有し、上述した符号化部11Aと略逆の処理を行うことで、符号化データを復号する。
(First example of known decoding process)
Next, a decoding process for decoding encoded data encoded by the above-described encoding unit 11A using a one-dimensional prediction process will be described. FIG. 6 shows an example of a configuration of a decoding unit 21A that performs a decoding process on encoded data encoded using a one-dimensional prediction process. The decoding unit 21A includes an output selector 202, a prediction error expansion unit 200, an adder 201, and a storage unit 203, and decodes encoded data by performing a process substantially opposite to that of the encoding unit 11A described above.

復号部21Aに入力された符号化データは、出力セレクタ202の選択入力端202Aに入力されると共に、予測誤差伸長部200に供給される。ここで、符号化データは、各パケットの先頭の原画素データと、パケットの先頭以外の圧縮予測誤差値とがある。予測誤差伸長部200は、入力された符号化データのうち圧縮予測誤差値を、上述の符号化部11Aが用いた量子化テーブルに対応する逆量子化テーブル(図示しない)に基づいて伸長し、予測誤差値を復元する。復元予測誤差値は、加算器201の一方の入力端に入力される。加算器201の他方の入力端には、記憶部203の出力が入力される。加算器201は、一方の入力端に入力された復元予測誤差値と、他方の入力端に入力された記憶部203の出力とを加算して復号データを得る。   The encoded data input to the decoding unit 21 </ b> A is input to the selection input terminal 202 </ b> A of the output selector 202 and is supplied to the prediction error expansion unit 200. Here, the encoded data includes original pixel data at the beginning of each packet and compressed prediction error values other than the beginning of the packet. The prediction error expansion unit 200 expands the compressed prediction error value of the input encoded data based on an inverse quantization table (not shown) corresponding to the quantization table used by the encoding unit 11A. Restore the prediction error value. The restoration prediction error value is input to one input terminal of the adder 201. The output of the storage unit 203 is input to the other input terminal of the adder 201. The adder 201 adds the restored prediction error value input to one input terminal and the output of the storage unit 203 input to the other input terminal to obtain decoded data.

加算器201から出力された復号データは、出力セレクタ202の選択入力端202Bに入力される。出力セレクタ202は、信号first_wordの状態に応じて選択入力端202Aおよび202Bのうち一方を選択する。出力セレクタ202は、信号first_wordがロー状態で選択入力端202Bを選択し、加算器201の出力を復号データとして出力する。一方、出力セレクタ202は、信号first_wordがハイ状態で選択入力端202Aを選択し、入力された符号化データを復号データとして復号部21Aから出力する。この場合、復号データとして、原画素データが出力されることになる。   The decoded data output from the adder 201 is input to the selection input terminal 202B of the output selector 202. The output selector 202 selects one of the selection input terminals 202A and 202B according to the state of the signal first_word. The output selector 202 selects the selection input terminal 202B when the signal first_word is in the low state, and outputs the output of the adder 201 as decoded data. On the other hand, the output selector 202 selects the selection input terminal 202A when the signal first_word is in the high state, and outputs the input encoded data from the decoding unit 21A as decoded data. In this case, original pixel data is output as decoded data.

出力セレクタ202から出力された復号データは、復号部21Aの復号出力として図4に示す出力処理部22に供給されると共に、記憶部203にも供給される。記憶部203は、供給されたデータを、例えば入力に対して1クロック分遅延させて出力する。記憶部203から出力された復号データは、上述したように、加算器201の他方の入力端に入力される。   The decoded data output from the output selector 202 is supplied to the output processing unit 22 shown in FIG. 4 as the decoded output of the decoding unit 21A and also to the storage unit 203. The storage unit 203 outputs the supplied data with a delay of, for example, one clock with respect to the input. The decoded data output from the storage unit 203 is input to the other input terminal of the adder 201 as described above.

出力処理部22は、出力セレクタ202から供給された復号データを、予め定められたフォーマットに整形して、出力データとして復号装置2から出力する。   The output processing unit 22 shapes the decoded data supplied from the output selector 202 into a predetermined format and outputs it as output data from the decoding device 2.

(既知の符号化処理の第2の例)
次に、本実施形態に係る符号化部11の前提となる符号化処理の第2の例について説明する。第2の例は、符号化対象画素に対する予測値を、符号化対象画素を含むラインの画素と、当該ラインに対して符号化順で1つ前のラインの画素とを用いて2次元で求めて、符号化を行う例である。
(Second example of known encoding process)
Next, a second example of the encoding process that is a premise of the encoding unit 11 according to the present embodiment will be described. In the second example, the prediction value for the encoding target pixel is obtained in two dimensions using the pixel of the line including the encoding target pixel and the pixel of the previous line in the encoding order with respect to the line. In this example, encoding is performed.

先ず、2次元の予測処理について概略的に説明する。2次元の予測処理においては、符号化対象画素に対して、符号化対象画素を含むラインにおいて符号化順で1つ前の画素と、符号化対象画素を含むラインに対して符号化順で1つ前のラインにおける、符号化対象画素の近傍の画素とを用いて、当該符号化対象画素の予測を行い、予測誤差を求める。   First, the two-dimensional prediction process will be schematically described. In the two-dimensional prediction process, with respect to the encoding target pixel, the previous pixel in the encoding order in the line including the encoding target pixel and the encoding order 1 for the line including the encoding target pixel. A prediction error is obtained by performing prediction of the encoding target pixel using pixels near the encoding target pixel in the previous line.

図7を用いて、2次元の予測処理について、より具体的に説明する。第nライン上の符号化対象画素Xを考える。第nラインの符号化対象画素Xに対して、画素Aは、第nラインの符号化対象画素Xに対して符号化順で1つ前の画素である。換言すれば、画素Aは、符号化対象画素Xの左隣の画素である。また、画素B、CおよびDは、第nラインに対して符号化順で1つ前の第(n−1)ラインにおいて、符号化対象画素Xに対してそれぞれ直上、左上および右上に近接する画素である。   The two-dimensional prediction process will be described more specifically with reference to FIG. Consider the encoding target pixel X on the nth line. For the encoding target pixel X on the n-th line, the pixel A is the previous pixel in the encoding order with respect to the encoding target pixel X on the n-th line. In other words, the pixel A is a pixel adjacent to the left of the encoding target pixel X. In addition, the pixels B, C, and D are respectively close to the encoding target pixel X immediately above, upper left, and upper right in the (n−1) th line immediately before the nth line in the encoding order. Pixel.

以下の例では、符号化対象画素Xの予測値xを画素A〜Dの復号値a〜dを用いて求める。ここでは、符号化対象画素Xの近接画素A〜Dの復号値a〜dのうち、符号化対象画素Xの値(符号化対象画素データ)との差分が最小となる値を選択する。   In the following example, the predicted value x of the encoding target pixel X is obtained using the decoded values a to d of the pixels A to D. Here, a value that minimizes the difference from the value of the encoding target pixel X (encoding target pixel data) is selected from among the decoded values a to d of the adjacent pixels A to D of the encoding target pixel X.

他の方法として、どの復号値を選択したか(予測方向)を復号回路に伝送せず、予測方向の決定を符号化対象画素Xの左隣や直上の画素位置で行う方法がある。この場合、符号化対象画素Xの近隣画素A〜Dの復号値a〜dと、既に求めた予測方向とを用いることで、符号化対象画素Xに対する予測誤差を、符号化対象画素Xの値で求めた場合の予測方向に近い精度で求めることができる。   As another method, there is a method in which the decoding direction (prediction direction) is not transmitted to the decoding circuit, and the prediction direction is determined at the pixel position adjacent to or immediately above the encoding target pixel X. In this case, by using the decoded values a to d of the neighboring pixels A to D of the encoding target pixel X and the prediction direction that has already been obtained, the prediction error for the encoding target pixel X is expressed as the value of the encoding target pixel X. Can be obtained with an accuracy close to the prediction direction in the case of

図8は、図7を用いて説明した2次元の予測処理を用いた符号化処理を行うための既知の符号化部11Bの一例の構成を示す。なお、図8において、図5と共通する部分には同一の符号を付して、適宜、詳細な説明を省略する。符号化部11Bは、減算器100と、予測誤差圧縮部101と、出力セレクタ102と、予測部120とを有する。また、予測部120は、予測誤差伸長部110と、加算器111と、予測値セレクタ112と、記憶部130と、予測モード選択部131と、予測モードインデックス記憶部132と、予測画素選択部133とを有する。   FIG. 8 shows a configuration of an example of a known encoding unit 11B for performing an encoding process using the two-dimensional prediction process described with reference to FIG. In FIG. 8, the same reference numerals are given to portions common to FIG. 5, and detailed description will be omitted as appropriate. The encoding unit 11B includes a subtracter 100, a prediction error compression unit 101, an output selector 102, and a prediction unit 120. In addition, the prediction unit 120 includes a prediction error expansion unit 110, an adder 111, a prediction value selector 112, a storage unit 130, a prediction mode selection unit 131, a prediction mode index storage unit 132, and a prediction pixel selection unit 133. And have.

2次元の予測処理を行う場合、入力処理部10から、符号化対象の画素データと上述した信号first_wordが出力されると共に、ラインの先頭を示す信号line_firstが出力される。信号line_firstは、例えばラインの先頭の画素の期間でハイ状態とされ、その他の期間でロー状態とされる信号である。   When performing two-dimensional prediction processing, the input processing unit 10 outputs the pixel data to be encoded and the signal first_word described above, and also outputs the signal line_first indicating the head of the line. The signal line_first is, for example, a signal that is in a high state during the period of the first pixel of the line and is in a low state during other periods.

入力処理部10から出力された符号化対象の画素データが、例えばクロックに従い順次、入力データとして符号化部11Bに入力され、減算器100の被減算入力端と、出力セレクタ102の選択入力端102Aと、予測値セレクタ112の選択入力端112Aとにそれぞれ入力される。   The encoding target pixel data output from the input processing unit 10 is sequentially input to the encoding unit 11B as input data, for example, according to a clock, and the subtracted input terminal of the subtracter 100 and the selection input terminal 102A of the output selector 102 are input. And the selection input terminal 112A of the prediction value selector 112, respectively.

減算器100の減算入力端には、予測部120から画素単位で出力される予測値が入力される。減算器100は、符号化対象画素データから予測値を減算して、予測誤差値を出力する。予測誤差値は、予測誤差圧縮部101に供給される。予測誤差圧縮部101は、予測誤差値を、例えば予め定められた量子化テーブルに従い量子化してデータ量を削減し、圧縮する。予測誤差値が圧縮された圧縮予測誤差値は、予測誤差伸長部110に供給されると共に、出力セレクタ102の選択入力端102Bに入力される。   A prediction value output in units of pixels from the prediction unit 120 is input to the subtraction input terminal of the subtracter 100. The subtracter 100 subtracts the prediction value from the encoding target pixel data and outputs a prediction error value. The prediction error value is supplied to the prediction error compression unit 101. The prediction error compression unit 101 quantizes the prediction error value according to, for example, a predetermined quantization table to reduce the data amount and compress it. The compressed prediction error value obtained by compressing the prediction error value is supplied to the prediction error expansion unit 110 and also input to the selection input terminal 102B of the output selector 102.

出力セレクタ102(第1の選択部)は、入力処理部10から供給される信号first_wordの値に従い、選択入力端102Aおよび102Bのうち一方を選択し、選択された側の入力端に入力されたデータを、符号化データとして符号化部11Bから出力する。出力セレクタ102は、例えば信号first_wordがハイ状態で選択入力端102Aを選択し、符号化対象画素データすなわち原画素データをそのまま符号化データとして出力する。一方、出力セレクタ102は、例えば信号first_wordがロー状態で選択入力端102Bを選択し、予測誤差圧縮部101から出力された、圧縮予測誤差値を符号化データとして出力する。   The output selector 102 (first selection unit) selects one of the selection input terminals 102A and 102B according to the value of the signal first_word supplied from the input processing unit 10, and is input to the selected input terminal Data is output from the encoding unit 11B as encoded data. For example, the output selector 102 selects the selection input terminal 102A when the signal first_word is in a high state, and outputs the encoding target pixel data, that is, the original pixel data as it is as the encoded data. On the other hand, the output selector 102 selects the selection input terminal 102B when the signal first_word is in a low state, for example, and outputs the compressed prediction error value output from the prediction error compression unit 101 as encoded data.

予測誤差伸長部110は、圧縮予測誤差値を、予測誤差圧縮部101で用いた量子化テーブルに対応する逆量子化テーブルに従い伸長し、圧縮前の予測誤差値を復元した復元予測誤差値を出力する。復元予測誤差値は、加算器111の一方の入力端に入力される。加算器111は、一方の入力端に入力された復元予測誤差値と、後述する予測画素選択部133から出力された予測値とを加算して、予測誤差圧縮部101から出力された圧縮予測誤差値を復号した復号値を出力する。加算器111から出力された復号値は、予測値セレクタ112の選択入力端112Bに入力される。   The prediction error decompression unit 110 decompresses the compressed prediction error value according to the inverse quantization table corresponding to the quantization table used in the prediction error compression unit 101, and outputs a restored prediction error value obtained by restoring the prediction error value before compression. To do. The restoration prediction error value is input to one input terminal of the adder 111. The adder 111 adds a decompression prediction error value input to one input terminal and a prediction value output from the prediction pixel selection unit 133 described later, and a compressed prediction error output from the prediction error compression unit 101. Outputs the decoded value obtained by decoding the value. The decoded value output from the adder 111 is input to the selection input terminal 112B of the predicted value selector 112.

予測値セレクタ112(第2の選択部)は、信号first_wordの値に従い、選択入力端112Aおよび112Bのうち一方を選択し、選択された側の入力端に入力されたデータを、復号値として出力する。予測値セレクタ112は、例えば信号first_wordがハイ状態であれば選択入力端112Aが選択され、符号化対象画素データを復号値として出力する。一方、予測値セレクタ112は、信号first_wordがロー状態であれば選択入力端112Bが選択され、加算器111から出力された復号値を出力する。予測値セレクタ112から出力された復号値は、記憶部130に記憶される。   The prediction value selector 112 (second selection unit) selects one of the selection input terminals 112A and 112B according to the value of the signal first_word, and outputs the data input to the selected input terminal as a decoded value To do. For example, if the signal first_word is in a high state, the prediction value selector 112 selects the selection input terminal 112A and outputs the encoding target pixel data as a decoded value. On the other hand, the prediction value selector 112 selects the selection input terminal 112B when the signal first_word is in the low state, and outputs the decoded value output from the adder 111. The decoded value output from the predicted value selector 112 is stored in the storage unit 130.

2次元符号化を行う符号化部11Bにおいて、記憶部130は、複数の復号値を記憶する。より具体的には、記憶部130は、符号化対象画素データに対する復号値を記憶すると共に、図7を用いて説明した、符号化対象画素Xの左隣、左上、直上および右上にそれぞれ隣接する画素A〜Dそれぞれに対する復号値を記憶する。一例として、記憶部130は、1ライン分を記憶可能なラインメモリと直前の復号値を記憶するためのフリップフロップを用い、符号化対象画素データを含むラインの既取得分の復号値と、当該ラインに対して符号化順で1つ前のラインの各画素に対応する復号値とを記憶することが考えられる。   In the encoding unit 11B that performs two-dimensional encoding, the storage unit 130 stores a plurality of decoded values. More specifically, the storage unit 130 stores the decoded value for the encoding target pixel data, and is adjacent to the left side of the encoding target pixel X described above with reference to FIG. The decoded value for each of the pixels A to D is stored. As an example, the storage unit 130 uses a line memory capable of storing one line and a flip-flop for storing the immediately preceding decoded value, the decoded value for the acquired line including the encoding target pixel data, It is conceivable to store a decoded value corresponding to each pixel of the previous line in the coding order with respect to the line.

予測モード選択部131は、記憶部130に記憶される復号値xと復号値a〜dとを用いて予測モードを選択する。具体的には、予測モード選択部131は、復号値xと、各復号値a〜dとの差分をそれぞれ求め、各復号値a〜dのうち最も差分の小さい復号値に対応する方向(予測方向)を予測モードとして選択する。復号値に対応する方向とは、符号化対象画素Xに対する、復号値に対応する画素の方向を意味する。例えば、各復号値a〜dのうち復号値aが復号値xとの差分が最も小さい場合、復号値aが図7に示すように符号化対象画素Xの左隣の画素Aの値であることから、予測モードは「左」となる。この予測モードは、符号化部11Bに対して符号化対象画素Xの符号化順で次に入力される符号化対象画素に対する予測モードである。   The prediction mode selection unit 131 selects a prediction mode using the decoded value x and the decoded values a to d stored in the storage unit 130. Specifically, the prediction mode selection unit 131 obtains the difference between the decoded value x and each decoded value a to d, and the direction corresponding to the decoded value having the smallest difference among the decoded values a to d (prediction Direction) as the prediction mode. The direction corresponding to the decoded value means the direction of the pixel corresponding to the decoded value with respect to the encoding target pixel X. For example, when the difference between the decoded value a and the decoded value x is the smallest among the decoded values a to d, the decoded value a is the value of the pixel A adjacent to the left of the encoding target pixel X as shown in FIG. Therefore, the prediction mode is “left”. This prediction mode is a prediction mode for the encoding target pixel that is next input to the encoding unit 11B in the encoding order of the encoding target pixel X.

予測モード選択部131は、予測モードを示す予測モードインデックスを出力する。予測モードインデックスは、予測モードインデックス記憶部132に記憶される。予測画素選択部133は、予測モードインデックス記憶部132に記憶される予測モードインデックスに従い、記憶部130に記憶される復号値を選択して読み出す。予測画素選択部133は、記憶部130から読み出した復号値を、符号化対象画素データを圧縮し伸長した場合の画素値を予測する予測値として出力し、減算器100の減算入力端に入力すると共に、加算器111の他方の入力端に入力する。   The prediction mode selection unit 131 outputs a prediction mode index indicating the prediction mode. The prediction mode index is stored in the prediction mode index storage unit 132. The prediction pixel selection unit 133 selects and reads out the decoded value stored in the storage unit 130 according to the prediction mode index stored in the prediction mode index storage unit 132. The prediction pixel selection unit 133 outputs the decoded value read from the storage unit 130 as a prediction value for predicting the pixel value when the encoding target pixel data is compressed and expanded, and inputs the prediction value to the subtraction input terminal of the subtracter 100. At the same time, the signal is input to the other input terminal of the adder 111.

すなわち、予測画素選択部133は、現在の符号化対象画素Xの符号化順で1つ前の符号化対象画素を用いて求められた予測モードインデックスに示される予測モードに対応する復号値を、符号化対象画素Xの予測値として選択する。   That is, the prediction pixel selection unit 133 obtains the decoded value corresponding to the prediction mode indicated by the prediction mode index obtained using the previous encoding target pixel in the encoding order of the current encoding target pixel X, The prediction value of the encoding target pixel X is selected.

図示しないが、1ライン目では上のラインの復号画素が存在しないため、予測モードを強制的に「左」にする処理を行う。そのため、符号化部11Bに対して、1ライン目を示す信号も入力する必要がある。このとき、生成したパケットに強制的に左隣の画素の復号値を予測値として使用することを復号側に知らせる必要があるため、例えば制御信号(領域F)をハイにする処理を行う。なお、後述する第1の実施形態では、LBLを示す信号として制御信号(領域F)を用いることを提案しているが、復号の際に左隣の画素の復号値を使用するという意味では、1ライン目を示すための制御信号(領域F)と同じである。   Although not shown, since there is no decoded pixel in the upper line in the first line, a process for forcibly setting the prediction mode to “left” is performed. Therefore, it is also necessary to input a signal indicating the first line to the encoding unit 11B. At this time, since it is necessary to inform the decoding side that the decoded value of the pixel adjacent to the left side is forcibly used as the predicted value in the generated packet, for example, a process of setting the control signal (region F) to high is performed. In the first embodiment to be described later, it is proposed to use a control signal (region F) as a signal indicating LBL. However, in the sense of using the decoded value of the pixel on the left side in decoding, This is the same as the control signal (area F) for indicating the first line.

符号化部11Bの出力セレクタ102から出力された符号化データは、出力処理部12に供給され、図2を用いて説明したようにパケットに詰め込まれて符号化装置1から出力される。   The encoded data output from the output selector 102 of the encoding unit 11B is supplied to the output processing unit 12, packed into a packet as described with reference to FIG. 2, and output from the encoding device 1.

図9は、符号化装置1から出力される信号の例を示す。図9(a)は、クロックを示し、例えばクロック毎に1の画素データが符号化部11Bに入力されるものとする。図9(b)および図9(c)は、それぞれ信号line_firstおよび信号first_wordの例を示す。図9(d)は、出力処理部12から出力されるパケットの例を示す。各ラインの先頭で、信号line_firstがハイ状態とされる。また、各パケット#1、#2、…の先頭で、信号first_wordがハイ状態とされる。   FIG. 9 shows an example of a signal output from the encoding device 1. FIG. 9A shows a clock. For example, one pixel data is input to the encoding unit 11B for each clock. FIG. 9B and FIG. 9C show examples of the signal line_first and the signal first_word, respectively. FIG. 9D shows an example of a packet output from the output processing unit 12. At the beginning of each line, the signal line_first is set to the high state. Also, the signal first_word is set to the high state at the head of each packet # 1, # 2,.

(既知の復号処理の第2の例)
次に、上述の符号化部11Bで2次元の予測処理を用いて符号化された符号化データを復号する復号処理について説明する。図10は、2次元の予測処理を用いて符号化された符号化データの復号処理を行う既知の復号部21Bの一例の構成を示す。なお、図10において、上述した図6に示す復号部21Aと共通する部分には同一の符号を付して、詳細な説明を省略する。復号部21Bは、予測誤差伸長部200と、加算器201と、出力セレクタ202と、記憶部210と、予測モード選択部211と、予測モードインデックス記憶部212と、予測画素選択部213とを有する。
(Second example of known decoding process)
Next, a decoding process for decoding encoded data encoded using the two-dimensional prediction process in the encoding unit 11B described above will be described. FIG. 10 shows a configuration of an example of a known decoding unit 21B that performs a decoding process on encoded data encoded using a two-dimensional prediction process. In FIG. 10, the same reference numerals are given to portions common to the decoding unit 21 </ b> A shown in FIG. 6 described above, and detailed description thereof is omitted. The decoding unit 21B includes a prediction error expansion unit 200, an adder 201, an output selector 202, a storage unit 210, a prediction mode selection unit 211, a prediction mode index storage unit 212, and a prediction pixel selection unit 213. .

復号部21Bに入力された符号化データは、出力セレクタ202の選択入力端202Aに入力されると共に、予測誤差伸長部200に供給される。ここで、符号化データは、各パケットの先頭の原画素データと、パケットの先頭以外の圧縮予測誤差値とがある。予測誤差伸長部200は、入力された符号化データのうち圧縮予測誤差値を、上述の符号化部11Bが用いた量子化テーブルに対応する逆量子化テーブル(図示しない)に基づき逆量子化して伸長し、予測誤差値を復元する。復元予測誤差値は、加算器201の一方の入力端に入力される。加算器201の他方の入力端には、後述する予測画素選択部213から出力された予測値としての復号データが入力される。加算器201は、一方の入力端に入力された復元予測誤差値と、他方の入力端に入力された予測値としての復号データとを加算して、復号出力として出力すべき復号データを得る。   The encoded data input to the decoding unit 21 </ b> B is input to the selection input terminal 202 </ b> A of the output selector 202 and also supplied to the prediction error extending unit 200. Here, the encoded data includes original pixel data at the beginning of each packet and compressed prediction error values other than the beginning of the packet. The prediction error expansion unit 200 dequantizes the compressed prediction error value of the input encoded data based on an inverse quantization table (not shown) corresponding to the quantization table used by the encoding unit 11B described above. Decompress and restore the prediction error value. The restoration prediction error value is input to one input terminal of the adder 201. The other input terminal of the adder 201 receives decoded data as a prediction value output from a prediction pixel selection unit 213 described later. The adder 201 adds the restored prediction error value input to one input terminal and the decoded data as the predicted value input to the other input terminal, and obtains decoded data to be output as a decoded output.

加算器201から出力された復号データは、出力セレクタ202の選択入力端202Bに入力される。出力セレクタ202は、信号first_wordの状態に応じて選択入力端202Aおよび202Bのうち一方を選択する。出力セレクタ202は、信号first_wordがロー状態で選択入力端202Bを選択し、加算器201の出力を復号データとして出力する。一方、出力セレクタ202は、信号first_wordがハイ状態で選択入力端202Aを選択し、入力された符号化データを復号データとして復号部21Bから出力する。この場合、復号データとして、原画素データが出力されることになる。   The decoded data output from the adder 201 is input to the selection input terminal 202B of the output selector 202. The output selector 202 selects one of the selection input terminals 202A and 202B according to the state of the signal first_word. The output selector 202 selects the selection input terminal 202B when the signal first_word is in the low state, and outputs the output of the adder 201 as decoded data. On the other hand, the output selector 202 selects the selection input terminal 202A when the signal first_word is in the high state, and outputs the input encoded data from the decoding unit 21B as decoded data. In this case, original pixel data is output as decoded data.

出力セレクタ202から出力された復号データは、記憶部210にも供給される。復号部21Bにおいて、記憶部210、予測モード選択部211、予測モードインデックス記憶部212および予測画素選択部213は、それぞれ上述した符号化部11Bにおける記憶部130、予測モード選択部131、予測モードインデックス記憶部132および予測画素選択部133に対応する。   The decoded data output from the output selector 202 is also supplied to the storage unit 210. In the decoding unit 21B, the storage unit 210, the prediction mode selection unit 211, the prediction mode index storage unit 212, and the prediction pixel selection unit 213 are respectively the storage unit 130, the prediction mode selection unit 131, and the prediction mode index in the encoding unit 11B described above. This corresponds to the storage unit 132 and the predicted pixel selection unit 133.

記憶部210、予測モード選択部211、予測モードインデックス記憶部212および予測画素選択部213は、符号化部11Bと同様にして、加算器201の他方の入力端に入力するための復号データを、記憶部210に記憶される復号データを用いて、直前に出力セレクタ202から出力された復号データが含まれるラインと、当該ラインに対して復号順で1つ前のラインとを用いて求める。   The storage unit 210, the prediction mode selection unit 211, the prediction mode index storage unit 212, and the prediction pixel selection unit 213, similarly to the encoding unit 11B, decode data to be input to the other input terminal of the adder 201. Using the decoded data stored in the storage unit 210, a line including the decoded data output from the output selector 202 immediately before and a line preceding the line in decoding order are obtained.

記憶部210は、複数の復号データを記憶する。より具体的には、記憶部210は、例えば1ライン分を記憶可能なラインメモリを用い、直前に出力セレクタ202から出力された復号データを記憶すると共に、図7を用いて説明した方法と同様に、当該復号データの左隣、左上、直上および右上にそれぞれ隣接する画素A〜Dそれぞれに対する復号データを記憶する。以下、直前に出力セレクタ202から出力された復号データを復号データx’とし、画素A〜Dそれぞれに対する復号データを復号データa’、b’、c’およびd’とする。   The storage unit 210 stores a plurality of decoded data. More specifically, the storage unit 210 uses, for example, a line memory capable of storing one line, stores the decoded data output from the output selector 202 immediately before, and is similar to the method described with reference to FIG. In addition, the decoded data for the pixels A to D adjacent to the left side, the upper left side, the upper right side, and the upper right side of the decoded data are stored. Hereinafter, the decoded data output from the output selector 202 immediately before is referred to as decoded data x ′, and the decoded data for each of the pixels A to D is referred to as decoded data a ′, b ′, c ′, and d ′.

予測モード選択部211は、記憶部210に記憶される復号データx’と復号データa’〜d’とを用いて予測モードを選択する。具体的には、予測モード選択部211は、復号データx’と、各復号データa’〜d’との差分をそれぞれ求め、各復号データa’〜d’のうち最も差分の小さい復号データに対応する方向を予測モードとして選択する。   The prediction mode selection unit 211 selects a prediction mode using the decoded data x ′ and the decoded data a ′ to d ′ stored in the storage unit 210. Specifically, the prediction mode selection unit 211 obtains the difference between the decoded data x ′ and each decoded data a ′ to d ′, and sets the decoded data having the smallest difference among the decoded data a ′ to d ′. Select the corresponding direction as the prediction mode.

予測モード選択部211は、予測モードを示す予測モードインデックスを出力する。予測モードインデックスは、予測モードインデックス記憶部212に記憶される。予測画素選択部213は、予測モードインデックス記憶部212に記憶される予測モードインデックスに従い、記憶部210に記憶される復号データを選択して読み出す。すなわち、予測画素選択部213は、復号データx’の符号化順で1つ前の復号データを用いて求められた予測モードインデックスに示される予測モードに対応する復号データを選択する。予測画素選択部213は、選択された復号データを出力する。予測画素選択部213から出力された復号データは、加算器201の他方の入力端に入力される。   The prediction mode selection unit 211 outputs a prediction mode index indicating the prediction mode. The prediction mode index is stored in the prediction mode index storage unit 212. The prediction pixel selection unit 213 selects and reads the decoded data stored in the storage unit 210 according to the prediction mode index stored in the prediction mode index storage unit 212. That is, the prediction pixel selection unit 213 selects decoded data corresponding to the prediction mode indicated by the prediction mode index obtained using the previous decoded data in the encoding order of the decoded data x ′. The prediction pixel selection unit 213 outputs the selected decoded data. The decoded data output from the prediction pixel selection unit 213 is input to the other input terminal of the adder 201.

(第1の実施形態による符号化処理)
上述した2次元の予測を行い符号化処理する既知の符号化技術によれば、符号化対象画素が含まれるラインと、当該ラインの符号化順で1つ前のラインとにおける、局部復号済みであって、且つ、当該符号化対象画素の近傍の複数の画素の復号値を用いて符号化対象画素の予測値を求めている。そのため、図5を用いて説明した1次元の予測に基づき符号化処理する場合に比べて、予測精度が上がり符号化効率が向上される。
(Encoding process according to the first embodiment)
According to the known encoding technique in which the above-described two-dimensional prediction is performed and the encoding process is performed, local decoding has already been performed on the line including the pixel to be encoded and the previous line in the encoding order of the line. In addition, the prediction value of the encoding target pixel is obtained using the decoded values of a plurality of pixels in the vicinity of the encoding target pixel. Therefore, the prediction accuracy is increased and the encoding efficiency is improved as compared with the case of performing the encoding process based on the one-dimensional prediction described with reference to FIG.

一方、例えばLBL方式のように、2の異なる画像が1ラインおきに挿入される画像データに対して既知の技術による2次元の予測を用いた符号化処理を適用した場合、予測方向が、実際の符号化対象画素位置において予測誤差が最小となる予測方向と異なってしまう可能性がある。この場合、縦方向での予測誤差が大きくなり、予測誤差が下方向に伝播してしまうおそれがある。   On the other hand, when encoding processing using two-dimensional prediction by a known technique is applied to image data in which two different images are inserted every other line as in the LBL method, for example, the prediction direction is actually May be different from the prediction direction in which the prediction error is minimized at the encoding target pixel position. In this case, the prediction error in the vertical direction becomes large, and the prediction error may propagate downward.

そこで、第1の実施形態による符号化処理では、LBL方式を示す制御信号に応じて予測モードを切り替えることで、LBL方式の画像データと、全面が1の画像からなる一般の画像データとに対応する。   Therefore, in the encoding process according to the first embodiment, the prediction mode is switched in accordance with the control signal indicating the LBL method, so that the image data of the LBL method and general image data composed of one image on the entire surface are supported. To do.

図11は、第1の実施形態による符号化部11の一例の構成を示す。なお、図11において、既知の符号化処理の第2の例で説明した、図8に示した符号化部11Bと共通する部分には同一の符号を付して、詳細な説明を省略する。図11に示す符号化部11は、図8の符号化部11Bに対して、予測部120’において予測モード選択部131から予測モードインデックス記憶部132に対して予測モードインデックスを供給する経路の途中に、予測モードセレクタ150が追加して挿入されている点が異なる。   FIG. 11 shows an exemplary configuration of the encoding unit 11 according to the first embodiment. In FIG. 11, parts common to the encoding unit 11 </ b> B illustrated in FIG. 8 described in the second example of the known encoding process are denoted by the same reference numerals, and detailed description thereof is omitted. 11 is in the middle of a path for supplying a prediction mode index from the prediction mode selection unit 131 to the prediction mode index storage unit 132 in the prediction unit 120 ′ with respect to the encoding unit 11B in FIG. In addition, the prediction mode selector 150 is additionally inserted.

予測モードセレクタ150は、所定に供給される制御信号に応じて、選択入力端150Aおよび選択入力端150Bを切り替える。例えば、予測モードセレクタ150は、制御信号がロー状態で選択入力端150Aを選択し、制御信号がハイ状態で選択入力端150Bを選択する。選択入力端150Aには、予測モード選択部131から出力される予測モードインデックスが入力される。一方、選択入力端150Bには、「左」を示す予測モードインデックスが入力される。   The prediction mode selector 150 switches between the selection input terminal 150A and the selection input terminal 150B in accordance with a predetermined control signal. For example, the prediction mode selector 150 selects the selection input terminal 150A when the control signal is low, and selects the selection input terminal 150B when the control signal is high. The prediction mode index output from the prediction mode selection unit 131 is input to the selection input terminal 150A. On the other hand, a prediction mode index indicating “left” is input to the selection input terminal 150B.

制御信号がロー状態の場合、符号化部11の動作は、図8を用いて説明した符号化部11Bと同一の動作となる。すなわち、符号化対象画素Xの近接画素A〜Dの復号値a〜dのうち、符号化対象画素値Xの値との差分が最小となる値を、予測値xとして選択して、符号化を行う。   When the control signal is in a low state, the operation of the encoding unit 11 is the same as that of the encoding unit 11B described with reference to FIG. That is, among the decoded values a to d of the neighboring pixels A to D of the encoding target pixel X, a value that minimizes the difference from the encoding target pixel value X is selected as the predicted value x and encoded. I do.

先に説明したどの復号値を選択したか(予測方向)を復号側に伝送せず、予測方向の決定を、符号化対象画素Xの左隣や直上の画素位置で行う方法を用いてもよい。   A method of determining the prediction direction at the pixel position adjacent to or immediately above the encoding target pixel X without transmitting to the decoding side which decoding value (prediction direction) described above is selected may be used. .

一方、制御信号がハイ状態の場合、予測モードインデックス記憶部132に対して、「左」を示す予測モードインデックスが強制的に供給される。この場合、予測画素選択部133は、記憶部130に記憶される、符号化対象画素Xの左隣の画素Aに対応する復号値aを強制的に選択させられることになる。すなわち、制御信号がハイ状態の間、減算器100の減算入力端には、順次、復号値aが予測値として入力される。これは、図5を用いて説明した、1次元の予測に基づき符号化を行う符号化部11Aの動作と同一となる。   On the other hand, when the control signal is in the high state, the prediction mode index indicating “left” is forcibly supplied to the prediction mode index storage unit 132. In this case, the prediction pixel selection unit 133 is forced to select the decoded value a corresponding to the pixel A adjacent to the left of the encoding target pixel X stored in the storage unit 130. That is, while the control signal is in the high state, the decoded value a is sequentially input as a predicted value to the subtraction input terminal of the subtracter 100. This is the same as the operation of the encoding unit 11A that performs encoding based on the one-dimensional prediction described with reference to FIG.

このように、予測モード選択部131と、予測モードインデックス記憶部132と、予測画素選択部133と、予測モードセレクタ150とにより、記憶部に記憶される各予測値とに基づき減算部100の減算入力端に入力する予測値を求める予測値出力部が構成される。   Thus, the subtraction of the subtraction unit 100 based on each prediction value stored in the storage unit by the prediction mode selection unit 131, the prediction mode index storage unit 132, the prediction pixel selection unit 133, and the prediction mode selector 150. A predicted value output unit for obtaining a predicted value to be input to the input terminal is configured.

したがって、符号化部11に入力される画像データがLBL方式による画像データである場合に、制御信号をハイ状態とし、入力画像データが一般の画像データである場合に、制御信号をロー状態とする。これにより、LBL方式の画像データが入力された場合には1次元の予測に基づく符号化を行い、一般の画像データが入力された場合には2次元の予測に基づく符号化を行う処理を、共通の構成にて実現できる。   Therefore, when the image data input to the encoding unit 11 is image data according to the LBL method, the control signal is set to a high state, and when the input image data is general image data, the control signal is set to a low state. . Thus, when LBL image data is input, encoding based on one-dimensional prediction is performed, and when general image data is input, encoding based on two-dimensional prediction is performed. This can be realized with a common configuration.

LBL方式を示す制御信号は、例えば符号化装置1に画像データを供給する供給元から符号化装置1に対して送信される。   A control signal indicating the LBL method is transmitted to the encoding device 1 from a supply source that supplies image data to the encoding device 1, for example.

なお、上述では、符号化対象画素Xに対して、符号化対象画素Xを含むラインの符号化順で1つ前のラインにおける画素として、符号化対象画素Xの近傍の複数画素(この例では3画素)を用いて予測を行っているが、これはこの例に限定されない。例えば、符号化対象画素Xを含むラインの符号化順で1つ前のラインにおける画素として、符号化対象画素Xの近傍の1画素を用いて予測を行うようにしてもよい。この場合、例えば符号化対象画素Xの直上の画素を用いることが考えられる。   In the above description, a plurality of pixels in the vicinity of the encoding target pixel X (in this example, as pixels in the previous line in the encoding order of the line including the encoding target pixel X with respect to the encoding target pixel X). The prediction is performed using 3 pixels), but this is not limited to this example. For example, prediction may be performed using one pixel in the vicinity of the encoding target pixel X as a pixel in the previous line in the encoding order of the line including the encoding target pixel X. In this case, for example, it is conceivable to use a pixel immediately above the encoding target pixel X.

(第1の実施形態による復号処理)
図12は、第1の実施形態による復号部21の一例の構成を示す。なお、図12において、既知の復号処理の第2の例で説明した、図10に示した復号部21Bと共通する部分には同一の符号を付して、詳細な説明を省略する。図12に示す復号部21は、図10の復号部21Bに対して、予測モード選択部211から予測モードインデックス記憶部212に対して予測モードインデックスを供給する経路の途中に、予測モードセレクタ220が追加して挿入されている点が異なる。
(Decoding process according to the first embodiment)
FIG. 12 shows an exemplary configuration of the decoding unit 21 according to the first embodiment. In FIG. 12, parts common to the decoding unit 21B shown in FIG. 10 described in the second example of the known decoding process are denoted by the same reference numerals, and detailed description thereof is omitted. The decoding unit 21 illustrated in FIG. 12 has a prediction mode selector 220 in the middle of a path for supplying a prediction mode index from the prediction mode selection unit 211 to the prediction mode index storage unit 212 with respect to the decoding unit 21B of FIG. It is different in that it is additionally inserted.

予測モードセレクタ220の動作は、図11に示した符号化部11における予測モードセレクタ150の動作と同一である。すなわち、予測モードセレクタ220は、LBL方式を示す制御信号がロー状態で選択入力端220Aを選択し、当該制御信号がハイ状態で選択入力端220Bを選択する。選択入力端220Aには、予測モード選択部211から出力される予測モードインデックスが入力される。一方、選択入力端220Bには、「左」を示す予測モードインデックスが入力される。   The operation of the prediction mode selector 220 is the same as the operation of the prediction mode selector 150 in the encoding unit 11 shown in FIG. That is, the prediction mode selector 220 selects the selection input terminal 220A when the control signal indicating the LBL method is low, and selects the selection input terminal 220B when the control signal is high. The prediction mode index output from the prediction mode selection unit 211 is input to the selection input terminal 220A. On the other hand, a prediction mode index indicating “left” is input to the selection input terminal 220B.

制御信号がロー状態の場合、復号部21の動作は、図10を用いて説明した復号部21Bと同一の動作となる。すなわち、復号部21は、直前に出力セレクタ202から出力された復号データx’と、当該復号データx’に対応する画素の左隣、左上、直上および右上にそれぞれ隣接する画素A〜Dそれぞれに対する復号データa’〜d’とを用いて、復号順で次に復号される復号データに対する予測値を求める。   When the control signal is in a low state, the operation of the decoding unit 21 is the same as that of the decoding unit 21B described with reference to FIG. That is, the decoding unit 21 applies the decoded data x ′ output from the output selector 202 immediately before and the pixels A to D adjacent to the left side, the upper left side, the upper right side, and the upper right side of the pixel corresponding to the decoded data x ′. Using the decoded data a ′ to d ′, a predicted value for the decoded data to be decoded next in the decoding order is obtained.

一方、制御信号がハイ状態の場合、予測モードインデックス記憶部212に対して、「左」を示す予測モードインデックスが強制的に供給され、予測画素選択部213が、記憶部210に記憶される、直前に復号された復号データに対応する画素の左隣の画素に対する復号データa’を強制的に選択させられる。すなわち、制御信号がハイ状態の間、加算器201の他方の入力端には、順次、復号データa’が入力される。これは、図6を用いて説明した、1次元の予測に基づき符号化を行う復号部21Aの動作と同一となる。   On the other hand, when the control signal is in a high state, the prediction mode index indicating “left” is forcibly supplied to the prediction mode index storage unit 212, and the prediction pixel selection unit 213 is stored in the storage unit 210. The decoded data a ′ for the pixel to the left of the pixel corresponding to the decoded data decoded immediately before is forcibly selected. That is, while the control signal is in the high state, the decoded data a ′ is sequentially input to the other input terminal of the adder 201. This is the same as the operation of the decoding unit 21A that performs encoding based on the one-dimensional prediction described with reference to FIG.

したがって、復号部21にLBL方式に対応して符号化された符号化データが入力される場合に、制御信号をハイ状態とし、一般の画像データに対応して符号化された符号化データが入力される場合に、制御信号をロー状態とする。これにより、LBL方式の画像データを符号化した符号化データが入力された場合には1次元の予測に基づく復号を行い、一般の画像データを符号化した符号化データが入力された場合には2次元の予測に基づく復号を行う処理を、共通の構成にて実現できる。   Therefore, when encoded data encoded corresponding to the LBL method is input to the decoding unit 21, the control signal is set to a high state, and encoded data encoded corresponding to general image data is input. If so, the control signal is set to a low state. Accordingly, when encoded data obtained by encoding LBL image data is input, decoding based on one-dimensional prediction is performed, and when encoded data obtained by encoding general image data is input. A process of performing decoding based on two-dimensional prediction can be realized with a common configuration.

このように、予測モード選択部211と、予測モードインデックス記憶部212と、予測画素選択部213と、予測モードセレクタ220とにより、加算部に加算する復号予測値を求める予測値出力部が構成される。   As described above, the prediction mode selection unit 211, the prediction mode index storage unit 212, the prediction pixel selection unit 213, and the prediction mode selector 220 constitute a prediction value output unit that obtains a decoded prediction value to be added to the addition unit. The

LBL方式を示す制御信号は、例えば符号化装置1において、図2に示したパケットの構成におけるMSBの1ビットの領域Fに対して、当該パケットに格納される符号化データがLBL方式に対応して符号化された符号化データであるか否かを示すフラグを格納することが考えられる。復号装置2は、パケットが入力されると、入力処理部20においてパケットのMSBの1ビットを検出して、LBL方式か否かを示す制御信号を生成する。   For example, in the encoding device 1, the control signal indicating the LBL method corresponds to the LBL method in which the encoded data stored in the packet corresponds to the 1-bit region F of the MSB in the packet configuration illustrated in FIG. It is conceivable to store a flag indicating whether or not the encoded data is encoded. When the packet is input, the decoding device 2 detects one bit of the MSB of the packet in the input processing unit 20 and generates a control signal indicating whether or not the LBL method is used.

これに限らず、LBL方式か否かを示す制御信号を、復号装置2に対してパケットを供給する供給元から復号装置2に対して送信してもよい。   Not only this but the control signal which shows whether it is LBL system may be transmitted with respect to the decoding apparatus 2 from the supply source which supplies a packet with respect to the decoding apparatus 2. FIG.

(第2の実施形態)
次に、第2の実施形態について説明する。第2の実施形態は、上述した第1の実施形態による、符号化部11を含む符号化装置1と、復号装置2とを画像処理部を有する画像処理装置に適用した例である。図13は、第2の実施形態による画像処理装置300の一例の構成を示す。ここでは、画像処理装置300の例として、ハイビジョン画像による画像データを入力してディスプレイに供給する映像装置を適用している。なお、図13において、上述の図1および図4と共通する部分には同一の符号を付して、詳細な説明を省略する。
(Second Embodiment)
Next, a second embodiment will be described. The second embodiment is an example in which the encoding device 1 including the encoding unit 11 and the decoding device 2 according to the first embodiment described above are applied to an image processing device having an image processing unit. FIG. 13 shows an exemplary configuration of an image processing apparatus 300 according to the second embodiment. Here, as an example of the image processing apparatus 300, a video apparatus that inputs image data based on a high-definition image and supplies the image data to a display is applied. In FIG. 13, the same reference numerals are given to the portions common to FIGS. 1 and 4 described above, and detailed description thereof is omitted.

画像処理装置300は、入力部310、画像処理部311およびディスプレイ312を有する。入力部310は、画像データが入力される。入力部310は、ハイビジョン画像による画像データの入力を受け付ける。ハイビジョン画像の入力元は、特に限定しないが、デジタルテレビジョン放送を受信するチューナ、Blu−ray(登録商標)ディスクなどディスク記録媒体を再生するプレーヤ、コンピュータ装置など様々に考えられる。入力部310は、入力された画像データを画像処理部311に供給する。また、入力された画像データがLBL方式による画像データであるか否かを識別し、LBL方式による画像データであると識別された場合には、画像データと共にLBL方式であることを示す信号を画像処理部311に供給する。   The image processing apparatus 300 includes an input unit 310, an image processing unit 311, and a display 312. The input unit 310 receives image data. The input unit 310 accepts input of image data as a high-definition image. The input source of the high-definition image is not particularly limited, but various sources such as a tuner that receives digital television broadcasts, a player that reproduces a disc recording medium such as a Blu-ray (registered trademark) disc, and a computer device are conceivable. The input unit 310 supplies the input image data to the image processing unit 311. In addition, it is determined whether or not the input image data is image data based on the LBL method. When the input image data is identified as image data based on the LBL method, a signal indicating that the image data is based on the LBL method is displayed together with the image data. This is supplied to the processing unit 311.

画像処理部311は、供給された画像データに対して、メモリ321を用いて所定の画像処理を施す。画像処理部311が行う画像処理の種類は、特に限定されないが、エンハンス処理、フレームレート変換処理、色調調整処理、解像度変換処理など、様々に考えられる。   The image processing unit 311 performs predetermined image processing on the supplied image data using the memory 321. The type of image processing performed by the image processing unit 311 is not particularly limited. Various types of processing such as enhancement processing, frame rate conversion processing, color tone adjustment processing, and resolution conversion processing are conceivable.

画像処理部311は、上述した画像処理を、メモリ321を用いて行うことができる。一例として、画像処理部311は、入力部310から供給された画像データを、メモリインターフェイス(I/F)320を介して一旦メモリ321に格納する。そして、メモリから、メモリI/F320を介して画像データを読み出しつつ例えば画素単位で画像データに対して画像処理を施す。画像処理が施された画像データは、画像処理部311からメモリI/F320を介して順次メモリ321に書き込まれる。   The image processing unit 311 can perform the above-described image processing using the memory 321. As an example, the image processing unit 311 temporarily stores the image data supplied from the input unit 310 in the memory 321 via the memory interface (I / F) 320. Then, image processing is performed on the image data, for example, in units of pixels while reading the image data from the memory via the memory I / F 320. The image data subjected to the image processing is sequentially written from the image processing unit 311 to the memory 321 via the memory I / F 320.

画像処理部311で画像処理された画像データは、ディスプレイ312に供給される。例えば、画像処理部311は、画像処理が終了した画像データを、メモリI/F320を介してメモリ321に書き込む。1フレーム分の画像処理が終了すると、画像処理部311は、メモリ321からメモリI/F320を介して画像データを読み出して、ディスプレイ312に供給する。ディスプレイ312は、供給された画像データに基づく画像を表示する。   The image data processed by the image processing unit 311 is supplied to the display 312. For example, the image processing unit 311 writes the image data for which image processing has been completed to the memory 321 via the memory I / F 320. When the image processing for one frame is completed, the image processing unit 311 reads image data from the memory 321 via the memory I / F 320 and supplies the image data to the display 312. The display 312 displays an image based on the supplied image data.

このような画像処理装置300の構成において、メモリI/F320に対して、第1の実施形態による、符号化部11を含む符号化装置1と、復号装置2とを適用する。より具体的には、図13に例示されるように、メモリI/F320は、符号化装置1を構成する入力処理部10、符号化部11および出力処理部12と、復号装置2を構成する入力処理部20、復号部21および出力処理部22とを有する。   In such a configuration of the image processing apparatus 300, the encoding apparatus 1 including the encoding unit 11 and the decoding apparatus 2 according to the first embodiment are applied to the memory I / F 320. More specifically, as illustrated in FIG. 13, the memory I / F 320 configures the input processing unit 10, the encoding unit 11, the output processing unit 12, and the decoding device 2 that configure the encoding device 1. An input processing unit 20, a decoding unit 21, and an output processing unit 22 are included.

画像処理部311から、例えばライン単位で画素順次に出力された画像データがメモリI/F320に供給され、入力処理部10に入力される。それと共に、画像処理部311から、出力した画像データがLBL方式による画像データであるか否かを示す制御信号がメモリI/F320に供給され、符号化部11に入力される。入力処理部10は、入力された画像データを予め定められた画素数毎に分割して画素ブロックを形成する。それと共に、入力処理部10は、信号line_firstおよび信号first_wordを、画素ブロックおよび画素ブロック内の画素データの位置に応じてそれぞれハイ状態またはロー状態にして出力する。入力処理部10は、ラインの先頭を示す情報を、例えば画像処理部311から取得することができる。   For example, image data output sequentially from the image processing unit 311 in units of lines is supplied to the memory I / F 320 and input to the input processing unit 10. At the same time, a control signal indicating whether or not the output image data is image data based on the LBL method is supplied from the image processing unit 311 to the memory I / F 320 and input to the encoding unit 11. The input processing unit 10 divides input image data for each predetermined number of pixels to form a pixel block. At the same time, the input processing unit 10 outputs the signal line_first and the signal first_word in a high state or a low state, respectively, according to the position of the pixel block and the pixel data in the pixel block. The input processing unit 10 can acquire information indicating the head of the line from the image processing unit 311, for example.

入力処理部10から出力された画素ブロックと、信号first_wordとが符号化部11に入力される。符号化部11は、図11を用いて説明したようにして、画素ブロックの画素データを符号化して符号化ブロックを生成する。   The pixel block output from the input processing unit 10 and the signal first_word are input to the encoding unit 11. As described with reference to FIG. 11, the encoding unit 11 encodes the pixel data of the pixel block to generate an encoded block.

このとき、画像処理部311から供給された制御信号が、画像処理部311から出力された画像データがLBL方式による画像データであることを示している場合、予測モードセレクタ150において選択入力端150Bが選択され、符号化部11は、1次元の予測に基づく符号化処理を行う。一方、当該制御信号が、画像処理部311から出力された画像データがLBL方式による画像データではなく、一般の画像データであることを示している場合、予測モードセレクタ150において選択入力端150Aが選択され、符号化部11は、2次元の予測に基づく符号化処理を行う。   At this time, if the control signal supplied from the image processing unit 311 indicates that the image data output from the image processing unit 311 is image data based on the LBL method, the selection input terminal 150B in the prediction mode selector 150 is When selected, the encoding unit 11 performs an encoding process based on one-dimensional prediction. On the other hand, when the control signal indicates that the image data output from the image processing unit 311 is not image data by the LBL method but general image data, the selection input terminal 150A is selected by the prediction mode selector 150. Then, the encoding unit 11 performs an encoding process based on two-dimensional prediction.

符号化部11から出力された符号化データは、出力処理部12で、予め定められたサイズのパケットに詰め込まれてメモリI/F320から出力される。このとき、パケットの例えばMSBの1ビットの領域Fに対して、当該パケットに格納される符号化データがLBL方式に対応しているか否かを示す識別情報が格納される。メモリI/F320から出力された符号化ブロックのパケットは、メモリ321に書き込まれる。   The encoded data output from the encoding unit 11 is packed into a packet having a predetermined size by the output processing unit 12 and output from the memory I / F 320. At this time, identification information indicating whether or not the encoded data stored in the packet corresponds to the LBL method is stored in the 1-bit region F of the MSB of the packet. The encoded block packet output from the memory I / F 320 is written in the memory 321.

画像処理部311からメモリI/F320に対して、メモリ321に記憶された画像データ(符号化ブロック)の読み出しが指示される。メモリI/F320は、この指示に従い、メモリ321から符号化ブロックをパケット毎に読み出し、入力処理部20に入力する。このとき、入力処理部20は、ラインの先頭や各符号化ブロックの先頭を示す情報を、例えば画像処理部311から取得することができる。各符号化ブロックの先頭を示す情報は、入力処理部20自身で生成してもよい。   The image processing unit 311 instructs the memory I / F 320 to read the image data (encoded block) stored in the memory 321. In accordance with this instruction, the memory I / F 320 reads the encoded block from the memory 321 for each packet and inputs it to the input processing unit 20. At this time, the input processing unit 20 can acquire information indicating the head of the line or the head of each encoded block from the image processing unit 311, for example. Information indicating the head of each encoded block may be generated by the input processing unit 20 itself.

入力処理部20は、入力された符号化ブロックから符号化データを取り出して順次、復号部21に供給すると共に、信号first_wordを、符号化ブロック内の符号化データの位置に応じてハイ状態またはロー状態にして出力する。また、入力処理部20は、符号化ブロックのMSBの領域Fに格納される識別情報に基づき、符号化ブロックに格納される符号化データがLBL方式に従い符号化された符号化データであるか否かを示す制御信号を生成して、復号部21に供給する。   The input processing unit 20 extracts the encoded data from the input encoded block and sequentially supplies the encoded data to the decoding unit 21, and also sets the signal first_word to a high state or low level according to the position of the encoded data in the encoded block. Output in a state. Further, the input processing unit 20 determines whether the encoded data stored in the encoded block is encoded data encoded according to the LBL scheme based on the identification information stored in the MSB area F of the encoded block. Is generated and supplied to the decoding unit 21.

復号部21は、入力された符号化データを、信号first_wordの状態に応じて選択して、符号化ブロックの先頭に格納される符号化データをそのまま復号データとして出力し、その他の符号化データを逆量子化した後復号順で1つ前の符号化データと加算して復号データを生成する。   The decoding unit 21 selects the input encoded data according to the state of the signal first_word, outputs the encoded data stored at the head of the encoded block as decoded data, and outputs the other encoded data as it is. After the inverse quantization, decoded data is generated by adding the previous encoded data in the decoding order.

このとき、入力処理部20から供給された制御信号が、LBL方式による符号化データであることを示している場合、予測モードセレクタ220において選択入力端220Bが選択され、復号部21は、1次元の予測に基づく復号処理を行う。一方、当該制御信号が、符号化データがLBL方式による画像データではなく、一般の画像データに対する符号化による符号化データであることを示している場合、予測モードセレクタ220において選択入力端220Aが選択され、復号部21は、2次元の予測に基づく復号処理を行う。   At this time, when the control signal supplied from the input processing unit 20 indicates encoded data by the LBL method, the selection input terminal 220B is selected by the prediction mode selector 220, and the decoding unit 21 is one-dimensional. The decoding process based on the prediction is performed. On the other hand, when the control signal indicates that the encoded data is not the image data by the LBL method but the encoded data by encoding the general image data, the selection input terminal 220A is selected by the prediction mode selector 220. Then, the decoding unit 21 performs a decoding process based on the two-dimensional prediction.

復号部21から出力された復号データは、出力処理部22により所定のフォーマットに整形され、メモリI/F320から画像処理部311に供給される。   The decoded data output from the decoding unit 21 is shaped into a predetermined format by the output processing unit 22 and supplied from the memory I / F 320 to the image processing unit 311.

このように、第1の実施形態による符号化部11および復号部21を、画像処理部311がアクセスするメモリ321のメモリI/F320に組み込んで用いることで、メモリ321に格納される画像データのサイズを圧縮することができる。また、符号化は、画素単位で行われるので、高速な処理が可能である。さらに、メモリI/F320は、符号化および復号処理を1次元および2次元の何れの予測に基づき行うかを、制御信号に基づき切り替えることができる。そのため、LBL方式による画像データと、LBL方式ではない一般の画像データとの何れにも、共通の構成で対応可能である。   As described above, the encoding unit 11 and the decoding unit 21 according to the first embodiment are used by being incorporated in the memory I / F 320 of the memory 321 accessed by the image processing unit 311, so that the image data stored in the memory 321 can be stored. The size can be compressed. In addition, since encoding is performed on a pixel basis, high-speed processing is possible. Further, the memory I / F 320 can switch between the one-dimensional prediction and the two-dimensional prediction based on the control signal. For this reason, both the image data based on the LBL system and the general image data not based on the LBL system can be handled with a common configuration.

1 符号化装置
2 復号装置
10,20 入力処理部
11,11A,11B 符号化部
12,22 出力処理部
21,21A,21B 復号部
100 減算器
101 予測誤差圧縮部
102,202 出力セレクタ
103 予測部
110,200 予測誤差伸長部
111,201 加算器
113,130,210 記憶部
131,211 予測モード選択部
132,212 予測モードインデックス記憶部
133,213 予測画素選択部
150,220 予測モードセレクタ
DESCRIPTION OF SYMBOLS 1 Encoding apparatus 2 Decoding apparatus 10,20 Input processing part 11,11A, 11B Encoding part 12,22 Output processing part 21,21A, 21B Decoding part 100 Subtractor 101 Prediction error compression part 102,202 Output selector 103 Prediction part 110, 200 Prediction error expansion unit 111, 201 Adder 113, 130, 210 Storage unit 131, 211 Prediction mode selection unit 132, 212 Prediction mode index storage unit 133, 213 Prediction pixel selection unit 150, 220 Prediction mode selector

Claims (8)

入力画素の画素値と、前記画素値を予測した第1の予測値との誤差である予測誤差を取得する予測誤差取得部と、
前記予測誤差を圧縮する圧縮部と、
前記圧縮部で圧縮された前記予測誤差を伸長する伸長部と、
前記伸長部で伸長された前記予測誤差と、前記第1の予測値とを加算して第2の予測値を生成する加算部と、
少なくとも、前記第2の予測値と、前記入力画素が含まれるラインに対して符号化順で1つ前のラインの、前記入力画素に近接する画素に対応する第3の予測値と、前記入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とを記憶する記憶部と、
前記第2の予測値と、前記第3の予測値と、前記第4の予測値とのうち少なくとも2の予測値に基づき求めた前記第1の予測値を出力する予測値出力部と
を有し、
前記予測値出力部は、
予め定められた制御信号を受信した場合に、前記第2の予測値と前記第4の予測値とに基づき前記第1の予測値を求め、前記制御信号を受信しない場合に、前記第2の予測値と、前記第3の予測値と、前記第4の予測値とに基づき前記第1の予測値を求める
ことを特徴とする符号化装置。
A prediction error acquisition unit that acquires a prediction error that is an error between the pixel value of the input pixel and the first prediction value obtained by predicting the pixel value;
A compression unit for compressing the prediction error;
A decompression unit for decompressing the prediction error compressed by the compression unit;
An addition unit that adds the prediction error expanded by the expansion unit and the first prediction value to generate a second prediction value;
At least a second predicted value, a third predicted value corresponding to a pixel adjacent to the input pixel in a line preceding the line including the input pixel in coding order, and the input A storage unit that stores a fourth predicted value corresponding to a pixel preceding by one in encoding order with respect to the pixel;
A prediction value output unit that outputs the first prediction value obtained based on at least two prediction values of the second prediction value, the third prediction value, and the fourth prediction value; And
The predicted value output unit
When the predetermined control signal is received, the first predicted value is obtained based on the second predicted value and the fourth predicted value, and when the control signal is not received, the second predicted value is obtained. An encoding apparatus, wherein the first prediction value is obtained based on a prediction value, the third prediction value, and the fourth prediction value.
前記記憶部は、
前記入力画素が含まれるラインに対して符号化順で1つ前のラインの、前記入力画素に近接する複数の画素にそれぞれ対応する複数の前記第3の予測値を記憶し、
前記予測値出力部は、
前記制御信号を受信しない場合に、前記第2の予測値と、複数の前記第3の予測値と、前記第4の予測値とに基づき前記第1の予測値を求める
ことを特徴とする請求項1に記載の符号化装置。
The storage unit
Storing a plurality of third prediction values respectively corresponding to a plurality of pixels adjacent to the input pixel in a line preceding by a coding order with respect to a line including the input pixel;
The predicted value output unit
The first predicted value is obtained based on the second predicted value, the plurality of third predicted values, and the fourth predicted value when the control signal is not received. Item 4. The encoding device according to Item 1.
前記入力画素と、前記圧縮部の出力とのうち一方を選択して符号化出力として出力する第1の選択部と、
前記入力画素と、前記加算部の出力とのうち一方を選択して前記第2の予測値として前記記憶部に記憶させる第2の選択部と
をさらに有し、
前記第1の選択部および前記第2の選択部は、
ラインを所定数の画素毎に分割した各ブロックの先頭で前記入力画素を選択する
ことを特徴とする請求項1または請求項2に記載の符号化装置。
A first selection unit that selects one of the input pixel and the output of the compression unit and outputs it as an encoded output;
A second selection unit that selects one of the input pixel and the output of the addition unit and stores the second prediction value as the second predicted value in the storage unit;
The first selection unit and the second selection unit are:
The encoding apparatus according to claim 1 or 2, wherein the input pixel is selected at the head of each block obtained by dividing the line into a predetermined number of pixels.
入力画素の画素値と、前記画素値を予測した第1の予測値との誤差である予測誤差を取得する予測誤差取得ステップと、
前記予測誤差を圧縮する圧縮ステップと、
前記圧縮ステップにより圧縮された前記予測誤差を伸長する伸長ステップと、
前記伸長ステップにより伸長された前記予測誤差と、前記第1の予測値とを加算して第2の予測値を生成する加算ステップと、
少なくとも、前記第2の予測値と、前記入力画素が含まれるラインに対して符号化順で1つ前のラインの、前記入力画素に近接する画素に対応する第3の予測値と、前記入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とを記憶部に記憶する記憶ステップと、
前記第2の予測値と、前記第3の予測値と、前記第4の予測値とのうち少なくとも2の予測値に基づき求めた前記第1の予測値を出力する予測値出力ステップと
を有し、
前記予測値出力ステップは、
予め定められた制御信号を受信した場合に、前記第2の予測値と前記第4の予測値とに基づき前記第1の予測値を求め、前記制御信号を受信しない場合に、前記第2の予測値と、前記第3の予測値と、前記第4の予測値とに基づき前記第1の予測値を求める
ことを特徴とする符号化方法。
A prediction error acquisition step of acquiring a prediction error that is an error between the pixel value of the input pixel and the first prediction value obtained by predicting the pixel value;
A compression step of compressing the prediction error;
An expansion step of expanding the prediction error compressed by the compression step;
An addition step of adding the prediction error expanded by the expansion step and the first prediction value to generate a second prediction value;
At least a second predicted value, a third predicted value corresponding to a pixel adjacent to the input pixel in a line preceding the line including the input pixel in coding order, and the input A storage step of storing, in the storage unit, a fourth predicted value corresponding to the pixel immediately preceding the pixel in the encoding order;
A predicted value output step of outputting the first predicted value obtained based on at least two predicted values of the second predicted value, the third predicted value, and the fourth predicted value; And
The predicted value output step includes:
When the predetermined control signal is received, the first predicted value is obtained based on the second predicted value and the fourth predicted value, and when the control signal is not received, the second predicted value is obtained. An encoding method, wherein the first predicted value is obtained based on a predicted value, the third predicted value, and the fourth predicted value.
入力画素の画素値と、前記画素値を予測した第1の予測値との誤差である予測誤差を圧縮符号化した出力を伸長し、伸長した前記予測誤差と、前記第1の予測値とを加算して第2の予測値を生成し、所定の制御信号が受信されない場合に前記第2の予測値と、前記入力画素が含まれるラインに対して符号化順で1つ前のラインの、前記入力画素に近接する画素に対応する第3の予測値と、前記入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とに基づき前記第1の予測値を求め、前記所定の制御信号が受信された場合に前記第2の予測値と前記第4の予測値とに基づき前記第1の予測値を求め、前記予測誤差を圧縮符号化した圧縮予測誤差に対して復号処理を行う復号装置であって、
前記圧縮予測誤差を伸長する伸長部と、
前記伸長部で伸長された前記圧縮予測誤差に対して復号予測値を加算して第1の復号画素として出力する加算部と、
前記第1の復号画素と、前記第1の復号画素が含まれるラインに対して復号順で1つ前のラインの、前記第1の復号画素に近接する第2の復号画素と、前記第1の復号画素に対して復号順で1つ前の第3の復号画素とのうち少なくとも2の復号画素に基づき求めた前記復号予測値を出力する予測値出力部と
を有し、
前記予測値出力部は、
予め定められた制御信号を受信した場合に、前記第1の復号画素と前記第3の復号画素とに基づき前記復号予測値を求め、前記制御信号を受信しない場合に、前記第1の復号画素と、前記第2の復号画素と、前記第3の復号画素とに基づき前記復号予測値を求める
ことを特徴とする復号装置。
An output obtained by compressing and encoding a prediction error that is an error between a pixel value of an input pixel and a first prediction value obtained by predicting the pixel value is expanded, and the expanded prediction error and the first prediction value are obtained. The second predicted value is added to generate a second predicted value, and when the predetermined control signal is not received, the second predicted value and the line previous to the line including the input pixel in the coding order, Based on a third prediction value corresponding to a pixel close to the input pixel and a fourth prediction value corresponding to the pixel immediately before in the coding order with respect to the input pixel, the first prediction value is calculated. When the predetermined control signal is received, the first prediction value is obtained based on the second prediction value and the fourth prediction value, and the prediction error is compressed and encoded. A decoding device that performs a decoding process on the device,
A decompression unit for decompressing the compression prediction error;
An addition unit that adds a decoded prediction value to the compressed prediction error expanded by the expansion unit and outputs the result as a first decoded pixel;
The first decoded pixel; a second decoded pixel adjacent to the first decoded pixel in a line preceding the line including the first decoded pixel in decoding order; and the first A predicted value output unit that outputs the decoded predicted value obtained based on at least two decoded pixels of the first decoded pixel in decoding order with respect to the decoded pixels of
The predicted value output unit
When a predetermined control signal is received, the decoded prediction value is obtained based on the first decoded pixel and the third decoded pixel, and when the control signal is not received, the first decoded pixel And the decoding prediction value based on the second decoding pixel and the third decoding pixel.
前記記憶部は、
前記第1の復号画素が含まれるラインに対して復号順で1つ前のラインの、前記第1の復号画素に近接する複数の前記第2の復号画素を記憶し、
前記予測値出力部は、
前記制御信号を受信しない場合に、前記第1の復号画素と、複数の前記第2の復号画素と、前記第3の復号画素とに基づき前記復号予測値を求める
ことを特徴とする請求項5に記載の復号装置。
The storage unit
Storing a plurality of the second decoded pixels adjacent to the first decoded pixel in the line preceding by one in decoding order with respect to the line including the first decoded pixel;
The predicted value output unit
6. The decoded prediction value is obtained based on the first decoded pixel, the plurality of second decoded pixels, and the third decoded pixel when the control signal is not received. The decoding device according to 1.
前記圧縮予測誤差と、前記第1の復号画素とのうち一方を選択して復号出力として出力する選択部をさらに有し、
前記選択部は、ラインを所定数の画素数に分割した各ブロックの先頭に対応する位置で、前記圧縮予測誤差を選択する
ことを特徴とする請求項5または請求項6に記載の復号装置。
A selection unit that selects one of the compressed prediction error and the first decoded pixel and outputs it as a decoded output;
The decoding device according to claim 5 or 6, wherein the selection unit selects the compression prediction error at a position corresponding to a head of each block obtained by dividing a line into a predetermined number of pixels.
入力画素の画素値と、前記画素値を予測した第1の予測値との誤差である予測誤差を圧縮符号化した出力を伸長し、伸長した前記予測誤差と、前記第1の予測値とを加算して第2の予測値を生成し、所定の制御信号が受信されない場合に前記第2の予測値と、前記入力画素が含まれるラインに対して符号化順で1つ前のラインの、前記入力画素に近接する画素に対応する第3の予測値と、前記入力画素に対して符号化順で1つ前の画素に対応する第4の予測値とに基づき前記第1の予測値を求め、前記所定の制御信号が受信された場合に前記第2の予測値と前記第4の予測値とに基づき前記第1の予測値を求め、前記予測誤差を圧縮符号化した圧縮予測誤差に対して復号処理を行う復号方法であって、
前記圧縮予測誤差を伸長する伸長ステップと、
前記伸長ステップにより伸長された前記圧縮予測誤差に対して復号予測値を加算して第1の復号画素として出力する加算ステップと、
前記第1の復号画素と、前記第1の復号画素が含まれるラインに対して復号順で1つ前のラインの、前記第1の復号画素に近接する第2の復号画素と、前記第1の復号画素に対して復号順で1つ前の第3の復号画素とのうち少なくとも2の復号画素に基づき求めた前記復号予測値を出力する予測値出力ステップと
を有し、
前記予測値出力ステップは、
予め定められた制御信号を受信した場合に、前記第1の復号画素と前記第3の復号画素とに基づき前記復号予測値を求め、前記制御信号を受信しない場合に、前記第1の復号画素と、前記第2の復号画素と、前記第3の復号画素とに基づき前記復号予測値を求める
ことを特徴とする復号方法。
An output obtained by compressing and encoding a prediction error that is an error between a pixel value of an input pixel and a first prediction value obtained by predicting the pixel value is expanded, and the expanded prediction error and the first prediction value are obtained. The second predicted value is added to generate a second predicted value, and when the predetermined control signal is not received, the second predicted value and the line previous to the line including the input pixel in the coding order, Based on a third prediction value corresponding to a pixel close to the input pixel and a fourth prediction value corresponding to the pixel immediately before in the coding order with respect to the input pixel, the first prediction value is calculated. When the predetermined control signal is received, the first prediction value is obtained based on the second prediction value and the fourth prediction value, and the prediction error is compressed and encoded. A decoding method for performing a decoding process on
An expansion step of expanding the compression prediction error;
An addition step of adding a decoded prediction value to the compressed prediction error expanded by the expansion step and outputting as a first decoded pixel;
The first decoded pixel; a second decoded pixel adjacent to the first decoded pixel in a line preceding the line including the first decoded pixel in decoding order; and the first A predicted value output step of outputting the decoded predicted value obtained based on at least two decoded pixels of the first decoded pixel in decoding order with respect to the decoded pixels of
The predicted value output step includes:
When a predetermined control signal is received, the decoded prediction value is obtained based on the first decoded pixel and the third decoded pixel, and when the control signal is not received, the first decoded pixel And the decoding prediction value is obtained based on the second decoding pixel and the third decoding pixel.
JP2012089654A 2012-04-10 2012-04-10 Encoder and encoding method, and decoder and decoding method Pending JP2013219611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012089654A JP2013219611A (en) 2012-04-10 2012-04-10 Encoder and encoding method, and decoder and decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012089654A JP2013219611A (en) 2012-04-10 2012-04-10 Encoder and encoding method, and decoder and decoding method

Publications (1)

Publication Number Publication Date
JP2013219611A true JP2013219611A (en) 2013-10-24

Family

ID=49591246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012089654A Pending JP2013219611A (en) 2012-04-10 2012-04-10 Encoder and encoding method, and decoder and decoding method

Country Status (1)

Country Link
JP (1) JP2013219611A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015159519A (en) * 2014-02-25 2015-09-03 株式会社Jvcケンウッド Coding device, coding method and coding program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015159519A (en) * 2014-02-25 2015-09-03 株式会社Jvcケンウッド Coding device, coding method and coding program

Similar Documents

Publication Publication Date Title
CN1968418B (en) System and method for image data processing using hybrid type
EP1775961B1 (en) Video decoding device and method for motion compensation with sequential transfer of reference pictures
US8908982B2 (en) Image encoding device and image encoding method
US10026146B2 (en) Image processing device including a progress notifier which outputs a progress signal
JPWO2009063554A1 (en) Encoding device and decoding device
US5751888A (en) Moving picture signal decoder
US9723308B2 (en) Image processing apparatus and image processing method
JP2010098352A (en) Image information encoder
CN113228664A (en) Method, device, computer program and computer readable medium for scalable image coding
US10230982B2 (en) Image encoding apparatus and method, and image decoding apparatus and method
CN113228665A (en) Method, device, computer program and computer-readable medium for processing configuration data
JPH10136381A (en) Moving image encoding/decoding device and method therefor
JP6221820B2 (en) Encoding apparatus, encoding method, and encoding program
JP2013219611A (en) Encoder and encoding method, and decoder and decoding method
JP2017060004A (en) Encoding device, decoding device, encoding program, decoding program, and streaming system
CN106954073B (en) Video data input and output method, device and system
JP5891907B2 (en) Encoding apparatus and encoding method, and decoding apparatus and decoding method
CN114339249B (en) Video decoding method, readable medium and electronic device thereof
JP2014187473A (en) Image compression device and image processing system
JP2011259345A (en) Encoding device
JPH1023415A (en) Method and device for encoding and decoding picture
KR101336820B1 (en) Apparatus and method for decoding specialized multi-channel trick mode
JPH08130741A (en) Picture decoder
JP2019176500A (en) Encoding device, encoding program and streaming system
JP2012004898A (en) Storage device, encoding device, encoding method, and program