JP2015171117A - Image encoder - Google Patents

Image encoder Download PDF

Info

Publication number
JP2015171117A
JP2015171117A JP2014047046A JP2014047046A JP2015171117A JP 2015171117 A JP2015171117 A JP 2015171117A JP 2014047046 A JP2014047046 A JP 2014047046A JP 2014047046 A JP2014047046 A JP 2014047046A JP 2015171117 A JP2015171117 A JP 2015171117A
Authority
JP
Japan
Prior art keywords
image
quantization
boundary
encoding
motion vector
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
JP2014047046A
Other languages
Japanese (ja)
Inventor
小林 幸史
Yukifumi Kobayashi
幸史 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014047046A priority Critical patent/JP2015171117A/en
Publication of JP2015171117A publication Critical patent/JP2015171117A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform encoding in parallel by preventing deblocking filtering in a division boundary of images divided into a plurality of regions and allocating encoders to the individual divided regions.SOLUTION: An image encoder divides an image into a plurality of regions and encodes the respective regions in parallel by a plurality of encoders. The image encoder includes: a filter section for performing filter processing on a boundary between blocks; a quantization section for performing quantization by using a quantization parameter which is variable for each block; and a motion vector detection section for detecting a motion vector between an encoded image and a reference image. The filter section sets a value with which the filter processing is not performed on a block boundary in a division boundary of the plurality of regions.

Description

本発明は、動画像の符号化を複数の符号化器を用いて並列に実行する画像符号化装置に関するものである。   The present invention relates to an image encoding apparatus that performs moving image encoding in parallel using a plurality of encoders.

近年、動画像の高解像度化が進んでいる。例えば、デジタルビデオカメラやデジタルテレビなどでは1920画素×1080ラインの画素数を有するフルHD(High-Definition)映像を扱う製品が既に主流となっている。また高フレームレート化も進んでおり、デジタルビデオカメラではプログレッシブ映像で60フレーム/秒の製品も市場に出ている。この高解像度化、高フレームレート化は今後も進んでいく見通しで、将来的にはいわゆる4K画像と呼ばれる3840画素×2160ラインの画像や、スーパーハイビジョンと呼ばれる7680画素×4320ラインで60フレーム/秒の画像を扱うことが予想される。このような画像データを圧縮符号化する場合には、画素数の増加に応じて処理量が増大するため、画像処理の高速化が求められる。   In recent years, the resolution of moving images has been increased. For example, products that handle full HD (High-Definition) video having a pixel number of 1920 pixels × 1080 lines are already mainstream in digital video cameras, digital televisions, and the like. Higher frame rates are also progressing, and digital video cameras with a progressive video rate of 60 frames / second are also on the market. This higher resolution and higher frame rate are expected to continue in the future, and in the future, 60 frames / second at 3840 pixels x 2160 lines called so-called 4K images and 7680 pixels x 4320 lines called super high vision. It is expected to handle images. When such image data is compression-encoded, the amount of processing increases with an increase in the number of pixels, and thus high-speed image processing is required.

画像処理の高速化手法の一つとして、画像を複数の領域に分割して複数の符号化器(符号化エンジンと称す)を用いて並列に符号化動作を行う手法が考えられる。例えば、図2のように画像を上下の2つに分割し、上部分の画像を符号化エンジン1、下部分の画像を符号化エンジン2で並列に符号化を行うことにより、1つの符号化エンジンで符号化を行う場合に比べて約2倍の高速化を図ることができる。   As one method for speeding up image processing, a method of dividing an image into a plurality of regions and performing a coding operation in parallel using a plurality of encoders (referred to as coding engines) can be considered. For example, as shown in FIG. 2, the image is divided into two parts, upper and lower, and the upper part of the image is encoded in parallel by the encoding engine 1 and the lower part of the image is encoded in parallel by the encoding engine 2. The speed can be increased about twice as compared with the case where encoding is performed by the engine.

MPEG-2などの符号化方式の場合、符号化の結果作成されるローカルデコード画像が隣接する部分の符号化動作に影響を及ぼさないため、並列符号化方式による高速化が容易である。ところが、デジタルビデオカメラのAVCHD方式やブルーレイディスクの記録に用いられるH.264符号化方式では、デブロッキングフィルタと呼ばれるループ内フィルタが存在し、ローカルデコード画像の符号化結果が隣接する画像に影響を及ぼすことになる。H.264符号化方式でのデブロッキングフィルタは、フィルタをかける順番が規定されており、マクロブロック単位で画像の左上からラスタ順で処理を行う必要がある。そのため、上と左のマクロブロックの処理が完了している必要があり、並列に符号化を行うことが困難である。   In the case of an encoding method such as MPEG-2, since the local decoded image created as a result of encoding does not affect the encoding operation of the adjacent part, it is easy to increase the speed by the parallel encoding method. However, in the H.264 encoding method used for AVCHD format of digital video cameras and Blu-ray disc recording, there is an in-loop filter called deblocking filter, and the encoding result of the local decoded image affects the adjacent image. Will be affected. In the deblocking filter in the H.264 encoding method, the order of filtering is specified, and it is necessary to perform processing in the raster order from the upper left of the image in units of macroblocks. Therefore, it is necessary to complete the processing of the upper and left macroblocks, and it is difficult to perform encoding in parallel.

これに対して図3のように画像を水平短冊状に分割し、垂直ラスタスキャン順でデブロッキングフィルタ処理を行うことにより、H.264符号化方式の規格に準拠したフィルタ処理を行うという方法がある(特許文献1参照)。この方法によれば、デブロッキングフィルタを並列に処理することが可能となり、並列符号化を行うことができる。   On the other hand, as shown in FIG. 3, the image is divided into horizontal strips, and the deblocking filter processing is performed in the vertical raster scan order, thereby performing the filtering processing conforming to the standard of the H.264 encoding method. Yes (see Patent Document 1). According to this method, the deblocking filter can be processed in parallel, and parallel encoding can be performed.

特許第04395174号Japanese Patent No. 0435174

通常、H.264符号化方式などの画像圧縮処理を行う場合、高速化のために動きベクトル検出、直交変換、量子化、デブロッキングフィルタなどの処理単位でマクロブロックパイプライン処理を行うことが多い。しかしながら、上記特許文献1における技術ではデブロッキングフィルタ処理は並列に処理を行うことができるが、その前処理となる動きベクトル検出、直交変換、量子化などの処理は、デブロッキングフィルタ処理を行う前にピクチャ内の全ての処理が完了していなければならない。すなわち、デブロッキングフィルタ処理と、その前処理との間ではマクロブロックパイプラインで処理することができず、ピクチャ単位で処理を行わなければならないという問題があった。全ての処理をマクロブロックパイプラインで処理する場合と比較し、処理速度の低下や、処理の中間結果を保持するバッファサイズが増大するという問題が生じる。   Normally, when performing image compression processing such as H.264 encoding, macroblock pipeline processing is often performed in units of processing such as motion vector detection, orthogonal transformation, quantization, and deblocking filter for speeding up. . However, although the deblocking filter processing can be performed in parallel in the technique in Patent Document 1, the preprocessing such as motion vector detection, orthogonal transformation, and quantization is performed before the deblocking filter processing. All processing in the picture must be completed. In other words, the macroblock pipeline cannot be processed between the deblocking filter processing and the preprocessing, and there is a problem that the processing must be performed in units of pictures. Compared with the case where all the processes are performed by the macroblock pipeline, there are problems that the processing speed is reduced and the buffer size for holding the intermediate results of the processes is increased.

そこで、本発明は、複数の領域に分割した画像の分割境界においてデブロッキングフィルタをかけなくするようにし、分割したそれぞれの領域に対して符号化器を割り当てることにより並列に符号化を行うことを可能にすることを目的とする。   Therefore, the present invention performs the encoding in parallel by not applying the deblocking filter at the division boundary of the image divided into a plurality of regions, and assigning an encoder to each divided region. The purpose is to make it possible.

本発明の画像符号化装置は、画像を複数の領域に分割して複数の符号化手段により各領域を並列に符号化する画像符号化装置であって、ブロック間の境界にフィルタ処理を行うフィルタ手段と、ブロックごとに可変な量子化パラメータを用いて量子化を行う量子化手段と、符号化画像と参照画像との間で動きベクトル検出を行う動きベクトル検出手段とを備え、前記フィルタ手段が、前記複数の領域の分割境界にあるブロック境界に対してはフィルタ処理が行われないようにする値を設定することを特徴とする。   An image encoding device of the present invention is an image encoding device that divides an image into a plurality of regions and encodes each region in parallel by a plurality of encoding means, and performs a filter process on a boundary between blocks Means, quantization means for performing quantization using a variable quantization parameter for each block, and motion vector detection means for performing motion vector detection between the encoded image and the reference image, wherein the filter means A value is set so that the filter processing is not performed on the block boundary at the dividing boundary of the plurality of regions.

本発明の画像符号化装置によれば、複数の領域に分割した画像の分割境界においてデブロッキングフィルタをかけなくすることができるため、分割したそれぞれの領域に対して符号化器を割り当てることにより並列に符号化を行うことが可能となる。また、それぞれの符号化器においては、通常の符号化時と同様にマクロブロックパイプラインを組んで処理を行うことが可能であり、処理速度の低下やバッファサイズの増大を招くことなく並列符号化処理を行うことが可能となる。   According to the image encoding device of the present invention, since it is possible to eliminate the deblocking filter at the division boundary of the image divided into a plurality of regions, the encoders are assigned to the divided regions in parallel. Can be encoded. In addition, each encoder can perform processing by assembling a macroblock pipeline in the same way as in normal encoding, and parallel encoding without causing a decrease in processing speed or an increase in buffer size. Processing can be performed.

本発明の符号化システムの実施例1を示すブロック図。The block diagram which shows Example 1 of the encoding system of this invention. 画像を分割して並列に符号化動作を行う例。An example in which an image is divided and encoding operations are performed in parallel. デブロッキングフィルタの並列符号化の例。An example of parallel coding of a deblocking filter. 符号化回路のブロック図。The block diagram of an encoding circuit. ブロック境界の画素値。Pixel value at block boundary. αとβの算出テーブル。Calculation table of α and β. 本発明の実施例2における符号化回路のブロック図。The block diagram of the encoding circuit in Example 2 of this invention. 画像の分割境界をまたがった2つのマクロブロックの例。An example of two macroblocks straddling an image partition boundary. Bs値の条件。Bs value condition.

以下、図面を参照しながら本発明の好適な実施の形態を説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

[実施例1]
図1は本実施形態による符号化装置のシステム構成を説明するブロック図である。本実施例においては、画像を上下の2つの領域に分割して並列に符号化を行う場合の例について説明する。
[Example 1]
FIG. 1 is a block diagram illustrating the system configuration of the encoding apparatus according to the present embodiment. In this embodiment, an example will be described in which an image is divided into two upper and lower regions and encoded in parallel.

フレームバッファ101は、これから符号化が行われる画像が入力され、その画像をバッファリングしておく。その後バッファリングした画像を上下に分割し、上の画像は符号化回路102、下の画像は符号化回路103に出力する。   The frame buffer 101 receives an image to be encoded, and buffers the image. Thereafter, the buffered image is divided vertically, and the upper image is output to the encoding circuit 102 and the lower image is output to the encoding circuit 103.

符号化回路102はH.264符号化方式の符号化を行う回路で、分割された画像の上側の画像の符号化を行い、符号化ストリーム、ローカルデコード画像を生成する。符号化ストリームはストリームバッファ104へ出力される。   The encoding circuit 102 is a circuit that performs encoding of the H.264 encoding method, encodes the upper image of the divided images, and generates an encoded stream and a local decoded image. The encoded stream is output to the stream buffer 104.

符号化回路103は、符号化回路102と同様にH.264符号化方式の符号化を行う回路で、分割された画像の下側の画像の符号化を行い、符号化ストリーム、ローカルデコード画像を生成し、符号化ストリームをストリームバッファ104に出力する。   The encoding circuit 103 is a circuit that performs encoding of the H.264 encoding method in the same manner as the encoding circuit 102, encodes the lower image of the divided image, and outputs the encoded stream and the local decoded image. The encoded stream is output to the stream buffer 104.

符号化回路102で符号化が行われる符号化ストリームと、符号化回路103で符号化が行われる符号化ストリームは、それぞれ別スライスとして符号化が行われる。   The encoded stream that is encoded by the encoding circuit 102 and the encoded stream that is encoded by the encoding circuit 103 are encoded as separate slices.

ストリームバッファ104は、符号化回路102、および符号化回路103からそれぞれ出力される分割された符号化ストリームを、1つの符号化ストリームにまとめて出力する。   The stream buffer 104 collectively outputs the divided encoded streams output from the encoding circuit 102 and the encoding circuit 103, respectively, as one encoded stream.

図4に符号化回路102の構成を示す。入力された符号化画像が格納されているフレームバッファ101から、上下に分割された上の画像がマクロブロック単位でラスタ順に動き予測部401に出力される。動き予測部401では、フレームバッファ101から入力される符号化画像と、参照フレームバッファ410に格納されている参照画像との間でブロックマッチングをとり、動きベクトル検出を行う。符号化画像と、検出された動きベクトル位置の参照画像との間で画素の差分をとり、その差分画像を直交変換部402に出力する。   FIG. 4 shows the configuration of the encoding circuit 102. From the frame buffer 101 in which the input encoded image is stored, the upper image divided in the vertical direction is output to the motion prediction unit 401 in raster order in units of macroblocks. The motion prediction unit 401 performs block matching between the encoded image input from the frame buffer 101 and the reference image stored in the reference frame buffer 410 to perform motion vector detection. The pixel difference is calculated between the encoded image and the reference image of the detected motion vector position, and the difference image is output to the orthogonal transform unit 402.

直交変換部402では、送られてきた差分画像に対して離散コサイン変換を行い、変換係数を生成し、量子化部403に出力する。   The orthogonal transform unit 402 performs discrete cosine transform on the transmitted difference image, generates transform coefficients, and outputs the transform coefficients to the quantization unit 403.

量子化部403では、送られてきた変換係数に対して、量子化制御部404が出力する量子化パラメータに従い、量子化を行う。量子化された変換係数はエントロピー符号化部405、ならびにローカルデコード画像作成のため逆量子化部406に送られる。   The quantization unit 403 performs quantization on the received transform coefficient according to the quantization parameter output from the quantization control unit 404. The quantized transform coefficient is sent to the entropy coding unit 405 and the inverse quantization unit 406 for creating a local decoded image.

エントロピー符号化部405では、量子化後の変換係数に対してジグザグスキャン、オルタネートスキャン等を行い、可変長符号化が行われる。これに対して、動きベクトルや、量子化パラメータ、マクロブロックの分割情報などの符号化方式情報を可変長符号化したものを付加し、符号化ストリームを生成する。また、符号化の際にマクロブロックごとの発生符号量を算出し、量子化制御部404に送る。   In the entropy coding unit 405, variable length coding is performed by performing zigzag scanning, alternate scanning, or the like on the transformed transform coefficients. On the other hand, a variable-length encoded encoding method information such as a motion vector, a quantization parameter, and macroblock division information is added to generate an encoded stream. Also, the amount of generated code for each macroblock is calculated at the time of encoding and sent to the quantization control unit 404.

量子化制御部404では、量子化パラメータを決定する。量子化制御部404には、符号化を行う当該マクロブロックが画像の分割境界に接しているかどうかを示す情報(画像の境界情報)が入力される。   The quantization control unit 404 determines a quantization parameter. Information (image boundary information) indicating whether or not the macroblock to be encoded is in contact with the division boundary of the image is input to the quantization control unit 404.

符号化を行うマクロブロックが画像の分割境界に接していない場合には、エントロピー符号化部405から発生符号量を受け取り、目標とする符号量になるように量子化パラメータを決定し、量子化部403に出力する。   If the macroblock to be encoded is not in contact with the division boundary of the image, the generated code amount is received from the entropy encoding unit 405, the quantization parameter is determined so as to become the target code amount, and the quantization unit Output to 403.

符号化を行うマクロブロックが画像の分割境界に接している場合には、量子化パラメータをある決められた値(これをQp_nofilterとする)にする。この量子化パラメータ値は、ブロック境界にデブロッキングフィルタ処理が行われないような値に設定する。この値は、H.264符号化方式の規格より導きだすことができる。詳細については、デブロッキングフィルタ部409のところで説明する。   When the macroblock to be encoded is in contact with the division boundary of the image, the quantization parameter is set to a predetermined value (this is referred to as Qp_nofilter). This quantization parameter value is set to such a value that deblocking filter processing is not performed on the block boundary. This value can be derived from the H.264 coding standard. Details will be described in the deblocking filter unit 409.

逆量子化部406では、入力された量子化後の変換係数に対して逆量子化を行い、ローカルデコード用の変換係数を生成する。この変換係数は逆直交変換部407に出力される。   The inverse quantization unit 406 performs inverse quantization on the input transformed transform coefficient to generate a transform coefficient for local decoding. This transform coefficient is output to the inverse orthogonal transform unit 407.

逆直交変換部407では、入力された変換係数に対して、逆離散コサイン変換を行い、差分画像を生成する。差分画像は動き補償部408に出力される。   The inverse orthogonal transform unit 407 performs inverse discrete cosine transform on the input transform coefficient to generate a difference image. The difference image is output to the motion compensation unit 408.

動き補償部408では、動きベクトル位置の参照画像を参照フレームバッファ410から読み出し、入力された差分画像を加算することにより、ローカルデコード用の画像データを作成する。作成された画像データはデブロッキングフィルタ部409に出力される。   The motion compensation unit 408 reads the reference image at the motion vector position from the reference frame buffer 410 and adds the input difference images to create image data for local decoding. The created image data is output to the deblocking filter unit 409.

デブロッキングフィルタ部409では、入力された画像データに対してデブロッキングフィルタをかける。デブロッキングフィルタ後の画像が、ローカルデコード画像として参照フレームバッファ410に格納される。   The deblocking filter unit 409 applies a deblocking filter to the input image data. The image after the deblocking filter is stored in the reference frame buffer 410 as a local decoded image.

以上の動作により、符号化ストリーム、ローカルデコード画像が作成される。なお、符号化回路103も符号化回路102と同様の構成をとる。   With the above operation, an encoded stream and a local decoded image are created. Note that the encoding circuit 103 has the same configuration as the encoding circuit 102.

デブロッキングフィルタ部409では、H.264符号化方式の規格に準拠してデブロッキングフィルタ処理が行われる。ただし、実際にブロック境界にフィルタ処理が行われるかどうかは、当該ブロック境界の画素値や符号化パラメータによって決まる。H.264符号化方式の規格から、以下の式(1)の条件が成立した場合には、ブロック境界にフィルタ処理を行わない。ここで、ブロック境界の画素値を図5のように、p0、p1、p2、p3、q0、q1、q2、q3と表す。   In the deblocking filter unit 409, the deblocking filter process is performed in accordance with the standard of the H.264 encoding method. However, whether or not the filter processing is actually performed on the block boundary depends on the pixel value and the encoding parameter of the block boundary. According to the standard of the H.264 encoding method, when the condition of the following expression (1) is satisfied, the filter process is not performed on the block boundary. Here, the pixel values at the block boundary are expressed as p0, p1, p2, p3, q0, q1, q2, and q3 as shown in FIG.

|p0−q0|>α もしくは |p1−q0|>β もしくは |q1−q0|>β …(1)
ここで、α、βはそれぞれIndexA、IndexBという値に対するテーブルで定義される。IndexA、IndexBは量子化パラメータ、およびフィルタ強度に対するオフセット値から算出される。IndexA、IndexBに対するα、βの定義を図6に示す。
| P0−q0 |> α or | p1−q0 |> β or | q1−q0 |> β (1)
Here, α and β are defined in a table for the values IndexA and IndexB, respectively. IndexA and IndexB are calculated from the quantization parameter and the offset value for the filter strength. Definitions of α and β for IndexA and IndexB are shown in FIG.

フィルタ処理を行う2つのブロックの量子化パラメータ、すなわちp0、p1、p2、p3の量子化パラメータをQpA、q0、q1、q2、q3の量子化パラメータをQpBとし、その2つの量子化パラメータの平均値をQpavとする。また、ビットストリーム中においてslice_alpha_c0_offset_div2、slice_beta_offset_div2で指定されるオフセット値をそれぞれFilterOffsetA、FilterOffsetBとすると、IndexA、IndexBはそれぞれ、式(2)、式(3)で表される。   The quantization parameters of the two blocks to be filtered, that is, the quantization parameters of p0, p1, p2, and p3 are QpA, q0, q1, q2, and q3, and the average of the two quantization parameters. Let the value be Qpav. Further, assuming that the offset values specified by slice_alpha_c0_offset_div2 and slice_beta_offset_div2 in the bitstream are FilterOffsetA and FilterOffsetB, respectively, IndexA and IndexB are expressed by Expression (2) and Expression (3), respectively.

IndexA=Qpav+FilterOffsetA …(2)
IndexB=Qpav+FilterOffsetB …(3)
ここで、図6のテーブルからIndexAが15以下であればα=0、IndexBが15以下であればβ=0となる。α=0、もしくはβ=0とすれば、式(1)の条件を満たすので、当該ブロックにはデブロッキングフィルタがかからない。
IndexA = Qpav + FilterOffsetA (2)
IndexB = Qpav + FilterOffsetB (3)
Here, from the table of FIG. 6, α = 0 if IndexA is 15 or less, and β = 0 if IndexB is 15 or less. If α = 0 or β = 0, the condition of Expression (1) is satisfied, so that the block is not covered with a deblocking filter.

量子化制御部404で決定するQp_nofilterの値を式(2)、式(3)、および図6のテーブルから、α=0、もしくはβ=0となるような値に設定する。以下の式(4)、式(5)のどちらかが成立するように、Qp_nofilterの値を設定する。   The value of Qp_nofilter determined by the quantization control unit 404 is set to a value such that α = 0 or β = 0 from Equation (2), Equation (3), and the table of FIG. The value of Qp_nofilter is set so that either of the following formulas (4) and (5) holds.

Qp_nofilter=15−FilterOffsetA …(4)
Qp_nofilter=15−FilterOffsetB …(5)
例えば、FilterOffsetA=0だとすると、式(4)より、Qp_nofilter=15となる。量子化制御部404で、画像の分割境界部分に接したブロックは15に設定される。これにより、フィルタ処理を行う2つのブロックの量子化パラメータQpA、QpBがともにQpA=15、QpB=15に設定されるので、2つの量子化パラメータの平均値もQpav=15となる。
Qp_nofilter = 15−FilterOffsetA (4)
Qp_nofilter = 15−FilterOffsetB (5)
For example, if FilterOffsetA = 0, Qp_nofilter = 15 from Equation (4). In the quantization control unit 404, the number of blocks in contact with the division boundary portion of the image is set to 15. As a result, the quantization parameters QpA and QpB of the two blocks to be filtered are both set to QpA = 15 and QpB = 15, so the average value of the two quantization parameters is also Qpav = 15.

FilterOffsetA=0なので、式(2)より、IndexA=15となる。図6のテーブルよりα=0となるので、式(1)の |p0−q0|>α の条件が成立する。したがって、このブロック境界にはデブロッキングフィルタがかからない。   Since FilterOffsetA = 0, IndexA = 15 from Equation (2). Since α = 0 from the table of FIG. 6, the condition of | p0−q0 |> α in Expression (1) is satisfied. Therefore, no deblocking filter is applied to this block boundary.

このようにして、画像の分割境界部分は必ずデブロッキングフィルタがかからないように処理を行う。   In this way, processing is performed so that the deblocking filter is not applied to the division boundary portion of the image.

以上のように、量子化制御部404で、処理行うブロックが分割した画像の分割境界に接しているかどうかを判定し、分割境界部分に接している場合には、量子化パラメータをある一定以下の値にすることで、デブロッキングフィルタをかけないようにすることができる。   As described above, the quantization control unit 404 determines whether the block to be processed is in contact with the division boundary of the divided image. If the block is in contact with the division boundary portion, the quantization parameter is set to a certain value or less. By setting the value, it is possible to prevent the deblocking filter from being applied.

このように処理を行うことで画像の分割境界で、デブロッキングフィルタによる影響を避けることができ、分割した上部分のローカルデコード画像の符号化結果が、分割した下部分のローカルデコード画像に影響を及ぼさないようにすることができる。したがって、分割した上下の画像はそれぞれ独立に符号化を行うことができるため、符号化回路102と符号化回路103の2つの符号化器を用いて並列符号化が可能となる。また、それぞれの符号化器においては、図4に示した構成のように通常時と同じマクロブロックパイプラインで処理を行うことができる。   By performing processing in this way, it is possible to avoid the influence of the deblocking filter at the division boundary of the image, and the encoding result of the divided local decoded image in the upper part affects the divided local decoded image in the lower part. It can be prevented from reaching. Therefore, since the divided upper and lower images can be encoded independently, parallel encoding can be performed using the two encoders of the encoding circuit 102 and the encoding circuit 103. In each encoder, processing can be performed in the same macroblock pipeline as in the normal case as in the configuration shown in FIG.

なお、本実施例では画像を上下の2つに分割した場合の例について説明したが、それ以上の複数の領域に分割した場合でも適用でき、同様の効果を得ることができる。また上下ではなく、左右に分割した場合にも同様の効果を得ることができる。   In this embodiment, the example in which the image is divided into the upper and lower parts has been described. However, the present invention can be applied to a case where the image is divided into a plurality of areas, and similar effects can be obtained. The same effect can also be obtained when the image is divided not horizontally but horizontally.

また、符号化方式としてH.264符号化方式を例にして説明したが、本発明はH.264符号化方式に限定されるものではなく、H.264符号化方式を改良したような新しい規格であっても、同様の技術内容を有する規格であれば、同様に本発明を適用することができる。   In addition, the H.264 encoding method has been described as an example of the encoding method, but the present invention is not limited to the H.264 encoding method, and a new standard that improves the H.264 encoding method. However, the present invention can be similarly applied as long as the standard has the same technical contents.

[実施例2]
本実施例では、デブロッキングフィルタをかけないようにするために、動きベクトル、参照ピクチャ、ならびに量子化係数を変更するところに特徴がある。ここでは、第1の実施例との差異についてのみ詳細に説明する。
[Example 2]
This embodiment is characterized in that the motion vector, the reference picture, and the quantization coefficient are changed so as not to apply the deblocking filter. Here, only differences from the first embodiment will be described in detail.

本実施例における符号化回路の構成を図7に示す。第1の実施例の符号化回路102の構成に対して、動き予測部701、量子化部702、量子化制御部703の動作が異なる。   The configuration of the encoding circuit in this embodiment is shown in FIG. The operations of the motion prediction unit 701, the quantization unit 702, and the quantization control unit 703 are different from the configuration of the encoding circuit 102 of the first embodiment.

これから符号化が行われる符号化画像は、フレームバッファ101に格納される。フレームバッファ101では、符号化画像を上下の2つに分割し、分割した符号化画像を動き予測部701に出力する。   The encoded image to be encoded from now on is stored in the frame buffer 101. The frame buffer 101 divides the encoded image into two parts, upper and lower, and outputs the divided encoded image to the motion prediction unit 701.

動き予測部701では、フレームバッファ101から入力される分割された符号化画像と、参照ブレームバッファ401に格納されている参照画像との間でブロックマッチングをとり、動きベクトル検出を行う。符号化画像と、検出された動きベクトル位置の参照画像との間で画素の差分をとり、その差分画像を直交変換部402に出力する。   The motion prediction unit 701 performs block matching between the divided encoded image input from the frame buffer 101 and the reference image stored in the reference frame buffer 401 to perform motion vector detection. The pixel difference is calculated between the encoded image and the reference image of the detected motion vector position, and the difference image is output to the orthogonal transform unit 402.

ここで、符号化を行う当該マクロブロックが画像の分割境界に接したマクロブロックかどうかで処理が変わる。   Here, the process changes depending on whether or not the macroblock to be encoded is a macroblock in contact with the division boundary of the image.

符号化を行うマクロブロックが画像の分割境界に接していない場合は、通常時と同じようにブロックマッチングを行い、動きベクトル検出を行う。   When the macroblock to be encoded is not in contact with the division boundary of the image, block matching is performed in the same manner as in the normal case, and motion vector detection is performed.

符号化を行うマクロブロックが画像の分割境界に接している場合は、境界をまたがった2つのマクロブロックが同じ参照ピクチャ、かつ同じ動きベクトルを示すようにする。   When the macroblock to be encoded is in contact with the division boundary of the image, the two macroblocks straddling the boundary are set to indicate the same reference picture and the same motion vector.

図8に画像の分割境界の例を示す。画像を上下に分割した分割境界に接しているマクロブロック801とマクロブロック802があり、この2つのマクロブロックの参照ピクチャ、動きベクトルを同じにする。   FIG. 8 shows an example of image division boundaries. There are a macroblock 801 and a macroblock 802 that are in contact with a division boundary obtained by dividing an image vertically, and the reference pictures and motion vectors of the two macroblocks are made the same.

これは、あらかじめ決められた動きベクトル値(例えば原点位置であるベクトル(0,0)等)を設定してもよい。また、先に符号化を行った方のマクロブロックの結果に合わせてもよい。例えば、マクロブロック801より、マクロブロック802の方が先に符号化が行われるとする。このとき、マクロブロック802は通常と同じようにブロックマッチングを行い、動きベクトル検出を行う。マクロブロック801の符号化時には、動きベクトルとして、マクロブロック802の結果を受け取り、それをそのままマクロブロック801の動きベクトル検出の結果として符号化を行う。   For this, a predetermined motion vector value (for example, a vector (0, 0) that is the origin position) may be set. Further, it may be matched with the result of the macroblock that has been encoded first. For example, it is assumed that the macroblock 802 is encoded earlier than the macroblock 801. At this time, the macroblock 802 performs block matching in the same manner as usual and performs motion vector detection. When the macro block 801 is encoded, the result of the macro block 802 is received as a motion vector, and the result is encoded as it is as a result of motion vector detection of the macro block 801.

直交変換部402では、送られてきた差分画像に対して離散コサイン変換を行い、変換係数を生成し、量子化部702に出力する。   The orthogonal transform unit 402 performs discrete cosine transform on the transmitted difference image, generates a transform coefficient, and outputs the transform coefficient to the quantization unit 702.

量子化部702では、送られてきた変換係数に対して量子化処理を行う。量子化部702でも、符号化を行う当該マクロブロックが画像の分割境界に接したマクロブロックかどうかで処理が変わる。   The quantization unit 702 performs a quantization process on the transmitted transform coefficient. Also in the quantization unit 702, the processing changes depending on whether or not the macroblock to be encoded is a macroblock in contact with the division boundary of the image.

符号化を行うマクロブロックが画像の分割境界に接していない場合は、量子化制御部703が出力する量子化パラメータに従い量子化を行う。   When the macroblock to be encoded is not in contact with the division boundary of the image, the quantization is performed according to the quantization parameter output from the quantization control unit 703.

符号化を行うマクロブロックが画像の分割境界に接している場合は、量子化制御部703が出力する量子化パラメータの値にかかわらず、量子化後の変換係数を全て0にする。   When the macroblock to be encoded is in contact with the division boundary of the image, all the transform coefficients after quantization are set to 0 regardless of the value of the quantization parameter output from the quantization control unit 703.

どちらの場合でも、量子化された変換係数はエントロピー符号化部405、ならびにローカルデコード画像作成のため逆量子化部406に送られる
エントロピー符号化部405では、量子化後の変換係数に対してジグザグスキャン、オルタネートスキャン等を行い、可変長符号化が行われる。これに対して、動きベクトルや量子化パラメータ、マクロブロック分割情報などの符号化情報を可変長符号化したものを付加し、符号化ストリームを生成する。また、符号化の際にマクロブロックごとの発生符号量を算出し、量子化制御部703に送る。
In either case, the quantized transform coefficients are sent to the entropy coding unit 405 and the inverse quantization unit 406 to create a local decoded image. The entropy coding unit 405 performs zigzag on the quantized transform coefficients. Scanning, alternate scanning, etc. are performed, and variable length coding is performed. On the other hand, an encoded stream is generated by adding variable length encoded encoding information such as a motion vector, a quantization parameter, and macroblock division information. Also, the amount of generated code for each macroblock is calculated at the time of encoding, and is sent to the quantization control unit 703.

量子化制御部703では、エントロピー符号化部405から発生符号量を受け取り、ピクチャ全体で目標とする符号量になるように量子化パラメータを決定し、量子化部702へ出力する。   The quantization control unit 703 receives the generated code amount from the entropy coding unit 405, determines the quantization parameter so that the entire code amount becomes the target code amount, and outputs the quantization parameter to the quantization unit 702.

逆量子化部406では、入力された量子化後の変換係数に対して逆量子化を行い、ローカルデコード用の変換係数を生成し、逆直交変換部407に出力する。   The inverse quantization unit 406 performs inverse quantization on the input quantized transform coefficient, generates a transform coefficient for local decoding, and outputs the transform coefficient to the inverse orthogonal transform unit 407.

逆直交変換部407では、入力された変換係数に対して逆離散コサイン変換を行い、差分画像を生成する。差分画像は動き補償部408に出力される。   The inverse orthogonal transform unit 407 performs inverse discrete cosine transform on the input transform coefficient to generate a difference image. The difference image is output to the motion compensation unit 408.

動き補償部408では、動きベクトル位置の参照画像を参照フレームバッファ410から読み出してきて参照画像を生成し、入力された差分画像を加算することにより、ローカルデコード用の画像データを作成する。作成された画像データは、デブロッキングフィルタ部409に出力される。   The motion compensation unit 408 reads the reference image at the motion vector position from the reference frame buffer 410, generates a reference image, and adds the input difference images to create image data for local decoding. The created image data is output to the deblocking filter unit 409.

デブロッキングフィルタ部409では、入力された画像データに対してデブロッキングフィルタをかける。デブロッキングフィルタ後の画像が、ローカルデコード画像として参照フレームバッファ410に格納される。   The deblocking filter unit 409 applies a deblocking filter to the input image data. The image after the deblocking filter is stored in the reference frame buffer 410 as a local decoded image.

このようにして、符号化ストリーム、ローカルデコード画像が生成される。   In this way, an encoded stream and a local decoded image are generated.

デブロッキングフィルタ部409では、H.264符号化方式の規格に準拠してデブロッキングフィルタ処理が行われる。H.264符号化方式の規格に、Bs(Boundary Strength)値というものがある。これは、画像のブロック境界の強度を表すものであり、Bs=0〜4の値をとる。このBs値がBs=0のときは、そのブロック境界に対してデブロッキングフィルタ処理を行わないことになっている。   In the deblocking filter unit 409, the deblocking filter process is performed in accordance with the standard of the H.264 encoding method. There is a Bs (Boundary Strength) value in the standard of the H.264 encoding method. This represents the intensity of the block boundary of the image, and takes a value of Bs = 0 to 4. When the Bs value is Bs = 0, the deblocking filter process is not performed on the block boundary.

Bs値を決定する条件を図9に示す。ここで、p、qはブロック境界をまたがった2つのブロックを表している。   The conditions for determining the Bs value are shown in FIG. Here, p and q represent two blocks straddling the block boundary.

動き予測部701により、画像の分割境界に接した2つのブロックは、それぞれ参照ピクチャ、動きベクトルが同じになっている。また量子化部702により、量子化後の変換係数が全て0になっている。   The motion prediction unit 701 has the same reference picture and motion vector for the two blocks in contact with the image division boundary. Further, the quantization unit 702 makes all the transform coefficients after quantization zero.

これらの条件から図9より、Bs=0となる。したがって画像の分割境界にはデブロッキングフィルタがかからない。   From these conditions, Bs = 0 from FIG. Therefore, no deblocking filter is applied to the division boundary of the image.

以上のように、画像の分割境界にまたがった2つのブロックに対して、参照ピクチャ、動きベクトルを同一にし、かつ量子化後の変換係数を全て0にすることで、画像の分割境界部分にデブロッキングフィルタをかけないようにすることができる。   As described above, by making the reference picture and the motion vector the same for two blocks straddling the image division boundary and setting all the transform coefficients after quantization to 0, the image is divided into the image division boundary portion. It is possible not to apply a blocking filter.

このように処理を行うことで画像の分割境界で、デブロッキングフィルタによる影響を避けることができ、2つの符号化器を用いての並列符号化が可能となる。また、それぞれの符号化器においては、図7に示した構成のように通常時と同じマクロブロックパイプラインで処理を行うことができる。   By performing the processing in this manner, the influence of the deblocking filter can be avoided at the division boundary of the image, and parallel encoding using two encoders becomes possible. In each encoder, processing can be performed in the same macroblock pipeline as in the normal case as in the configuration shown in FIG.

101 フレームバッファ
102 分割画像の上部分用符号化回路
103 分割画像の下部分用符号化回路
104 ストリームバッファ
101 Frame buffer 102 Encoding circuit for upper part of divided image 103 Encoding circuit for lower part of divided image 104 Stream buffer

Claims (5)

画像を複数の領域に分割して複数の符号化手段により各領域を並列に符号化する画像符号化装置であって、
ブロック間の境界にフィルタ処理を行うフィルタ手段と、
ブロックごとに可変な量子化パラメータを用いて量子化を行う量子化手段と、
符号化画像と参照画像との間で動きベクトル検出を行う動きベクトル検出手段とを備え、
前記フィルタ手段が、前記複数の領域の分割境界にあるブロック境界に対してはフィルタ処理が行われないようにする値を設定することを特徴とする画像符号化装置。
An image encoding device that divides an image into a plurality of regions and encodes each region in parallel by a plurality of encoding means,
A filter means for performing filtering on a boundary between blocks;
A quantization means for performing quantization using a variable quantization parameter for each block;
Motion vector detection means for detecting a motion vector between the encoded image and the reference image,
The image coding apparatus according to claim 1, wherein the filter means sets a value that prevents a filter process from being performed on a block boundary at a boundary between the plurality of regions.
前記フィルタ手段は、前記分割境界にあるブロック境界をまたがって接している2つのブロックの量子化パラメータの平均値を、ある一定の値よりも小さい値に設定することを特徴とする請求項1に記載の画像符号化装置。   2. The filter unit according to claim 1, wherein the filter unit sets an average value of quantization parameters of two blocks adjacent to each other across a block boundary at the division boundary to a value smaller than a certain value. The image encoding device described. 前記動きベクトル検出手段は、前記分割境界にあるブロック境界をまたがって接している2つのブロックにおいて、参照ピクチャと動きベクトルがそれぞれ同じになるようにすることを特徴とする請求項1又は請求項2に記載の画像符号化装置。   3. The motion vector detection means makes the reference picture and the motion vector be the same in two blocks that are in contact with each other across the block boundary at the division boundary. The image encoding device described in 1. 前記量子化手段は、前記分割境界にあるブロック境界をまたがって接している2つのブロックにおいて、量子化後の係数が全て0にすることを特徴とする請求項3に記載の画像符号化装置。   The image coding apparatus according to claim 3, wherein the quantization means sets all the quantized coefficients to 0 in two blocks that are in contact with each other across the block boundary at the division boundary. 前記複数の符号化手段が、それぞれH.264符号化方式に準拠した符号化を行うことを特徴とする請求項1乃至請求項4の何れか1項に記載の画像符号化装置。   5. The image encoding device according to claim 1, wherein each of the plurality of encoding units performs encoding based on an H.264 encoding method.
JP2014047046A 2014-03-11 2014-03-11 Image encoder Pending JP2015171117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014047046A JP2015171117A (en) 2014-03-11 2014-03-11 Image encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014047046A JP2015171117A (en) 2014-03-11 2014-03-11 Image encoder

Publications (1)

Publication Number Publication Date
JP2015171117A true JP2015171117A (en) 2015-09-28

Family

ID=54203449

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014047046A Pending JP2015171117A (en) 2014-03-11 2014-03-11 Image encoder

Country Status (1)

Country Link
JP (1) JP2015171117A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020079900A1 (en) * 2018-10-18 2020-04-23 ソニー株式会社 Encoding device, encoding method, and decoding device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020079900A1 (en) * 2018-10-18 2020-04-23 ソニー株式会社 Encoding device, encoding method, and decoding device
JPWO2020079900A1 (en) * 2018-10-18 2021-09-24 ソニーグループ株式会社 Coding device, coding method, decoding device

Similar Documents

Publication Publication Date Title
KR102668077B1 (en) Apparatus and method for image coding and decoding
CN111201791B (en) Interpolation filter for inter-frame prediction apparatus and method for video encoding
JP7318120B2 (en) Padding process in adaptive loop filtering
JP5748463B2 (en) Encoding device and program
JP7326600B2 (en) Adaptive loop filtering between different video units
US8687910B2 (en) Image filtering method using pseudo-random number filter and apparatus thereof
JP2010098633A (en) Prediction coding apparatus, and prediction coding method
JP2018085660A (en) Image encoder
WO2018177395A1 (en) Method and apparatus for filtering video frames
JP2015171117A (en) Image encoder
WO2020059341A1 (en) Image decoding device, image encoding device, image processing system, and program
CN111903132A (en) Image processing apparatus and method
JP7386883B2 (en) Deblocking using subpel motion vector thresholding
JP2021052249A (en) Encoding device, decoding device, and program
JP2009088736A (en) Image encoder, image decoder, and image encoding method