JP2009272672A - Method and apparatus for encoding moving image - Google Patents

Method and apparatus for encoding moving image Download PDF

Info

Publication number
JP2009272672A
JP2009272672A JP2008118746A JP2008118746A JP2009272672A JP 2009272672 A JP2009272672 A JP 2009272672A JP 2008118746 A JP2008118746 A JP 2008118746A JP 2008118746 A JP2008118746 A JP 2008118746A JP 2009272672 A JP2009272672 A JP 2009272672A
Authority
JP
Japan
Prior art keywords
blocks
block
image quality
refresh
degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008118746A
Other languages
Japanese (ja)
Inventor
Yoshimitsu Sasaki
善満 佐々木
Shinji Kitamura
臣二 北村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2008118746A priority Critical patent/JP2009272672A/en
Publication of JP2009272672A publication Critical patent/JP2009272672A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To make inconspicuous the deterioration in the picture quality of a moving image frame. <P>SOLUTION: A picture quality deterioration determination unit 101 determines a degree of deterioration of picture quality for each of in plurality of blocks included in a present frame and assigns a flag value to the plurality of blocks. A refresh map generation unit 102 writes an assignment result of the flag value which is assigned by the picture quality deterioration determination unit 101 to a refresh map indicating correspondence relation between the positions of blocks in a moving image frame and the flag value assigned to the blocks. A refresh frequency setting unit 103 assigns a refresh frequency to each flag value. A refresh control unit 104 selects the same number of candidate blocks as the refresh frequency corresponding to the flag value from the blocks to which the same flag value is assigned by referring to the refresh map and executes intra-encoding of blocks existing in the same positions as the candidate blocks selected out of blocks included in a succeeding frame. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、動画像フレームをイントラ符号化およびインター符号化によって符号化する技術に関し、さらに詳しくは、イントラ符号化によって符号化されたブロックを動画像フレーム内に挿入することにより画質劣化を抑制する技術に関する。   The present invention relates to a technique for encoding a moving picture frame by intra coding and inter coding, and more specifically, suppresses image quality deterioration by inserting a block coded by intra coding into a moving picture frame. Regarding technology.

従来、動画像フレームの符号化方式として、動画像フレーム内の空間的冗長性を取り除くことによりデータ量を圧縮するイントラ符号化(フレーム内符号化とも呼ばれる)と、複数の動画像フレーム間の時間的冗長性を取り除くことによりデータ量を圧縮するインター符号化(フレーム間符号化とも呼ばれる)とが用いられている。   Conventionally, as an encoding method of moving image frames, intra coding (also referred to as intra-frame coding) that compresses the amount of data by removing spatial redundancy in moving image frames, and time between a plurality of moving image frames Inter coding (also referred to as interframe coding) is used in which the amount of data is compressed by removing static redundancy.

一般的に、インター符号化による発生符号量は、イントラ符号化の場合よりも少ないが、インター符号化の場合、伝送路などにおいて、ある動画像フレームにエラー(データ誤りやデータ欠落など)が発生すると、その動画像フレームだけでなく別の動画像フレームにもエラーが伝播してしまう。また、インター符号化では動き補償が実行されているため、動画像符号化装置内のフレームメモリには、原フレーム(実際の動画像フレーム)とは多少異なる動画像フレームが保有される。インター符号化を継続して実行した場合、時間が経過するほど、この保有フレームの誤差が大きくなり、最終的に、原フレームとは大きく異なる動画像フレームが保有されることになる。この動画像フレームのマクロブロックが動き補償に用いられると、このマクロブロックの誤差が周辺のマクロブロックにまで伝播してしまう。このように、誤差が伝播することにより、動画像フレームの画質が劣化してしまう。   In general, the amount of code generated by inter coding is smaller than in intra coding, but in inter coding, errors (data errors, data loss, etc.) occur in certain video frames in the transmission path. Then, an error propagates not only to the moving image frame but also to another moving image frame. In addition, since motion compensation is performed in inter coding, a frame memory in the moving image coding apparatus holds a moving image frame slightly different from the original frame (actual moving image frame). When inter coding is continuously executed, the error of the retained frame increases as time elapses, and eventually, a moving image frame that is significantly different from the original frame is retained. When a macroblock of this moving image frame is used for motion compensation, an error of this macroblock propagates to surrounding macroblocks. As described above, the propagation of the error deteriorates the image quality of the moving image frame.

そこで、リフレッシュ処理(強制的なイントラ符号化)を周期的または非周期的に実行することにより、動画像フレーム内にイントラ符号化によって符号化された画像領域を挿入する技術が提案されている。イントラ符号化されたマクロブロックは、他の動画像フレームを参照することなく復号化することができるので、上述のような誤差の伝播を遮断することができ、その結果、画質劣化を抑制することが可能となる。例えば、特開2001−359102号公報(特許文献1)には、予測マクロブロックとの差分値が閾値よりも大きいマクロブロック(すなわち、差分情報量が多いマクロブロック)をリフレッシュ対象とし、フレーム期間毎に所定数の対象マクロブロック(リフレッシュの対象となったマクロブロック)に対してリフレッシュ処理を実行する方法が開示されている。図9のように、対象マクロブロックを所定数ずつ順番に(例えば、動画像フレームの左上から右下の方向へ)リフレッシュすることにより、イントラ符号化による発生符号量の増大および画質劣化の増大を抑制している。   Therefore, a technique has been proposed in which an image region encoded by intra coding is inserted into a moving image frame by periodically or aperiodically performing refresh processing (forced intra coding). Since intra-coded macroblocks can be decoded without referring to other moving image frames, propagation of errors as described above can be blocked, and as a result, image quality deterioration can be suppressed. Is possible. For example, in Japanese Patent Laid-Open No. 2001-359102 (Patent Document 1), a macroblock whose difference value from a predicted macroblock is larger than a threshold (that is, a macroblock having a large amount of difference information) is refreshed, and is updated every frame period. Discloses a method for executing refresh processing on a predetermined number of target macroblocks (macroblocks to be refreshed). As shown in FIG. 9, the target macroblock is refreshed in order by a predetermined number (for example, from the upper left to the lower right of the moving image frame), thereby increasing the generated code amount and the image quality degradation due to intra coding. Suppressed.

しかし、リフレッシュ数(1フレーム期間内にリフレッシュされるマクロブロックの数)が固定されている場合、対象マクロブロックの数が多くなるほど、リフレッシュ待ち期間(対象マクロブロックが選択されてから最後の対象マクロブロックが実際にリフレッシュされるまでに要する期間)が長くなる。そのような問題を解消するために、特許文献1の方法では、対象マクロブロックの総数やマクロブロックがリフレッシュの対象になってからの経過時間に基づいて、リフレッシュ数を決定している。
特開2001−359102号公報
However, when the number of refreshes (the number of macroblocks refreshed within one frame period) is fixed, the refresh target period (the last target macro after the target macroblock is selected) increases as the number of target macroblocks increases. The period required until the block is actually refreshed) becomes longer. In order to solve such a problem, in the method of Patent Document 1, the number of refreshes is determined based on the total number of target macroblocks and the elapsed time since the macroblocks became the refresh target.
JP 2001-359102 A

しかしながら、従来方法では、マクロブロックをリフレッシュ対象とするか否かの判定するために用いる閾値が1つしかないので、対象マクロブロックの間で差分値(すなわち、画質劣化度)にばらつきがある。また、従来方法では、予め定められた順番で対象マクロブロックがリフレッシュされるので、画質劣化度の大きい対象マクロブロックのリフレッシュが後回しになるおそれがある。この場合、動画像フレーム内において画質劣化が局所的に激しくなってしまうので、動画像フレームの画質劣化が目立ってしまう(すなわち、主観的な画質が劣化してしまう)。   However, in the conventional method, since there is only one threshold value used for determining whether or not a macroblock is to be refreshed, there is a variation in the difference value (that is, the image quality degradation degree) between the target macroblocks. In the conventional method, since the target macroblocks are refreshed in a predetermined order, there is a possibility that the refresh of the target macroblocks having a high degree of image quality degradation may be postponed. In this case, since the image quality degradation is locally intense in the moving image frame, the image quality degradation of the moving image frame becomes conspicuous (that is, the subjective image quality deteriorates).

例えば、画面の上半分の領域に動きの少ない被写体(風景など)が位置し、画面の下半分の領域に動きの多い被写体(歩行者など)が位置するように撮影した場合(例えば、監視カメラで交差点を定点撮影した場合)、動画像フレームの上半分の領域では対象マクロブロックの差分値は閾値よりも少し大きな値を示し、下半分の領域では対象マクロブロックの差分値は閾値よりも非常に大きな値を示す。すなわち、動画像フレームの下半分の領域における画質劣化度は、動画像フレームの上半分の領域よりも大きくなる。ここで、従来のように、対象マクロブロックを動画像フレームの左上から右下の方向へ順番にリフレッシュしたとすると、上半分の領域(すなわち、画質劣化度の小さい領域)のリフレッシュが完了した後に、下半分の領域(すなわち、画質劣化度の大きい領域)のリフレッシュが実行されることになる。この場合、下半分の領域における画質劣化が目立ってしまう。   For example, when shooting is performed such that a subject with little movement (landscape or the like) is located in the upper half area of the screen and a subject with much movement (such as a pedestrian) is located in the lower half area of the screen (for example, a surveillance camera) In the upper half area of the moving image frame, the difference value of the target macroblock is slightly larger than the threshold value, and in the lower half area, the difference value of the target macroblock is much higher than the threshold value. Shows a large value. That is, the image quality degradation degree in the lower half area of the moving image frame is larger than that in the upper half area of the moving image frame. Here, if the target macroblock is refreshed in order from the upper left to the lower right of the moving image frame as in the conventional case, after the refresh of the upper half area (that is, the area where the image quality degradation degree is small) is completed. Thus, refreshing of the lower half area (that is, an area having a high image quality degradation degree) is executed. In this case, the image quality degradation in the lower half area becomes conspicuous.

そこで、この発明は、動画像フレームの画質劣化を目立ちにくくすることができる技術を提供することを目的とする。   Accordingly, an object of the present invention is to provide a technique capable of making the deterioration of the image quality of a moving image frame less noticeable.

この発明の1つの局面に従うと、動画像符号化方法は、動画像フレームを所定サイズのブロック単位でイントラ符号化またはインター符号化することにより複数の動画像フレームを順次符号化する方法であって、第1の動画像フレームに含まれる複数のブロックの各々の画質劣化度に応じてその複数のブロックの各々を複数のブロック群に分類するステップ(a)と、上記ステップ(a)において分類された複数のブロック群の各々からそのブロック群の画質劣化度に対応した数のブロックを候補ブロックとして選択するステップ(b)と、上記第1の動画像フレームよりも後に符号化される第2の動画像フレームに含まれる複数のブロックのうち上記ステップ(b)において選択された候補ブロックに対応するブロックに対して上記イントラ符号化を強制的に実行するステップ(c)とを備える。   According to one aspect of the present invention, a moving image encoding method is a method of sequentially encoding a plurality of moving image frames by intra-coding or inter-coding a moving image frame in units of a predetermined size block. Categorizing each of the plurality of blocks into a plurality of block groups according to the degree of image quality degradation of each of the plurality of blocks included in the first moving image frame, and classification in the above step (a). A step (b) of selecting a number of blocks corresponding to the image quality degradation degree of the block group from each of the plurality of block groups as a candidate block, and a second encoded after the first moving image frame Among the plurality of blocks included in the moving image frame, the above-described into the block corresponding to the candidate block selected in the above step (b). And a step (c) to force the coding.

上記動画像符号化方法では、動画像フレーム内において画質劣化度の大きい領域を優先的にリフレッシュすることができるので、画質劣化が局所的に激しくなることを抑制でき、その結果、動画像フレームの画質劣化を目立ちにくくすることができる。   In the above moving image encoding method, an area having a high image quality degradation degree in a moving image frame can be preferentially refreshed, so that it is possible to prevent the image quality deterioration from becoming locally intense. Image quality deterioration can be made inconspicuous.

好ましくは、上記ステップ(b)では、画質劣化度が大きいブロック群ほどそのブロック群から選択される候補ブロックの数を多くする。   Preferably, in the step (b), the number of candidate blocks selected from the block group is increased as the block group has a higher degree of image quality degradation.

上記動画像符号化方法では、画質劣化度の小さい領域は画質劣化の大きいよりもリフレッシュの必要性が低いので、動画像フレームの画質劣化を抑制しつつ発生符号量の増大を抑制することができる。これにより、符号量制御が実行される場合でも、その符号量制御に伴う画質劣化の増大を抑制することができる。   In the above-described moving image coding method, an area where the degree of image quality degradation is small is less necessary to be refreshed than a case where the image quality degradation is large. Therefore, an increase in the amount of generated code can be suppressed while suppressing image quality deterioration of the moving image frame. . Thereby, even when the code amount control is executed, it is possible to suppress an increase in image quality deterioration due to the code amount control.

好ましくは、上記動画像符号化方法は、発生符号量に応じて、上記ステップ(b)において上記複数のブロック群の各々から選択される候補ブロックの数を変更するステップ(d)をさらに備える。   Preferably, the moving image encoding method further includes a step (d) of changing the number of candidate blocks selected from each of the plurality of block groups in the step (b) according to the generated code amount.

上記動画像符号化方法では、発生符号量の増大を抑制することができる。   In the moving image encoding method, an increase in the amount of generated code can be suppressed.

好ましくは、上記ステップ(d)では、画質劣化度の大きいブロック群ほどそのブロック群から選択される候補ブロックの数の増減量が少なくなるように、上記発生符号量に応じて上記複数のブロック群の各々から選択される候補ブロックの数を変更する。   Preferably, in the step (d), the plurality of block groups according to the generated code amount so that the block group having a higher image quality degradation level has a smaller increase / decrease amount of candidate blocks selected from the block group. To change the number of candidate blocks selected from each.

上記動画符号化方法では、画質劣化度の大きい領域においてリフレッシュされるブロックの数が安定しているので、発生符号量が増減しても画質劣化度の大きい領域を優先的にリフレッシュすることができる。これにより、動画像フレームの画質劣化を抑制しつつ発生符号量の増大を抑制することができる。   In the moving image encoding method, since the number of blocks to be refreshed is stable in the area where the image quality degradation degree is large, even if the generated code amount increases or decreases, the area where the image quality degradation degree is high can be preferentially refreshed. . As a result, it is possible to suppress an increase in the amount of generated codes while suppressing image quality deterioration of the moving image frame.

この発明の別の局面に従うと、動画像符号化装置は、複数の動画像フレームを順次符号化する装置であって、動画像フレームを所定サイズのブロック単位でイントラ符号化またはインター符号化する符号化部と、上記符号化部によって符号化された動画像フレームに含まれる複数のブロックの各々について画質劣化度を判定し、上記複数のブロックの各々を画質劣化度に応じて複数のブロック群に分類する画質劣化度判定部と、上記画質劣化度判定部によって分類された複数のブロック群の各々からそのブロック群の画質劣化度に対応した数のブロックを候補ブロックとして選択し、次に符号化すべき動画像フレームに含まれる複数のブロックのうちその選択した候補ブロックに対応するブロックに対して上記符号化部に上記イントラ符号化を実行させるリフレッシュ制御部とを備える。   According to another aspect of the present invention, a moving image encoding device is a device that sequentially encodes a plurality of moving image frames, and encodes a moving image frame in units of blocks of a predetermined size. And an image quality deterioration degree for each of a plurality of blocks included in the moving image frame encoded by the encoding unit, and each of the plurality of blocks is divided into a plurality of block groups according to the image quality deterioration degree. The number of blocks corresponding to the image quality deterioration degree of the block group is selected as candidate blocks from each of the plurality of block groups classified by the image quality deterioration degree determination unit and the image quality deterioration degree determination unit, and then encoded. The intra coding is performed by the coding unit on a block corresponding to the selected candidate block among the plurality of blocks included in the power moving image frame. And a refresh controller to execute.

上記動画像符号化装置では、動画像フレーム内において画質劣化度の大きい領域を優先的にリフレッシュすることができるので、画質劣化が局所的に激しくなることを抑制でき、その結果、動画像フレームの画質劣化を目立ちにくくすることができる。   In the moving image encoding apparatus, since a region having a high degree of image quality degradation can be preferentially refreshed in the moving image frame, it is possible to suppress local deterioration of image quality, and as a result, Image quality deterioration can be made inconspicuous.

以上のように、動画像フレームの画質劣化を目立ちにくくすることができる。   As described above, it is possible to make the deterioration of the image quality of the moving image frame less noticeable.

以下に本発明の実施の形態について、図面を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

(実施形態1)
図1は、この発明の実施形態1による動画像符号化装置の構成を示す。動画像符号化装置1は、複数の動画像フレームを順次符号化するものであり、動画像フレームの各々を所定のブロック単位(ここでは、マクロブロック単位)でイントラ符号化またはインター符号化する。また、動画像符号化装置1は、フレーム期間(動画像フレームを符号化するための期間)毎に、マクロブロックの画質劣化度に応じてリフレッシュ処理(強制的なイントラ符号化)を実行する。動画像符号化装置1は、モード選択部11と、ブロック化部12と、減算部13と、直交変換部14と、量子化部15と、可変長符号化部16と、逆量子化部17と、逆直交変換部18と、セレクタ19と、加算部20と、メモリ21と、動き検出/補償部22と、イントラ予測部23と、画質劣化度判定部101と、リフレッシュマップ生成部102と、リフレッシュ数設定部103と、リフレッシュ制御部104とを備える。
(Embodiment 1)
FIG. 1 shows the configuration of a moving picture encoding apparatus according to Embodiment 1 of the present invention. The moving image encoding apparatus 1 sequentially encodes a plurality of moving image frames, and each of the moving image frames is intra-coded or inter-coded in a predetermined block unit (here, a macroblock unit). In addition, the moving image encoding device 1 executes refresh processing (forced intra encoding) in accordance with the image quality degradation degree of the macroblock for each frame period (period for encoding a moving image frame). The moving image encoding apparatus 1 includes a mode selection unit 11, a blocking unit 12, a subtraction unit 13, an orthogonal transformation unit 14, a quantization unit 15, a variable length encoding unit 16, and an inverse quantization unit 17. An inverse orthogonal transform unit 18, a selector 19, an addition unit 20, a memory 21, a motion detection / compensation unit 22, an intra prediction unit 23, an image quality degradation degree determination unit 101, and a refresh map generation unit 102. The refresh number setting unit 103 and the refresh control unit 104 are provided.

〔符号化部〕
モード選択部11は、動き検出/補償部22およびイントラ予測部23のそれぞれからマクロブロック単位の相関の程度を示すブロック相関情報を受け取り、マクロブロック毎にイントラ符号化およびインター符号化のいずれか一方を選択する。また、モード選択部11は、リフレッシュ制御部104からリフレッシュ制御信号を受けると、強制的にイントラ符号化を選択する。ブロック化部12は、動画像フレームを複数のマクロブロックに分割し、分割した複数のマクロブロックを順次出力する。減算部13は、入力マクロブロック(ブロック化部12からのマクロブロック)とセレクタ19からの予測マクロブロックとの差分を算出し、算出結果を予測誤差マクロブロックとして出力する。直交変換部14は、減算部13からの予測誤差マクロブロックを直交変換する(例えば、離散コサイン変換する)。量子化部15は、直交変換部14によって直交変換されたマクロブロックを量子化する。可変長符号化部16は、量子化部15によって量子化されたマクロブロックを可変長符号化する。
[Encoding section]
The mode selection unit 11 receives block correlation information indicating the degree of correlation in units of macroblocks from each of the motion detection / compensation unit 22 and the intra prediction unit 23, and either intra coding or inter coding is performed for each macroblock. Select. When the mode selection unit 11 receives a refresh control signal from the refresh control unit 104, the mode selection unit 11 forcibly selects intra coding. The blocking unit 12 divides the moving image frame into a plurality of macro blocks, and sequentially outputs the plurality of divided macro blocks. The subtraction unit 13 calculates a difference between the input macroblock (macroblock from the block forming unit 12) and the prediction macroblock from the selector 19, and outputs the calculation result as a prediction error macroblock. The orthogonal transform unit 14 performs orthogonal transform (for example, discrete cosine transform) on the prediction error macroblock from the subtraction unit 13. The quantization unit 15 quantizes the macroblock orthogonally transformed by the orthogonal transformation unit 14. The variable length coding unit 16 performs variable length coding on the macroblock quantized by the quantization unit 15.

逆量子化部17は、量子化部15によって量子化されたマクロブロックを逆量子化する。逆直交変換部18は、逆量子化部17によって逆量子化されたマクロブロックを逆直交変換する(例えば、逆離散コサイン変換する)。セレクタ19は、モード選択部11がイントラ符号化を選択している場合にはイントラ予測部23からの予測マクロブロックを選択し、モード選択部11がインター符号化を選択している場合には動き検出/補償部22からの予測マクロブロックを選択する。加算部20は、逆直交変換部18によって逆直交変換されたマクロブロックにセレクタ19によって選択された予測マクロブロックを加算する。これにより、直交変換および量子化が施される前のマクロブロックが復元される。加算部20は、復元されたマクロブロックを出力する。メモリ21は、加算部20からのマクロブロックを格納する。メモリ21では、複数の復元マクロブロック(加算部20からのマクロブロック)によって参照フレームが再構築される。動き検出/補償部22は、入力マクロブロック(ブロック化部12からのマクロブロック)とメモリ21に格納された参照フレームとを用いて動きベクトルを算出する(所謂、動き検出処理)。また、動き検出/補償部22は、動きベクトルの算出の際に得られた予測マクロブロックをセレクタ19へ出力する(所謂、動き補償処理)とともに、マクロブロック単位の相関の程度を示すブロック相関情報(例えば、SAD)をモード選択部11へ出力する。イントラ予測部23は、入力マクロブロックとメモリ22に格納された参照フレームとを用いてイントラ予測を実行して予測マクロブロックをセレクタ19へ出力するとともに、ブロック相関情報をモード選択部11へ出力する。   The inverse quantization unit 17 inversely quantizes the macroblock quantized by the quantization unit 15. The inverse orthogonal transform unit 18 performs inverse orthogonal transform (for example, inverse discrete cosine transform) on the macroblock inversely quantized by the inverse quantization unit 17. The selector 19 selects a prediction macroblock from the intra prediction unit 23 when the mode selection unit 11 selects intra coding, and moves when the mode selection unit 11 selects inter coding. A prediction macroblock from the detection / compensation unit 22 is selected. The adder 20 adds the predicted macroblock selected by the selector 19 to the macroblock that has been inversely orthogonal transformed by the inverse orthogonal transform unit 18. Thereby, the macroblock before orthogonal transformation and quantization are performed is restored. The adder 20 outputs the restored macroblock. The memory 21 stores the macro block from the adding unit 20. In the memory 21, a reference frame is reconstructed by a plurality of restored macro blocks (macro blocks from the adder 20). The motion detection / compensation unit 22 calculates a motion vector using the input macroblock (macroblock from the blocking unit 12) and the reference frame stored in the memory 21 (so-called motion detection processing). In addition, the motion detection / compensation unit 22 outputs the predicted macroblock obtained at the time of calculating the motion vector to the selector 19 (so-called motion compensation processing), and block correlation information indicating the degree of correlation in units of macroblocks. (For example, SAD) is output to the mode selection unit 11. The intra prediction unit 23 performs intra prediction using the input macroblock and the reference frame stored in the memory 22, outputs the prediction macroblock to the selector 19, and outputs block correlation information to the mode selection unit 11. .

このようにして、動画像フレームがマクロブロック単位でイントラ符号化またはインター符号化される。   In this way, the moving image frame is intra-coded or inter-coded in units of macroblocks.

〔動き検出処理/動き補償処理〕
ここで、動き検出/補償部22による処理について詳しく説明する。例えば、動き検出/補償部22は、参照フレームのうち設定された動き探索範囲内において入力マクロブロックと同一サイズのブロック領域を候補マクロブロックとして選択し、選択した候補マクロブロックに含まれる各画素値と入力マクロブロックの平均画素値との差分絶対値和(SAD)を算出する。次に、動き検出/補償部22は、動き探索範囲内でブロック領域の位置を移動させ、次の候補マクロブロックを選択し、その候補マクロブロックについてSADを算出する。このようにして、動き検出/補償部22は、動き探索範囲内において複数の候補マクロブロックを選択し、各候補マクロブロックについてSADを算出する。
[Motion detection / motion compensation]
Here, the processing by the motion detection / compensation unit 22 will be described in detail. For example, the motion detection / compensation unit 22 selects a block area having the same size as the input macroblock within the set motion search range in the reference frame as a candidate macroblock, and each pixel value included in the selected candidate macroblock And the sum of absolute differences (SAD) between the average pixel value of the input macroblock and the input macroblock. Next, the motion detection / compensation unit 22 moves the position of the block region within the motion search range, selects the next candidate macroblock, and calculates the SAD for the candidate macroblock. In this way, the motion detection / compensation unit 22 selects a plurality of candidate macroblocks within the motion search range, and calculates the SAD for each candidate macroblock.

次に、動き検出/補償部22は、算出した各SADに基づいて1つの候補マクロブロックを選択し、入力マクロブロックからその選択したマクロブロックまでの距離を示す動きベクトルを出力する。例えば、動き検出/補償部22は、複数のSADのうち最小のSADに対応する候補マクロブロックを入力マクロブロックとの相関度が最も高いマクロブロックとして選択する。さらに、動き検出/補償部22は、その選択したマクロブロックを予測マクロブロックとして出力する。   Next, the motion detection / compensation unit 22 selects one candidate macroblock based on each calculated SAD, and outputs a motion vector indicating the distance from the input macroblock to the selected macroblock. For example, the motion detection / compensation unit 22 selects a candidate macroblock corresponding to the smallest SAD among the plurality of SADs as a macroblock having the highest degree of correlation with the input macroblock. Furthermore, the motion detection / compensation unit 22 outputs the selected macroblock as a predicted macroblock.

〔画質劣化度判定部〕
画質劣化度判定部101は、1つのマクロブロックが処理される毎に動き検出/補償部22から画質劣化度を示す情報を受け、現フレーム(現在符号化されている動画像フレーム)に含まれるマクロブロックの各々について画質劣化度を判定する。例えば、画質劣化度判定部101は、動き検出/補償部22からマクロブロックの各々に対応するSADが画質劣化度を示す情報として供給され、そのSADとSADについて予め設定された閾値Thr1,Thr2(ただし、Thr1<Thr2)とを比較する。そして、画質劣化度判定部101は、次のように、比較の結果に応じてマクロブロックの各々に対してフラグ値を割り当てる。
[Image quality degradation degree determination unit]
The image quality degradation level determination unit 101 receives information indicating the image quality degradation level from the motion detection / compensation unit 22 every time one macroblock is processed, and is included in the current frame (currently encoded video frame). The degree of image quality degradation is determined for each macroblock. For example, the image quality degradation degree determination unit 101 is supplied with SAD corresponding to each of the macroblocks from the motion detection / compensation unit 22 as information indicating the image quality degradation level, and thresholds Thr1, Thr2 (preliminarily set for the SAD and SAD). However, Thr1 <Thr2) is compared. Then, the image quality deterioration degree determination unit 101 assigns a flag value to each macroblock according to the comparison result as follows.

〈比較の結果〉 〈フラグ値〉
SAD<Thr1 ・・・・ “0”
Thr1≦SAD<Thr2 ・・・・ “1”
Thr2≦SAD ・・・・ “2”
このようにマクロブロックの各々にフラグ値を割り当てることにより、マクロブロックが複数のマクロブロック群に分類される。なお、画質劣化度が大きいほどフラグ値が大きくなるように、マクロブロックの各々に対してフラグ値を割り当てることが好ましい。また、閾値は、3つ以上あっても良い。
<Comparison result><Flagvalue>
SAD <Thr1 ・ ・ ・ ・ “0”
Thr1 ≦ SAD <Thr2... “1”
Thr2 ≦ SAD ・ ・ ・ ・ “2”
In this way, by assigning a flag value to each macroblock, the macroblock is classified into a plurality of macroblock groups. In addition, it is preferable to assign a flag value to each macroblock so that the flag value increases as the image quality degradation degree increases. Further, there may be three or more threshold values.

〔リフレッシュマップ生成部〕
リフレッシュマップ生成部102は、動画像フレーム内におけるマクロブロックの位置とそのマクロブロックに割り当てられたフラグ値との対応関係を示すリフレッシュマップ(図2A参照)を保持しており、そのリフレッシュマップに画質劣化度判定部101による分類結果(フラグ値の割当結果)を書き込む。
[Refresh map generator]
The refresh map generation unit 102 holds a refresh map (see FIG. 2A) indicating the correspondence between the position of a macroblock in a moving image frame and the flag value assigned to the macroblock, and the image quality is included in the refresh map. The classification result (flag value allocation result) by the deterioration degree determination unit 101 is written.

〔リフレッシュ数設定部〕
リフレッシュ数設定部103は、画質劣化度判定部101において使用されるフラグ値の各々に対してリフレッシュ数(次フレーム期間内においてリフレッシュ処理を実行すべきマクロブロックの数)を対応付ける。例えば、リフレッシュ数設定部103は、次のように、フラグ値の各々にリフレッシュ数を対応付ける。
[Refresh number setting section]
The refresh number setting unit 103 associates each of the flag values used in the image quality degradation level determination unit 101 with the refresh number (the number of macroblocks to be refreshed within the next frame period). For example, the refresh number setting unit 103 associates the refresh number with each flag value as follows.

〈フラグ値〉 〈リフレッシュ数〉
“0” ・・・・・・・ 0
“1” ・・・・・・・ 2
“2” ・・・・・・・ 4
このように、フラグ値の各々にリフレッシュ数を対応付けることにより、画質劣化度判定部101によって分類されたブロック群毎にリフレッシュ数が設定される。なお、フラグ値が大きいほど(すなわち、画質劣化度が大きいマクロブロック群ほど)リフレッシュ数が大きくなるように、フラグ値の各々にリフレッシュ数を割り当てることが望ましい。
<Flag value><Number of refreshes>
“0” ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ 0
“1” 2
“2” ・ ・ ・ ・ ・ ・ 4
In this way, by associating the refresh number with each flag value, the refresh number is set for each block group classified by the image quality degradation degree determination unit 101. Note that it is desirable to assign a refresh number to each flag value so that the larger the flag value (that is, the larger the macroblock group having a higher image quality degradation degree), the larger the refresh number.

〔リフレッシュ制御部〕
リフレッシュ制御部104は、リフレッシュマップ生成部102によって生成されたリフレッシュマップを参照して、同一フラグ値が割り当てられたマクロブロックの中からリフレッシュ数設定部103によってそのフラグ値に割り当てられたリフレッシュ数と同数のマクロブロックを候補マクロブロック(次フレーム期間内においてリフレッシュ処理を実行すべきマクロブロック)として選択する。例えば、リフレッシュ制御部104は、フラグ値“0”が割り当てられたマクロブロックのいずれも選択せず、フラグ値“1”が割り当てられたマクロブロックの中から2個を選択し、フラグ値“2”が割り当てられたマクロブロックの中から4個を選択する(図2B参照)。
[Refresh control unit]
The refresh control unit 104 refers to the refresh map generated by the refresh map generation unit 102, and selects the refresh number assigned to the flag value by the refresh number setting unit 103 from among the macro blocks assigned the same flag value. The same number of macroblocks are selected as candidate macroblocks (macroblocks to be refreshed within the next frame period). For example, the refresh control unit 104 does not select any of the macro blocks to which the flag value “0” is assigned, selects two of the macro blocks to which the flag value “1” is assigned, and sets the flag value “2”. 4 are selected from the macroblocks to which "" is assigned (see FIG. 2B).

また、リフレッシュ制御部104は、次フレーム(現フレームの次に符号化される動画像フレーム)に含まれる複数のマクロブロックのうち選択した候補マクロブロックと同位置に存在するマクロブロックが符号化される際に、リフレッシュ制御信号を出力してモード選択部11にイントラ符号化を選択させる。これにより、候補マクロブロックに対応する次フレームのマクロブロックに対して、リフレッシュ処理が実行される。さらに、リフレッシュ制御部104は、リフレッシュマップ生成部102にリフレッシュ制御信号を出力し、リフレッシュマップのうちリフレッシュ位置(リフレッシュ処理が実行されたマクロブロックの位置)にフラグ値“0”を書き込ませる(図2C参照)。   In addition, the refresh control unit 104 encodes a macroblock existing at the same position as the selected candidate macroblock among a plurality of macroblocks included in the next frame (moving image frame encoded next to the current frame). In this case, a refresh control signal is output to cause the mode selection unit 11 to select intra coding. As a result, the refresh process is executed for the macroblock of the next frame corresponding to the candidate macroblock. Further, the refresh control unit 104 outputs a refresh control signal to the refresh map generation unit 102, and causes the flag value “0” to be written in the refresh position (the position of the macro block on which the refresh process has been executed) in the refresh map (see FIG. 2C).

次に、図3を参照しつつ、図1に示した動画像符号化装置1によるリフレッシュ処理について説明する。なお、ここでは、動画像フレームの下半分の領域における画質劣化度は、動画像フレームの上半分の領域よりも大きいものとし、フラグ値“0”,“1”,“2”には、それぞれ、リフレッシュ数“0”,“2”,“4”が割り当てられているものとする。   Next, with reference to FIG. 3, the refresh process by the moving picture encoding apparatus 1 shown in FIG. 1 will be described. Here, it is assumed that the image quality degradation degree in the lower half area of the moving image frame is larger than that in the upper half area of the moving image frame, and the flag values “0”, “1”, and “2” are respectively Assume that the refresh numbers “0”, “2”, and “4” are assigned.

1フレーム目では、動画像フレームの上半分の領域は、フラグ値“1”が割り当てられた12個のマクロブロックを含み、下半分の領域は、フラグ値“2”が割り当てられた12個のマクロブロックを含む。   In the first frame, the upper half area of the moving image frame includes twelve macroblocks to which the flag value “1” is assigned, and the lower half area includes twelve macro blocks to which the flag value “2” is assigned. Contains macroblocks.

次に、2フレーム目では、フラグ値“1”のマクロブロック群のうち2個のマクロブロックに対してリフレッシュ処理が行われ、フラグ値“2”のマクロブロック群のうち4個のマクロブロックに対してリフレッシュ処理が行われる。リフレッシュマップのうちリフレッシュされたマクロブロックの位置には、フラグ値“0”が書き込まれる。   Next, in the second frame, refresh processing is performed on two macroblocks in the macroblock group having the flag value “1”, and four macroblocks in the macroblock group having the flag value “2” are processed. On the other hand, a refresh process is performed. A flag value “0” is written at the position of the refreshed macroblock in the refresh map.

続いて、3,4フレーム目においても、2フレーム目と同様に、フラグ値“1”のマクロブロック群から2個ずつリフレッシュされ、フラグ値“2”のマクロブロック群から4個ずつリフレッシュされる。4フレーム目では、フラグ値“2”のマクロブロックの全てに対してリフレッシュが完了する。   Subsequently, in the 3rd and 4th frames, as in the 2nd frame, 2 refreshes are performed from the macroblock group having the flag value “1”, and 4 refreshes are performed from the macroblock group having the flag value “2”. . In the fourth frame, the refresh is completed for all the macro blocks having the flag value “2”.

以上のように、画質劣化度に応じてリフレッシュすべきマクロブロックを選択することにより、動画像フレーム内において画質劣化度の大きい領域を優先的にリフレッシュすることができるので、画質劣化が局所的に激しくなることを抑制でき、その結果、画質劣化を目立ちにくくすることができる。   As described above, by selecting a macroblock to be refreshed in accordance with the degree of image quality degradation, it is possible to preferentially refresh an area with a large degree of image quality degradation in a moving image frame, so that the image quality degradation is locally It is possible to suppress the intensification, and as a result, it is possible to make the image quality deterioration less noticeable.

また、リフレッシュの対象となるマクロブロックの数が多くなる程、発生符号量(可変長符号化部から出力される符号化データのデータ量)が多くなる。この場合、発生符号量を所定値に近づけるために符号量制御回路(図示せず)が量子化パラメータ値を大きくするので、結果的に、マクロブロックの画質劣化が発生してしまう。しかし、この実施形態による動画像符号化装置1では、画質劣化度の小さいマクロブロック群に対応するリフレッシュ数を画質劣化度の大きいマクロブロック群に対応するリフレッシュ数よりも少なくすることにより、リフレッシュ数の合計を少なくすることができるので、発生符号量の増加を抑制することができる。   Further, as the number of macro blocks to be refreshed increases, the amount of generated code (the amount of encoded data output from the variable length encoding unit) increases. In this case, since the code amount control circuit (not shown) increases the quantization parameter value in order to bring the generated code amount close to a predetermined value, as a result, the image quality deterioration of the macroblock occurs. However, in the moving picture encoding apparatus 1 according to this embodiment, the number of refreshes is reduced by reducing the number of refreshes corresponding to the macroblock group having a low image quality deterioration degree to the number of refreshes corresponding to the macroblock group having a high image quality deterioration degree. Therefore, the increase in the amount of generated codes can be suppressed.

(実施形態2)
図5は、この発明の実施形態2による動画像符号化装置の構成を示す。この動画像符号化装置2では、前フレームの発生符号量(可変長符号化部17による前フレームの可変長符号化によって発生した符号量)に応じてリフレッシュ数(すなわち、マクロブロック群の各々から選択される候補ブロックの数)が変更される。この動画像符号化装置2は、図1に示した構成に加えて、リフレッシュ数変更部201をさらに備える。
(Embodiment 2)
FIG. 5 shows the configuration of a moving picture coding apparatus according to Embodiment 2 of the present invention. In this moving image encoding apparatus 2, the number of refreshes (that is, from each of the macroblock groups) according to the generated code amount of the previous frame (the code amount generated by the variable length encoding of the previous frame by the variable length encoding unit 17). The number of candidate blocks to be selected) is changed. The moving picture encoding apparatus 2 further includes a refresh number changing unit 201 in addition to the configuration shown in FIG.

リフレッシュ数変更部201は、前フレームの発生符号量に応じて、リフレッシュ数設定部103によってフラグ値に各々に対応付けられたリフレッシュ数を変更する。また、リフレッシュ数変更部201は、フラグ値が大きいほど(すなわち、画質劣化度の大きいマクロブロック群ほど)そのフラグ値に対応するリフレッシュ数の増減量が少なくなるように、リフレッシュ数を変更する。   The refresh number changing unit 201 changes the refresh number associated with each flag value by the refresh number setting unit 103 according to the generated code amount of the previous frame. In addition, the refresh number changing unit 201 changes the refresh number so that the increase / decrease amount of the refresh number corresponding to the flag value decreases as the flag value increases (that is, as the macroblock group has a higher image quality degradation degree).

例えば、図5のように、リフレッシュ数設定部103がフラグ値“0”,“1”,“2”,“3”のそれぞれに対応するリフレッシュ数Nr0,Nr1,Nr2,Nr3を“0”,“2”,“3”,“5”に設定していたとする。この場合、リフレッシュ数の合計は、“10”である。ここで、発生符号量が多くなると(例えば、発生符号量が上限閾値よりも多い場合)、リフレッシュ数変更部201は、リフレッシュ数Nr1,Nr2をそれぞれ“0”,“2”に変更する。これにより、リフレッシュ数の合計は減少して“7”になる。逆に、発生符号量が少なくなると(例えば、発生符号量が下限閾値よりも少ない場合)、リフレッシュ数変更部201は、リフレッシュ数Nr1,Nr2をそれぞれ“4”,“4”に変更する。これにより、リフレッシュ数の合計は増加して“13”になる。   For example, as shown in FIG. 5, the refresh number setting unit 103 sets the refresh numbers Nr0, Nr1, Nr2, and Nr3 corresponding to the flag values “0”, “1”, “2”, and “3” to “0”, Assume that “2”, “3”, and “5” are set. In this case, the total number of refreshes is “10”. Here, when the generated code amount increases (for example, when the generated code amount is larger than the upper limit threshold), the refresh number changing unit 201 changes the refresh numbers Nr1 and Nr2 to “0” and “2”, respectively. As a result, the total number of refreshes decreases to “7”. On the contrary, when the generated code amount decreases (for example, when the generated code amount is smaller than the lower limit threshold), the refresh number changing unit 201 changes the refresh numbers Nr1 and Nr2 to “4” and “4”, respectively. As a result, the total number of refreshes increases to “13”.

次に、図6を参照しつつ、図4に示したリフレッシュ数変更部201による動作について説明する。なお、ここではフラグ値“0”,“1”,“2”,“3”には、それぞれ、リフレッシュ数“0”,“2”,“3”,“5”が割り当てられているものとする。   Next, the operation of the refresh number changing unit 201 shown in FIG. 4 will be described with reference to FIG. Here, the flag values “0”, “1”, “2”, and “3” are assigned the refresh numbers “0”, “2”, “3”, and “5”, respectively. To do.

1フレーム目では、動画像フレームの上部領域は、フラグ値“1”が割り当てられたマクロブロックを含み、中部領域は、フラグ値“2”が割り当てられたマクロブロックを含み、下部領域は、フラグ値“3”が割り当てられたマクロブロックを含む。   In the first frame, the upper area of the moving image frame includes a macroblock to which a flag value “1” is assigned, the middle area includes a macroblock to which a flag value “2” is assigned, and the lower area includes a flag Includes macroblocks assigned the value “3”.

次に、2フレーム目では、フラグ値“1”のマクロブロックのうち2個に対してリフレッシュ処理が行われ、フラグ値“2”のマクロブロックのうち3個に対してリフレッシュ処理が行われ、フラグ値“3”のマクロブロックのうち5個に対してリフレッシュ処理が行われる。リフレッシュマップのうちリフレッシュされたマクロブロックの位置には、フラグ値“0”が書き込まれる。   Next, in the second frame, refresh processing is performed on two of the macro blocks having the flag value “1”, refresh processing is performed on three of the macro blocks having the flag value “2”, Refresh processing is performed on five of the macro blocks having the flag value “3”. A flag value “0” is written at the position of the refreshed macroblock in the refresh map.

ここで、2フレーム目の動画像フレームの発生符号量が多い場合、フラグ値“1”に対応するリフレッシュ数が“2”から“0”に変更され、フラグ値“2”に対応するリフレッシュ数が“3”から“2”に変更される。これにより、図6の上列のように、3フレーム目,4フレーム目では、リフレッシュされるマクロブロックの総数が2フレーム目よりも少なくなっている。しかし、4フレーム目において、フラグ値“3”のマクロブロックの全てに対してリフレッシュが完了する。   Here, when the generated code amount of the second moving image frame is large, the refresh number corresponding to the flag value “1” is changed from “2” to “0”, and the refresh number corresponding to the flag value “2”. Is changed from “3” to “2”. Thereby, as shown in the upper row of FIG. 6, the total number of refreshed macroblocks is smaller in the third and fourth frames than in the second frame. However, in the fourth frame, the refresh is completed for all the macro blocks having the flag value “3”.

一方、2フレーム目の動画像フレームの発生符号量が少ない場合、フラグ値“1”に対応するリフレッシュ数が“2”から“4”に変更され、フラグ値“2”に対応するリフレッシュ数が“3”から“4”に変更される。これにより、図6の下列のように、3フレーム目,4フレーム目では、リフレッシュされるマクロブロックの総数が2フレーム目よりも多くなっている。これにより、4フレーム目において、フラグ値“3”のマクロブロックだけでなく、フラグ値“1”,“2”の全てに対してもリフレッシュが完了する。   On the other hand, when the generated code amount of the second frame is small, the refresh number corresponding to the flag value “1” is changed from “2” to “4”, and the refresh number corresponding to the flag value “2” is changed. “3” is changed to “4”. As a result, as shown in the lower row of FIG. 6, the total number of macroblocks to be refreshed is larger in the third and fourth frames than in the second frame. As a result, in the fourth frame, the refresh is completed not only for the macro block having the flag value “3” but also for all the flag values “1” and “2”.

以上のように、発生符号量に応じてリフレッシュ数の合計を変更することにより、発生符号量の増大を抑制することができる。その結果、符号量制御に伴う画質劣化の増大を抑制することができる。   As described above, an increase in the generated code amount can be suppressed by changing the total number of refreshes according to the generated code amount. As a result, it is possible to suppress an increase in image quality degradation associated with code amount control.

また、画質劣化度の大きいマクロブロック群ほど、そのマクロブロック群に対応するリフレッシュ数の増減量が少なくなるように制御することにより、画質劣化度の大きい領域においてリフレッシュされるブロックの数が安定させることができる。そのため、発生符号量が増減しても、画質劣化度の大きい領域を優先的にリフレッシュすることができる。これにより、動画像フレームの画質劣化を抑制しつつ発生符号量の増大を抑制することができる。   Further, by controlling the macro block group having a higher image quality degradation level so that the increase / decrease amount of the refresh number corresponding to the macro block group is reduced, the number of blocks to be refreshed in the region having the higher image quality degradation level is stabilized. be able to. For this reason, even if the generated code amount increases or decreases, it is possible to preferentially refresh an area where the image quality degradation degree is large. As a result, it is possible to suppress an increase in the amount of generated codes while suppressing image quality deterioration of the moving image frame.

(撮像システム)
図8のように、各実施形態による動画像符号化装置は、撮像システムに適用可能である。図8に示した撮像システムは、動画像符号化装置1を含む画像処理回路33の他に、レンズ(光学系)30と、センサ31と、アナログ・デジタル変換回路32と、記録回路34と、再生回路35と、タイミング制御回路36と、システム制御回路37とを備える。
(Imaging system)
As shown in FIG. 8, the moving image encoding apparatus according to each embodiment can be applied to an imaging system. The imaging system shown in FIG. 8 includes a lens (optical system) 30, a sensor 31, an analog / digital conversion circuit 32, a recording circuit 34, in addition to the image processing circuit 33 including the moving image encoding device 1. A reproduction circuit 35, a timing control circuit 36, and a system control circuit 37 are provided.

この撮像システム3では、レンズ(光学系)30を通って入射した画像光がセンサ31上に結像され、光電変換される。光電変換によって得られた電気信号は、アナログ・デジタル変換回路32によってデジタル信号に変換された後、画像処理回路33に供給される。画像処理回路33は、Y/C処理,エッジ処理,画像の拡大縮小,JPEGやMPEG等の画像圧縮/伸張処理,画像圧縮されたストリームの制御等を実行する。画像処理回路33によって処理された信号は、記録回路34に記録される。記録回路34に記録された信号は、再生回路35により再生される。センサ31および画像処理回路33に含まれる動画像符号化装置1は、タイミング制御回路36により制御され、レンズ30,記録回路34,再生回路35,およびタイミング制御回路36は、それぞれ、システム制御回路37により制御される。   In the imaging system 3, the image light incident through the lens (optical system) 30 is imaged on the sensor 31 and subjected to photoelectric conversion. The electrical signal obtained by the photoelectric conversion is converted into a digital signal by the analog / digital conversion circuit 32 and then supplied to the image processing circuit 33. The image processing circuit 33 executes Y / C processing, edge processing, image enlargement / reduction, image compression / expansion processing such as JPEG and MPEG, and control of an image compressed stream. The signal processed by the image processing circuit 33 is recorded in the recording circuit 34. The signal recorded in the recording circuit 34 is reproduced by the reproduction circuit 35. The moving image encoding apparatus 1 included in the sensor 31 and the image processing circuit 33 is controlled by a timing control circuit 36, and the lens 30, the recording circuit 34, the reproduction circuit 35, and the timing control circuit 36 are respectively a system control circuit 37. Controlled by

なお、記録回路34に代えて、画像処理回路33によって処理された信号をインターネット等を介して伝送する伝送回路が備えられていても良い。この場合、再生回路35は、伝送回路によって伝送された信号を再生する。   Instead of the recording circuit 34, a transmission circuit that transmits the signal processed by the image processing circuit 33 via the Internet or the like may be provided. In this case, the reproduction circuit 35 reproduces the signal transmitted by the transmission circuit.

また、図8に示した撮像システムでは、レンズ30からの画像光をセンサ31で光電変換してアナログ・デジタル変換回路32に入力するカメラ機器等について説明したが、本発明はこれに限定されるものではなく、その他、テレビ等のAV機器のアナログ映像入力を直接にアナログ・デジタル変換回路32に供給しても良い。   In the imaging system shown in FIG. 8, the camera device or the like that photoelectrically converts the image light from the lens 30 by the sensor 31 and inputs the image light to the analog / digital conversion circuit 32 has been described, but the present invention is limited to this. In addition, the analog video input of an AV device such as a television may be directly supplied to the analog / digital conversion circuit 32.

(その他の実施形態)
以上の各実施形態において、画質劣化度を示す情報として差分絶対値和(SAD)を例に挙げて説明したが、これに限らずその他のパラメータ(例えば、画像の複雑度を現すアクティビティなど)を用いても構わない。さらに、画質劣化度を示す複数のパラメータを組み合わせて用いても構わない。
(Other embodiments)
In each of the above embodiments, the sum of absolute differences (SAD) has been described as an example of the information indicating the degree of image quality degradation. You may use. Furthermore, a plurality of parameters indicating the image quality degradation degree may be used in combination.

また、各実施形態による動画像符号化装置は、ハードウェアで実現されても良い。例えば、動画像符号化装置は、典型的には集積回路であるLSIとして実現される。動画像符号化装置を1チップ化しても良いし、動画像符号化装置を構成する機能ブロックの一部または全てを含むように1チップ化しても良い。なお、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。集積回路化の手法は、LSIに限るものではなく、専用回路または汎用プロセッサで実現しても良い。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用しても良い。さらには、半導体技術の進歩または派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行っても良い。   In addition, the moving image encoding apparatus according to each embodiment may be realized by hardware. For example, a moving image encoding apparatus is typically realized as an LSI that is an integrated circuit. The moving picture coding apparatus may be made into one chip, or may be made into one chip so as to include a part or all of the functional blocks constituting the moving picture coding apparatus. Although referred to as LSI, it may be called IC, system LSI, super LSI, or ultra LSI depending on the degree of integration. The method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used. Furthermore, if integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology.

また、各実施形態による動画像符号化装置は、ソフトウェアで実現されても良い。例えば、動画像符号化装置の制御ステップをプログラム化し、記録媒体(例えば、半導体メモリやハードディスクなど)に記録し、そのプログラムによってCPUなどで構成されるコンピュータを動作させても良い。   Moreover, the moving image encoding apparatus according to each embodiment may be realized by software. For example, the control steps of the moving picture coding apparatus may be programmed, recorded on a recording medium (for example, a semiconductor memory or a hard disk), and a computer including a CPU may be operated by the program.

この発明による動画像符号化方法および装置は、動画像フレームの画質劣化(主観的な画像劣化)を目立ちにくくすることができるので、監視カメラやネットワークカメラなどに有用である。   The moving image coding method and apparatus according to the present invention can make the deterioration of image quality (subjective image deterioration) of moving image frames inconspicuous, and is useful for surveillance cameras and network cameras.

この発明の実施形態1による動画像符号化装置の構成図。BRIEF DESCRIPTION OF THE DRAWINGS The block diagram of the moving image encoder by Embodiment 1 of this invention. リフレッシュマップについて説明するための図。The figure for demonstrating a refresh map. 図1に示した動画像符号化装置によるリフレッシュ処理について具体的に説明するための図。The figure for demonstrating concretely the refresh process by the moving image encoder shown in FIG. この発明の実施形態2による動画像符号化装置の構成図。The block diagram of the moving image encoder by Embodiment 2 of this invention. 発生符号量とリフレッシュ数との対応関係について説明するための図。The figure for demonstrating the correspondence of generated code amount and the number of refreshes. 図5に示した動画像符号化装置によるリフレッシュ処理について具体的に説明するための図。The figure for demonstrating concretely the refresh process by the moving image encoder shown in FIG. この発明の実施形態3による撮像システムの構成図。The block diagram of the imaging system by Embodiment 3 of this invention. 従来のリフレッシュ処理について説明するための図。The figure for demonstrating the conventional refresh process.

符号の説明Explanation of symbols

1,2 動画像符号化装置
11 モード制御部
12 ブロック化部
13 減算部
14 直交変換部
15 量子化部
16 可変長符号化部
17 逆量子化部
18 逆直交変換部
19 セレクタ
20 加算部
21 メモリ
22 動き検出/補償部
23 イントラ予測部
101 画質劣化度判定部
102 リフレッシュマップ生成部
103 リフレッシュ数設定部
104 リフレッシュ制御部
201 リフレッシュ数変更部
30 レンズ(光学系)
31 センサ
32 アナログ/デジタル変換回路
33 画像処理回路
34 記録回路
35 再生回路
36 タイミング制御回路
37 システム制御回路
DESCRIPTION OF SYMBOLS 1, 2 Moving image encoder 11 Mode control part 12 Blocking part 13 Subtraction part 14 Orthogonal transformation part 15 Quantization part 16 Variable length encoding part 17 Inverse quantization part 18 Inverse orthogonal transformation part 19 Selector 20 Addition part 21 Memory 22 motion detection / compensation unit 23 intra prediction unit 101 image quality degradation level determination unit 102 refresh map generation unit 103 refresh number setting unit 104 refresh control unit 201 refresh number change unit 30 lens (optical system)
31 Sensor 32 Analog / Digital Conversion Circuit 33 Image Processing Circuit 34 Recording Circuit 35 Reproduction Circuit 36 Timing Control Circuit 37 System Control Circuit

Claims (14)

動画像フレームを所定サイズのブロック単位でイントラ符号化またはインター符号化することにより複数の動画像フレームを順次符号化する方法であって、
第1の動画像フレームに含まれる複数のブロックの各々の画質劣化度に応じてその複数のブロックの各々を複数のブロック群に分類するステップ(a)と、
前記ステップ(a)において分類された複数のブロック群の各々からそのブロック群の画質劣化度に対応した数のブロックを候補ブロックとして選択するステップ(b)と、
前記第1の動画像フレームよりも後に符号化される第2の動画像フレームに含まれる複数のブロックのうち前記ステップ(b)において選択された候補ブロックに対応するブロックに対して前記イントラ符号化を強制的に実行するステップ(c)とを備える
ことを特徴とする動画像符号化方法。
A method of sequentially encoding a plurality of video frames by intra-coding or inter-coding the video frames in units of a predetermined size block,
Classifying each of the plurality of blocks into a plurality of block groups according to the degree of image quality degradation of each of the plurality of blocks included in the first moving image frame;
Selecting a number of blocks corresponding to the image quality degradation degree of the block group from each of the plurality of block groups classified in the step (a) as candidate blocks;
The intra coding is performed on a block corresponding to the candidate block selected in the step (b) among a plurality of blocks included in a second moving image frame encoded after the first moving image frame. And (c) forcibly executing the moving picture encoding method.
請求項1において、
前記ステップ(b)では、画質劣化度が大きいブロック群ほどそのブロック群から選択される候補ブロックの数を多くする
ことを特徴とする動画像符号化方法。
In claim 1,
In the step (b), the moving picture encoding method is characterized in that the number of candidate blocks selected from a block group having a higher image quality deterioration degree is increased.
請求項1または請求項2において、
前記複数のブロック群は、それぞれ、画質劣化度についての複数の閾値に対応し、
前記複数の閾値は、それぞれ、複数のフラグ値に対応し、
前記複数のフラグ値は、それぞれ、複数のリフレッシュ数に対応し、
前記ステップ(a)では、前記複数のブロックの各々の画質劣化度と前記複数の閾値とを比較し、比較結果に対応するフラグ値をそのブロックに割り当て、
前記ステップ(b)では、同一フラグ値が割り当てられたブロックの中からそのフラグ値に対応するリフレッシュ数と同数の候補ブロックを選択する
ことを特徴とする動画像符号化方法。
In claim 1 or claim 2,
Each of the plurality of block groups corresponds to a plurality of threshold values for the degree of image quality degradation,
The plurality of threshold values respectively correspond to a plurality of flag values;
Each of the plurality of flag values corresponds to a plurality of refresh numbers,
In the step (a), the image quality degradation degree of each of the plurality of blocks is compared with the plurality of threshold values, and a flag value corresponding to the comparison result is assigned to the block,
In the step (b), the same number of candidate blocks as the number of refreshes corresponding to the flag value are selected from the blocks to which the same flag value is assigned.
請求項1〜3のいずれか1項において、
発生符号量に応じて、前記ステップ(b)において前記複数のブロック群の各々から選択される候補ブロックの数を変更するステップ(d)をさらに備える
ことを特徴とする動画像符号化方法。
In any one of Claims 1-3,
A moving picture coding method, further comprising a step (d) of changing the number of candidate blocks selected from each of the plurality of block groups in the step (b) according to a generated code amount.
請求項4において、
前記ステップ(d)では、画質劣化度の大きいブロック群ほどそのブロック群から選択される候補ブロックの数の増減量が少なくなるように、前記発生符号量に応じて前記複数のブロック群の各々から選択される候補ブロックの数を変更する
ことを特徴とする動画像符号化方法。
In claim 4,
In the step (d), from each of the plurality of block groups according to the generated code amount, the block group having a higher image quality degradation degree has a smaller increase / decrease amount of candidate blocks selected from the block group. A moving picture encoding method, wherein the number of candidate blocks to be selected is changed.
請求項1〜5のいずれか1項において、
前記ステップ(a)では、前記複数のブロックの各々の画質劣化度を、そのブロックとそのブロックに対応する予測ブロックとの差分絶対値和に基づいて評価する
ことを特徴とする動画像符号化方法。
In any one of Claims 1-5,
In the step (a), a moving picture coding method characterized in that the degree of image quality degradation of each of the plurality of blocks is evaluated based on a sum of absolute differences between the block and a prediction block corresponding to the block. .
請求項1〜6のいずれか1項に記載の動画像符号化方法をコンピュータに実行させる
ことを特徴とするプログラム。
A program for causing a computer to execute the moving picture encoding method according to claim 1.
複数の動画像フレームを順次符号化する装置であって、
動画像フレームを所定サイズのブロック単位でイントラ符号化またはインター符号化する符号化部と、
前記符号化部によって符号化された動画像フレームに含まれる複数のブロックの各々について画質劣化度を判定し、その複数のブロックの各々を画質劣化度に応じて複数のブロック群に分類する画質劣化度判定部と、
前記画質劣化度判定部によって分類された複数のブロック群の各々からそのブロック群の画質劣化度に対応した数のブロックを候補ブロックとして選択し、次に符号化すべき動画像フレームに含まれる複数のブロックのうちその選択した候補ブロックに対応するブロックに対して前記符号化部に前記イントラ符号化を実行させるリフレッシュ制御部とを備える
ことを特徴とする動画像符号化装置。
An apparatus for sequentially encoding a plurality of moving image frames,
An encoding unit that performs intra encoding or inter encoding on a moving image frame in units of a predetermined size block;
Degradation of image quality for each of a plurality of blocks included in a moving image frame encoded by the encoding unit, and classifying each of the plurality of blocks into a plurality of block groups according to the degree of image quality deterioration A degree determination unit;
From each of the plurality of block groups classified by the image quality deterioration degree determination unit, a number of blocks corresponding to the image quality deterioration degree of the block group are selected as candidate blocks, and a plurality of blocks included in the moving image frame to be encoded next are selected. A moving picture encoding apparatus comprising: a refresh control unit that causes the encoding unit to execute the intra encoding on a block corresponding to the selected candidate block among blocks.
請求項8において、
前記リフレッシュ制御部は、画質劣化度が大きいブロック群ほどそのブロック群から選択する候補ブロックの数を多くする
ことを特徴とする動画像符号化装置。
In claim 8,
The moving picture coding apparatus, wherein the refresh control unit increases the number of candidate blocks to be selected from a block group having a higher degree of image quality degradation.
請求項8または請求項9において、
前記複数のブロック群は、それぞれ、画質劣化度についての複数の閾値に対応し、
前記複数の閾値は、それぞれ、複数のフラグ値に対応し、
前記複数のフラグ値は、それぞれ、複数のリフレッシュ数に対応し、
前記画質劣化度判定部は、前記複数のブロックの各々の画質劣化度と前記複数の閾値とを比較し、比較結果に対応するフラグ値をそのブロックに割り当て、
前記リフレッシュ制御部は、同一フラグ値が割り当てられたブロックの中からそのフラグ値に対応するリフレッシュ数と同数の候補ブロックを選択する
ことを特徴とする動画像符号化方装置。
In claim 8 or claim 9,
Each of the plurality of block groups corresponds to a plurality of threshold values for the degree of image quality degradation,
The plurality of threshold values respectively correspond to a plurality of flag values;
Each of the plurality of flag values corresponds to a plurality of refresh numbers,
The image quality deterioration degree determination unit compares the image quality deterioration degree of each of the plurality of blocks with the plurality of threshold values, and assigns a flag value corresponding to the comparison result to the block,
The moving picture coding method apparatus, wherein the refresh control unit selects the same number of candidate blocks as the number of refreshes corresponding to the flag value from among the blocks to which the same flag value is assigned.
請求項8〜10のいずれか1項において、
発生符号量に応じて、前記リフレッシュ制御部によって前記複数のブロック群の各々から選択される候補ブロックの数を変更するリフレッシュ数変更部をさらに備える
ことを特徴とする動画像符号化装置。
In any one of Claims 8-10,
The moving picture encoding apparatus, further comprising: a refresh number changing unit that changes the number of candidate blocks selected from each of the plurality of block groups by the refresh control unit according to a generated code amount.
請求項11において、
前記リフレッシュ数変更部は、画質劣化度の大きいブロック群ほどそのブロック群から選択される候補ブロックの数の増減量が少なくなるように、前記発生符号量に応じて前記複数のブロック群の各々から選択される候補ブロックの数を変更する
ことを特徴とする動画像符号化装置。
In claim 11,
The refresh number changing unit determines whether the block group having a higher image quality degradation degree has a smaller increase / decrease amount of the number of candidate blocks selected from the block group, from each of the plurality of block groups according to the generated code amount. A moving picture coding apparatus characterized by changing the number of candidate blocks to be selected.
請求項8〜12のいずれか1項において、
前記ステップ(a)では、前記複数のブロックの各々の画質劣化度を、そのブロックとそのブロックに対応する予測ブロックとの差分絶対値和に基づいて評価する
ことを特徴とする動画像符号化装置。
In any one of Claims 8-12,
In the step (a), a moving picture coding apparatus characterized in that an image quality degradation degree of each of the plurality of blocks is evaluated based on a sum of absolute differences between the block and a prediction block corresponding to the block. .
請求項8〜13のいずれか1項に記載の動画像符号化装置を含む画像処理回路と、
被写体の映像を電気信号に変換する撮像回路と、
前記撮像回路からの電気信号をデジタル信号に変換して前記画像処理回路に供給するアナログ・デジタル変換回路とを備える
ことを特徴とする撮像システム。
An image processing circuit including the moving image encoding device according to any one of claims 8 to 13,
An imaging circuit that converts an image of a subject into an electrical signal;
An imaging system comprising: an analog / digital conversion circuit that converts an electrical signal from the imaging circuit into a digital signal and supplies the digital signal to the image processing circuit.
JP2008118746A 2008-04-30 2008-04-30 Method and apparatus for encoding moving image Pending JP2009272672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008118746A JP2009272672A (en) 2008-04-30 2008-04-30 Method and apparatus for encoding moving image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008118746A JP2009272672A (en) 2008-04-30 2008-04-30 Method and apparatus for encoding moving image

Publications (1)

Publication Number Publication Date
JP2009272672A true JP2009272672A (en) 2009-11-19

Family

ID=41438889

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008118746A Pending JP2009272672A (en) 2008-04-30 2008-04-30 Method and apparatus for encoding moving image

Country Status (1)

Country Link
JP (1) JP2009272672A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107749988A (en) * 2011-10-24 2018-03-02 索尼公司 Code device and coding method, decoding apparatus and coding/decoding method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107749988A (en) * 2011-10-24 2018-03-02 索尼公司 Code device and coding method, decoding apparatus and coding/decoding method
CN107749988B (en) * 2011-10-24 2021-06-22 索尼公司 Encoding device and encoding method, decoding device and decoding method

Similar Documents

Publication Publication Date Title
JP2009182623A (en) Image encoding method
US20100166073A1 (en) Multiple-Candidate Motion Estimation With Advanced Spatial Filtering of Differential Motion Vectors
JP4570532B2 (en) Motion detection device, motion detection method, integrated circuit, and program
JP4529919B2 (en) Adaptive quantization apparatus and adaptive quantization program
JP3934568B2 (en) Video coding method and apparatus
US20150172687A1 (en) Multiple-candidate motion estimation with advanced spatial filtering of differential motion vectors
TWI670965B (en) Motion picture predictive coding apparatus and motion picture predictive coding method
JP2013504256A (en) Scene switching detection
WO2010109564A1 (en) Image encoding apparatus and image encoding method
JP2010057166A (en) Image coding apparatus, image coding method, integrated circuit, and camera
JP2010063092A (en) Image coding apparatus, image coding method, image coding integrated circuit and camera
JP2011250400A (en) Moving picture encoding apparatus and moving picture encoding method
JP4675383B2 (en) Image decoding apparatus and method, and image encoding apparatus
CN102300091B (en) Code device, electronic equipment, imaging device and imaging system
RU2602980C2 (en) Video predictive coding device, video predictive coding method, video predictive coding program, video predictive decoding device, video predictive decoding method and video predictive decoding program
JP2009272672A (en) Method and apparatus for encoding moving image
JP2009111647A (en) Apparatus for detecting motion vector and method for detecting motion vector
JP7359653B2 (en) Video encoding device
JP2000032474A (en) Dynamic image encoder
JP4222046B2 (en) Signal processing apparatus and method, recording medium, and program
JP4561701B2 (en) Video encoding device
JP2008072608A (en) Apparatus and method for encoding image
JP2007020123A (en) Apparatus and method for detecting motion
JP2009153227A (en) Image processing apparatus and image pickup apparatus using the same
JP2014075708A (en) Moving image encoder and moving image encoding method