JP2003037737A - Image processor - Google Patents

Image processor

Info

Publication number
JP2003037737A
JP2003037737A JP2001220915A JP2001220915A JP2003037737A JP 2003037737 A JP2003037737 A JP 2003037737A JP 2001220915 A JP2001220915 A JP 2001220915A JP 2001220915 A JP2001220915 A JP 2001220915A JP 2003037737 A JP2003037737 A JP 2003037737A
Authority
JP
Japan
Prior art keywords
block
boundary
pixel
processing
flat
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
JP2001220915A
Other languages
Japanese (ja)
Inventor
Masao Kitagawa
昌生 北川
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2001220915A priority Critical patent/JP2003037737A/en
Publication of JP2003037737A publication Critical patent/JP2003037737A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processor that can reduce adverse effects on a mosquito distortion reduction filter given on a block border. SOLUTION: The image processor uses an in-block filter application discriminating means 6 and an in-block flat portion detection means 7, to respectively obtain an in-block filter application flag and an in-block flat portion pattern and allows an in-block pixel filter means 10, so as to recognize a block conducted by in-block filter processing and block border flat pixels, whose values are possibly fluctuated by the filter processing. The image processor uses an inter-pixel difference coding calculation means 4 to obtain a code of a difference between the block border flat portion pixels and pixels adjacent to the block border flat portion pixels, so as to inspect in advance, whether or not the block border pixels by the in-block filter processing can take pixel values for increasing the inter-pixel difference at the block border more than that of the original image, thereby deciding the processing applied to the border pixels.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は画像処理装置に関
し、さらに詳しくは、ブロック単位で量子化することに
よって圧縮符号化した画像データを再生した場合に生じ
る歪みを低減する画像処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that reduces distortion caused when reproducing compression-coded image data by quantizing in block units.

【0002】[0002]

【従来の技術】ブロック単位で符号・復号化された画像
データでは、符号化時の量子化誤差により復号化時にブ
ロック内のエッジ周辺の平坦箇所に特有の歪みが発生す
ることが知られている。この歪みはモスキート歪みと呼
ばれ、符号化時の量子化の単位である各ブロックの構成
画素にて発生する。モスキート歪みを軽減する方法とし
ては、符号化ブロック単位でモスキート歪みの生じ易い
エッジ周辺の平坦箇所が存在するかどうかを検査し、当
該検査結果に基づいて同ブロック内の平坦画素にフィル
タリングを施す手法が一般的である。
2. Description of the Related Art It is known that, in image data coded / decoded in block units, a distortion unique to a flat portion around an edge in a block occurs during decoding due to a quantization error in coding. . This distortion is called mosquito distortion, and occurs in the constituent pixels of each block, which is the unit of quantization during encoding. As a method of reducing mosquito distortion, a method of inspecting whether or not there is a flat portion around an edge where mosquito distortion is likely to occur in each coding block and filtering the flat pixels in the block based on the inspection result Is common.

【0003】[0003]

【発明が解決しようとする課題】上述の方法では、符号
化ブロック単位でフィルタ処理を実施する。したがって
図12に示すように、画素値の起伏がない場合には、フ
ィルタ対象ブロック(N−1)と隣接ブロック(N)と
の境界における画素値の差が原画像に比べて大きくな
り、ブロック境界に歪みを与えてしまう。この歪みを軽
減するためにはモスキート歪み軽減フィルタ後のブロッ
ク画像データについて再度検査してブロック境界周辺画
素について歪みの検出を行わねばならず、処理時間の増
加と回路規模の増大を招く。
In the above method, the filtering process is performed in units of coding blocks. Therefore, as shown in FIG. 12, when there is no undulation of pixel values, the difference in pixel value at the boundary between the filter target block (N-1) and the adjacent block (N) becomes larger than that of the original image, and the block It distorts the boundaries. In order to reduce this distortion, the block image data after the mosquito distortion reduction filter must be inspected again to detect the distortion in the pixels around the block boundary, resulting in an increase in processing time and an increase in circuit scale.

【0004】この発明は上記のような問題を解決するた
めになされたものであり、その目的は、モスキート歪み
軽減フィルタのブロック境界へ与える悪影響を軽減する
ことができる画像処理装置を提供することである。
The present invention has been made to solve the above problems, and an object of the present invention is to provide an image processing apparatus capable of reducing an adverse effect on a block boundary of a mosquito distortion reduction filter. is there.

【0005】[0005]

【課題を解決するための手段】この発明の1つの局面に
従うと、画像処理装置は、入力画像メモリと、画素間差
分符号算出手段と、ブロック内フィルタ適用判定手段
と、ブロック内平坦箇所検出手段と、ブロック内画素フ
ィルタ手段と、ブロック内フィルタ情報保持手段と、処
理後ブロック画像データ保持手段と、境界画素判定手段
と、境界画素処理手段と、画像出力手段とを備える。
According to one aspect of the present invention, an image processing apparatus includes an input image memory, an inter-pixel difference code calculating means, an intra-block filter application determining means, and an intra-block flat portion detecting means. An in-block pixel filter means, an in-block filter information holding means, a processed block image data holding means, a boundary pixel determination means, a boundary pixel processing means, and an image output means.

【0006】入力画像メモリは、原画像を保持する。画
素間差分符号算出手段は、入力画像メモリより得られる
原画像データの画素間差分の符号を算出する。ブロック
内フィルタ適用判定手段は、入力画像メモリより得られ
る処理対象ブロック内の画像データにおけるエッジ箇所
と平坦箇所の検出を行うことで処理対象ブロックへのブ
ロック内フィルタ処理適用の可否判定を行う。ブロック
内平坦箇所検出手段は、入力画像メモリより得られる処
理対象ブロック内の画像データの平坦箇所を検出する。
ブロック内画素フィルタ手段は、ブロック内フィルタ適
用判定手段により処理対象ブロックに対してブロック内
フィルタの適用が判定された場合に、ブロック内平坦箇
所検出手段により検出されたブロック内平坦箇所情報に
基づき、処理対象ブロック内の画像データの平坦箇所に
対してフィルタ処理を実施する。ブロック内フィルタ情
報保持手段は、画素間差分符号算出手段にて得られた画
素間差分符号とブロック内フィルタ適用判定手段にて得
られたブロック内フィルタ処理適用の可否判定結果とブ
ロック内平坦箇所検出手段にて得られたブロック内平坦
箇所情報とを保持する。処理後ブロック画像データ保持
手段は、ブロック内画素フィルタ手段にて得られた処理
後のブロック画像データを保持する。境界画素判定手段
は、画素間差分符号算出手段により得られる処理対象ブ
ロックの画素間差分符号とブロック内フィルタ適用判定
手段により得られる処理対象ブロックのブロック内フィ
ルタ処理適用の可否判定結果とブロック内平坦箇所検出
手段により得られる処理対象ブロックのブロック内平坦
箇所情報とブロック内フィルタ情報保持手段により保持
されているブロック内フィルタ情報のうち隣接ブロック
に関する画素間差分符号と隣接ブロックに関するブロッ
ク内フィルタ処理適用の可否判定結果と、隣接ブロック
に関するブロック内平坦箇所情報とに基づいて処理対象
ブロックと隣接ブロックのブロック境界画素の状態を検
査し、ブロック境界画素に対する処理を決定する。境界
画素処理手段は、境界画素判定手段により得られる境界
画素判定結果に基づき、ブロック境界画素に処理を施
す。画像出力手段は、ブロック内画素フィルタ手段と境
界画素処理手段と入力画像メモリからの画像データを映
像信号として出力する。
The input image memory holds the original image. The inter-pixel difference code calculation means calculates the code of the inter-pixel difference of the original image data obtained from the input image memory. The in-block filter application determining means determines whether or not the in-block filter processing can be applied to the processing target block by detecting an edge location and a flat location in the image data in the processing target block obtained from the input image memory. The in-block flat portion detecting means detects a flat portion of the image data in the processing target block obtained from the input image memory.
The in-block pixel filter means, when the in-block filter application determining means determines that the in-block filter is applied to the processing target block, based on the in-block flat portion information detected by the in-block flat portion detecting means, Filter processing is performed on flat portions of the image data in the processing target block. The in-block filter information holding means detects the inter-pixel difference code obtained by the inter-pixel difference code calculating means, the in-block filter processing applicability determination result obtained by the in-block filter application determining means, and the in-block flat portion detection. The in-block flat portion information obtained by the means is held. The processed block image data holding unit holds the processed block image data obtained by the in-block pixel filter unit. The boundary pixel determining means determines the inter-pixel difference code of the processing target block obtained by the inter-pixel difference code calculating means, the in-block filter processing applicability determination result of the processing target block obtained by the in-block filter application determining means, and the in-block flatness. Of the intra-block flat portion information of the processing target block obtained by the location detection means and the intra-block filter information held by the intra-block filter information holding means, the inter-pixel differential code regarding the adjacent block and the intra-block filtering processing regarding the adjacent block are applied. The state of the block boundary pixels of the block to be processed and the adjacent block is inspected based on the result of the feasibility judgment and the in-block flat portion information about the adjacent block, and the process for the block boundary pixel is determined. The boundary pixel processing means processes the block boundary pixels based on the boundary pixel determination result obtained by the boundary pixel determination means. The image output means outputs the image data from the in-block pixel filter means, the boundary pixel processing means, and the input image memory as a video signal.

【0007】好ましくは、上記画素間差分符号算出手段
は、処理対象ブロックのブロック境界近傍の画素間差分
符号と、隣接ブロックのブロック境界近傍の画素間差分
符号と、処理対象ブロックと隣接ブロックのブロック境
界画素の境界画素間差分符号とを算出する。
[0007] Preferably, the inter-pixel difference code calculation means is an inter-pixel difference code near the block boundary of the processing target block, an inter-pixel difference code near the block boundary of the adjacent block, and a block between the processing target block and the adjacent block. The boundary pixel difference code between the boundary pixels is calculated.

【0008】好ましくは、上記境界画素判定手段は、処
理対象ブロックおよび隣接ブロックの両方またはどちら
か一方のブロック内フィルタ処理適用の可否判定結果が
有効である場合、ブロック内フィルタ処理適用の可否判
定結果が有効であるブロックのブロック内平坦箇所情報
を参照し、ブロック内平坦箇所にブロック境界画素が含
まれていれば、そのブロックのブロック境界近傍の画素
間差分符号およびそのブロックに隣接するブロックのブ
ロック境界画素との境界画素間差分符号からブロック内
フィルタ処理実施後のブロック境界画素が原画像に比べ
ブロック境界の画素間差分を大きくするような画素値を
取り得るかどうかを予め検査し、当該検査結果に基づき
ブロック境界画素について境界処理の実施を決定する。
Preferably, the boundary pixel determining means determines whether the intra-block filter processing is applicable when the intra-block filter processing application availability determination result of both or one of the target block and the adjacent block is valid. Refer to the in-block flat point information of the block for which is valid, and if the block flat point includes the block boundary pixel, the inter-pixel difference code near the block boundary of the block and the block of the block adjacent to the block It is preliminarily inspected from the difference code between the boundary pixels and the boundary pixel whether or not the block boundary pixel after the intra-block filter processing can take a pixel value that makes the difference between the pixels in the block boundary larger than the original image, and the inspection concerned. Based on the result, it is decided to perform the boundary processing on the block boundary pixel.

【0009】上記画像処理装置においては、処理対象ブ
ロックと隣接ブロックのブロック内フィルタ処理適用の
可否判定結果をブロック内フィルタ適用判定手段および
ブロック内フィルタ情報保持手段により得ることでブロ
ック内画素フィルタ手段においてブロック内フィルタ処
理が行われるブロックを認識し、処理対象ブロックと隣
接ブロックのブロック内平坦箇所情報をブロック内平坦
箇所検出手段およびブロック内フィルタ情報保持手段に
より得ることでブロック内フィルタ処理において画素値
の変動する可能性のあるブロック境界平坦画素を認識
し、ブロック境界平坦画素とそれに隣接する画素につい
ての画素間の差分の符号を画素間差分符号算出手段より
得ることでブロック内フィルタ処理によりブロックの境
界画素が原画像に比べブロック境界の画素間差分を大き
くするような画素値を取り得るかどうかを予め検査する
こと可能にするという作用を有する。
In the image processing apparatus, the in-block pixel filter means obtains the in-block filter processing applicability determination result of the block to be processed and the adjacent block by the in-block filter application determination means and the in-block filter information holding means. By recognizing the block to be subjected to the in-block filter processing, and obtaining the in-block flat portion information of the processing target block and the adjacent block by the in-block flat portion detection means and the in-block filter information holding means, By recognizing a block boundary flat pixel that may fluctuate and obtaining the sign of the pixel difference between the block boundary flat pixel and its adjacent pixel from the inter-pixel difference code calculation means, the block boundary is processed by the intra-block filter processing. Pixels compared to the original image An effect that makes it possible to check whether possible pixel values so as to increase the inter-pixel difference of the block boundary in advance.

【0010】好ましくは、上記境界画素判定手段は、処
理対象ブロックおよび隣接ブロックの両方またはどちら
か一方のブロック内フィルタ処理適用の可否判定結果が
有効である場合、ブロック内フィルタ処理適用の可否判
定結果が有効であるブロックのブロック内平坦箇所情報
を参照し、ブロック内平坦箇所にブロック境界画素が含
まれていれば、そのブロックのブロック境界近傍の画素
間差分符号およびそのブロックに隣接するブロックのブ
ロック境界画素との境界画素間差分符号からブロック内
フィルタ処理実施後のブロック境界画素が原画像に比べ
ブロック境界の画素間差分を大きくするような画素値を
取り得る画素数を数え、その画素数が所定の個数を超え
る場合にブロック境界画素について境界処理の実施を決
定する。
Preferably, the boundary pixel determining means determines whether the intra-block filter processing is applicable if the intra-block filter processing application availability determination result of both or one of the target block and the adjacent block is valid. Refer to the in-block flat point information of the block for which is valid, and if the block flat point includes the block boundary pixel, the inter-pixel difference code near the block boundary of the block and the block of the block adjacent to the block From the difference code between the boundary pixels and the boundary pixel, the number of pixels that can take a pixel value that makes the block boundary pixel after the intra-block filter processing larger the pixel difference of the block boundary than the original image is counted, and the number of pixels is When the number exceeds the predetermined number, it is decided to perform the boundary processing on the block boundary pixels.

【0011】上記画像処理装置においては、処理対象ブ
ロックと隣接ブロックのブロック内フィルタ処理適用の
可否判定結果をブロック内フィルタ適用判定手段および
ブロック内フィルタ情報保持手段により得ることでブロ
ック内画素フィルタ手段においてフィルタ処理が行われ
るブロックを認識し、処理対象ブロックと隣接ブロック
のブロック内平坦箇所情報をブロック内平坦箇所検出手
段およびブロック内フィルタ情報保持手段により得るこ
とでブロック内フィルタ処理において画素値の変動する
可能性のあるブロック境界平坦画素を認識し、ブロック
境界平坦画素とそれに隣接する画素についての画素間の
差分の符号を画素間差分符号算出手段より得ることでブ
ロック内フィルタ処理によりブロックの境界画素が原画
像に比べブロック境界の画素間差分を大きくするような
画素値を取り得る画素数を数え、その画素数が所定の個
数を超えるかどうかを予め検査することを可能とし、そ
の画素数が所定の個数を超える場合にブロック内フィル
タ処理によりブロックの境界画素が原画像に比べブロッ
ク境界の画素間差分を大きくするような画素値を取り得
るブロック境界画素について境界処理の実施を決定する
ことを可能にするという作用を有する。
In the above image processing apparatus, the in-block pixel filter means obtains the in-block filter processing applicability determination result of the block to be processed and the adjacent block by the in-block filter application determination means and the in-block filter information holding means. By recognizing the block to be subjected to the filter processing, and obtaining the in-block flat portion information of the processing target block and the adjacent block by the in-block flat portion detecting means and the in-block filter information holding means, the pixel value changes in the in-block filter processing. By recognizing a possible block boundary flat pixel and obtaining the sign of the difference between the pixel of the block boundary flat pixel and the pixel adjacent thereto from the inter-pixel difference code calculation means, the block boundary pixel is determined by the intra-block filter processing. Block compared to the original image When it is possible to count the number of pixels that can take a pixel value that increases the difference between the pixels of the field and check in advance whether the number of pixels exceeds a predetermined number, and when the number of pixels exceeds the predetermined number In addition, it is possible to determine the execution of the boundary processing for the block boundary pixels that can take pixel values such that the boundary pixels of the block have a larger pixel difference at the block boundary than the original image by the intra-block filter processing. Have.

【0012】好ましくは、上記境界画素判定手段は、処
理対象ブロックおよび隣接ブロックの両方またはどちら
か一方のブロック内フィルタ処理適用の可否判定結果が
有効である場合、ブロック内フィルタ処理適用の可否判
定結果が有効であるブロックのブロック内平坦箇所情報
を参照し、ブロック内平坦箇所にブロック境界画素が含
まれており、かつブロック境界画素の周辺画素が所定の
個数以上連続して平坦であれば、そのブロックのブロッ
ク境界近傍の画素間差分符号およびそのブロックに隣接
するブロックのブロック境界画素との境界画素間差分符
号からブロック内フィルタ処理実施後のブロック境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取り得るかどうかを予め検査し、当該
検査結果に基づきブロック境界画素について境界処理の
実施を決定する。
Preferably, the boundary pixel determining means determines whether the intra-block filter processing is applicable when the intra-block filter processing application availability determination result of both or one of the target block and the adjacent block is valid. Refer to the in-block flat portion information of the block in which is valid, if the block flat pixel includes the block boundary pixel, and if the peripheral pixels of the block boundary pixel are continuously flat by a predetermined number or more, the From the difference code between pixels near the block boundary of the block and the difference code between boundary pixels with the block boundary pixel of the block adjacent to the block, the block boundary pixel after the intra-block filter processing is compared with the original image. It is inspected in advance whether a pixel value that can increase the Lock boundary pixels to determine the implementation of the boundary processing.

【0013】上記画像処理装置においては、処理対象ブ
ロックと隣接ブロックのブロック内フィルタ処理適用の
可否判定結果をブロック内フィルタ適用判定手段および
ブロック内フィルタ情報保持手段により得ることでブロ
ック内画素フィルタ手段においてフィルタ処理が行われ
るブロックを認識し、処理対象ブロックと隣接ブロック
のブロック内平坦箇所情報をブロック内平坦箇所検出手
段およびブロック内フィルタ情報保持手段により得るこ
とでブロック内フィルタ処理において画素値の変動する
可能性のあるブロック境界平坦画素を認識し、同ブロッ
ク内のブロック境界平坦画素の周辺画素が平坦であるか
どうかを認識し、ブロック境界画素の周辺画素が平坦で
ある場合に、ブロック境界平坦画素とそれに隣接する画
素についての画素間の差分の符号を画素間差分符号算出
手段より得ることでブロック内フィルタ処理によりブロ
ックの平坦箇所に含まれる境界画素が原画像に比べブロ
ック境界の画素間差分を大きくするような画素値を取り
得るかどうかを予め検査することを可能にするという作
用を有する。
In the above image processing apparatus, the in-block pixel filter means obtains the in-block filter processing applicability determination results of the block to be processed and the adjacent block by the in-block filter application determination means and the in-block filter information holding means. By recognizing the block to be filtered, and obtaining the in-block flat portion information of the target block and the adjacent block by the in-block flat portion detecting means and the in-block filter information holding means, the pixel value changes in the in-block filter processing. Recognize possible block boundary flat pixels, recognize whether the peripheral pixels of the block boundary flat pixels in the same block are flat, and if the peripheral pixels of the block boundary pixels are flat, the block boundary flat pixels And the pixel about the pixel adjacent to it By obtaining the code of the difference between the pixels from the inter-pixel difference code calculating means, the pixel value of the boundary pixel included in the flat part of the block can be taken to be larger than the original image by the intra-block filtering process. It has an effect of enabling to inspect whether or not in advance.

【0014】好ましくは、上記境界画素判定手段は、処
理対象ブロックおよび隣接ブロックの両方またはどちら
か一方のブロック内フィルタ処理適用の可否判定結果が
有効である場合、ブロック内フィルタ処理適用の可否判
定結果が有効であるブロックのブロック内平坦箇所情報
を参照し、ブロック内平坦箇所にブロック境界画素が含
まれており、かつブロック境界画素の周辺画素が所定の
個数以上連続して平坦であれば、そのブロックのブロッ
ク境界近傍の画素間差分符号およびそのブロックに隣接
するブロックのブロック境界画素との境界画素間差分符
号からブロック内フィルタ処理実施後のブロック境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取り得る画素数を数え、その画素数が
所定の個数を超える場合にブロック境界画素について境
界処理の実施を決定する。
Preferably, the boundary pixel determining means determines whether the in-block filter processing is applicable if the in-block filter processing application availability determination result of both or one of the target block and the adjacent block is valid. Refer to the in-block flat portion information of the block in which is valid, if the block flat pixel includes the block boundary pixel, and the peripheral pixels of the block boundary pixel are continuously flat by a predetermined number or more, the From the difference code between pixels near the block boundary of the block and the difference code between boundary pixels with the block boundary pixel of the block adjacent to the block, the block boundary pixel after the intra-block filter processing is compared with the original image. The number of pixels that can take a pixel value that increases The block boundary pixels to determine the implementation of the boundary processing in the case.

【0015】上記画像処理装置においては、処理対象ブ
ロックと隣接ブロックのブロック内フィルタ処理適用の
可否判定結果をブロック内フィルタ適用判定手段および
ブロック内フィルタ情報保持手段により得ることでブロ
ック内画素フィルタ手段においてフィルタ処理が行われ
るブロックを認識し、処理対象ブロックと隣接ブロック
のブロック内平坦箇所情報をブロック内平坦箇所検出手
段およびブロック内フィルタ情報保持手段により得るこ
とでブロック内フィルタ処理において画素値の変動する
可能性のあるブロック境界平坦画素を認識し、同ブロッ
ク内のブロック境界画素の周辺画素が平坦であるかどう
かを認識し、ブロック境界平坦画素の周辺画素が平坦で
ある場合に、ブロック境界平坦画素とそれに隣接する画
素についての画素間の差分の符号を画素間差分符号算出
手段より得ることでブロック内フィルタ処理によりブロ
ックの平坦箇所に含まれる境界画素が原画像に比べブロ
ック境界の画素間差分を大きくするような画素値を取り
得る画素数を数え、その画素数が所定の個数を超えるか
どうかを予め検査することを可能とし、その画素数が所
定の個数を超える場合にブロック内フィルタ処理により
ブロックの境界画素が原画像に比べブロック境界の画素
間差分を大きくするような画素値を取り得るブロック境
界画素について境界処理の実施を決定することを可能に
するという作用を有する。
In the image processing apparatus, the in-block pixel filter means obtains the in-block filter processing applicability determination result of the block to be processed and the adjacent block by the in-block filter application determination means and the in-block filter information holding means. By recognizing the block to be subjected to the filter processing, and obtaining the in-block flat portion information of the processing target block and the adjacent block by the in-block flat portion detecting means and the in-block filter information holding means, the pixel value changes in the in-block filter processing. Recognizing possible block boundary flat pixels, recognizing whether the peripheral pixels of the block boundary pixels in the same block are flat, and if the peripheral pixels of the block boundary flat pixels are flat, the block boundary flat pixels And the pixel about the pixel adjacent to it By obtaining the code of the difference between the pixels from the inter-pixel difference code calculation means, the pixel value of the boundary pixel included in the flat part of the block by the intra-block filter processing can be larger than that of the original image. It is possible to count the number of pixels and check in advance whether or not the number of pixels exceeds a predetermined number.When the number of pixels exceeds a predetermined number, the boundary pixel of the block is compared with the original image by the intra-block filter processing. This has the effect of making it possible to determine the implementation of boundary processing for block boundary pixels that can take pixel values that increase the pixel difference between block boundaries.

【0016】好ましくは、上記境界画素処理手段は、境
界処理実施画素についてブロック内フィルタ処理画素の
代わりに原画像の境界画素を出力する。
Preferably, the boundary pixel processing means outputs the boundary pixel of the original image instead of the intra-block filter processing pixel for the boundary processing execution pixel.

【0017】上記画素処理装置においては、検査結果に
基づきブロック内フィルタ処理によりブロックの境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取るブロック境界画素についてブロッ
ク内フィルタ処理画素の代わりに原画像の境界画素を選
択することでブロック境界の画素間差分値が原画像に比
べ大きくならないようにすることを可能にするという作
用を有する。
In the above-mentioned pixel processing device, the intra-block filter is applied to the block boundary pixel having a pixel value that makes the inter-pixel difference of the block boundary larger than the original image by the intra-block filter processing based on the inspection result. By selecting the boundary pixel of the original image instead of the processed pixel, it is possible to prevent the inter-pixel difference value at the block boundary from becoming larger than that of the original image.

【0018】この発明のもう1つの局面に従うと、画像
処理装置は、入力画像メモリと、画素間差分符号算出手
段と、画素間差分値算出手段と、ブロック内フィルタ適
用判定手段と、ブロック内平坦箇所検出手段と、ブロッ
ク内画素フィルタ手段と、ブロック内フィルタ情報保持
手段と、処理後ブロック画像データ保持手段と、境界画
素判定手段と、境界画素処理手段と、画像出力手段とを
備える。
According to another aspect of the present invention, an image processing apparatus has an input image memory, an inter-pixel difference code calculating means, an inter-pixel difference value calculating means, an intra-block filter application determining means, and an intra-block flatness. The position detecting unit, the in-block pixel filtering unit, the in-block filter information holding unit, the processed block image data holding unit, the boundary pixel determining unit, the boundary pixel processing unit, and the image output unit are provided.

【0019】入力画像メモリは、原画像を保持する。画
素間差分符号算出手段は、入力画像メモリより得られる
原画像データの画素間差分の符号を算出する。画素間差
分値算出手段は、入力画像メモリより得られる原画像デ
ータの処理対象ブロックのブロック境界画素画素と隣接
ブロックのブロック境界画素の画素間差分値を算出す
る。ブロック内フィルタ適用判定手段は、入力画像メモ
リより得られる処理対象ブロック内の画像データにおけ
るエッジ箇所と平坦箇所の検出を行うことで処理対象ブ
ロックへのブロック内フィルタ処理適用の可否判定を行
う。ブロック内平坦箇所検出手段は、入力画像メモリよ
り得られる処理対象ブロック内の平坦箇所を検出する。
ブロック内画素フィルタ手段は、ブロック内フィルタ適
用判定手段により処理対象ブロックに対してブロック内
フィルタの適用が判定された場合に、ブロック内平坦箇
所検出手段により検出されたブロック内平坦箇所情報に
基づき、処理対象ブロックの平坦箇所に対してフィルタ
処理を実施する。ブロック内フィルタ情報保持手段は、
画素間差分符号算出手段にて得られた画素間差分符号と
ブロック内フィルタ適用判定手段にて得られたブロック
内フィルタ処理適用の可否判定結果とブロック内平坦箇
所検出手段にて得られたブロック内平坦箇所情報とを保
持する。処理後ブロック画像データ保持手段は、ブロッ
ク内画素フィルタ手段にて得られた処理後のブロック画
像データを保持する。境界画素判定手段は、画素間差分
符号算出手段により得られる処理対象ブロックの画素間
差分符号とブロック内フィルタ適用判定手段により得ら
れる処理対象ブロックのブロック内フィルタ処理適用の
可否判定結果とブロック内平坦箇所検出手段により得ら
れる処理対象ブロックのブロック内平坦箇所情報とブロ
ック内フィルタ情報保持手段により保持されているブロ
ックフィルタ情報のうち隣接ブロックに関する画素間差
分符号と隣接ブロックに関するブロック内フィルタ処理
適用の可否判定結果と隣接ブロックに関するブロック内
平坦箇所情報とに基づいて処理対象ブロックと隣接ブロ
ックのブロック境界画素の状態を検査し、ブロック境界
画素に対する処理を決定する。境界画素処理手段は、境
界画素判定手段により得られる境界画素判定結果に基づ
き、ブロック境界画素に処理を施す。画像出力手段は、
ブロック内画素フィルタ手段と境界画素処理手段と入力
画像メモリからの画像データを映像信号として出力す
る。
The input image memory holds the original image. The inter-pixel difference code calculation means calculates the code of the inter-pixel difference of the original image data obtained from the input image memory. The inter-pixel difference value calculation means calculates the inter-pixel difference value between the block boundary pixel pixel of the processing target block of the original image data obtained from the input image memory and the block boundary pixel of the adjacent block. The in-block filter application determining means determines whether or not the in-block filter processing can be applied to the processing target block by detecting an edge location and a flat location in the image data in the processing target block obtained from the input image memory. The in-block flat portion detecting means detects a flat portion in the processing target block obtained from the input image memory.
The in-block pixel filter means, when the in-block filter application determining means determines that the in-block filter is applied to the block to be processed, based on the in-block flat portion information detected by the in-block flat portion detecting means, Filter processing is performed on the flat part of the processing target block. The in-block filter information holding means is
The inter-pixel difference code obtained by the inter-pixel difference code calculation means, the in-block filter processing applicability determination result obtained by the in-block filter application determination means, and the block obtained by the in-block flat portion detection means The flat area information and are held. The processed block image data holding unit holds the processed block image data obtained by the in-block pixel filter unit. The boundary pixel determining means determines the inter-pixel difference code of the processing target block obtained by the inter-pixel difference code calculating means, the in-block filter processing applicability determination result of the processing target block obtained by the in-block filter application determining means, and the in-block flatness. The intra-block flat portion information of the block to be processed obtained by the location detection means and the block filter information held by the intra-block filter information holding means are applied to the inter-pixel differential code regarding the adjacent block and the intra-block filter processing regarding the adjacent block. The state of the block boundary pixels of the block to be processed and the adjacent block is inspected based on the result of the propriety determination and the in-block flat portion information about the adjacent block, and the process for the block boundary pixel is determined. The boundary pixel processing means processes the block boundary pixels based on the boundary pixel determination result obtained by the boundary pixel determination means. Image output means
The image data from the in-block pixel filter means, the boundary pixel processing means, and the input image memory is output as a video signal.

【0020】好ましくは、上記画素間差分符号算出手段
は、処理対象ブロックのブロック境界近傍の画素間差分
符号と、隣接ブロックのブロック境界近傍の画素間差分
符号と、処理対象ブロックと隣接ブロックのブロック境
界画素の境界画素間差分符号とを算出する。
Preferably, the inter-pixel difference code calculation means is an inter-pixel difference code near the block boundary of the processing target block, an inter-pixel difference code near the block boundary of the adjacent block, and a block between the processing target block and the adjacent block. The boundary pixel difference code between the boundary pixels is calculated.

【0021】好ましくは、上記境界画素判定手段は、処
理対象ブロックおよび隣接ブロックの両方またはどちら
か一方のブロック内フィルタ処理適用の可否判定結果が
有効である場合、ブロック内フィルタ処理適用の可否判
定結果が有効であるブロックのブロック内平坦箇所情報
を参照し、ブロック内平坦箇所にブロック境界画素が含
まれており、かつブロック境界画素を含み所定の個数以
上連続して平坦であり、かつ処理対象ブロックのブロッ
ク境界画素と隣接ブロックのブロック境界画素の画素差
分値が第1のしきい値以上かつ第2のしきい値以下であ
る場合に、そのブロックのブロック境界近傍の画素間差
分符号およびそのブロックに隣接するブロックのブロッ
ク境界画素との境界画素間差分符号からブロック内フィ
ルタ処理実施後のブロック境界画素が原画像に比べブロ
ック境界の画素間差分を大きくするような画素値を取り
得るかどうかを予め検査し、当該検査結果に基づきブロ
ック境界画素について境界処理の実施を決定する。
Preferably, the boundary pixel determining means determines whether the intra-block filter processing is applicable when the intra-block filter processing application availability determination result of both or one of the target block and the adjacent block is valid. Refer to the in-block flat portion information of the block in which is valid, the block flat pixel includes the block boundary pixel, and the block boundary pixel is continuously flat for a predetermined number or more, and the processing target block If the pixel difference value between the block boundary pixel of the block and the block boundary pixel of the adjacent block is greater than or equal to the first threshold value and less than or equal to the second threshold value, the inter-pixel difference code near the block boundary of the block and the block After performing the intra-block filter processing from the boundary pixel difference code between the block boundary pixel of the block adjacent to Lock boundary pixel if possible pixel values so as to increase the inter-pixel difference of the block boundary compared to the original image in advance inspection, to determine the implementation of the boundary processing for the block boundary pixels based on the inspection results.

【0022】上記画像処理装置においては、処理対象ブ
ロックと隣接ブロックのブロック内フィルタ処理適用の
可否判定結果をブロック内フィルタ適用判定手段および
ブロック内フィルタ情報保持手段により得ることでブロ
ック内画素フィルタ手段においてフィルタ処理が行われ
るブロックを認識し、処理対象ブロックと隣接ブロック
のブロック内平坦箇所情報をブロック内平坦箇所検出手
段およびブロック内フィルタ情報保持手段により得るこ
とでブロック内フィルタ処理において画素値の変動する
可能性のあるブロック境界平坦画素を認識し、同ブロッ
ク内のブロック境界平坦画素の周辺画素が平坦であるか
どうかを認識し、ブロック境界平坦画素の周辺画素が平
坦である場合に、ブロック境界平坦画素とそれに隣接す
る画素についての画素間の差分の符号を画素間差分符号
算出手段より得ることでブロック内フィルタ処理により
ブロックの平坦箇所に含まれる境界画素が原画像に比べ
ブロック境界の画素間差分を大きくするような画素値を
取り得るかどうかを予め検査すること可能とし、境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取り得る場合に、処理対象ブロックと
隣接ブロックのブロック境界画素の画素間差分値を画素
間差分値算出手段から得ることにより境界画素と当該境
界画素を含むブロックに隣接するブロックの境界画素と
の画素間差分値が第1のしきい値より大きく第2のしき
い値より小さいことを検査することを可能とし、画素間
差分値が第1のしきい値より大きく第2のしきい値より
小さい場合に、ブロック内フィルタ処理によりブロック
の境界画素が原画像に比べブロック境界の画素間差分を
大きくするような画素値を取り得るブロック境界画素に
ついて境界処理の実施を決定することを可能にするとい
う作用を有する。
In the above image processing apparatus, the in-block pixel filter means obtains the in-block filter processing applicability determination result of the block to be processed and the adjacent block by the in-block filter application determination means and the in-block filter information holding means. By recognizing the block to be subjected to the filter processing, and obtaining the in-block flat portion information of the processing target block and the adjacent block by the in-block flat portion detecting means and the in-block filter information holding means, the pixel value changes in the in-block filter processing. Recognize possible block boundary flat pixels, recognize whether the peripheral pixels of the block boundary flat pixels in the same block are flat, and if the peripheral pixels of the block boundary flat pixel are flat, block boundary flat About a pixel and its neighbors A pixel value that causes a boundary pixel included in a flat portion of a block to have a larger pixel difference at the block boundary than the original image by obtaining the code of the pixel difference from the pixel difference code calculation means by the intra-block filter processing It is possible to check in advance whether or not it is possible, and if the boundary pixel can take a pixel value that makes the difference between the pixels of the block boundary larger than the original image, the pixel of the block boundary pixel of the processing target block and the adjacent block By obtaining the inter-pixel difference value from the inter-pixel difference value calculating means, the inter-pixel difference value between the boundary pixel and the boundary pixel of the block adjacent to the block including the boundary pixel is larger than the first threshold value and the second threshold value. If the difference between pixels is larger than the first threshold value and smaller than the second threshold value, the intra-block filter can be checked. Boundary pixels of a block by physical has an effect that makes it possible to determine the implementation of the boundary processing for the block boundary pixels of possible pixel values so as to increase the inter-pixel difference of the block boundary compared to the original image.

【0023】好ましくは、上記境界画素判定手段は、処
理対象ブロックおよび隣接ブロックの両方またはどちら
か一方のブロック内フィルタ処理適用の可否判定結果が
有効である場合、ブロック内フィルタ処理適用の可否判
定結果が有効であるブロックのブロック内平坦箇所情報
を参照し、ブロック内平坦箇所にブロック境界画素が含
まれており、かつブロック境界画素の周辺画素が所定の
個数以上連続して平坦であり、かつ処理対象ブロックの
ブロック境界画素と隣接ブロックのブロック境界画素の
画素差分値が第1のしきい値以上かつ第2のしきい値以
下である場合に、そのブロックのブロック境界近傍の画
素間差分符号およびそのブロックに隣接するブロックの
ブロック境界画素との境界画素間差分符号からブロック
内フィルタ処理実施後のブロック境界画素が原画像に比
べブロック境界の画素間差分を大きくするような画素値
を取り得る画素数を数え、その画素数が所定の個数を超
える場合にブロック境界画素について境界処理の実施を
決定する。
Preferably, the boundary pixel determining means determines whether the intra-block filter processing is applicable when the intra-block filter processing application availability determination result of both or one of the target block and the adjacent block is valid. Refer to the in-block flat portion information of the block for which the block is valid, the block flat pixel includes the block boundary pixel, and the peripheral pixels of the block boundary pixel are continuously flat by a predetermined number or more, and the processing is performed. When the pixel difference value between the block boundary pixel of the target block and the block boundary pixel of the adjacent block is greater than or equal to the first threshold value and less than or equal to the second threshold value, an inter-pixel difference code near the block boundary of the block and The intra-block filter processing is performed based on the difference code between the boundary pixels with the block boundary pixel of the block adjacent to the block. Counts the number of pixels that can take pixel values so that the subsequent block boundary pixels can increase the difference between pixels at the block boundary compared to the original image, and if the number of pixels exceeds a predetermined number, perform boundary processing on the block boundary pixels. To decide.

【0024】上記画像処理装置においては、処理対象ブ
ロックと隣接ブロックのブロック内フィルタ処理適用の
可否判定結果をブロック内フィルタ適用判定手段および
ブロック内フィルタ情報保持手段により得ることでブロ
ック内画素フィルタ手段においてフィルタ処理が行われ
るブロックを認識し、処理対象ブロックと隣接ブロック
のブロック内平坦箇所情報をブロック内平坦箇所検出手
段およびブロック内フィルタ情報保持手段により得るこ
とでブロック内フィルタ処理において画素値の変動する
可能性のあるブロック境界平坦画素を認識し、同ブロッ
ク内のブロック境界平坦画素の周辺画素が平坦であるか
どうかを認識し、ブロック境界平坦画素の周辺画素が平
坦である場合に、ブロック境界平坦画素とそれに隣接す
る画素についての画素間の差分の符号を画素間差分符号
算出手段より得ることでブロック内フィルタ処理により
ブロックの平坦箇所に含まれる境界画素が原画像に比べ
ブロック境界の画素間差分を大きくするような画素値を
取り得るかどうかを予め検査すること可能とし、境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取り得る場合に、処理対象ブロックと
隣接ブロックのブロック境界画素の画素間差分値を画素
間差分値算出手段から得ることにより境界画素と当該境
界画素を含むブロックに隣接するブロックの境界画素と
の画素間差分値が第1のしきい値より大きく第2のしき
い値より小さいブロック境界画素の画素数を数え、その
画素数が所定の個数を超えるかどうかを予め検査するこ
とを可能とし、その画素数が所定の個数を超える場合に
ブロック境界画素について境界処理の実施を決定するこ
とを可能にするという作用を有する。
In the above image processing apparatus, the in-block pixel filter means obtains the in-block filter processing applicability determination result of the block to be processed and the adjacent block by the in-block filter application determination means and the in-block filter information holding means. By recognizing the block to be subjected to the filter processing, and obtaining the in-block flat portion information of the processing target block and the adjacent block by the in-block flat portion detecting means and the in-block filter information holding means, the pixel value changes in the in-block filter processing. Recognize possible block boundary flat pixels, recognize whether the peripheral pixels of the block boundary flat pixels in the same block are flat, and if the peripheral pixels of the block boundary flat pixel are flat, block boundary flat About a pixel and its neighbors A pixel value that causes a boundary pixel included in a flat portion of a block to have a larger pixel difference at the block boundary than the original image by obtaining the code of the pixel difference from the pixel difference code calculation means by the intra-block filter processing It is possible to check in advance whether or not it is possible, and if the boundary pixel can take a pixel value that makes the difference between the pixels of the block boundary larger than the original image, the pixel of the block boundary pixel of the processing target block and the adjacent block By obtaining the inter-pixel difference value from the inter-pixel difference value calculating means, the inter-pixel difference value between the boundary pixel and the boundary pixel of the block adjacent to the block including the boundary pixel is larger than the first threshold value and the second threshold value. It is possible to count the number of block boundary pixels that are smaller than the value and check in advance whether or not the number of pixels exceeds a predetermined number. An effect that makes it possible to determine the implementation of the boundary processing for the block boundary pixels if more than a few.

【0025】好ましくは、上記境界画素処理手段は、境
界処理実施画素についてブロック内フィルタ処理画素の
代わりに原画像の境界画素を出力する。
Preferably, the boundary pixel processing means outputs the boundary pixel of the original image instead of the intra-block filter processed pixel for the boundary processing execution pixel.

【0026】上記画像処理装置においては、検査結果に
基づきブロック内フィルタ処理によりブロックの境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取るブロック境界画素のうちブロック
境界画素の属するブロック内の周辺画素が平坦で、かつ
ブロック境界画素とブロック境界画素の属するブロック
に隣接するブロックの境界画素との画素間差分値が第1
のしきい値より大きく、第2のしきい値より小さいブロ
ック境界画素について、ブロック内フィルタ処理画素の
代わりに原画像の境界画素を選択することでブロック境
界の画素間差分値が原画像に比べ大きくならないように
することを可能にするという作用を有する。
In the image processing apparatus, the block boundary pixel among the block boundary pixels having a pixel value that makes the inter-pixel difference of the block boundary larger than the original image by the intra-block filter processing based on the inspection result. The peripheral pixels in the block to which the pixel belongs are flat, and the inter-pixel difference value between the block boundary pixel and the boundary pixel of the block adjacent to the block to which the block boundary pixel belongs is the first pixel.
For the block boundary pixels that are larger than the threshold value and smaller than the second threshold value, the pixel boundary difference value of the block boundary is compared with the original image by selecting the boundary pixel of the original image instead of the intra-block filtering pixel. It has the effect of allowing it not to grow.

【0027】好ましくは、上記境界画素処理手段は、境
界処理実施画素についてブロック内フィルタ処理後の境
界処理実施画素とその隣接画素による平滑化を実施す
る。
Preferably, the boundary pixel processing means smoothes the boundary processing execution pixel by the boundary processing execution pixel after the intra-block filter processing and its adjacent pixel.

【0028】上記画像処理装置においては、検査結果に
基づきブロック内フィルタ処理によりブロックの境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取るブロック境界画素のうちブロック
境界画素の属するブロック内の周辺画素が平坦で、かつ
ブロック境界画素とブロック境界画素の属するブロック
に隣接するブロックの境界画素との画素間差分値が第1
のしきい値より大きく第2のしきい値より小さいブロッ
ク境界画素についてブロック内フィルタ処理後のブロッ
ク境界画素と、ブロック境界画素の属するブロックのブ
ロック境界画素に隣接する画素と、ブロック境界画素の
属するブロックに隣接するブロックの境界画素とによる
平滑化を実施すること可能とする作用を有する。
In the above-mentioned image processing apparatus, the block boundary pixel among the block boundary pixels having a pixel value which makes the difference between pixels of the block boundary larger than the original image by the intra-block filter processing based on the inspection result. The peripheral pixels in the block to which the pixel belongs are flat, and the inter-pixel difference value between the block boundary pixel and the boundary pixel of the block adjacent to the block to which the block boundary pixel belongs is the first pixel.
Block boundary pixels that are larger than the threshold value and smaller than the second threshold value, the block boundary pixel after the intra-block filter processing, the pixel adjacent to the block boundary pixel of the block to which the block boundary pixel belongs, and the block boundary pixel belong to This has the effect of enabling smoothing with the boundary pixels of blocks adjacent to the block.

【0029】[0029]

【発明の実施の形態】以下、この発明の実施の形態を図
面を参照して詳しく説明する。なお、図中同一または相
当部分には同一の符号を付し、その説明は繰り返さな
い。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will now be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference numerals, and the description thereof will not be repeated.

【0030】(第1の実施形態)図1は、この発明の第
1の実施形態による画像処理装置の構成を示すブロック
図である。図1に示す画像処理装置は、入力画像メモリ
1と、ブロック番号カウンタ2と、アドレス生成手段3
と、画素間差分符号算出手段4と、ブロック内フィルタ
適用判定手段6と、ブロック内平坦箇所検出手段7と、
ブロック内フィルタ適用フラグ保持手段8と、平坦箇所
パターン保持手段9と、ブロック内画素フィルタ手段1
0と、境界画素保持手段11と、境界画素判定手段12
と、境界画素処理手段13と、画像出力手段14とを備
える。
(First Embodiment) FIG. 1 is a block diagram showing the arrangement of an image processing apparatus according to the first embodiment of the present invention. The image processing apparatus shown in FIG. 1 includes an input image memory 1, a block number counter 2, and an address generating means 3.
An inter-pixel difference code calculation means 4, an intra-block filter application determination means 6, an intra-block flat portion detection means 7,
In-block filter application flag holding means 8, flat portion pattern holding means 9, and in-block pixel filter means 1
0, boundary pixel holding means 11, boundary pixel determination means 12
And a boundary pixel processing means 13 and an image output means 14.

【0031】入力画像メモリ1は、入力された画像デー
タを保持する。ブロック番号カウンタ2は、処理対象ブ
ロック番号をカウントする。アドレス生成手段3は、処
理対象ブロック番号に該当するブロック内の画素のメモ
リアドレスを生成する。画素間差分符号算出手段4は、
入力画像メモリ1より読み出した処理対象ブロックデー
タの左ブロック境界符号パターンと、隣接ブロックデー
タの右ブロック境界符号パターンと、処理対象ブロック
画像データと隣接ブロック画像データとのブロック境界
符号パターンとを出力する。ブロック内フィルタ適用判
定手段6は、入力画像メモリ1より読み出した処理対象
ブロック画像データのブロック内フィルタ適用フラグを
生成する。ブロック内平坦箇所検出手段7は、入力画像
メモリ1より読み出した処理対象ブロック画像データの
平坦箇所を検出しブロック内平坦箇所パターンを生成す
る。ブロック内フィルタ適用フラグ保持手段8は、ブロ
ック内フィルタ適用フラグを保持し、ブロック内フィル
タ適用履歴として出力する。平坦箇所パターン保持手段
9は、ブロック内平坦箇所パターンのうち右ブロック境
界のブロック内平坦箇所パターンを保持し右ブロック境
界平坦箇所パターンとして出力する。ブロック内画素フ
ィルタ手段10は、ブロック内フィルタ適用フラグとブ
ロック内平坦箇所パターンに基づき入力画像メモリ1よ
り読み出した処理対象ブロック画像データに平滑化処理
を施す。境界画素保持手段11は、ブロック内画素フィ
ルタ手段10の出力のうち右ブロック境界画素を保持す
る。境界画素判定手段12は、左ブロック境界符号パタ
ーン・右ブロック境界符号パターン・ブロック境界符号
パターン・ブロック内フィルタ適用フラグ・ブロック内
フィルタ適用履歴・ブロック内平坦箇所パターン・右ブ
ロック境界平坦箇所パターンに基づいて処理対象ブロッ
クと隣接ブロックとの境界画素への処理を決定し、右境
界処理判定信号および左境界処理判定信号を生成する。
境界画素処理手段13は、右境界処理判定信号と左境界
処理判定信号とに基づいて処理対象ブロックと隣接ブロ
ックとの境界画素に対する処理を実施し、右ブロック境
界出力データおよび左ブロック境界出力データを出力す
る。画像出力手段14は、境界画素処理手段13からの
右ブロック境界出力データと左ブロック境界出力データ
と処理画像非ブロック境界画像データとを映像信号とし
て出力する。
The input image memory 1 holds the input image data. The block number counter 2 counts the block number to be processed. The address generating means 3 generates a memory address of a pixel in the block corresponding to the block number to be processed. The inter-pixel difference code calculation means 4 is
The left block boundary code pattern of the processing target block data read from the input image memory 1, the right block boundary code pattern of the adjacent block data, and the block boundary code pattern of the processing target block image data and the adjacent block image data are output. . The in-block filter application determining unit 6 generates an in-block filter application flag of the processing target block image data read from the input image memory 1. The in-block flat portion detecting means 7 detects a flat portion of the processing target block image data read from the input image memory 1 and generates an in-block flat portion pattern. The in-block filter application flag holding means 8 holds the in-block filter application flag and outputs it as an in-block filter application history. The flat spot pattern holding means 9 holds the flat spot pattern within the block on the right block boundary among the flat spot patterns within the block, and outputs it as the right block boundary flat spot pattern. The in-block pixel filter means 10 performs a smoothing process on the processing target block image data read from the input image memory 1 based on the in-block filter application flag and the in-block flat spot pattern. The boundary pixel holding unit 11 holds the right block boundary pixel in the output of the in-block pixel filter unit 10. The boundary pixel determination means 12 is based on the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat spot pattern, and the right block boundary flat spot pattern. Processing is performed on the boundary pixel between the block to be processed and the adjacent block, and a right boundary processing determination signal and a left boundary processing determination signal are generated.
The boundary pixel processing means 13 performs processing on the boundary pixels between the block to be processed and the adjacent block based on the right boundary processing determination signal and the left boundary processing determination signal, and outputs the right block boundary output data and the left block boundary output data. Output. The image output means 14 outputs the right block boundary output data, the left block boundary output data, and the processed image non-block boundary image data from the boundary pixel processing means 13 as video signals.

【0032】図2は、図1に示した境界画素処理手段1
3の内部構成を示すブロック図である。図2に示すよう
に、境界画素処理手段13は、右境界画素選択手段20
と、左境界画素選択手段21とを含む。右境界画素選択
手段20は、右境界処理判定信号に基づき原画像右ブロ
ック境界画素データと処理画像右ブロック境界画素デー
タとを選択的に出力する。左境界画素選択手段21は、
左境界処理判定信号に基づき原画像左ブロック境界画素
データと処理画像左ブロック境界画素データとを選択的
に出力する。
FIG. 2 shows the boundary pixel processing means 1 shown in FIG.
3 is a block diagram showing the internal configuration of FIG. As shown in FIG. 2, the boundary pixel processing means 13 includes the right boundary pixel selecting means 20.
And a left boundary pixel selection unit 21. The right boundary pixel selection means 20 selectively outputs the original image right block boundary pixel data and the processed image right block boundary pixel data based on the right boundary processing determination signal. The left boundary pixel selection means 21
The original image left block boundary pixel data and the processed image left block boundary pixel data are selectively output based on the left boundary processing determination signal.

【0033】次に、以上のように構成された画像処理装
置の動作について説明する。なお、これ以降の説明で
は、ブロック番号Nに該当するブロックをブロック
(N)、ブロック(N)内の画像データをブロック画像
データ(n)、ブロック画像データ(n)に対してブロ
ック内フィルタ処理を実施した結果をブロック画像デー
タ(n’)、処理対象ブロックがブロック(N)であり
隣接ブロックがブロック(N−1)である状態をブロッ
ク処理ステータスNと呼ぶ。また、図3に示すように、
1ブロックのサイズは縦a画素×横b画素、入力画像メ
モリ1に格納されたブロック画像データの読み出し順を
図3中のブロック番号順とする。そして、ブロック処理
ステータスN(処理対象ブロック=ブロックN、隣接ブ
ロック=ブロックN−1)のときのブロックNのブロッ
ク画像データ(n)に対する水平方向のモスキート歪み
軽減とブロックN−1とブロックNの境界画素に対する
処理における動作について述べる。
Next, the operation of the image processing apparatus configured as described above will be described. In the following description, the block corresponding to the block number N is the block (N), the image data in the block (N) is the block image data (n), and the in-block filter processing is performed on the block image data (n). The result of performing the above is referred to as block image data (n ′), and the state where the block to be processed is block (N) and the adjacent block is block (N−1) is referred to as block processing status N. Also, as shown in FIG.
The size of one block is vertical a pixels × horizontal b pixels, and the reading order of the block image data stored in the input image memory 1 is the block number order in FIG. Then, in the block processing status N (processing target block = block N, adjacent block = block N−1), the horizontal mosquito distortion reduction for the block image data (n) of the block N and the block N−1 and the block N are performed. The operation in the processing for the boundary pixel will be described.

【0034】復号装置で復号された画像データは、入力
画像メモリ1に格納される。アドレス生成手段3では、
ブロック番号カウンタ2により出力されるブロック
(N)のブロック画像データ(n)の処理対象ブロック
メモリアドレスを生成する。入力画像メモリ1から読み
出された処理対象ブロック画像データ(n)は、画素間
差分符号算出手段4とブロック内フィルタ適用判定手段
6とブロック内平坦箇所検出手段7とブロック内画素フ
ィルタ手段10とに出力される。
The image data decoded by the decoding device is stored in the input image memory 1. In the address generation means 3,
The processing target block memory address of the block image data (n) of the block (N) output by the block number counter 2 is generated. The processing target block image data (n) read from the input image memory 1 includes an inter-pixel difference code calculation means 4, an intra-block filter application determination means 6, an intra-block flat portion detection means 7, and an intra-block pixel filter means 10. Is output to.

【0035】画素間差分符号算出手段4では隣接ブロッ
ク境界画素メモリアドレス(n−1)を生成し、ブロッ
ク(N−1)の原画像右ブロック境界画素データ(n−
1)をa画素、入力画像メモリ1より読み出す。次に、
入力画像メモリ1より読み出された原画像右ブロック境
界画素データ(n−1)と、入力画像メモリ1より入力
される処理対象ブロック画像データ(n)とからブロッ
ク(N)とブロック(N−1)との境界画素差分の符号
である第1の画素間差分符号と、ブロック(N−1)内
の右ブロック境界画素とその左隣接画素との画素差分の
符号である第2の画素間差分符号と、ブロック(N)内
の左ブロック境界画素とその右隣接画素との画素差分の
符号である第3の画素間差分符号とを算出する。第1の
画素間差分符号は境界のa画素分をブロック境界符号パ
ターンとして、第2の画素間差分符号は境界のa画素分
を右ブロック境界符号パターン(n−1)として、第3
の画素間差分符号は境界のa画素分を左ブロック境界符
号パターン(n)として、境界画素判定手段12へ出力
される。
The inter-pixel difference code calculation means 4 generates an adjacent block boundary pixel memory address (n-1), and the original image right block boundary pixel data (n-) of the block (N-1).
1) is read out from the input image memory 1 as a pixel. next,
A block (N) and a block (N-) based on the original image right block boundary pixel data (n-1) read from the input image memory 1 and the processing target block image data (n) input from the input image memory 1. 1) a first inter-pixel difference code which is a code of a boundary pixel difference with respect to 1) and a second pixel which is a code of a pixel difference between a right block boundary pixel in the block (N-1) and its left adjacent pixel The difference code and the third inter-pixel difference code, which is the code of the pixel difference between the left block boundary pixel in the block (N) and its right adjacent pixel, are calculated. The first inter-pixel difference code uses a boundary a pixels as a block boundary code pattern, and the second inter-pixel difference code uses a boundary a pixels as a right block boundary code pattern (n-1).
The inter-pixel difference code of is output to the boundary pixel determination means 12 with the pixel a at the boundary as the left block boundary code pattern (n).

【0036】ブロック内フィルタ適用判定手段6ではエ
ッジ周辺の平坦箇所にモスキート歪みが生じ易いため、
ブロック(N)内の各画素間の差分絶対値を算出し、画
素間差分値がエッジ検出用しきい値より大きい場合には
エッジ箇所と判定し、画素間差分値が平坦検出用しきい
値より小さい場合には平坦箇所と判定し、処理対象ブロ
ック画像データ(n)内にエッジ箇所および平坦箇所の
両方が存在すればブロック(N)に対するブロック内画
素フィルタの適用を決定し、ブロック内フィルタ適用フ
ラグ(n)を有効にする。
In the in-block filter application determining means 6, since mosquito distortion is likely to occur in a flat portion around the edge,
The absolute difference value between the pixels in the block (N) is calculated, and when the inter-pixel difference value is larger than the edge detection threshold value, it is determined to be an edge portion, and the inter-pixel difference value is the flatness detection threshold value. If it is smaller, it is determined to be a flat portion, and if both the edge portion and the flat portion exist in the block image data (n) to be processed, it is determined to apply the in-block pixel filter to the block (N), and the in-block filter is determined. Enable the apply flag (n).

【0037】ブロック内平坦箇所検出手段7ではブロッ
ク(N)内の各画素間の差分絶対値を算出し、画素間差
分値が平坦検出用しきい値より小さい場合には平坦箇所
と判定し、判定結果に基づきブロック内平坦箇所パター
ン(n)を生成する。
The in-block flat portion detecting means 7 calculates the absolute difference value between the pixels in the block (N), and when the inter-pixel difference value is smaller than the flatness detection threshold value, it is determined to be a flat portion. An in-block flat portion pattern (n) is generated based on the determination result.

【0038】ブロック内画素フィルタ手段10では、ブ
ロック内フィルタ適用判定手段6にて生成されたブロッ
ク(N)のブロック内フィルタ適用フラグ(n)が有効
である場合に、ブロック内平坦箇所検出手段7にて生成
されたブロック(N)のブロック内平坦箇所パターン
(n)に従い、処理対象ブロック画像データ(n)の中
の平坦画素と水平方向隣接2画素の3画素による平滑化
処理が施される。
In the in-block pixel filter means 10, if the in-block filter application flag (n) of the block (N) generated by the in-block filter application determination means 6 is valid, the in-block flat portion detection means 7 According to the in-block flat portion pattern (n) of the block (N) generated in step 3, smoothing processing is performed by the flat pixel in the processing target block image data (n) and the three pixels of the two pixels adjacent in the horizontal direction. .

【0039】ブロック内フィルタ適用判定手段6にて生
成されたブロック(N)のブロック内フィルタ適用フラ
グ(n)が無効である場合は、ブロック内平坦箇所パタ
ーンの状態に関わらず処理対象ブロック画像データ
(n)に対しての平滑化処理は実施しない。また、平滑
化処理の実施有無に関わらず、ブロック(N)の右ブロ
ック境界画素は境界画素保持手段11へ、ブロック
(N)の左ブロック境界画素は処理画像左ブロック境界
画素データ(n′)として境界画素処理手段13へ、ブ
ロック(N)の非ブロック境界画素は処理画像非ブロッ
ク境界画素データ(n′)として画像出力手段14へと
出力される。
When the in-block filter application flag (n) of the block (N) generated by the in-block filter application determining means 6 is invalid, the block image data to be processed is processed regardless of the state of the in-block flat portion pattern. The smoothing process for (n) is not performed. Further, the right block boundary pixel of the block (N) is sent to the boundary pixel holding means 11 and the left block boundary pixel of the block (N) is the processed image left block boundary pixel data (n ′) regardless of whether or not the smoothing process is performed. Is output to the boundary pixel processing means 13 and the non-block boundary pixels of the block (N) are output to the image output means 14 as processed image non-block boundary pixel data (n ′).

【0040】境界画素保持手段11では、ブロック内画
素フィルタ手段10からの出力であるブロック(N)の
右ブロック境界画素a個を1ブロック処理期間保持す
る。保持されたデータはブロック処理ステータスN+1
(処理対象ブロック=ブロックN+1、隣接ブロック=
ブロックN)時に、隣接ブロックの処理画像右ブロック
境界画素として境界画素処理手段13へと出力される。
The boundary pixel holding means 11 holds a right block boundary pixels of the block (N), which is the output from the in-block pixel filter means 10, for one block processing period. The retained data is the block processing status N + 1
(Processing target block = block N + 1, adjacent block =
At the time of block N), the processed image of the adjacent block is output to the boundary pixel processing unit 13 as the right block boundary pixel.

【0041】ブロック内フィルタ適用フラグ保持手段8
では、ブロック内フィルタ適用フラグ(n)を1ブロッ
ク処理期間保持する。保持されたブロック内フィルタ適
用フラグ(n)は、ブロック処理ステータスN+1(処
理対象ブロック=ブロックN+1、隣接ブロック=ブロ
ックN)時に、隣接ブロックのブロック内フィルタ適用
履歴(n−1)として、境界画素判定手段12へ出力さ
れる。
In-block filter application flag holding means 8
Then, the in-block filter application flag (n) is held for one block processing period. The retained in-block filter application flag (n) is a boundary pixel as an in-block filter application history (n-1) of an adjacent block when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N). It is output to the determination means 12.

【0042】平坦箇所パターン保持手段9は、ブロック
(N)のブロック内平坦箇所パターン(n)のうち右ブ
ロック境界のブロック内平坦箇所パターンを1ブロック
処理期間保持する。保持されたパターンは、ブロック処
理ステータスN+1(処理対象ブロック=ブロックN+
1、隣接ブロック=ブロックN)時に、隣接ブロックの
右ブロック境界平坦箇所パターンとして境界画素判定手
段12へと出力される。
The flat spot pattern holding means 9 holds the flat spot pattern in the block at the right block boundary among the flat spot patterns (n) in the block (N) for one block processing period. The held pattern is a block processing status N + 1 (processing target block = block N +
1, adjacent block = block N), the pattern is output to the boundary pixel determination unit 12 as a right block boundary flat portion pattern of the adjacent block.

【0043】境界画素判定手段12では、ブロック処理
ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴(n−1)
と、ブロック内フィルタ適用判定手段6からのブロック
(N)のブロック内フィルタ適用フラグ(n)の両方ま
たはどちらかが有効である場合に、ブロック処理ステー
タスN―1(処理対象ブロック=ブロックN−1、隣接
ブロック=ブロックN−2)時にブロック内平坦箇所検
出手段7により生成され平坦箇所パターン保持手段9に
て保持されているブロック(N―1)の右ブロック境界
平坦パターンと、ブロック内平坦箇所検出手段7からの
ブロック(N)のブロック内平坦箇所パターン(n)
と、画素間差分符号算出手段4からのブロック(N−
1)の右ブロック境界符号パターン(n−1)と、ブロ
ック(N−1)とブロック(N)のブロック境界のブロ
ック境界符号パターンと、ブロック(N)の左ブロック
境界符号パターン(n)とを参照し、ブロック(N−
1)の右ブロック境界画素およびブロック(N)の左ブ
ロック境界画素の境界処理の判定を行う。
In the boundary pixel determining means 12, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history (n−) of the block (N−1) generated by the in-block filter application determination unit 6 and held by the in-block filter application flag holding unit 8 1)
And either or both of the in-block filter application flags (n) of the block (N) from the in-block filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N- 1, adjacent block = block N-2), the right block boundary flat pattern of the block (N-1) generated by the in-block flat portion detection unit 7 and held by the flat portion pattern holding unit 9 and the flat inside block In-block flat part pattern (n) of the block (N) from the part detecting means 7
And the block (N− from the inter-pixel difference code calculation means 4).
1) the right block boundary code pattern (n-1), the block boundary code pattern of the block boundary between the block (N-1) and the block (N), and the left block boundary code pattern (n) of the block (N) The block (N-
The boundary processing of the right block boundary pixel of 1) and the left block boundary pixel of the block (N) is determined.

【0044】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴(n−1)が有効で
ブロック(N)のブロック内フィルタ適用フラグ(n)
が無効である場合、(2)ブロック(N−1)のブロッ
ク内フィルタ適用履歴(n−1)が無効でブロック
(N)のブロック内フィルタ適用フラグ(n)が有効で
ある場合、(3)ブロック(N−1)のブロック内フィ
ルタ適用履歴(n−1)とブロック(N)のブロック内
フィルタ適用フラグ(n)がともに有効である場合との
3通りに分けて説明する。
In the following description, (1) block (N-
In-block filter application history (n-1) of 1) is valid, and in-block filter application flag (n) of block (N)
Is invalid, (2) If the in-block filter application history (n-1) of the block (N-1) is invalid and the in-block filter application flag (n) of the block (N) is valid, (3) ) The case where both the intra-block filter application history (n-1) of the block (N-1) and the intra-block filter application flag (n) of the block (N) are both valid will be described separately.

【0045】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が有効で、ブロック(N)の
ブロック内フィルタ適用フラグ(n)が無効である場合 ブロック境界平坦パターンを参照し、ブロック(N−
1)の右ブロック境界画素の中でブロック内画素フィル
タ手段10によりフィルタ処理が実施される右ブロック
境界平坦画素を特定し、ブロック(N−1)の右ブロッ
ク境界符号パターン(n−1)のうち右ブロック境界平
坦画素の位置に該当する符号と、ブロック境界符号パタ
ーンのうち右ブロック境界平坦画素とそれに隣接するブ
ロック(N)のブロック境界画素との間の位置に該当す
る符号が同じであるかどうか検査する。符号が同じであ
る場合、その位置に該当するブロック(N−1)の右ブ
ロック境界平坦画素はブロック内画素フィルタ手段10
の平滑化処理により原画像に比べブロック境界の差分が
大きくなるような画素値を取る。境界画素判定手段12
では、このようなブロック(N−1)の右ブロック境界
平坦画素についての境界処理の実施を有効とする右境界
処理判定信号を生成する。ブロック(N)の左ブロック
境界画素についてはブロック内フィルタ適用フラグ
(n)が無効であるため、境界処理の実施を無効とする
左境界処理判定信号を生成する。
(1) When the in-block filter application history (n-1) of the block (N-1) is valid and the in-block filter application flag (n) of the block (N) is invalid, the block boundary flat pattern is set. Refer to the block (N-
Among the right block boundary pixels of 1), the right block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and the right block boundary code pattern (n-1) of the block (N-1) is identified. The code corresponding to the position of the right block boundary flat pixel is the same as the code corresponding to the position between the right block boundary flat pixel and the block boundary pixel of the block (N) adjacent thereto in the block boundary code pattern. Inspect whether or not. When the signs are the same, the right block boundary flat pixel of the block (N-1) corresponding to that position is the intra-block pixel filter means 10
Pixel values are taken so that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of. Boundary pixel determination means 12
Then, a right boundary processing determination signal that makes it effective to execute the boundary processing for the right block boundary flat pixel of the block (N−1) is generated. Since the in-block filter application flag (n) is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0046】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が無効でブロック(N)のブ
ロック内フィルタ適用フラグ(n)が有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段10によりフィルタ処理が実施される左ブロック境界
平坦画素を特定し、ブロック(N)の左ブロック境界符
号パターン(n)のうち左ブロック境界平坦画素の位置
に該当する符号と、ブロック境界符号パターンのうち左
ブロック境界平坦画素とそれに隣接するブロック(N−
1)のブロック境界画素との間の位置に該当する符号と
が同じであるかどうか検査する。符号が同じである場
合、その位置に該当するブロック(N)の左ブロック境
界平坦画素はブロック内画素フィルタ手段10の平滑化
処理により原画像に比べブロック境界の差分が大きくな
るような画素値を取る。境界画素判定手段12では、こ
のようなブロック(N)の左ブロック境界平坦画素につ
いての境界処理の実施を有効とする左境界処理判定信号
を生成する。ブロック(N−1)の右ブロック境界画素
についてはブロック内フィルタ適用履歴(n−1)が無
効であるため、境界処理の実施を無効とする右境界処理
判定信号を生成する。
(2) In-block filter application history (n-1) of block (N-1) is invalid and in-block filter application flag (n) of block (N) is valid. Reference and block (N)
Of the left block boundary pixels, the left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and the left block boundary flat pixel of the left block boundary code pattern (n) of the block (N) is identified. , The block corresponding to the position of the block boundary code pattern, the left block boundary flat pixel and the adjacent block (N-
It is checked whether or not the code corresponding to the position between the block boundary pixel of 1) is the same. When the signs are the same, the left block boundary flat pixel of the block (N) corresponding to the position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. take. The boundary pixel determination unit 12 generates a left boundary processing determination signal that makes it effective to perform the boundary processing on the left block boundary flat pixels of the block (N). Since the intra-block filter application history (n-1) is invalid for the right block boundary pixel of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0047】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)とブロック(N)のブロック
内フィルタ適用フラグ(n)がともに有効である場合 右ブロック境界平坦パターンを参照しブロック(N−
1)の右ブロック境界画素の中でブロック内画素フィル
タ手段10によりフィルタ処理が実施される右ブロック
境界平坦画素を特定し、ブロック内平坦箇所パターンを
参照しブロック(N)の左ブロック境界画素の中でブロ
ック内画素フィルタ手段10によりフィルタ処理が実施
される左ブロック境界平坦画素を特定し、右ブロック境
界平坦画素と左ブロック境界平坦画素とがブロック境界
を挟んで隣接している箇所について、その位置に該当す
る位置のブロック境界符号パターンと、右ブロック境界
平坦画素に該当する位置の右ブロック境界符号パターン
(n−1)と、左ブロック境界平坦画素に該当する位置
の左ブロック境界符号パターン(n)とを検査し、これ
ら3つの符号が全て同じであるかどうか検査する。符号
が同じである場合、その位置に該当するブロック(N−
1)の右ブロック境界平坦画素およびブロック(N)の
左ブロック境界平坦画素は、ブロック内画素フィルタ手
段の平滑化処理により原画像に比べブロック境界の差分
が大きくなるような画素値を取る。境界画素判定手段1
2では、このようなブロック(N−1)の右ブロック境
界平坦画素およびブロック(N−1)の左ブロック境界
平坦画素についての境界処理の実施を有効とする右境界
処理判定信号および左境界処理判定信号を生成する。
(3) When both the intra-block filter application history (n-1) of the block (N-1) and the intra-block filter application flag (n) of the block (N) are valid, refer to the right block boundary flat pattern. Block (N-
Among the right block boundary pixels of 1), the right block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and the block in the left block boundary pixel of the block (N) is referred to by referring to the in-block flat portion pattern. Among them, the left block boundary flat pixel on which the filtering process is performed by the in-block pixel filter unit 10 is specified, and the right block boundary flat pixel and the left block boundary flat pixel are adjacent to each other across the block boundary, The block boundary code pattern at the position corresponding to the position, the right block boundary code pattern (n-1) at the position corresponding to the right block boundary flat pixel, and the left block boundary code pattern at the position corresponding to the left block boundary flat pixel ( n) and check if these three codes are all the same. If the signs are the same, the block (N-
The right block boundary flat pixel of 1) and the left block boundary flat pixel of block (N) have pixel values such that the difference between the block boundaries becomes larger than that of the original image due to the smoothing processing by the in-block pixel filter means. Boundary pixel determination means 1
2, the right boundary processing determination signal and the left boundary processing for validating the boundary processing for the right block boundary flat pixel of the block (N-1) and the left block boundary flat pixel of the block (N-1) Generate a decision signal.

【0048】境界画素処理手段13では、右境界画素選
択手段20において右境界処理判定信号に基づき、境界
処理の実施が有効である右ブロック境界画素について入
力画像メモリ1より読み出した原画像右ブロック境界画
素データ(n−1)を選択し、境界処理の実施が無効で
ある右ブロック境界画素について境界画素保持手段11
からの処理画像右境界画素データ(n−1′)を選択
し、画像出力手段14へ右ブロック境界出力データとし
て出力する。同様に、左境界画素選択手段21において
左境界処理判定信号に基づき、境界処理の実施が有効で
ある左ブロック境界画素について入力画像メモリ1より
読み出した原画像左ブロック境界画素データ(n)を選
択し、境界処理の実施が無効である左ブロック境界画素
について境界画素保持手段11からの処理画像左境界画
素データ(n′)を選択し、画像出力手段14へ左ブロ
ック境界出力データとして出力する。
In the boundary pixel processing means 13, based on the right boundary processing determination signal in the right boundary pixel selection means 20, the original image right block boundary read from the input image memory 1 for the right block boundary pixel for which the boundary processing is effective. The boundary pixel holding unit 11 selects the pixel data (n-1) and regards the right block boundary pixel for which the execution of the boundary processing is invalid.
The processed image right boundary pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 21 selects the original image left block boundary pixel data (n) read from the input image memory 1 for the left block boundary pixel for which the boundary processing is effective, based on the left boundary processing determination signal. Then, the processed image left boundary pixel data (n ′) from the boundary pixel holding unit 11 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output unit 14 as the left block boundary output data.

【0049】以上のように第1の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
の画素間差分の符号とブロック内フィルタ処理適用の可
否判定結果とブロック内平坦箇所情報とを用い、ブロッ
ク内フィルタ処理によりブロックの境界画素が原画像に
比べブロック境界の画素間差分を大きくするような画素
値を取り得るかどうかを予め検査し、そのような画素に
ついてブロック内フィルタ処理画素の代わりに原画像の
境界画素を選択することでブロック境界の画素間差分値
が原画像に比べ大きくならないようにすることを可能
し、高画質化を図ることができる。
As described above, according to the first embodiment, the sign of the difference between pixels of the original images of the two adjacent blocks forming the block boundary, the result of determination as to whether or not the intra-block filtering process can be applied, and the intra-block flat portion. By using the information, it is inspected in advance whether or not the pixel value of the boundary pixel of the block can increase the difference between pixels of the block boundary as compared with the original image by the intra-block filtering process, and the intra-block filter for such pixel is performed. By selecting the boundary pixel of the original image instead of the processing pixel, it is possible to prevent the inter-pixel difference value at the block boundary from becoming larger than that of the original image, and it is possible to improve the image quality.

【0050】(第2の実施形態)図4は、この発明の第
2の実施形態による画像処理装置の構成を示すブロック
図である。図4に示す画像処理装置は、図1に示した境
界画素判定手段12に代えて境界画素判定手段42を備
える。その他の構成は図1に示した画像処理装置と同様
である。
(Second Embodiment) FIG. 4 is a block diagram showing the arrangement of an image processing apparatus according to the second embodiment of the present invention. The image processing apparatus shown in FIG. 4 includes a boundary pixel determining means 42 instead of the boundary pixel determining means 12 shown in FIG. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0051】境界画素判定手段42は、左ブロック境界
符号パターンと右ブロック境界符号パターンとブロック
境界符号パターンとブロック内フィルタ適用フラグとブ
ロック内フィルタ適用履歴とブロック内平坦箇所パター
ンと右ブロック境界平坦箇所パターンとブロック境界画
素検出個数しきい値とに基づいて処理対象ブロックと隣
接ブロックとの境界画素への処理を決定し、右境界処理
判定信号および左境界処理判定信号を生成する。
The boundary pixel determining means 42 determines the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat part pattern, and the right block boundary flat part. Based on the pattern and the block boundary pixel detection number threshold value, the process for the boundary pixel between the target block and the adjacent block is determined, and the right boundary process determination signal and the left boundary process determination signal are generated.

【0052】境界画素判定手段42では、ブロック処理
ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴と、ブロック
内フィルタ適用判定手段6からのブロック(N)のブロ
ック内フィルタ適用フラグとの両方またはどちらかが有
効である場合に、ブロック処理ステータスN―1(処理
対象ブロック=ブロックN−1、隣接ブロック=ブロッ
クN−2)時にブロック内平坦箇所検出手段7により生
成され平坦箇所パターン保持手段9にて保持されている
ブロック(N―1)の右ブロック境界平坦パターンと、
ブロック内平坦箇所検出手段7からのブロック(N)の
ブロック内平坦箇所パターン(n)と、画素間差分符号
算出手段4からのブロック(N−1)の右ブロック境界
符号パターン(n−1)と、ブロック(N−1)とブロ
ック(N)とのブロック境界のブロック境界符号パター
ンと、ブロック(N)の左ブロック境界符号パターンと
を参照し、ブロック(N−1)の右ブロック境界画素お
よびブロック(N)の左ブロック境界画素の境界処理の
判定を行う。
In the boundary pixel determining means 42, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history of the block (N−1) generated by the in-block filter application determination means 6 and held in the in-block filter application flag holding means 8, and the block If either or both of the block internal filter application flag of the block (N) from the internal filter application determining means 6 is valid, the block processing status N-1 (processing target block = block N-1, adjacent block =) A right block boundary flat pattern of the block (N-1) which is generated by the in-block flat portion detection unit 7 at the time of block N-2) and is held by the flat portion pattern holding unit 9;
In-block flat part pattern (n) of the block (N) from the in-block flat part detecting means 7 and right block boundary code pattern (n-1) of the block (N-1) from the inter-pixel difference code calculating part 4 And the block boundary code pattern of the block boundary between the block (N-1) and the block (N) and the left block boundary code pattern of the block (N), the right block boundary pixel of the block (N-1) And the boundary processing of the left block boundary pixel of the block (N) is determined.

【0053】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴が有効でブロック
(N)のブロック内フィルタ適用フラグが無効である場
合、(2)ブロック(N−1)のブロック内フィルタ適
用履歴が無効でブロック(N)のブロック内フィルタ適
用フラグが有効である場合、(3)ブロック(N−1)
のブロック内フィルタ適用履歴とブロック(N)のブロ
ック内フィルタ適用フラグがともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
When the in-block filter application history of 1) is valid and the in-block filter application flag of block (N) is invalid, (2) the in-block filter application history of block (N-1) is invalid and the block (N) of block (N) is When the in-block filter application flag is valid, (3) block (N-1)
The in-block filter application history and the in-block filter application flag of block (N) will be separately described.

【0054】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴が有効で、ブロック(N)のブロック内
フィルタ適用フラグが無効である場合 右ブロック境界平坦パターンを参照し、ブロック(N−
1)の右ブロック境界画素の中でブロック内画素フィル
タ手段10によりフィルタ処理が実施される右ブロック
境界平坦画素を特定し、ブロック(N−1)の右ブロッ
ク境界符号パターン(n−1)のうち右ブロック境界平
坦画素の位置に該当する符号と、ブロック境界符号パタ
ーンのうち右ブロック境界平坦画素とそれに隣接するブ
ロック(N)のブロック境界画素との間の位置に該当す
る符号とが同じであるかどうか検査する。符号が同じで
ある場合、その位置に該当するブロック(N−1)の右
ブロック境界平坦画素はブロック内画素フィルタ手段1
0の平滑化処理により原画像に比べブロック境界の差分
が大きくなるような画素値を取る。境界画素判定手段4
2では、このようなブロック(N−1)の右ブロック境
界平坦画素の個数を数え、その数がブロック境界画素検
出個数しきい値より大きい場合にブロック(N−1)の
右ブロック境界平坦画素についての境界処理の実施を有
効とする右境界処理判定信号を生成する。ブロック
(N)の左ブロック境界画素についてはブロック内フィ
ルタ適用フラグが無効であるため、境界処理の実施を無
効とする左境界処理判定信号を生成する。
(1) When the in-block filter application history of the block (N-1) is valid and the in-block filter application flag of the block (N) is invalid, the right block boundary flat pattern is referred to, and the block (N-
Among the right block boundary pixels of 1), the right block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and the right block boundary code pattern (n-1) of the block (N-1) is identified. The code corresponding to the position of the right block boundary flat pixel is the same as the code corresponding to the position between the right block boundary flat pixel and the block boundary pixel of the block (N) adjacent thereto in the block boundary code pattern. Inspect for existence. When the signs are the same, the right block boundary flat pixel of the block (N-1) corresponding to that position is the intra-block pixel filter means 1
Pixel values are taken so that the difference between block boundaries becomes larger than that of the original image by the smoothing process of 0. Boundary pixel determination means 4
2 counts the number of right block boundary flat pixels of the block (N−1), and if the number is larger than the block boundary pixel detection number threshold value, the right block boundary flat pixel of the block (N−1). A right boundary processing determination signal is generated that validates the boundary processing for. Since the intra-block filter application flag is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0055】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴が無効でブロック(N)のブロック内フ
ィルタ適用フラグが有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段10によりフィルタ処理が実施される左ブロック境界
平坦画素を特定し、ブロック(N)の左ブロック境界符
号パターンのうち左ブロック境界平坦画素の位置に該当
する符号と、ブロック境界符号パターンのうち左ブロッ
ク境界平坦画素とそれに隣接するブロック(N−1)の
ブロック境界画素との間の位置に該当する符号とが同じ
であるかどうか検査する。符号が同じである場合、その
位置に該当するブロック(N)の左ブロック境界平坦画
素はブロック内画素フィルタ手段10の平滑化処理によ
り原画像に比べブロック境界の差分が大きくなるような
画素値を取る。境界画素判定手段42では、このような
ブロック(N)の左ブロック境界平坦画素の個数を数
え、その数がブロック境界画素検出個数しきい値より大
きい場合にブロック(N)の左ブロック境界画素につい
ての境界処理の実施を有効とする左境界処理判定信号を
生成する。ブロック(N−1)の右ブロック境界画素
(n−1)についてはブロック内フィルタ適用履歴が無
効であるため、境界処理の実施を無効とする右境界処理
判定信号を生成する。
(2) When the in-block filter application history of the block (N-1) is invalid and the in-block filter application flag of the block (N) is valid, the in-block flat portion pattern is referred to, and the block (N)
Of the left block boundary pixels, the left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and is located at the position of the left block boundary flat pixel in the left block boundary code pattern of the block (N). It is checked whether or not the corresponding code and the code corresponding to the position between the left block boundary flat pixel and the block boundary pixel of the block (N-1) adjacent thereto in the block boundary code pattern are the same. When the signs are the same, the left block boundary flat pixel of the block (N) corresponding to the position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. take. The boundary pixel determination means 42 counts the number of left block boundary flat pixels of such a block (N), and when the number is larger than the block boundary pixel detection number threshold value, the left block boundary pixel of the block (N) is determined. A left boundary processing determination signal that makes it effective to execute the boundary processing is generated. Since the intra-block filter application history is invalid for the right block boundary pixel (n-1) of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0056】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴とブロック(N)のブロック内フィルタ
適用フラグがともに有効である場合 右ブロック境界平坦パターンを参照しブロック(N−
1)の右ブロック境界画素の中でブロック内画素フィル
タ手段10によりフィルタ処理が実施される右ブロック
境界平坦画素を特定し、ブロック内平坦箇所パターンを
参照しブロック(N)の左ブロック境界画素の中でブロ
ック内画素フィルタ手段10によりフィルタ処理が実施
される左ブロック境界平坦画素を特定し、右ブロック境
界平坦画素と左ブロック境界平坦画素とがブロック境界
を挟んで隣接している箇所について、その位置に該当す
る位置のブロック境界符号パターンと、右ブロック境界
平坦画素に該当する位置の右ブロック境界符号パターン
と、左ブロック境界平坦画素に該当する位置の左ブロッ
ク境界符号パターンとを検査し、これら3つの符号が全
て同じであるかどうか検査する。符号が同じである場
合、その位置に該当するブロック(N−1)の右ブロッ
ク境界平坦画素およびブロック(N)の左ブロック境界
平坦画素は、ブロック内画素フィルタ手段の平滑化処理
により原画像に比べブロック境界の差分が大きくなるよ
うな画素値を取る。境界画素判定手段42では、このよ
うなブロック(N−1)の右ブロック境界平坦画素およ
びブロック(N)の左ブロック境界平坦画素の個数を数
え、それぞれの個数がブロック境界画素検出個数しきい
値より大きい場合にブロック(N−1)の右ブロック境
界平坦画素およびブロック(N)の左ブロック境界平坦
画素についての境界処理の実施を有効とする右境界処理
判定信号および左境界処理判定信号を生成する。
(3) When both the in-block filter application history of block (N-1) and the in-block filter application flag of block (N) are valid, the block (N-) is referred to the right block boundary flat pattern.
Among the right block boundary pixels of 1), the right block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and the in-block flat portion pattern is referred to to identify the left block boundary pixel of the block (N). Among them, the left block boundary flat pixels to be filtered by the in-block pixel filter means 10 are specified, and the right block boundary flat pixel and the left block boundary flat pixel are adjacent to each other across the block boundary. The block boundary code pattern at the position corresponding to the position, the right block boundary code pattern at the position corresponding to the right block boundary flat pixel, and the left block boundary code pattern at the position corresponding to the left block boundary flat pixel are inspected, and Check if all three signs are the same. When the signs are the same, the right block boundary flat pixel of the block (N-1) and the left block boundary flat pixel of the block (N) corresponding to the position are converted into the original image by the smoothing process of the in-block pixel filter means. Pixel values are taken so that the difference between the block boundaries becomes larger than that of the other blocks. The boundary pixel determining unit 42 counts the number of right block boundary flat pixels of the block (N−1) and the left block boundary flat pixels of the block (N), and the number of each block boundary pixel detection number threshold value. Generate a right boundary processing determination signal and a left boundary processing determination signal that enable execution of boundary processing for the right block boundary flat pixel of block (N-1) and the left block boundary flat pixel of block (N) when they are larger. To do.

【0057】境界画素処理手段13では、右境界画素選
択手段20において右境界処理判定信号に基づき、境界
処理の実施が有効である右ブロック境界画素について入
力画像メモリ1より読み出した原画像右ブロック境界画
素データ(n−1)を選択し、境界処理の実施が無効で
ある右ブロック境界画素について境界画素保持手段11
からの処理画像右境界画素データ(n−1′)を選択
し、画像出力手段14へ右ブロック境界出力データとし
て出力する。同様に、左境界画素選択手段21において
左境界処理判定信号に基づき、境界処理の実施が有効で
ある左ブロック境界画素について入力画像メモリ1より
読み出した原画像左ブロック境界画素データ(n)を選
択し、境界処理の実施が無効である左ブロック境界画素
について境界画素保持手段11からの処理画像左境界画
素データ(n′)を選択し、画像出力手段14へ左ブロ
ック境界出力データとして出力する。
In the boundary pixel processing means 13, based on the right boundary processing determination signal in the right boundary pixel selection means 20, the original image right block boundary read from the input image memory 1 for the right block boundary pixel for which the boundary processing is effective. The boundary pixel holding unit 11 selects the pixel data (n-1) and regards the right block boundary pixel for which the boundary processing is invalid.
The processed image right boundary pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 21 selects the original image left block boundary pixel data (n) read from the input image memory 1 for the left block boundary pixel for which the boundary processing is effective, based on the left boundary processing determination signal. Then, the processed image left boundary pixel data (n ′) from the boundary pixel holding unit 11 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output unit 14 as the left block boundary output data.

【0058】以上のように第2の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
の画素間差分の符号とブロック内フィルタ処理適用の可
否判定結果とブロック内平坦箇所情報とを用い、ブロッ
ク内フィルタ処理によりブロックの境界画素が原画像に
比べブロック境界の画素間差分を大きくするような画素
値を取り得るかどうかを予め検査し、そのようなブロッ
ク境界画素の個数がブロック境界画素検出個数しきい値
として与えられる一定のしきい値を超える場合に、ブロ
ック境界画素についてブロック内フィルタ処理画素の代
わりに原画像の境界画素を選択することでブロック境界
の画素間差分値が原画像に比べ大きくならないようにす
ることが可能となり、かつブロック境界に対する処理の
度合いを調整することが可能となり、高画質化を図るこ
とができる。
As described above, according to the second embodiment, the sign of the pixel difference between the original images of two adjacent blocks forming the block boundary, the in-block filter processing applicability determination result, and the in-block flat portion. Using information, it is preliminarily checked by the intra-block filtering process whether the pixel value of the boundary pixel of the block can be larger than that of the original image, and the number of such block boundary pixels. Is greater than a certain threshold value given as the threshold value for the number of detected block boundary pixels, by selecting the boundary pixel of the original image instead of the intra-block filter processed pixel for the block boundary pixel, It is possible to prevent the value from becoming larger than the original image, and adjust the degree of processing for block boundaries. Theft becomes possible, it is possible to achieve a high image quality.

【0059】(第3の実施形態)図5は、この発明の第
3の実施形態による画像処理装置の構成を示すブロック
図である。図5に示す画像処理装置は、図1に示した平
坦箇所パターン保持手段9および境界画素判定手段12
に代えて、平坦箇所パターン保持手段59と境界画素判
定手段62とを備える。その他の構成は、図1に示した
画像処理装置と同様である。
(Third Embodiment) FIG. 5 is a block diagram showing the arrangement of an image processing apparatus according to the third embodiment of the present invention. The image processing apparatus shown in FIG. 5 has the flat portion pattern holding means 9 and the boundary pixel determination means 12 shown in FIG.
Instead, the flat part pattern holding means 59 and the boundary pixel determining means 62 are provided. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0060】平坦箇所パターン保持手段59は、ブロッ
ク内平坦箇所パターンのうち右ブロック境界周辺のブロ
ック内平坦箇所パターンを保持し右ブロック境界周辺平
坦箇所パターンとして出力する。
The flat part pattern holding means 59 holds the flat part pattern in the block around the right block boundary among the flat part patterns in the block and outputs it as the flat part pattern around the right block boundary.

【0061】境界画素判定手段62は、左ブロック境界
符号パターンと右ブロック境界符号パターンとブロック
境界符号パターンとブロック内フィルタ適用フラグとブ
ロック内フィルタ適用履歴とブロック内平坦箇所パター
ンと右ブロック境界周辺平坦箇所パターンとに基づいて
処理対象ブロックと隣接ブロックとの境界画素への処理
を決定し、右境界処理判定信号および左境界処理判定信
号を生成する。
The boundary pixel determining means 62 determines the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat location pattern, and the right block boundary peripheral flatness. The processing for the boundary pixel between the block to be processed and the adjacent block is determined based on the location pattern, and the right boundary processing determination signal and the left boundary processing determination signal are generated.

【0062】平坦箇所パターン保持手段59は、ブロッ
ク(N)のブロック内平坦箇所パターン(n)のうち右
ブロック境界とその周辺のブロック内平坦箇所パターン
を1ブロック処理期間保持する。保持されたパターン
は、ブロック処理ステータスN+1(処理対象ブロック
=ブロックN+1、隣接ブロック=ブロックN)時に、
隣接ブロックの右ブロック境界周辺平坦箇所パターンと
して境界画素判定手段62へと出力される。
The flat portion pattern holding means 59 holds the flat portion in-block patterns around the right block boundary of the in-block flat portion pattern (n) of the block (N) for one block processing period. The held pattern is, when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N),
The pattern is output to the boundary pixel determination means 62 as a flat pattern around the right block boundary of the adjacent block.

【0063】境界画素判定手段62では、ブロック処理
ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴(n−1)
と、ブロック内フィルタ適用判定手段6からのブロック
(N)のブロック内フィルタ適用フラグ(n)の両方ま
たはどちらかが有効である場合に、ブロック処理ステー
タスN―1(処理対象ブロック=ブロックN−1、隣接
ブロック=ブロックN−2)時にブロック内平坦箇所検
出手段7により生成され平坦箇所パターン保持手段59
にて保持されているブロック(N―1)の右ブロック境
界周辺平坦箇所パターン(n−1)と、ブロック内平坦
箇所検出手段7からのブロック(N)のブロック内平坦
箇所パターン(n)と、画素間差分符号算出手段4から
のブロック(N−1)の右ブロック境界符号パターン
(n−1)と、ブロック(N−1)とブロック(N)と
のブロック境界のブロック境界符号パターンと、ブロッ
ク(N)の左ブロック境界符号パターン(n)とを参照
し、ブロック(N−1)の右ブロック境界画素およびブ
ロック(N)の左ブロック境界画素の境界処理の判定を
行う。
In the boundary pixel determining means 62, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history (n−) of the block (N−1) generated by the in-block filter application determination unit 6 and held by the in-block filter application flag holding unit 8 1)
And either or both of the in-block filter application flags (n) of the block (N) from the in-block filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N- 1. Adjacent block = block N−2), the flat portion pattern holding means 59 generated by the flat portion inside block detecting means 7
A right block boundary peripheral flat portion pattern (n-1) of the block (N-1) held in the block and a block flat portion pattern (n) of the block (N) from the intra-block flat portion detecting means 7; , The right block boundary code pattern (n-1) of the block (N-1) from the inter-pixel difference code calculating means 4, and the block boundary code pattern of the block boundary between the block (N-1) and the block (N). , And the left block boundary code pattern (n) of the block (N), the boundary processing of the right block boundary pixel of the block (N−1) and the left block boundary pixel of the block (N) is determined.

【0064】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴(n−1)が有効で
ブロック(N)のブロック内フィルタ適用フラグ(n)
が無効である場合、(2)ブロック(N−1)のブロッ
ク内フィルタ適用履歴(n−1)が無効でブロック
(N)のブロック内フィルタ適用フラグ(n)が有効で
ある場合、(3)ブロック(N−1)のブロック内フィ
ルタ適用履歴(n−1)とブロック(N)のブロック内
フィルタ適用フラグ(n)がともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
In-block filter application history (n-1) of 1) is valid, and in-block filter application flag (n) of block (N)
Is invalid, (2) If the in-block filter application history (n-1) of the block (N-1) is invalid and the in-block filter application flag (n) of the block (N) is valid, (3) ) The case where both the in-block filter application history (n-1) of the block (N-1) and the in-block filter application flag (n) of the block (N) are valid will be described separately.

【0065】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が有効で、ブロック(N)の
ブロック内フィルタ適用フラグ(n)が無効である場
合、右ブロック境界周辺平坦箇所パターンを参照し、ブ
ロック(N−1)の右ブロック境界画素の中でブロック
内画素フィルタ手段10によりフィルタ処理が実施され
る右ブロック境界平坦画素を特定し、右ブロック境界平
坦画素から左に所定の数以上連続して平坦である場合に
ブロック(N−1)の右ブロック境界符号パターン(n
−1)のうち右ブロック境界平坦画素の位置に該当する
符号と、ブロック境界符号パターンのうち右ブロック境
界平坦画素とそれに隣接するブロック(N)とのブロッ
ク境界画素との間の位置に該当する符号とが同じである
かどうか検査する。符号が同じである場合、その位置に
該当するブロック(N−1)の右ブロック境界平坦画素
はブロック内画素フィルタ手段10の平滑化処理により
原画像に比べブロック境界の差分が大きくなるような画
素値を取る。境界画素判定手段62では、このようなブ
ロック(N−1)の右ブロック境界平坦画素についての
境界処理の実施を有効とする右境界処理判定信号を生成
する。ブロック(N)の左ブロック境界画素については
ブロック内フィルタ適用フラグ(n)が無効であるた
め、境界処理の実施を無効とする左境界処理判定信号を
生成する。
(1) When the in-block filter application history (n-1) of the block (N-1) is valid and the in-block filter application flag (n) of the block (N) is invalid, around the right block boundary By referring to the flat part pattern, the right block boundary flat pixel to be filtered by the intra-block pixel filter means 10 is specified among the right block boundary pixels of the block (N−1), and the right block boundary flat pixel is moved to the left. In the right block boundary code pattern (n
-1) A code corresponding to the position of the right block boundary flat pixel, and a position between the right block boundary flat pixel and the block boundary pixel of the block (N) adjacent thereto in the block boundary code pattern. Check if the signs are the same. If the signs are the same, the right block boundary flat pixel of the block (N-1) corresponding to that position is a pixel whose difference in block boundary becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. Take a value. The boundary pixel determination unit 62 generates a right boundary processing determination signal that makes it effective to perform the boundary processing on the right block boundary flat pixel of the block (N−1). Since the in-block filter application flag (n) is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0066】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が無効でブロック(N)のブ
ロック内フィルタ適用フラグ(n)が有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段10によりフィルタ処理が実施される左ブロック境界
平坦画素を特定し、左ブロック境界平坦画素から右に所
定の数以上連続して平坦である場合にブロック(N)の
左ブロック境界符号パターン(n)のうち左ブロック境
界平坦画素の位置に該当する符号と、ブロック境界符号
パターンのうち左ブロック境界平坦画素とそれに隣接す
るブロック(N−1)のブロック境界画素との間の位置
に該当する符号とが同じであるかどうか検査する。符号
が同じである場合、その位置に該当するブロック(N)
の左ブロック境界平坦画素はブロック内画素フィルタ手
段10の平滑化処理により原画像に比べブロック境界の
差分が大きくなるような画素値を取る。境界画素判定手
段62では、このようなブロック(N)の左ブロック境
界平坦画素についての境界処理の実施を有効とする左境
界処理判定信号を生成する。ブロック(N−1)の右ブ
ロック境界画素についてはブロック内フィルタ適用履歴
(n−1)が無効であるため、境界処理の実施を無効と
する右境界処理判定信号を生成する。
(2) When the in-block filter application history (n-1) of the block (N-1) is invalid and the in-block filter application flag (n) of the block (N) is valid Reference and block (N)
Of the left block boundary pixels, the left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and if the left block boundary flat pixel is continuously flat to the right by a predetermined number or more, The code corresponding to the position of the left block boundary flat pixel in the left block boundary code pattern (n) of the block (N) and the left block boundary flat pixel of the block boundary code pattern and the adjacent block (N-1) of the block boundary code pattern It is checked whether the code corresponding to the position with the block boundary pixel is the same. If the signs are the same, the block (N) corresponding to that position
The left flat pixel of the block boundary has a pixel value such that the difference in the block boundary becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. The boundary pixel determining means 62 generates a left boundary processing determination signal that makes it effective to perform the boundary processing on the left block boundary flat pixels of the block (N). Since the intra-block filter application history (n-1) is invalid for the right block boundary pixel of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0067】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)とブロック(N)のブロック
内フィルタ適用フラグ(n)がともに有効である場合 右ブロック境界周辺平坦箇所パターンを参照しブロック
(N−1)の右ブロック境界画素の中でブロック内画素
フィルタ手段10によりフィルタ処理が実施される右ブ
ロック境界平坦画素を特定し、ブロック内平坦箇所パタ
ーンを参照しブロック(N)の左ブロック境界画素の中
でブロック内画素フィルタ手段10によりフィルタ処理
が実施される左ブロック境界平坦画素を特定し、右ブロ
ック境界平坦画素から左に所定の数以上連続して平坦で
ある場合または左ブロック境界平坦画素から右に所定の
数以上連続して平坦である場合に、右ブロック境界平坦
画素と左ブロック境界平坦画素とがブロック境界を挟ん
で隣接している箇所について、その位置に該当する位置
のブロック境界符号パターンと、その右ブロック境界平
坦画素に該当する位置の右ブロック境界符号パターン
(n−1)と、その左ブロック境界平坦画素に該当する
位置の左ブロック境界符号パターン(n)とを検査し、
これら3つの符号が全て同じであるかどうか検査する。
符号が同じである場合、その位置に該当するブロック
(N−1)の右ブロック境界平坦画素およびブロック
(N)の左ブロック境界平坦画素は、ブロック内画素フ
ィルタ手段10の平滑化処理により原画像に比べブロッ
ク境界の差分が大きくなるような画素値を取る。境界画
素判定手段62では、このようなブロック(N−1)の
右ブロック境界平坦画素およびブロック(N−1)の左
ブロック境界平坦画素についての境界処理の実施を有効
とする右境界処理判定信号および左境界処理判定信号を
生成する。
(3) When the in-block filter application history (n-1) of block (N-1) and the in-block filter application flag (n) of block (N) are both valid Flat pattern around the right block boundary Of the right block boundary pixels of the block (N-1), the right block boundary flat pixel to be filtered by the intra-block pixel filter means 10 is specified, and the intra-block flat portion pattern is referred to for the block (N When a left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified among the left block boundary pixels in (4), and a predetermined number or more of them are continuously flat to the left from the right block boundary flat pixel. Or, if the left block boundary flat pixel is continuously flat to the right by a predetermined number or more, the right block boundary flat pixel and the left block boundary are flat. Regarding a location where a flat pixel and a flat pixel are adjacent to each other across a block boundary, a block boundary code pattern at a position corresponding to the position and a right block boundary code pattern (n-1) at a position corresponding to the right block boundary flat pixel And the left block boundary code pattern (n) at a position corresponding to the left block boundary flat pixel,
Check if all three codes are the same.
When the signs are the same, the right block boundary flat pixel of the block (N−1) and the left block boundary flat pixel of the block (N) corresponding to the position are the original image by the smoothing process of the in-block pixel filter means 10. Pixel values are taken so that the difference between the block boundaries is larger than that of. In the boundary pixel determination means 62, a right boundary processing determination signal that validates the boundary processing for the right block boundary flat pixel of the block (N-1) and the left block boundary flat pixel of the block (N-1). And a left boundary processing determination signal is generated.

【0068】境界画素処理手段13では、右境界画素選
択手段20において右境界処理判定信号に基づき、境界
処理の実施が有効である右ブロック境界画素について入
力画像メモリ1より読み出した原画像右ブロック境界画
素データ(n−1)を選択し、境界処理の実施が無効で
ある右ブロック境界画素について境界画素保持手段11
からの処理画像右境界画素データ(n−1′)を選択
し、画像出力手段14へ右ブロック境界出力データとし
て出力する。同様に、左境界画素選択手段21において
左境界処理判定信号に基づき、境界処理の実施が有効で
ある左ブロック境界画素について入力画像メモリ1より
読み出した原画像左ブロック境界画素データ(n)を選
択し、境界処理の実施が無効である左ブロック境界画素
について境界画素保持手段11からの処理画像左境界画
素データ(n′)を選択し、画像出力手段14へ左ブロ
ック境界出力データとして出力する。
In the boundary pixel processing means 13, based on the right boundary processing determination signal in the right boundary pixel selection means 20, the original image right block boundary read from the input image memory 1 for the right block boundary pixel for which the boundary processing is effective. The boundary pixel holding unit 11 selects the pixel data (n-1) and regards the right block boundary pixel for which the boundary processing is invalid.
The processed image right boundary pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 21 selects the original image left block boundary pixel data (n) read from the input image memory 1 for the left block boundary pixel for which the boundary processing is effective, based on the left boundary processing determination signal. Then, the processed image left boundary pixel data (n ′) from the boundary pixel holding unit 11 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output unit 14 as the left block boundary output data.

【0069】以上のように第3の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
の画素間差分の符号とブロック内フィルタ処理適用の可
否判定結果とブロック内平坦箇所情報とを用い、ブロッ
ク内フィルタ処理によりブロック境界画素が原画像に比
べブロック境界の画素間差分を大きくするような画素値
を取り得るかどうかを予め検査し、そのようなブロック
境界画素の周辺が平坦である場合にブロック境界画素に
ついてブロック内フィルタ処理画素の代わりに原画像の
境界画素を選択することで、歪みが生じた場合に視覚的
に目立ち易い平坦なブロック境界について画素間差分値
が原画像に比べ大きくならないようにすることが可能と
なるため、高画質化を図ることができる。
As described above, according to the third embodiment, the sign of the pixel difference between the original images of the two adjacent blocks forming the block boundary, the in-block filter processing applicability determination result, and the in-block flat portion. By using the information, it is inspected in advance whether or not the block boundary pixel can take a pixel value that makes the difference between pixels of the block boundary larger than that of the original image by the intra-block filtering process. When the pixel is flat, by selecting the boundary pixel of the original image instead of the intra-block filter pixel for the block boundary pixel, the pixel difference value of the flat block boundary that is easily visually noticeable when distortion occurs Since it is possible to prevent the image from becoming larger than the image, high image quality can be achieved.

【0070】(第4の実施形態)図6は、この発明の第
4の実施形態による画像処理装置の構成を示すブロック
図である。図6に示す画像処理装置は、図1に示した平
坦箇所パターン保持手段9および境界画素判定手段12
に代えて、平坦箇所パターン保持手段79と境界画素判
定手段82とを備える。その他の構成は、図1に示した
画像処理装置と同様である。
(Fourth Embodiment) FIG. 6 is a block diagram showing the arrangement of an image processing apparatus according to the fourth embodiment of the present invention. The image processing apparatus shown in FIG. 6 has the flat portion pattern holding means 9 and the boundary pixel determination means 12 shown in FIG.
Instead of this, the flat portion pattern holding means 79 and the boundary pixel determination means 82 are provided. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0071】平坦箇所パターン保持手段79は、ブロッ
ク内平坦箇所パターンのうち右ブロック境界周辺のブロ
ック内平坦箇所パターンを保持し右ブロック境界周辺平
坦箇所パターンとして出力する。
The flat spot pattern holding means 79 holds the flat spot pattern in the block around the right block boundary among the flat spot patterns in the block and outputs it as the flat spot pattern around the right block boundary.

【0072】境界画素判定手段82は、左ブロック境界
符号パターンと右ブロック境界符号パターンとブロック
境界符号パターンとブロック内フィルタ適用フラグとブ
ロック内フィルタ適用履歴とブロック内平坦箇所パター
ンと右ブロック境界周辺平坦箇所パターンとブロック境
界画素検出個数しきい値とに基づいて処理対象ブロック
と隣接ブロックとの境界画素への処理を決定し、右境界
処理判定信号および左境界処理判定信号を生成する。
The boundary pixel determining means 82 is a left block boundary code pattern, a right block boundary code pattern, a block boundary code pattern, an in-block filter application flag, an in-block filter application history, an in-block flat location pattern, and a right block boundary peripheral flat. Based on the location pattern and the block boundary pixel detection number threshold value, the processing for the boundary pixel between the block to be processed and the adjacent block is determined, and the right boundary processing determination signal and the left boundary processing determination signal are generated.

【0073】平坦箇所パターン保持手段79は、ブロッ
ク(N)のブロック内平坦箇所パターン(n)のうち右
ブロック境界とその周辺のブロック内平坦箇所パターン
を1ブロック処理期間保持する。保持されたパターン
は、ブロック処理ステータスN+1(処理対象ブロック
=ブロックN+1、隣接ブロック=ブロックN)時に、
隣接ブロックの右ブロック境界周辺平坦箇所パターンと
して境界画素判定手段82へと出力される。
The flat portion pattern holding means 79 holds the flat portion in-block patterns on the right block boundary and the peripheral portion of the in-block flat portion pattern (n) of the block (N) for one block processing period. The held pattern is, when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N),
The pattern is output to the boundary pixel determination means 82 as a flat pattern around the right block boundary of the adjacent block.

【0074】境界画素判定手段82では、ブロック処理
ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴と、ブロック
内フィルタ適用判定手段6からのブロック(N)のブロ
ック内フィルタ適用フラグの両方またはどちらかが有効
である場合に、ブロック処理ステータスN―1(処理対
象ブロック=ブロックN−1、隣接ブロック=ブロック
N−2)時にブロック内平坦箇所検出手段7により生成
され平坦箇所パターン保持手段79にて保持されている
ブロック(N―1)の右ブロック境界周辺平坦パターン
と、ブロック内平坦箇所検出手段7からのブロック
(N)のブロック内平坦箇所パターン(n)と、画素間
差分符号算出手段4からのブロック(N−1)の右ブロ
ック境界符号パターン(n−1)と、ブロック(N−
1)とブロック(N)とのブロック境界のブロック境界
符号パターンと、ブロック(N)の左ブロック境界符号
パターンとを参照し、ブロック(N−1)の右ブロック
境界画素およびブロック(N)の左ブロック境界画素の
境界処理の判定を行う。
In the boundary pixel judging means 82, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history of the block (N−1) generated by the in-block filter application determination means 6 and held in the in-block filter application flag holding means 8, and the block When either or both of the block internal filter application flags of the block (N) from the internal filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N-1, adjacent block = block) At the time of (N-2), the flat pattern around the right block boundary of the block (N-1) generated by the in-block flat portion detecting means 7 and held by the flat portion pattern holding means 79 and the in-block flat portion detecting means 7 From the intra-block flat portion pattern (n) of the block (N) of FIG. Right block boundary code patterns of the block (N-1) and (n-1), blocks (N-
1) Referring to the block boundary code pattern of the block boundary between the block (N) and the left block boundary code pattern of the block (N), the right block boundary pixel of the block (N−1) and the block boundary code of the block (N) are referred to. The boundary processing of the left block boundary pixel is determined.

【0075】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴が有効でブロック
(N)のブロック内フィルタ適用フラグが無効である場
合、(2)ブロック(N−1)のブロック内フィルタ適
用履歴が無効でブロック(N)のブロック内フィルタ適
用フラグが有効である場合、(3)ブロック(N−1)
のブロック内フィルタ適用履歴とブロック(N)のブロ
ック内フィルタ適用フラグがともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
When the in-block filter application history of 1) is valid and the in-block filter application flag of block (N) is invalid, (2) the in-block filter application history of block (N-1) is invalid and the block (N) of block (N) is When the in-block filter application flag is valid, (3) block (N-1)
The in-block filter application history and the in-block filter application flag of block (N) will be separately described.

【0076】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴が有効で、ブロック(N)のブロック内
フィルタ適用フラグが無効である場合 右ブロック境界周辺平坦パターンを参照し、ブロック
(N−1)の右ブロック境界画素の中でブロック内画素
フィルタ手段10によりフィルタ処理が実施される右ブ
ロック境界平坦画素を特定し、ブロック(N−1)の右
ブロック境界符号パターン(n−1)のうち右ブロック
境界平坦画素の位置に該当する符号と、ブロック境界符
号パターンのうち右ブロック境界平坦画素とそれに隣接
するブロック(N)のブロック境界画素との間の位置に
該当する符号とが同じであるかどうか検査する。符号が
同じである場合、その位置に該当するブロック(N−
1)の右ブロック境界平坦画素はブロック内画素フィル
タ手段10の平滑化処理により原画像に比べブロック境
界の差分が大きくなるような画素値を取る。境界画素判
定手段82では、このようなブロック(N−1)の右ブ
ロック境界平坦画素の個数を数え、その数がブロック境
界画素検出個数しきい値より大きい場合にブロック(N
−1)の右ブロック境界平坦画素についての境界処理の
実施を有効とする右境界処理判定信号を生成する。ブロ
ック(N)の左ブロック境界画素についてはブロック内
フィルタ適用フラグが無効であるため、境界処理の実施
を無効とする左境界処理判定信号を生成する。
(1) When the in-block filter application history of the block (N-1) is valid and the in-block filter application flag of the block (N) is invalid, the right block boundary peripheral flat pattern is referred to, and the block (N Among the right block boundary pixels of -1), the right block boundary flat pixel to be filtered by the in-block pixel filter unit 10 is specified, and the right block boundary code pattern (n-1) of the block (N-1) is specified. The code corresponding to the position of the right block boundary flat pixel is the same as the code corresponding to the position between the right block boundary flat pixel and the block boundary pixel of the adjacent block (N) in the block boundary code pattern. Inspect. If the signs are the same, the block (N-
The right block boundary flat pixel of 1) has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing processing by the in-block pixel filter means 10. The boundary pixel determination unit 82 counts the number of right block boundary flat pixels of such a block (N−1), and if the number is larger than the block boundary pixel detection number threshold value, the block (N
A right boundary processing determination signal that makes it effective to execute the boundary processing for the right block boundary flat pixel in (1) is generated. Since the intra-block filter application flag is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0077】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴が無効でブロック(N)のブロック内フ
ィルタ適用フラグが有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段10によりフィルタ処理が実施される左ブロック境界
平坦画素を特定し、ブロック(N)の左ブロック境界符
号パターンのうち左ブロック境界平坦画素の位置に該当
する符号と、ブロック境界符号パターンのうち左ブロッ
ク境界平坦画素とそれに隣接するブロック(N−1)の
ブロック境界画素との間の位置に該当する符号とが同じ
であるかどうか検査する。符号が同じである場合、その
位置に該当するブロック(N)の左ブロック境界平坦画
素はブロック内画素フィルタ手段10の平滑化処理によ
り原画像に比べブロック境界の差分が大きくなるような
画素値を取る。境界画素判定手段82では、このような
ブロック(N)の左ブロック境界平坦画素の個数を数
え、その数がブロック境界画素検出個数しきい値より大
きい場合にブロック(N)の左ブロック境界画素につい
ての境界処理の実施を有効とする左境界処理判定信号を
生成する。ブロック(N−1)の右ブロック境界画素
(n−1)についてはブロック内フィルタ適用履歴が無
効であるため、境界処理の実施を無効とする右境界処理
判定信号を生成する。
(2) When the in-block filter application history of the block (N-1) is invalid and the in-block filter application flag of the block (N) is valid, the in-block flat portion pattern is referred to, and the block (N)
Of the left block boundary pixels, the left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and is located at the position of the left block boundary flat pixel in the left block boundary code pattern of the block (N). It is checked whether or not the corresponding code and the code corresponding to the position between the left block boundary flat pixel and the block boundary pixel of the block (N-1) adjacent thereto in the block boundary code pattern are the same. When the signs are the same, the left block boundary flat pixel of the block (N) corresponding to the position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. take. The boundary pixel determining unit 82 counts the number of left block boundary flat pixels of such a block (N), and when the number is larger than the block boundary pixel detection number threshold value, the left block boundary pixel of the block (N) is determined. A left boundary processing determination signal that makes it effective to execute the boundary processing is generated. Since the intra-block filter application history is invalid for the right block boundary pixel (n-1) of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0078】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴とブロック(N)のブロック内フィルタ
適用フラグがともに有効である場合 右ブロック境界周辺平坦箇所パターンを参照しブロック
(N−1)の右ブロック境界画素の中でブロック内画素
フィルタ手段10によりフィルタ処理が実施される右ブ
ロック境界平坦画素を特定し、ブロック内平坦箇所パタ
ーンを参照しブロック(N)の左ブロック境界画素の中
でブロック内画素フィルタ手段10によりフィルタ処理
が実施される左ブロック境界平坦画素を特定し、右ブロ
ック境界平坦画素と左ブロック境界平坦画素がブロック
境界を挟んで隣接している箇所について、その位置に該
当する位置のブロック境界符号パターンと、右ブロック
境界平坦画素に該当する位置の右ブロック境界符号パタ
ーンと、左ブロック境界平坦画素に該当する位置の左ブ
ロック境界符号パターンとを検査し、これら3つの符号
が全て同じであるかどうか検査する。符号が同じである
場合、その位置に該当するブロック(N−1)の右ブロ
ック境界平坦画素およびブロック(N)の左ブロック境
界平坦画素は、ブロック内画素フィルタ手段10の平滑
化処理により原画像に比べブロック境界の差分が大きく
なるような画素値を取る。境界画素判定手段82では、
このようなブロック(N−1)の右ブロック境界平坦画
素およびブロック(N)の左ブロック境界平坦画素の個
数を数え、それぞれの個数がブロック境界画素検出個数
しきい値より大きい場合にブロック(N−1)の右ブロ
ック境界平坦画素およびブロック(N)の左ブロック境
界平坦画素についての境界処理の実施を有効とする右境
界処理判定信号および左境界処理判定信号を生成する。
(3) When both the in-block filter application history of the block (N-1) and the in-block filter application flag of the block (N) are valid, the block (N-1) around the right block boundary peripheral flat pattern is referred to. ) Of the right block boundary pixels, the right block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and the flat position pattern in the block is referred to to identify the left block boundary pixel of the block (N). At, the left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and at the position where the right block boundary flat pixel and the left block boundary flat pixel are adjacent to each other across the block boundary, The block boundary code pattern at the corresponding position and the right block at the position corresponding to the right block boundary flat pixel And click boundary code patterns, and examines the left block boundary code pattern positions corresponding to the left block boundary flat pixel, the three codes to check whether all the same. When the signs are the same, the right block boundary flat pixel of the block (N−1) and the left block boundary flat pixel of the block (N) corresponding to the position are the original image by the smoothing process of the in-block pixel filter means 10. Pixel values are taken so that the difference between the block boundaries is larger than that of. In the boundary pixel determination means 82,
The number of the right block boundary flat pixels of the block (N-1) and the left block boundary flat pixel of the block (N) is counted, and if each number is larger than the block boundary pixel detection number threshold value, the block (N A right boundary processing determination signal and a left boundary processing determination signal that enable execution of boundary processing for the right block boundary flat pixel of (-1) and the left block boundary flat pixel of block (N) are generated.

【0079】境界画素処理手段13では、右境界画素選
択手段20において右境界処理判定信号に基づき、境界
処理の実施が有効である右ブロック境界画素について入
力画像メモリ1より読み出した原画像右ブロック境界画
素データ(n−1)を選択し、境界処理の実施が無効で
ある右ブロック境界画素について境界画素保持手段11
からの処理画像右境界画素データ(n−1′)を選択
し、画像出力手段14へ右ブロック境界出力データとし
て出力する。同様に、左境界画素選択手段21において
左境界処理判定信号に基づき、境界処理の実施が有効で
ある左ブロック境界画素について入力画像メモリ1より
読み出した原画像左ブロック境界画素データ(n)を選
択し、境界処理の実施が無効である左ブロック境界画素
について境界画素保持手段11からの処理画像左境界画
素データ(n′)を選択し、画像出力手段14へ左ブロ
ック境界出力データとして出力する。
In the boundary pixel processing means 13, based on the right boundary processing determination signal in the right boundary pixel selection means 20, the original image right block boundary read from the input image memory 1 for the right block boundary pixel for which the boundary processing is effective. The boundary pixel holding unit 11 selects the pixel data (n-1) and regards the right block boundary pixel for which the boundary processing is invalid.
The processed image right boundary pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 21 selects the original image left block boundary pixel data (n) read from the input image memory 1 for the left block boundary pixel for which the boundary processing is effective, based on the left boundary processing determination signal. Then, the processed image left boundary pixel data (n ′) from the boundary pixel holding unit 11 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output unit 14 as the left block boundary output data.

【0080】以上のように第4の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
の画素間差分の符号とブロック内フィルタ処理適用の可
否判定結果とブロック内平坦箇所情報とを用い、ブロッ
ク内フィルタ処理によりブロック境界画素が原画像に比
べブロック境界の画素間差分を大きくするような画素値
を取り得るかどうかを予め検査し、そのようなブロック
境界画素の周辺が平坦である場合に、そのようなブロッ
ク境界画素の数がブロック境界画素検出個数しきい値と
して与えられる一定のしきい値を超える場合に、ブロッ
ク境界画素についてブロック内フィルタ処理画素の代わ
りに原画像の境界画素を選択することで、歪みが生じた
場合に視覚的に目立ち易い平坦なブロック境界の画素間
差分値が原画像に比べ大きくならないようにすることが
可能となり、ブロック境界処理の度合いを調整すること
が可能となり、高画質化を図ることができる。
As described above, according to the fourth embodiment, the sign of the difference between pixels of the original images of the two adjacent blocks forming the block boundary, the result of determination as to whether or not the intra-block filtering process can be applied, and the intra-block flat portion. By using the information, it is inspected in advance whether or not the block boundary pixel can take a pixel value that makes the difference between pixels of the block boundary larger than that of the original image by the intra-block filtering process. When flat, if the number of such block boundary pixels exceeds a certain threshold given as the block boundary pixel detection count threshold, the original image instead of the intrablock filtered pixels for the block boundary pixels. By selecting the boundary pixel of, the difference value between pixels of the flat block boundary, which is easily visually noticeable when distortion occurs, becomes the original image. Base become not so it becomes possible to largely, it is possible to adjust the degree of the block boundary processing, thereby achieving a high display quality.

【0081】(第5の実施形態)図7は、この発明の第
5の実施形態による画像処理装置の構成を示すブロック
図である。図7に示す画像処理装置は、図1に示した平
坦箇所パターン保持手段9および境界画素判定手段12
に代えて平坦箇所パターン保持手段99および境界画素
判定手段102を備え、さらに画素間差分値算出手段9
5を備える。その他の構成は、図1に示した画像処理装
置と同様である。
(Fifth Embodiment) FIG. 7 is a block diagram showing the arrangement of an image processing apparatus according to the fifth embodiment of the present invention. The image processing apparatus shown in FIG. 7 has the flat portion pattern holding means 9 and the boundary pixel determination means 12 shown in FIG.
Instead of the above, a flat portion pattern holding means 99 and a boundary pixel determination means 102 are provided, and further the inter-pixel difference value calculation means 9 is provided.
5 is provided. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0082】画素間差分値算出手段95は、入力画像メ
モリ1より読み出した処理対象ブロックデータの左ブロ
ック境界画素と隣接ブロックデータの原画像右ブロック
境界画素データの隣接する画素同士の差分を算出し、ブ
ロック境界差分値として出力する。
The inter-pixel difference value calculation means 95 calculates the difference between the left block boundary pixel of the processing target block data read from the input image memory 1 and the adjacent pixel of the original image right block boundary pixel data of the adjacent block data. , As a block boundary difference value.

【0083】平坦箇所パターン保持手段99は、ブロッ
ク内平坦箇所パターンのうち右ブロック境界周辺のブロ
ック内平坦箇所パターンを保持し右ブロック境界周辺平
坦箇所パターンとして出力する。
The flat spot pattern holding means 99 holds the flat spot pattern in the block around the right block boundary among the flat spot patterns in the block and outputs it as the flat spot pattern around the right block boundary.

【0084】境界画素判定手段102は、左ブロック境
界符号パターンと右ブロック境界符号パターンとブロッ
ク境界符号パターンとブロック内フィルタ適用フラグと
ブロック内フィルタ適用履歴とブロック内平坦箇所パタ
ーンと右ブロック境界周辺平坦箇所パターンとブロック
内平坦箇所パターンとブロック境界差分値とブロック境
界差分しきい値とに基づいて処理対象ブロックと隣接ブ
ロックの境界画素への処理を決定し、右境界処理判定信
号および左境界処理判定信号を生成する。
The boundary pixel determining means 102 determines the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat location pattern, and the right block boundary peripheral flat. The processing for the boundary pixel between the block to be processed and the adjacent block is determined based on the location pattern, the flat location pattern in the block, the block boundary difference value, and the block boundary difference threshold, and the right boundary processing determination signal and the left boundary processing determination are performed. Generate a signal.

【0085】画素間差分値算出手段95では、画素間差
分符号算出手段4にて生成される隣接ブロック(N−
1)の境界画素メモリアドレス(n−1)により入力画
像メモリ1から出力されるブロック(N−1)の原画像
右ブロック境界画素データ(n−1)と、アドレス生成
手段3にて生成されるブロック(N)の処理対象ブロッ
クメモリアドレス(n)により入力画像メモリ1から出
力される処理対象ブロック画像データ(n)の左ブロッ
ク境界画素について隣接する画素同士の差分値を算出
し、ブロック境界差分値として境界画素判定手段102
へ出力する。
In the inter-pixel difference value calculating means 95, the adjacent blocks (N-
The original image right block boundary pixel data (n-1) of the block (N-1) output from the input image memory 1 by the boundary pixel memory address (n-1) of 1) and the address generating means 3 generate the same. The difference value between adjacent pixels is calculated for the left block boundary pixel of the processing target block image data (n) output from the input image memory 1 by the processing target block memory address (n) of the block (N) Boundary pixel determination means 102 as a difference value
Output to.

【0086】平坦箇所パターン保持手段99は、ブロッ
ク(N)のブロック内平坦箇所パターン(n)のうち右
ブロック境界とその周辺のブロック内平坦箇所パターン
を1ブロック処理期間保持する。保持されたパターン
は、ブロック処理ステータスN+1(処理対象ブロック
=ブロックN+1、隣接ブロック=ブロックN)時に、
隣接ブロックの右ブロック境界周辺平坦箇所パターンと
して境界画素判定手段102へと出力される。
The flat portion pattern holding means 99 holds the flat portion inside block portion pattern (n) of the block (N) and the block inside flat portion pattern portions around the right block boundary for one block processing period. The held pattern is, when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N),
It is output to the boundary pixel determination means 102 as a pattern around the right block boundary of the adjacent block.

【0087】境界画素判定手段102では、ブロック処
理ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴(n−1)
と、ブロック内フィルタ適用判定手段6からのブロック
(N)のブロック内フィルタ適用フラグ(n)の両方ま
たはどちらかが有効である場合に、ブロック処理ステー
タスN―1(処理対象ブロック=ブロックN−1、隣接
ブロック=ブロックN−2)時にブロック内平坦箇所検
出手段7により生成され平坦箇所パターン保持手段99
にて保持されているブロック(N―1)の右ブロック境
界周辺平坦箇所パターン(n−1)と、ブロック内平坦
箇所検出手段7からのブロック(N)のブロック内平坦
箇所パターン(n)と、画素間差分値算出手段95から
のブロック境界差分値と、画素間差分符号算出手段4か
らのブロック(N−1)の右ブロック境界符号パターン
(n−1)と、ブロック(N−1)とブロック(N)の
ブロック境界のブロック境界符号パターンと、ブロック
(N)の左ブロック境界符号パターン(n)とを参照
し、ブロック(N−1)の右ブロック境界画素およびブ
ロック(N)の左ブロック境界画素の境界処理の判定を
行う。
In the boundary pixel determining means 102, the block processing status N-1 (processing target block = block N-)
1, adjacent block = block N−2), the in-block filter application history (n−) of the block (N−1) generated by the in-block filter application determination unit 6 and held by the in-block filter application flag holding unit 8 1)
And either or both of the in-block filter application flags (n) of the block (N) from the in-block filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N- 1, adjacent block = block N-2), the flat portion pattern holding means 99 generated by the flat portion inside block detecting means 7
A right block boundary peripheral flat portion pattern (n-1) of the block (N-1) held in the block and a block flat portion pattern (n) of the block (N) from the intra-block flat portion detecting means 7; , The block boundary difference value from the inter-pixel difference value calculating means 95, the right block boundary code pattern (n-1) of the block (N-1) from the inter-pixel difference code calculating means 4, and the block (N-1). And the left block boundary code pattern (n) of the block (N) with reference to the block boundary code pattern of the block boundary of the block (N), and the right block boundary pixel of the block (N-1) and the block (N) of the block (N). The boundary processing of the left block boundary pixel is determined.

【0088】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴(n−1)が有効で
ブロック(N)のブロック内フィルタ適用フラグ(n)
が無効である場合、(2)ブロック(N−1)のブロッ
ク内フィルタ適用履歴(n−1)が無効でブロック
(N)のブロック内フィルタ適用フラグ(n)が有効で
ある場合、(3)ブロック(N−1)のブロック内フィ
ルタ適用履歴(n−1)とブロック(N)のブロック内
フィルタ適用フラグ(n)がともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
In-block filter application history (n-1) of 1) is valid, and in-block filter application flag (n) of block (N)
Is invalid, (2) If the in-block filter application history (n-1) of the block (N-1) is invalid and the in-block filter application flag (n) of the block (N) is valid, (3) ) The case where both the in-block filter application history (n-1) of the block (N-1) and the in-block filter application flag (n) of the block (N) are valid will be described separately.

【0089】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が有効で、ブロック(N)の
ブロック内フィルタ適用フラグ(n)が無効である場合 右ブロック境界周辺平坦箇所パターンを参照し、ブロッ
ク(N−1)の右ブロック境界画素の中でブロック内画
素フィルタ手段10によりフィルタ処理が実施される右
ブロック境界平坦画素を特定し、右ブロック境界平坦画
素から左に所定の数以上連続して平坦であり、かつブロ
ック境界差分値のうち右ブロック境界平坦画素と右ブロ
ック境界平坦画素の右に隣接するブロック(N)の左ブ
ロック境界画素との画素間差分値がブロック境界差分し
きい値として与えられる第1のしきい値より大きく第2
のしきい値より小さい場合、ブロック(N−1)の右ブ
ロック境界符号パターン(n−1)のうち右ブロック境
界平坦画素の位置に該当する符号と、ブロック境界符号
パターンのうち右ブロック境界平坦画素とそれに隣接す
るブロック(N)のブロック境界画素との間の位置に該
当する符号とが同じであるかどうか検査する。符号が同
じである場合、その位置に該当するブロック(N−1)
の右ブロック境界平坦画素はブロック内画素フィルタ手
段10の平滑化処理により原画像に比べブロック境界の
差分が大きくなるような画素値を取る。境界画素判定手
段102では、このようなブロック(N−1)の右ブロ
ック境界平坦画素についての境界処理の実施を有効とす
る右境界処理判定信号を生成する。ブロック(N)の左
ブロック境界画素についてはブロック内フィルタ適用フ
ラグ(n)が無効であるため、境界処理の実施を無効と
する左境界処理判定信号を生成する。
(1) When the in-block filter application history (n-1) of the block (N-1) is valid and the in-block filter application flag (n) of the block (N) is invalid, the periphery of the right block boundary is flat. By referring to the location pattern, the right block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified among the right block boundary pixels of the block (N−1), and the right block boundary flat pixel is moved to the left. The pixel difference value between the right block boundary flat pixel and the left block boundary pixel of the block (N) adjacent to the right of the right block boundary flat pixel among the block boundary difference values that is continuously flat for a predetermined number or more is The second threshold is larger than the first threshold given as the block boundary difference threshold.
Is smaller than the threshold value of, the code corresponding to the position of the right block boundary flat pixel of the right block boundary code pattern (n-1) of the block (N-1) and the right block boundary flat of the block boundary code pattern. It is checked whether the code corresponding to the position between the pixel and the block boundary pixel of the block (N) adjacent thereto is the same. If the codes are the same, the block (N-1) corresponding to that position
The right-side block boundary flat pixel has a pixel value such that the difference in the block boundary becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. The boundary pixel determination means 102 generates a right boundary processing determination signal that makes effective the boundary processing for the right block boundary flat pixel of the block (N−1). Since the in-block filter application flag (n) is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0090】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が無効でブロック(N)のブ
ロック内フィルタ適用フラグ(n)が有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段10によりフィルタ処理が実施される左ブロック境界
平坦画素を特定し、左ブロック境界平坦画素から右に所
定の数以上連続して平坦であり、かつブロック境界差分
値のうち左ブロック境界平坦画素と左ブロック境界平坦
画素の左に隣接するブロック(N−1)の右ブロック境
界画素との画素間差分値がブロック境界差分しきい値と
して与えられる第1のしきい値より大きく第2のしきい
値より小さい場合、ブロック(N)の左ブロック境界符
号パターン(n)のうち左ブロック境界平坦画素の位置
に該当する符号と、ブロック境界符号パターンのうち左
ブロック境界平坦画素とそれに隣接するブロック(N−
1)のブロック境界画素との間の位置に該当する符号と
が同じであるかどうか検査する。符号が同じである場
合、その位置に該当するブロック(N)の左ブロック境
界平坦画素はブロック内画素フィルタ手段10の平滑化
処理により原画像に比べブロック境界の差分が大きくな
るような画素値を取る。境界画素判定手段102では、
このようなブロック(N)の左ブロック境界平坦画素に
ついての境界処理の実施を有効とする左境界処理判定信
号を生成する。ブロック(N−1)の右ブロック境界画
素についてはブロック内フィルタ適用履歴(n−1)が
無効であるため、境界処理の実施を無効とする右境界処
理判定信号を生成する。
(2) In-block filter application history (n-1) of block (N-1) is invalid and in-block filter application flag (n) of block (N) is valid. Reference and block (N)
Of the left block boundary pixels, a left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and a predetermined number or more of the left block boundary flat pixels are continuously flat to the right from the left block boundary flat pixel, and Among the block boundary difference values, the inter-pixel difference value between the left block boundary flat pixel and the right block boundary pixel of the block (N−1) adjacent to the left of the left block boundary flat pixel is given as the block boundary difference threshold. If it is larger than the threshold value of 1 and smaller than the second threshold value, the code corresponding to the position of the left block boundary flat pixel in the left block boundary code pattern (n) of the block (N) and the block boundary code pattern The left block boundary flat pixel and the adjacent block (N-
It is checked whether or not the code corresponding to the position between the block boundary pixel of 1) is the same. When the signs are the same, the left block boundary flat pixel of the block (N) corresponding to the position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. take. In the boundary pixel determination means 102,
A left boundary processing determination signal that makes it effective to perform boundary processing on the left block boundary flat pixel of the block (N) is generated. Since the intra-block filter application history (n-1) is invalid for the right block boundary pixel of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0091】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)とブロック(N)のブロック
内フィルタ適用フラグ(n)がともに有効である場合 右ブロック境界周辺平坦箇所パターンを参照しブロック
(N−1)の右ブロック境界画素の中でブロック内画素
フィルタ手段10によりフィルタ処理が実施される右ブ
ロック境界平坦画素を特定し、ブロック内平坦箇所パタ
ーンを参照しブロック(N)の左ブロック境界画素の中
でブロック内画素フィルタ手段10によりフィルタ処理
が実施される左ブロック境界平坦画素を特定し、右ブロ
ック境界平坦画素から左に所定の数以上連続して平坦で
ある場合または左ブロック境界平坦画素から右に所定の
数以上連続して平坦である場合に、右ブロック境界平坦
画素と左ブロック境界平坦画素がブロック境界を挟んで
隣接している箇所に該当するブロック境界差分値を検査
し、ブロック境界差分値がブロック境界差分しきい値と
して与えられる第1のしきい値より大きく第2のしきい
値より小さい場合、その位置に該当する位置のブロック
境界符号パターンと、その右ブロック境界平坦画素に該
当する位置の右ブロック境界符号パターン(n−1)
と、その左ブロック境界平坦画素に該当する位置の左ブ
ロック境界符号パターン(n)について、これら3つの
符号が全て同じであるかどうか検査する。符号が同じで
ある場合、その位置に該当するブロック(N−1)の右
ブロック境界平坦画素およびブロック(N)の左ブロッ
ク境界平坦画素は、ブロック内画素フィルタ手段10の
平滑化処理により原画像に比べブロック境界の差分が大
きくなるような画素値を取る。境界画素判定手段102
では、このようなブロック(N−1)の右ブロック境界
平坦画素およびブロック(N−1)の左ブロック境界平
坦画素についての境界処理の実施を有効とする右境界処
理判定信号および左境界処理判定信号を生成する。
(3) When the in-block filter application history (n-1) of block (N-1) and the in-block filter application flag (n) of block (N) are both valid Flat pattern around the right block boundary Of the right block boundary pixels of the block (N-1), the right block boundary flat pixel to be filtered by the intra-block pixel filter means 10 is specified, and the intra-block flat portion pattern is referred to for the block (N When a left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified among the left block boundary pixels in (4), and a predetermined number or more of them are continuously flat to the left from the right block boundary flat pixel. Or, if the left block boundary flat pixel is continuously flat to the right by a predetermined number or more, the right block boundary flat pixel and the left block boundary are flat. The block boundary difference value corresponding to a portion where the flat pixels are adjacent to each other across the block boundary is inspected, and the block boundary difference value is larger than the first threshold value given as the block boundary difference threshold value. If it is smaller than the threshold value, the block boundary code pattern at the position corresponding to the position and the right block boundary code pattern (n-1) at the position corresponding to the right block boundary flat pixel
Then, for the left block boundary code pattern (n) at the position corresponding to the left block boundary flat pixel, it is checked whether or not all these three codes are the same. When the signs are the same, the right block boundary flat pixel of the block (N−1) and the left block boundary flat pixel of the block (N) corresponding to the position are the original image by the smoothing process of the in-block pixel filter means 10. Pixel values are taken so that the difference between the block boundaries is larger than that of. Boundary pixel determination means 102
Then, the right boundary processing determination signal and the left boundary processing determination that enable the execution of the boundary processing on the right block boundary flat pixel of the block (N-1) and the left block boundary flat pixel of the block (N-1) are effective. Generate a signal.

【0092】境界画素処理手段13では、右境界画素選
択手段20において右境界処理判定信号に基づき、境界
処理の実施が有効である右ブロック境界画素について入
力画像メモリ1より読み出した原画像右ブロック境界画
素データ(n−1)を選択し、境界処理の実施が無効で
ある右ブロック境界画素について境界画素保持手段11
からの処理画像右境界画素データ(n−1′)を選択
し、画像出力手段14へ右ブロック境界出力データとし
て出力する。同様に、左境界画素選択手段21において
左境界処理判定信号に基づき、境界処理の実施が有効で
ある左ブロック境界画素について入力画像メモリ1より
読み出した原画像左ブロック境界画素データ(n)を選
択し、境界処理の実施が無効である左ブロック境界画素
について境界画素保持手段11からの処理画像左境界画
素データ(n′)を選択し、画像出力手段14へ左ブロ
ック境界出力データとして出力する。
In the boundary pixel processing means 13, based on the right boundary processing determination signal in the right boundary pixel selection means 20, the original image right block boundary read from the input image memory 1 for the right block boundary pixel for which the boundary processing is effective. The boundary pixel holding unit 11 selects the pixel data (n-1) and regards the right block boundary pixel for which the boundary processing is invalid.
The processed image right boundary pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 21 selects the original image left block boundary pixel data (n) read from the input image memory 1 for the left block boundary pixel for which the boundary processing is effective, based on the left boundary processing determination signal. Then, the processed image left boundary pixel data (n ′) from the boundary pixel holding unit 11 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output unit 14 as the left block boundary output data.

【0093】以上のように第5の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
のブロック境界画素間の差分値と画素間差分の符号とブ
ロック内フィルタ処理適用の可否判定結果とブロック内
平坦箇所情報とを用い、ブロック内フィルタ処理により
ブロック境界画素が原画像に比べブロック境界の画素間
差分を大きくするような画素値を取り得るかどうかを予
め検査し、そのようなブロック境界画素の周辺が平坦で
あり、かつ該当するブロック境界画素間の差分値がブロ
ック境界差分しきい値として与えられる第1のしきい値
より大きく第2のしきい値より小さい場合に、ブロック
境界画素についてブロック内フィルタ処理画素の代わり
に原画像の境界画素を選択することで、原画像のブロッ
ク境界に歪みが存在するかどうかを予め検査することが
可能になり、歪みが存在するブロック境界およびブロッ
ク内フィルタ処理による歪みが視覚的に目立ち易い平坦
箇所によって構成されるブロック境界に対してのみ画素
間差分値が原画像に比べ大きくならないようにすること
が可能となり、高画質化を図ることができる。
As described above, according to the fifth embodiment, the difference value between the block boundary pixels of the original images of the two adjacent blocks forming the block boundary, the sign of the pixel difference, and the intra-block filter application are applied. Using the determination result and the in-block flat portion information, it is inspected in advance whether or not the block boundary pixel can take a pixel value that makes the inter-pixel difference of the block boundary larger than the original image by the in-block filtering process, If the periphery of such a block boundary pixel is flat, and the difference value between the corresponding block boundary pixels is larger than the first threshold value given as the block boundary difference threshold value and smaller than the second threshold value. , About block boundary pixel By selecting the boundary pixel of the original image instead of the intra-block filter pixel, there is distortion at the block boundary of the original image. It is possible to check in advance whether or not to make the difference between pixels only when the block boundary is distorted and the block boundary is composed of a flat part where distortion due to intra-block filtering is easily noticeable. It is possible to prevent the image from becoming larger than the image, and it is possible to improve the image quality.

【0094】(第6の実施形態)図8は、この発明の第
6の実施形態による画像処理装置の構成を示すブロック
図である。図8に示す画像処理装置は、図1に示した平
坦箇所パターン保持手段9および境界画素判定手段12
に代えて平坦箇所パターン保持手段119および境界画
素判定手段122を備え、さらに画素間差分値算出手段
115を備える。その他の構成は、図1に示した画像処
理装置と同様である。
(Sixth Embodiment) FIG. 8 is a block diagram showing the arrangement of an image processing apparatus according to the sixth embodiment of the present invention. The image processing apparatus shown in FIG. 8 has the flat portion pattern holding means 9 and the boundary pixel determination means 12 shown in FIG.
Instead, a flat portion pattern holding unit 119 and a boundary pixel determination unit 122 are provided, and further an inter-pixel difference value calculation unit 115 is provided. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0095】画素間差分値算出手段115は、入力画像
メモリ1より読み出した処理対象ブロックデータの左ブ
ロック境界画素と隣接ブロックデータの原画像右ブロッ
ク境界画素データの隣接する画素同士の差分を算出し、
ブロック境界差分値として出力する。
The inter-pixel difference value calculation means 115 calculates the difference between the left block boundary pixel of the processing target block data read from the input image memory 1 and the adjacent pixel of the original image right block boundary pixel data of the adjacent block data. ,
Output as a block boundary difference value.

【0096】平坦箇所パターン保持手段119は、ブロ
ック内平坦箇所パターンのうち右ブロック境界周辺のブ
ロック内平坦箇所パターンを保持し右ブロック境界周辺
平坦箇所パターンとして出力する。
The flat spot pattern holding means 119 holds the flat spot pattern in the block around the right block boundary among the flat spot patterns in the block and outputs it as the flat spot pattern around the right block boundary.

【0097】境界画素判定手段122は、左ブロック境
界符号パターンと右ブロック境界符号パターンとブロッ
ク境界符号パターンとブロック内フィルタ適用フラグと
ブロック内フィルタ適用履歴とブロック内平坦箇所パタ
ーンと右ブロック境界周辺平坦箇所パターンとブロック
境界画素検出個数しきい値とブロック境界差分値とブロ
ック境界差分しきい値とに基づいて処理対象ブロックと
隣接ブロックの境界画素への処理を決定し、右境界処理
判定信号および左境界処理判定信号を生成する。
The boundary pixel determination means 122 determines the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat location pattern, and the right block boundary peripheral flatness. Based on the location pattern, the block boundary pixel detection number threshold value, the block boundary difference value, and the block boundary difference threshold value, the processing for the boundary pixel between the target block and the adjacent block is determined, and the right boundary processing determination signal and A left boundary processing determination signal is generated.

【0098】画素間差分値算出手段115では、画素間
差分符号算出手段4にて生成される隣接ブロック(N−
1)の境界画素メモリアドレス(n−1)により入力画
像メモリ1から出力されるブロック(N−1)の原画像
右ブロック境界画素データ(n−1)と、アドレス生成
手段3にて生成されるブロック(N)の処理対象ブロッ
クメモリアドレス(n)により入力画像メモリ1から出
力される処理対象ブロック画像データ(n)の左ブロッ
ク境界画素について隣接する画素同士の差分値を算出
し、ブロック境界差分値として境界画素判定手段122
へ出力する。
In the inter-pixel difference value calculating means 115, the adjacent blocks (N-
The original image right block boundary pixel data (n-1) of the block (N-1) output from the input image memory 1 by the boundary pixel memory address (n-1) of 1) and the address generating means 3 generate the same. The difference value between adjacent pixels is calculated for the left block boundary pixel of the processing target block image data (n) output from the input image memory 1 by the processing target block memory address (n) of the block (N) Boundary pixel determination means 122 as a difference value
Output to.

【0099】平坦箇所パターン保持手段119は、ブロ
ック(N)のブロック内平坦箇所パターン(n)のうち
右ブロック境界とその周辺のブロック内平坦箇所パター
ンを1ブロック処理期間保持する。保持されたパターン
は、ブロック処理ステータスN+1(処理対象ブロック
=ブロックN+1、隣接ブロック=ブロックN)時に、
隣接ブロックの右ブロック境界周辺平坦箇所パターンと
して境界画素判定手段122へと出力される。
The flat portion pattern holding means 119 holds the flat portion inside block portion pattern (n) of the block (N) on the right block boundary and its periphery for one block processing period. The held pattern is, when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N),
The pattern is output to the boundary pixel determining means 122 as a flat pattern around the right block boundary of the adjacent block.

【0100】境界画素判定手段122では、ブロック処
理ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴と、ブロック
内フィルタ適用判定手段6からのブロック(N)のブロ
ック内フィルタ適用フラグの両方またはどちらかが有効
である場合に、ブロック処理ステータスN―1(処理対
象ブロック=ブロックN−1、隣接ブロック=ブロック
N−2)時にブロック内平坦箇所検出手段7により生成
され平坦箇所パターン保持手段119にて保持されてい
るブロック(N―1)の右ブロック境界周辺平坦箇所パ
ターン(n−1)と、ブロック内平坦箇所検出手段7か
らのブロック(N)のブロック内平坦箇所パターン
(n)と、画素間差分値算出手段115からのブロック
境界差分値と、画素間差分符号算出手段4からのブロッ
ク(N−1)の右ブロック境界符号パターン(n−1)
と、ブロック(N−1)とブロック(N)のブロック境
界のブロック境界符号パターンと、ブロック(N)の左
ブロック境界符号パターンとを参照し、ブロック(N−
1)の右ブロック境界画素およびブロック(N)の左ブ
ロック境界画素の境界処理の判定を行う。
In the boundary pixel determining means 122, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history of the block (N−1) generated by the in-block filter application determination means 6 and held in the in-block filter application flag holding means 8, and the block When either or both of the block internal filter application flags of the block (N) from the internal filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N-1, adjacent block = block) At the time of (N-2), the flat portion pattern around the right block boundary (n-1) of the block (N-1) which is generated by the in-block flat portion detecting means 7 and held by the flat portion pattern holding means 119 and the inside of the block. In-block flat part pattern (n) of the block (N) from the flat part detecting means 7 and the inter-pixel difference value And block border difference value from the detecting means 115, the right block boundary code patterns of the block (N-1) from the pixel difference codes calculation means 4 (n-1)
And the block boundary code pattern of the block boundary between the block (N-1) and the block (N) and the left block boundary code pattern of the block (N) are referred to.
The boundary processing of the right block boundary pixel of 1) and the left block boundary pixel of the block (N) is determined.

【0101】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴が有効でブロック
(N)のブロック内フィルタ適用フラグが無効である場
合、(2)ブロック(N−1)のブロック内フィルタ適
用履歴が無効でブロック(N)のブロック内フィルタ適
用フラグが有効である場合、(3)ブロック(N−1)
のブロック内フィルタ適用履歴とブロック(N)のブロ
ック内フィルタ適用フラグがともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
When the in-block filter application history of 1) is valid and the in-block filter application flag of block (N) is invalid, (2) the in-block filter application history of block (N-1) is invalid and the block (N) of block (N) is When the in-block filter application flag is valid, (3) block (N-1)
The in-block filter application history and the in-block filter application flag of block (N) will be separately described.

【0102】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴が有効で、ブロック(N)のブロック内
フィルタ適用フラグが無効である場合 右ブロック境界周辺平坦箇所パターンを参照し、ブロッ
ク(N−1)の右ブロック境界画素の中でブロック内画
素フィルタ手段10によりフィルタ処理が実施される右
ブロック境界平坦画素を特定し、右ブロック境界平坦画
素から左に所定の数以上連続して平坦であり、かつブロ
ック境界差分値のうち右ブロック境界平坦画素と右ブロ
ック境界平坦画素の右に隣接するブロック(N)の左ブ
ロック境界画素との画素間差分値がブロック境界差分し
きい値として与えられる第1のしきい値より大きく第2
のしきい値より小さい場合、ブロック(N−1)の右ブ
ロック境界符号パターン(n−1)のうち右ブロック境
界平坦画素の位置に該当する符号と、ブロック境界符号
パターンのうち右ブロック境界平坦画素とそれに隣接す
るブロック(N)のブロック境界画素との間の位置に該
当する符号が同じであるかどうか検査する。符号が同じ
である場合、その位置に該当するブロック(N−1)の
右ブロック境界平坦画素はブロック内画素フィルタ手段
10の平滑化処理により原画像に比べブロック境界の差
分が大きくなるような画素値を取る。境界画素判定手段
122では、このようなブロック(N−1)の右ブロッ
ク境界平坦画素の個数を数え、その個数がブロック境界
画素検出個数しきい値より大きい場合にブロック(N−
1)の右ブロック境界平坦画素についての境界処理の実
施を有効とする右境界処理判定信号を生成する。ブロッ
ク(N)の左ブロック境界画素についてはブロック内フ
ィルタ適用フラグが無効であるため、境界処理の実施を
無効とする左境界処理判定信号を生成する。
(1) When the in-block filter application history of block (N-1) is valid and the in-block filter application flag of block (N) is invalid, the right block boundary peripheral flat portion pattern is referred to, and the block ( A right block boundary flat pixel to be filtered by the intra-block pixel filter means 10 is specified among the N-1) right block boundary pixels, and a predetermined number or more of them are continuously flattened to the left from the right block boundary flat pixel. And the inter-pixel difference value between the right block boundary flat pixel and the left block boundary pixel of the block (N) adjacent to the right of the right block boundary flat pixel among the block boundary difference values is given as the block boundary difference threshold value. Greater than the first threshold that is
Is smaller than the threshold value of, the code corresponding to the position of the right block boundary flat pixel of the right block boundary code pattern (n-1) of the block (N-1) and the right block boundary flat of the block boundary code pattern. It is checked whether the code corresponding to the position between the pixel and the block boundary pixel of the adjacent block (N) is the same. If the signs are the same, the right block boundary flat pixel of the block (N-1) corresponding to that position is a pixel whose difference in block boundary becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. Take a value. The boundary pixel determination unit 122 counts the number of right block boundary flat pixels of such a block (N−1), and if the number is larger than the block boundary pixel detection number threshold value, the block (N−).
A right boundary processing determination signal that makes it effective to execute the boundary processing for the right block boundary flat pixel in 1) is generated. Since the intra-block filter application flag is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0103】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴が無効でブロック(N)のブロック内フ
ィルタ適用フラグが有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段10によりフィルタ処理が実施される左ブロック境界
平坦画素を特定し、左ブロック境界平坦画素から右に所
定の数以上連続して平坦であり、かつブロック境界差分
値のうち左ブロック境界平坦画素と左ブロック境界平坦
画素の左に隣接するブロック(N−1)の右ブロック境
界画素との画素間差分値がブロック境界差分しきい値と
して与えられる第1のしきい値より大きく第2のしきい
値より小さい場合、ブロック(N)の左ブロック境界符
号パターンのうち左ブロック境界平坦画素の位置に該当
する符号と、ブロック境界符号パターンのうち左ブロッ
ク境界平坦画素とそれに隣接するブロック(N−1)の
ブロック境界画素との間の位置に該当する符号が同じで
あるかどうか検査する。符号が同じである場合、その位
置に該当するブロック(N)の左ブロック境界平坦画素
はブロック内画素フィルタ手段10の平滑化処理により
原画像に比べブロック境界の差分が大きくなるような画
素値を取る。境界画素判定手段122では、このような
ブロック(N)の左ブロック境界平坦画素の個数を数
え、その個数がブロック境界画素検出個数しきい値より
大きい場合にブロック(N)の左ブロック境界画素につ
いての境界処理の実施を有効とする左境界処理判定信号
を生成する。ブロック(N−1)の右ブロック境界画素
(n−1)についてはブロック内フィルタ適用履歴が無
効であるため、境界処理の実施を無効とする右境界処理
判定信号を生成する。
(2) When the in-block filter application history of the block (N-1) is invalid and the in-block filter application flag of the block (N) is valid, the in-block flat portion pattern is referred to, and the block (N)
Of the left block boundary pixels, a left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and a predetermined number or more of the left block boundary flat pixels are continuously flat to the right from the left block boundary flat pixel, and Among the block boundary difference values, the inter-pixel difference value between the left block boundary flat pixel and the right block boundary pixel of the block (N−1) adjacent to the left of the left block boundary flat pixel is given as the block boundary difference threshold. If it is larger than the threshold value of 1 and smaller than the second threshold value, the code corresponding to the position of the left block boundary flat pixel in the left block boundary code pattern of the block (N) and the left block of the block boundary code pattern Check whether the code corresponding to the position between the boundary flat pixel and the block boundary pixel of the block (N-1) adjacent thereto is the same. That. When the signs are the same, the left block boundary flat pixel of the block (N) corresponding to the position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 10. take. The boundary pixel determination unit 122 counts the number of left block boundary flat pixels of such a block (N), and when the number is larger than the block boundary pixel detection number threshold value, the left block boundary pixel of the block (N) is determined. A left boundary processing determination signal that makes it effective to execute the boundary processing is generated. Since the intra-block filter application history is invalid for the right block boundary pixel (n-1) of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0104】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴とブロック(N)のブロック内フィルタ
適用フラグがともに有効である場合 右ブロック境界周辺平坦パターンを参照しブロック(N
−1)の右ブロック境界画素の中でブロック内画素フィ
ルタ手段10によりフィルタ処理が実施される右ブロッ
ク境界平坦画素を特定し、ブロック内平坦箇所パターン
を参照しブロック(N)の左ブロック境界画素の中でブ
ロック内画素フィルタ手段10によりフィルタ処理が実
施される左ブロック境界平坦画素を特定し、右ブロック
境界平坦画素から左に所定の数以上連続して平坦である
場合または左ブロック境界平坦画素から右に所定の数以
上連続して平坦である場合に右ブロック境界平坦画素と
左ブロック境界平坦画素がブロック境界を挟んで隣接し
ている箇所に該当するブロック境界差分値を検査し、ブ
ロック境界差分値がブロック境界差分しきい値として与
えられる第1のしきい値より大きく第2のしきい値より
小さい場合、右ブロック境界平坦画素と左ブロック境界
平坦画素がブロック境界を挟んで隣接している箇所につ
いて、その位置に該当する位置のブロック境界符号パタ
ーンと、右ブロック境界平坦画素に該当する位置の右ブ
ロック境界符号パターンと、左ブロック境界平坦画素に
該当する位置の左ブロック境界符号パターンについて、
これら3つの符号が全て同じであるかどうか検査する。
符号が同じである場合、その位置に該当するブロック
(N−1)の右ブロック境界平坦画素およびブロック
(N)の左ブロック境界平坦画素は、ブロック内画素フ
ィルタ手段10の平滑化処理により原画像に比べブロッ
ク境界の差分が大きくなるような画素値を取る。境界画
素判定手段122では、このようなブロック(N−1)
の右ブロック境界平坦画素およびブロック(N)の左ブ
ロック境界平坦画素の個数を数え、それぞれの個数がブ
ロック境界画素検出個数しきい値より大きい場合にブロ
ック(N−1)の右ブロック境界平坦画素およびブロッ
ク(N)の左ブロック境界平坦画素についての境界処理
の実施を有効とする右境界処理判定信号および左境界処
理判定信号を生成する。
(3) When both the intra-block filter application history of block (N-1) and the intra-block filter application flag of block (N) are valid, the block (N
-1) The right block boundary pixels of the block (N) are identified by specifying the right block boundary flat pixels to be filtered by the in-block pixel filter means 10 among the right block boundary pixels of -1) and referring to the in-block flat portion pattern. If a left block boundary flat pixel to be filtered by the in-block pixel filter means 10 is specified, and if it is continuously flat for a predetermined number of times or more to the left from the right block boundary flat pixel, or a left block boundary flat pixel If the right block boundary flat pixel and the left block boundary flat pixel are adjacent to each other across the block boundary when they are continuously flat for a predetermined number of times to the right, the block boundary difference value is inspected and If the difference value is greater than a first threshold and less than a second threshold given as a block boundary difference threshold, the right block Block boundary flat pixel and left block boundary When a flat pixel is adjacent with a block boundary in between, the block boundary code pattern at the position corresponding to that position and the right block boundary at the position corresponding to the right block boundary flat pixel Regarding the code pattern and the left block boundary code pattern at the position corresponding to the left block boundary flat pixel,
Check if all three codes are the same.
When the signs are the same, the right block boundary flat pixel of the block (N−1) and the left block boundary flat pixel of the block (N) corresponding to the position are the original image by the smoothing process of the in-block pixel filter means 10. Pixel values are taken so that the difference between the block boundaries is larger than that of. In the boundary pixel determining means 122, such a block (N-1)
The right block boundary flat pixels of the block (N) and the left block boundary flat pixels of the block (N) are counted, and when the respective numbers are larger than the block boundary pixel detection number threshold value, the right block boundary flat pixels of the block (N-1) And a right boundary processing determination signal and a left boundary processing determination signal that enable the boundary processing to be performed on the left block boundary flat pixel of the block (N).

【0105】境界画素処理手段13では、右境界画素選
択手段20において右境界処理判定信号に基づき、境界
処理の実施が有効である右ブロック境界画素について入
力画像メモリ1より読み出した原画像右ブロック境界画
素データ(n−1)を選択し、境界処理の実施が無効で
ある右ブロック境界画素について境界画素保持手段11
からの処理画像右境界画素データ(n−1′)を選択
し、画像出力手段14へ右ブロック境界出力データとし
て出力する。同様に、左境界画素選択手段21において
左境界処理判定信号に基づき、境界処理の実施が有効で
ある左ブロック境界画素について入力画像メモリ1より
読み出した原画像左ブロック境界画素データ(n)を選
択し、境界処理の実施が無効である左ブロック境界画素
について境界画素保持手段11からの処理画像左境界画
素データ(n′)を選択し、画像出力手段14へ左ブロ
ック境界出力データとして出力する。
In the boundary pixel processing means 13, based on the right boundary processing determination signal in the right boundary pixel selection means 20, the original image right block boundary read out from the input image memory 1 for the right block boundary pixel for which the boundary processing is effective. The boundary pixel holding unit 11 selects the pixel data (n-1) and regards the right block boundary pixel for which the boundary processing is invalid.
The processed image right boundary pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 21 selects the original image left block boundary pixel data (n) read from the input image memory 1 for the left block boundary pixel for which the boundary processing is effective, based on the left boundary processing determination signal. Then, the processed image left boundary pixel data (n ′) from the boundary pixel holding unit 11 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output unit 14 as the left block boundary output data.

【0106】以上のように第6の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
の画素間差分の符号とブロック内フィルタ処理適用の可
否判定結果とブロック内平坦箇所情報とを用い、ブロッ
ク内フィルタ処理によりブロック境界画素が原画像に比
べブロック境界の画素間差分を大きくするような画素値
を取り得るかどうかを予め検査し、そのようなブロック
境界画素の周辺が平坦であり、かつ該当するブロック境
界画素間の差分値がブロック境界差分しきい値として与
えられる第1のしきい値より大きく第2のしきい値より
小さく、かつそのようなブロック境界画素の数がブロッ
ク境界画素検出個数しきい値として与えられる所定のし
きい値を超える場合に、ブロック境界画素についてブロ
ック内フィルタ処理画素の代わりに原画像の境界画素を
選択することで、原画像のブロック境界に歪みが存在す
るかどうかを予め検査することが可能になり、歪みが存
在するブロック境界およびブロック内フィルタ処理によ
る歪みが視覚的に目立ち易い平坦箇所によって構成され
るブロック境界に対してのみブロック境界の画素間差分
値が原画像に比べ大きくならないようにすることが可能
となり、かつブロック境界処理の度合いを調整すること
が可能となり、高画質化を図ることができる。
As described above, according to the sixth embodiment, the sign of the pixel difference between the original images of the two adjacent blocks forming the block boundary, the result of determination as to whether or not the intra-block filtering process can be applied, and the intra-block flat portion. By using the information, it is inspected in advance whether or not the block boundary pixel can take a pixel value that makes the difference between pixels of the block boundary larger than that of the original image by the intra-block filtering process. The number of such block boundary pixels that are flat and have a difference value between the corresponding block boundary pixels that is greater than a first threshold value that is given as a block boundary difference threshold value and that is less than a second threshold value. Is greater than a predetermined threshold given as the block boundary pixel detection count threshold, the block boundary pixel is subjected to the intra-block filter processing. By selecting the boundary pixels of the original image instead of the pixels, it is possible to check in advance whether or not there is distortion at the block boundary of the original image. It is possible to prevent the pixel-to-pixel difference value of the block boundary from becoming larger than that of the original image only for the block boundary formed by a flat part that is visually noticeable, and to adjust the degree of block boundary processing. It is possible to improve the image quality.

【0107】(第7の実施形態)図9は、この発明の第
7の実施形態による画像処理装置の構成を示すブロック
図である。図9に示す画像処理装置は、図1に示した平
坦箇所パターン保持手段9とブロック内画素フィルタ手
段10と境界画素保持手段11と境界画素判定手段12
と境界画素処理手段13に代えて平坦箇所パターン保持
手段139とブロック内画素フィルタ手段140と境界
周辺画素保持手段141と境界画素判定手段142と境
界画素処理手段143とを備え、さらに画素間差分値算
出手段135を備える。その他の構成は、図1に示した
画像処理装置と同様である。
(Seventh Embodiment) FIG. 9 is a block diagram showing the arrangement of an image processing apparatus according to the seventh embodiment of the present invention. The image processing apparatus shown in FIG. 9 includes the flat portion pattern holding means 9, the intra-block pixel filter means 10, the boundary pixel holding means 11, and the boundary pixel determination means 12 shown in FIG.
In place of the boundary pixel processing means 13, a flat portion pattern holding means 139, an in-block pixel filter means 140, a boundary peripheral pixel holding means 141, a boundary pixel determination means 142, and a boundary pixel processing means 143 are further provided, and an inter-pixel difference value is provided. The calculation means 135 is provided. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0108】画素間差分値算出手段135は、入力画像
メモリ1より読み出した処理対象ブロックデータの左ブ
ロック境界画素と隣接ブロックデータの原画像右ブロッ
ク境界画素データの隣接する画素同士の差分を算出し、
ブロック境界差分値として出力する。
The inter-pixel difference value calculating means 135 calculates the difference between the left block boundary pixel of the processing target block data read from the input image memory 1 and the adjacent pixel of the original image right block boundary pixel data of the adjacent block data. ,
Output as a block boundary difference value.

【0109】平坦箇所パターン保持手段139は、ブロ
ック内平坦箇所パターンのうち右ブロック境界周辺のブ
ロック内平坦箇所パターンを保持し右ブロック境界周辺
平坦箇所パターンとして出力する。
The flat portion pattern holding means 139 holds the flat portion in the block around the right block boundary among the flat portion patterns in the block and outputs it as the right flat portion around the right block boundary.

【0110】ブロック内画素フィルタ手段140は、ブ
ロック内フィルタ適用フラグとブロック内平坦箇所パタ
ーンとに基づき入力画像メモリ1より読み出した処理対
象ブロック画像データに平滑化処理を施す。
The in-block pixel filter means 140 performs a smoothing process on the block image data to be processed read from the input image memory 1 based on the in-block filter application flag and the in-block flat spot pattern.

【0111】境界周辺画素保持手段141は、ブロック
内画素フィルタ手段140の出力のうち右ブロック境界
周辺画素を保持する。
The boundary peripheral pixel holding means 141 holds the right block boundary peripheral pixels of the output of the in-block pixel filter means 140.

【0112】境界画素判定手段142は、左ブロック境
界符号パターンと右ブロック境界符号パターンとブロッ
ク境界符号パターンとブロック内フィルタ適用フラグと
ブロック内フィルタ適用履歴とブロック内平坦箇所パタ
ーンと右ブロック境界周辺平坦箇所パターンとブロック
境界差分値とブロック境界差分しきい値とに基づいて処
理対象ブロックと隣接ブロックの境界画素への処理を決
定し、右境界処理判定信号および左境界処理判定信号を
生成する。
The boundary pixel determining means 142 determines the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat location pattern, and the right block boundary peripheral flat. The processing for the boundary pixels of the block to be processed and the adjacent block is determined based on the location pattern, the block boundary difference value, and the block boundary difference threshold value, and the right boundary processing determination signal and the left boundary processing determination signal are generated.

【0113】図10は、図9に示した境界画素処理手段
143の内部構成を示すブロック図である。図10に示
すように、境界画素処理手段143は、右境界画素フィ
ルタ手段150と、右境界画素選択手段151と、左境
界画素フィルタ手段152と、左境界画素選択手段15
3とを含む。右境界画素フィルタ手段150は、処理画
像右ブロック境界周辺画素データと処理画像左ブロック
境界周辺画素データによるフィルタ処理を実施する。右
境界画素選択手段151は、右境界処理判定信号に基づ
き右境界画素フィルタ手段150からの出力と原画像右
ブロック境界画素データとを選択的に出力する。左境界
画素フィルタ手段152は、処理画像左ブロック境界周
辺画素データと処理画像右ブロック境界周辺画素データ
によるフィルタ処理を実施する。左境界画素選択手段1
53は、左境界処理判定信号に基づき左境界画素フィル
タ手段152からの出力と原画像左ブロック境界画素デ
ータとを選択的に出力する。
FIG. 10 is a block diagram showing the internal structure of the boundary pixel processing means 143 shown in FIG. As shown in FIG. 10, the boundary pixel processing unit 143 includes a right boundary pixel filter unit 150, a right boundary pixel selection unit 151, a left boundary pixel filter unit 152, and a left boundary pixel selection unit 15.
Including 3 and. The right boundary pixel filter means 150 performs a filtering process using the processed image right block boundary peripheral pixel data and the processed image left block boundary peripheral pixel data. The right boundary pixel selection means 151 selectively outputs the output from the right boundary pixel filter means 150 and the original image right block boundary pixel data based on the right boundary processing determination signal. The left boundary pixel filter means 152 performs a filtering process using the processed image left block boundary peripheral pixel data and the processed image right block boundary peripheral pixel data. Left boundary pixel selection means 1
53 selectively outputs the output from the left boundary pixel filter means 152 and the original image left block boundary pixel data based on the left boundary processing determination signal.

【0114】画素間差分値算出手段135では、画素間
差分符号算出手段4にて生成される隣接ブロック(N−
1)の境界画素メモリアドレス(n−1)により入力画
像メモリ1から出力されるブロック(N−1)の原画像
右ブロック境界画素データ(n−1)と、アドレス生成
手段3にて生成されるブロック(N)の処理対象ブロッ
クメモリアドレス(n)により入力画像メモリ1から出
力される処理対象ブロック画像データ(n)の左ブロッ
ク境界画素について隣接する画素同士の差分値を算出
し、ブロック境界差分値として境界画素判定手段142
へ出力する。
In the inter-pixel difference value calculating means 135, the adjacent block (N-
The original image right block boundary pixel data (n-1) of the block (N-1) output from the input image memory 1 by the boundary pixel memory address (n-1) of 1) and the address generating means 3 generate the same. The difference value between adjacent pixels is calculated for the left block boundary pixel of the processing target block image data (n) output from the input image memory 1 by the processing target block memory address (n) of the block (N) Boundary pixel determination means 142 as a difference value
Output to.

【0115】平坦箇所パターン保持手段139は、ブロ
ック(N)のブロック内平坦箇所パターン(n)のうち
右ブロック境界とその周辺のブロック内平坦箇所パター
ンを1ブロック処理期間保持する。保持されたパターン
は、ブロック処理ステータスN+1(処理対象ブロック
=ブロックN+1、隣接ブロック=ブロックN)時に、
隣接ブロックの右ブロック境界周辺平坦箇所パターンと
して境界画素判定手段142へと出力される。
The flat part pattern holding means 139 holds the flat part in-block pattern on the right block boundary and its periphery in the intra-block flat part pattern (n) of the block (N) for one block processing period. The held pattern is, when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N),
The pattern is output to the boundary pixel determining means 142 as a flat pattern around the right block boundary of the adjacent block.

【0116】ブロック内画素フィルタ手段140では、
ブロック内フィルタ適用判定手段6にて生成されたブロ
ック(N)のブロック内フィルタ適用フラグ(n)が有
効である場合に、ブロック内平坦箇所検出手段7にて生
成されたブロック(N)のブロック内平坦箇所パターン
(n)に従い、処理対象ブロック画像データ(n)の中
の平坦画素と水平方向隣接2画素の3画素による平滑化
処理が施される。ブロック内フィルタ適用判定手段6に
て生成されたブロック(N)のブロック内フィルタ適用
フラグ(n)が無効である場合は、ブロック内平坦箇所
パターンの状態に関わらず処理対象ブロック画像データ
(n)に対しての平滑化処理は実施しない。また、平滑
化処理の実施有無に関わらず、ブロック(N)の右ブロ
ック境界周辺画素は境界周辺画素保持手段141へ、ブ
ロック(N)の左ブロック境界周辺画素は処理画像左ブ
ロック境界周辺画素データ(n′)として境界画素処理
手段143へ、ブロック(N)の非ブロック境界周辺画
素は処理画像非ブロック境界周辺画素データ(n′)と
して画像出力手段14へと出力される。
In the block pixel filter means 140,
If the in-block filter application flag (n) of the block (N) generated by the in-block filter application determination means 6 is valid, the block of the block (N) generated by the in-block flat portion detection means 7 In accordance with the inner flat portion pattern (n), the smoothing process is performed by the flat pixels in the block image data to be processed (n) and the three horizontally adjacent two pixels. When the in-block filter application flag (n) of the block (N) generated by the in-block filter application determination unit 6 is invalid, the block image data to be processed (n) is processed regardless of the state of the in-block flat portion pattern. The smoothing process for is not performed. Further, regardless of whether or not the smoothing process is performed, the right block boundary peripheral pixels of the block (N) are stored in the boundary peripheral pixel holding means 141, and the left block boundary peripheral pixels of the block (N) are processed image left block boundary peripheral pixel data. (N ') is output to the boundary pixel processing means 143, and the non-block boundary peripheral pixels of the block (N) are output to the image output means 14 as processed image non-block boundary peripheral pixel data (n').

【0117】境界周辺画素保持手段141では、ブロッ
ク内画素フィルタ手段140からの出力であるブロック
(N)の右ブロック境界周辺画素を1ブロック処理期間
保持する。保持されたデータはブロック処理ステータス
N+1(処理対象ブロック=ブロックN+1、隣接ブロ
ック=ブロックN)時に、隣接ブロックの処理画像右ブ
ロック境界周辺画素データとして境界画素処理手段14
3へと出力される。
The boundary peripheral pixel holding means 141 holds the right block boundary peripheral pixels of the block (N) output from the in-block pixel filter means 140 for one block processing period. When the block processing status is N + 1 (processing target block = block N + 1, adjacent block = block N), the held data is the boundary pixel processing means 14 as the processed image right block boundary peripheral pixel data of the adjacent block.
3 is output.

【0118】境界画素判定手段142では、ブロック処
理ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴(n−1)
と、ブロック内フィルタ適用判定手段6からのブロック
(N)のブロック内フィルタ適用フラグ(n)の両方ま
たはどちらかが有効である場合に、ブロック処理ステー
タスN―1(処理対象ブロック=ブロックN−1、隣接
ブロック=ブロックN−2)時にブロック内平坦箇所検
出手段7により生成され平坦箇所パターン保持手段13
9にて保持されているブロック(N―1)の右ブロック
境界周辺平坦箇所パターン(n−1)と、ブロック内平
坦箇所検出手段7からのブロック(N)のブロック内平
坦箇所パターン(n)と、画素間差分値算出手段135
からのブロック境界差分値と、画素間差分符号算出手段
4からのブロック(N−1)の右ブロック境界符号パタ
ーン(n−1)と、ブロック(N−1)とブロック
(N)のブロック境界のブロック境界符号パターンと、
ブロック(N)の左ブロック境界符号パターン(n)を
参照し、ブロック(N−1)の右ブロック境界画素およ
びブロック(N)の左ブロック境界画素の境界処理の判
定を行う。
In the boundary pixel determining means 142, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history (n−) of the block (N−1) generated by the in-block filter application determination unit 6 and held by the in-block filter application flag holding unit 8 1)
And either or both of the in-block filter application flags (n) of the block (N) from the in-block filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N- 1, adjacent block = block N-2), the flat portion pattern holding means 13 generated by the flat portion inside block detecting means 7
The right block boundary peripheral flat portion pattern (n-1) of the block (N-1) held in 9 and the block inner flat portion pattern (n) of the block (N) from the intra-block flat portion detection means 7 And the inter-pixel difference value calculation means 135
From the inter-pixel difference code calculation unit 4, the right block boundary code pattern (n-1) of the block (N-1), and the block boundary between the block (N-1) and the block (N). Block boundary code pattern of
With reference to the left block boundary code pattern (n) of the block (N), the boundary processing of the right block boundary pixel of the block (N-1) and the left block boundary pixel of the block (N) is determined.

【0119】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴(n−1)が有効で
ブロック(N)のブロック内フィルタ適用フラグ(n)
が無効である場合、(2)ブロック(N−1)のブロッ
ク内フィルタ適用履歴(n−1)が無効でブロック
(N)のブロック内フィルタ適用フラグ(n)が有効で
ある場合、(3)ブロック(N−1)のブロック内フィ
ルタ適用履歴(n−1)とブロック(N)のブロック内
フィルタ適用フラグ(n)がともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
In-block filter application history (n-1) of 1) is valid, and in-block filter application flag (n) of block (N)
Is invalid, (2) If the in-block filter application history (n-1) of the block (N-1) is invalid and the in-block filter application flag (n) of the block (N) is valid, (3) ) The case where both the in-block filter application history (n-1) of the block (N-1) and the in-block filter application flag (n) of the block (N) are valid will be described separately.

【0120】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が有効で、ブロック(N)の
ブロック内フィルタ適用フラグ(n)が無効である場合 右ブロック境界周辺平坦箇所パターンを参照し、ブロッ
ク(N−1)の右ブロック境界画素の中でブロック内画
素フィルタ手段140によりフィルタ処理が実施される
右ブロック境界平坦画素を特定し、右ブロック境界平坦
画素から左に所定の数以上連続して平坦であり、かつブ
ロック境界差分値のうち右ブロック境界平坦画素と右ブ
ロック境界平坦画素の右に隣接するブロック(N)の左
ブロック境界画素との画素間差分値がブロック境界差分
しきい値として与えられる第1のしきい値より大きく第
2のしきい値より小さい場合、ブロック(N−1)の右
ブロック境界符号パターン(n−1)のうち右ブロック
境界平坦画素の位置に該当する符号と、ブロック境界符
号パターンのうち右ブロック境界平坦画素とそれに隣接
するブロック(N)のブロック境界画素との間の位置に
該当する符号が同じであるかどうか検査する。符号が同
じである場合、その位置に該当するブロック(N−1)
の右ブロック境界平坦画素はブロック内画素フィルタ手
段140の平滑化処理により原画像に比べブロック境界
の差分が大きくなるような画素値を取る。境界画素判定
手段142では、このようなブロック(N−1)の右ブ
ロック境界平坦画素についての境界処理の実施を有効と
する右境界処理判定信号を生成する。ブロック(N)の
左ブロック境界画素についてはブロック内フィルタ適用
フラグ(n)が無効であるため、境界処理の実施を無効
とする左境界処理判定信号を生成する。
(1) When the in-block filter application history (n-1) of the block (N-1) is valid and the in-block filter application flag (n) of the block (N) is invalid, the periphery of the right block boundary is flat. By referring to the location pattern, the right block boundary flat pixel to be filtered by the in-block pixel filter means 140 is specified from the right block boundary flat pixels of the block (N−1), and the right block boundary flat pixel is moved to the left. The pixel difference value between the right block boundary flat pixel and the left block boundary pixel of the block (N) adjacent to the right of the right block boundary flat pixel among the block boundary difference values that is continuously flat for a predetermined number or more is The right block boundary code of the block (N-1) if it is larger than a first threshold and smaller than a second threshold given as a block boundary difference threshold A code corresponding to the position of the right block boundary flat pixel in the turn (n-1) and a position between the right block boundary flat pixel and the block boundary pixel of the block (N) adjacent to the right block boundary code pattern in the block boundary code pattern. Check whether the corresponding codes are the same. If the codes are the same, the block (N-1) corresponding to that position
The right-side block boundary flat pixel has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing processing by the in-block pixel filter means 140. The boundary pixel determining unit 142 generates a right boundary processing determination signal that makes it effective to perform the boundary processing on the right block boundary flat pixel of the block (N−1). Since the in-block filter application flag (n) is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0121】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)が無効でブロック(N)のブ
ロック内フィルタ適用フラグ(n)が有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段140によりフィルタ処理が実施される左ブロック境
界平坦画素を特定し、左ブロック境界平坦画素から右に
所定の数以上連続して平坦であり、かつブロック境界差
分値のうち左ブロック境界平坦画素と左ブロック境界平
坦画素の左に隣接するブロック(N−1)の右ブロック
境界画素との画素間差分値がブロック境界差分しきい値
として与えられる第1のしきい値より大きく第2のしき
い値より小さい場合、ブロック(N)の左ブロック境界
符号パターン(n)のうち左ブロック境界平坦画素の位
置に該当する符号と、ブロック境界符号パターンのうち
左ブロック境界平坦画素とそれに隣接するブロック(N
−1)のブロック境界画素との間の位置に該当する符号
が同じであるかどうか検査する。符号が同じである場
合、その位置に該当するブロック(N)の左ブロック境
界平坦画素はブロック内画素フィルタ手段140の平滑
化処理により原画像に比べブロック境界の差分が大きく
なるような画素値を取る。境界画素判定手段142で
は、このようなブロック(N)の左ブロック境界平坦画
素についての境界処理の実施を有効とする左境界処理判
定信号を生成する。ブロック(N−1)の右ブロック境
界画素についてはブロック内フィルタ適用履歴(n−
1)が無効であるため、境界処理の実施を無効とする右
境界処理判定信号を生成する。
(2) In-block filter application history (n-1) of block (N-1) is invalid and in-block filter application flag (n) of block (N) is valid. Reference and block (N)
Of the left block boundary pixels, a left block boundary flat pixel to be filtered by the in-block pixel filter means 140 is specified, and a predetermined number or more are continuously flat to the right from the left block boundary flat pixel, and Among the block boundary difference values, the inter-pixel difference value between the left block boundary flat pixel and the right block boundary pixel of the block (N−1) adjacent to the left of the left block boundary flat pixel is given as the block boundary difference threshold. If it is larger than the threshold value of 1 and smaller than the second threshold value, the code corresponding to the position of the left block boundary flat pixel in the left block boundary code pattern (n) of the block (N) and the block boundary code pattern The left block boundary flat pixel and the adjacent block (N
It is checked whether the code corresponding to the position between the block boundary pixel of -1) is the same. When the codes are the same, the left block boundary flat pixel of the block (N) corresponding to the position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 140. take. The boundary pixel determination means 142 generates a left boundary processing determination signal that makes it effective to perform the boundary processing on the left block boundary flat pixels of the block (N). For the right block boundary pixel of the block (N-1), the in-block filter application history (n-
Since 1) is invalid, a right boundary processing determination signal that invalidates the execution of boundary processing is generated.

【0122】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴(n−1)とブロック(N)のブロック
内フィルタ適用フラグ(n)がともに有効である場合 右ブロック境界周辺平坦箇所パターンを参照しブロック
(N−1)の右ブロック境界画素の中でブロック内画素
フィルタ手段140によりフィルタ処理が実施される右
ブロック境界平坦画素を特定し、ブロック内平坦箇所パ
ターンを参照しブロック(N)の左ブロック境界画素の
中でブロック内画素フィルタ手段140によりフィルタ
処理が実施される左ブロック境界平坦画素を特定し、右
ブロック境界平坦画素から左に所定の数以上連続して平
坦である場合または左ブロック境界平坦画素から右に所
定の数以上連続して平坦である場合に、右ブロック境界
平坦画素と左ブロック境界平坦画素がブロック境界を挟
んで隣接している箇所に該当するブロック境界差分値を
検査し、ブロック境界差分値がブロック境界差分しきい
値として与えられる第1のしきい値より大きく第2のし
きい値より小さい場合、その位置に該当する位置のブロ
ック境界符号パターンと、その右ブロック境界平坦画素
に該当する位置の右ブロック境界符号パターン(n−
1)と、その左ブロック境界平坦画素に該当する位置の
左ブロック境界符号パターン(n)について、これら3
つの符号が全て同じであるかどうか検査する。符号が同
じである場合、その位置に該当するブロック(N−1)
の右ブロック境界平坦画素およびブロック(N)の左ブ
ロック境界平坦画素は、ブロック内画素フィルタ手段1
40の平滑化処理により原画像に比べブロック境界の差
分が大きくなるような画素値を取る。境界画素判定手段
142では、このようなブロック(N−1)の右ブロッ
ク境界平坦画素およびブロック(N−1)の左ブロック
境界平坦画素についての境界処理の実施を有効とする右
境界処理判定信号および左境界処理判定信号を生成す
る。
(3) When the in-block filter application history (n-1) of the block (N-1) and the in-block filter application flag (n) of the block (N) are both valid, the flat block pattern around the right block boundary Of the right block boundary pixels of the block (N−1), the right block boundary flat pixel to be filtered by the in-block pixel filter means 140 is specified, and the block (N) is referred to by the in-block flat portion pattern. When the left block boundary flat pixel to be filtered by the in-block pixel filter unit 140 is specified among the left block boundary pixels in (4), and a predetermined number or more are flat to the left from the right block boundary flat pixel. Or, if the left block boundary flat pixel is flat to the right for a predetermined number of times or more, the right block boundary flat pixel and the left block flat pixel are The block boundary difference value corresponding to a position where the boundary flat pixels are adjacent to each other across the block boundary is inspected, and the block boundary difference value is larger than the first threshold value given as the block boundary difference threshold value. If it is smaller than the threshold value, the block boundary code pattern at the position corresponding to the position and the right block boundary code pattern (n-
1) and the left block boundary code pattern (n) at the position corresponding to the left block boundary flat pixel, these 3
Check if all two signs are the same. If the codes are the same, the block (N-1) corresponding to that position
The right block boundary flat pixel of and the left block boundary flat pixel of the block (N) are in-block pixel filter means 1.
By the smoothing process of 40, the pixel value is set so that the difference between the block boundaries becomes larger than that of the original image. In the boundary pixel determining means 142, a right boundary processing determination signal that validates the boundary processing for the right block boundary flat pixel of the block (N−1) and the left block boundary flat pixel of the block (N−1). And a left boundary processing determination signal is generated.

【0123】境界画素処理手段143では、右境界画素
選択手段151において右境界処理判定信号に基づき、
境界処理の実施が有効である右ブロック境界画素につい
て右境界画素フィルタ手段150の出力を選択し、境界
処理の実施が無効である右ブロック境界画素について境
界周辺画素保持手段141からの処理画像右境界画素デ
ータ(n−1′)を選択し、画像出力手段14へ右ブロ
ック境界出力データとして出力する。同様に、左境界画
素選択手段153において左境界処理判定信号に基づ
き、境界処理の実施が有効である左ブロック境界画素に
ついて左境界画素フィルタ手段152の出力を選択し、
境界処理の実施が無効である左ブロック境界画素につい
てブロック内画素フィルタ手段140からの処理画像左
ブロック境界画素データ(n′)を選択し、画像出力手
段14へ左ブロック境界出力データとして出力する。
In the boundary pixel processing means 143, based on the right boundary processing determination signal in the right boundary pixel selection means 151,
The output of the right boundary pixel filter means 150 is selected for the right block boundary pixels for which the boundary processing is valid, and the processed image right boundary from the boundary peripheral pixel holding means 141 is selected for the right block boundary pixels for which the boundary processing is invalid. The pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 153 selects the output of the left boundary pixel filter means 152 for the left block boundary pixels for which the boundary processing is effective, based on the left boundary processing determination signal,
The processed image left block boundary pixel data (n ′) from the in-block pixel filter means 140 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output means 14 as left block boundary output data.

【0124】以上のように第7の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
のブロック境界画素間の差分値と画素間差分の符号とブ
ロック内フィルタ処理適用の可否判定結果とブロック内
平坦箇所情報とを用い、ブロック内フィルタ処理により
ブロック境界画素が原画像に比べブロック境界の画素間
差分を大きくするような画素値を取り得るかどうかを予
め検査し、そのようなブロック境界画素の周辺が平坦で
あり、かつ該当するブロック境界画素間の差分値がブロ
ック境界差分しきい値として与えられる第1のしきい値
より大きく第2のしきい値より小さい場合に、ブロック
境界画素についてブロック内フィルタ処理画素の代わり
に原画像の境界画素を選択することで、原画像のブロッ
ク境界に歪みが存在するかどうかを予め検査することが
可能になり、歪みが存在するブロック境界およびブロッ
ク内フィルタ処理による歪みが視覚的に目立ち易い平坦
箇所によって構成されるブロック境界に対してのみ隣接
ブロックの境界画素とフィルタリング処理を実施するこ
とが可能となり、高画質化を図ることができる。
As described above, according to the seventh embodiment, the difference value between the block boundary pixels of the original images of the two adjacent blocks forming the block boundary, the sign of the pixel difference, and the intra-block filter processing application are performed. Using the determination result and the in-block flat portion information, it is inspected in advance whether or not the block boundary pixel can take a pixel value that makes the inter-pixel difference of the block boundary larger than the original image by the in-block filtering process, If the periphery of such a block boundary pixel is flat, and the difference value between the corresponding block boundary pixels is larger than the first threshold value given as the block boundary difference threshold value and smaller than the second threshold value. , About block boundary pixel By selecting the boundary pixel of the original image instead of the intra-block filter pixel, there is distortion at the block boundary of the original image. It is possible to check in advance whether or not to do so, and the boundary pixel of the adjacent block is determined as the boundary pixel of the adjacent block only for the block boundary where the distortion exists and the flat boundary where the distortion due to the intra-block filtering process is visually noticeable. Filtering processing can be performed, and high image quality can be achieved.

【0125】(第8の実施形態)図11は、この発明の
第8の実施形態による画像処理装置の構成を示すブロッ
ク図である。図11に示す画像処理装置は、図1に示し
た平坦箇所パターン保持手段9とブロック内画素フィル
タ手段10と境界画素保持手段11と境界画素判定手段
12と境界画素処理手段13とに代えて平坦箇所パター
ン保持手段169とブロック内画素フィルタ手段170
と境界周辺画素保持手段171と境界画素判定手段17
2と境界画素処理手段143とを備え、さらに画素間差
分値算出手段155を備える。その他の構成は、図1に
示した画像処理装置と同様である。
(Eighth Embodiment) FIG. 11 is a block diagram showing the arrangement of an image processing apparatus according to the eighth embodiment of the present invention. The image processing apparatus shown in FIG. 11 is flat in place of the flat portion pattern holding means 9, the in-block pixel filter means 10, the boundary pixel holding means 11, the boundary pixel determination means 12, and the boundary pixel processing means 13 shown in FIG. Local pattern holding means 169 and in-block pixel filtering means 170
And boundary peripheral pixel holding means 171 and boundary pixel determination means 17
2 and the boundary pixel processing means 143, and further the inter-pixel difference value calculating means 155. Other configurations are the same as those of the image processing apparatus shown in FIG.

【0126】画素間差分値算出手段155は、入力画像
メモリ1より読み出した処理対象ブロックデータの左ブ
ロック境界画素と隣接ブロックデータの原画像右ブロッ
ク境界画素データの隣接する画素同士の差分を算出し、
ブロック境界差分値として出力する。
The inter-pixel difference value calculating means 155 calculates the difference between the left block boundary pixel of the processing target block data read from the input image memory 1 and the adjacent pixel of the original image right block boundary pixel data of the adjacent block data. ,
Output as a block boundary difference value.

【0127】ブロック内画素フィルタ手段170は、ブ
ロック内フィルタ適用フラグとブロック内平坦箇所パタ
ーンに基づき入力画像メモリ1より読み出した処理対象
ブロック画像データに平滑化処理を施す。
The in-block pixel filter means 170 performs a smoothing process on the block image data to be processed read from the input image memory 1 based on the in-block filter application flag and the in-block flat spot pattern.

【0128】境界周辺画素保持手段171は、ブロック
内画素フィルタ手段170の出力のうち右ブロック境界
周辺画素を保持する。
The boundary peripheral pixel holding means 171 holds the right block boundary peripheral pixels of the output of the in-block pixel filter means 170.

【0129】平坦箇所パターン保持手段169は、ブロ
ック内平坦箇所パターンのうち右ブロック境界周辺のブ
ロック内平坦箇所パターンを保持し右ブロック境界周辺
平坦箇所パターンとして出力する。
The flat part pattern holding means 169 holds the intra-block flat part pattern around the right block boundary among the intra-block flat part patterns and outputs it as the right block boundary peripheral flat part pattern.

【0130】境界画素判定手段172は、左ブロック境
界符号パターンと右ブロック境界符号パターンとブロッ
ク境界符号パターンとブロック内フィルタ適用フラグと
ブロック内フィルタ適用履歴とブロック内平坦箇所パタ
ーンと右ブロック境界周辺平坦箇所パターンとブロック
境界画素検出個数しきい値とブロック境界差分値とブロ
ック境界差分しきい値とに基づいて処理対象ブロックと
隣接ブロックの境界画素への処理を決定し、右境界処理
判定信号および左境界処理判定信号を生成する。
The boundary pixel determination means 172 determines the left block boundary code pattern, the right block boundary code pattern, the block boundary code pattern, the in-block filter application flag, the in-block filter application history, the in-block flat location pattern, and the right block boundary peripheral flat. Based on the location pattern, the block boundary pixel detection number threshold value, the block boundary difference value, and the block boundary difference threshold value, the processing for the boundary pixel between the target block and the adjacent block is determined, and the right boundary processing determination signal and A left boundary processing determination signal is generated.

【0131】画素間差分値算出手段155では、画素間
差分符号算出手段4にて生成される隣接ブロック(N−
1)の境界画素メモリアドレス(n−1)により入力画
像メモリ1から出力されるブロック(N−1)の原画像
右ブロック境界画素データ(n−1)と、アドレス生成
手段3にて生成されるブロック(N)の処理対象ブロッ
クメモリアドレス(n)により入力画像メモリ1から出
力される処理対象ブロック画像データ(n)の左ブロッ
ク境界画素について隣接する画素同士の差分値を算出
し、ブロック境界差分値として境界画素判定手段172
へ出力する。
In the inter-pixel difference value calculating means 155, the adjacent blocks (N-
1) The original pixel right block boundary pixel data (n-1) of the block (N-1) output from the input image memory 1 by the boundary pixel memory address (n-1) of 1), and the address generation means 3. Block block (N) processing target block memory address (n) outputs the processing target block image data (n) left block boundary pixel, calculates the difference value between adjacent pixels, and determines the block boundary. Boundary pixel determination means 172 as a difference value
Output to.

【0132】平坦箇所パターン保持手段169は、ブロ
ック(N)のブロック内平坦箇所パターン(n)のうち
右ブロック境界とその周辺のブロック内平坦箇所パター
ンを1ブロック処理期間保持する。保持されたパターン
は、ブロック処理ステータスN+1(処理対象ブロック
=ブロックN+1、隣接ブロック=ブロックN)時に、
隣接ブロックの右ブロック境界周辺平坦箇所パターンと
して境界画素判定手段172へと出力される。
The flat portion pattern holding means 169 holds the flat portion in-block pattern on the right block boundary and its periphery in the in-block flat portion pattern (n) of the block (N) for one block processing period. The held pattern is, when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N),
It is output to the boundary pixel determination means 172 as a flat portion around the right block boundary of the adjacent block.

【0133】ブロック内画素フィルタ手段170では、
ブロック内フィルタ適用判定手段6にて生成されたブロ
ック(N)のブロック内フィルタ適用フラグ(n)が有
効である場合に、ブロック内平坦箇所検出手段7にて生
成されたブロック(N)のブロック内平坦箇所パターン
(n)に従い、処理対象ブロック画像データ(n)の中
の平坦画素と水平方向隣接2画素の3画素による平滑化
処理が施される。ブロック内フィルタ適用判定手段6に
て生成されたブロック(N)のブロック内フィルタ適用
フラグ(n)が無効である場合は、ブロック内平坦箇所
パターンの状態に関わらず処理対象ブロック画像データ
(n)に対しての平滑化処理は実施しない。また、平滑
化処理の実施有無に関わらず、ブロック(N)の右ブロ
ック境界周辺画素は境界周辺画素保持手段171へ、ブ
ロック(N)の左ブロック境界周辺画素は処理画像左ブ
ロック境界周辺画素データ(n′)として境界画素処理
手段143へ、ブロック(N)の非ブロック境界周辺画
素は処理画像非ブロック境界周辺画素データ(n′)と
して画像出力手段14へと出力される。
In the block pixel filter means 170,
If the in-block filter application flag (n) of the block (N) generated by the in-block filter application determination means 6 is valid, the block of the block (N) generated by the in-block flat portion detection means 7 In accordance with the inner flat portion pattern (n), the smoothing process is performed by the flat pixels in the block image data to be processed (n) and the three horizontally adjacent two pixels. When the in-block filter application flag (n) of the block (N) generated by the in-block filter application determination unit 6 is invalid, the block image data to be processed (n) is processed regardless of the state of the in-block flat portion pattern. The smoothing process for is not performed. Further, regardless of whether or not the smoothing process is performed, the right block boundary peripheral pixels of the block (N) are stored in the boundary peripheral pixel holding means 171, and the left block boundary peripheral pixels of the block (N) are processed image left block boundary peripheral pixel data. (N ') is output to the boundary pixel processing means 143, and the non-block boundary peripheral pixels of the block (N) are output to the image output means 14 as processed image non-block boundary peripheral pixel data (n').

【0134】境界周辺画素保持手段171では、ブロッ
ク内画素フィルタ手段170からの出力であるブロック
(N)の右ブロック境界周辺画素を1ブロック処理期間
保持する。保持されたデータはブロック処理ステータス
N+1(処理対象ブロック=ブロックN+1、隣接ブロ
ック=ブロックN)時に、隣接ブロックの処理画像右ブ
ロック境界周辺画素として境界画素処理手段143へと
出力される。
The boundary peripheral pixel holding means 171 holds the right block boundary peripheral pixels of the block (N) output from the in-block pixel filter means 170 for one block processing period. The held data is output to the boundary pixel processing unit 143 as peripheral pixels of the processed image right block boundary of the adjacent block when the block processing status N + 1 (processing target block = block N + 1, adjacent block = block N).

【0135】境界画素判定手段172では、ブロック処
理ステータスN―1(処理対象ブロック=ブロックN−
1、隣接ブロック=ブロックN−2)時にブロック内フ
ィルタ適用判定手段6により生成されブロック内フィル
タ適用フラグ保持手段8にて保持されているブロック
(N―1)のブロック内フィルタ適用履歴と、ブロック
内フィルタ適用判定手段6からのブロック(N)のブロ
ック内フィルタ適用フラグの両方またはどちらかが有効
である場合に、ブロック処理ステータスN―1(処理対
象ブロック=ブロックN−1、隣接ブロック=ブロック
N−2)時にブロック内平坦箇所検出手段7により生成
され平坦箇所パターン保持手段169にて保持されてい
るブロック(N―1)の右ブロック境界周辺平坦箇所パ
ターン(n−1)と、ブロック内平坦箇所検出手段7か
らのブロック(N)のブロック内平坦箇所パターン
(n)と、画素間差分値算出手段155からのブロック
境界差分値と、画素間差分符号算出手段4からのブロッ
ク(N−1)の右ブロック境界符号パターン(n−1)
と、ブロック(N−1)とブロック(N)のブロック境
界のブロック境界符号パターンと、ブロック(N)の左
ブロック境界符号パターンとを参照し、ブロック(N−
1)の右ブロック境界画素およびブロック(N)の左ブ
ロック境界画素の境界処理の判定を行う。
In the boundary pixel determining means 172, the block processing status N-1 (processing target block = block N-
1, adjacent block = block N−2), the in-block filter application history of the block (N−1) generated by the in-block filter application determination means 6 and held in the in-block filter application flag holding means 8, and the block When either or both of the block internal filter application flags of the block (N) from the internal filter application determining means 6 are valid, the block processing status N-1 (processing target block = block N-1, adjacent block = block) At the time of N-2), the right block boundary peripheral flat portion pattern (n-1) of the block (N-1) generated by the in-block flat portion detecting means 7 and held by the flat portion pattern holding means 169, and the inside of the block In-block flat part pattern (n) of the block (N) from the flat part detecting means 7 and the inter-pixel difference value And block border difference value from the detecting means 155, the right block boundary code patterns of the block (N-1) from the pixel difference codes calculation means 4 (n-1)
And the block boundary code pattern of the block boundary between the block (N-1) and the block (N) and the left block boundary code pattern of the block (N) are referred to.
The boundary processing of the right block boundary pixel of 1) and the left block boundary pixel of the block (N) is determined.

【0136】以下の説明では、(1)ブロック(N−
1)のブロック内フィルタ適用履歴が有効でブロック
(N)のブロック内フィルタ適用フラグが無効である場
合、(2)ブロック(N−1)のブロック内フィルタ適
用履歴が無効でブロック(N)のブロック内フィルタ適
用フラグが有効である場合、(3)ブロック(N−1)
のブロック内フィルタ適用履歴とブロック(N)のブロ
ック内フィルタ適用フラグがともに有効である場合に分
けて説明する。
In the following description, (1) block (N-
When the in-block filter application history of 1) is valid and the in-block filter application flag of block (N) is invalid, (2) the in-block filter application history of block (N-1) is invalid and the block (N) of block (N) is When the in-block filter application flag is valid, (3) block (N-1)
The in-block filter application history and the in-block filter application flag of block (N) will be separately described.

【0137】(1)ブロック(N−1)のブロック内フ
ィルタ適用履歴が有効で、ブロック(N)のブロック内
フィルタ適用フラグが無効である場合 右ブロック境界周辺平坦箇所パターンを参照し、ブロッ
ク(N−1)の右ブロック境界画素の中でブロック内画
素フィルタ手段170によりフィルタ処理が実施される
右ブロック境界平坦画素を特定し、右ブロック境界平坦
画素から左に所定の数以上連続して平坦であり、かつブ
ロック境界差分値のうち右ブロック境界平坦画素と右ブ
ロック境界平坦画素の右に隣接するブロック(N)の左
ブロック境界画素との画素間差分値がブロック境界差分
しきい値として与えられる第1のしきい値より大きく第
2のしきい値より小さい場合、ブロック(N−1)の右
ブロック境界符号パターン(n−1)のうち右ブロック
境界平坦画素の位置に該当する符号と、ブロック境界符
号パターンのうち右ブロック境界平坦画素とそれに隣接
するブロック(N)のブロック境界画素との間の位置に
該当する符号が同じであるかどうか検査する。符号が同
じである場合、その位置に該当するブロック(N−1)
の右ブロック境界平坦画素はブロック内画素フィルタ手
段170の平滑化処理により原画像に比べブロック境界
の差分が大きくなるような画素値を取る。境界画素判定
手段172では、このようなブロック(N−1)の右ブ
ロック境界平坦画素の個数を数え、その個数がブロック
境界画素検出個数しきい値より大きい場合にブロック
(N−1)の右ブロック境界平坦画素についての境界処
理の実施を有効とする右境界処理判定信号を生成する。
ブロック(N)の左ブロック境界画素についてはブロッ
ク内フィルタ適用フラグが無効であるため、境界処理の
実施を無効とする左境界処理判定信号を生成する。
(1) When the in-block filter application history of the block (N-1) is valid and the in-block filter application flag of the block (N) is invalid, the right block boundary peripheral flat pattern is referred to and the block ( A right block boundary flat pixel to be filtered by the intra-block pixel filter means 170 is specified from among the N-1) right block boundary pixels, and a predetermined number or more of them are continuously flattened to the left from the right block boundary flat pixel. And the inter-pixel difference value between the right block boundary flat pixel and the left block boundary pixel of the block (N) adjacent to the right of the right block boundary flat pixel among the block boundary difference values is given as the block boundary difference threshold value. Is greater than the first threshold and less than the second threshold, the right block boundary code pattern (n-1) of block (N-1). The code corresponding to the position of the right block boundary flat pixel is the same as the code corresponding to the position between the right block boundary flat pixel and the block boundary pixel of the adjacent block (N) in the block boundary code pattern. Inspect for existence. If the codes are the same, the block (N-1) corresponding to that position
The right block boundary flat pixel has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process by the in-block pixel filter means 170. The boundary pixel determination means 172 counts the number of right block boundary flat pixels of such a block (N−1), and when the number is larger than the block boundary pixel detection number threshold value, the right of the block (N−1). A right boundary processing determination signal is generated that makes it effective to perform boundary processing for block boundary flat pixels.
Since the intra-block filter application flag is invalid for the left block boundary pixel of the block (N), a left boundary processing determination signal that invalidates the boundary processing is generated.

【0138】(2)ブロック(N−1)のブロック内フ
ィルタ適用履歴が無効でブロック(N)のブロック内フ
ィルタ適用フラグが有効である場合 ブロック内平坦箇所パターンを参照し、ブロック(N)
の左ブロック境界画素の中でブロック内画素フィルタ手
段170によりフィルタ処理が実施される左ブロック境
界平坦画素を特定し、左ブロック境界平坦画素から右に
所定の数以上連続して平坦であり、かつブロック境界差
分値のうち左ブロック境界平坦画素と左ブロック境界平
坦画素の左に隣接するブロック(N−1)の右ブロック
境界画素との画素間差分値がブロック境界差分しきい値
として与えられる第1のしきい値より大きく第2のしき
い値より小さい場合、ブロック(N)の左ブロック境界
符号パターンのうち左ブロック境界平坦画素の位置に該
当する符号と、ブロック境界符号パターンのうち左ブロ
ック境界平坦画素とそれに隣接するブロック(N−1)
のブロック境界画素との間の位置に該当する符号が同じ
であるかどうか検査する。符号が同じである場合、その
位置に該当するブロック(N)の左ブロック境界平坦画
素はブロック内画素フィルタ手段170の平滑化処理に
より原画像に比べブロック境界の差分が大きくなるよう
な画素値を取る。境界画素判定手段172では、このよ
うなブロック(N)の左ブロック境界平坦画素の個数を
数え、その個数が前記ブロック境界画素検出個数しきい
値より大きい場合にブロック(N)の左ブロック境界画
素についての境界処理の実施を有効とする左境界処理判
定信号を生成する。ブロック(N−1)の右ブロック境
界画素(n−1)についてはブロック内フィルタ適用履
歴が無効であるため、境界処理の実施を無効とする右境
界処理判定信号を生成する。
(2) When the in-block filter application history of the block (N-1) is invalid and the in-block filter application flag of the block (N) is valid, the in-block flat portion pattern is referred to, and the block (N)
Of the left block boundary pixels, the left block boundary flat pixel to be filtered by the in-block pixel filter unit 170 is specified, and the left block boundary flat pixel is continuously flat to the right by a predetermined number or more, and Among the block boundary difference values, the inter-pixel difference value between the left block boundary flat pixel and the right block boundary pixel of the block (N−1) adjacent to the left of the left block boundary flat pixel is given as the block boundary difference threshold. If it is larger than the threshold value of 1 and smaller than the second threshold value, the code corresponding to the position of the left block boundary flat pixel in the left block boundary code pattern of the block (N) and the left block of the block boundary code pattern Boundary flat pixel and adjacent block (N-1)
It is checked whether the code corresponding to the position between the block boundary pixel and the block boundary pixel is the same. When the signs are the same, the left block boundary flat pixel of the block (N) corresponding to that position has a pixel value such that the difference between the block boundaries becomes larger than that of the original image by the smoothing process of the in-block pixel filter means 170. take. The boundary pixel determining means 172 counts the number of left block boundary flat pixels of the block (N), and when the number is larger than the block boundary pixel detection count threshold value, the left block boundary pixel of the block (N). A left boundary processing determination signal that validates the boundary processing is generated. Since the intra-block filter application history is invalid for the right block boundary pixel (n-1) of the block (N-1), the right boundary processing determination signal that invalidates the boundary processing is generated.

【0139】(3)ブロック(N−1)のブロック内フ
ィルタ適用履歴とブロック(N)のブロック内フィルタ
適用フラグがともに有効である場合 右ブロック境界周辺平坦パターンを参照しブロック(N
−1)の右ブロック境界画素の中でブロック内画素フィ
ルタ手段170によりフィルタ処理が実施される右ブロ
ック境界平坦画素を特定し、ブロック内平坦箇所パター
ンを参照しブロック(N)の左ブロック境界画素の中で
ブロック内画素フィルタ手段170によりフィルタ処理
が実施される左ブロック境界平坦画素を特定し、右ブロ
ック境界平坦画素から左に所定の数以上連続して平坦で
ある場合または左ブロック境界平坦画素から右に所定の
数以上連続して平坦である場合に右ブロック境界平坦画
素と左ブロック境界平坦画素がブロック境界を挟んで隣
接している箇所に該当するブロック境界差分値を検査
し、ブロック境界差分値がブロック境界差分しきい値と
して与えられる第1のしきい値より大きく第2のしきい
値より小さい場合、右ブロック境界平坦画素と左ブロッ
ク境界平坦画素がブロック境界を挟んで隣接している箇
所について、その位置に該当する位置のブロック境界符
号パターンと、右ブロック境界平坦画素に該当する位置
の右ブロック境界符号パターンと、左ブロック境界平坦
画素に該当する位置の左ブロック境界符号パターンにつ
いて、これら3つの符号が全て同じであるかどうか検査
する。符号が同じである場合、その位置に該当するブロ
ック(N−1)の右ブロック境界平坦画素およびブロッ
ク(N)の左ブロック境界平坦画素は、ブロック内画素
フィルタ手段170の平滑化処理により原画像に比べブ
ロック境界の差分が大きくなるような画素値を取る。境
界画素判定手段172では、このようなブロック(N−
1)の右ブロック境界平坦画素およびブロック(N)の
左ブロック境界平坦画素の個数を数え、それぞれの個数
がブロック境界画素検出個数しきい値より大きい場合に
ブロック(N−1)の右ブロック境界平坦画素およびブ
ロック(N)の左ブロック境界平坦画素についての境界
処理の実施を有効とする右境界処理判定信号および左境
界処理判定信号を生成する。
(3) When both the intra-block filter application history of block (N-1) and the intra-block filter application flag of block (N) are valid, the block (N) is referenced by referring to the flat pattern around the right block boundary.
-1) The right block boundary pixels of the block (N) are identified by identifying the right block boundary flat pixels to be filtered by the in-block pixel filter means 170 among the right block boundary pixels of -1) and referring to the in-block flat portion pattern. If a left block boundary flat pixel to be filtered by the in-block pixel filter means 170 is specified, and if a predetermined number of consecutive left flat pixels from the right block boundary flat pixel, or a left block boundary flat pixel If the right block boundary flat pixel and the left block boundary flat pixel are adjacent to each other across the block boundary when there is a predetermined number of consecutive flats to the right, the block boundary difference value is inspected and If the difference value is greater than a first threshold and less than a second threshold given as a block boundary difference threshold, A block boundary code pattern at a position corresponding to a position where a block boundary flat pixel and a left block boundary flat pixel are adjacent to each other across a block boundary, and a right block boundary code at a position corresponding to a right block boundary flat pixel. For the pattern and the left block boundary code pattern at the position corresponding to the left block boundary flat pixel, it is checked whether all these three codes are the same. When the signs are the same, the right block boundary flat pixel of the block (N-1) and the left block boundary flat pixel of the block (N) corresponding to the position are the original image by the smoothing process of the in-block pixel filter means 170. Pixel values are taken so that the difference between the block boundaries is larger than that of. The boundary pixel determination means 172 uses such a block (N-
1) Count the number of right block boundary flat pixels and the number of left block boundary flat pixels of block (N). If the number of pixels is greater than the block boundary pixel detection number threshold value, the right block boundary of block (N-1) Border pixel and left block boundary of block (N) The right border processing determination signal and the left border processing determination signal that enable the implementation of the border processing for the flat pixel are generated.

【0140】境界画素処理手段143では、右境界画素
選択手段151において右境界処理判定信号に基づき、
境界処理の実施が有効である右ブロック境界画素につい
て右境界画素フィルタ手段150の出力を選択し、境界
処理の実施が無効である右ブロック境界画素について境
界周辺画素保持手段171からの処理画像右境界画素デ
ータ(n−1′)を選択し、画像出力手段14へ右ブロ
ック境界出力データとして出力する。同様に、左境界画
素選択手段153において左境界処理判定信号に基づ
き、境界処理の実施が有効である左ブロック境界画素に
ついて左境界画素フィルタ手段152の出力を選択し、
境界処理の実施が無効である左ブロック境界画素につい
てブロック内画素フィルタ手段170からの処理画像左
ブロック境界画素データ(n′)を選択し、画像出力手
段14へ左ブロック境界出力データとして出力する。
In the boundary pixel processing means 143, based on the right boundary processing determination signal in the right boundary pixel selection means 151,
The output of the right boundary pixel filter means 150 is selected for the right block boundary pixel for which the boundary processing is valid, and the processed image right boundary from the boundary peripheral pixel holding means 171 is selected for the right block boundary pixel for which the boundary processing is invalid. The pixel data (n-1 ') is selected and output to the image output means 14 as right block boundary output data. Similarly, the left boundary pixel selection means 153 selects the output of the left boundary pixel filter means 152 for the left block boundary pixels for which the boundary processing is effective, based on the left boundary processing determination signal,
The processed image left block boundary pixel data (n ′) from the in-block pixel filter means 170 is selected for the left block boundary pixel for which the boundary processing is invalid, and is output to the image output means 14 as left block boundary output data.

【0141】以上のように第8の実施形態によれば、ブ
ロック境界を構成する2つの隣り合うブロックの原画像
の画素間差分の符号とブロック内フィルタ処理適用の可
否判定結果とブロック内平坦箇所情報とを用い、ブロッ
ク内フィルタ処理によりブロック境界画素が原画像に比
べブロック境界の画素間差分を大きくするような画素値
を取り得るかどうかを予め検査し、そのようなブロック
境界画素の周辺が平坦であり、かつ該当するブロック境
界画素間の差分値がブロック境界差分しきい値として与
えられる第1のしきい値より大きく第2のしきい値より
小さく、かつそのようなブロック境界画素の数がブロッ
ク境界画素検出個数しきい値として与えられる所定のし
きい値を超える場合に、ブロック境界画素についてブロ
ック内フィルタ処理画素の代わりに原画像の境界画素を
選択することで、原画像のブロック境界に歪みが存在す
るかどうかを予め検査することが可能になり、歪みが存
在するブロック境界およびブロック内フィルタ処理によ
る歪みが視覚的に目立ち易い平坦箇所によって構成され
るブロック境界に対してのみ隣接ブロックの境界画素と
フィルタリング処理を実施することが可能となりかつブ
ロック境界処理の度合いを調整することが可能となり、
高画質化を図ることができる。
As described above, according to the eighth embodiment, the sign of the pixel difference between the original images of the two adjacent blocks forming the block boundary, the result of determination as to whether or not the intra-block filtering process is applicable, and the intra-block flat portion are obtained. By using the information, it is inspected in advance whether or not the block boundary pixel can take a pixel value that makes the inter-pixel difference of the block boundary larger than the original image by the intra-block filtering process, and the periphery of such a block boundary pixel is The number of such block boundary pixels that are flat and have a difference value between corresponding block boundary pixels that is greater than a first threshold value that is given as a block boundary difference threshold value and that is less than a second threshold value. Is greater than a predetermined threshold given as the block boundary pixel detection count threshold, the block boundary pixel is subjected to the intra-block filter processing. By selecting the boundary pixels of the original image instead of the pixels, it becomes possible to check in advance whether or not there is distortion at the block boundary of the original image. It becomes possible to carry out the filtering process with the boundary pixels of the adjacent blocks only for the block boundary constituted by the flat part which is visually conspicuous, and it is possible to adjust the degree of the block boundary processing.
Higher image quality can be achieved.

【0142】なお、上記第1から第8の実施形態におけ
る説明では水平方向のモスキート歪み軽減とブロックN
−1とブロックNとの境界画素に対する処理における動
作とについて述べたが、垂直方向についても有効である
ことは言うまでもない。
In the description of the first to eighth embodiments, horizontal mosquito distortion reduction and block N are performed.
Although the operation in the processing for the boundary pixel between -1 and the block N has been described, it goes without saying that it is also effective in the vertical direction.

【0143】[0143]

【発明の効果】この発明による画像処理装置によれば、
隣接するブロックのブロック内フィルタ処理適用の可否
判定結果であるブロック内フィルタ適用フラグとブロッ
ク内平坦箇所検出結果であるブロック内平坦箇所パター
ンをブロック内フィルタ適用判定手段およびブロック内
フィルタ情報保持手段により得ることでブロック内画素
フィルタ手段においてブロック内フィルタ処理が行われ
るブロックとフィルタ処理により画素値の変動する可能
性のあるブロック境界平坦画素を認識し、ブロック境界
平坦画素とそれに隣接する画素についての画素間の差分
の符号を画素間差分符号算出手段より得ることでブロッ
ク内フィルタ処理によりブロックの境界画素が原画像に
比べブロック境界の画素間差分を大きくするような画素
値を取り得るかどうかを予め検査し、境界画素に対する
処理を決定することでモスキート歪み軽減フィルタのブ
ロック境界へ与える悪影響を軽減することができる。
According to the image processing apparatus of the present invention,
An in-block filter application flag that is a determination result of whether to apply in-block filtering processing of an adjacent block and an in-block flat portion pattern that is an in-block flat portion detection result are obtained by the in-block filter application determination means and the in-block filter information holding means. By doing so, the block to be subjected to the intra-block filter processing in the intra-block pixel filter means and the block boundary flat pixel in which the pixel value may vary due to the filter processing are recognized, and the block boundary flat pixel and the pixel between the adjacent pixel It is preliminarily checked whether or not the boundary pixel of the block can take a pixel value that makes the inter-pixel difference of the block boundary larger than that of the original image by the intra-block filter processing by obtaining the code of the difference between And determine the processing for border pixels. In it is possible to reduce the adverse effect to the block boundaries of the mosquito strain relief filter.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の第1の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to a first embodiment of the present invention.

【図2】図1に示した境界画素処理手段の内部構成を示
すブロック図である。
FIG. 2 is a block diagram showing an internal configuration of boundary pixel processing means shown in FIG.

【図3】1ブロックのサイズおよびブロック画像データ
の読み出し順序を示す図である。
FIG. 3 is a diagram showing a size of one block and a reading order of block image data.

【図4】この発明の第2の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of an image processing apparatus according to a second embodiment of the present invention.

【図5】この発明の第3の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of an image processing apparatus according to a third embodiment of the present invention.

【図6】この発明の第4の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of an image processing apparatus according to a fourth embodiment of the present invention.

【図7】この発明の第5の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 7 is a block diagram showing a configuration of an image processing apparatus according to a fifth embodiment of the present invention.

【図8】この発明の第6の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 8 is a block diagram showing a configuration of an image processing apparatus according to a sixth embodiment of the present invention.

【図9】この発明の第7の実施形態による画像処理装置
の構成を示すブロック図である。
FIG. 9 is a block diagram showing a configuration of an image processing apparatus according to a seventh embodiment of the present invention.

【図10】図9に示した境界画素処理手段の内部構成を
示すブロック図である。
10 is a block diagram showing an internal configuration of the boundary pixel processing means shown in FIG.

【図11】この発明の第8の実施形態による画像処理装
置の構成を示すブロック図である。
FIG. 11 is a block diagram showing a configuration of an image processing device according to an eighth embodiment of the present invention.

【図12】従来のモスキート歪み軽減フィルタ処理を説
明するための図である。
FIG. 12 is a diagram for explaining conventional mosquito distortion reduction filter processing.

【符号の説明】[Explanation of symbols]

1 入力画像メモリ 2 ブロック番号カウンタ 3 アドレス生成手段 4 画素間差分符号算出手段 95,115,135,155 画素間差分値算出手段 6 ブロック内フィルタ適用判定手段 7 ブロック内平坦箇所検出手段 8 ブロック内フィルタ適用フラグ保持手段 9,59,79,99,119,139,169 平坦
箇所パターン保持手段 10,140,170 ブロック内画素フィルタ手段 11 境界画素保持手段 141,171 境界周辺画素保持手段 12,42,62,82,102,122,142,1
72 境界画素判定手段 13,143 境界画素処理手段 14 画像出力手段 20,151 右境界画素選択手段 21,153 左境界画素選択手段 150 右境界画素フィルタ手段 152 左境界画素フィルタ手段
1 Input Image Memory 2 Block Number Counter 3 Address Generation Means 4 Pixel Difference Code Calculation Means 95, 115, 135, 155 Pixel Difference Value Calculation Means 6 In-block Filter Application Determining Means 7 In-block Flat Place Detection Means 8 In-block Filters Applicable flag holding means 9, 59, 79, 99, 119, 139, 169 Flat portion pattern holding means 10, 140, 170 In-block pixel filter means 11 Boundary pixel holding means 141, 171 Boundary peripheral pixel holding means 12, 42, 62 , 82, 102, 122, 142, 1
72 boundary pixel determination means 13, 143 boundary pixel processing means 14 image output means 20, 151 right boundary pixel selection means 21, 153 left boundary pixel selection means 150 right boundary pixel filter means 152 left boundary pixel filter means

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B057 CC02 CE05 CE06 CG01 CH09 CH11 DC16 5C059 KK04 PP22 PP23 PP25 TA68 TB08 TC02 TD05 TD12 5C077 LL02 MP01 PP02 PP47 PP61 PQ22 RR21 5C078 AA04 BA42 CA21 DA01    ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 5B057 CC02 CE05 CE06 CG01 CH09                       CH11 DC16                 5C059 KK04 PP22 PP23 PP25 TA68                       TB08 TC02 TD05 TD12                 5C077 LL02 MP01 PP02 PP47 PP61                       PQ22 RR21                 5C078 AA04 BA42 CA21 DA01

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 原画像を保持する入力画像メモリと、 前記入力画像メモリより得られる原画像データの画素間
差分の符号を算出する画素間差分符号算出手段と、 前記入力画像メモリより得られる処理対象ブロック内の
画像データにおけるエッジ箇所と平坦箇所の検出を行う
ことで前記処理対象ブロックへのブロック内フィルタ処
理適用の可否判定を行うブロック内フィルタ適用判定手
段と、 前記入力画像メモリより得られる処理対象ブロック内の
画像データの平坦箇所を検出するブロック内平坦箇所検
出手段と、 前記ブロック内フィルタ適用判定手段により処理対象ブ
ロックに対してブロック内フィルタの適用が判定された
場合に、前記ブロック内平坦箇所検出手段により検出さ
れたブロック内平坦箇所情報に基づき、処理対象ブロッ
ク内の画像データの平坦箇所に対してフィルタ処理を実
施するブロック内画素フィルタ手段と、 前記画素間差分符号算出手段にて得られた画素間差分符
号と前記ブロック内フィルタ適用判定手段にて得られた
ブロック内フィルタ処理適用の可否判定結果と前記ブロ
ック内平坦箇所検出手段にて得られたブロック内平坦箇
所情報とを保持するブロック内フィルタ情報保持手段
と、 前記ブロック内画素フィルタ手段にて得られた処理後の
ブロック画像データを保持する処理後ブロック画像デー
タ保持手段と、 前記画素間差分符号算出手段により得られる処理対象ブ
ロックの画素間差分符号と前記ブロック内フィルタ適用
判定手段により得られる処理対象ブロックのブロック内
フィルタ処理適用の可否判定結果と前記ブロック内平坦
箇所検出手段により得られる処理対象ブロックのブロッ
ク内平坦箇所情報と前記ブロック内フィルタ情報保持手
段により保持されているブロック内フィルタ情報のうち
隣接ブロックに関する画素間差分符号と隣接ブロックに
関するブロック内フィルタ処理適用の可否判定結果と、
隣接ブロックに関するブロック内平坦箇所情報とに基づ
いて処理対象ブロックと隣接ブロックのブロック境界画
素の状態を検査し、ブロック境界画素に対する処理を決
定する境界画素判定手段と、 前記境界画素判定手段により得られる境界画素判定結果
に基づき、ブロック境界画素に処理を施す境界画素処理
手段と、 前記ブロック内画素フィルタ手段と前記境界画素処理手
段と前記入力画像メモリからの画像データを映像信号と
して出力する画像出力手段とを備えることを特徴とする
画像処理装置。
1. An input image memory for holding an original image, an inter-pixel difference code calculating means for calculating a code of a pixel difference of original image data obtained from the input image memory, and a process obtained from the input image memory. In-block filter application determination means for determining whether or not the in-block filter processing can be applied to the processing target block by detecting edge locations and flat locations in the image data in the target block, and processing obtained from the input image memory In-block flat portion detection means for detecting a flat portion of image data in the target block, and in-block flat portion if the in-block filter application determination means determines that the in-block filter is applied to the processing target block In the block to be processed, based on the flat location information in the block detected by the location detection means In-block pixel filter means for performing filter processing on flat portions of image data, inter-pixel difference code obtained by the inter-pixel difference code calculation means, and block obtained by the intra-block filter application determination means In-block filter information holding means for holding the in-block filter processing applicability determination result and in-block flat location information obtained by the in-block flat location detection means, and processing obtained by the in-block pixel filtering means A post-processing block image data holding means for holding the subsequent block image data, an inter-pixel difference code of the processing target block obtained by the inter-pixel difference code calculating means, and a processing target block obtained by the intra-block filter application determining means By the determination result of whether or not the in-block filter processing is applicable and the flat portion detection means in the block Resulting determination result of whether the intra-block flat portion information of the obtained block to be processed and the intra-block filter information held by the intra-block filter information holding unit is the inter-pixel difference code regarding the adjacent block and the intra-block filtering process regarding the adjacent block When,
Boundary pixel determination means for inspecting the state of the block boundary pixels of the processing target block and the adjacent block based on the in-block flat portion information on the adjacent block, and determining the processing for the block boundary pixel, and obtained by the boundary pixel determination means. Boundary pixel processing means for processing block boundary pixels based on the boundary pixel determination result, image output means for outputting image data from the in-block pixel filter means, the boundary pixel processing means and the input image memory as a video signal. An image processing apparatus comprising:
【請求項2】 請求項1に記載の画像処理装置におい
て、 前記画素間差分符号算出手段は、 処理対象ブロックのブロック境界近傍の画素間差分符号
と、隣接ブロックのブロック境界近傍の画素間差分符号
と、処理対象ブロックと隣接ブロックのブロック境界画
素の境界画素間差分符号とを算出することを特徴とする
画像処理装置。
2. The image processing device according to claim 1, wherein the inter-pixel difference code calculation means includes: an inter-pixel difference code near a block boundary of a block to be processed; and an inter-pixel difference code near a block boundary of an adjacent block. And an inter-boundary pixel difference code of block boundary pixels of the processing target block and the adjacent block.
【請求項3】 請求項1に記載の画像処理装置におい
て、 前記境界画素判定手段は、 処理対象ブロックおよび隣接ブロックの両方またはどち
らか一方のブロック内フィルタ処理適用の可否判定結果
が有効である場合、前記ブロック内フィルタ処理適用の
可否判定結果が有効であるブロックのブロック内平坦箇
所情報を参照し、前記ブロック内平坦箇所にブロック境
界画素が含まれていれば、そのブロックのブロック境界
近傍の画素間差分符号およびそのブロックに隣接するブ
ロックのブロック境界画素との境界画素間差分符号から
ブロック内フィルタ処理実施後のブロック境界画素が原
画像に比べブロック境界の画素間差分を大きくするよう
な画素値を取り得るかどうかを予め検査し、前記検査結
果に基づきブロック境界画素について境界処理の実施を
決定することを特徴とする画像処理装置。
3. The image processing apparatus according to claim 1, wherein the boundary pixel determination unit determines whether or not the intra-block filter processing applicable to both or one of the processing target block and the adjacent block is valid. , Refer to the in-block flat portion information of a block for which the determination result of whether or not to apply the in-block filter processing is valid, and if a block boundary pixel is included in the in-block flat portion, pixels near the block boundary of the block Pixel value that makes the inter-pixel difference of the block boundary larger after the intra-block filter processing than the original image from the inter-difference code and the inter-boundary pixel difference code between the block boundary pixel of the block adjacent to the block Is checked in advance, and the boundary processing is performed on the block boundary pixels based on the inspection result. The image processing apparatus characterized by determining the implementation.
【請求項4】 請求項1に記載の画像処理装置におい
て、 前記境界画素判定手段は、 処理対象ブロックおよび隣接ブロックの両方またはどち
らか一方のブロック内フィルタ処理適用の可否判定結果
が有効である場合、前記ブロック内フィルタ処理適用の
可否判定結果が有効であるブロックのブロック内平坦箇
所情報を参照し、前記ブロック内平坦箇所にブロック境
界画素が含まれていれば、そのブロックのブロック境界
近傍の画素間差分符号およびそのブロックに隣接するブ
ロックのブロック境界画素との境界画素間差分符号から
ブロック内フィルタ処理実施後のブロック境界画素が原
画像に比べブロック境界の画素間差分を大きくするよう
な画素値を取り得る画素数を数え、その画素数が所定の
個数を超える場合にブロック境界画素について境界処理
の実施を決定することを特徴とする画像処理装置。
4. The image processing apparatus according to claim 1, wherein the boundary pixel determining unit determines whether or not the in-block filter processing applicable to both or one of the processing target block and the adjacent block is valid. , Refer to the in-block flat portion information of a block for which the determination result of whether or not to apply the in-block filter processing is valid, and if a block boundary pixel is included in the in-block flat portion, pixels near the block boundary of the block Pixel value that makes the inter-pixel difference of the block boundary larger after the intra-block filter processing than the original image from the inter-difference code and the inter-boundary pixel difference code between the block boundary pixel of the block adjacent to the block The number of pixels that can be taken is counted, and if the number of pixels exceeds a predetermined number, The image processing apparatus characterized by determining the implementation of boundary processing.
【請求項5】 請求項1に記載の画像処理装置におい
て、 前記境界画素判定手段は、 処理対象ブロックおよび隣接ブロックの両方またはどち
らか一方のブロック内フィルタ処理適用の可否判定結果
が有効である場合、前記ブロック内フィルタ処理適用の
可否判定結果が有効であるブロックのブロック内平坦箇
所情報を参照し、前記ブロック内平坦箇所にブロック境
界画素が含まれており、かつ前記ブロック境界画素の周
辺画素が所定の個数以上連続して平坦であれば、そのブ
ロックのブロック境界近傍の画素間差分符号およびその
ブロックに隣接するブロックのブロック境界画素との境
界画素間差分符号からブロック内フィルタ処理実施後の
ブロック境界画素が原画像に比べブロック境界の画素間
差分を大きくするような画素値を取り得るかどうかを予
め検査し、前記検査結果に基づきブロック境界画素につ
いて境界処理の実施を決定することを特徴とする画像処
理装置。
5. The image processing apparatus according to claim 1, wherein the boundary pixel determining unit determines whether or not the intra-block filtering process is applicable to both or one of the target block and the adjacent block is valid. , Refer to the in-block flat portion information of the block for which the in-block filter processing applicability determination result is valid, and if the in-block flat portion includes a block boundary pixel, and the peripheral pixels of the block boundary pixel are If a predetermined number or more are continuously flat, the block after the intra-block filter processing is performed from the inter-pixel difference code near the block boundary of the block and the inter-boundary pixel difference code with the block boundary pixel of the block adjacent to the block Can the pixel value of the boundary pixel be such that the difference between pixels at the block boundary is larger than that of the original image? The image processing apparatus characterized by emergence pre inspected to determine the implementation of the boundary processing for the block boundary pixel on the basis of the test results.
【請求項6】 請求項1に記載の画像処理装置におい
て、 前記境界画素判定手段は、 処理対象ブロックおよび隣接ブロックの両方またはどち
らか一方のブロック内フィルタ処理適用の可否判定結果
が有効である場合、前記ブロック内フィルタ処理適用の
可否判定結果が有効であるブロックのブロック内平坦箇
所情報を参照し、前記ブロック内平坦箇所にブロック境
界画素が含まれており、かつ前記ブロック境界画素の周
辺画素が所定の個数以上連続して平坦であれば、そのブ
ロックのブロック境界近傍の画素間差分符号およびその
ブロックに隣接するブロックのブロック境界画素との境
界画素間差分符号からブロック内フィルタ処理実施後の
ブロック境界画素が原画像に比べブロック境界の画素間
差分を大きくするような画素値を取り得る画素数を数
え、その画素数が所定の個数を超える場合にブロック境
界画素について境界処理の実施を決定することを特徴と
する画像処理装置。
6. The image processing apparatus according to claim 1, wherein the boundary pixel determination unit determines whether or not the intra-block filtering process is applicable to both or one of the target block and the adjacent block is valid. , Refer to the in-block flat portion information of the block for which the in-block filter processing applicability determination result is valid, and if the in-block flat portion includes a block boundary pixel, and the peripheral pixels of the block boundary pixel are If a predetermined number or more are continuously flat, the block after the intra-block filter processing is performed from the inter-pixel difference code near the block boundary of the block and the inter-boundary pixel difference code with the block boundary pixel of the block adjacent to the block An image in which boundary pixels can take pixel values that make the difference between pixels at the block boundary larger than in the original image. Counted, the image processing apparatus characterized by the number of pixels to determine the implementation of the boundary processing for the block boundary pixels to exceed the predetermined number.
【請求項7】 請求項1に記載の画像処理装置におい
て、 前記境界画素処理手段は、 境界処理実施画素についてブロック内フィルタ処理画素
の代わりに原画像の境界画素を出力することを特徴とす
る画像処理装置。
7. The image processing apparatus according to claim 1, wherein the boundary pixel processing unit outputs a boundary pixel of the original image instead of the intra-block filter processing pixel for the boundary processing execution pixel. Processing equipment.
【請求項8】 原画像を保持する入力画像メモリと、 前記入力画像メモリより得られる原画像データの画素間
差分の符号を算出する画素間差分符号算出手段と、 前記入力画像メモリより得られる原画像データの処理対
象ブロックのブロック境界画素画素と隣接ブロックのブ
ロック境界画素の画素間差分値を算出する画素間差分値
算出手段と、 前記入力画像メモリより得られる処理対象ブロック内の
画像データにおけるエッジ箇所と平坦箇所の検出を行う
ことで前記処理対象ブロックへのブロック内フィルタ処
理適用の可否判定を行うブロック内フィルタ適用判定手
段と、 前記入力画像メモリより得られる処理対象ブロック内の
平坦箇所を検出するブロック内平坦箇所検出手段と、 前記ブロック内フィルタ適用判定手段により処理対象ブ
ロックに対してブロック内フィルタの適用が判定された
場合に、前記ブロック内平坦箇所検出手段により検出さ
れたブロック内平坦箇所情報に基づき、処理対象ブロッ
クの平坦箇所に対してフィルタ処理を実施するブロック
内画素フィルタ手段と、 前記画素間差分符号算出手段にて得られた画素間差分符
号と前記ブロック内フィルタ適用判定手段にて得られた
ブロック内フィルタ処理適用の可否判定結果と前記ブロ
ック内平坦箇所検出手段にて得られたブロック内平坦箇
所情報とを保持するブロック内フィルタ情報保持手段
と、 前記ブロック内画素フィルタ手段にて得られた処理後の
ブロック画像データを保持する処理後ブロック画像デー
タ保持手段と、 前記画素間差分符号算出手段により得られる処理対象ブ
ロックの画素間差分符号と前記ブロック内フィルタ適用
判定手段により得られる処理対象ブロックのブロック内
フィルタ処理適用の可否判定結果と前記ブロック内平坦
箇所検出手段により得られる処理対象ブロックのブロッ
ク内平坦箇所情報と前記ブロック内フィルタ情報保持手
段により保持されているブロックフィルタ情報のうち隣
接ブロックに関する画素間差分符号と隣接ブロックに関
するブロック内フィルタ処理適用の可否判定結果と隣接
ブロックに関するブロック内平坦箇所情報とに基づいて
処理対象ブロックと隣接ブロックのブロック境界画素の
状態を検査し、ブロック境界画素に対する処理を決定す
る境界画素判定手段と、 前記境界画素判定手段により得られる境界画素判定結果
に基づき、ブロック境界画素に処理を施す境界画素処理
手段と、 前記ブロック内画素フィルタ手段と前記境界画素処理手
段と前記入力画像メモリからの画像データを映像信号と
して出力する画像出力手段とを備えることを特徴とする
画像処理装置。
8. An input image memory for holding an original image, an inter-pixel difference code calculating means for calculating a code of an inter-pixel difference of original image data obtained from the input image memory, and an original image obtained from the input image memory. An inter-pixel difference value calculating means for calculating an inter-pixel difference value between a block boundary pixel pixel of a block to be processed of image data and a block boundary pixel of an adjacent block, and an edge in image data in the block to be processed obtained from the input image memory In-block filter application determining means for determining whether or not in-block filter processing can be applied to the processing target block by detecting a flat portion and a flat portion, and detecting a flat portion in the processing target block obtained from the input image memory Block in the block to be processed, and the block application determination means in the block to be processed block When it is determined that the in-block filter is applied to the inside of the block that performs the filtering process on the flat portion of the block to be processed, based on the inside flat portion information detected by the inside flat portion detecting unit. Pixel filter means, inter-pixel difference code obtained by the inter-pixel difference code calculation means, in-block filter processing applicability determination result obtained by the in-block filter application decision means, and in-block flat portion detection In-block filter information holding means for holding the in-block flat portion information obtained by the means, and processed block image data holding means for holding the processed block image data obtained by the in-block pixel filter means And the inter-pixel difference code of the block to be processed obtained by the inter-pixel difference code calculating means and the block. Check result of the intra-block filter application of the processing target block obtained by the intra-block filter application decision means The block adjacent to the processing target block based on the inter-pixel difference code regarding the adjacent block, the determination result of whether the intra-block filtering process regarding the adjacent block is applicable, and the intra-block flat portion information regarding the adjacent block among the block filter information held by the means Boundary pixel determination means for inspecting the state of the block boundary pixels of the block and determining processing for the block boundary pixels, and boundary pixel processing for processing the block boundary pixels based on the boundary pixel determination result obtained by the boundary pixel determination means. Means and the internal image of the block The image processing apparatus characterized by comprising an image output means for outputting as a video signal image data filter means and said boundary pixel processing unit from the input image memory.
【請求項9】 請求項8に記載の画像処理装置におい
て、 前記画素間差分符号算出手段は、 処理対象ブロックのブロック境界近傍の画素間差分符号
と、隣接ブロックのブロック境界近傍の画素間差分符号
と、処理対象ブロックと隣接ブロックのブロック境界画
素の境界画素間差分符号とを算出することを特徴とする
画像処理装置。
9. The image processing device according to claim 8, wherein the inter-pixel difference code calculation means includes: an inter-pixel difference code near a block boundary of a processing target block; and an inter-pixel difference code near a block boundary of an adjacent block. And an inter-boundary pixel difference code of block boundary pixels of the processing target block and the adjacent block.
【請求項10】 請求項8に記載の画像処理装置におい
て、 前記境界画素判定手段は、 処理対象ブロックおよび隣接ブロックの両方またはどち
らか一方のブロック内フィルタ処理適用の可否判定結果
が有効である場合、前記ブロック内フィルタ処理適用の
可否判定結果が有効であるブロックのブロック内平坦箇
所情報を参照し、前記ブロック内平坦箇所にブロック境
界画素が含まれており、かつ前記ブロック境界画素を含
み所定の個数以上連続して平坦であり、かつ処理対象ブ
ロックのブロック境界画素と隣接ブロックのブロック境
界画素の画素差分値が第1のしきい値以上かつ第2のし
きい値以下である場合に、そのブロックのブロック境界
近傍の画素間差分符号およびそのブロックに隣接するブ
ロックのブロック境界画素との境界画素間差分符号から
ブロック内フィルタ処理実施後のブロック境界画素が原
画像に比べブロック境界の画素間差分を大きくするよう
な画素値を取り得るかどうかを予め検査し、前記検査結
果に基づきブロック境界画素について境界処理の実施を
決定することを特徴とする画像処理装置。
10. The image processing device according to claim 8, wherein the boundary pixel determination unit determines whether or not the in-block filter processing application determination result of both or one of the processing target block and the adjacent block is valid. , Refer to the in-block flat portion information of the block for which the in-block filter processing applicability determination result is valid, and if the in-block flat portion includes a block boundary pixel, and includes the block boundary pixel, If the pixel difference value between the block boundary pixel of the processing target block and the block boundary pixel of the adjacent block is equal to or more than the first threshold value and equal to or less than the second threshold value, Inter-pixel difference code near the block boundary of the block and the boundary pixel between the block boundary pixel of the block adjacent to the block It is preliminarily inspected from the minute code whether or not the block boundary pixel after the intra-block filtering process can take a pixel value that makes the inter-pixel difference of the block boundary larger than the original image, and the block boundary pixel is determined based on the inspection result. An image processing apparatus, which determines execution of boundary processing.
【請求項11】 請求項8に記載の画像処理装置におい
て、 前記境界画素判定手段は、 処理対象ブロックおよび隣接ブロックの両方またはどち
らか一方のブロック内フィルタ処理適用の可否判定結果
が有効である場合、前記ブロック内フィルタ処理適用の
可否判定結果が有効であるブロックのブロック内平坦箇
所情報を参照し、前記ブロック内平坦箇所にブロック境
界画素が含まれており、かつ前記ブロック境界画素の周
辺画素が所定の個数以上連続して平坦であり、かつ処理
対象ブロックのブロック境界画素と隣接ブロックのブロ
ック境界画素の画素差分値が第1のしきい値以上かつ第
2のしきい値以下である場合に、そのブロックのブロッ
ク境界近傍の画素間差分符号およびそのブロックに隣接
するブロックのブロック境界画素との境界画素間差分符
号からブロック内フィルタ処理実施後のブロック境界画
素が原画像に比べブロック境界の画素間差分を大きくす
るような画素値を取り得る画素数を数え、その画素数が
所定の個数を超える場合にブロック境界画素について境
界処理の実施を決定することを特徴とする画像処理装
置。
11. The image processing apparatus according to claim 8, wherein the boundary pixel determining unit determines whether or not the intra-block filter processing applicable to both or one of the processing target block and the adjacent block is valid. , Refer to the in-block flat portion information of the block for which the in-block filter processing applicability determination result is valid, and if the in-block flat portion includes a block boundary pixel, and the peripheral pixels of the block boundary pixel are When the pixel difference value between the block boundary pixel of the processing target block and the block boundary pixel of the adjacent block is equal to or more than the first threshold value and equal to or less than the second threshold value, the number of pixels is continuously flat for a predetermined number or more. , The pixel difference code near the block boundary of the block and the boundary with the block boundary pixel of the block adjacent to the block Count the number of pixels that can take a pixel value that makes the block boundary pixel after the intra-block filter processing larger the pixel difference of the block boundary from the original difference code from the prime difference code, and the number of pixels exceeds a predetermined number In this case, the image processing apparatus is characterized by deciding whether to execute boundary processing for block boundary pixels.
【請求項12】 請求項8に記載の画像処理装置におい
て、 前記境界画素処理手段は、 境界処理実施画素についてブロック内フィルタ処理画素
の代わりに原画像の境界画素を出力することを特徴とす
る画像処理装置。
12. The image processing apparatus according to claim 8, wherein the boundary pixel processing unit outputs a boundary pixel of the original image instead of the intra-block filter processing pixel for the boundary processing execution pixel. Processing equipment.
【請求項13】 請求項8に記載の画像処理装置におい
て、 前記境界画素処理手段は、 境界処理実施画素についてブロック内フィルタ処理後の
境界処理実施画素とその隣接画素による平滑化を実施す
ることを特徴とする画像処理装置。
13. The image processing device according to claim 8, wherein the boundary pixel processing means performs smoothing on the boundary processed pixels after the intra-block filter processing and the adjacent pixels. A characteristic image processing device.
JP2001220915A 2001-07-23 2001-07-23 Image processor Pending JP2003037737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001220915A JP2003037737A (en) 2001-07-23 2001-07-23 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001220915A JP2003037737A (en) 2001-07-23 2001-07-23 Image processor

Publications (1)

Publication Number Publication Date
JP2003037737A true JP2003037737A (en) 2003-02-07

Family

ID=19054664

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001220915A Pending JP2003037737A (en) 2001-07-23 2001-07-23 Image processor

Country Status (1)

Country Link
JP (1) JP2003037737A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015058722A1 (en) * 2013-10-25 2015-04-30 Mediatek Inc. Method and apparatus for improving visual quality by using neighboring pixel information in flatness check and/or applying smooth function to quantization parameters/pixel values

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015058722A1 (en) * 2013-10-25 2015-04-30 Mediatek Inc. Method and apparatus for improving visual quality by using neighboring pixel information in flatness check and/or applying smooth function to quantization parameters/pixel values
US9807389B2 (en) 2013-10-25 2017-10-31 Mediatek Inc. Method and apparatus for improving visual quality by using neighboring pixel information in flatness check and/or applying smooth function to quantization parameters/pixel values

Similar Documents

Publication Publication Date Title
KR100306250B1 (en) Error concealer for video signal processor
JP5308062B2 (en) Method and apparatus for detecting and removing false contours
US8682109B2 (en) Method and system of reconstructing super-resolution image
JP4203736B2 (en) Image motion detection apparatus and computer program
WO2012096768A2 (en) Method of detecting logos, titles, or sub-titles in video frames
CN111696064B (en) Image processing method, device, electronic equipment and computer readable medium
CN111652875B (en) Video forgery detection method, system, storage medium and video monitoring terminal
US20110007973A1 (en) Apparatus for removing image noise and method thereof
US8363978B2 (en) System and method for block edge location with varying block sizes and offsets in compressed digital video
JP2001218210A (en) Noise detection method, noise detector, image data processing unit, and recording medium
CN101141655A (en) Video signal picture element point chromatic value regulation means
Bozkurt et al. Detection and localization of frame duplication using binary image template
JP2007027980A (en) Decoding apparatus and coding apparatus
JP2003037737A (en) Image processor
JP5377649B2 (en) Image processing apparatus and video reproduction apparatus
WO2011129163A1 (en) Intra prediction processing method and intra prediction processing program
JP4253265B2 (en) Shadow detection apparatus, shadow detection method and shadow detection program, image processing apparatus using shadow detection apparatus, image processing method using shadow detection method, and image processing program using shadow detection program
JP2008124901A (en) Video signal processing apparatus
JP2005535204A (en) Dynamic detection of blocking artifacts
JP2005521310A (en) Video signal post-processing method
Sowmya et al. Object based forgery detection and localization in videos
JPH09288037A (en) Inspection method for lcd panel
CN111080550B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
JP3916041B2 (en) Signal processing apparatus, signal processing method, program, and recording medium
US8165412B2 (en) Method for decoding binary image at high speed