JP4403549B2 - Moving picture coding apparatus and moving picture coding program - Google Patents

Moving picture coding apparatus and moving picture coding program Download PDF

Info

Publication number
JP4403549B2
JP4403549B2 JP2004267895A JP2004267895A JP4403549B2 JP 4403549 B2 JP4403549 B2 JP 4403549B2 JP 2004267895 A JP2004267895 A JP 2004267895A JP 2004267895 A JP2004267895 A JP 2004267895A JP 4403549 B2 JP4403549 B2 JP 4403549B2
Authority
JP
Japan
Prior art keywords
image
value
motion vector
frame memory
encoding
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.)
Expired - Fee Related
Application number
JP2004267895A
Other languages
Japanese (ja)
Other versions
JP2006086684A (en
Inventor
太 椿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2004267895A priority Critical patent/JP4403549B2/en
Publication of JP2006086684A publication Critical patent/JP2006086684A/en
Application granted granted Critical
Publication of JP4403549B2 publication Critical patent/JP4403549B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、動き補償フレーム間予測符号化に係り、特に符号化された参照画像(Iピクチャ及びPピクチャ)と、その参照画像の次に配置される参照画像との間隔を最適に設定し、過去及び未来のそれぞれの参照画像の間の画像を動き補償画像(Bピクチャ)として符号化する動画像符号化装置及び動画像符号化用プログラムに関する。   The present invention relates to motion compensation inter-frame predictive coding, and in particular, optimally sets an interval between a coded reference image (I picture and P picture) and a reference image arranged next to the reference image, The present invention relates to a moving picture coding apparatus and a moving picture coding program for coding a picture between past and future reference pictures as a motion compensated picture (B picture).

映像信号の圧縮符号化方式には、変換符号化の他に時間方向の冗長性を削減するフレーム間予測符号化の技術が用いられる。フレーム間予測には過去のフレームと現在のフレーム間の動き検出をして過去のフレームから現在のフレームの信号を生成する前方向予測と、未来のフレームと現在のフレームとの動きを検出して未来のフレームから現在のフレームを生成する後方向予測とがある。MPEG(moving picture experts group)で規定する符号化方式では、I(Intra-coded)ピクチャ、P(Predictive-coded)、及びB(Bidirectionally predictive-coded)の3種類のピクチャが用いられる。符号化されるピクチャは通常ではI、B、B、P、B、B、P、・・・の順に配置される。ここでBピクチャはその前及び後に配置されるIピクチャ及び/又はPピクチャを参照画像とし、双方向予測により符号化される。ここで、参照画像とその次に配列される参照画像との間の間隔をフレーム数を単位とする数により、M値と呼んでいる。通常のM値は3に設定されるが、動きの激しい画像の場合は3より小さなM値を用いる方が高い符号化効率が得られる。   In addition to transform coding, inter-frame prediction coding technology that reduces temporal redundancy is used as a compression coding method for video signals. For inter-frame prediction, it detects the motion between the past frame and the current frame and generates the current frame signal from the past frame, and detects the motion between the future frame and the current frame. There is backward prediction that generates the current frame from the future frame. In an encoding method defined by MPEG (moving picture experts group), three types of pictures are used: I (Intra-coded) picture, P (Predictive-coded), and B (Bidirectionally predictive-coded). The pictures to be encoded are usually arranged in the order of I, B, B, P, B, B, P,. Here, the B picture is encoded by bi-directional prediction using the I picture and / or P picture arranged before and after the B picture as a reference picture. Here, the interval between the reference image and the reference image arranged next is called an M value by a number in units of frames. The normal M value is set to 3, but in the case of an image with intense motion, higher encoding efficiency can be obtained by using an M value smaller than 3.

特許文献1には、入力されたビデオ信号を数フレーム分保持するメモリを有し、そのメモリに記憶されビデオ信号をPピクチャー間隔判定/制御部を用いてPピクチャの間隔を判定する。その判定されたPピクチャの間隔情報に基づいて、動きの速い画像の視覚的な特性を検出し、動きの速いフレームをP又はIピクチャーで符号化するよう指示する。即ち、通常のM値よりも小さなM値を用いることにより、符号化効率を向上させ、画質を向上させるようにした画像符号化装置の構成が開示されている。
特開2002−10270号公報
Japanese Patent Application Laid-Open No. H10-228561 has a memory for holding an input video signal for several frames, and the P signal interval is determined using the P picture interval determination / control unit stored in the memory. Based on the determined interval information of the P picture, the visual characteristic of the fast moving image is detected, and an instruction is given to encode the fast moving frame with the P or I picture. That is, a configuration of an image encoding device is disclosed in which the encoding efficiency is improved and the image quality is improved by using an M value smaller than a normal M value.
JP 2002-10270 A

しかしながら、通常の符号化では、上記のピクチャの配置をI1、B2、B3、P4、B5、B6、P7、B8、・・・として配置するとき、I1を用いてP4の片方向動き予測を行うときに求められる動きベクトルを基に次のPピクチャまでの間隔(M値)が設定される。M値が変更されるのはB5からである。従って、仮にI1以降で激しい動きベクトルが検出される場合であってもB5からP7の間でしかM値の変更に対応した配置とされなく、B2で激しい動きベクトルが検出される場合であってもI1の直後からM値を変更した高画質の符号化信号を得ることは出来なかった。   However, in normal encoding, when the picture arrangement is arranged as I1, B2, B3, P4, B5, B6, P7, B8,..., P4 one-way motion prediction is performed using I1. An interval (M value) to the next P picture is set based on a motion vector that is sometimes obtained. The M value is changed from B5. Therefore, even if a severe motion vector is detected after I1, it is only arranged between B5 and P7 in correspondence with the change of the M value, and a severe motion vector is detected at B2. However, it was impossible to obtain a high-quality encoded signal in which the M value was changed immediately after I1.

特許文献1に開示されている画像符号化装置では、数フレームのメモリを符号化装置の入力回路に設けているため、激しい動きベクトルが検出された直後からM値を変更した符号化信号は得られるものの、符号化装置の入力回路に配置される数フレームのメモリによる遅延時間のために符号化信号は数フレーム遅延した後にしか得ることが出来ない。従って、激しい動きベクトルが検出された直後からM値を変更した高画質の符号化信号を得ることは出来なかった。   In the image encoding device disclosed in Patent Document 1, since a memory of several frames is provided in the input circuit of the encoding device, an encoded signal in which the M value is changed immediately after a severe motion vector is detected is obtained. However, the encoded signal can be obtained only after a delay of several frames due to the delay time by the memory of several frames arranged in the input circuit of the encoding device. Therefore, it is impossible to obtain a high-quality encoded signal in which the M value is changed immediately after the intense motion vector is detected.

そこで、本発明は、上記のような問題点を解消するためになされたもので、激しい動きベクトルが検出された直後からでもM値(参照用画像の間隔)を変更した高画質の符号化信号を、最小の遅延時間で得ることの出来る動画像符号化装置及び動画像符号化用プログラムを提供することを目的とする。   Therefore, the present invention has been made to solve the above-described problems, and a high-quality encoded signal in which the M value (interval of reference images) is changed even immediately after a severe motion vector is detected. It is an object of the present invention to provide a moving picture coding apparatus and a moving picture coding program capable of obtaining the above with a minimum delay time.

そこで、本発明は、上記課題を解決するために以下の装置及びプログラムを提供するものである。
(1)入力画像を格納する第1フレームメモリと、
前記入力画像を動き予測符号化を用いて符号化する際に用いる画像である参照画像を格納する第2フレームメモリと、
前記第2フレームメモリに格納されている参照画像に基づいて、前記第1フレームメモリに格納されている前記入力画像の動きベクトルを求める動きベクトル検出手段と、
前記動きベクトル検出手段で求められた前記入力画像の動きベクトルが所定値よりも小さく、かつ同一方向である場合は、記参照画像と次の参照画像との間隔を示すM値を予め設定された所定値とし、前記入力画像の動きベクトルが所定値よりも大きく、かつ異なる方向である場合は、前記M値を前記所定値よりも小さい値とするM値算出決定手段と、
前記M値算出決定手段から出力された前記M値を用いて、前記第2フレームメモリに格納されている参照画像の次の参照画像を決定するとともに、この決定した参照画像を用いて前記動き予測符号化を行う符化手段と、
からなることを特徴とする動画像符号化装置
(2)制御手段を、
力画を第1フレームメモリに格納させる手段と、
前記入力画像を動き予測符号化を用いて符号化する際に用いる画像である参照画像を第2フレームメモリに格納させる手段と、
前記第2フレームメモリに格納されている参照画像に基づいて、前記第1フレームメモリに格納されている前記入力画像の動きベクトルを求める動きベクトル検出手段と、
前記動きベクトル検出手段で求められた前記入力画像の動きベクトルが所定値よりも小さく、かつ同一方向である場合は、記参照画像と次の参照画像との間隔を示すM値を予め設定された所定値とし、前記入力画像の動きベクトルが所定値よりも大きく、かつ異なる方向である場合は、前記M値を前記所定値よりも小さい値とするM値算出決定手段と、
前記M値算出決定手段から出力された前記M値を用いて、前記第2フレームメモリに格納されている参照画像の次の参照画像を決定するとともに、この決定した参照画像を用いて前記動き予測符号化を行う符化手
として機能させるための動画像符号化プログラム
(3)前記M値を決定するために用いた前記動きベクトルを保持する記憶手段を更に有し、
前記符号化手段は、前記第1フレームメモリに格納されている入力画像の符号化を行なう際に、前記記憶手段に記憶された前記動きベクトルを再利用することを特徴とする上記(1)記載の動画像符号化装置。
(4)前記制御手段を、更に、
前記M値を決定するために用いた前記動きベクトルを記憶手段に記憶させる手段として機能させ、
前記符号化手段は、前記第1フレームメモリに格納されている入力画像の符号化を行なう際に、前記記憶手段に記憶された前記動きベクトルを再利用することを特徴とする上記(2)記載の動画像符号化プログラム。
Therefore, the present invention provides the following apparatus and program in order to solve the above problems.
(1) a first frame memory for storing an input image ;
A second frame memory for storing a reference image that is an image used when the input image is encoded using motion prediction encoding ;
A motion vector detection means based on the stored have that references images in the second frame memory, a motion vector is obtained for the entering Chikaraga image stored in the first frame memory,
The motion motion vector of the vector before obtained by the detection means complete Chikaraga image is smaller than the predetermined value, and if it is the same direction, the pre-M value indicating the distance between hexane irradiation image and the next reference image a preset predetermined value, if the motion vector of the entering Chikaraga image is larger than a predetermined value, and a different direction, and the M value calculation determination means for the M value and a value smaller than the predetermined value ,
A reference image next to a reference image stored in the second frame memory is determined using the M value output from the M value calculation determining means, and the motion prediction is performed using the determined reference image. encoding a row cormorant sign-catheter stage,
Video encoding apparatus characterized by comprising the.
(2) Control means
And means for storing the input Chikaraga image in the first frame memory,
Means for storing, in the second frame memory , a reference image that is an image used when the input image is encoded using motion prediction encoding ;
A motion vector detection means based on the stored have that references images in the second frame memory, a motion vector is obtained for the entering Chikaraga image stored in the first frame memory,
The motion motion vector of the vector before obtained by the detection means complete Chikaraga image is smaller than the predetermined value, and if it is the same direction, the pre-M value indicating the distance between hexane irradiation image and the next reference image a preset predetermined value, if the motion vector of the entering Chikaraga image is larger than a predetermined value, and a different direction, and the M value calculation determination means for the M value and a value smaller than the predetermined value ,
A reference image next to a reference image stored in the second frame memory is determined using the M value output from the M value calculation determining means, and the motion prediction is performed using the determined reference image. video encoding program for operating encoded as rows cormorants sign-catheter stage.
(3) further comprising storage means for holding the motion vector used for determining the M value;
(1) In the above (1), the encoding means reuses the motion vector stored in the storage means when encoding the input image stored in the first frame memory. Video encoding device.
(4) The control means further includes
Function as means for storing in the storage means the motion vector used to determine the M value;
The above (2), wherein the encoding means reuses the motion vector stored in the storage means when encoding the input image stored in the first frame memory. Video encoding program.

本発明によれば、激しい動きベクトルが検出された直後からでもM値を変更した高画質な符号化信号を、最小の遅延時間で得ることの出来る動画像符号化装置及び動画像符号化プログラムを実現できる。
According to the present invention, fierce motion a high quality coded signal changing the M value even immediately after the vector has been detected, the minimum possible to obtain a delay time video encoding apparatus capable of and Video Coding Cap Program.

以下に本発明の実施例に係る動画像符号化装置について図1〜図5を用いて説明する。
図1は、本発明の実施に係る動画像符号化装置の構成例を示すブロック図である。
図2は、本発明の実施に係る最適M値の決定に係る動作を示すフローチャートの図である。
図3は、本発明の実施に係る動きベクトルとM値との関係を示す図である。
図4は、本発明の実施に係るM値の決定方法を説明するための図である。
図5は、本発明の実施に係る最適M値を用いる符号化の動作を示すフローチャートの図である。
A video encoding apparatus according to an embodiment of the present invention will be described below with reference to FIGS.
FIG. 1 is a block diagram illustrating a configuration example of a moving image encoding apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart showing an operation related to the determination of the optimum M value according to the embodiment of the present invention.
FIG. 3 is a diagram showing the relationship between the motion vector and the M value according to the embodiment of the present invention.
FIG. 4 is a diagram for explaining a method of determining the M value according to the embodiment of the present invention.
FIG. 5 is a flowchart showing an encoding operation using the optimum M value according to the embodiment of the present invention.

動画像符号化装置の構成について述べる。
図1に示す動画像符号化装置は、フレームメモリ11、動き予測部(ME)12、動き予測結果保持部13、M値候補算出部14、M値判定部15、符号化画像決定部16、減算部18、DCT(discrete cosine transform)部21、量子化部22、逆量子化部23、逆DCT部24、加算部25、フレームメモリ26、動き補償部(MC)27、符号化部28、及びMV(motion vector)符号量カウント部29より構成される。
フレームメモリ11には映像信号が入力される。符号化部28からは圧縮符号化信号が出力される。
The configuration of the moving picture coding apparatus will be described.
1 includes a frame memory 11, a motion prediction unit (ME) 12, a motion prediction result holding unit 13, an M value candidate calculation unit 14, an M value determination unit 15, an encoded image determination unit 16, A subtracting unit 18, a DCT (discrete cosine transform) unit 21, a quantizing unit 22, an inverse quantizing unit 23, an inverse DCT unit 24, an adding unit 25, a frame memory 26, a motion compensating unit (MC) 27, an encoding unit 28, And an MV (motion vector) code amount counting unit 29.
A video signal is input to the frame memory 11. The encoding unit 28 outputs a compressed encoded signal.

動画像符号化装置の動作について述べる。
まず、フレームメモリ11に入力された映像信号は、そこに一時記憶される。符号化画像決定部16では最初に入力された映像信号のピクチャ(画像)は参照画像であるI(Intra-coded)ピクチャとして処理することが決定される。その画像はDCT部21に入力され、そこでDCT変換され、量子化部22で量子化される。量子化して得られる信号の一部は符号化部28で可変長符号化がなされて出力されると共に、他の一部は逆量子化部23で逆量子化され、逆DCT部24で逆量子化されて得られる復号画像は加算部25を介してフレームメモリ26に入力され、そこに記憶される。
The operation of the moving picture coding apparatus will be described.
First, the video signal input to the frame memory 11 is temporarily stored therein. The encoded image determination unit 16 determines to process the picture (image) of the video signal input first as an I (Intra-coded) picture that is a reference image. The image is input to the DCT unit 21 where it is DCT transformed and quantized by the quantization unit 22. A part of the signal obtained by quantization is subjected to variable length coding by the encoding unit 28 and is output, and the other part is inversely quantized by the inverse quantization unit 23, and the inverse DCT unit 24 performs inverse quantization. The decoded image obtained by the conversion is input to the frame memory 26 via the adding unit 25 and stored therein.

次に、フレームメモリ11には、符号化画像決定部16により仮に動き補償画像とされる映像信号のピクチャ(画像)が一時記憶される。動き予測部12には一時記憶された画像が入力され、入力された画像はフレームメモリ26に記憶されている参照画像との間で動きベクトルが求められる。求められた動きベクトルは動き補償部27に入力されると共に動き予測結果保持部13に入力され、そこに保持(記憶)される。M値候補算出部14には動き予測結果保持部13に記憶される動きベクトルが入力される。M値候補算出部14では入力された動きベクトルの動き量が小さいか又は大きいか、大きい場合にはベクトルの方向がお互いに同じ方向を向いているか、又はお互いに異なる方向を向いているかが検出される。検出された動きベクトルが小さい場合、及び大きいが同じ方向を向いている場合はM値を変更しないものとするM値候補を出力する。M値候補算出部14で算出されたM値候補はM値判定部15を介して符号化画像決定部16に供給される。   Next, in the frame memory 11, a picture (image) of a video signal that is temporarily set as a motion compensated image by the encoded image determination unit 16 is temporarily stored. A temporarily stored image is input to the motion prediction unit 12, and a motion vector is obtained between the input image and a reference image stored in the frame memory 26. The obtained motion vector is input to the motion compensation unit 27 and also input to the motion prediction result holding unit 13 and held (stored) therein. A motion vector stored in the motion prediction result holding unit 13 is input to the M value candidate calculation unit 14. The M-value candidate calculation unit 14 detects whether the motion amount of the input motion vector is small, large, or large, and whether the vector directions are the same or different from each other. Is done. When the detected motion vector is small and when it is large but facing the same direction, an M value candidate that does not change the M value is output. The M value candidates calculated by the M value candidate calculation unit 14 are supplied to the encoded image determination unit 16 via the M value determination unit 15.

符号化画像決定部16によりフレームメモリ11に記憶されているピクチャは動き予測画像として処理するための画像として取得され、減算部18の一方に入力される。減算部18の他方には、動き予測部12により求められた動きベクトルとフレームメモリ26に記憶されている参照画像とを基に動き補償部27で生成された動き補償画像が入力される。減算部18で減算して得られる参照画像との差の画像信号成分は上記と同様にDCT、量子化及び可変長符号化されて符号化出力信号が生成されると共に符号化に用いられた動きベクトルと共に出力される。MV符号量カウント部29では、符号化信号と共に出力される動きベクトルの符号量を算出する。   The picture stored in the frame memory 11 by the encoded image determination unit 16 is acquired as an image to be processed as a motion prediction image, and is input to one of the subtraction units 18. The other of the subtracting unit 18 receives a motion compensated image generated by the motion compensating unit 27 based on the motion vector obtained by the motion predicting unit 12 and the reference image stored in the frame memory 26. The image signal component of the difference from the reference image obtained by subtraction by the subtracting unit 18 is DCT, quantized and variable-length encoded in the same manner as described above to generate an encoded output signal and the motion used for encoding Output with vector. The MV code amount counting unit 29 calculates the code amount of the motion vector output together with the encoded signal.

ここで、一般的なMPEG(moving picture experts group)によりなされる符号化はM値は3としてなされる。そのため、その次にフレームメモリ11に一時記憶される映像信号のピクチャ(画像)は動き補償画像(Bピクチャ=Bidirectionally predictive-coded picture)であるとして符号化画像決定部16で仮決定され上記の符号化が開始される。そして、M値候補算出部14で算出される動きベクトルは動き量が大きく、且つお互いに異なる方向を向いているとして検出された場合には、M値を小さな値に変更すべきであるとするM値候補を出力する。M値判定部15では、M値を小さな値に変更すべきであるとするM値候補が入力された場合、及びMV符号量カウント部29でカウントされる動きベクトルの符号量が大きく符号化効率を低下させているとして判定される場合には、入力画像を動き予測画像として処理されるのではなく、参照画像として処理されるべきであるして決定される。即ち、M値は小さく変更される決定である。符号化画像決定部16により参照画像として処理されるとして決定された場合は、フレームメモリ11に一時記憶される画像は参照画像として取得され、その後参照画像としての符号化がなされる。符号化のなされた信号は動画像符号化装置から出力される。   Here, encoding performed by a general moving picture experts group (MPEG) is performed with an M value of 3. Therefore, the picture (picture) of the video signal that is temporarily stored in the frame memory 11 next is provisionally determined by the encoded picture determination unit 16 as a motion compensated picture (B picture = Bidirectionally predictive-coded picture), and the above code Is started. If the motion vector calculated by the M value candidate calculation unit 14 is detected as having a large amount of motion and pointing in different directions, the M value should be changed to a small value. Output M value candidates. In the M value determination unit 15, when an M value candidate that the M value should be changed to a small value is input, and when the code amount of the motion vector counted by the MV code amount count unit 29 is large, the coding efficiency Is determined not to be processed as a motion prediction image, but to be processed as a reference image. In other words, the M value is determined to be changed small. When it is determined by the encoded image determination unit 16 to be processed as a reference image, the image temporarily stored in the frame memory 11 is acquired as a reference image, and then encoded as a reference image. The encoded signal is output from the moving image encoding device.

次に、詳細に説明する。
図2は新しい最適M値を決定する動作をフローチャートにより示したものである。
まず、入力される映像信号を符号化する際に、S(ステップ)71で、1フレーム前に符号化して得られる符号化信号中に含まれる動きベクトル符号の占有率情報はMV符号量カウント部29から得られる。占有率情報が閾値を越えている場合には、符号化は動き予測符号化画像であるBピクチャとして符号化するよりも参照画像であるIピクチャないしはPピクチャとして符号化した方が効率の高い符号化が行えると判断される。S75に進み、M値判定部15からは符号化画像決定部16に対して例えばM=3である当初候補M値の数をM=2、又はM=1に減らした新最適M値が決定され、その新最適M値により符号化がなされる。
Next, this will be described in detail.
FIG. 2 is a flowchart showing an operation for determining a new optimum M value.
First, when encoding an input video signal, the occupancy information of the motion vector code included in the encoded signal obtained by encoding one frame before in S (step) 71 is an MV code amount count unit. 29. If the occupancy information exceeds a threshold value, encoding is more efficient when encoded as an I picture or P picture as a reference image than as a B picture as a motion prediction encoded image. It is determined that Proceeding to S75, the M value determination unit 15 determines a new optimum M value by reducing the number of initial candidate M values, for example, M = 3, to M = 2 or M = 1 from the encoded image determination unit 16. Then, encoding is performed using the new optimum M value.

S71においてMV符号量の占有率は閾値より小さく、それまでは正常な符号化がなされているとして検出されたときには、S72において入力画像の動きベクトルが求められる。動きベクトルは、符号化画像決定部16がBピクチャによる符号化を予定している場合にも行われる。S73で求められつつある動きベクトルの大きさを検出する。S74で大きな動きベクトルが検出されるときには動きベクトルの方向が同一方向であるパンされたような映像であるか、又は動きベクトル同士の方向が異なっている海面の波のようなランダムな動きのされる映像であるかが検出される。ランダムな動きをする画像の場合には動き補償画像として符号化するよりも参照画像として符号化した方が符号化効率が高くなる。S75において、M値判定部15が符号化画像決定部16に対して動き補償画像として符号化が予定されている場合であっても、参照画像として符号化を行うように、当初候補M値を小さくした符号化が行われるように符号化画像のタイプを決定する。大きな動きベクトルがない場合、及び大きな動きベクトルがあっても同一方向を向いた動きベクトルの場合ではS77で当初から予定されている、例えばM値が3である符号化を継続する。S76において次の入力画像があるかが検出され、入力画像がある場合にはS71からの動作が繰り返される。入力画像がなくなったときに新しい最適M値を決定する動作が終了される。   In S71, the occupation rate of the MV code amount is smaller than the threshold, and when it is detected that normal encoding has been performed so far, the motion vector of the input image is obtained in S72. The motion vector is also performed when the encoded image determination unit 16 plans to encode with a B picture. The magnitude of the motion vector being obtained in S73 is detected. When a large motion vector is detected in S74, the motion vector direction is the same as the panned image, or a random motion such as a sea wave with different motion vector directions is applied. Is detected. In the case of an image having a random motion, encoding efficiency becomes higher when encoded as a reference image than when encoded as a motion compensated image. In S75, even if the M value determination unit 15 is scheduled to encode the motion compensation image with respect to the encoded image determination unit 16, the initial candidate M value is set so as to perform encoding as a reference image. The type of the encoded image is determined so that encoding with a reduced size is performed. When there is no large motion vector, and when there is a large motion vector and the motion vector is directed in the same direction, the encoding scheduled for S77 from the beginning, for example, with an M value of 3, is continued. In S76, it is detected whether there is a next input image. If there is an input image, the operation from S71 is repeated. When there are no more input images, the operation for determining a new optimum M value is terminated.

図3は動きベクトルとM値との関係を示したものである。
同図において、横方向が動きベクトルの探索範囲にかかる2フレームの画像間での画素間の距離である。この例の場合では、ほとんどの動きベクトルが0〜15ピクセル/フレームであるときのM値は4とし、以下同様に16〜31のときは3、32〜47のときは2、48以上のときには1とする。(1)は18ピクセル/フレームであるのでM値を3、(2)は60であるのでM値を1、(3)は35であるのでM値を2とする場合である。
動きベクトルは左上のブロックから順次求められたベクトルの動き量のうち、最も個数の多い動きベクトル値を求め、求められた動きベクトル値の分散値(ベクトル方向のランダム性)を参照しつつ最終的なM値を求める。フレームメモリ11に記憶された1フレームの画像の殆どについて動き予測部12が動きベクトルを検出した段階でM値判定部15により最適M値が判定される。符号化画像決定部16はその決定を基にフレームメモリ11から符号化する参照画像を取得する。フレームメモリ26には取得された参照画像の復号化参照画像が得られる。その参照画像が用いられて、手前の参照画像との間にある動き予測画像の符号化が行われる。
FIG. 3 shows the relationship between the motion vector and the M value.
In the figure, the horizontal direction is the distance between the pixels between the two frames of the image in the motion vector search range. In this example, the M value is 4 when most of the motion vectors are 0 to 15 pixels / frame. Similarly, when the motion vector is 16 to 31, the M value is 3, when 32 to 47 is 2, and when 48 or more. Set to 1. (1) is 18 pixels / frame, so the M value is 3, (2) is 60, so the M value is 1, and (3) is 35, so the M value is 2.
For the motion vector, the largest motion vector value is obtained from the motion amounts of the vector sequentially obtained from the upper left block, and the motion vector value is finally determined while referring to the obtained motion vector value variance value (randomness in the vector direction). Find the correct M value. The optimum M value is determined by the M value determination unit 15 when the motion prediction unit 12 detects a motion vector for most of the images of one frame stored in the frame memory 11. The encoded image determination unit 16 acquires a reference image to be encoded from the frame memory 11 based on the determination. In the frame memory 26, a decoded reference image of the acquired reference image is obtained. The reference image is used to encode a motion prediction image between the reference image in the foreground.

図4に、上記の参照画像と動き予測画像の時間関係を示す。
同図において横方向は時間であり、Nが現在である。現在よりも3フレーム過去であるN−3において参照ピクチャ(I又はPピクチャ)が符号化されている。N−2とN−1において非参照ピクチャである動き予測ピクチャ(Bピクチャ)が符号化されている。N+1以降は未来のピクチャでありピクチャタイプは不明である。動き予測部12ではフレームメモリ26に記憶される現符号化後参照ピクチャと、フレームメモリ11に記憶されるピクチャタイプ不明ピクチャとの動きベクトルが求められる。
求められた動きベクトルの値が32〜47の場合にはM値は3から2に変更され、N+2のピクチャタイプ不明ピクチャは参照ピクチャとして決定される。符号化画像決定部16ではN+2のピクチャは参照ピクチャとして符号化される。その後にN+1のピクチャタイプが不明なピクチャは動き予測ピクチャとされ、参照ピクチャN及び参照ピクチャN+2の両者が参照されて動き予測符号化される。
現符号化後参照ピクチャとピクチャタイプ不明ピクチャN+1との動きベクトルの値が48以上の場合にはピクチャタイプ不明ピクチャN+1は参照ピクチャとして決定される。符号化画像決定部16ではピクチャタイプ不明ピクチャN+1が取得され、参照ピクチャとして符号化される。
FIG. 4 shows a temporal relationship between the reference image and the motion prediction image.
In the figure, the horizontal direction is time, and N is current. A reference picture (I or P picture) is encoded in N-3, which is three frames past the present. In N-2 and N-1, motion prediction pictures (B pictures) that are non-reference pictures are encoded. N + 1 and later are future pictures and the picture type is unknown. The motion prediction unit 12 obtains a motion vector between the current encoded reference picture stored in the frame memory 26 and the picture type unknown picture stored in the frame memory 11.
When the obtained motion vector value is 32 to 47, the M value is changed from 3 to 2, and a picture type unknown picture of N + 2 is determined as a reference picture. In the encoded image determination unit 16, the N + 2 picture is encoded as a reference picture. Thereafter, a picture whose N + 1 picture type is unknown is set as a motion prediction picture, and both the reference picture N and the reference picture N + 2 are referred to and subjected to motion prediction encoding.
If the value of the motion vector between the current encoded reference picture and the picture type unknown picture N + 1 is 48 or more, the picture type unknown picture N + 1 is determined as a reference picture. The encoded image determination unit 16 acquires the picture type unknown picture N + 1 and encodes it as a reference picture.

通常のMPEGによる符号化では、N−3の参照ピクチャとNの参照ピクチャとの間の動きベクトルが小さい場合には、ピクチャタイプ不明ピクチャN+3は参照画像として符号化されるときに求められる動きベクトルが基にされて、その後のピクチャタイプが決定されるため、M値の変更はN+4以降に実施される。本実施例の場合ではN+1のピクチャタイプ不明ピクチャからM値の変更が実施できる。従って、動きの少ない画像から動きの多い画像にピクチャが変化した場合において、動きベクトルが大であるとして検出された最初の画像から効率の良い符号化行われる。   In normal MPEG coding, when the motion vector between the N-3 reference picture and the N reference picture is small, the motion vector obtained when the picture type unknown picture N + 3 is coded as a reference picture Since the subsequent picture type is determined based on, the change of the M value is performed after N + 4. In the case of the present embodiment, the M value can be changed from N + 1 picture type unknown pictures. Therefore, when a picture changes from an image with little motion to an image with much motion, efficient coding is performed from the first image detected as having a large motion vector.

なお、ここで、動きベクトルを得るためのマッチングの良い画像を探索により求めるための演算量は多い。そこで、ピクチャタイプを決定するために行った動きベクトル演算の結果は動き予測符号化にも利用されるようになされ、動きベクトル演算のための処理量は増加しないようにされている。
図5を用いて動きベクトルの再利用の動作について述べる。
まず、S81において符号化画像決定部16では次のピクチャが取得される。S82において取得ピクチャが参照ピクチャであるかが検出される。参照ピクチャでない場合はS91において参照ピクチャの直後のピクチャであるかが検出される。直後である場合には先に求めた動きベクトルは再利用可能である。動き予測結果保持部13に記憶される動きベクトルが用いられ、フレームメモリ26に記憶される直前の参照画像から動き予測画像が作成されるようにして動き予測ピクチャの符号化が行われる。S91で参照ピクチャの直後のピクチャでないとして検出された場合には、S93で従来と同じ方法により符号化が行われる。
S82で参照ピクチャであるとして検出された場合は、S83で動きベクトルが検出され、S84で動きベクトル検出結果が保存される。保存された動きベクトル検出結果は次の参照ピクチャの直後の動き予測ピクチャの符号化時に利用される。
S85では保存されている動きベクトルを基にM値の候補が算出される。S86では候補を基にM値が決定される。S87で決定されたM値を基に符号化が行われる。S88で次に符号化すべきピクチャがあるかが検出され、ある場合にはS81からの動作が繰返され、次のピクチャがないとして検出されたときに符号化の動作が終了される。
Here, there is a large amount of calculation for obtaining an image with good matching for obtaining a motion vector by searching. Therefore, the result of the motion vector calculation performed to determine the picture type is also used for motion prediction encoding, so that the processing amount for the motion vector calculation does not increase.
The motion vector reuse operation will be described with reference to FIG.
First, in S81, the encoded picture determination unit 16 acquires the next picture. In S82, it is detected whether the acquired picture is a reference picture. If it is not a reference picture, whether it is a picture immediately after the reference picture is detected in S91. If it is immediately after, the previously obtained motion vector can be reused. A motion vector stored in the motion prediction result holding unit 13 is used, and a motion prediction picture is encoded such that a motion prediction image is created from a reference image immediately before being stored in the frame memory 26. If it is detected in S91 that the picture is not immediately after the reference picture, encoding is performed in S93 by the same method as in the prior art.
If it is detected in S82 that it is a reference picture, a motion vector is detected in S83, and a motion vector detection result is stored in S84. The stored motion vector detection result is used when coding a motion prediction picture immediately after the next reference picture.
In S85, M value candidates are calculated based on the stored motion vectors. In S86, the M value is determined based on the candidate. Encoding is performed based on the M value determined in S87. In S88, it is detected whether there is a next picture to be encoded. If there is a picture to be encoded, the operation from S81 is repeated, and the encoding operation is terminated when it is detected that there is no next picture.

上述の動画像符号化装置では、M値の初期値が3とされて入力される映像信号が符号化されるが、符号化される信号が参照画像である場合、及び動き補償画像である場合のいずれにおいても動きベクトルのアクティビティが検出される。動き補償符号化処理を参照画像符号化処理に変更した方が符号化効率が良くなるとして判定されるときには、直ちに処理方法を変更可能とする符号化方法が実現できる。この符号化の方法は、フレームメモリ11の記憶容量も通常のMPEGで用いられると同じ記憶容量のメモリが用いられているにもかかわらず、メモリに記憶が開始された画像信号は直ちに動き予測部12で動きベクトルが計算されて適正なM値による符号化がなされているかが検出されるため、M値の変更は1フレームの画像の演算途中より実行することも出来る。   In the above-described moving image encoding apparatus, the input video signal is encoded with the initial value of M being 3; however, when the encoded signal is a reference image and when it is a motion compensated image In either case, motion vector activity is detected. When it is determined that the encoding efficiency is improved when the motion compensation encoding process is changed to the reference image encoding process, an encoding method that allows the processing method to be changed immediately can be realized. In this encoding method, although the memory capacity of the frame memory 11 is the same as that used in normal MPEG, the image signal that has been stored in the memory is immediately transferred to the motion prediction unit. Since the motion vector is calculated in 12 and it is detected whether or not encoding with an appropriate M value is performed, the change of the M value can also be executed during the calculation of one frame image.

以上のように、実施例で示した動画像符号化装置によれば、激しい動きベクトルが検出された直後からでもM値を変更した高画質な符号化信号を、最小の遅延時間で得ることの出来る動画像符号化装置及び動画像符号化プログラムを実現できる。
As described above, according to the moving picture coding apparatus shown in the embodiment, the fierce motion vector high-quality coded signal changing the M value even immediately after the detected, obtained with minimal delay the moving picture coding apparatus and the moving picture coding capsules program capable of can be realized.

符号化された参照画像(Iピクチャ及びPピクチャ)と、その参照画像の次に配置される符号化参照画像(Bピクチャ)との間隔を最適に設定して符号化を行う映像信号符号化装置に適用できる。   Video signal encoding apparatus for performing encoding by optimally setting an interval between an encoded reference picture (I picture and P picture) and an encoded reference picture (B picture) arranged next to the reference picture Applicable to.

本発明の実施に係る動画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the moving image encoder which concerns on implementation of this invention. 本発明の実施に係る最適M値の決定に係る動作を示すフローチャートの図である。It is a figure of the flowchart which shows the operation | movement which concerns on determination of the optimal M value based on implementation of this invention. 本発明の実施に係る動きベクトルとM値との関係を示す図である。It is a figure which shows the relationship between the motion vector and M value which concern on implementation of this invention. 本発明の実施に係るM値の決定方法を説明するための図である。It is a figure for demonstrating the determination method of M value based on implementation of this invention. 本発明の実施に係る最適M値を用いる符号化の動作を示すフローチャートの図である。It is a figure of the flowchart which shows the operation | movement of the encoding using the optimal M value based on implementation of this invention.

符号の説明Explanation of symbols

11 フレームメモリ
12 動き予測部
13 動き予測結果保持部
14 M値候補算出部
15 M値判定部
16 符号化画像決定部
18 減算部
21 DCT部
22 量子化部
23 逆量子化部
24 逆DCT部
25 加算部
26 フレームメモリ
27 動き補償部
28 符号化部
29 MV符号量カウント部

11 Frame memory 12 Motion prediction unit 13 Motion prediction result holding unit 14 M value candidate calculation unit 15 M value determination unit 16 Encoded image determination unit 18 Subtraction unit 21 DCT unit 22 Quantization unit 23 Inverse quantization unit 24 Inverse DCT unit 25 Adder 26 Frame memory 27 Motion compensator 28 Encoder 29 MV code amount count unit

Claims (4)

入力画像を格納する第1フレームメモリと、
前記入力画像を動き予測符号化を用いて符号化する際に用いる画像である参照画像を格納する第2フレームメモリと、
前記第2フレームメモリに格納されている参照画像に基づいて、前記第1フレームメモリに格納されている前記入力画像の動きベクトルを求める動きベクトル検出手段と、
前記動きベクトル検出手段で求められた前記入力画像の動きベクトルが所定値よりも小さく、かつ同一方向である場合は、記参照画像と次の参照画像との間隔を示すM値を予め設定された所定値とし、前記入力画像の動きベクトルが所定値よりも大きく、かつ異なる方向である場合は、前記M値を前記所定値よりも小さい値とするM値算出決定手段と、
前記M値算出決定手段から出力された前記M値を用いて、前記第2フレームメモリに格納されている参照画像の次の参照画像を決定するとともに、この決定した参照画像を用いて前記動き予測符号化を行う符化手段と、
からなることを特徴とする動画像符号化装置。
A first frame memory for storing an input image ;
A second frame memory for storing a reference image that is an image used when the input image is encoded using motion prediction encoding ;
A motion vector detection means based on the stored have that references images in the second frame memory, a motion vector is obtained for the entering Chikaraga image stored in the first frame memory,
The motion motion vector of the vector before obtained by the detection means complete Chikaraga image is smaller than the predetermined value, and if it is the same direction, the pre-M value indicating the distance between hexane irradiation image and the next reference image a preset predetermined value, if the motion vector of the entering Chikaraga image is larger than a predetermined value, and a different direction, and the M value calculation determination means for the M value and a value smaller than the predetermined value ,
A reference image next to a reference image stored in the second frame memory is determined using the M value output from the M value calculation determining means, and the motion prediction is performed using the determined reference image. encoding a row cormorant sign-catheter stage,
A moving picture encoding apparatus comprising:
制御手段を、
力画を第1フレームメモリに格納させる手段と、
前記入力画像を動き予測符号化を用いて符号化する際に用いる画像である参照画像を第2フレームメモリに格納させる手段と、
前記第2フレームメモリに格納されている参照画像に基づいて、前記第1フレームメモリに格納されている前記入力画像の動きベクトルを求める動きベクトル検出手段と、
前記動きベクトル検出手段で求められた前記入力画像の動きベクトルが所定値よりも小さく、かつ同一方向である場合は、記参照画像と次の参照画像との間隔を示すM値を予め設定された所定値とし、前記入力画像の動きベクトルが所定値よりも大きく、かつ異なる方向である場合は、前記M値を前記所定値よりも小さい値とするM値算出決定手段と、
前記M値算出決定手段から出力された前記M値を用いて、前記第2フレームメモリに格納されている参照画像の次の参照画像を決定するとともに、この決定した参照画像を用いて前記動き予測符号化を行う符化手
として機能させるための動画像符号化プログラム。
Control means,
And means for storing the input Chikaraga image in the first frame memory,
Means for storing, in the second frame memory , a reference image that is an image used when the input image is encoded using motion prediction encoding ;
A motion vector detection means based on the stored have that references images in the second frame memory, a motion vector is obtained for the entering Chikaraga image stored in the first frame memory,
The motion motion vector of the vector before obtained by the detection means complete Chikaraga image is smaller than the predetermined value, and if it is the same direction, the pre-M value indicating the distance between hexane irradiation image and the next reference image a preset predetermined value, if the motion vector of the entering Chikaraga image is larger than a predetermined value, and a different direction, and the M value calculation determination means for the M value and a value smaller than the predetermined value ,
A reference image next to a reference image stored in the second frame memory is determined using the M value output from the M value calculation determining means, and the motion prediction is performed using the determined reference image. video encoding program for operating encoded as rows cormorants sign-catheter stage.
前記M値を決定するために用いた前記動きベクトルを保持する記憶手段を更に有し、Storage means for holding the motion vector used to determine the M value;
前記符号化手段は、前記第1フレームメモリに格納されている入力画像の符号化を行なう際に、前記記憶手段に記憶された前記動きベクトルを再利用することを特徴とする請求項1記載の動画像符号化装置。2. The encoding unit according to claim 1, wherein the encoding unit reuses the motion vector stored in the storage unit when encoding the input image stored in the first frame memory. Video encoding device.
前記制御手段を、更に、The control means,
前記M値を決定するために用いた前記動きベクトルを記憶手段に記憶させる手段として機能させ、Function as means for storing in the storage means the motion vector used to determine the M value;
前記符号化手段は、前記第1フレームメモリに格納されている入力画像の符号化を行なう際に、前記記憶手段に記憶された前記動きベクトルを再利用することを特徴とする請求項2記載の動画像符号化プログラム。3. The encoding unit according to claim 2, wherein the encoding unit reuses the motion vector stored in the storage unit when encoding the input image stored in the first frame memory. A video encoding program.
JP2004267895A 2004-09-15 2004-09-15 Moving picture coding apparatus and moving picture coding program Expired - Fee Related JP4403549B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004267895A JP4403549B2 (en) 2004-09-15 2004-09-15 Moving picture coding apparatus and moving picture coding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004267895A JP4403549B2 (en) 2004-09-15 2004-09-15 Moving picture coding apparatus and moving picture coding program

Publications (2)

Publication Number Publication Date
JP2006086684A JP2006086684A (en) 2006-03-30
JP4403549B2 true JP4403549B2 (en) 2010-01-27

Family

ID=36164843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004267895A Expired - Fee Related JP4403549B2 (en) 2004-09-15 2004-09-15 Moving picture coding apparatus and moving picture coding program

Country Status (1)

Country Link
JP (1) JP4403549B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2014319A1 (en) 2007-07-09 2009-01-14 Astra Tech AB A bone tissue implant comprising strontium ions
CN103634606B (en) * 2012-08-21 2015-04-08 腾讯科技(深圳)有限公司 Video encoding method and apparatus
WO2024011381A1 (en) * 2022-07-11 2024-01-18 上海交通大学 Point cloud encoding method and apparatus, point cloud decoding method and apparatus, device and storage medium

Also Published As

Publication number Publication date
JP2006086684A (en) 2006-03-30

Similar Documents

Publication Publication Date Title
CN100579224C (en) Method and apparatus for lossless video encoding and decoding
JP5422168B2 (en) Video encoding method and video decoding method
JP5373626B2 (en) Method, apparatus, encoder, decoder, and decoding method for estimating a motion vector using a plurality of motion vector predictors
TWI692246B (en) Image prediction decoding method
JP2008227670A (en) Image coding device
JP4732184B2 (en) Moving picture encoding apparatus and control method therefor, computer program, and storage medium
JP2013115583A (en) Moving image encoder, control method of the same, and program
CN108401185B (en) Reference frame selection method, video transcoding method, electronic device and storage medium
JP4257789B2 (en) Video encoding device
JP4403549B2 (en) Moving picture coding apparatus and moving picture coding program
JP4452733B2 (en) Motion evaluation apparatus, method and program for moving picture coding, and recording medium therefor
JP2010081635A (en) Apparatus, method and program for motion compensation prediction coding
CN110662074B (en) Motion vector determination method and device
JP6875800B2 (en) Super-resolution frame selection device, super-resolution device, and program
CN112422970A (en) Image coding method and device
JP3804764B2 (en) Motion compensated prediction singular value expansion coding apparatus
JP2007228101A (en) Dynamic-image coding equipment
JPS61164390A (en) Adaptive forecast coding device of inter-frame and between frames of animation picture signal
JP4561701B2 (en) Video encoding device
JPH10164596A (en) Motion detector
CN101682782B (en) Moving image encoding method
JP4438949B2 (en) Motion compensated predictive coding apparatus, motion compensated predictive coding method, and program
JP5864022B2 (en) Video decoding method
JPH10145793A (en) Image coding device and method, and image decoding device and method
CN115941947A (en) Motion estimation method, device, equipment and storage medium in video coding

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080912

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081107

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: 20091009

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091022

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121113

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131113

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees