JP2011071778A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2011071778A
JP2011071778A JP2009221625A JP2009221625A JP2011071778A JP 2011071778 A JP2011071778 A JP 2011071778A JP 2009221625 A JP2009221625 A JP 2009221625A JP 2009221625 A JP2009221625 A JP 2009221625A JP 2011071778 A JP2011071778 A JP 2011071778A
Authority
JP
Japan
Prior art keywords
image processing
value
quantization parameter
processing apparatus
code amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009221625A
Other languages
Japanese (ja)
Other versions
JP5342391B2 (en
Inventor
Kantatsu Chin
寒達 陳
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.)
MegaChips Corp
Original Assignee
MegaChips 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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP2009221625A priority Critical patent/JP5342391B2/en
Publication of JP2011071778A publication Critical patent/JP2011071778A/en
Application granted granted Critical
Publication of JP5342391B2 publication Critical patent/JP5342391B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To obtain an image processing apparatus that reduces a delay amount in comparison with when code amount control is performed in a GOP unit or a frame unit. <P>SOLUTION: The image processing apparatus 1 includes an encoder 2 for executing encoding including quantization processing of an image signal, and a control unit 3 for controlling a quantization parameter in the quantization processing. The control unit 3 determines a difference between a target code amount and a generation code amount about the prescribed number of macroblocks processed just previously on the basis of a target code amount per macroblock and the generation code amount about the prescribed number of macroblocks processed just previously. Then, the control unit 3 decides a quantization parameter about a macroblock of the present processing target as an increase and decrease value with respect to a reference value on the basis of a comparison result between the difference and a prescribed threshold. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像処理装置に関し、特に、動画像圧縮における符号量制御アルゴリズムに関する。   The present invention relates to an image processing apparatus, and more particularly to a code amount control algorithm in moving image compression.

符号量制御とは、発生符号量を制御することによって画質の最適化を図る技術である(例えば下記特許文献1,2参照)。現行の符号量制御アルゴリズムでは、GOP(Group Of Picture)単位又はフレーム単位で符号量制御を行うものが一般的である。例えばフレーム単位の符号量制御では、1フレームに対する割り当て符号量が算出され、当該符号量を超えないように、フレーム内の各マクロブロックに対する量子化パラメータが制御される。   The code amount control is a technique for optimizing the image quality by controlling the generated code amount (see, for example, Patent Documents 1 and 2 below). In the current code amount control algorithm, code amount control is generally performed in GOP (Group Of Picture) units or frame units. For example, in the code amount control for each frame, the allocated code amount for one frame is calculated, and the quantization parameter for each macroblock in the frame is controlled so as not to exceed the code amount.

特開平10−215460号公報Japanese Patent Laid-Open No. 10-215460 特開平10−243399号公報Japanese Patent Laid-Open No. 10-243399

GOP単位又はフレーム単位の符号量を目標符号量として制御する方法では、目標コンスタントビットレートを得るための平均区間が長く、符号量のピーク値として比較的大きな値が許容されるため、画質の向上を図ることが可能である。しかしながら、平均区間が長いということはバッファ時間が大きいことを意味し、エンコード処理に伴う遅延量が必然的に大きくなる。従って、GOP単位又はフレーム単位の符号量制御は、記録番組の再生等のような遅延制限のないアプリケーションには適しているが、遅延制限の厳しいアプリケーション(例えば無線伝送のテレビゲーム機)には適していない。   In the method of controlling the code amount in GOP units or frame units as the target code amount, the average interval for obtaining the target constant bit rate is long, and a relatively large value is allowed as the peak value of the code amount. Can be achieved. However, a long average interval means that the buffer time is large, and the amount of delay associated with the encoding process inevitably increases. Therefore, GOP-unit or frame-unit code amount control is suitable for applications without delay restrictions such as playback of recorded programs, but suitable for applications with severe delay restrictions (for example, wireless transmission video game machines). Not.

本発明はかかる事情に鑑みて成されたものであり、マクロブロックライン単位の符号量を目標符号量とする符号量制御を行うことによって、GOP単位やフレーム単位で符号量制御を行う場合と比較すると、遅延量を削減することが可能な画像処理装置を得ることを目的とするものである。   The present invention has been made in view of such circumstances, and compared with a case where code amount control is performed in units of GOPs or frames by performing code amount control using a code amount in units of macroblock lines as a target code amount. Then, it aims at obtaining the image processing apparatus which can reduce delay amount.

本発明の第1の態様に係る画像処理装置は、画像信号に対する量子化処理を含むエンコード処理を実行するエンコーダと、前記量子化処理における量子化パラメータを制御する制御部とを備え、前記制御部は、1マクロブロックあたりの目標符号量と、直前に処理した所定数のマクロブロックに関する発生符号量とに基づいて、前記直前に処理した所定数のマクロブロックに関する目標符号量と発生符号量との差を求め、その差と所定の第1のしきい値との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータを、基準値に対する増減値として決定することを特徴とするものである。   An image processing apparatus according to a first aspect of the present invention includes: an encoder that performs an encoding process including a quantization process for an image signal; and a control unit that controls a quantization parameter in the quantization process. Is based on the target code amount per macroblock and the generated code amount for the predetermined number of macroblocks processed immediately before, and the target code amount and generated code amount for the predetermined number of macroblocks processed immediately before A difference is obtained, and a quantization parameter relating to a current macroblock to be processed is determined as an increase / decrease value with respect to a reference value based on a comparison result between the difference and a predetermined first threshold value. It is.

第1の態様に係る画像処理装置によれば、制御部は、1マクロブロックあたりの目標符号量と、直前に処理した所定数のマクロブロックに関する発生符号量とに基づいて、直前に処理した所定数のマクロブロックに関する目標符号量と発生符号量との差を求める。そして、その差と所定の第1のしきい値との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータを決定する。従って、GOP単位やフレーム単位で符号量制御を行う場合と比較すると、遅延量を削減することが可能となる。   According to the image processing apparatus according to the first aspect, the control unit performs the predetermined processing performed immediately before based on the target code amount per macroblock and the generated code amount related to the predetermined number of macroblocks processed immediately before. The difference between the target code amount and the generated code amount for a number of macroblocks is obtained. Then, based on the comparison result between the difference and the predetermined first threshold, the quantization parameter for the current macroblock to be processed is determined. Therefore, the amount of delay can be reduced as compared with the case where code amount control is performed in GOP units or frame units.

本発明の第2の態様に係る画像処理装置は、第1の態様に係る画像処理装置において特に、前記制御部は、前記直前に処理した所定数のマクロブロックに関する発生符号量を、前記所定数に対応する幅の計算窓を有する移動累積演算によって求めることを特徴とするものである。   An image processing apparatus according to a second aspect of the present invention is the image processing apparatus according to the first aspect, in which the control unit determines the generated code amount related to the predetermined number of macroblocks processed immediately before the predetermined number. It is obtained by a moving accumulation operation having a calculation window having a width corresponding to.

第2の態様に係る画像処理装置によれば、制御部は、直前に処理した所定数のマクロブロックに関する発生符号量を、所定数に対応する幅の計算窓を有する移動累積演算によって求める。従って、直前に処理した所定数のマクロブロックに関する発生符号量の変動が移動累積演算によって平滑化されるため、制御の精度を向上することが可能となる。   According to the image processing apparatus according to the second aspect, the control unit obtains the generated code amount related to the predetermined number of macro blocks processed immediately before by a moving accumulation operation having a calculation window having a width corresponding to the predetermined number. Therefore, the fluctuation of the generated code amount regarding the predetermined number of macroblocks processed immediately before is smoothed by the movement accumulation calculation, so that the control accuracy can be improved.

本発明の第3の態様に係る画像処理装置は、第1又は第2の態様に係る画像処理装置において特に、前記制御部は、前記計算窓が充填されるまでは、所定の初期値を前記基準値として用いることを特徴とするものである。   In the image processing device according to the third aspect of the present invention, in particular, in the image processing device according to the first or second aspect, the control unit sets the predetermined initial value until the calculation window is filled. It is used as a reference value.

第3の態様に係る画像処理装置によれば、制御部は、計算窓が充填されるまでは、所定の初期値を基準値として用いる。従って、処理の開始直後において量子化パラメータが大きく変動する事態を回避できるため、画質を向上することが可能となる。   According to the image processing apparatus according to the third aspect, the control unit uses a predetermined initial value as a reference value until the calculation window is filled. Therefore, since it is possible to avoid a situation in which the quantization parameter fluctuates greatly immediately after the start of processing, it is possible to improve the image quality.

本発明の第4の態様に係る画像処理装置は、第1〜第3のいずれか一つの態様に係る画像処理装置において特に、前記第1のしきい値は複数段階に設定されており、各段階に応じて異なる前記増減値が設定されていることを特徴とするものである。   In the image processing device according to the fourth aspect of the present invention, in particular, in the image processing device according to any one of the first to third aspects, the first threshold value is set in a plurality of stages. The said increase / decrease value which differs according to a stage is set, It is characterized by the above-mentioned.

第4の態様に係る画像処理装置によれば、第1のしきい値は複数段階に設定されており、各段階に応じて異なる増減値が設定されている。従って、直前に処理した所定数のマクロブロックに関する目標符号量と発生符号量との差の大小に応じて、現在の処理対象のマクロブロックに関する量子化パラメータを細かく調整することが可能となる。   According to the image processing apparatus of the fourth aspect, the first threshold value is set in a plurality of stages, and different increase / decrease values are set for each stage. Accordingly, it is possible to finely adjust the quantization parameter for the current macroblock to be processed according to the difference between the target code amount and the generated code amount for the predetermined number of macroblocks processed immediately before.

本発明の第5の態様に係る画像処理装置は、第1〜第4のいずれか一つの態様に係る画像処理装置において特に、前記制御部は、前記現在の処理対象のマクロブロックに関する量子化パラメータを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値と、所定の第2のしきい値との比較結果を参照することを特徴とするものである。   An image processing apparatus according to a fifth aspect of the present invention is the image processing apparatus according to any one of the first to fourth aspects, and in particular, the control unit is configured to perform quantization parameters relating to the current macroblock to be processed. Is determined by referring to a comparison result between the activity evaluation value indicating the degree of variation of the pixel value in the macroblock and a predetermined second threshold value.

第5の態様に係る画像処理装置によれば、制御部は、現在の処理対象のマクロブロックに関する量子化パラメータを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値と、所定の第2のしきい値との比較結果を参照する。このように、マクロブロックに関する活発性評価値を付加情報として用いることにより、そのマクロブロックに関する量子化パラメータをより正確に設定することが可能となる。   According to the image processing apparatus according to the fifth aspect, the control unit determines the quantization parameter related to the current macroblock to be processed, and the activity evaluation value indicating the degree of variation in the pixel value in the macroblock. Then, a comparison result with a predetermined second threshold value is referred to. Thus, by using the activity evaluation value for a macroblock as additional information, the quantization parameter for the macroblock can be set more accurately.

本発明の第6の態様に係る画像処理装置は、第5の態様に係る画像処理装置において特に、前記第2のしきい値は複数段階に設定されており、各段階に応じて異なる前記増減値が設定されていることを特徴とするものである。   In the image processing device according to the sixth aspect of the present invention, in particular, in the image processing device according to the fifth aspect, the second threshold value is set in a plurality of stages, and the increase / decrease varies depending on each stage. A value is set.

第6の態様に係る画像処理装置によれば、第2のしきい値は複数段階に設定されており、各段階に応じて異なる増減値が設定されている。従って、マクロブロックに関する活発性評価値の大小に応じて、そのマクロブロックに関する量子化パラメータを細かく調整できるため、画質を向上することが可能となる。   According to the image processing apparatus of the sixth aspect, the second threshold value is set in a plurality of stages, and different increase / decrease values are set for each stage. Accordingly, since the quantization parameter for the macroblock can be finely adjusted according to the magnitude of the activity evaluation value for the macroblock, the image quality can be improved.

本発明の第7の態様に係る画像処理装置は、第1〜第6のいずれか一つの態様に係る画像処理装置において特に、前記現在の処理対象のマクロブロックに関する量子化パラメータには、所定の下限値が設定されていることを特徴とするものである。   The image processing apparatus according to the seventh aspect of the present invention is the image processing apparatus according to any one of the first to sixth aspects, in particular, the quantization parameter related to the current macroblock to be processed includes a predetermined parameter. A lower limit value is set.

第7の態様に係る画像処理装置によれば、現在の処理対象のマクロブロックに関する量子化パラメータには、所定の下限値が設定されている。従って、静止画像が長時間連続すること等に起因して量子化パラメータが無制限に小さくなっていくという事態を回避することが可能となる。   According to the image processing device of the seventh aspect, a predetermined lower limit value is set for the quantization parameter related to the current macroblock to be processed. Therefore, it is possible to avoid a situation in which the quantization parameter is reduced indefinitely due to a long continuous image.

本発明の第8の態様に係る画像処理装置は、第1〜第7のいずれか一つの態様に係る画像処理装置において特に、前記制御部は、前記基準値として、前記直前に処理した所定数のマクロブロックに関する量子化パラメータの平均値を用いることを特徴とするものである。   The image processing device according to an eighth aspect of the present invention is the image processing device according to any one of the first to seventh aspects, and in particular, the control unit uses the predetermined number processed immediately before as the reference value. The average value of the quantization parameter for the macroblock is used.

第8の態様に係る画像処理装置によれば、制御部は、基準値として、直前に処理した所定数のマクロブロックに関する量子化パラメータの平均値を用いる。従って、マクロブロック間での量子化パラメータの増減が滑らかになるため、画質の向上を図ることが可能となる。   According to the image processing apparatus of the eighth aspect, the control unit uses the average value of the quantization parameter for the predetermined number of macroblocks processed immediately before as the reference value. Accordingly, the increase / decrease in the quantization parameter between the macroblocks becomes smooth, so that the image quality can be improved.

本発明の第9の態様に係る画像処理装置は、第1〜第7のいずれか一つの態様に係る画像処理装置において特に、前記制御部は、前記基準値として、前回処理したマクロブロックに関する量子化パラメータを用いることを特徴とするものである。   In the image processing device according to the ninth aspect of the present invention, in particular, in the image processing device according to any one of the first to seventh aspects, the control unit uses a quantum for a macroblock processed last time as the reference value. It is characterized by using a parameter.

第9の態様に係る画像処理装置によれば、制御部は、基準値として、前回処理したマクロブロックに関する量子化パラメータを用いる。従って、発生符号量の変動に対して素早く追従できるため、発生符号量の大きいマクロブロックが突発的に出現する際に、瞬間符号量が伝送路の最大伝送レートを超えて動画像の再生が途切れるという事態を回避することが可能となる。   According to the image processing apparatus of the ninth aspect, the control unit uses the quantization parameter related to the macroblock processed last time as the reference value. Therefore, since it is possible to quickly follow fluctuations in the generated code amount, when a macroblock with a large generated code amount appears suddenly, the instantaneous code amount exceeds the maximum transmission rate of the transmission path, and the reproduction of the moving image is interrupted. It is possible to avoid this situation.

本発明の第10の態様に係る画像処理装置は、第1〜第7のいずれか一つの態様に係る画像処理装置において特に、前記制御部は、前記基準値として、前記直前に処理した所定数のマクロブロックに関する量子化パラメータの平均値、及び、前回処理したマクロブロックに関する量子化パラメータの一方を選択的に用いることを特徴とするものである。   The image processing device according to a tenth aspect of the present invention is the image processing device according to any one of the first to seventh aspects, and in particular, the control unit uses the predetermined number processed immediately before as the reference value. One of the average value of the quantization parameters related to the macroblock and the quantization parameter related to the macroblock processed last time is selectively used.

第10の態様に係る画像処理装置によれば、制御部は、基準値として、直前に処理した所定数のマクロブロックに関する量子化パラメータの平均値、及び、前回処理したマクロブロックに関する量子化パラメータの一方を選択的に用いる。従って、処理対象である動画像の種類に応じて適切な基準値を選択することにより、動画像の種類に応じて適切な符号量制御を実行することが可能となる。   According to the image processing apparatus of the tenth aspect, the control unit uses, as the reference value, the average value of the quantization parameter for the predetermined number of macroblocks processed immediately before and the quantization parameter for the macroblock processed last time. One is selectively used. Therefore, by selecting an appropriate reference value according to the type of moving image to be processed, it is possible to execute appropriate code amount control according to the type of moving image.

本発明によれば、GOP単位やフレーム単位で符号量制御を行う場合と比較すると、遅延量を削減することが可能となる。   According to the present invention, it is possible to reduce the delay amount as compared with the case where the code amount control is performed in GOP units or frame units.

本発明の実施の形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on embodiment of this invention. マクロブロック単位でのエンコード処理の一例を示す図である。It is a figure which shows an example of the encoding process per macroblock. 図1に示した制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the control part shown in FIG. 量子化パラメータの決定結果を、視覚的に理解しやすいように区分して示す図である。It is a figure which divides and shows the determination result of a quantization parameter so that it may be easy to understand visually. 量子化パラメータの決定結果を、視覚的に理解しやすいように区分して示す図である。It is a figure which divides and shows the determination result of a quantization parameter so that it may be easy to understand visually. 量子化パラメータの決定結果を、視覚的に理解しやすいように区分して示す図である。It is a figure which divides and shows the determination result of a quantization parameter so that it may be easy to understand visually. 図1に示した制御部の他の構成を示すブロック図である。It is a block diagram which shows the other structure of the control part shown in FIG.

以下、本発明の実施の形態について、図面を用いて詳細に説明する。なお、異なる図面において同一の符号を付した要素は、同一又は相応する要素を示すものとする。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the element which attached | subjected the same code | symbol in different drawing shall show the same or corresponding element.

図1は、本発明の実施の形態に係る画像処理装置1の構成を示すブロック図である。図1に示すように、画像処理装置1は、エンコーダ2及び制御部3を備えて構成されている。エンコーダ2は、MPEG−2又はMPEG−4等の動画像に関する規格に準拠しており、圧縮符号化前の画像信号S1に対して量子化処理及び符号化処理等の画像処理を施すことにより、圧縮符号化後の画像信号S4を出力する。画像信号S4は、画像処理装置1から無線LAN等によって表示装置に伝送され、表示装置において動画像が表示される。   FIG. 1 is a block diagram showing a configuration of an image processing apparatus 1 according to an embodiment of the present invention. As shown in FIG. 1, the image processing apparatus 1 includes an encoder 2 and a control unit 3. The encoder 2 is compliant with a moving image standard such as MPEG-2 or MPEG-4, and performs image processing such as quantization processing and encoding processing on the image signal S1 before compression encoding. The image signal S4 after compression encoding is output. The image signal S4 is transmitted from the image processing apparatus 1 to a display device via a wireless LAN or the like, and a moving image is displayed on the display device.

制御部3には、画像信号S1,S4が入力されるとともに、1マクロブロックあたりの目標符号量を示す信号S2が入力される。制御部3は、これらの信号S1,S2,S4に基づいて、エンコーダ2内での量子化処理における量子化パラメータを、制御信号S3によって制御する。なお、1マクロブロックあたりの目標符号量は、画像処理装置1から表示装置への伝送ビットレートと、動画像のフレームレートと、表示装置の画素数とに基づいて算出される。   The control unit 3 receives image signals S1 and S4 and a signal S2 indicating a target code amount per macroblock. Based on these signals S1, S2, and S4, the control unit 3 controls the quantization parameter in the quantization process in the encoder 2 by the control signal S3. The target code amount per macroblock is calculated based on the transmission bit rate from the image processing device 1 to the display device, the frame rate of the moving image, and the number of pixels of the display device.

図2は、マクロブロック単位でのエンコード処理の一例を示す図である。図2には、行方向に1280画素、列方向に720画素を有する高精細の1フレームの画像を例示している。行方向に16画素、列方向に16画素ごとにマクロブロックとして分割されるため、1フレームは、行方向に80個、列方向に45個のマクロブロックに分割される。エンコーダ2は、マクロブロック単位で画像の圧縮処理を行う。なお、1行分のマクロブロックの集合は、マクロブロックラインと称される。   FIG. 2 is a diagram illustrating an example of encoding processing in units of macroblocks. FIG. 2 illustrates a high-definition one-frame image having 1280 pixels in the row direction and 720 pixels in the column direction. Since the macroblock is divided into 16 pixels in the row direction and every 16 pixels in the column direction, one frame is divided into 80 macroblocks in the row direction and 45 macroblocks in the column direction. The encoder 2 performs image compression processing in units of macro blocks. A set of macroblocks for one row is called a macroblock line.

図3は、図1に示した制御部3の構成を示すブロック図である。図3に示すように、制御部3は、評価値演算部10、パラメータ決定部11、記憶部12、移動累積演算部13、及びビット数カウンタ14を備えて構成されている。画像信号S1は、評価値演算部10に入力される。信号S2は、パラメータ決定部11に入力される。画像信号S4は、ビット数カウンタ14に入力される。制御信号S3は、パラメータ決定部11から出力される。   FIG. 3 is a block diagram showing a configuration of the control unit 3 shown in FIG. As shown in FIG. 3, the control unit 3 includes an evaluation value calculation unit 10, a parameter determination unit 11, a storage unit 12, a movement accumulation calculation unit 13, and a bit number counter 14. The image signal S1 is input to the evaluation value calculation unit 10. The signal S2 is input to the parameter determination unit 11. The image signal S4 is input to the bit number counter 14. The control signal S3 is output from the parameter determination unit 11.

以下、本実施の形態に係る画像処理装置1の動作について説明する。以下の説明において、「B」は符号量、「BN」は1マクロブロックあたりの目標符号量、「ΔB」は目標符号量と実際に発生した発生符号量との差、「j」はマクロブロックの番号、「QP」は量子化パラメータの値、「QP」は量子化パラメータの初期値、「QP」は現在の処理対象のマクロブロックに関する量子化パラメータの値、「QPj−1」は前回処理したマクロブロックに関する量子化パラメータの値、「QP」は量子化パラメータの下限値、「W」は移動累積演算部13が有する計算窓の幅(マクロブロック数)、「y」は画素値(例えば輝度値)、「s」はマクロブロック内における画素の行番号、「t」はマクロブロック内における画素の列番号、「M」は1マクロブロックが有する行数及び列数、「X」はマクロブロック内における画素値のばらつき度合いを示す活発性評価値、「Th1〜Th3」(Th1>Th2>Th3)は符号量に関するしきい値、「A1,A2」(A1>A2)は活発性評価値に関するしきい値、「α,α」(α<α)は任意の所定値、「β,β」(β<β)は任意の所定値、とそれぞれ定義する。一例として、QP=38、QP=24、W=80、Th1=2000、Th2=1000、Th3=−2000、A1=10、A2=5、α=1、α=2、β=1、β=2、にそれぞれ設定されている。但し、これらの数値に限定されず、任意の値に設定することが可能である。 Hereinafter, the operation of the image processing apparatus 1 according to the present embodiment will be described. In the following description, “B” is the code amount, “BN” is the target code amount per macroblock, “ΔB” is the difference between the target code amount and the actually generated code amount, and “j” is the macroblock. number, "QP" value of the quantization parameter "QP 0" is the initial value of the quantization parameter, "QP j" is the value of the quantization parameter relating to the current macroblock to be processed, "QP j-1" Is the value of the quantization parameter for the previously processed macroblock, “QP L ” is the lower limit value of the quantization parameter, “W” is the width of the calculation window (number of macroblocks) of the moving accumulation calculation unit 13, and “y” is “S” is the row number of the pixel in the macroblock, “t” is the column number of the pixel in the macroblock, “M” is the number of rows and columns that one macroblock has, “ X " An activity evaluation value indicating the degree of variation of pixel values in the macroblock, “Th1 to Th3” (Th1>Th2> Th3) are threshold values relating to code amount, and “A1, A2” (A1> A2) are activity evaluation. Threshold values relating to values, “α 1 , α 2 ” (α 12 ) are defined as arbitrary predetermined values, and “β 1 , β 2 ” (β 12 ) are defined as arbitrary predetermined values, respectively. . As an example, QP 0 = 38, QP L = 24, W = 80, Th1 = 2000, Th2 = 1000, Th3 = −2000, A1 = 10, A2 = 5, α 1 = 1, α 2 = 2, β 1 = 1 and β 2 = 2. However, it is not limited to these numerical values, and can be set to an arbitrary value.

図3を参照して、ビット数カウンタ14は、マクロブロック毎に発生符号量をカウントし、カウント結果を信号S10として出力する。信号S10は移動累積演算部13に入力される。移動累積演算部13は、直前に処理した所定数のマクロブロック(つまり幅Wに対応する複数個のマクロブロック)に関する発生符号量の総和を求め、その値を信号S11として出力する。信号S11はパラメータ決定部11に入力される。   Referring to FIG. 3, bit number counter 14 counts the amount of generated code for each macroblock and outputs the count result as signal S10. The signal S10 is input to the movement accumulation calculation unit 13. The movement accumulation calculation unit 13 obtains the sum of generated code amounts for a predetermined number of macro blocks (that is, a plurality of macro blocks corresponding to the width W) processed immediately before, and outputs the value as a signal S11. The signal S11 is input to the parameter determination unit 11.

しきい値Th1〜Th3,A1,A2は、予め設定され、記憶部12に記憶されている。しきい値Th1〜Th3,A1,A2は、信号S13として記憶部12からパラメータ決定部11に入力される。同様に、所定値α,α,β,βは、予め設定され、記憶部12に記憶されている。所定値α,α,β,βは、信号S14として記憶部12からパラメータ決定部11に入力される。また、現在の処理対象のマクロブロックに関する活発性評価値Xが、信号S12として評価値演算部10からパラメータ決定部11に入力される。 The threshold values Th1 to Th3, A1, and A2 are set in advance and stored in the storage unit 12. The threshold values Th1 to Th3, A1, and A2 are input from the storage unit 12 to the parameter determination unit 11 as the signal S13. Similarly, the predetermined values α 1 , α 2 , β 1 , β 2 are set in advance and stored in the storage unit 12. The predetermined values α 1 , α 2 , β 1 , β 2 are input from the storage unit 12 to the parameter determination unit 11 as the signal S14. Further, the activity evaluation value X j regarding the current macroblock to be processed is input from the evaluation value calculation unit 10 to the parameter determination unit 11 as the signal S12.

まず、1番目のマクロブロック(つまりj=1)に関する、量子化パラメータQPの決定アルゴリズム(換言すればアルゴリズムの初期化)について説明する。式(1)に示すように、1番目のマクロブロックに関しては、ΔBは0となる。式(2)に示すように、パラメータ決定部11は、量子化パラメータQPを初期値QPに決定する。

Figure 2011071778


Figure 2011071778

First, the quantization parameter QP determination algorithm (in other words, initialization of the algorithm) for the first macroblock (that is, j = 1) will be described. As shown in Equation (1), ΔB 1 is 0 for the first macroblock. As shown in Expression (2), the parameter determination unit 11 determines the quantization parameter QP 1 as the initial value QP 0 .
Figure 2011071778


Figure 2011071778

次に、2番目からW番目までのマクロブロック(つまり2≦j≦W)に関する、量子化パラメータQPの決定アルゴリズムについて説明する。ΔBは式(3)で表される。式(4−1)に示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを式(4−2)の通りに決定する。式(4−1)中の記号「∩」は、「かつ」を意味する。同様に、式(5−1),(6−1),(7−1),(8−1),(9−1),(10−1),(11−1)にそれぞれ示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを、式(5−2),(6−2),(7−2),(8−2),(9−2),(10−2),(11−2)の通りにそれぞれ決定する。

Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

Next, the quantization parameter QP determination algorithm for the second to Wth macroblocks (that is, 2 ≦ j ≦ W) will be described. ΔB j is expressed by Expression (3). When the condition shown in Expression (4-1) is satisfied, the parameter determination unit 11 determines the quantization parameter QP j as shown in Expression (4-2). The symbol “∩” in formula (4-1) means “and”. Similarly, the conditions shown in the equations (5-1), (6-1), (7-1), (8-1), (9-1), (10-1), and (11-1) are as follows. In the case of satisfying, the parameter determination unit 11 sets the quantization parameter QP j to the expressions (5-2), (6-2), (7-2), (8-2), (9-2), (10− 2) and (11-2) respectively.
Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

次に、活発性評価値Xを求める演算について説明する。評価値演算部10は、式(32)に従って活発性評価値Xを求める。なお、式(32)中における平均画素値(バーys,t)は、式(33)によって定義される。

Figure 2011071778


Figure 2011071778

Next, the calculation for obtaining the activity evaluation value X will be described. The evaluation value calculation unit 10 obtains the activity evaluation value X according to the equation (32). The average pixel value (bar y s, t ) in the equation (32) is defined by the equation (33).
Figure 2011071778


Figure 2011071778

図4は、上記の式(3)〜(11−2)で示したアルゴリズムによる量子化パラメータQPの決定結果を、視覚的に理解しやすいように区分して示す図である。パラメータ決定部11は、1マクロブロックあたりの目標符号量BNと、直前に処理したj−1個のマクロブロックに関する発生符号量とに基づいて、j−1個のマクロブロックに関する目標符号量と発生符号量との差(ΔB)を求める。そして、パラメータ決定部11は、その差(ΔB)としきい値Th1〜Th3との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを、基準値(この場合は初期値QP)に対する増減値として決定する。 FIG. 4 is a diagram showing the determination result of the quantization parameter QP j by the algorithm shown in the above formulas (3) to (11-2) so that it can be easily understood visually. Based on the target code amount BN per macroblock and the generated code amount related to the j-1 macroblock processed immediately before, the parameter determination unit 11 generates the target code amount and the generated code related to j-1 macroblocks. A difference (ΔB j ) from the code amount is obtained. Then, the parameter determination unit 11 sets the quantization parameter QP j related to the current macroblock to be processed based on the comparison result between the difference (ΔB j ) and the threshold values Th1 to Th3. It is determined as an increase / decrease value with respect to the value QP 0 ).

また、パラメータ決定部11は、現在の処理対象のマクロブロックに関する量子化パラメータQPを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値Xと、しきい値A1,A2との比較結果を参照する。つまり、パラメータ決定部11は、活発性評価値Xとしきい値A1,A2との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを、基準値(この場合は初期値QP)に対する増減値として決定する。 In addition, when determining the quantization parameter QP j for the current macro block to be processed, the parameter determination unit 11 determines an activity evaluation value X j indicating the degree of variation in pixel values in the macro block, and a threshold value A1. Reference is made to the comparison result with A2. That is, the parameter determination unit 11 sets the quantization parameter QP j related to the current macroblock to be processed based on the comparison result between the activity evaluation value X j and the threshold values A1 and A2 as the reference value (in this case, the initial value). It is determined as an increase / decrease value with respect to the value QP 0 ).

ここで、量子化パラメータQPには下限値QPが設定されている。パラメータ決定部11は、図4のアルゴリズムによって決定した量子化パラメータQPの値が下限値QPより大きい場合には、その量子化パラメータQPを採用し、一方、図4のアルゴリズムによって決定した量子化パラメータQPの値が下限値QP以下である場合には、下限値QPを採用する。量子化パラメータQPと下限値QPとの比較結果に基づく量子化パラメータQPの決定アルゴリズムを表す式を示す。式(12−1)に示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを式(12−2)の通りに決定する。また、式(13−1)に示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを式(13−2)の通りに決定する。

Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

Here, a lower limit value QP L is set for the quantization parameter QP j . Parameter determining section 11, when the value of the quantization parameter QP j determined by the algorithm of Figure 4 is larger than the lower limit value QP L adopts the quantization parameter QP j, whereas, as determined by the algorithm of Figure 4 If the value of the quantization parameter QP j is less than the lower limit value QP L adopts the lower limit QP L. An expression representing an algorithm for determining a quantization parameter QP based on a comparison result between the quantization parameter QP j and the lower limit value QP L is shown. When the condition shown in Expression (12-1) is satisfied, the parameter determination unit 11 determines the quantization parameter QP j as shown in Expression (12-2). Further, if conditions are met shown in the formula (13-1), the parameter determination unit 11 determines the quantization parameter QP j according to Equation (13-2).
Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

次に、W+1番目以降のマクロブロックに関する、量子化パラメータQPの第1の決定アルゴリズムについて説明する。ΔBは式(14)で表される。式(15−1)に示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを式(15−2)の通りに決定する。同様に、式(16−1),(17−1),(18−1),(19−1),(20−1),(21−1),(22−1)にそれぞれ示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを、式(16−2),(17−2),(18−2),(19−2),(20−2),(21−2),(22−2)の通りにそれぞれ決定する。なお、前回処理したマクロブロック以前のW個のマクロブロックに関する量子化パラメータの平均値(バーQPj−1)は、式(23)によって定義される。

Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

Next, the first determination algorithm of the quantization parameter QP regarding the (W + 1) th and subsequent macroblocks will be described. ΔB j is expressed by Expression (14). When the condition shown in Expression (15-1) is satisfied, the parameter determination unit 11 determines the quantization parameter QP j as shown in Expression (15-2). Similarly, the conditions shown in the equations (16-1), (17-1), (18-1), (19-1), (20-1), (21-1), and (22-1) are as follows. When satisfying, the parameter determination unit 11 sets the quantization parameter QP j to the expressions (16-2), (17-2), (18-2), (19-2), (20-2), (21−). 2) and (22-2) respectively. Note that the average value (bar QP j−1 ) of the quantization parameters for the W macroblocks before the macroblock processed last time is defined by Expression (23).
Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

図5は、上記の式(14)〜(23)で示したアルゴリズムによる量子化パラメータQPの決定結果を、視覚的に理解しやすいように区分して示す図である。パラメータ決定部11は、1マクロブロックあたりの目標符号量BNと、直前に処理したW個のマクロブロックに関する発生符号量とに基づいて、W個のマクロブロックに関する目標符号量と発生符号量との差(ΔB)を求める。そして、パラメータ決定部11は、その差(ΔB)としきい値Th1〜Th3との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを、基準値(この場合はバーQPj−1)に対する増減値として決定する。 FIG. 5 is a diagram showing the determination result of the quantization parameter QP j by the algorithm shown in the above formulas (14) to (23) divided so as to be easily understood visually. Based on the target code amount BN per macroblock and the generated code amount related to the W macroblocks processed immediately before, the parameter determination unit 11 calculates the target code amount and generated code amount related to the W macroblocks. The difference (ΔB j ) is obtained. Then, the parameter determination unit 11 sets the quantization parameter QP j related to the current macroblock to be processed based on the comparison result between the difference (ΔB j ) and the threshold values Th1 to Th3. QP j-1 ) is determined as an increase / decrease value.

また、パラメータ決定部11は、現在の処理対象のマクロブロックに関する量子化パラメータQPを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値Xと、しきい値A1,A2との比較結果を参照する。つまり、パラメータ決定部11は、活発性評価値Xとしきい値A1,A2との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを、基準値(この場合はバーQPj−1)に対する増減値として決定する。 In addition, when determining the quantization parameter QP j for the current macro block to be processed, the parameter determination unit 11 determines an activity evaluation value X j indicating the degree of variation in pixel values in the macro block, and a threshold value A1. Reference is made to the comparison result with A2. That is, the parameter determination unit 11 sets the quantization parameter QP j related to the current macroblock to be processed based on the comparison result between the activity evaluation value X j and the thresholds A1 and A2 to the reference value (in this case, the bar QP j-1 ) is determined as an increase / decrease value.

ここで、上記と同様に量子化パラメータQPには下限値QPが設定されている。パラメータ決定部11は、図5のアルゴリズムによって決定した量子化パラメータQPの値が下限値QPより大きい場合には、その量子化パラメータQPを採用し、一方、図5のアルゴリズムによって決定した量子化パラメータQPの値が下限値QP以下である場合には、下限値QPを採用する。 Here, similarly to the above, the lower limit value QP L is set for the quantization parameter QP j . Parameter determining section 11, when the value of the quantization parameter QP j determined by the algorithm of FIG. 5 is larger than the lower limit value QP L adopts the quantization parameter QP j, whereas, as determined by the algorithm of FIG. 5 If the value of the quantization parameter QP j is less than the lower limit value QP L adopts the lower limit QP L.

次に、W+1番目以降のマクロブロックに関する、量子化パラメータQPの第2の決定アルゴリズムについて説明する。ΔBは上記の式(14)で表される。式(24−1)に示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを式(24−2)の通りに決定する。同様に、式(25−1),(26−1),(27−1),(28−1),(29−1),(30−1),(31−1)にそれぞれ示す条件を満たす場合、パラメータ決定部11は、量子化パラメータQPを、式(25−2),(26−2),(27−2),(28−2),(29−2),(30−2),(31−2)の通りにそれぞれ決定する。

Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

Next, the second determination algorithm of the quantization parameter QP regarding the (W + 1) th and subsequent macroblocks will be described. ΔB j is expressed by the above equation (14). When the condition shown in Expression (24-1) is satisfied, the parameter determination unit 11 determines the quantization parameter QP j as shown in Expression (24-2). Similarly, the conditions shown in the equations (25-1), (26-1), (27-1), (28-1), (29-1), (30-1), and (31-1) are as follows. When satisfying, the parameter determination unit 11 sets the quantization parameter QP j to the expressions (25-2), (26-2), (27-2), (28-2), (29-2), (30− 2) and (31-2) respectively.
Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778


Figure 2011071778

図6は、上記の式(24−1)〜(31−2)で示したアルゴリズムによる量子化パラメータQPの決定結果を、視覚的に理解しやすいように区分して示す図である。パラメータ決定部11は、1マクロブロックあたりの目標符号量BNと、直前に処理したW個のマクロブロックに関する発生符号量とに基づいて、W個のマクロブロックに関する目標符号量と発生符号量との差(ΔB)を求める。そして、パラメータ決定部11は、その差(ΔB)としきい値Th1〜Th3との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを、基準値(この場合は前回処理したマクロブロックに関する量子化パラメータQPj−1)に対する増減値として決定する。 FIG. 6 is a diagram showing the determination result of the quantization parameter QP j by the algorithm shown in the above formulas (24-1) to (31-2) divided so as to be easily understood visually. Based on the target code amount BN per macroblock and the generated code amount related to the W macroblocks processed immediately before, the parameter determination unit 11 calculates the target code amount and generated code amount related to the W macroblocks. The difference (ΔB j ) is obtained. Then, the parameter determination unit 11 sets the quantization parameter QP j related to the current macroblock to be processed based on the comparison result between the difference (ΔB j ) and the threshold values Th1 to Th3. It is determined as an increase / decrease value for the quantization parameter QP j−1 ) regarding the processed macroblock.

また、パラメータ決定部11は、現在の処理対象のマクロブロックに関する量子化パラメータQPを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値Xと、しきい値A1,A2との比較結果を参照する。つまり、パラメータ決定部11は、活発性評価値Xとしきい値A1,A2との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを、基準値(この場合は量子化パラメータQPj−1)に対する増減値として決定する。 In addition, when determining the quantization parameter QP j for the current macro block to be processed, the parameter determination unit 11 determines an activity evaluation value X j indicating the degree of variation in pixel values in the macro block, and a threshold value A1. Reference is made to the comparison result with A2. That is, the parameter determination unit 11 sets the quantization parameter QP j related to the current macroblock to be processed based on the comparison result between the activity evaluation value X j and the threshold values A1 and A2 to the reference value (in this case, the quantum And an increase / decrease value with respect to the conversion parameter QP j−1 ).

ここで、上記と同様に量子化パラメータQPには下限値QPが設定されている。パラメータ決定部11は、図6のアルゴリズムによって決定した量子化パラメータQPの値が下限値QPより大きい場合には、その量子化パラメータQPを採用し、一方、図6のアルゴリズムによって決定した量子化パラメータQPの値が下限値QP以下である場合には、下限値QPを採用する。 Here, similarly to the above, the lower limit value QP L is set for the quantization parameter QP j . Parameter determining section 11, when the value of the quantization parameter QP j determined by the algorithm of Figure 6 is greater than the lower limit value QP L adopts the quantization parameter QP j, whereas, as determined by the algorithm of Figure 6 If the value of the quantization parameter QP j is less than the lower limit value QP L adopts the lower limit QP L.

図7は、図1に示した制御部3の他の構成を示すブロック図である。画像処理装置1の処理対象である動画像の種類に関する情報が、信号S20としてパラメータ決定部11に入力されている。例えば、画像処理装置1がテレビゲーム機に搭載される場合には、ゲームの種類に関する情報や、ゲーム内で進行している現在の場面に関する情報が、信号S20として入力される。パラメータ決定部11は、信号S20に基づいて、図5に示したアルゴリズム、及び、図6に示したアルゴリズムの一方を選択して適用する。   FIG. 7 is a block diagram showing another configuration of the control unit 3 shown in FIG. Information regarding the type of moving image to be processed by the image processing apparatus 1 is input to the parameter determination unit 11 as a signal S20. For example, when the image processing apparatus 1 is mounted on a video game machine, information regarding the type of game and information regarding the current scene in progress in the game are input as the signal S20. The parameter determination unit 11 selects and applies one of the algorithm shown in FIG. 5 and the algorithm shown in FIG. 6 based on the signal S20.

このように本実施の形態に係る画像処理装置1によれば、制御部3は、1マクロブロックあたりの目標符号量BNと、直前に処理したW個のマクロブロックに関する発生符号量とに基づいて、直前に処理したW個のマクロブロックに関する目標符号量と発生符号量との差(ΔB)を求める。そして、その差(ΔB)としきい値Th1〜Th3との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータQPを決定する。従って、GOP単位やフレーム単位で符号量制御を行う場合と比較すると、遅延量を削減することが可能となる。 As described above, according to the image processing apparatus 1 according to the present embodiment, the control unit 3 is based on the target code amount BN per macroblock and the generated code amount related to the W macroblocks processed immediately before. Then, a difference (ΔB j ) between the target code amount and the generated code amount regarding the W macroblocks processed immediately before is obtained. Based on the comparison result between the difference (ΔB j ) and the threshold values Th1 to Th3, the quantization parameter QP j for the current macroblock to be processed is determined. Therefore, the amount of delay can be reduced as compared with the case where code amount control is performed in GOP units or frame units.

また、本実施の形態に係る画像処理装置1によれば、制御部3は、直前に処理したW個のマクロブロックに関する発生符号量を、その個数に対応する幅の計算窓を有する移動累積演算によって求める。従って、直前に処理したW個のマクロブロックに関する発生符号量の変動が移動累積演算によって平滑化されるため、制御の精度を向上することが可能となる。   Also, according to the image processing apparatus 1 according to the present embodiment, the control unit 3 calculates the generated code amount related to the W macroblocks processed immediately before by a moving accumulation calculation having a calculation window having a width corresponding to the number. Ask for. Therefore, since the fluctuation of the generated code amount regarding the W macroblocks processed immediately before is smoothed by the movement accumulation calculation, the control accuracy can be improved.

また、本実施の形態に係る画像処理装置1によれば、制御部3は、計算窓が充填されるまでは、所定の初期値QPを基準値として用いる。従って、処理の開始直後において量子化パラメータが大きく変動する事態を回避できるため、画質を向上することが可能となる。 Further, according to the image processing apparatus 1 according to the present embodiment, the control unit 3 uses the predetermined initial value QP 0 as a reference value until the calculation window is filled. Therefore, since it is possible to avoid a situation in which the quantization parameter fluctuates greatly immediately after the start of processing, it is possible to improve the image quality.

また、本実施の形態に係る画像処理装置1によれば、しきい値Th1〜Th3は複数段階に設定されており、各段階に応じて異なる増減値(−1,±0,+β1,+β)が設定されている。従って、直前に処理したW個のマクロブロックに関する目標符号量と発生符号量との差(ΔB)の大小に応じて、現在の処理対象のマクロブロックに関する量子化パラメータQPを細かく調整することが可能となる。 Further, according to the image processing apparatus 1 according to the present embodiment, the threshold values Th1 to Th3 are set in a plurality of stages, and different increase / decrease values (−1, ± 0, + β 1, + β depending on each stage). 2 ) is set. Therefore, the quantization parameter QP j for the current macroblock to be processed is finely adjusted according to the difference (ΔB j ) between the target code amount and the generated code amount for the W macroblocks processed immediately before. Is possible.

また、本実施の形態に係る画像処理装置1によれば、制御部3は、現在の処理対象のマクロブロックに関する量子化パラメータQPを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値Xと、しきい値A1,A2との比較結果を参照する。従って、マクロブロックに関する活発性評価値Xを付加情報として用いることにより、そのマクロブロックに関する量子化パラメータQPをより正確に設定することが可能となる。 Further, according to the image processing apparatus 1 according to the present embodiment, the control unit 3 determines the degree of variation in pixel values in the macroblock when determining the quantization parameter QP j for the current macroblock to be processed. The comparison result between the activity evaluation value X j shown and the threshold values A1 and A2 is referred to. Therefore, by using the activity evaluation value X j for the macroblock as additional information, the quantization parameter QP j for the macroblock can be set more accurately.

また、本実施の形態に係る画像処理装置1によれば、しきい値A1,A2は複数段階に設定されており、各段階に応じて異なる増減値(±0,−α1,−α)が設定されている。従って、マクロブロックに関する活発性評価値Xの大小に応じて、そのマクロブロックに関する量子化パラメータQPを細かく調整できるため、画質を向上することが可能となる。 Further, according to the image processing apparatus 1 according to the present embodiment, the thresholds A1 and A2 are set in a plurality of stages, and different increase / decrease values (± 0, −α 1, −α 2) depending on each stage. ) Is set. Accordingly, since the quantization parameter QP j related to the macroblock can be finely adjusted according to the magnitude of the activity evaluation value Xj related to the macroblock, the image quality can be improved.

また、本実施の形態に係る画像処理装置1によれば、現在の処理対象のマクロブロックに関する量子化パラメータQPには、所定の下限値QPが設定されている。従って、静止画像が長時間連続すること等に起因して量子化パラメータQPが無制限に小さくなっていくという事態を回避することが可能となる。 Further, according to the image processing apparatus 1 according to the present embodiment, the predetermined lower limit value QP L is set in the quantization parameter QP j regarding the current macro block to be processed. Therefore, it is possible to avoid a situation in which the quantization parameter QP j is decreased indefinitely due to, for example, continuous still images.

また、図5に示した例によれば、制御部3は、基準値として、直前に処理したW個のマクロブロックに関する量子化パラメータの平均値(バーQPj−1)を用いる。従って、マクロブロック間での量子化パラメータQPの増減が滑らかになるため、画質の向上を図ることが可能となる。 Further, according to the example illustrated in FIG. 5, the control unit 3 uses the average value (bar QP j−1 ) of the quantization parameters regarding the W macroblocks processed immediately before as the reference value. Accordingly, since the increase / decrease of the quantization parameter QP j between the macroblocks becomes smooth, the image quality can be improved.

また、図6に示した例によれば、制御部3は、基準値として、前回処理したマクロブロックに関する量子化パラメータQPj−1を用いる。従って、発生符号量の変動に対して素早く追従できるため、発生符号量の大きいマクロブロックが突発的に出現する際に、瞬間符号量が伝送路の最大伝送レートを超えて動画像の再生が途切れるという事態を回避することが可能となる。 Further, according to the example illustrated in FIG. 6, the control unit 3 uses the quantization parameter QP j−1 related to the previously processed macroblock as the reference value. Therefore, since it is possible to quickly follow fluctuations in the generated code amount, when a macroblock with a large generated code amount appears suddenly, the instantaneous code amount exceeds the maximum transmission rate of the transmission path, and the reproduction of the moving image is interrupted. It is possible to avoid this situation.

また、図7に示した例によれば、制御部3は、基準値として、直前に処理したW個のマクロブロックに関する量子化パラメータの平均値(バーQPj−1)、及び、前回処理したマクロブロックに関する量子化パラメータQPj−1の一方を選択的に用いる。従って、処理対象である動画像の種類に応じて適切な基準値を選択することにより、動画像の種類に応じて適切な符号量制御を実行することが可能となる。 Further, according to the example shown in FIG. 7, the control unit 3 uses, as the reference value, the average value (bar QP j−1 ) of the quantization parameter for the W macroblocks processed immediately before and the previous processing. One of the quantization parameters QP j−1 for the macroblock is selectively used. Therefore, by selecting an appropriate reference value according to the type of moving image to be processed, it is possible to execute appropriate code amount control according to the type of moving image.

1 画像処理装置
2 エンコーダ
3 制御部
10 評価値演算部
11 パラメータ決定部
12 記憶部
13 移動累積演算部
14 ビット数カウンタ

DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Encoder 3 Control part 10 Evaluation value calculating part 11 Parameter determining part 12 Storage part 13 Movement accumulation calculating part 14 Bit number counter

Claims (10)

画像信号に対する量子化処理を含むエンコード処理を実行するエンコーダと、
前記量子化処理における量子化パラメータを制御する制御部と
を備え、
前記制御部は、1マクロブロックあたりの目標符号量と、直前に処理した所定数のマクロブロックに関する発生符号量とに基づいて、前記直前に処理した所定数のマクロブロックに関する目標符号量と発生符号量との差を求め、その差と所定の第1のしきい値との比較結果に基づいて、現在の処理対象のマクロブロックに関する量子化パラメータを、基準値に対する増減値として決定する、画像処理装置。
An encoder that performs encoding processing including quantization processing on an image signal;
A control unit for controlling a quantization parameter in the quantization process,
Based on the target code amount per macroblock and the generated code amount related to the predetermined number of macroblocks processed immediately before, the control unit sets the target code amount and generated code related to the predetermined number of macroblocks processed immediately before Image processing that obtains a difference from an amount and determines a quantization parameter related to a current macroblock to be processed as an increase / decrease value with respect to a reference value based on a comparison result between the difference and a predetermined first threshold value apparatus.
前記制御部は、前記直前に処理した所定数のマクロブロックに関する発生符号量を、前記所定数に対応する幅の計算窓を有する移動累積演算によって求める、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the control unit obtains a generated code amount related to the predetermined number of macroblocks processed immediately before by a moving accumulation operation having a calculation window having a width corresponding to the predetermined number. 前記制御部は、前記計算窓が充填されるまでは、所定の初期値を前記基準値として用いる、請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the control unit uses a predetermined initial value as the reference value until the calculation window is filled. 前記第1のしきい値は複数段階に設定されており、各段階に応じて異なる前記増減値が設定されている、請求項1〜3のいずれか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first threshold value is set in a plurality of stages, and the increase / decrease value that is different for each stage is set. 前記制御部は、前記現在の処理対象のマクロブロックに関する量子化パラメータを決定するにあたり、当該マクロブロック内における画素値のばらつき度合いを示す活発性評価値と、所定の第2のしきい値との比較結果を参照する、請求項1〜4のいずれか一つに記載の画像処理装置。   In determining the quantization parameter for the current macroblock to be processed, the control unit includes an activity evaluation value indicating a degree of variation in pixel values in the macroblock and a predetermined second threshold value. The image processing apparatus according to claim 1, wherein the comparison result is referred to. 前記第2のしきい値は複数段階に設定されており、各段階に応じて異なる前記増減値が設定されている、請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the second threshold value is set in a plurality of stages, and the increase / decrease value different according to each stage is set. 前記現在の処理対象のマクロブロックに関する量子化パラメータには、所定の下限値が設定されている、請求項1〜6のいずれか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein a predetermined lower limit value is set for a quantization parameter related to the current macroblock to be processed. 前記制御部は、前記基準値として、前記直前に処理した所定数のマクロブロックに関する量子化パラメータの平均値を用いる、請求項1〜7のいずれか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the control unit uses an average value of quantization parameters regarding the predetermined number of macroblocks processed immediately before as the reference value. 前記制御部は、前記基準値として、前回処理したマクロブロックに関する量子化パラメータを用いる、請求項1〜7のいずれか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the control unit uses a quantization parameter related to a previously processed macroblock as the reference value. 前記制御部は、前記基準値として、前記直前に処理した所定数のマクロブロックに関する量子化パラメータの平均値、及び、前回処理したマクロブロックに関する量子化パラメータの一方を選択的に用いる、請求項1〜7のいずれか一つに記載の画像処理装置。

The control unit selectively uses, as the reference value, one of an average value of quantization parameters related to the predetermined number of macroblocks processed immediately before and a quantization parameter related to macroblocks processed last time. The image processing apparatus according to any one of?

JP2009221625A 2009-09-25 2009-09-25 Image processing device Expired - Fee Related JP5342391B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009221625A JP5342391B2 (en) 2009-09-25 2009-09-25 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009221625A JP5342391B2 (en) 2009-09-25 2009-09-25 Image processing device

Publications (2)

Publication Number Publication Date
JP2011071778A true JP2011071778A (en) 2011-04-07
JP5342391B2 JP5342391B2 (en) 2013-11-13

Family

ID=44016607

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009221625A Expired - Fee Related JP5342391B2 (en) 2009-09-25 2009-09-25 Image processing device

Country Status (1)

Country Link
JP (1) JP5342391B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011122285A1 (en) * 2010-03-31 2011-10-06 株式会社メガチップス Image encoding device
JP2014082772A (en) * 2013-12-05 2014-05-08 Mega Chips Corp Image encoder
KR20160145088A (en) * 2014-04-15 2016-12-19 퀄컴 인코포레이티드 System and method for selecting quantization parameter (qp) in display stream compression (dsc)
US9661333B2 (en) 2010-01-14 2017-05-23 Megachips Corporation Image processor for code amount control
JP2020520204A (en) * 2017-04-21 2020-07-02 ゼニマックス メディア インク.Zenimax Media Inc. System and method for rendered and pre-encoded load estimation based encoder hinting
WO2022004573A1 (en) * 2020-06-30 2022-01-06 富士フイルム株式会社 Imaging device, imaging method, and imaging program

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05167998A (en) * 1991-12-16 1993-07-02 Nippon Telegr & Teleph Corp <Ntt> Image-encoding controlling method
JPH08322051A (en) * 1995-05-24 1996-12-03 Victor Co Of Japan Ltd Moving image coding device performing total code quantity control
JPH0998415A (en) * 1995-09-29 1997-04-08 Ikegami Tsushinki Co Ltd Method and device for performing quantization and inverse quantization
JPH0998427A (en) * 1995-09-29 1997-04-08 Toshiba Corp Dynamic image encoding device
JPH114436A (en) * 1997-06-12 1999-01-06 Sony Corp Image coder and its method
JP2001128117A (en) * 1999-10-25 2001-05-11 Matsushita Electric Ind Co Ltd Controller for generated code volume
JP2001238217A (en) * 2000-02-24 2001-08-31 Victor Co Of Japan Ltd Moving picture coding apparatus and its method
JP2004297696A (en) * 2003-03-28 2004-10-21 Matsushita Electric Ind Co Ltd Video signal encoder
JP2005340896A (en) * 2004-05-24 2005-12-08 Mitsubishi Electric Corp Motion picture encoder
JP2006109420A (en) * 2004-09-10 2006-04-20 Matsushita Electric Ind Co Ltd Animation coding apparatus and animation coding method and animation imaging apparatus
JP2006222626A (en) * 2005-02-09 2006-08-24 Olympus Corp Device and system for transmitting moving picture

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05167998A (en) * 1991-12-16 1993-07-02 Nippon Telegr & Teleph Corp <Ntt> Image-encoding controlling method
JPH08322051A (en) * 1995-05-24 1996-12-03 Victor Co Of Japan Ltd Moving image coding device performing total code quantity control
JPH0998415A (en) * 1995-09-29 1997-04-08 Ikegami Tsushinki Co Ltd Method and device for performing quantization and inverse quantization
JPH0998427A (en) * 1995-09-29 1997-04-08 Toshiba Corp Dynamic image encoding device
JPH114436A (en) * 1997-06-12 1999-01-06 Sony Corp Image coder and its method
JP2001128117A (en) * 1999-10-25 2001-05-11 Matsushita Electric Ind Co Ltd Controller for generated code volume
JP2001238217A (en) * 2000-02-24 2001-08-31 Victor Co Of Japan Ltd Moving picture coding apparatus and its method
JP2004297696A (en) * 2003-03-28 2004-10-21 Matsushita Electric Ind Co Ltd Video signal encoder
JP2005340896A (en) * 2004-05-24 2005-12-08 Mitsubishi Electric Corp Motion picture encoder
JP2006109420A (en) * 2004-09-10 2006-04-20 Matsushita Electric Ind Co Ltd Animation coding apparatus and animation coding method and animation imaging apparatus
JP2006222626A (en) * 2005-02-09 2006-08-24 Olympus Corp Device and system for transmitting moving picture

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9661333B2 (en) 2010-01-14 2017-05-23 Megachips Corporation Image processor for code amount control
WO2011122285A1 (en) * 2010-03-31 2011-10-06 株式会社メガチップス Image encoding device
JP2011217085A (en) * 2010-03-31 2011-10-27 Mega Chips Corp Image encoding device
JP2014082772A (en) * 2013-12-05 2014-05-08 Mega Chips Corp Image encoder
KR20160145088A (en) * 2014-04-15 2016-12-19 퀄컴 인코포레이티드 System and method for selecting quantization parameter (qp) in display stream compression (dsc)
JP2017515378A (en) * 2014-04-15 2017-06-08 クゥアルコム・インコーポレイテッドQualcomm Incorporated System and method for selecting a quantization parameter (QP) in display stream compression (DSC)
KR101941760B1 (en) 2014-04-15 2019-01-23 퀄컴 인코포레이티드 System and method for selecting quantization parameter (qp) in display stream compression (dsc)
JP2020520204A (en) * 2017-04-21 2020-07-02 ゼニマックス メディア インク.Zenimax Media Inc. System and method for rendered and pre-encoded load estimation based encoder hinting
US11503313B2 (en) 2017-04-21 2022-11-15 Zenimax Media Inc. Systems and methods for rendering and pre-encoded load estimation based encoder hinting
WO2022004573A1 (en) * 2020-06-30 2022-01-06 富士フイルム株式会社 Imaging device, imaging method, and imaging program

Also Published As

Publication number Publication date
JP5342391B2 (en) 2013-11-13

Similar Documents

Publication Publication Date Title
JP5342391B2 (en) Image processing device
JP5484083B2 (en) Image processing device
JP5583992B2 (en) Signal processing device
JP2007235291A (en) Adaptive quantization apparatus and adaptive quantization program
JP2012170042A5 (en)
JP2009532984A (en) Motion compensated frame rate conversion with protection against compensation artifacts
JP2015154454A (en) Moving image encoding device, program and integrated circuit
US8199824B2 (en) Spatial resolution conversion of image signal based on motion compensation
JP5618128B2 (en) Encoding apparatus, encoding method, and program
JP5491936B2 (en) Image processing device
JP4257655B2 (en) Video encoding device
US9749624B2 (en) Moving image coding apparatus and moving image coding method
JP6062356B2 (en) Image encoding device
JP5706759B2 (en) Image coding apparatus and image coding method
JP5694674B2 (en) Image coding apparatus, image coding / decoding system, image coding method, and image display method
JP2004328150A (en) Moving picture coding apparatus and method
JP2008252225A (en) Motion picture encoding device and method
JP2008004983A5 (en)
JP2012004653A5 (en)
JP3812269B2 (en) Video encoding apparatus and method
JP5871602B2 (en) Encoder
US8761530B2 (en) Apparatus and method to control target code amount
JP6239838B2 (en) Moving picture encoding apparatus, control method thereof, and imaging apparatus
JP2006303987A (en) Image encoder and image encoding method
JP4533157B2 (en) Image decoding method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20110621

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120827

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130408

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130412

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130610

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130809

R150 Certificate of patent or registration of utility model

Ref document number: 5342391

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees