JP2006101397A - Moving image encoding device and moving image encoding program - Google Patents

Moving image encoding device and moving image encoding program Download PDF

Info

Publication number
JP2006101397A
JP2006101397A JP2004287355A JP2004287355A JP2006101397A JP 2006101397 A JP2006101397 A JP 2006101397A JP 2004287355 A JP2004287355 A JP 2004287355A JP 2004287355 A JP2004287355 A JP 2004287355A JP 2006101397 A JP2006101397 A JP 2006101397A
Authority
JP
Japan
Prior art keywords
value
unit
loop filter
quantized
macroblock
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
JP2004287355A
Other languages
Japanese (ja)
Inventor
Futoshi Tsubaki
太 椿
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2004287355A priority Critical patent/JP2006101397A/en
Publication of JP2006101397A publication Critical patent/JP2006101397A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To obtain a moving image encoding device which enables the detection of the insertion/non-insertion of a loop filter to be easily performed, when a signal encoded by inserting and non-inserting the loop filter is decoded. <P>SOLUTION: An average quantized value of a macro block within a single slice image of a quantized input image is obtained by an average value calculating portion 254 by being compared with a quantized threshold value by a first comparator 256. A dispersed value of the quantized value is obtained by a dispersion value calculating portion 251 by being compared with a dispersion threshold value by a comparator 253. When the comparison result at the first comparator is smaller than a predetermined quantized value and the dispersion value is also smaller than the quantized value, a loop filter is determined to be turned off. When the quantized value and the dispersion value are larger, the loop filter is determined to be turned on by a filter level determining portion 257. When macro blocks where the loop filter immediately before the loop filter determined to be turned on up to the macro block is determined to be turned off sequentially exist, its section is determined to be a new slice section by a slice section determining portion 193, and encoded. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像信号をブロックに分割して変換符号化する際に、ブロックノイズが生じると想定されるブロックを予めブロックノイズ除去処理して圧縮符号化すると共に、圧縮符号化された信号の復号化時には符号化時と同一のブロックノイズ除去処理された参照画像を生成して復号化するための符号化信号を生成する動画像符号化装置及び動画像符号化プログラムに関する。   In the present invention, when an image signal is divided into blocks and subjected to transform coding, a block that is assumed to generate block noise is subjected to block noise removal processing and compression coded in advance, and the compression coded signal is decoded. The present invention relates to a moving image coding apparatus and a moving image coding program for generating a coded signal for generating and decoding a reference image that has been subjected to the same block noise removal processing as that for coding.

最近になり、通信や蓄積の分野における画像の高能率圧縮符号化方法として、MPEG(Moving Picture Experts Group)−4やH.264等が広く用いられている。それらの符号化方式では画像から空間及び時間に係る冗長度を取り除いた符号化信号を得ている。離散コサイン変換(Discrete Cosine Transform、以下ではDCTと称する)などの直行変換と、変換して得られた係数を量子化処理することにより空間冗長度を取り除いている。この量子化処理により、係数値が小さい周波数成分の値を0にしても量子化処理で用いられる量子化スケールが小さければ画質劣化は目立ちにくくできる。また時間方向の冗長度を取り除くためには、動き補償が用いられる。動き補償では、例えば16×16画素のマクロブロックを単位として、参照フレームから最も近い領域を選び出し、その差分値を符号化する。動きベクトル量が小さい場合には差分値はほぼ0となり、時間的冗長度を削減できる。   Recently, MPEG (Moving Picture Experts Group) -4 and H.264 have been used as high-efficiency compression encoding methods for images in the fields of communication and storage. H.264 is widely used. In these encoding methods, an encoded signal obtained by removing redundancy related to space and time from an image is obtained. Spatial redundancy is removed by performing orthogonal transformation such as Discrete Cosine Transform (hereinafter referred to as DCT) and quantizing the coefficient obtained by the transformation. By this quantization processing, even if the value of a frequency component having a small coefficient value is set to 0, image quality deterioration can be made inconspicuous if the quantization scale used in the quantization processing is small. Also, motion compensation is used to remove redundancy in the time direction. In motion compensation, for example, in the unit of a macro block of 16 × 16 pixels, the closest region is selected from the reference frame, and the difference value is encoded. When the motion vector amount is small, the difference value is almost 0, and the temporal redundancy can be reduced.

ここで、符号化時の圧縮率を高くすると符号化ノイズが生じ、画質が劣化する。符号化ノイズの代表的なものとして、ブロックノイズ(ブロック歪みとも呼ばれ、ブロック境界がはっきりとタイル状に見えるノイズ)及びモスキートノイズ(分割したブロックの近辺で蚊が飛んでいるように見えるノイズ)がある。ブロックノイズ及びモスキートノイズは、アナログ系のノイズとは異なり、画質劣化として大きく目立ち易いためこれらのノイズを除去する必要がある。   Here, if the compression rate at the time of encoding is increased, encoding noise is generated and the image quality is deteriorated. Typical coding noise is block noise (also called block distortion, noise that makes the block boundary clearly appear to be tiled) and mosquito noise (noise that appears to have mosquitoes flying around the divided blocks) There is. Unlike analog noise, block noise and mosquito noise are easily noticeable as image quality degradation, and it is necessary to remove these noises.

特許文献1には、ブロックノイズが発生するブロック境界又はモスキートノイズが発生するブロックを確実に検出し、それらのノイズを除去するために、入力される画像に対する動き補償予測、ブロック単位の直交変換及び量子化の各処理を用いて符号化された符号列から、各ブロックについての直交変換係数及び動きベクトルを含んだ符号化情報を符号化情報抽出ステップにより抽出し、抽出された各ブロックの動きベクトルに基づいて、参照フレームから各ブロックの参照領域を参照領域抽出ステップにより求め、求められた各ブロック及びその参照領域に重なる参照フレーム内のブロックに係る直交変換係数の各周波数成分の分布に基づいて、除去すべき符号化ノイズを発生するブロックを符号化ノイズ検出ステップにより検出し、ノイズを発生させるとして検出されたブロックの各画素ブロックの境界をフィルタ処理し、ブロックノイズを除去した画像を出力するようにしたブロックノイズの検出及び除去方法が開示されている。   In Patent Literature 1, in order to reliably detect a block boundary where block noise occurs or a block where mosquito noise occurs, and to remove those noises, motion compensation prediction for an input image, orthogonal transformation in units of blocks, and The encoded information including the orthogonal transformation coefficient and the motion vector for each block is extracted from the code sequence encoded using each process of quantization by the encoded information extraction step, and the motion vector of each extracted block is extracted. Based on the reference frame, the reference region of each block is obtained by the reference region extraction step, and based on the distribution of each frequency component of the orthogonal transform coefficient relating to the obtained block and the block in the reference frame that overlaps the reference region. The block that generates the coding noise to be removed is detected by the coding noise detection step, and the noise is detected. The boundaries of the pixel blocks of the detected block filtering, detection and removal method of the block noise so as to output an image obtained by removing the block noise has been disclosed as to generate's.

非特許文献1には、即ちMPEG(moving picture experts group)−4のAVC(Advanced Video Coding)には、マクロブロックを符号化して得られる符号化情報と、そのマクロブロックに隣接するマクロブロックを符号化して得られる隣接ブロック符号化情報とを基に発生されるブロック歪の強さを検出し、その検出に基づいてブロックノイズフィルタ処理を行う方法について記述されている。即ち、ブロック歪の強さはBS(Boundary strength)値として求められる。Bs値としては0〜4が定義されている。Bs値の検出は、符号化されるマクロブロックのピクチャタイプ、符号化モードがフレームモードであるかまたはフィールドモードであるか、動きベクトルの大きさや方向、参照画像の枚数、参照画像の異なり、及びブロックに有意な係数が存在するかなどに応じて行われる。Bs値0はブロックノイズ除去フィルタを用いない場合であり、Bs値1は小さなブロックノイズ除去特性を与える場合である。Bs値の増加と共に除去特性も増加し、Bs値4は最も大きなブロックノイズ除去特性を与える場合である。なお、ブロックノイズフィルタの挿入処理を実行又は実行しないためのフィルタOn/Offが選択できるようになされている。
特開2001−204029号公報 ISO/IEC14496−10
In Non-Patent Document 1, that is, MPEG (moving picture experts group) -4 AVC (Advanced Video Coding), encoding information obtained by encoding a macroblock and a macroblock adjacent to the macroblock are encoded. Describes a method of detecting the intensity of block distortion generated based on the adjacent block coding information obtained by the conversion and performing block noise filter processing based on the detection. That is, the strength of block distortion is obtained as a BS (Boundary strength) value. 0 to 4 are defined as the Bs value. The detection of the Bs value includes the picture type of the macroblock to be encoded, whether the encoding mode is the frame mode or the field mode, the size and direction of the motion vector, the number of reference images, the difference in reference images, and This is performed depending on whether a significant coefficient exists in the block. The Bs value 0 is a case where no block noise removal filter is used, and the Bs value 1 is a case where a small block noise removal characteristic is given. As the Bs value increases, the removal characteristic also increases, and the Bs value 4 is the case where the largest block noise removal characteristic is given. It should be noted that a filter On / Off for executing or not executing the block noise filter insertion processing can be selected.
JP 2001-204029 A ISO / IEC14496-10

しかしながら、非特特許文献1に示されている方法では、適正なBs値を検出し、検出されたBs値を用いてフィルタ処理を行いつつ符号化を行うと共に、復号化側でも符号化側と同一のBs値を検出し、そのBs値を基にフィルタ処理のなされた参照画面を生成するようにして復号化を行う。ここで符号化側のBs値と復号化側のBs値に異なりがあると、符号化側と復号化側のそれぞれの参照画像が同一とならなく復号化された画像に歪が含まれる。符号化側でブロックごとに求められるBs値を復号化側に伝送すれば、復号化側では同一のBs値を用いてフィルタ処理を行うことが出来るものの、ブロックごとのBs値情報を伝送することは符号化効率が劣化するためBs値は復号化側で入力される符号化信号を基に求めている。そのBs値は、符号化される信号の動きベクトルの大きさ、ベクトル方向の一致性、直行変換して得られる係数値にブロック歪が発生しやすい有意な係数が存在するかのそれぞれについて、マクロブロックのピクチャタイプ、符号化モードがフレームモードかフィールドモードか、及び参照画像の枚数などが参照されて求められる。復号化側でも、上記と同様な演算処理がなされて求められる。復号化を簡易に行う場合であっても上記の演算処理により符号化時に用いられたと同一のBs値をブロックのそれぞれごとに求めて復号化を行わなければ新たな復号歪が生じてしまう。そのためのBs値の演算を符号化される全てのブロックについて行う必要があるなど復号化装置における信号処理量が大きかった。   However, in the method disclosed in Non-Patent Document 1, an appropriate Bs value is detected, encoding is performed while performing filter processing using the detected Bs value, and the decoding side is the same as the encoding side. The Bs value is detected, and decoding is performed so as to generate a reference screen subjected to the filter processing based on the Bs value. Here, if there is a difference between the Bs value on the encoding side and the Bs value on the decoding side, the reference images on the encoding side and the decoding side are not the same, and the decoded image includes distortion. If the encoding side transmits the Bs value obtained for each block to the decoding side, the decoding side can perform filtering using the same Bs value, but transmits the Bs value information for each block. Since the coding efficiency deteriorates, the Bs value is obtained based on the coded signal input on the decoding side. The Bs value is a macro for each of the magnitude of the motion vector of the signal to be encoded, the consistency in the vector direction, and whether there is a significant coefficient that is likely to cause block distortion in the coefficient value obtained by orthogonal transformation. The picture type of the block, whether the encoding mode is the frame mode or the field mode, the number of reference images, and the like are obtained by referring to them. Also on the decoding side, the same calculation process as described above is performed and obtained. Even when decoding is performed simply, new decoding distortion will occur if the same Bs value as that used at the time of encoding is obtained for each block by the above arithmetic processing and decoding is not performed. Therefore, the amount of signal processing in the decoding apparatus is large, for example, it is necessary to perform the calculation of the Bs value for all the blocks to be encoded.

特許文献1に示される方法では、符号化時にBs値を求めてブロック歪の発生を少なくするフィルタ処理を行わなく、ブロック歪の低減処理は専ら復号化側でブロック歪を与えるブロックを検出し、検出されたブロックの信号をフィルタ処理することによりブロック歪を低減させている。従って、復号化された画像に含まれるブロック歪は低減されるものの復号化される画像の高域成分も同時に減衰されるため復号化画像の品質が劣化する。復号化を簡易に行う復号化装置の場合は装置の構成に応じた画質の復号化映像信号を得ることは出来るものの高機能な復号化装置の場合ではブロック歪の発生を低減させ、且つ高品質な復号化映像信号を得る復号化装置を実現することはできなかった。   In the method disclosed in Patent Document 1, a filter process that reduces the occurrence of block distortion by obtaining a Bs value at the time of encoding is not performed, and the block distortion reduction process detects a block that gives block distortion exclusively on the decoding side, Block distortion is reduced by filtering the signal of the detected block. Therefore, although the block distortion included in the decoded image is reduced, the high frequency component of the decoded image is also attenuated at the same time, so that the quality of the decoded image is deteriorated. In the case of a decoding device that performs decoding easily, a decoded video signal with an image quality corresponding to the configuration of the device can be obtained, but in the case of a high-performance decoding device, the occurrence of block distortion is reduced and the quality is high. It has not been possible to realize a decoding device that obtains a correct decoded video signal.

そこで、本発明は、上記のような問題点を解消するためになされたもので、符号化装置側においてループフィルタの挿入が必要な箇所を決定し、その決定によりループフィルタを挿入するようにしてブロック歪を低減させる符号化を最小の符号量の増加で行うと共に、復号化装置側ではループフィルタの挿入及び非挿入の決定に係る演算を行うための信号処理量を低下させ、高品質な復号化映像信号が得られるようにした動画像符号化装置及び動画像符号化プログラムを提供することを目的とする。   Therefore, the present invention has been made to solve the above-described problems. The encoding device side determines a place where a loop filter needs to be inserted, and the loop filter is inserted by the determination. Encoding to reduce block distortion is performed by increasing the minimum code amount, and the decoding device side reduces the signal processing amount for performing calculations related to the determination of insertion and non-insertion of the loop filter, and performs high-quality decoding. It is an object of the present invention to provide a moving picture coding apparatus and a moving picture coding program capable of obtaining an encoded video signal.

本願発明における第1の発明は、予め水平方向に複数のスライスによって分割された入力画像を符号化する際に、この符号化された入力画像の復号時に発生するブロックノイズをループフィルタを用いて低減する動画像符号化装置において、前記入力画像を周波数成分に対応する係数に変換するDCT変換部と、前記周波数に対応する係数を量子化して量子化値を出力する量子化部と、前記量子化された前記入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部と、前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部と、前記マクロブロック内の量子化値の分散値を求める分散値算出部と、前記分散値と予め定められた分散閾値とを比較する第2比較部と、前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、前記ループフィルタをオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部と、前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間を新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部と、を備えたことを特徴とする動画像符号化装置を提供する。
第2の発明は、予め水平方向に複数のスライスによって分割された入力画像を符号化する際に、この符号化された入力画像の復号時に発生するブロックノイズをループフィルタを用いて低減させることを機能させる動画像符号化プログラムにおいて、前記入力画像を周波数成分に対応する係数に変換するDCT変換部と、前記周波数に対応する係数を量子化して量子化値を出力する量子化部と、前記量子化された前記入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部と、前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部と、前記マクロブロック内の量子化値の分散値を求める分散値算出部と、前記分散値と予め定められた分散閾値とを比較する第2比較部と、前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、前記ループフィルタをオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部と、前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間を新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部と、を制御手段により実行させる機能を備えたことを特徴とする動画像符号化プログラムを提供する。
According to a first aspect of the present invention, when an input image that has been divided in advance by a plurality of slices in the horizontal direction is encoded, the block noise generated during decoding of the encoded input image is reduced using a loop filter. In the moving image encoding apparatus, a DCT conversion unit that converts the input image into a coefficient corresponding to a frequency component, a quantization unit that quantizes the coefficient corresponding to the frequency and outputs a quantized value, and the quantization An average value calculation unit that calculates an average quantization value of a macroblock in one slice image of the input image, and a first comparison unit that compares the average quantization value with a predetermined quantization threshold value; A variance value calculation unit that obtains a variance value of the quantized values in the macroblock, a second comparison unit that compares the variance value with a predetermined variance threshold value, and a comparison result in the first comparison unit. Output a signal for turning off the loop filter when the first comparison value is smaller than a predetermined quantization value and / or when the comparison result in the second comparison unit is smaller than a predetermined dispersion value, A signal for turning on the loop filter is output when the comparison result at the comparison unit is larger than a predetermined quantization value and when the comparison result at the second comparison unit is larger than a predetermined variance value. A filter level determination unit that performs the operation, and when a signal that turns on the loop filter is output from the filter level determination unit, from the first macroblock of the sliced input image to the macroblock immediately before the loop filter is turned on If there are consecutive macroblocks that turn off the loop filter, the section of the macroblocks that exist continuously is replaced with a new slice. Determined as the scan interval, to provide a video encoding apparatus is characterized in that and a slice section determining unit for adding a header to the beginning of the new slice interval.
According to a second aspect of the present invention, when an input image that has been divided in advance by a plurality of slices in the horizontal direction is encoded, block noise generated when the encoded input image is decoded is reduced using a loop filter. In the moving image encoding program to be operated, a DCT conversion unit that converts the input image into a coefficient corresponding to a frequency component, a quantization unit that quantizes the coefficient corresponding to the frequency and outputs a quantized value, and the quantum An average value calculation unit that calculates an average quantization value of a macroblock in one slice image of the converted input image, and a first comparison unit that compares the average quantization value and a predetermined quantization threshold A variance value calculation unit that obtains a variance value of quantized values in the macroblock, a second comparison unit that compares the variance value with a predetermined variance threshold, and the first comparison unit When the comparison result is smaller than a predetermined quantization value and / or when the comparison result in the second comparison unit is smaller than a predetermined dispersion value, a signal for turning off the loop filter is output, A signal for turning on the loop filter when a comparison result in the first comparison unit is larger than a predetermined quantization value and a comparison result in the second comparison unit is larger than a predetermined dispersion value. And a macro immediately before turning on the loop filter from the first macroblock of the sliced input image when a signal to turn on the loop filter is outputted from the filter level decision unit If there is a continuous macroblock that turns off the loop filter up to the block, the section of the macroblock that exists continuously is updated. Determined as a slice interval, to provide a moving picture encoding program characterized by having a function to be executed by the control means, and a slice section determining unit for adding a header to the beginning of the new slice interval.

本発明によれば、量子化された入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部と、前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部と、前記マクロブロック内の量子化値の分散値を求める分散値算出部と、前記分散値と予め定められた分散閾値とを比較する第2比較部と、前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、ループフィルタをオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部と、前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間を新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部とを備える格別な構成があるので、符号化装置側においてループフィルタの挿入が必要な箇所を決定し、その決定によりループフィルタを挿入するようにしてブロック歪を低減させる符号化を最小の符号量の増加で行うと共に、復号化装置側ではループフィルタの挿入及び非挿入の決定に係る演算を行うための信号処理量を低下させ、高品質な復号化映像信号が得られるようにした動画像符号化装置及び動画像符号化プログラムを実現できる。   According to the present invention, an average value calculation unit for obtaining an average quantization value of a macroblock in one slice image of quantized input images, the average quantization value and a predetermined quantization threshold value are obtained. A first comparison unit for comparing, a variance value calculating unit for obtaining a variance value of quantized values in the macroblock, a second comparison unit for comparing the variance value with a predetermined variance threshold, and the first When the comparison result in the comparison unit is smaller than a predetermined quantized value or when the comparison result in the second comparison unit is smaller than a predetermined variance value, a signal for turning off the loop filter is output. When the comparison result in the first comparison unit is larger than a predetermined quantization value, and when the comparison result in the second comparison unit is larger than a predetermined variance value, the loop filter is Output signal to turn on When a signal for turning on the loop filter is output from the filter level determining unit and the filter level determining unit, the loop from the first macroblock of the sliced input image to the macroblock immediately before the loop filter is turned on When there are consecutive macroblocks for which the filter is turned off, the continuous macroblock section is determined as a new slice section, and a slice section determination unit that adds a header to the head of the new slice section Therefore, the coding apparatus determines the location where the loop filter needs to be inserted, and inserts the loop filter according to the determination, thereby reducing the block distortion to the minimum code amount. In addition, the decoding device side decides whether to insert or not insert a loop filter. Reducing the amount of signal processing for performing the calculation according, we can achieve a moving picture coding apparatus and a moving picture coding program as high-quality decoded video signal is obtained.

以下に本発明の各実施例に係る動画像符号化装置及び動画像符号化プログラムについて図1〜図6を用いて説明する。
図1は、本発明の実施に係る動画像符号化装置の概略の構成例を示すブロック図である。
図2は、本発明の実施に係るループフィルタOn/Off決定部の構成例を示す図である。
図3は、本発明の実施に係るループフィルタOn/Off決定動作を説明するための図である。
図4は、本発明の実施に係る動画像符号化装置のヘッダ生成部の構成例を示す図である。
図5は、本発明の実施に係る動画像符号化装置の動作をフローチャートで示した図である。
図6は、本発明の実施に係る動画像符号化装置の要部の動作をフローチャートで示した図である。
Hereinafter, a moving picture coding apparatus and a moving picture coding program according to each embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a block diagram illustrating a schematic configuration example of a moving image encoding apparatus according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a configuration example of the loop filter On / Off determination unit according to the embodiment of the present invention.
FIG. 3 is a diagram for explaining a loop filter On / Off determination operation according to the embodiment of the present invention.
FIG. 4 is a diagram illustrating a configuration example of the header generation unit of the video encoding device according to the embodiment of the present invention.
FIG. 5 is a flowchart showing the operation of the moving picture coding apparatus according to the embodiment of the present invention.
FIG. 6 is a flowchart showing the operation of the main part of the video encoding apparatus according to the embodiment of the present invention.

その動画像符号化装置及び動画像符号化プログラムに係る動画像符号化装置は、符号化装置側においてBs(Boundary strength)値を求めつつブロック歪を低減させる符号化を最小の符号量の増加で行うと共に、復号化装置側ではループフィルタの挿入及び非挿入の決定に係る演算を行うための信号処理量を低下させ、高品質な復号化映像信号が得られるようにした動画像符号化装置及び動画像符号化プログラムを実現するという目的を、量子化された入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部と、前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部と、前記マクロブロック内の量子化値の分散値を求める分散値算出部と、前記分散値と予め定められた分散閾値とを比較する第2比較部と、前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、ループフィルタをオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部と、前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間を新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部とを備えるようにして実現した。   The moving picture coding apparatus and the moving picture coding apparatus according to the moving picture coding program perform coding that reduces block distortion while obtaining a Bs (Boundary strength) value on the coding apparatus side by increasing the minimum code amount. And a video encoding device capable of obtaining a high-quality decoded video signal by reducing the amount of signal processing for performing calculations related to determination of insertion and non-insertion of a loop filter on the decoding device side, and For the purpose of realizing a moving image encoding program, an average value calculation unit for obtaining an average quantization value of a macroblock in one slice image of quantized input images, and the average quantization value are predetermined. A first comparison unit that compares the quantized threshold value, a variance value calculation unit that obtains a variance value of the quantized value in the macroblock, and a first comparison unit that compares the variance value with a predetermined variance threshold value. When the comparison result between the comparison unit and the first comparison unit is smaller than a predetermined quantized value, or when the comparison result at the second comparison unit is smaller than a predetermined variance value, the loop When a signal for turning off the filter is output and the comparison result in the first comparison unit is larger than a predetermined quantization value, and the comparison result in the second comparison unit is larger than a predetermined variance value A filter level determining unit that outputs a signal that turns on the loop filter when the signal is large, and a first macroblock of the sliced input image when a signal that turns on the loop filter is output from the filter level determining unit If there are continuous macroblocks that turn off the loop filter from the macroblock immediately before turning on the loop filter to the macroblock immediately before turning on the loop filter, This is realized by including a slice block determination section that determines a block section of a black block as a new slice section and adds a header to the head of the new slice section.

動画像符号化装置の構成について述べる。
図1に示す動画像符号化装置はイントラ予測部11、動き補償部(MC;Motion Compensation)12、動き予測部(ME;Motion Estimation)13、減算部14、変換部15、量子化部16、エントロピ符号化部17、メモリ18、ヘッダ生成部19、逆量子化部21、逆変換部22、加算部23、復号画像メモリ24、ループフィルタOn/Off決定部25、ループフィルタ部26、及びDPB(Decoded Picture Buffer)27より構成される。減算部14及び加算部23には、端子a及び端子bを有し入力される信号を切り換えるスイッチSW1が接続される。DPB27には、端子a及び端子bを有し入力される信号を切り換えるスイッチSW2が接続される。イントラ予測部11、動き補償部12、動き予測部13及び減算部14には画像信号が入力される。ヘッダ生成部19からは符号化された信号が出力される。
図2に示すループフィルタOn/Off決定部25は、分散値算出器251、閾値設定器252、比較器253、平均値算出器254、閾値設定器255、比較器256、フィルタレベル決定器257より構成される。
図4に示すヘッダ生成部19は、スライスヘッダ読込み器191、ループフィルタoff情報係数器192、スライス区間決定器193、スライス情報更新器194、及びスライスヘッダ書換え器195より構成される。
The configuration of the moving picture coding apparatus will be described.
1 includes an intra prediction unit 11, a motion compensation unit (MC) 12, a motion estimation unit (ME) 13, a subtraction unit 14, a conversion unit 15, a quantization unit 16, Entropy encoding unit 17, memory 18, header generation unit 19, inverse quantization unit 21, inverse transformation unit 22, addition unit 23, decoded image memory 24, loop filter On / Off determination unit 25, loop filter unit 26, and DPB (Decoded Picture Buffer) 27. Connected to the subtractor 14 and the adder 23 is a switch SW1 that has a terminal a and a terminal b and switches an input signal. Connected to the DPB 27 is a switch SW2 having a terminal a and a terminal b for switching an input signal. An image signal is input to the intra prediction unit 11, the motion compensation unit 12, the motion prediction unit 13, and the subtraction unit 14. The header generation unit 19 outputs an encoded signal.
The loop filter On / Off determination unit 25 shown in FIG. 2 includes a variance value calculator 251, a threshold value setter 252, a comparator 253, an average value calculator 254, a threshold value setter 255, a comparator 256, and a filter level determiner 257. Composed.
4 includes a slice header reader 191, a loop filter off information coefficient unit 192, a slice interval determiner 193, a slice information updater 194, and a slice header rewriter 195.

動画像符号化装置の動作について述べる。最初にフレーム内画像(イントラ画像)の符号化について述べ、次にブロックノイズを低減して行うフレーム間画像(動き補償画像)の符号化について述べる。
まず、水平方向及び垂直方向の画素数がそれぞれ16であるマクロブロックの画像が水平方向に複数配列されるスライスの画像が減算部14の一方の端子に入力される。減算部14の他方の端子にはイントラ予測部11で予測されて生成されたイントラ画像がスイッチSW1を介して入力され、入力画像とイントラ予測画像の差成分が得られる。変換部15では得られた差成分の画像が水平方向及び垂直方向の画素数がそれぞれ4画素である複数のブロック画像に分割され、分割して得られたブロック画像はDCT(discrete cosine transform)変換され、係数データが得られる。係数データは量子化部16で量子化される。量子化されたデータはエントロピ符号化部17で可変長符号化され、メモリ18に一時記憶された後ヘッダ生成部19で後述のヘッダ情報が付されて生成される圧縮符号化信号が出力されると共に、量子化部16で量子化されたデータは逆量子化部21に入力されて逆量子化される。逆量子化して得られる係数データは逆変換部22で逆DCT変換される。逆DCT変換して得られた差成分は加算部23でイントラ予測部11から出力される画像と加算され復号化画像データが得られる。復号化画像データは復号画像メモリ24に一時記憶されると共に上記のイントラ予測部11でのフレーム内符号化に係るイントラ画像予測画像として使用される。
The operation of the moving picture coding apparatus will be described. First, encoding of an intra-frame image (intra image) will be described, and then encoding of an inter-frame image (motion compensated image) performed by reducing block noise will be described.
First, an image of a slice in which a plurality of macroblock images each having 16 pixels in the horizontal direction and the vertical direction are arranged in the horizontal direction is input to one terminal of the subtraction unit 14. An intra image predicted and generated by the intra prediction unit 11 is input to the other terminal of the subtracting unit 14 via the switch SW1, and a difference component between the input image and the intra predicted image is obtained. The conversion unit 15 divides the obtained difference component image into a plurality of block images each having four pixels in the horizontal direction and the vertical direction, and the block image obtained by the division is subjected to DCT (discrete cosine transform) conversion. Thus, coefficient data is obtained. The coefficient data is quantized by the quantization unit 16. The quantized data is variable-length encoded by the entropy encoding unit 17, temporarily stored in the memory 18, and then a compressed encoded signal generated by adding header information described later to the header generation unit 19 is output. At the same time, the data quantized by the quantization unit 16 is input to the inverse quantization unit 21 and inversely quantized. The coefficient data obtained by the inverse quantization is subjected to inverse DCT transform by the inverse transform unit 22. The difference component obtained by the inverse DCT transform is added to the image output from the intra prediction unit 11 by the adding unit 23 to obtain decoded image data. The decoded image data is temporarily stored in the decoded image memory 24 and used as an intra image predicted image related to intra-frame coding in the intra prediction unit 11.

復号画像メモリ24に一時記憶された画像はフレーム間予測画像として用いられる。フレーム間予測画像の復号時に生じるブロックノイズは、それぞれのブロックをDCT変換して得られる量子化値が大きく、且つ隣接するブロック間における量子化値のばらつきが大きいときである。量子化部16で得られる係数データはループフィルタOn/Off決定部25に入力され、復号化時におけるブロックノイズの発生が予測される。スイッチSW2の投入極性はループフィルタOn/Off決定部25により制御される。ブロックノイズが発生されないとして決定される場合にスイッチSW2はa側に投入され、ブロックノイズが発生されるとして決定された場合にはb側に投入される。ループフィルタOn/Off決定部25からは、発生が予測されるブロックノイズの大きさに応じて0〜4のBs(Boundary strength)値が出力される。Bs値が0として出力される場合はブロックノイズ減衰用ループフィルタを用いない場合でありスイッチSW2はa側に投入される。Bs値が1〜4として出力される場合は、ループフィルタ部26の特性はBs値に応じた特性に設定される。スイッチSW2はb側に投入される。DPB27にはBs値に応じた特性でフィルタ処理された復号画像に入力され、そこに一時記憶される。   The image temporarily stored in the decoded image memory 24 is used as an inter-frame prediction image. The block noise generated when decoding the inter-frame prediction image is when the quantized value obtained by DCT transforming each block is large and the quantized value varies greatly between adjacent blocks. The coefficient data obtained by the quantization unit 16 is input to the loop filter On / Off determination unit 25, and the occurrence of block noise during decoding is predicted. The input polarity of the switch SW2 is controlled by the loop filter On / Off determination unit 25. When it is determined that no block noise is generated, the switch SW2 is input to the a side, and when it is determined that block noise is generated, the switch SW2 is input to the b side. From the loop filter On / Off determination unit 25, Bs (Boundary strength) values of 0 to 4 are output according to the magnitude of block noise predicted to occur. When the Bs value is output as 0, the block noise attenuation loop filter is not used, and the switch SW2 is turned on to the a side. When the Bs value is output as 1 to 4, the characteristic of the loop filter unit 26 is set to a characteristic corresponding to the Bs value. The switch SW2 is turned on on the b side. The DPB 27 is input to the decoded image that has been filtered with the characteristic corresponding to the Bs value, and is temporarily stored there.

動き予測部13では、DPB27のフィルタ処理された復号画像と入力される画像信号とが比較されて動きベクトルが求められる。動き補償部12では、動き予測部13で求められた動きベクトルとDPB27に記憶される復号画像とが用いられて動き予測画像が生成される。フレーム内符号化画像の符号化時にはスイッチSW1はb側に投入されており、
減算部14では入力される画像信号から動き予測画像が減算された差の信号成分が生成される。差の信号成分はイントラ画像でなされたと同様にして変換部15以降でDCT変換される。ヘッダ生成部19からは符号化して生成された圧縮符号化信号が出力される。
The motion prediction unit 13 compares the decoded image subjected to the filter processing of the DPB 27 and the input image signal to obtain a motion vector. The motion compensation unit 12 generates a motion prediction image using the motion vector obtained by the motion prediction unit 13 and the decoded image stored in the DPB 27. At the time of encoding the intra-frame encoded image, the switch SW1 is turned on to the b side,
The subtracting unit 14 generates a difference signal component obtained by subtracting the motion prediction image from the input image signal. The difference signal component is DCT-converted by the converter 15 and thereafter in the same manner as that for the intra image. The header generation unit 19 outputs a compressed encoded signal generated by encoding.

出力された圧縮符号化信号は図示しない動画像復号化装置により復号化される。動画像復号化装置は、いわゆるH.264で符号化された信号を復号化する装置と同様に構成される。即ち動画像復号化装置はヘッダ生成部19で生成されたヘッダ信号を読み出し、読み出されたヘッダ信号を基にエントロピ復号化を行い量子化値が得られる。得られた量子化値は逆量子化部21、逆変換部22、加算部23、及び復号画像メモリ24による処理と同一の処理がなされて復号化画像データが得られる。また、量子化値は逆量子化部21と同一の処理がなされて係数データが得られ、ループフィルタOn/Off決定部25と同様の処理により0〜4のBs値が求められる。求められたBs値に応じてループフィルタ処理された復号画像が得られる。   The output compressed encoded signal is decoded by a moving picture decoding apparatus (not shown). The moving picture decoding apparatus is a so-called H.264 standard. The apparatus is configured in the same manner as an apparatus for decoding a signal encoded by H.264. That is, the moving picture decoding apparatus reads the header signal generated by the header generation unit 19, performs entropy decoding based on the read header signal, and obtains a quantized value. The obtained quantized value is subjected to the same processing as that performed by the inverse quantizing unit 21, the inverse transforming unit 22, the adding unit 23, and the decoded image memory 24 to obtain decoded image data. The quantized value is subjected to the same processing as that of the inverse quantization unit 21 to obtain coefficient data, and Bs values of 0 to 4 are obtained by the same processing as the loop filter On / Off determination unit 25. A decoded image that has been subjected to the loop filter process according to the obtained Bs value is obtained.

ここで、Bs値を求める演算処理は全てのブロックについて行う必要があり、その処理は煩雑である。そこで、スライスを構成するすべてのマクロブロックのループフィルタ処理がOffとされて符号化された場合は、スライスヘッダに、そのスライスに係る全てのブロックはBs=0とされる情報を記述することにより復号化装置側でBs値を求めるための演算処理が不要となる。全てのブロックに係るBs値情報をスライスヘッダに記述した圧縮符号化信号を生成する方法はあるものの、全てのブロック毎のBs値情報を伝送するのは符号化効率を劣化させるため好ましくない。そこで、全てのブロックのBs値が0であるスライスのヘッダにはBs値が0であることを記述する。また、Bs値が0でないマクロブロックが生じ、且つそれ以前のマクロブロックのBs値が連続して0である場合には新たなスライスを定め、全てのブロックのBs値0であると記述するヘッダ情報と共に符号化信号を生成する。復号化装置側では、Bs値を求めるための演算処理ステップが減少する。新たなスライスの生成は、ブロックのBs値が0であるマクロブロックが所定数以上連続して生じたときにのみ実行し、新たなスライスヘッダの挿入に伴う符号化効率の低下を小さくする。   Here, the calculation process for obtaining the Bs value needs to be performed for all blocks, and the process is complicated. Therefore, when encoding is performed with the loop filter processing of all macroblocks constituting a slice being set to Off, information in which all the blocks related to the slice are set to Bs = 0 is described in the slice header. A calculation process for obtaining the Bs value on the decoding device side is not necessary. Although there is a method for generating a compressed encoded signal in which Bs value information related to all blocks is described in a slice header, it is not preferable to transmit Bs value information for every block because encoding efficiency deteriorates. Therefore, it is described that the Bs value is 0 in the header of the slice in which the Bs value of all the blocks is 0. In addition, when a macroblock having a Bs value other than 0 is generated and the Bs values of previous macroblocks are continuously 0, a new slice is defined, and the header describes that all blocks have a Bs value of 0. An encoded signal is generated together with the information. On the decoding device side, the number of calculation processing steps for obtaining the Bs value is reduced. The generation of a new slice is executed only when a predetermined number or more of macroblocks having a Bs value of 0 are continuously generated, and the reduction in coding efficiency due to the insertion of a new slice header is reduced.

次に、図2を参照し、ループフィルタOn/Off決定部25について詳細に説明する。
まず、変換部15でDCT変換され、量子化部16で量子化されたブロックごとの係数値は平均値算出器254に入力されて平均値が算出されると共に、分散値算出器251に入力され分散値が求められる。ここで大きな値の分散値が得られる場合は、それぞれのブロックごとの画像信号レベルが均一ではなく、それぞれのブロックの境界においてブロックノイズが生じやすい場合である。閾値設定器252にはブロックノイズの発生が予測されるためループフィルタ処理が必要であるとされる閾値Tが格納されている。比較器253は分散値算出器251から入力される分散値と閾値設定器252から入力される閾値Tとを比較し、分散値のほうが大きいときにはループフィルタ処理の実行に係る比較結果を出力する。平均値算出器254で求められたそれぞれのブロックに係る係数値は閾値設定器255により設定される閾値と比較器256で比較される。比較器256からは係数の平均値の方が閾値より大きいときにはループフィルタ処理を実行させるための信号が出力される。フィルタレベル決定器257では比較器253及び比較器256から入力されるそれぞれの比較出力を基にループフィルタ26及びスイッチSW2を駆動するための制御信号が生成され、出力される。
Next, the loop filter On / Off determination unit 25 will be described in detail with reference to FIG.
First, the coefficient value for each block DCT-transformed by the transform unit 15 and quantized by the quantization unit 16 is input to the average value calculator 254 to calculate the average value, and is also input to the variance value calculator 251. A variance value is determined. Here, when a large variance value is obtained, the image signal level for each block is not uniform, and block noise is likely to occur at the boundary of each block. The threshold value setter 252 stores a threshold value T that is considered to require loop filter processing because occurrence of block noise is predicted. The comparator 253 compares the variance value input from the variance value calculator 251 with the threshold value T input from the threshold value setter 252, and outputs a comparison result relating to execution of the loop filter process when the variance value is larger. The coefficient value relating to each block obtained by the average value calculator 254 is compared with the threshold value set by the threshold value setter 255 by the comparator 256. The comparator 256 outputs a signal for executing loop filter processing when the average value of the coefficients is larger than the threshold value. The filter level determiner 257 generates and outputs a control signal for driving the loop filter 26 and the switch SW2 based on the respective comparison outputs input from the comparator 253 and the comparator 256.

ここで、閾値設定器255で設定される閾値は分散値算出器251から出力される分散値の大きさにより可変される。
図3は、分散値算出器251から出力される分散値の大きさと閾値設定器255により設定される閾値との関係を示している。閾値設定器255により設定される閾値は分散値算出器251から出力される分散値の値が増加するに従って、小さな閾値に設定される。同図において網点で示される部分でループフィルタがOnとされる。なお、ループフィルタがOnとされる領域にはループフィルタの特性に係る図示しないBs値ごとの特性が規定されており、左上方向で大きなBs値が設定される。
Here, the threshold value set by the threshold value setter 255 is varied according to the size of the variance value output from the variance value calculator 251.
FIG. 3 shows the relationship between the magnitude of the variance value output from the variance value calculator 251 and the threshold value set by the threshold value setter 255. The threshold set by the threshold setter 255 is set to a smaller threshold as the variance value output from the variance value calculator 251 increases. In the figure, the loop filter is turned on at the portion indicated by the halftone dots. Note that in the region where the loop filter is turned on, characteristics for each Bs value (not shown) relating to the characteristics of the loop filter are defined, and a large Bs value is set in the upper left direction.

図4を用いて、新たなスライスを生成する際のスライスヘッダの生成について説明する。
まず、ループフィルタOn/Off決定部25から出力されるループフィルタのOn/Offに係る情報はループフィルタoff情報係数器192に入力される。そこではブロックごとに出力されるOn/Off情報を基にマクロブロック毎のOn/Offが調べられ、スライスの最初のマクロブロックからループフィルタが連続してOffとされるマクロブロックの数が計数される。ここで、ループフィルタがOnとされるマクロブロックが検出され、且つその手前の所定数以上のマクロブロックのループフィルタが連続してOffであるとして計数されるときには、スライス区間決定器193で連続してOffとされる複数のマクロブロックが新たなスライス区間として定められる。スライスヘッダ読込み器191では、エントロピ符号化部17から出力されるスライスヘッダ情報が読込まれる。スライス情報更新器194ではスライスヘッダ読込み器191から供給されるスライスヘッダ情報と、スライス区間決定器193から供給される新たなスライス区間情報とを基に新たなスライス区間に係るスライスヘッダ情報が生成される。新たなスライスヘッダには、その区間の全てのマクロブロックのループフィルタはOffとされる情報が記述される。スライスヘッダ書換え器195では、エントロピ符号化部17で可変長符号化され、スライスヘッダが付されてメモリ18に一時記憶されている圧縮符号化信号のスライスヘッダが書換えられて出力される。
Generation of a slice header when generating a new slice will be described with reference to FIG.
First, information related to On / Off of the loop filter output from the loop filter On / Off determination unit 25 is input to the loop filter off information coefficient unit 192. There, On / Off for each macroblock is checked based on On / Off information output for each block, and the number of macroblocks in which the loop filter is continuously turned off from the first macroblock of the slice is counted. The Here, when a macroblock in which the loop filter is turned on is detected and the loop filters of a predetermined number of macroblocks or more before that are counted as being continuously off, the slice interval determiner 193 continues. A plurality of macroblocks that are turned off are determined as new slice sections. The slice header reader 191 reads the slice header information output from the entropy encoding unit 17. The slice information updater 194 generates slice header information related to a new slice section based on the slice header information supplied from the slice header reader 191 and the new slice section information supplied from the slice section determiner 193. The In the new slice header, information in which the loop filters of all the macroblocks in the section are turned off is described. The slice header rewrite unit 195 rewrites and outputs the slice header of the compressed encoded signal that has been subjected to variable length coding by the entropy coding unit 17, attached with a slice header, and temporarily stored in the memory 18.

図5を参照して動画像符号化装置の信号の流れを説明する。
まず、S(ステップ)71で画像信号が入力される。S72では、入力画像がイントラ(フレーム内符号化)画像であるかが検出される。フレーム内画像の場合にはS73でイントラ予測がなされる。フレーム内画像でない場合にはS74で動きベクトルが算出され、S75で動き予測がなされる。イントラ予測された画像及び動き予測された水平及び垂直のそれぞれが4画素である画像はS76でDCT変換がなされる。DCT変換して得られた係数値はS77で量子化される。S77で得られた係数の一方はエントロピ符号化部17で可変長符号化がなされて圧縮符号化信号が生成され、係数の他方はS78で逆量子化及び逆DCTがなされる。S79で復号画像が作成される。S81では量子化値の分散値と量子化値の平均値とを基にループフィルタの係数に係るBs値が求められる。
With reference to FIG. 5, the signal flow of the moving picture coding apparatus will be described.
First, an image signal is input in S (step) 71. In S72, it is detected whether or not the input image is an intra (encoded in frame) image. In the case of an intra-frame image, intra prediction is performed in S73. If it is not an intra-frame image, a motion vector is calculated in S74, and motion prediction is performed in S75. The intra-predicted image and the motion-predicted image each having four pixels in the horizontal and vertical directions are subjected to DCT conversion in S76. The coefficient value obtained by DCT conversion is quantized in S77. One of the coefficients obtained in S77 is subjected to variable length coding by the entropy coding unit 17 to generate a compressed coded signal, and the other coefficient is subjected to inverse quantization and inverse DCT in S78. In S79, a decoded image is created. In S81, the Bs value related to the coefficient of the loop filter is obtained based on the variance value of the quantized values and the average value of the quantized values.

S82でループフィルタがOffであるとして検出されるときにはS83でフィルタがOffとされるブロック数、ないしはマクロブロックの数が計数され、S89に進む。S82でループフィルタがOnであるとして検出されるときにはS84でループフィルタ処理を行った後、S85でフィルタOffとされるマクロブロックの数が所定数、例えばスライスを構成するマクロブロックの数の半分以上であるかが検出される。マクロブロックの数が所定数以上であるときにはS86で新たなスライス構造の符号化信号とされるためのヘッダの更新情報が生成され、S87でスライスヘッダの書換えが行われる。S87の後、及びS85でのOff計数値が所定数以下の場合に、S83で計数されているフィルタOffの計数値はクリアされる。S89では画像は参照画像であるか又は動き補償画像であるかが検出され、参照画像である場合はS91で復号画像は参照画像として保持される。S92でエントロピー符号化がなされる。S93で入力画像は更にあるかが検出され、更にある場合にはS71からの動作が繰り返される。   When it is detected in S82 that the loop filter is OFF, the number of blocks or macroblocks in which the filter is OFF is counted in S83, and the process proceeds to S89. When it is detected in S82 that the loop filter is On, after the loop filter processing is performed in S84, the number of macroblocks that are turned off in S85 is a predetermined number, for example, more than half the number of macroblocks constituting the slice. Is detected. When the number of macroblocks is equal to or larger than the predetermined number, header update information for generating a coded signal having a new slice structure is generated in S86, and the slice header is rewritten in S87. After S87 and when the Off count value in S85 is less than or equal to the predetermined number, the count value of the filter Off counted in S83 is cleared. In S89, it is detected whether the image is a reference image or a motion compensated image. If the image is a reference image, the decoded image is held as a reference image in S91. Entropy coding is performed in S92. In S93, it is detected whether there are more input images. If there are more input images, the operation from S71 is repeated.

図6を参照し、ループフィルタ計数決定処理について更に述べる。
S79で復号画像を作成した後に、S811でマクロブロック全体の量子化値の分散が求められる。S812で、量子化分散値が閾値Tより小さいかが検出される。小さい場合はS813でループフィルタフラグがOffとされる。小さくない場合にはS814でマクロブロック内の平均量子化値が算出される。S815で平均量子化値は、例えば計数値の15に相当する量子化値に対して図4に示した量子化分散値の補正を行って得られる重み付け平均値よりも小さいかが検出される。小さいときにはS816でループフィルタフラグがOffとされる。小さくないときにはS817でループフィルタフラグがOnとされる。S813、S816、及びS817のステップ終了後S82の動作がなされる。
The loop filter count determination process will be further described with reference to FIG.
After the decoded image is created in S79, the variance of the quantized values of the entire macroblock is obtained in S811. In S812, it is detected whether the quantized variance value is smaller than the threshold value T. If it is smaller, the loop filter flag is turned off in S813. If not, the average quantization value in the macroblock is calculated in S814. In S815, it is detected whether the average quantized value is smaller than the weighted average value obtained by correcting the quantized variance value shown in FIG. If it is smaller, the loop filter flag is turned off in S816. If it is not smaller, the loop filter flag is turned on in S817. After the steps S813, S816, and S817 are completed, the operation of S82 is performed.

以上のように、本実施例の動画像符号化装置によれば、量子化された入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部254と、前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部256と、前記マクロブロック内の量子化値の分散値を求める分散値算出部251と、前記分散値と予め定められた分散閾値とを比較する第2比較部253と、前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、ループフィルタ26をオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部257と、前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間により新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部193とを備える格別な構成があるので、符号化装置側においてループフィルタの挿入が必要な箇所を決定し、その決定によりループフィルタを挿入するようにしてブロック歪を低減させる符号化を最小の符号量の増加で行うと共に、復号化装置側ではループフィルタの挿入及び非挿入の決定に係る演算を行うための信号処理量を低下させ、高品質な復号化映像信号が得られるようにした動画像符号化装置及び動画像符号化プログラムを実現できる。   As described above, according to the moving picture coding apparatus of the present embodiment, the average value calculation unit 254 that obtains the average quantization value of the macroblock in one slice image of the quantized input image, and the average A first comparison unit 256 that compares a quantization value with a predetermined quantization threshold; a dispersion value calculation unit 251 that obtains a dispersion value of the quantization value in the macroblock; and the dispersion value and a predetermined value When the comparison result in the second comparison unit 253 for comparing the dispersion threshold and the first comparison unit is smaller than a predetermined quantization value and / or the comparison result in the second comparison unit is predetermined When the variance value is smaller, a signal for turning off the loop filter 26 is output, and when the comparison result in the first comparison unit is larger than a predetermined quantized value, and the comparison in the second comparison unit The result is a predetermined variance value A filter level determining unit 257 that outputs a signal for turning on the loop filter when the signal is larger than the first level of the sliced input image when a signal for turning on the loop filter is output from the filter level determining unit. If there are consecutive macroblocks that turn off the loop filter from the macroblock to the macroblock immediately before the loop filter is turned on, the macroblock is determined as a new slice section by the section of the macroblock that exists continuously. And a slice section determination unit 193 that adds a header to the head of the new slice section. Therefore, the encoding apparatus side determines a place where a loop filter needs to be inserted, and the loop filter is determined by the determination. Minimize coding to reduce block distortion by inserting A video in which a high-quality decoded video signal can be obtained by reducing the amount of signal processing for performing computations related to the determination of insertion and non-insertion of a loop filter on the decoding device side while increasing the signal amount An image encoding device and a moving image encoding program can be realized.

その動画像符号化装置では、スライス内の全てのブロックのループフィルタがOffとされて符号化される圧縮符号化信号と、ループフィルタがOnとされて符号化されるブロックを含むスライスの圧縮符号化信号に分けて伝送することにより、復号化装置側では全てのブロックのループフィルタがOffとされるスライスの符号化信号についてはBs値を求める演算が不要であり、復号化のためのデータ処理量を小さくできる。
その応用として、全てのブロックのループフィルタがOffとされるマクロブロックのヘッダに、それを示す1ビットのフラグをマクロブロックごとに付すようにしても同様の効果を得ることができる。
In the moving image encoding apparatus, a compression encoded signal including a block encoded with a loop filter turned on and a compression coded signal coded with all the blocks in the slice turned off. By transmitting the signals separately, the decoding apparatus side does not need to calculate the Bs value for the encoded signals of the slices in which the loop filters of all blocks are turned off, and data processing for decoding The amount can be reduced.
As an application thereof, the same effect can be obtained by attaching a 1-bit flag indicating the macroblock header to the macroblock header in which the loop filters of all the blocks are turned off.

画像信号をブロックノイズが生じないようにループフィルタを用いながら圧縮符号化して圧縮符号化信号を生成する動画像符号化装置に適用できる。   The present invention can be applied to a moving image encoding apparatus that generates a compressed encoded signal by compressing and encoding an image signal using a loop filter so that block noise does not occur.

本発明の実施に係る動画像符号化装置の概略の構成例を示すブロック図である。It is a block diagram which shows the example of a schematic structure of the moving image encoder which concerns on implementation of this invention. 本発明の実施に係るループフィルタOn/Off決定部の構成例を示す図である。It is a figure which shows the structural example of the loop filter On / Off determination part which concerns on implementation of this invention. 本発明の実施に係るループフィルタOn/Off決定動作を説明するための図である。It is a figure for demonstrating the loop filter On / Off determination operation | movement which concerns on implementation of this invention. 本発明の実施に係る動画像符号化装置のヘッダ生成部の構成例を示す図である。It is a figure which shows the structural example of the header production | generation part of the moving image encoder which concerns on implementation of this invention. 本発明の実施に係る動画像符号化装置の動作をフローチャートで示した図である。It is the figure which showed the operation | movement of the moving image encoder which concerns on implementation of this invention with the flowchart. 本発明の実施に係る動画像符号化装置の要部の動作をフローチャートで示した図である。It is the figure which showed the operation | movement of the principal part of the moving image encoder which concerns on implementation of this invention with the flowchart.

符号の説明Explanation of symbols

11 イントラ予測部
12 動き補償部
13 動き予測部
14 減算部
15 変換部
16 量子化部
17 エントロピ符号化部
18 メモリ
19 ヘッダ生成部
21 逆量子化部
22 逆変換部
23 加算部
24 復号画像メモリ
25 ループフィルタOn/Off決定部
26 ループフィルタ部
27 DPB
191 スライスヘッダ読込み器
192 ループフィルタoff情報係数器
193 スライス区間決定器
194 スライス情報更新器
195 スライスヘッダ書換え器
251 分散値算出器
252 閾値設定器
253 比較器
254 平均値算出器
255 閾値設定器
256 比較器
257 フィルタレベル決定器
11 Intra Prediction Unit 12 Motion Compensation Unit 13 Motion Prediction Unit 14 Subtraction Unit 15 Conversion Unit 16 Quantization Unit 17 Entropy Coding Unit 18 Memory 19 Header Generation Unit 21 Inverse Quantization Unit 22 Inverse Conversion Unit 23 Addition Unit 24 Decoded Image Memory 25 Loop filter On / Off determination unit 26 Loop filter unit 27 DPB
191 Slice header reader 192 Loop filter off information coefficient unit 193 Slice interval determiner 194 Slice information updater 195 Slice header rewriter 251 Variance calculator 252 Threshold setter 253 Comparator 254 Average value calculator 255 Threshold setter 256 Compare 257 Filter level determiner

Claims (2)

予め水平方向に複数のスライスによって分割された入力画像を符号化する際に、この符号化された入力画像の復号時に発生するブロックノイズをループフィルタを用いて低減する動画像符号化装置において、
前記入力画像を周波数成分に対応する係数に変換するDCT変換部と、
前記周波数に対応する係数を量子化して量子化値を出力する量子化部と、
前記量子化された前記入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部と、
前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部と、
前記マクロブロック内の量子化値の分散値を求める分散値算出部と、
前記分散値と予め定められた分散閾値とを比較する第2比較部と、
前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、前記ループフィルタをオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部と、
前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間を新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部と、
を備えたことを特徴とする動画像符号化装置。
In a video encoding device that reduces block noise generated when decoding an encoded input image using a loop filter when encoding an input image that has been divided in advance by a plurality of slices in the horizontal direction,
A DCT converter for converting the input image into a coefficient corresponding to a frequency component;
A quantization unit that quantizes a coefficient corresponding to the frequency and outputs a quantized value;
An average value calculating unit for obtaining an average quantized value of a macroblock in one slice image of the quantized input image;
A first comparison unit that compares the average quantization value with a predetermined quantization threshold;
A variance value calculation unit for obtaining a variance value of quantized values in the macroblock;
A second comparison unit that compares the dispersion value with a predetermined dispersion threshold;
The loop filter is turned off when a comparison result in the first comparison unit is smaller than a predetermined quantization value and / or when a comparison result in the second comparison unit is smaller than a predetermined variance value. When the comparison result in the first comparison unit is larger than a predetermined quantized value and the comparison result in the second comparison unit is larger than a predetermined variance value A filter level determining unit for outputting a signal for turning on the loop filter;
A macro for turning off the loop filter from the first macroblock of the sliced input image to a macroblock immediately before turning on the loop filter when a signal for turning on the loop filter is output from the filter level determination unit; When the blocks exist continuously, the section of the macroblock that exists continuously is determined as a new slice section, and a slice section determination unit that adds a header to the head of the new slice section;
A moving picture encoding apparatus comprising:
予め水平方向に複数のスライスによって分割された入力画像を符号化する際に、この符号化された入力画像の復号時に発生するブロックノイズをループフィルタを用いて低減させることを機能させる動画像符号化プログラムにおいて、
前記入力画像を周波数成分に対応する係数に変換するDCT変換部と、
前記周波数に対応する係数を量子化して量子化値を出力する量子化部と、
前記量子化された前記入力画像のうちの1スライス画像中のマクロブロックの平均量子化値を求める平均値算出部と、
前記平均量子化値と予め定められた量子化閾値とを比較する第1比較部と、
前記マクロブロック内の量子化値の分散値を求める分散値算出部と、
前記分散値と予め定められた分散閾値とを比較する第2比較部と、
前記第1比較部での比較結果が予め定められた量子化値よりも小さい場合及び又は前記第2比較部での比較結果が予め定められた分散値よりも小さい場合に、前記ループフィルタをオフする信号を出力し、前記第1比較部での比較結果が予め定められた量子化値よりも大きい場合、かつ前記第2比較部での比較結果が予め定められた分散値よりも大きい場合に前記ループフィルタをオンする信号を出力するフィルタレベル決定部と、
前記フィルタレベル決定部から前記ループフィルタをオンする信号が出力された場合に、前記スライスされた入力画像の最初のマクロブロックから前記ループフィルタをオンする直前のマクロブロック迄前記ループフィルタをオフするマクロブロックが連続して存在する場合は、その連続して存在するマクロブロックの区間を新たなスライス区間として決定し、前記新たなスライス区間の先頭にヘッダを付加するスライス区間決定部と、
を制御手段により実行させる機能を備えたことを特徴とする動画像符号化プログラム。

Moving picture coding that functions to reduce block noise generated during decoding of the coded input picture by using a loop filter when coding an input picture previously divided by a plurality of slices in the horizontal direction. In the program
A DCT converter for converting the input image into a coefficient corresponding to a frequency component;
A quantization unit that quantizes a coefficient corresponding to the frequency and outputs a quantized value;
An average value calculating unit for obtaining an average quantized value of a macroblock in one slice image of the quantized input image;
A first comparison unit that compares the average quantization value with a predetermined quantization threshold;
A variance value calculation unit for obtaining a variance value of quantized values in the macroblock;
A second comparison unit that compares the dispersion value with a predetermined dispersion threshold;
The loop filter is turned off when a comparison result in the first comparison unit is smaller than a predetermined quantization value and / or when a comparison result in the second comparison unit is smaller than a predetermined variance value. When the comparison result in the first comparison unit is larger than a predetermined quantized value and the comparison result in the second comparison unit is larger than a predetermined variance value A filter level determining unit for outputting a signal for turning on the loop filter;
A macro for turning off the loop filter from the first macroblock of the sliced input image to a macroblock immediately before turning on the loop filter when a signal for turning on the loop filter is output from the filter level determination unit; When the blocks exist continuously, the section of the macroblock that exists continuously is determined as a new slice section, and a slice section determination unit that adds a header to the head of the new slice section;
A moving picture encoding program characterized by comprising a function for causing the control means to execute.

JP2004287355A 2004-09-30 2004-09-30 Moving image encoding device and moving image encoding program Pending JP2006101397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004287355A JP2006101397A (en) 2004-09-30 2004-09-30 Moving image encoding device and moving image encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004287355A JP2006101397A (en) 2004-09-30 2004-09-30 Moving image encoding device and moving image encoding program

Publications (1)

Publication Number Publication Date
JP2006101397A true JP2006101397A (en) 2006-04-13

Family

ID=36240756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004287355A Pending JP2006101397A (en) 2004-09-30 2004-09-30 Moving image encoding device and moving image encoding program

Country Status (1)

Country Link
JP (1) JP2006101397A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081706A1 (en) * 2010-12-17 2012-06-21 シャープ株式会社 Image filter device, filter device, decoder, encoder, and data structure
JP2013058935A (en) * 2011-09-08 2013-03-28 Nippon Hoso Kyokai <Nhk> Image processing device, filter processing method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081706A1 (en) * 2010-12-17 2012-06-21 シャープ株式会社 Image filter device, filter device, decoder, encoder, and data structure
JP2013058935A (en) * 2011-09-08 2013-03-28 Nippon Hoso Kyokai <Nhk> Image processing device, filter processing method, and program

Similar Documents

Publication Publication Date Title
US10397575B2 (en) Image coding apparatus, image coding method, and program, and image decoding apparatus, image decoding method, and program
JP5418756B2 (en) Image re-encoding device, image re-encoding method, and image re-encoding program
KR101903101B1 (en) Deriving reference mode values and encoding and decoding information representing prediction modes
US9462271B2 (en) Moving image encoding device, moving image decoding device, moving image coding method, and moving image decoding method
KR101246294B1 (en) Method of and apparatus for video intraprediction encoding/decoding
CA2935332C (en) Video decoder, video encoder, video decoding method, and video encoding method
JP5174958B2 (en) Method and system for simultaneous optimization of video coder and decoder
KR20120079180A (en) Dynamic image decoding method and device
US10958912B2 (en) Bit prediction based bit rate control method and apparatus for video coding process supporting offline CABAC
US20190335173A1 (en) Image encoding method/device, image decoding method/device and recording medium having bitstream stored therein
JP2008219205A (en) Picture information encoder and picture information encoding method
KR20110091748A (en) Dynamic image encoding device and dynamic image decoding device
US20230122782A1 (en) Image encoding apparatus, image encoding method, image decoding apparatus, image decoding method, and non-transitory computer-readable storage medium
JP2015211386A (en) Dynamic image encoding device, dynamic image encoding method, and computer program for dynamic image encoding
JP2006270851A (en) Image coding device and image decoding device
JP5598199B2 (en) Video encoding device
JP2006101397A (en) Moving image encoding device and moving image encoding program
KR20140043014A (en) Method and apparatus for image encoding
KR20110067648A (en) Method for encoding/decoding image and apparatus for performing the same
JP2008153802A (en) Moving picture encoding device and moving picture encoding program
JP2011082801A (en) Image processing apparatus, and image processing method
KR20220024120A (en) Encoding device, decoding device, and program
JP2007306528A (en) Motion picture decoding device and motion picture decoding method
JP2009088736A (en) Image encoder, image decoder, and image encoding method