JP2012156575A - Encoder, decoder and program - Google Patents

Encoder, decoder and program Download PDF

Info

Publication number
JP2012156575A
JP2012156575A JP2011011054A JP2011011054A JP2012156575A JP 2012156575 A JP2012156575 A JP 2012156575A JP 2011011054 A JP2011011054 A JP 2011011054A JP 2011011054 A JP2011011054 A JP 2011011054A JP 2012156575 A JP2012156575 A JP 2012156575A
Authority
JP
Japan
Prior art keywords
motion vector
quantization step
step width
image
search range
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.)
Granted
Application number
JP2011011054A
Other languages
Japanese (ja)
Other versions
JP5498972B2 (en
Inventor
Kazuhisa Iguchi
和久 井口
Takahiro Toyoda
崇弘 豊田
Shinichi Sakaida
慎一 境田
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.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2011011054A priority Critical patent/JP5498972B2/en
Publication of JP2012156575A publication Critical patent/JP2012156575A/en
Application granted granted Critical
Publication of JP5498972B2 publication Critical patent/JP5498972B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To adaptively limit a motion vector search range of a decoding side.SOLUTION: The encoder includes: a motion vector detecting section 15 searching for a reference image and detecting a motion vector; an image compression section 11 compressing a difference image obtained by subtracting a predicted image based on the motion vector from an original image by using prescribed quantization step width; and a quantization step width deciding section 17 updating the quantization step width in the reference region of the motion vector. The quantization step width deciding section 17 updates the quantization step width of the reference region of the motion vector until a prescribed condition is satisfied. The image compression section 11 compresses the original image and compresses the reference image by using the updated quantization step width whenever the quantization step width is updated by the quantization step width deciding section 17. The motion vector detecting section 15 detects the motion vector by referring to the image obtained by decoding the compressed reference image whenever the reference image is compressed by the image compression section 11.

Description

本発明は、動きベクトル探索範囲を適応的に制限する、符号化装置、復号装置及びプログラムに関する。   The present invention relates to an encoding device, a decoding device, and a program that adaptively limit a motion vector search range.

動きベクトル検出は、映像の符号化や動き補償内挿による高フレームレート化処理などで用いられる要素技術の1つであり、符号化対象ブロックと類似する(相関の高い)ブロックを、符号化対象ブロックの属するフレーム(符号化対象フレーム)と異なるフレームを参照して検出する技術である。また、フラクタル符号化等では、符号化対象ブロックと類似するブロックを符号化対象フレームと同一又は異なるフレームを参照して検出する。一般的には、符号化対象ブロックと類似したブロックを符号化対象フレームと異なるフレームを参照して検出することを動きベクトル検出と称し、符号化対象フレームを参照して検出する場合には、テンプレートマッチングやパターンマッチングという用語が用いられることが多い。本明細書では、参照するフレームが符号化対象フレームと同一である場合も異なる場合も、動きベクトル検出という用語を用いる。   Motion vector detection is one of the elemental techniques used in video encoding and high frame rate processing by motion compensation interpolation, and blocks similar to the encoding target block (highly correlated) are encoded. This is a technique for detecting by referring to a frame different from the frame to which the block belongs (encoding target frame). In fractal encoding or the like, a block similar to the encoding target block is detected with reference to the same or different frame as the encoding target frame. Generally, detecting a block similar to the encoding target block with reference to a frame different from the encoding target frame is referred to as motion vector detection, and when detecting with reference to the encoding target frame, a template The terms matching and pattern matching are often used. In this specification, the term motion vector detection is used regardless of whether the frame to be referenced is the same as or different from the encoding target frame.

また、動きベクトル検出は演算コストの大きい処理であるため、動きベクトル探索範囲をなるべく制限することにより処理を軽減することが望ましい。しかし、動きベクトル探索範囲を一律固定的に制限すると、正しい動きベクトルが探索範囲内に含まれない場合が生じる。そこで、例えば、過去に検出した動きベクトルの大きさを判定し、大きな動きでは動きベクトル探索範囲を広くし、小さな動きでは動きベクトル探索範囲を狭くする動きベクトル検出装置が知られている(特許文献1参照)。また、フレーム間動きベクトル検出において、同位置の相関が高くなるに従って動きベクトル探索範囲を縮小する動きベクトル検出装置が知られている(特許文献2参照)。また、前フレームの動きベクトルの絶対値の合計値と前フレームの予測誤差の合計値とに基づいて、次フレームの動きベクトル探索範囲を決定する動画像符号化装置が知られている(特許文献3参照)。   Also, since motion vector detection is a process with a high calculation cost, it is desirable to reduce the process by limiting the motion vector search range as much as possible. However, if the motion vector search range is uniformly fixed, a correct motion vector may not be included in the search range. Therefore, for example, there is known a motion vector detection device that determines the size of a motion vector detected in the past, widens a motion vector search range for a large motion, and narrows a motion vector search range for a small motion (Patent Literature). 1). In addition, in motion vector detection between frames, a motion vector detection device is known that reduces the motion vector search range as the correlation at the same position increases (see Patent Document 2). Also, there is known a video encoding device that determines a motion vector search range of the next frame based on a total value of absolute values of motion vectors of the previous frame and a total value of prediction errors of the previous frame (Patent Literature). 3).

特開平10−4554号公報Japanese Patent Laid-Open No. 10-4554 特開平8−32969号公報JP-A-8-32969 特開2005−244542号公報JP 2005-244542 A

しかし、特許文献1から3に記載の動きベクトル探索範囲を適応的に制限する従来の動きベクトル検出方法では、動きベクトルの時間的な相関を利用するため、符号化対象フレームを参照して動きベクトル検出を行う符号化方式には適用できないという問題があった。   However, in the conventional motion vector detection method that adaptively limits the motion vector search range described in Patent Documents 1 to 3, the motion vector is referred to the encoding target frame in order to use temporal correlation of motion vectors. There is a problem that it cannot be applied to a coding system that performs detection.

また、特許文献1に記載の技法では、過去の動きベクトルに誤検出や、物体の動く速度が変化すると、正しい動きベクトル探索範囲を設定できないという問題があり、特許文献2に記載の技法では、同位置の相関の大きさはノイズの影響や物体境界の影響を受けるため、正しい動きベクトル探索範囲が求まらない場合があるという問題があった。   Further, in the technique described in Patent Document 1, there is a problem in that a correct motion vector search range cannot be set when erroneous detection is performed on a past motion vector or when the moving speed of an object changes. In the technique described in Patent Document 2, Since the magnitude of the correlation at the same position is affected by noise and object boundaries, there is a problem that a correct motion vector search range may not be obtained.

本発明の目的は、上記問題を解決するため、符号化対象フレームを参照して動きベクトル検出を行う符号化方式にも適用でき、かつ、動きベクトル探索範囲を適応的に制限する、符号化装置、復号装置及びプログラムを提供することにある。   In order to solve the above-described problem, an object of the present invention is applicable to an encoding method that performs motion vector detection with reference to an encoding target frame, and adaptively limits a motion vector search range. Another object is to provide a decoding device and a program.

画像符号化、映像符号化ではブロック毎に量子化ステップ幅を変更することが可能である。また、動きベクトルはフレーム内の全ての領域を指し示すものではない。このことを利用して上記課題を解決すべく、符号化装置では、動きベクトルが参照する領域の量子化ステップ幅を変更する。復号装置では量子化ステップ幅の変更された領域のみを動きベクトル探索範囲に制限する。   In image coding and video coding, the quantization step width can be changed for each block. Further, the motion vector does not indicate all the regions in the frame. In order to solve the above problem using this, the encoding apparatus changes the quantization step width of the region referred to by the motion vector. In the decoding apparatus, only the region in which the quantization step width is changed is limited to the motion vector search range.

すなわち、上記課題を解決するため、本発明に係る符号化装置は、画像を圧縮して量子化ステップ幅及び量子化された画像データを含む符号化ストリームを送信する符号化装置であって、参照画像を探索して動きベクトルを検出する動きベクトル検出部と、原画像から前記動きベクトルに基づく予測画像を差し引いた差分画像を、所定の量子化ステップ幅を用いて圧縮する画像圧縮部と、前記動きベクトルの参照領域内の量子化ステップ幅を更新する量子化ステップ幅決定部と、を備え、前記量子化ステップ幅決定部は、所定の条件を満たすまで、前記動きベクトルの参照領域の量子化ステップ幅を更新し、前記画像圧縮部は、前記原画像を圧縮した後に、前記量子化ステップ幅決定部によって量子化ステップ幅が更新される度に、該更新された量子化ステップ幅を用いて前記参照画像を圧縮し、前記動きベクトル検出部は、前記画像圧縮部によって前記参照画像が圧縮される度に、該圧縮された参照画像を復号した画像を参照して動きベクトルを検出する。   That is, in order to solve the above problem, an encoding apparatus according to the present invention is an encoding apparatus that compresses an image and transmits an encoded stream including a quantization step width and quantized image data. A motion vector detection unit that searches for an image to detect a motion vector, an image compression unit that compresses a difference image obtained by subtracting a predicted image based on the motion vector from an original image using a predetermined quantization step width, and A quantization step width determination unit that updates a quantization step width in a motion vector reference region, wherein the quantization step width determination unit quantizes the motion vector reference region until a predetermined condition is satisfied. The step width is updated, and the image compression unit updates the quantization step width every time the quantization step width determination unit updates the quantization step width after compressing the original image. The reference vector is compressed using a quantization step width, and the motion vector detection unit refers to an image obtained by decoding the compressed reference image every time the reference image is compressed by the image compression unit. To detect a motion vector.

さらに、本発明に係る符号化装置において、前記所定の条件は、前記動きベクトルの検出回数が所定回数以上であるという条件か、又は前記反復して検出された動きベクトルの参照領域が直前に検出された動きベクトルの参照領域に含まれるという条件であることを特徴とする。   Furthermore, in the encoding device according to the present invention, the predetermined condition is a condition that the number of detections of the motion vector is a predetermined number or more, or the reference region of the motion vector detected repeatedly is detected immediately before. It is a condition that the motion vector is included in the reference region of the motion vector.

さらに、本発明に係る符号化装置において、前記量子化ステップ幅決定部は、前記更新された動きベクトルの参照領域の量子化ステップ幅を元の値よりも小さな値に更新することを特徴とする。   Furthermore, in the encoding device according to the present invention, the quantization step width determination unit updates the quantization step width of the reference region of the updated motion vector to a value smaller than an original value. .

また、上記課題を解決するため、本発明に係る復号装置は、量子化ステップ幅及び量子化された画像データを含む符号化ストリームを受信して画像を復号する復号装置であって、前記符号化ストリームから量子化ステップ幅を取得し、該量子化ステップ幅を用いて、前記量子化された画像データから画像を復号する画像復号部と、前記量子化ステップ幅の大きさを判定し、該判定結果に基づいて動きベクトル探索範囲を決定する量子化ステップ幅判定部と、参照画像における前記動きベクトル探索範囲内を探索して動きベクトルを検出する動きベクトル検出部とを備え、量子化ステップ幅が変更された領域のみを動きベクトル探索範囲とすることを特徴とする。   In order to solve the above problem, a decoding apparatus according to the present invention is a decoding apparatus that receives an encoded stream including a quantization step width and quantized image data, and decodes an image, wherein the encoding An image decoding unit that obtains a quantization step width from the stream and uses the quantization step width to decode an image from the quantized image data, and determines a size of the quantization step width, and the determination A quantization step width determination unit that determines a motion vector search range based on a result; and a motion vector detection unit that detects a motion vector by searching within the motion vector search range in a reference image. Only the changed area is set as a motion vector search range.

さらに、本発明に係る復号装置において、前記量子化ステップ幅判定部は、量子化ステップ幅が所定の閾値より小さいか否かを判定し、量子化ステップ幅が所定の閾値より小さい領域を前記動きベクトル探索範囲と決定することを特徴とする。   Further, in the decoding device according to the present invention, the quantization step width determination unit determines whether or not the quantization step width is smaller than a predetermined threshold, and moves the region in which the quantization step width is smaller than the predetermined threshold. The vector search range is determined.

さらに、本発明に係る復号装置において、前記量子化ステップ幅判定部は、前記動きベクトル探索範囲のフレーム全体に締める割合が所定の閾値を超えるまで、前記量子化ステップ幅の小さい領域から順に前記動きベクトル探索範囲と決定することを特徴とする。   Furthermore, in the decoding device according to the present invention, the quantization step width determination unit is configured to sequentially perform the motion from the region with the smallest quantization step width until a ratio of tightening to the entire frame of the motion vector search range exceeds a predetermined threshold. The vector search range is determined.

また、本発明は、画像を圧縮して量子化ステップ幅及び量子化された画像データを含む符号化ストリームを送信する符号化装置として機能するコンピュータに、(a)参照画像を探索して動きベクトルを検出するステップと、(b)原画像から前記動きベクトルに基づく予測画像を差し引いた差分画像を、所定の量子化ステップ幅を用いて圧縮するステップと、(c)所定の条件を満たすまで、前記動きベクトルの参照領域内の量子化ステップ幅を更新するステップと、(d)前記ステップ(a)の後に、前記ステップ(c)によって量子化ステップ幅が更新される度に、該更新された量子化ステップ幅を用いて前記参照画像を圧縮するステップと、(e)前記ステップ(d)によって前記参照画像が圧縮される度に、該圧縮された参照画像を復号した画像を参照して動きベクトルを検出するステップと、を実行させるためのプログラムとしても特徴付けられる。   The present invention also provides a computer functioning as an encoding device that compresses an image and transmits an encoded stream including a quantization step width and quantized image data. (B) compressing a difference image obtained by subtracting the predicted image based on the motion vector from the original image using a predetermined quantization step width, and (c) until a predetermined condition is satisfied. Updating the quantization step width in the reference region of the motion vector; and (d) after the step (a), each time the quantization step width is updated by the step (c) Compressing the reference image using a quantization step width; and (e) each time the reference image is compressed in step (d), the compressed reference image Detecting a motion vector by referring to the decoded image, also characterized as a program to be run.

また、本発明は、量子化ステップ幅及び量子化された画像データを含む符号化ストリームを受信して画像を復号する復号装置として機能するコンピュータに、(a)前記符号化ストリームから量子化ステップ幅を取得し、該量子化ステップ幅を用いて、前記量子化された画像データから画像を復号するステップと、(b)前記量子化ステップ幅の大きさを判定し、該判定結果に基づいて動きベクトル探索範囲を決定するステップと、(c)参照画像における前記動きベクトル探索範囲内を探索して動きベクトルを検出するステップと、を実行させるためのプログラムとしても特徴付けられる。   In addition, the present invention provides a computer functioning as a decoding device that receives an encoded stream including a quantization step width and quantized image data and decodes an image, and (a) a quantization step width from the encoded stream. And decoding the image from the quantized image data using the quantization step width, and (b) determining the size of the quantization step width, and moving based on the determination result It is also characterized as a program for executing a step of determining a vector search range and a step of (c) searching for a motion vector in the motion vector search range in a reference image.

本発明によれば、符号化装置は、動きベクトルによって参照された領域の量子化ステップ幅を変更することで、復号装置に対して動きベクトル探索範囲を指示することが可能となる。量子化ステップ幅は全てのフレームの各ブロックに設定されるものであるため、フレーム毎に適切な動きベクトル探索範囲を適応的に指示することができる。   According to the present invention, the encoding device can instruct the motion vector search range to the decoding device by changing the quantization step width of the region referred to by the motion vector. Since the quantization step width is set for each block of all frames, an appropriate motion vector search range can be adaptively designated for each frame.

本発明によれば、復号装置は、量子化ステップ幅が変更された領域のみを動きベクトル探索範囲とすればよいため、動きベクトル検出の演算コストを小さくすることができる。   According to the present invention, since the decoding device only needs to set the motion vector search range only for the region where the quantization step width is changed, the calculation cost of motion vector detection can be reduced.

本発明によれば、動きベクトル探索範囲の指示に量子化ステップ幅のみを利用するため、符号化対象フレームを参照して動きベクトルを検出する符号化方式にも適用することができる。   According to the present invention, since only the quantization step width is used to indicate the motion vector search range, the present invention can also be applied to an encoding method that detects a motion vector with reference to an encoding target frame.

本発明による一実施例の符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the encoding apparatus of one Example by this invention. 本発明による一実施例の符号化装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the encoding apparatus of one Example by this invention. 本発明による一実施例の符号化装置の量子化ステップ幅を説明する図である。It is a figure explaining the quantization step width of the encoding apparatus of one Example by this invention. 本発明による一実施例の符号化装置の動作を説明する図である。It is a figure explaining operation | movement of the encoding apparatus of one Example by this invention. 本発明による一実施例の復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the decoding apparatus of one Example by this invention. 本発明による一実施例の復号装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the decoding apparatus of one Example by this invention.

以下、本発明の実施形態について、図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

[符号化装置]
図1は、本発明による一実施例の符号化装置の構成を示すブロック図である。符号化装置1は、減算部10と、画像圧縮部11と、画像復号部12と、加算部13と、復号画像記憶部14と、動きベクトル検出部15と、動き補償部16と、量子化ステップ幅決定部17と、探索範囲記憶部18と、可変長符号化部19とを備える。
[Encoder]
FIG. 1 is a block diagram showing a configuration of an encoding apparatus according to an embodiment of the present invention. The encoding device 1 includes a subtraction unit 10, an image compression unit 11, an image decoding unit 12, an addition unit 13, a decoded image storage unit 14, a motion vector detection unit 15, a motion compensation unit 16, and a quantization. A step width determination unit 17, a search range storage unit 18, and a variable length encoding unit 19 are provided.

減算部10は、入力される原画像と、動き補償部16から入力される予測画像との差分画像を生成して画像圧縮部11に出力する。   The subtraction unit 10 generates a difference image between the input original image and the predicted image input from the motion compensation unit 16 and outputs the difference image to the image compression unit 11.

画像圧縮部11は、減算部10から入力される差分画像に対して所定のサイズ(例えば、16×16画素や8×8画素)のブロックごとに直交変換(例えば、DCT;Discrete Cosine Transform)処理を施し、直交変換係数を生成する。そして、直交変換係数に対して、量子化ステップ幅決定部17から入力される量子化ステップ幅を用いて量子化処理を施し、差分画像の圧縮情報(量子化された直交変換係数)を生成し、画像復号部12及び可変長符号化部19に出力する。   The image compression unit 11 performs orthogonal transform (for example, DCT; Discrete Cosine Transform) processing for each block of a predetermined size (for example, 16 × 16 pixels or 8 × 8 pixels) on the difference image input from the subtraction unit 10. To generate orthogonal transform coefficients. Then, the orthogonal transform coefficient is quantized using the quantization step width input from the quantization step width determination unit 17 to generate differential image compression information (quantized orthogonal transform coefficient). And output to the image decoding unit 12 and the variable length encoding unit 19.

画像復号部12は、画像圧縮部11から入力される量子化された直交変換係数に対して逆量子化処理を施す。そして、逆量子化された直交変換係数に対して逆直交変換(例えば、IDCT;Inverse Discrete Cosine Transform)を施して差分画像の復号画像を生成し、加算部13に出力する。   The image decoding unit 12 performs an inverse quantization process on the quantized orthogonal transform coefficient input from the image compression unit 11. Then, inverse orthogonal transform (for example, IDCT; Inverse Discrete Cosine Transform) is performed on the inversely quantized orthogonal transform coefficient, and a decoded image of the difference image is generated and output to the adding unit 13.

加算部13は、画像復号部12から入力される差分画像の復号画像と、動き補償部16から入力される予測画像とを加算して原画像の復号画像を生成し、復号画像記憶部14に出力する。   The adding unit 13 adds the decoded image of the difference image input from the image decoding unit 12 and the predicted image input from the motion compensation unit 16 to generate a decoded image of the original image, and stores the decoded image in the decoded image storage unit 14. Output.

復号画像記憶部14は、加算部13から入力される復号画像を記憶する。   The decoded image storage unit 14 stores the decoded image input from the addition unit 13.

動きベクトル検出部15は、復号画像記憶部14に記憶された参照画像(復号画像)を動きベクトル検出対象として、探索範囲記憶部18に記憶された動きベクトル探索範囲内を探索して、各符号化対象ブロックの動きベクトルを検出する。   The motion vector detection unit 15 searches the motion vector search range stored in the search range storage unit 18 using the reference image (decoded image) stored in the decoded image storage unit 14 as a motion vector detection target, The motion vector of the conversion target block is detected.

動き補償部16は、復号画像記憶部14から入力される参照画像に対して、動きベクトル検出部15から入力される動きベクトルを用いて動き補償を行い、その結果得られた予測画像を、減算部10及び加算部13に出力する。   The motion compensation unit 16 performs motion compensation on the reference image input from the decoded image storage unit 14 using the motion vector input from the motion vector detection unit 15, and subtracts the predicted image obtained as a result. To the unit 10 and the adder 13.

量子化ステップ幅決定部17は、動きベクトル検出部15から入力される動きベクトルに基づいて、量子化ステップ幅を更新し、更新した量子化ステップ幅を画像圧縮部11に出力する。また、量子化ステップ幅決定部17は、動きベクトル検出部15から入力される動きベクトルに基づいて、動きベクトル探索範囲も更新するようにしてもよい。この場合には、更新した動きベクトル探索範囲を探索範囲記憶部18に出力する。動きベクトル探索範囲を更新し、動きベクトル探索範囲をフレーム全体よりも狭くすることにより、動きベクトル検出部15の処理スピードを向上させることができる。   The quantization step width determination unit 17 updates the quantization step width based on the motion vector input from the motion vector detection unit 15 and outputs the updated quantization step width to the image compression unit 11. Further, the quantization step width determination unit 17 may also update the motion vector search range based on the motion vector input from the motion vector detection unit 15. In this case, the updated motion vector search range is output to the search range storage unit 18. By updating the motion vector search range and making the motion vector search range narrower than the entire frame, the processing speed of the motion vector detection unit 15 can be improved.

探索範囲記憶部18は、量子化ステップ幅決定部17から入力される動きベクトル探索範囲を記憶する。なお、量子化ステップ幅決定部17が動きベクトル探索範囲を更新せず、例えば、常にフレーム全体を動きベクトル探索範囲とする場合には、探索範囲記憶部18を備える必要はない。   The search range storage unit 18 stores the motion vector search range input from the quantization step width determination unit 17. If the quantization step width determination unit 17 does not update the motion vector search range and, for example, the entire frame is always set as the motion vector search range, the search range storage unit 18 need not be provided.

可変長符号化部19は、画像圧縮部11から入力される差分画像の圧縮情報(量子化された直交変換係数)及び量子化ステップ幅決定部17によって更新された量子化ステップ幅について、可変長符号化処理を施して符号化ストリームを生成し、外部に出力する。なお、本実施例の符号化装置1は、後述するように復号装置側でも動きベクトルを検出することを想定しているため、動きベクトル検出部15で検出した動きベクトルを伝送する必要はなく、これにより、伝送量を削減して符号化効率を向上させることができる。   The variable length encoding unit 19 uses the variable length for the compression information (quantized orthogonal transform coefficient) of the difference image input from the image compression unit 11 and the quantization step width updated by the quantization step width determination unit 17. An encoding process is performed to generate an encoded stream, which is output to the outside. Note that the encoding apparatus 1 of the present embodiment assumes that the decoding apparatus side also detects a motion vector, as will be described later, so there is no need to transmit the motion vector detected by the motion vector detection unit 15. Thereby, the transmission amount can be reduced and the encoding efficiency can be improved.

次に、このように構成される符号化装置1の動作について、図2を参照して説明する。図2は、符号化装置1の動作を示すフローチャートである。   Next, the operation of the encoding apparatus 1 configured as described above will be described with reference to FIG. FIG. 2 is a flowchart showing the operation of the encoding apparatus 1.

ステップS101にて、量子化ステップ幅決定部17により、量子化ステップ幅及び動きベクトル探索範囲を決定する。量子化ステップ幅の初期値は、フレーム内で一様な値であり、動きベクトルの探索範囲の初期値はフレーム全体である。なお、上述したように、動きベクトルの探索範囲は常にフレーム全体としてもよい。   In step S101, the quantization step width determination unit 17 determines the quantization step width and the motion vector search range. The initial value of the quantization step width is a uniform value within the frame, and the initial value of the motion vector search range is the entire frame. As described above, the motion vector search range may always be the entire frame.

ステップS102にて、動きベクトル検出部15により、復号画像記憶部14から参照画像を読み出し、参照画像に対して、探索範囲記憶部18に記憶された動きベクトル探索範囲を設定し、動きベクトルを検出する。   In step S102, the motion vector detection unit 15 reads the reference image from the decoded image storage unit 14, sets the motion vector search range stored in the search range storage unit 18 for the reference image, and detects the motion vector. To do.

ステップS103にて、動き補償部16により、ステップS105にて検出された動きベクトルを用いて動き補償を行い、予測画像を生成する。   In step S103, the motion compensation unit 16 performs motion compensation using the motion vector detected in step S105, and generates a predicted image.

ステップS104にて、減算部10により、入力される原画像と、動き補償部16から入力される予測画像との差分画像を生成する。   In step S <b> 104, the subtraction unit 10 generates a difference image between the input original image and the predicted image input from the motion compensation unit 16.

ステップS105にて、画像圧縮部11により、ステップS101にて生成された差分画像に対して直交変換処理及び量子化処理を施し、差分画像の圧縮情報(量子化された直交変換係数)を生成する。   In step S105, the image compression unit 11 performs orthogonal transform processing and quantization processing on the difference image generated in step S101, and generates compression information (quantized orthogonal transform coefficient) of the difference image. .

ステップS106にて、画像復号部12により、ステップS102にて生成された量子化された直交変換係数に対して逆量子化処理及び逆直交変換処理を施し、差分画像の復号画像を生成する。   In step S106, the image decoding unit 12 performs inverse quantization processing and inverse orthogonal transformation processing on the quantized orthogonal transform coefficient generated in step S102 to generate a decoded image of the difference image.

ステップS107にて、加算部13により、ステップS103にて生成された予測画像と、ステップS106にて生成された差分画像の復号画像とを加算して、原画像の復号画像を生成する。   In step S107, the addition unit 13 adds the predicted image generated in step S103 and the decoded image of the difference image generated in step S106 to generate a decoded image of the original image.

ステップS108にて、量子化ステップ幅決定部17又は制御部(図示せず)により、反復処理の回数が予め定めた回数に達しているか否か、又は動きベクトル検出時に参照された領域(以下、動きベクトル参照領域という)が収束したか否かを判定する。判定結果がYesであった場合には処理をステップS109に進め、判定結果がNoであった場合にはステップS101からステップS107の処理を反復して行う。   In step S108, the quantization step width determination unit 17 or the control unit (not shown) determines whether or not the number of iterations has reached a predetermined number, or a region (hereinafter referred to as a motion vector detection). It is determined whether or not the motion vector reference region has converged. If the determination result is Yes, the process proceeds to step S109. If the determination result is No, the process from step S101 to step S107 is repeated.

反復処理を行う場合、量子化ステップ幅決定部17は、動きベクトル参照領域を新たな動きベクトル探索範囲とし、探索範囲記憶部18に出力する。また、量子化ステップ幅決定部17は、復号側で、動きベクトル参照領域を動きベクトルによって参照されなかった領域と識別可能なように、各ブロックの量子化ステップ幅の値を更新する。そして、符号化装置1は、量子化ステップ幅決定部17によって更新された量子化ステップ幅を用いて、参照画像を圧縮する処理を反復して行う。量子化ステップ幅決定部17は、所定の条件を満たすまで、量子化ステップ幅を更新する。ここで、所定の条件とは、例えば、反復処理の回数が所定回数以上であるという条件か、又は前記反復して検出された動きベクトルの参照領域が直前に検出された動きベクトルの参照領域に含まれる(動きベクトルの参照領域が収束する)という条件である。   When iterative processing is performed, the quantization step width determination unit 17 sets the motion vector reference area as a new motion vector search range and outputs the new motion vector search range to the search range storage unit 18. Further, the quantization step width determination unit 17 updates the quantization step width value of each block so that the motion vector reference region can be identified from the region not referenced by the motion vector on the decoding side. Then, the encoding device 1 repeatedly performs the process of compressing the reference image using the quantization step width updated by the quantization step width determination unit 17. The quantization step width determination unit 17 updates the quantization step width until a predetermined condition is satisfied. Here, the predetermined condition is, for example, a condition that the number of iterations is greater than or equal to a predetermined number, or the reference region of the motion vector detected repeatedly is the reference region of the motion vector detected immediately before. It is included (the motion vector reference area converges).

ステップS109にて、可変長符号化部19により、ステップS105にて生成された圧縮情報を符号化して符号化ストリームを生成する。   In step S109, the variable length encoding unit 19 encodes the compression information generated in step S105 to generate an encoded stream.

図3は、符号化装置1の量子化ステップ幅を説明する図である。符号化装置1は所定サイズ(例えば、16×16画素や8×8画素)のブロック単位で処理を行う。図3は、複数のブロックに分割されたフレームを示している。図3(a)に示すように、量子化ステップ幅決定部17は、初期値として1フレームの領域A内の全てのブロックに対して同一の量子化ステップ幅を決定する。図3(a)では、量子化ステップ幅の初期値は50である。なお、符号化方式によっては、量子化処理を行うブロックと、動き補償処理を行うブロックのサイズが異なる場合があるが、本発明における量子化ステップ幅を変更するブロックは、量子化処理を行うブロックのことを指す。   FIG. 3 is a diagram for explaining the quantization step width of the encoding device 1. The encoding device 1 performs processing in units of blocks having a predetermined size (for example, 16 × 16 pixels or 8 × 8 pixels). FIG. 3 shows a frame divided into a plurality of blocks. As shown in FIG. 3A, the quantization step width determination unit 17 determines the same quantization step width for all the blocks in the region A of one frame as an initial value. In FIG. 3A, the initial value of the quantization step width is 50. Depending on the encoding method, the size of the block that performs the quantization process may differ from the size of the block that performs the motion compensation process. However, the block that changes the quantization step width in the present invention is a block that performs the quantization process. Refers to that.

なお、量子化ステップ幅決定部17が決定する値は、量子化ステップ幅そのものに限定されるものではなく、量子化ステップ幅を表現可能な情報であればよい。例えば、予め複数種類の量子化ステップ幅を規定しておき、その中のいずれの種類の量子化ステップ幅であるかを示す情報としてもよい。   Note that the value determined by the quantization step width determination unit 17 is not limited to the quantization step width itself, and may be information that can express the quantization step width. For example, a plurality of types of quantization step widths may be defined in advance, and the information indicating which type of quantization step width is among them may be used.

符号化装置1は、入力される1フレームの原画像に対して、初期値の量子化ステップ幅を用いて1回目の圧縮処理を行う。動きベクトル検出部15は、1回目の動きベクトル検出を行い、量子化ステップ幅決定部17は、1回目の動きベクトル検出時に参照された動きベクトル参照領域Bを決定する。そして、量子化ステップ幅決定部17は、復号側で、動きベクトル参照領域を動きベクトルによって参照されなかった領域と識別可能なように、各ブロックの量子化ステップ幅を更新する。図3(b)では、動きベクトル参照領域Bは太枠で示されており、動きベクトル参照領域B内の各ブロックの量子化ステップ幅が50から40に変更された様子を示している。   The encoding device 1 performs a first compression process on an input original image of one frame using an initial quantization step width. The motion vector detection unit 15 performs the first motion vector detection, and the quantization step width determination unit 17 determines the motion vector reference region B referred to when the first motion vector is detected. Then, the quantization step width determination unit 17 updates the quantization step width of each block so that on the decoding side, the motion vector reference region can be distinguished from the region that is not referenced by the motion vector. In FIG. 3B, the motion vector reference area B is indicated by a thick frame, and the quantization step width of each block in the motion vector reference area B is changed from 50 to 40.

復号画像を参照して動きベクトル検出を行う場合には、復号画像の符号化劣化が小さい方が動きベクトルの検出精度は向上する。符号化劣化は、量子化ステップ幅が小さい程低減する。そのため、量子化ステップ幅決定部17は、新たな動きベクトル探索範囲内の量子化ステップ幅を元の値よりも小さな値に変更するのが好適である。   When motion vector detection is performed with reference to a decoded image, the accuracy of motion vector detection is improved when the decoding degradation of the decoded image is small. Coding degradation decreases as the quantization step width decreases. Therefore, the quantization step width determination unit 17 preferably changes the quantization step width in the new motion vector search range to a value smaller than the original value.

符号化装置1は、同一の1フレームの参照画像に対して、図3(b)に示す更新された量子化ステップ幅を用いて、2回目の圧縮処理を行う。動きベクトル検出部15は、2回目の動きベクトル検出を行い、量子化ステップ幅決定部17は、2回目の動きベクトル検出時に参照された動きベクトル参照領域Cを決定する。図3(c)(d)では、動きベクトル参照領域Cは斜線で示されている。図3(c)の例では、動きベクトル参照領域Cは動きベクトル参照領域Bに含まれる領域であるため、動きベクトル参照領域は収束したものとし、量子化ステップ幅決定部17は、動きベクトルの参照領域の量子化ステップ幅の更新を終了する。   The encoding device 1 performs a second compression process on the same reference image of one frame using the updated quantization step width shown in FIG. The motion vector detection unit 15 performs the second motion vector detection, and the quantization step width determination unit 17 determines the motion vector reference region C referred to at the time of the second motion vector detection. In FIGS. 3C and 3D, the motion vector reference region C is indicated by hatching. In the example of FIG. 3C, since the motion vector reference area C is an area included in the motion vector reference area B, it is assumed that the motion vector reference area has converged, and the quantization step width determination unit 17 The update of the quantization step width of the reference area is finished.

一方、図3(d)の例では、動きベクトル参照領域Cは動きベクトル参照領域Bに含まれない領域であるため、量子化ステップ幅決定部17は、動きベクトルの参照領域の量子化ステップ幅を更新する。図3(d)では、動きベクトル参照領域C内の各ブロックの量子化ステップ幅が30に変更された様子を示している。なお、量子化ステップ幅を初期値から大きく変動させるとビットレートに与える影響が大きくなる。そのため、図3(e)に示すように、新たに更新した動きベクトル参照領域C内の量子化ステップ幅のみ40とし、他を初期値と同じ50としてもよい。   On the other hand, in the example of FIG. 3D, since the motion vector reference area C is an area not included in the motion vector reference area B, the quantization step width determination unit 17 determines the quantization step width of the motion vector reference area. Update. FIG. 3D shows a state in which the quantization step width of each block in the motion vector reference region C is changed to 30. Note that if the quantization step width is greatly changed from the initial value, the influence on the bit rate is increased. Therefore, as shown in FIG. 3E, only the quantization step width in the newly updated motion vector reference region C may be set to 40, and the others may be set to 50, which is the same as the initial value.

なお、図3(b)〜(e)には、動きベクトル参照領域B,Cは単一の領域として示されているが、動きベクトル参照領域は複数の領域であってもよく、また、間欠部分が存在する領域であってもよい。また、動きベクトル検出部15は、最初は動きベクトル探索範囲内を粗く探索し、動きベクトル探索範囲が狭くなるにつれて細かく探索するようにしてもよい。   In FIGS. 3B to 3E, the motion vector reference regions B and C are shown as a single region, but the motion vector reference region may be a plurality of regions or intermittent. It may be an area where a portion exists. Alternatively, the motion vector detection unit 15 may initially search roughly within the motion vector search range and finely search as the motion vector search range becomes narrower.

符号化装置1は、符号化対象フレームを参照して動き補償を行うことも、符号化対象フレームと異なるフレームを参照して動き補償を行うこともできる。図4(a)は、符号化対象フレームを参照して動き補償を行う場合の符号化装置1の動作を説明する図であり、図4(b)は、符号化対象フレームと異なるフレームを参照して動き補償を行う場合の符号化装置1の動作を説明する図である。   The encoding device 1 can perform motion compensation with reference to the encoding target frame, or can perform motion compensation with reference to a frame different from the encoding target frame. FIG. 4A is a diagram for explaining the operation of the encoding apparatus 1 when motion compensation is performed with reference to the encoding target frame, and FIG. 4B refers to a frame different from the encoding target frame. It is a figure explaining operation | movement of the encoding apparatus 1 in the case of performing motion compensation.

図4(a)に示すように、符号化対象フレーム1を参照して動き補償を行う場合、まず、符号化対象フレーム1について、検出部15により、符号化対象フレーム1全体を動きベクトルの探索範囲として動きベクトルaを検出し、画像圧縮部11により、符号化対象フレーム1全体で同一の値(図3の例では50)を用いて符号化対象フレーム1を圧縮する。次に、画像圧縮部11により、動きベクトルa検出時に参照された動きベクトル参照領域Bの量子化ステップを変更して(図3の例では40)、参照画像である符号化対象フレーム1に対して再度圧縮を行う。   As shown in FIG. 4A, when motion compensation is performed with reference to the encoding target frame 1, first, with respect to the encoding target frame 1, the detection unit 15 searches the entire encoding target frame 1 for a motion vector. The motion vector a is detected as a range, and the image compression unit 11 compresses the encoding target frame 1 using the same value (50 in the example of FIG. 3) in the entire encoding target frame 1. Next, the quantization step of the motion vector reference region B referred to when the motion vector a is detected is changed by the image compression unit 11 (40 in the example of FIG. 3), and the encoding target frame 1 which is a reference image is changed. And compress again.

ここで、動きベクトル参照領域Bの量子化ステップ幅を変更して圧縮したことにより、画像復号部12による復号画像は当初の復号画像に比べて変化している。よって、この場合の動きベクトル参照領域が動きベクトル参照領域B内に含まれる領域となるかを確認するために、動きベクトル検出部15により、符号化対象フレーム1全体を動きベクトルの探索範囲として、画像復号部12による復号画像に対し、動きベクトルbの検出を行う。ただし、復号画像が変化していない領域を参照しているブロックについては、動きベクトルを検出し直す必要はない。   Here, since the quantization step width of the motion vector reference region B is changed and compressed, the decoded image by the image decoding unit 12 changes compared to the original decoded image. Therefore, in order to confirm whether the motion vector reference region in this case is a region included in the motion vector reference region B, the motion vector detection unit 15 sets the entire encoding target frame 1 as a motion vector search range, The motion vector b is detected for the decoded image by the image decoding unit 12. However, it is not necessary to re-detect the motion vector for a block that refers to an area where the decoded image has not changed.

動きベクトルbの検出時に参照された動きベクトル参照領域Cが、動きベクトル参照領域Bに含まれる場合には、符号化対象フレーム1の圧縮符号化処理を終了する。一方、動きベクトル参照領域Cが動きベクトル参照領域Bに含まれない場合には、動きベクトル参照領域Cの量子化ステップを変更して、符号化対象フレーム1に対して再度圧縮を行い、その後、同様に動きベクトル検出部15により、符号化対象フレーム1全体を動きベクトルの探索範囲として、画像復号部12による復号画像に対し、動きベクトルcの検出を行う。このようにして、反復処理の数が予め定めた回数に達しているか、又は動きベクトル探索範囲が収束するまで、当該処理を繰り返し行う。   When the motion vector reference region C referred to when the motion vector b is detected is included in the motion vector reference region B, the compression encoding process for the encoding target frame 1 is terminated. On the other hand, when the motion vector reference region C is not included in the motion vector reference region B, the quantization step of the motion vector reference region C is changed, the compression is performed again on the encoding target frame 1, and then Similarly, the motion vector detection unit 15 detects the motion vector c for the decoded image by the image decoding unit 12 using the entire encoding target frame 1 as a motion vector search range. In this way, this process is repeated until the number of iterations reaches a predetermined number of times or the motion vector search range converges.

図4(b)に示すように、符号化対象フレーム1と異なる復号済みフレームを参照して動き補償を行う場合、まず、符号化対象フレーム1について、検出部15により、復号済みフレーム2全体を動きベクトルの探索範囲として動きベクトルaを検出し、画像圧縮部11により、符号化対象フレーム1全体で同一の値(図3の例では50)を用いて符号化対象フレーム1を圧縮する。次に、画像圧縮部11により、動きベクトルa検出時に参照された動きベクトル参照領域Bの量子化ステップを変更して(図3の例では40)、参照画像である復号済みフレーム2に対して圧縮を行う。   As shown in FIG. 4B, when motion compensation is performed with reference to a decoded frame different from the encoding target frame 1, first, the entire decoded frame 2 is detected by the detection unit 15 for the encoding target frame 1. The motion vector a is detected as a motion vector search range, and the image compression unit 11 compresses the encoding target frame 1 using the same value (50 in the example of FIG. 3) in the entire encoding target frame 1. Next, the quantization step of the motion vector reference region B referred to when the motion vector a is detected is changed by the image compression unit 11 (40 in the example of FIG. 3), and the decoded frame 2 that is the reference image is changed. Perform compression.

ここで、動きベクトル参照領域Bの量子化ステップ幅を変更して圧縮したことにより、画像復号部12による復号画像は当初の復号画像に比べて変化している。よって、この場合の動きベクトル参照領域が動きベクトル参照領域B内に含まれる領域となるかを確認するために、動きベクトル検出部15により、復号済みフレーム2全体を動きベクトルの探索範囲として、画像復号部12による復号画像に対し、動きベクトルbの検出を行う。ただし、復号画像が変化していない領域を参照しているブロックについては、動きベクトルを検出し直す必要はない。   Here, since the quantization step width of the motion vector reference region B is changed and compressed, the decoded image by the image decoding unit 12 changes compared to the original decoded image. Therefore, in order to confirm whether the motion vector reference area in this case is an area included in the motion vector reference area B, the motion vector detection unit 15 sets the entire decoded frame 2 as a motion vector search range, The motion vector b is detected from the decoded image by the decoding unit 12. However, it is not necessary to re-detect the motion vector for a block that refers to an area where the decoded image has not changed.

動きベクトルbの検出時に参照された動きベクトル参照領域Cが、動きベクトル参照領域Bに含まれる場合には、復号済みフレーム2の圧縮符号化処理を終了する。一方、動きベクトル参照領域Cが動きベクトル参照領域Bに含まれない場合には、動きベクトル参照領域Cの量子化ステップを変更して、復号済みフレーム2に対して再度圧縮を行い、その後、同様に動きベクトル検出部15により、復号済みフレーム2全体を動きベクトルの探索範囲として、画像復号部12による復号画像に対し、動きベクトルcの検出を行う。このようにして、反復処理の数が予め定めた回数に達しているか、又は動きベクトル探索範囲が収束するまで、当該処理を繰り返し行う。   When the motion vector reference region C referred to when the motion vector b is detected is included in the motion vector reference region B, the compression encoding process for the decoded frame 2 is ended. On the other hand, when the motion vector reference region C is not included in the motion vector reference region B, the quantization step of the motion vector reference region C is changed, the decoded frame 2 is compressed again, and then the same The motion vector detection unit 15 detects the motion vector c for the decoded image by the image decoding unit 12 using the entire decoded frame 2 as the motion vector search range. In this way, this process is repeated until the number of iterations reaches a predetermined number of times or the motion vector search range converges.

符号化装置1は、このようにして、2回以上の圧縮処理を行い、量子化ステップ幅を更新することにより、復号側における動きベクトル探索範囲を制限する。なお、可能性は非常に低いが、仮に動きベクトルの参照先が参照画像のフレームの全領域を埋め尽した場合には、フレーム全体を探索対象としなければ適切な動きベクトルが見付からないため、動きベクトル探索範囲を制限することができない。よって、このような場合には、例外的に、量子化ステップ幅をフレーム内の全領域で一定とする。   In this way, the encoding device 1 performs the compression process twice or more and updates the quantization step width, thereby limiting the motion vector search range on the decoding side. Although the possibility is very low, if the reference destination of the motion vector fills the entire area of the frame of the reference image, an appropriate motion vector cannot be found unless the entire frame is searched. The vector search range cannot be limited. Therefore, in such a case, the quantization step width is exceptionally constant in the entire region in the frame.

また、本発明は、他の動きベクトル探索範囲の制限方法との組合せも容易である。例えば、他の方法で設定された動きベクトル探索範囲を動きベクトル探索範囲の初期値として上記反復処理を行う、あるいは、他の動きベクトル探索範囲の制限方法と本発明による動きベクトル参照領域を求め、両方に含まれる領域を復号側における最終的な動きベクトル探索範囲と決定することも可能である。   In addition, the present invention can be easily combined with other motion vector search range limiting methods. For example, the above-described iterative process is performed using a motion vector search range set by another method as an initial value of the motion vector search range, or another motion vector search range limiting method and a motion vector reference region according to the present invention are obtained, It is also possible to determine a region included in both as a final motion vector search range on the decoding side.

一般に、動きベクトルの参照先はフレーム内の全ての領域を指し示すことはなく、参照されない領域が存在する。よって、符号化装置1は、復号側における動きベクトル探索範囲を、符号化装置1の動きベクトル参照領域内に適応的に制限することができる。   In general, the reference destination of the motion vector does not indicate all the areas in the frame, and there is an unreferenced area. Therefore, the encoding device 1 can adaptively limit the motion vector search range on the decoding side within the motion vector reference region of the encoding device 1.

[復号装置]
次に、本発明による一実施例の復号装置について説明する。図5は、本発明による一実施例の復号装置の構成を示すブロック図である。復号装置2は、可変長復号部21と、画像復号部22と、加算部23と、復号画像記憶部24と、動きベクトル検出部25と、動き補償部26と、量子化ステップ幅判定部27と、探索範囲記憶部28とを備える。
[Decryption device]
Next, a decoding apparatus according to an embodiment of the present invention will be described. FIG. 5 is a block diagram showing a configuration of a decoding apparatus according to an embodiment of the present invention. The decoding device 2 includes a variable length decoding unit 21, an image decoding unit 22, an addition unit 23, a decoded image storage unit 24, a motion vector detection unit 25, a motion compensation unit 26, and a quantization step width determination unit 27. And a search range storage unit 28.

可変長復号部21は、符号化装置1から符号化ストリームを受信する。符号化装置1から入力される符号化ストリームには、差分画像の圧縮情報(量子化された直交変換係数)、及び量子化ステップ幅が含まれる。可変長復号部21は、入力される符号化ビットストリームに可変長復号処理を施し、差分画像の圧縮情報、及び量子化ステップ幅を取得する。そして、差分画像の圧縮情報を画像復号部22に出力し、量子化ステップ幅を画像復号部22及び量子化ステップ幅判定部27に出力する。   The variable length decoding unit 21 receives the encoded stream from the encoding device 1. The encoded stream input from the encoding device 1 includes compression information (quantized orthogonal transform coefficient) of the difference image and a quantization step width. The variable length decoding unit 21 performs variable length decoding processing on the input encoded bitstream, and acquires compression information of the difference image and a quantization step width. Then, the compression information of the difference image is output to the image decoding unit 22, and the quantization step width is output to the image decoding unit 22 and the quantization step width determination unit 27.

画像復号部22は、可変長復号部21から入力される量子化ステップ幅を用いて、可変長復号部21から入力される差分画像の圧縮情報に対して逆量子化処理を施す。そして、逆量子化処理された直交変換係数に対して逆直交変換処理を施し、差分画像の復号画像を生成し、加算部23に出力する。   The image decoding unit 22 uses the quantization step width input from the variable length decoding unit 21 to perform inverse quantization processing on the compression information of the difference image input from the variable length decoding unit 21. Then, inverse orthogonal transform processing is performed on the inversely quantized orthogonal transform coefficient, a decoded image of the difference image is generated, and output to the adding unit 23.

加算部23は、画像復号部22から入力される差分画像の復号画像と、動き補償部26から入力される予測画像とを加算して原画像の復号画像を生成し、復号画像記憶部24及び外部に出力する。   The addition unit 23 adds the decoded image of the difference image input from the image decoding unit 22 and the predicted image input from the motion compensation unit 26 to generate a decoded image of the original image, and outputs the decoded image storage unit 24 and Output to the outside.

復号画像記憶部24は、加算部23から入力される復号画像を記憶する。   The decoded image storage unit 24 stores the decoded image input from the adding unit 23.

動きベクトル検出部25は、復号画像記憶部24に記憶された参照画像(復号画像)を動きベクトル検出対象として、探索範囲記憶部28に記憶された動きベクトル探索範囲を探索して動きベクトルを検出する。なお、動きベクトル検出方法には、ブロックマッチング法、勾配法、位相相関法、これらの高速化手法など数多くの方法があるが、符号化側と同じ動きベクトルを得るために、符号化側で用いる動きベクトル検出方法と同じ検出方法を用いる。   The motion vector detection unit 25 detects a motion vector by searching the motion vector search range stored in the search range storage unit 28 using the reference image (decoded image) stored in the decoded image storage unit 24 as a motion vector detection target. To do. There are many motion vector detection methods, such as a block matching method, gradient method, phase correlation method, and speeding-up methods thereof, but these are used on the encoding side in order to obtain the same motion vector as the encoding side. The same detection method as the motion vector detection method is used.

動き補償部26は、復号画像記憶部24から入力される参照画像に対して、動きベクトル検出部25から入力される動きベクトルを用いて動き補償を行い、その結果得られた予測画像を加算部23に出力する。   The motion compensation unit 26 performs motion compensation on the reference image input from the decoded image storage unit 24 using the motion vector input from the motion vector detection unit 25, and adds the predicted image obtained as a result to the addition unit. To 23.

量子化ステップ幅判定部27は、可変長復号部21から入力される量子化ステップ幅の大きさを判定し、量子化ステップ幅から動きベクトル探索範囲を決定する。   The quantization step width determination unit 27 determines the size of the quantization step width input from the variable length decoding unit 21, and determines a motion vector search range from the quantization step width.

探索範囲記憶部28は、量子化ステップ幅判定部27から入力される動きベクトル探索範囲を記憶する。   The search range storage unit 28 stores the motion vector search range input from the quantization step width determination unit 27.

次に、このように構成される復号装置2の動作について、図6を参照して説明する。図6は、復号装置2の動作を示すフローチャートである。   Next, the operation of the decoding apparatus 2 configured as described above will be described with reference to FIG. FIG. 6 is a flowchart showing the operation of the decoding device 2.

ステップS201にて、可変長復号部21により、入力される符号化ビットストリームに可変長復号処理を施し、量子化ステップ幅を取得する。   In step S201, the variable length decoding unit 21 performs a variable length decoding process on the input encoded bitstream to obtain a quantization step width.

ステップS202にて、可変長復号部21により、入力される符号化ビットストリームに可変長復号処理を施し、差分画像の圧縮情報を取得する。   In step S202, the variable-length decoding unit 21 performs variable-length decoding processing on the input encoded bitstream, and acquires compression information of the difference image.

ステップS203にて、画像復号部22により、可変長復号部21にて取得した差分画像の圧縮画像を伸張して復号画像を生成する。   In step S <b> 203, the image decoding unit 22 decompresses the compressed image of the difference image acquired by the variable length decoding unit 21 to generate a decoded image.

ステップS204にて、量子化ステップ幅判定部27により、ステップS201にて取得された量子化ステップ幅を判定し、量子化ステップ幅が変更された領域を動きベクトル探索範囲と決定する。上述したように、符号化装置1は新たな動きベクトル探索範囲内の量子化ステップ幅を元の値よりも小さな値に変更するのが好適であり、復号装置2がかかる好適な形態の符号化装置1から符号化ストリームを受信した場合には、量子化ステップ幅が小さい領域を動きベクトル探索範囲と決定する。   In step S204, the quantization step width determination unit 27 determines the quantization step width acquired in step S201, and determines a region in which the quantization step width is changed as a motion vector search range. As described above, it is preferable that the encoding apparatus 1 changes the quantization step width in the new motion vector search range to a value smaller than the original value, and the decoding apparatus 2 performs encoding in such a preferable form. When an encoded stream is received from the apparatus 1, an area having a small quantization step width is determined as a motion vector search range.

量子化ステップ幅の大きさの判定は、所定の閾値を超えるか否かで判定したり、復号中のフレームの量子化ステップ幅の最小値に対する比率が所定の閾値を超えるか否かで判定したり、量子化ステップ幅の小さい順に動きベクトル探索範囲としたときに動きベクトル探索範囲のフレーム全体に締める割合が所定の閾値を超えるか否かで判定する、など様々な方法で判定することが可能である。また、判定方法や判定に用いる閾値は、予め決めておいても良いし、フレーム毎又はシーケンス毎に伝送してもよい。   The size of the quantization step width is determined by whether or not a predetermined threshold is exceeded, or by whether or not the ratio of the frame being decoded to the minimum quantization step width exceeds a predetermined threshold. Can be determined by various methods, such as determining whether the ratio of fastening to the entire frame of the motion vector search range exceeds a predetermined threshold when the motion vector search range is set in ascending order of quantization step width. It is. Further, the determination method and the threshold used for the determination may be determined in advance, or may be transmitted for each frame or each sequence.

ステップS205にて、動きベクトル検出部25により、復号画像記憶部24から参照画像を読み出し、参照画像に対して、探索範囲記憶部28に記憶された動きベクトル探索範囲を設定し、動きベクトルを検出する。   In step S205, the motion vector detection unit 25 reads the reference image from the decoded image storage unit 24, sets the motion vector search range stored in the search range storage unit 28 for the reference image, and detects the motion vector. To do.

ステップS206にて、動き補償部26により、ステップS204にて検出された動きベクトルを用いて動き補償を行い、予測画像を生成する。   In step S206, the motion compensation unit 26 performs motion compensation using the motion vector detected in step S204, and generates a predicted image.

ステップS207にて、加算部23により、ステップS205にて生成された差分画像の復号画像と、動き補償部26から入力される予測画像とを加算して復号画像を生成する。   In step S207, the addition unit 23 adds the decoded image of the difference image generated in step S205 and the predicted image input from the motion compensation unit 26 to generate a decoded image.

復号画像を参照して動きベクトル検出を行うとき、復号画像の符号化劣化が少ない方が動きベクトルの検出精度は向上する。符号化劣化は、量子化ステップ幅が小さい程低減する。復号装置2は、量子化ステップ幅が小さい領域のみを動きベクトル探索範囲とするため、動きベクトルの検出精度を向上させることができる。さらに本発明によれば、動きベクトルが参照する領域は、量子化ステップ幅が小さく符号化劣化が少ないため、復号画像の画質を向上させることができる。   When motion vector detection is performed with reference to a decoded image, the accuracy of motion vector detection is improved when the decoding degradation of the decoded image is small. Coding degradation decreases as the quantization step width decreases. Since the decoding apparatus 2 uses only a region having a small quantization step width as a motion vector search range, it is possible to improve motion vector detection accuracy. Furthermore, according to the present invention, since the region referred to by the motion vector has a small quantization step width and little coding deterioration, the image quality of the decoded image can be improved.

ここで、符号化装置1として機能させるために、コンピュータを好適に用いることができ、コンピュータに、CPUによって所定のプログラムを実行させることにより、減算部10と、画像圧縮部11と、画像復号部12と、加算部13と、復号画像記憶部14と、動きベクトル検出部15と、動き補償部16と、量子化ステップ幅決定部17と、探索範囲記憶部18と、可変長符号化部19の有する機能を実現させることができる。   Here, in order to function as the encoding device 1, a computer can be suitably used. By causing the computer to execute a predetermined program, the subtraction unit 10, the image compression unit 11, and the image decoding unit 12, an addition unit 13, a decoded image storage unit 14, a motion vector detection unit 15, a motion compensation unit 16, a quantization step width determination unit 17, a search range storage unit 18, and a variable length encoding unit 19 It is possible to realize the functions of

同様に、復号装置2として機能させるために、コンピュータを好適に用いることができ、コンピュータに、CPUによって所定のプログラムを実行させることにより、可変長復号部21と、画像復号部22と、加算部23と、復号画像記憶部24と、動きベクトル検出部25と、動き補償部26と、量子化ステップ幅判定部27と、探索範囲記憶部28の有する各機能を実現させることができる。   Similarly, a computer can be suitably used for causing the computer to function as the decoding device 2, and by causing the computer to execute a predetermined program by the CPU, the variable length decoding unit 21, the image decoding unit 22, and the addition unit 23, the decoded image storage unit 24, the motion vector detection unit 25, the motion compensation unit 26, the quantization step width determination unit 27, and the search range storage unit 28 can be realized.

上述の実施例は、代表的な例として説明したが、本発明の趣旨及び範囲内で、多くの変更及び置換ができることは当業者に明らかである。従って、本発明は、上述の実施例によって制限するものと解するべきではなく、特許請求の範囲から逸脱することなく、種々の変形や変更が可能である。   Although the above embodiments have been described as representative examples, it will be apparent to those skilled in the art that many changes and substitutions can be made within the spirit and scope of the invention. Therefore, the present invention should not be construed as being limited by the above-described embodiments, and various modifications and changes can be made without departing from the scope of the claims.

このように、本発明によれば、動きベクトル探索範囲を適応的に制限することができるので、画像や映像を効率良く符号化、復号する任意の用途に有用である。   As described above, according to the present invention, the motion vector search range can be adaptively limited, which is useful for any application for efficiently encoding and decoding images and videos.

1 符号化装置
2 復号装置
10 減算部
11 画像圧縮部
12 画像復号部
13 加算部
14 復号画像記憶部
15 動きベクトル検出部
16 動き補償部
17 量子化ステップ幅決定部
18 探索範囲記憶部
19 可変長符号化部
21 可変長復号部
22 画像復号部
23 加算部
24 復号画像記憶部
25 動きベクトル検出部
26 動き補償部
27 量子化ステップ幅判定部
28 探索範囲記憶部
DESCRIPTION OF SYMBOLS 1 Encoding apparatus 2 Decoding apparatus 10 Subtraction part 11 Image compression part 12 Image decoding part 13 Addition part 14 Decoded image memory | storage part 15 Motion vector detection part 16 Motion compensation part 17 Quantization step width determination part 18 Search range memory | storage part 19 Variable length Encoding unit 21 Variable length decoding unit 22 Image decoding unit 23 Addition unit 24 Decoded image storage unit 25 Motion vector detection unit 26 Motion compensation unit 27 Quantization step width determination unit 28 Search range storage unit

Claims (8)

画像を圧縮して量子化ステップ幅及び量子化された画像データを含む符号化ストリームを送信する符号化装置であって、
参照画像を探索して動きベクトルを検出する動きベクトル検出部と、
原画像から前記動きベクトルに基づく予測画像を差し引いた差分画像を、所定の量子化ステップ幅を用いて圧縮する画像圧縮部と、
前記動きベクトルの参照領域内の量子化ステップ幅を更新する量子化ステップ幅決定部と、を備え、
前記量子化ステップ幅決定部は、所定の条件を満たすまで、前記動きベクトルの参照領域の量子化ステップ幅を更新し、
前記画像圧縮部は、前記原画像を圧縮した後に、前記量子化ステップ幅決定部によって量子化ステップ幅が更新される度に、該更新された量子化ステップ幅を用いて前記参照画像を圧縮し、
前記動きベクトル検出部は、前記画像圧縮部によって前記参照画像が圧縮される度に、該圧縮された参照画像を復号した画像を参照して動きベクトルを検出する
ことを特徴とする符号化装置。
An encoding device for compressing an image and transmitting an encoded stream including a quantization step width and quantized image data,
A motion vector detection unit that searches for a reference image and detects a motion vector;
An image compression unit that compresses a difference image obtained by subtracting a predicted image based on the motion vector from an original image using a predetermined quantization step width;
A quantization step width determination unit that updates a quantization step width in a reference region of the motion vector, and
The quantization step width determination unit updates the quantization step width of the reference region of the motion vector until a predetermined condition is satisfied,
The image compression unit compresses the reference image using the updated quantization step width every time the quantization step width is updated by the quantization step width determination unit after compressing the original image. ,
The motion vector detection unit detects a motion vector with reference to an image obtained by decoding the compressed reference image every time the reference image is compressed by the image compression unit.
前記所定の条件は、前記動きベクトルの検出回数が所定回数以上であるという条件か、又は前記反復して検出された動きベクトルの参照領域が直前に検出された動きベクトルの参照領域に含まれるという条件であることを特徴とする、請求項1に記載の符号化装置。   The predetermined condition is that the number of detections of the motion vector is a predetermined number or more, or the reference region of the motion vector detected repeatedly is included in the reference region of the motion vector detected immediately before. The encoding apparatus according to claim 1, wherein the condition is a condition. 前記量子化ステップ幅決定部は、前記動きベクトルの参照領域の量子化ステップ幅を元の値よりも小さな値に更新することを特徴とする、請求項1又は2に記載の符号化装置。   The encoding apparatus according to claim 1, wherein the quantization step width determination unit updates a quantization step width of a reference region of the motion vector to a value smaller than an original value. 量子化ステップ幅及び量子化された画像データを含む符号化ストリームを受信して画像を復号する復号装置であって、
前記符号化ストリームから量子化ステップ幅を取得し、該量子化ステップ幅を用いて、前記量子化された画像データから画像を復号する画像復号部と、
前記量子化ステップ幅の大きさを判定し、該判定結果に基づいて動きベクトル探索範囲を決定する量子化ステップ幅判定部と、
参照画像における前記動きベクトル探索範囲内を探索して動きベクトルを検出する動きベクトル検出部と、
を備えることを特徴とする復号装置。
A decoding device for receiving an encoded stream including a quantization step width and quantized image data and decoding an image,
An image decoding unit that obtains a quantization step width from the encoded stream and uses the quantization step width to decode an image from the quantized image data;
A quantization step width determination unit that determines the size of the quantization step width and determines a motion vector search range based on the determination result;
A motion vector detection unit for detecting a motion vector by searching within the motion vector search range in a reference image;
A decoding apparatus comprising:
前記量子化ステップ幅判定部は、量子化ステップ幅が所定の閾値より小さいか否かを判定し、量子化ステップ幅が所定の閾値より小さい領域を前記動きベクトル探索範囲と決定することを特徴とする、請求項4に記載の復号装置。   The quantization step width determination unit determines whether or not the quantization step width is smaller than a predetermined threshold, and determines an area where the quantization step width is smaller than the predetermined threshold as the motion vector search range. The decoding device according to claim 4. 前記量子化ステップ幅判定部は、前記動きベクトル探索範囲のフレーム全体に締める割合が所定の閾値を超えるまで、前記量子化ステップ幅の小さい領域から順に前記動きベクトル探索範囲と決定することを特徴とする、請求項4に記載の復号装置。   The quantization step width determination unit determines the motion vector search range in order from the region with the smallest quantization step width until the ratio of fastening to the entire frame of the motion vector search range exceeds a predetermined threshold. The decoding device according to claim 4. 画像を圧縮して量子化ステップ幅及び量子化された画像データを含む符号化ストリームを送信する符号化装置として機能するコンピュータに、
(a)参照画像を探索して動きベクトルを検出するステップと、
(b)原画像から前記動きベクトルに基づく予測画像を差し引いた差分画像を、所定の量子化ステップ幅を用いて圧縮するステップと、
(c)所定の条件を満たすまで、前記動きベクトルの参照領域内の量子化ステップ幅を更新するステップと、
(d)前記ステップ(a)の後に、前記ステップ(c)によって量子化ステップ幅が更新される度に、該更新された量子化ステップ幅を用いて前記参照画像を圧縮するステップと、
(e)前記ステップ(d)によって前記参照画像が圧縮される度に、該圧縮された参照画像を復号した画像を参照して動きベクトルを検出するステップと、
を実行させるためのプログラム。
To a computer functioning as an encoding device that compresses an image and transmits an encoded stream including a quantization step width and quantized image data,
(A) searching for a reference image to detect a motion vector;
(B) compressing a difference image obtained by subtracting a predicted image based on the motion vector from an original image using a predetermined quantization step width;
(C) updating a quantization step width in a reference region of the motion vector until a predetermined condition is satisfied;
(D) After the step (a), each time the quantization step width is updated by the step (c), the step of compressing the reference image using the updated quantization step width;
(E) detecting a motion vector with reference to an image obtained by decoding the compressed reference image every time the reference image is compressed in the step (d);
A program for running
量子化ステップ幅及び量子化された画像データを含む符号化ストリームを受信して画像を復号する復号装置として機能するコンピュータに、
(a)前記符号化ストリームから量子化ステップ幅を取得し、該量子化ステップ幅を用いて、前記量子化された画像データから画像を復号するステップと、
(b)前記量子化ステップ幅の大きさを判定し、該判定結果に基づいて動きベクトル探索範囲を決定するステップと、
(c)参照画像における前記動きベクトル探索範囲内を探索して動きベクトルを検出するステップと、
を実行させるためのプログラム。
A computer functioning as a decoding device that receives an encoded stream including a quantization step width and quantized image data and decodes the image;
(A) obtaining a quantization step width from the encoded stream, and decoding the image from the quantized image data using the quantization step width;
(B) determining a size of the quantization step width, and determining a motion vector search range based on the determination result;
(C) searching a motion vector search range in a reference image to detect a motion vector;
A program for running
JP2011011054A 2011-01-21 2011-01-21 Encoding device, decoding device, and program Expired - Fee Related JP5498972B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011011054A JP5498972B2 (en) 2011-01-21 2011-01-21 Encoding device, decoding device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011011054A JP5498972B2 (en) 2011-01-21 2011-01-21 Encoding device, decoding device, and program

Publications (2)

Publication Number Publication Date
JP2012156575A true JP2012156575A (en) 2012-08-16
JP5498972B2 JP5498972B2 (en) 2014-05-21

Family

ID=46837905

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011011054A Expired - Fee Related JP5498972B2 (en) 2011-01-21 2011-01-21 Encoding device, decoding device, and program

Country Status (1)

Country Link
JP (1) JP5498972B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07336695A (en) * 1994-06-13 1995-12-22 Oki Electric Ind Co Ltd Method for encoding and decoding moving picture
JPH09121355A (en) * 1995-10-25 1997-05-06 Oki Electric Ind Co Ltd Moving image coding/decoding device
JP2001508632A (en) * 1997-11-17 2001-06-26 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Motion compensated prediction image coding and decoding
WO2006000504A1 (en) * 2004-06-24 2006-01-05 Thomson Licensing Method and apparatus for generating coded picture data and for decoding coded picture data
JP2007043651A (en) * 2005-07-05 2007-02-15 Ntt Docomo Inc Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program, dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program
WO2008082158A1 (en) * 2007-01-03 2008-07-10 Samsung Electronics Co., Ltd. Method and apparatus for estimating motion vector using plurality of motion vector predictors, encoder, decoder, and decoding method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07336695A (en) * 1994-06-13 1995-12-22 Oki Electric Ind Co Ltd Method for encoding and decoding moving picture
JPH09121355A (en) * 1995-10-25 1997-05-06 Oki Electric Ind Co Ltd Moving image coding/decoding device
JP2001508632A (en) * 1997-11-17 2001-06-26 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Motion compensated prediction image coding and decoding
WO2006000504A1 (en) * 2004-06-24 2006-01-05 Thomson Licensing Method and apparatus for generating coded picture data and for decoding coded picture data
JP2007043651A (en) * 2005-07-05 2007-02-15 Ntt Docomo Inc Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program, dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program
WO2008082158A1 (en) * 2007-01-03 2008-07-10 Samsung Electronics Co., Ltd. Method and apparatus for estimating motion vector using plurality of motion vector predictors, encoder, decoder, and decoding method

Also Published As

Publication number Publication date
JP5498972B2 (en) 2014-05-21

Similar Documents

Publication Publication Date Title
EP2805499B1 (en) Video decoder, video encoder, video decoding method, and video encoding method
US8315309B2 (en) Method and apparatus for encoding and decoding an image by using consecutive motion estimation
JP5277257B2 (en) Video decoding method and video encoding method
JP6423061B2 (en) Computing device and method for implementing video decoder
US20020009143A1 (en) Bandwidth scaling of a compressed video stream
US20070280353A1 (en) Picture coding device
CA2806523C (en) Method and apparatus for providing complexity balanced entropy coding
JP2007124408A (en) Motion vector detector and motion vector detecting method
JP2011029863A (en) Decoding processing method
JP5613319B2 (en) Video encoding apparatus, video encoding method, and video encoding program
JP2019110376A (en) Decode error detection estimation device, video decoding device, and program for the devices
JP5498972B2 (en) Encoding device, decoding device, and program
JP5832263B2 (en) Image coding apparatus and image coding method
JP5809574B2 (en) Encoding method, decoding method, encoding device, decoding device, encoding program, and decoding program
JP5281597B2 (en) Motion vector prediction method, motion vector prediction apparatus, and motion vector prediction program
JP5913911B2 (en) Image encoding device
JP2014017621A (en) Video compression format converter, video compression format conversion method and program
JP5561611B2 (en) Image coding method, image coding apparatus, and image coding program
KR100757831B1 (en) Method for compressing moving picture using 1/4 pixel motion vector
JP2012095099A (en) Moving image encoding device, moving image encoding method, moving image encoding program, moving image decoding device, moving image decoding method, and moving image decoding program
JP5276957B2 (en) Video coding method and apparatus
JPWO2009128208A1 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, and moving picture decoding method
KR20060083963A (en) Method for compressing moving picture using 1/4 pixel motion vector
JP2004350072A (en) Image coder, image coding method, image coding program and recording medium with the program recorded thereon
JP2004080682A (en) Moving image data coding device, moving image data decoding device, and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140203

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140310

R150 Certificate of patent or registration of utility model

Ref document number: 5498972

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees