JP6943256B2 - Coding device, coding method and program - Google Patents

Coding device, coding method and program Download PDF

Info

Publication number
JP6943256B2
JP6943256B2 JP2018547632A JP2018547632A JP6943256B2 JP 6943256 B2 JP6943256 B2 JP 6943256B2 JP 2018547632 A JP2018547632 A JP 2018547632A JP 2018547632 A JP2018547632 A JP 2018547632A JP 6943256 B2 JP6943256 B2 JP 6943256B2
Authority
JP
Japan
Prior art keywords
quantization
coefficient
quantization coefficient
code amount
image
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.)
Active
Application number
JP2018547632A
Other languages
Japanese (ja)
Other versions
JPWO2018079444A1 (en
Inventor
達治 森吉
達治 森吉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Publication of JPWO2018079444A1 publication Critical patent/JPWO2018079444A1/en
Application granted granted Critical
Publication of JP6943256B2 publication Critical patent/JP6943256B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/149Data rate or code amount at the encoder output by estimating the code amount by means of a model, e.g. mathematical model or statistical model
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements

Description

本発明は、動画像を符号化する符号化装置、符号化方法およびプログラムに関する。特に、符号化対象画像を複数の画像ブロックに分割し、画像ブロック単位で処理を行なう符号化装置、符号化方法およびプログラムに関する。 The present invention relates to a coding device, a coding method and a program for coding a moving image. In particular, the present invention relates to a coding device, a coding method, and a program that divides an image to be coded into a plurality of image blocks and performs processing in units of image blocks.

動画像の圧縮符号化技術は、デジタル放送や、光学ディスクによる映像コンテンツ頒布、インターネット等を経由した映像配信など幅広い用途に利用されている。動画像信号を低ビットレート、高圧縮率かつ高画質で符号化したり、符号化された動画像を復号化したりする技術は、国際的な標準化団体によって国際標準規格が策定されている。代表的な標準化団体としては、国際電気通信連合や国際標準化機構、米国映画テレビ技術者協会などが挙げられる。 Video compression coding technology is used in a wide range of applications such as digital broadcasting, distribution of video content using optical discs, and video distribution via the Internet. International standards have been established by international standardization bodies for technologies for encoding moving image signals with low bit rates, high compression rates, and high image quality, and for decoding encoded moving images. Representative standards bodies include the International Telecommunication Union, the International Organization for Standardization, and the American Society of Motion Picture and Television Engineers.

国際電気通信連合(ITU:International Telecommunication Union)の規格には、H.261やH.263がある。国際標準化機構(ISO:International Organization for Standardization)の規格には、MPEG−1やMPEG−2、MPEG−4などがある(MPEG:Moving Picture Experts Group)。米国映画テレビ技術者協会(SMPTE:Society of Motion Picture and Television Engineers)の規格には、VC−1などがある。 According to the International Telecommunication Union (ITU) standard, H. 261 and H. There are 263. International Organization for Standardization (ISO) standards include MPEG-1, MPEG-2, and MPEG-4 (MPEG: Moving Picture Experts Group). The standards of the Society of Motion Picture and Television Engineers (SMPTE) include VC-1.

H.264/MPEG−4 AVC(Advanced Video Coding)は、ITUとISOとが共同で規格化を行なったものである(非特許文献1)。2013年には、H.265/MPEG−H HEVC(High Efficiency Video Coding)が標準化された(非特許文献2)。これ以降、H.264/MPEG−4 AVCをH.264と記載し、H.265/MPEG−H HEVCをH.265と記載する。H.265は、H.264と同等の映像品質でデータサイズを半分程度に圧縮可能である。 H. 264 / MPEG-4 AVC (Advanced Video Coding) was standardized jointly by ITU and ISO (Non-Patent Document 1). In 2013, H.M. 265 / MPEG-H HEVC (High Efficiency Video Coding) has been standardized (Non-Patent Document 2). From this point onward, H. 264 / MPEG-4 AVC by H. Described as 264, H. 265 / MPEG-H HEVC It is described as 265. H. 265 is H. The data size can be compressed to about half with the same video quality as 264.

上述の動画像符号化技術は、動き補償予測や、予測誤差画像の直交変換、直交変換係数の量子化、量子化した直交変換係数のエントロピー符号化といった複数の要素技術を組み合わせて構成されているため、ハイブリッド符号化と呼ばれている。具体的なエントロピー符号化の方法は、例えば、非特許文献3や非特許文献4に開示されている。 The above-mentioned moving image coding technology is composed of a combination of a plurality of elemental technologies such as motion compensation prediction, orthogonal transformation of a prediction error image, quantization of an orthogonal transformation coefficient, and entropy coding of a quantized orthogonal transformation coefficient. Therefore, it is called hybrid coding. Specific entropy coding methods are disclosed in, for example, Non-Patent Document 3 and Non-Patent Document 4.

上述の動画像符号化技術では、空間方向における画像の相関性を使用したフレーム内予測や、時間軸方向における画像の相関性を使用したフレーム間予測を行なうことによって高い圧縮効率を達成している。一般的なフレーム間予測においては、時間的に近接する画像間での被写体や背景等の動き、位置ずれを補正して予測画像を生成する動き補償が利用される。 In the above-mentioned moving image coding technology, high compression efficiency is achieved by performing in-frame prediction using image correlation in the spatial direction and inter-frame prediction using image correlation in the time axis direction. .. In general inter-frame prediction, motion compensation is used to correct the movement and positional deviation of a subject, background, etc. between images that are close in time to generate a predicted image.

また、一般的な動画像符号化装置では、出力される符号量を所定のビットレート以下に抑えつつ、高い画質を実現するレート制御処理が行われる。 Further, in a general moving image coding device, rate control processing for achieving high image quality is performed while suppressing the output code amount to a predetermined bit rate or less.

レート制御の技術の一例として、MPEG−2 Test Model 5方式(以下、TM−5方式)が挙げられる。TM−5方式は、複数の制御の組合せで構成される。一つは、I/P/Bといったフレーム符号化タイプによって異なる複雑度推定に基づいたフレーム単位の符号量割り当て制御である。一つは、フレーム内でのマクロブロック(MB:Macroblock)単位での量子化パラメータ(QP:Quantization Parameter)制御である。一つは、主観画質を改善する適応量子化制御である。このうち、MB単位の制御では、符号化済みMBで実際に発生した符号量と目標符号量との関係に基づいて各MBのQPをフィードバック制御する。 As an example of the rate control technology, the MPEG-2 Test Model 5 method (hereinafter referred to as TM-5 method) can be mentioned. The TM-5 method is composed of a combination of a plurality of controls. One is the code amount allocation control for each frame based on the complexity estimation that differs depending on the frame coding type such as I / P / B. One is the quantization parameter (QP) control in macroblock (MB) units within the frame. One is adaptive quantization control that improves subjective image quality. Of these, in the MB unit control, the QP of each MB is feedback-controlled based on the relationship between the code amount actually generated in the coded MB and the target code amount.

また、特許文献1には、レート制御として係数打ち切り制御を行う画像符号化装置が開示されている。特許文献1の装置は、符号量の予測値や別途設定されたフレームや画像ブロックごとの目標符号量に基づいて打ち切りパラメータを決定する。そして、特許文献1の装置は、決定した打ち切りパラメータに従って量子化係数の一部を0で置換し(打ち切り)、量子化係数の分布状況などから発生符号量を予測する。 Further, Patent Document 1 discloses an image coding apparatus that performs coefficient truncation control as rate control. The apparatus of Patent Document 1 determines the censoring parameter based on the predicted value of the code amount and the target code amount for each frame or image block set separately. Then, the apparatus of Patent Document 1 replaces a part of the quantization coefficient with 0 (discontinuation) according to the determined termination parameter, and predicts the generated code amount from the distribution state of the quantization coefficient and the like.

TM−5方式や特許文献1の方式では、ブロック単位で実際に出力した符号量をフィードバックしてフレーム全体の発生符号量を制御するため、目標符号量への制御を精密に行うことができる。 In the TM-5 method and the method of Patent Document 1, since the code amount actually output in block units is fed back to control the generated code amount of the entire frame, it is possible to precisely control the target code amount.

また、非特許文献5および特許文献2には、R−ρモデルと呼ばれるモデルに基づいたレート制御方式が開示されている(R:ビットレート、ρ:量子化後にゼロになる変換係数の比率)。R−ρモデルを利用した方式では、フレーム全体の変換係数の発生状況に鑑みて適切なQPを設定するため、フレーム内で安定した画質を達成できる。 Further, Non-Patent Document 5 and Patent Document 2 disclose a rate control method based on a model called an R-ρ model (R: bit rate, ρ: ratio of conversion coefficient to be zero after quantization). .. In the method using the R-ρ model, an appropriate QP is set in consideration of the occurrence status of the conversion coefficient of the entire frame, so that stable image quality can be achieved in the frame.

また、特許文献3には、入力データの符号化効率を評価し、評価結果に応じたデータ処理を行なうデータ処理装置が開示されている。特許文献3の装置は。入力された画像データに対して周波数変換を施して変換係数を生成する。そして、特許文献3の装置は、生成された変換係数に基づいて符号量を評価し、その評価結果に応じて量子化処理を行い、量子化が行われた変換係数をハフマン符号で符号化する。 Further, Patent Document 3 discloses a data processing apparatus that evaluates the coding efficiency of input data and performs data processing according to the evaluation result. The device of Patent Document 3 is. Frequency conversion is performed on the input image data to generate a conversion coefficient. Then, the apparatus of Patent Document 3 evaluates the code amount based on the generated conversion coefficient, performs the quantization process according to the evaluation result, and encodes the quantized conversion coefficient with a Huffman code. ..

特開2010−087771号公報Japanese Unexamined Patent Publication No. 2010-087771 特表2013−532439号公報Japanese Patent Application Laid-Open No. 2013-532439 特開2011−142660号公報Japanese Unexamined Patent Publication No. 2011-142660

ITU-T Recommendation H.264 "Advanced video coding for generic audiovisual services"、 2010年3月ITU-T Recommendation H.264 "Advanced video coding for generic audiovisual services", March 2010 ITU-T Recommendation H.265 "Advanced video coding for generic audiovisual services"、 2013年4月ITU-T Recommendation H.265 "Advanced video coding for generic audiovisual services", April 2013 Joint Video Team (JVT) of ISO/IEC MPEG and ITU-T VCEG、Document JVT-O079、"Text Description of Joint Mode Reference Encoding Method and Decoding Concealment Method"、2005年4月Joint Video Team (JVT) of ISO / IEC MPEG and ITU-T VCEG, Document JVT-O079, "Text Description of Joint Mode Reference Encoding Method and Decoding Concealment Method", April 2005 Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11、 Document JCTVC-S1002、 「High Efficiency Video Coding (HEVC) Test Model 16 (HM 16) Improved Encoder Description」、 2014年10月Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11, Document JCTVC-S1002, "High Efficiency Video Coding (HEVC) Test Model 16 (HM 16) Improved Encoder Description" , October 2014 Yung-Lyul Lee他、 "Rate control using linear rate-ρ model for H.264"、 Signal Processing: Image Communication、 Volume 19、 Issue 4、 P.341-352、 April 2004Yung-Lyul Lee et al., "Rate control using linear rate-ρ model for H.264", Signal Processing: Image Communication, Volume 19, Issue 4, P.341-352, April 2004

TM−5方式や特許文献1に記載の技術では、ブロック単位の局所的なフィードバックで制御を行なうため、フィードバックの強度によってはフレーム内でQPなどの制御パラメータが変動したり振動したりすることで画質が不安定になる場合がある。これは、1フレーム内に絵柄が複雑で符号化が難しい領域と、絵柄が単純で符号化が易しい領域とが混在する場合に顕著となる。また、TM−5方式や特許文献1に記載の技術には、ブロック単位でのフィードバック制御であるためにブロック単位での逐次処理となり、複数のブロックを並列処理することができず、高速化が難しいという課題がある。また、特許文献1の打ち切り処理を行なう方式は、制御が安定しない場合があるという問題点がある。 In the TM-5 method and the technique described in Patent Document 1, since control is performed by local feedback in block units, control parameters such as QP fluctuate or vibrate within the frame depending on the strength of feedback. Image quality may become unstable. This becomes remarkable when a region in which the pattern is complicated and difficult to code and a region in which the pattern is simple and easy to code coexist in one frame. Further, in the TM-5 method and the technique described in Patent Document 1, since the feedback control is performed in block units, sequential processing is performed in block units, and a plurality of blocks cannot be processed in parallel, resulting in high speed. There is a problem that it is difficult. Further, the method of performing the censoring process of Patent Document 1 has a problem that the control may not be stable.

非特許文献5や特許文献2の技術では、フレーム全体の変換係数を用いて符号量モデルを構築して種々のQP設定に対応する符号量予測を行なってQPを修正する。非特許文献5や特許文献2の技術では、変換係数が画素数と同数の値が発生するために多数の変換係数値を分析することになり、処理量が大きくなる。また、非特許文献5や特許文献2の技術では、符号量モデルを用いたQP決定に基づいて制御するため、符号量モデルに誤差が発生した場合の目標符号量との差異が大きくなる可能性がある。 In the techniques of Non-Patent Document 5 and Patent Document 2, a code amount model is constructed using the conversion coefficient of the entire frame, and code amount prediction corresponding to various QP settings is performed to correct the QP. In the techniques of Non-Patent Document 5 and Patent Document 2, since the conversion coefficient is the same as the number of pixels, a large number of conversion coefficient values are analyzed, which increases the processing amount. Further, in the techniques of Non-Patent Document 5 and Patent Document 2, since the control is performed based on the QP determination using the code amount model, there is a possibility that the difference from the target code amount when an error occurs in the code amount model becomes large. There is.

特許文献3の装置は、量子化処理を2回以上実行する。量子化処理は、個々の変換係数に乗算または除算を含む演算を行なう比較的負荷の大きな処理である。そのため、特許文献3の装置には、量子化処理を繰り返し実行すると装置全体の処理負荷が大きくなるという問題点がある。 The apparatus of Patent Document 3 executes the quantization process twice or more. Quantization processing is a relatively heavy processing that performs operations including multiplication or division of individual conversion coefficients. Therefore, the apparatus of Patent Document 3 has a problem that the processing load of the entire apparatus increases when the quantization process is repeatedly executed.

本発明の目的は、上述した課題を解決するために、装置全体の処理量を減らすとともに、安定した画質を実現できる符号化装置を提供することにある。 An object of the present invention is to provide a coding device capable of reducing the processing amount of the entire device and realizing stable image quality in order to solve the above-mentioned problems.

本発明の一態様において、符号化装置は、符号化対象画像を構成する処理対象ブロックごとの目標符号量を入力とし、符号化対象画像全体の量子化係数を決定するための量子化制御パラメータを目標符号量に基づいて生成する量子化パラメータ制御手段と、符号化対象画像に基づいて生成される変換係数を入力とするとともに、量子化パラメータ制御手段から量子化制御パラメータを入力とし、量子化制御パラメータと変換係数とを用いて量子化処理を行なうことによって量子化係数を生成する量子化手段と、量子化手段によって生成される量子化係数が格納される量子化係数メモリと、量子化係数メモリに格納された量子化係数を取得し、符号化対象画像全体を量子化した量子化係数を用いて符号量モデルを構築する符号量モデル構築手段と、符号量モデル構築手段から符号量モデルを入力するとともに、目標符号量を入力とし、目標符号量と符号量モデルとに基づいて、量子化係数を打ち切るための打ち切りパラメータを決定する打ち切り制御手段と、打ち切り制御手段から打ち切りパラメータを入力するとともに、量子化係数メモリに格納された量子化係数を取得し、打ち切りパラメータに従って量子化係数を打ち切る係数打ち切り手段とを有する量子化係数設定手段を備える。 In one aspect of the present invention, the coding apparatus receives a target code amount for each processing target block constituting the coding target image as an input, and sets a quantization control parameter for determining the quantization coefficient of the entire coding target image. Quantization control by inputting the quantization parameter control means generated based on the target code amount and the conversion coefficient generated based on the image to be encoded, and inputting the quantization control parameter from the quantization parameter control means. A quantization means that generates a quantization coefficient by performing a quantization process using parameters and conversion coefficients, a quantization coefficient memory that stores the quantization coefficient generated by the quantization means, and a quantization coefficient memory. A code amount model construction means for acquiring the quantization coefficient stored in the above and constructing a code amount model using the quantization coefficient obtained by quantizing the entire coded image, and a code amount model input from the code amount model construction means. At the same time, the target code amount is input, and the cutoff control means for determining the cutoff parameter for cutting off the quantization coefficient based on the target code amount and the code amount model, and the cutoff parameter are input from the cutoff control means. Quantization coefficient A quantization coefficient setting means for acquiring a quantization coefficient stored in a memory and having a coefficient cutoff means for cutting off the quantization coefficient according to a cutoff parameter is provided.

本発明の一態様において、符号化方法では、符号化対象画像を構成する処理対象ブロックごとの目標符号量を入力し、符号化対象画像全体の量子化係数を決定するための量子化制御パラメータを目標符号量に基づいて生成し、符号化対象画像に基づいて生成される変換係数を入力し、量子化制御パラメータと変換係数とを用いて量子化処理を行なうことによって量子化係数を生成し、生成した量子化係数を量子化係数メモリに格納し、量子化係数メモリに格納された符号化対象画像全体を量子化した量子化係数を用いて符号量モデルを構築し、目標符号量と符号量モデルとに基づいて、量子化係数を打ち切るための打ち切りパラメータを決定し、量子化係数メモリに格納された量子化係数を打ち切りパラメータに従って打ち切る。 In one aspect of the present invention, in the coding method, the target code amount for each processing target block constituting the coding target image is input, and the quantization control parameter for determining the quantization coefficient of the entire coding target image is set. Generated based on the target code amount, input the conversion coefficient generated based on the image to be encoded, and generate the quantization coefficient by performing the quantization process using the quantization control parameter and the conversion coefficient. The generated quantization coefficient is stored in the quantization coefficient memory, a code amount model is constructed using the quantization coefficient obtained by quantizing the entire coded target image stored in the quantization coefficient memory, and the target code amount and code amount are used. Based on the model, the cutoff parameter for breaking the quantization coefficient is determined, and the quantization coefficient stored in the quantization coefficient memory is cut off according to the cutoff parameter.

本発明の一態様において、プログラム記録媒体は、符号化対象画像を構成する処理対象ブロックごとの目標符号量を入力する処理と、符号化対象画像全体の量子化係数を決定するための量子化制御パラメータを目標符号量に基づいて生成する処理と、符号化対象画像に基づいて生成される変換係数を入力する処理と、量子化制御パラメータと変換係数とを用いて量子化処理を行なうことによって量子化係数を生成する処理と、生成した量子化係数を量子化係数メモリに格納する処理と、量子化係数メモリに格納された符号化対象画像全体を量子化した量子化係数を用いて符号量モデルを構築する処理と、目標符号量と符号量モデルとに基づいて、量子化係数を打ち切るための打ち切りパラメータを決定する処理と、量子化係数メモリに格納された量子化係数を打ち切りパラメータに従って打ち切る処理とをコンピュータに実行させるプログラムを記録する。 In one aspect of the present invention, the program recording medium is a process of inputting a target code amount for each processing target block constituting the coding target image, and a quantization control for determining the quantization coefficient of the entire coding target image. Quantization by performing a process of generating parameters based on a target code amount, a process of inputting a conversion coefficient generated based on an image to be encoded, and a quantization process using a quantization control parameter and a conversion coefficient. A code amount model using the process of generating the quantization coefficient, the process of storing the generated quantization coefficient in the quantization coefficient memory, and the quantization coefficient obtained by quantizing the entire object to be encoded stored in the quantization coefficient memory. The process of constructing, the process of determining the terminating parameter for terminating the quantization coefficient based on the target code amount and the code amount model, and the process of terminating the quantization coefficient stored in the quantization coefficient memory according to the terminating parameter. Record the program that causes the computer to execute.

本発明によれば、装置全体の処理量を減らすとともに、安定した画質を実現できる符号化装置を提供することが可能になる。 According to the present invention, it is possible to provide a coding device capable of realizing stable image quality while reducing the processing amount of the entire device.

本発明の第1の実施形態に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus which concerns on 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus which concerns on 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置の量子化係数設定手段の構成を示すブロック図である。It is a block diagram which shows the structure of the quantization coefficient setting means of the moving image coding apparatus which concerns on 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置の量子化係数設定手段における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the quantization coefficient setting means of the moving image coding apparatus which concerns on 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the moving image coding apparatus which concerns on 1st Embodiment of this invention. 本発明の第1の実施形態に係る動画像符号化装置における打ち切り対象について説明するための図である。It is a figure for demonstrating the censoring target in the moving image coding apparatus which concerns on 1st Embodiment of this invention. 本発明の第2の実施形態に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2の実施形態に係る動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2の実施形態に係る動画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the moving image coding apparatus which concerns on 2nd Embodiment of this invention. 本発明の第3の実施形態に係る動画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the moving image coding apparatus which concerns on 3rd Embodiment of this invention. 本発明の第6の実施形態に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus which concerns on 6th Embodiment of this invention. 本発明の第6の実施形態に係る動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus which concerns on 6th Embodiment of this invention. 本発明の第6の実施形態に係る動画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the moving image coding apparatus which concerns on 6th Embodiment of this invention. 本発明の各実施形態に係る動画像符号化装置を実現するハードウェアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the hardware which realizes the moving image coding apparatus which concerns on each embodiment of this invention. 本発明の各実施形態に係る動画像符号化装置を実現するハードウェアの別の構成例を示すブロック図である。It is a block diagram which shows another structural example of the hardware which realizes the moving image coding apparatus which concerns on each embodiment of this invention. 本発明の各実施形態に係る動画像符号化装置を実現するハードウェアに含まれるGPU(Graphic Processing Unit)の構成例を示す概念図である。It is a conceptual diagram which shows the structural example of the GPU (Graphic Processing Unit) included in the hardware which realizes the moving image coding apparatus which concerns on each embodiment of this invention. 関連技術の動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus of a related technique. 関連技術の動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus of a related technique. TM−5方式を適用する動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus which applies the TM-5 system. TM−5方式を適用する動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus which applies the TM-5 system. 特許文献1の動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus of Patent Document 1. FIG. 特許文献1の動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus of Patent Document 1. FIG. 特許文献1の動画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the moving image coding apparatus of Patent Document 1. FIG. R−ρモデルを適用する動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image coding apparatus which applies the R-ρ model. R−ρモデルを適用する動画像符号化装置における信号の流れの一例を示す概念図である。It is a conceptual diagram which shows an example of the signal flow in the moving image coding apparatus which applies the R-ρ model. R−ρモデルを適用する動画像符号化装置の動作を示すフローチャートである。It is a flowchart which shows the operation of the moving image coding apparatus which applies an R-ρ model.

以下に、本発明を実施するための形態について図面を用いて説明する。ただし、以下に述べる実施形態には、本発明を実施するために技術的に好ましい限定がされているが、発明の範囲を以下に限定するものではない。なお、以下の実施形態の説明に用いる全図においては、特に理由がない限り、同様箇所には同一符号を付す。また、以下の実施形態において、同様の構成・動作に関しては繰り返しの説明を省略する場合がある。また、図面中の矢印の向きは、一例を示すものであり、ブロック間の信号の向きを限定するものではない。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. However, although the embodiments described below have technically preferable limitations for carrying out the present invention, the scope of the invention is not limited to the following. In all the drawings used in the following embodiments, the same reference numerals are given to the same parts unless there is a specific reason. Further, in the following embodiments, repeated explanations may be omitted for similar configurations and operations. Further, the direction of the arrow in the drawing shows an example, and does not limit the direction of the signal between the blocks.

(第1の実施形態)
〔構成〕
まず、本発明の第1の実施形態に係る動画像符号化装置(符号化装置とも呼ぶ)の構成について図面を参照しながら説明する。
(First Embodiment)
〔composition〕
First, the configuration of the moving image coding device (also referred to as a coding device) according to the first embodiment of the present invention will be described with reference to the drawings.

図1は、本実施形態に係る動画像符号化装置1の構成の一例である。図2は、本実施形態の動画像符号化装置1における信号の流れの一例を示す概念図である。 FIG. 1 is an example of the configuration of the moving image coding device 1 according to the present embodiment. FIG. 2 is a conceptual diagram showing an example of a signal flow in the moving image coding device 1 of the present embodiment.

動画像符号化装置1は、新たな画像が入力されると、所定のサイズの画像ブロック単位で符号化処理を行なう。例えば、H.264方式では、マクロブロック(MB:Macroblock)と呼ばれる16×16画素のブロックが用いられる。また、H.265方式では、コーディングツリーユニット(CTU:Coding Tree Unit)と呼ばれる16×16画素、32×32画素、64×64画素などのブロックが用いられる。なお、図1および図2においては、入力画像を取得する機能や分割する機能については省略している。 When a new image is input, the moving image coding device 1 performs coding processing in units of image blocks of a predetermined size. For example, H. In the 264 method, a block of 16 × 16 pixels called a macroblock (MB: Macroblock) is used. In addition, H. In the 265 method, blocks such as 16 × 16 pixels, 32 × 32 pixels, and 64 × 64 pixels, which are called Coding Tree Units (CTUs), are used. Note that in FIGS. 1 and 2, the function of acquiring the input image and the function of dividing the input image are omitted.

動画像符号化装置1は、予測手段10、減算・変換手段11、量子化係数設定手段12、符号化手段13、逆量子化手段14、逆変換・加算手段15、フィルタ16、フレームバッファ17を備える。 The moving image coding device 1 includes a prediction means 10, a subtraction / conversion means 11, a quantization coefficient setting means 12, a coding means 13, an inverse quantization means 14, an inverse conversion / addition means 15, a filter 16, and a frame buffer 17. Be prepared.

予測手段10は、入力画像(符号化対象画像)を入力とし、入力画像に対応する符号化済み画像(過去において符号化済みのフレームの画像データ)をフレームバッファ17から取得する。予測手段10は、符号化済み画像と入力画像とを用いてフレーム内またはフレーム間の予測処理を行なうことによって予測画像を生成する。予測手段10は、生成した予測画像を減算・変換手段11および逆変換・加算手段15に出力する。 The prediction means 10 takes an input image (encoded image) as an input, and acquires an encoded image (image data of a frame encoded in the past) corresponding to the input image from the frame buffer 17. The prediction means 10 generates a prediction image by performing prediction processing within or between frames using the coded image and the input image. The prediction means 10 outputs the generated predicted image to the subtraction / conversion means 11 and the inverse conversion / addition means 15.

減算・変換手段11は、入力画像を入力とし、その入力画像に対応する予測画像を予測手段10から取得する。減算・変換手段11は、入力画像から予測画像を減算して予測誤差画像を生成する。減算・変換手段11は、生成した予測誤差画像に対してDCT(Discrete Cosine Transform)と同様の直交変換処理を行ない、変換係数を出力する。 The subtraction / conversion means 11 takes an input image as an input, and acquires a prediction image corresponding to the input image from the prediction means 10. The subtraction / conversion means 11 subtracts the prediction image from the input image to generate a prediction error image. The subtraction / conversion means 11 performs an orthogonal transform process similar to DCT (Discrete Cosine Transform) on the generated prediction error image, and outputs a conversion coefficient.

例えば、H.264方式の場合、減算・変換手段11は、4×4画素または8×8画素のブロック単位で直交変換処理を行なう。また、例えば、H.265方式の場合、減算・変換手段11は、4×4画素から32×32画素までの所定のサイズのブロック単位で直交変換処理を行う。 For example, H. In the case of the 264 method, the subtraction / conversion means 11 performs orthogonal conversion processing in block units of 4 × 4 pixels or 8 × 8 pixels. Also, for example, H. In the case of the 265 method, the subtraction / conversion means 11 performs orthogonal conversion processing in block units of a predetermined size from 4 × 4 pixels to 32 × 32 pixels.

量子化係数設定手段12は、減算・変換手段11から変換係数を入力する。また、量子化係数設定手段12は、上位システムなどの外部によって設定されるフレーム、画像ブロックごとの目標符号量を入力する。 The quantization coefficient setting means 12 inputs a conversion coefficient from the subtraction / conversion means 11. Further, the quantization coefficient setting means 12 inputs a target code amount for each frame and image block set by an external system such as a host system.

量子化係数設定手段12は、符号化結果の符号量や目標符号量に基づいて量子化制御パラメータ(QP:Quantization Parameter)を決定する。量子化係数設定手段12は、動画像符号化装置1から出力される符号量を所定のビットレート以下に抑えつつ、高い画質を実現するレート制御処理を行なう。 The quantization coefficient setting means 12 determines a quantization control parameter (QP: Quantization Parameter) based on the code amount of the coding result and the target code amount. The quantization coefficient setting means 12 performs rate control processing for achieving high image quality while suppressing the amount of code output from the moving image coding device 1 to a predetermined bit rate or less.

また、量子化係数設定手段12は、減算・変換手段11から入力される変換係数と、決定した量子化制御パラメータとを用いて量子化処理を行ない、量子化された変換係数(以下、量子化係数)を出力する。 Further, the quantization coefficient setting means 12 performs a quantization process using the conversion coefficient input from the subtraction / conversion means 11 and the determined quantization control parameter, and the quantization coefficient (hereinafter referred to as quantization) is quantized. Coefficient) is output.

符号化手段13は、量子化係数設定手段12から量子化係数を入力する。符号化手段13は、所定の規則で量子化係数をエントロピー符号化し、符号化結果のビットストリームを出力する。 The coding means 13 inputs the quantization coefficient from the quantization coefficient setting means 12. The coding means 13 entropy-codes the quantization coefficient according to a predetermined rule, and outputs a bit stream of the coding result.

例えば、符号化手段13は、H.265方式では、コンテキスト適応型二値算術符号化(CABAC:Context-based Adaptive Binary Arithmetic Coding)を用いて量子化係数をエントロピー符号化する。また、符号化手段13は、H.264方式では、コンテキスト適応可変長符号化(CAVLC:Context-based Adaptive variable-length coding)およびCABACを用いて量子化係数をエントロピー符号化する。 For example, the coding means 13 is H.I. In the 265 method, the quantization coefficient is entropy-coded using Context-based Adaptive Binary Arithmetic Coding (CABAC). Further, the coding means 13 is described by H.I. In the 264 method, the quantization coefficient is entropy-coded using Context-based Adaptive variable-length coding (CAVLC) and CABAC.

逆量子化手段14は、量子化係数設定手段12から量子化係数を入力する。逆量子化手段103は、量子化係数を逆量子化し、逆量子化した量子化係数を逆変換・加算手段15に出力する。 The inverse quantization means 14 inputs the quantization coefficient from the quantization coefficient setting means 12. The dequantization means 103 dequantizes the quantization coefficient and outputs the dequantized quantization coefficient to the inverse conversion / addition means 15.

逆変換・加算手段15は、逆量子化された量子化係数を逆量子化手段14から入力する。また、逆変換・加算手段15は、予測手段10から予測画像を入力する。逆変換・加算手段15は、逆量子化された量子化係数と予測画像との加算を行なって再構築画像を生成する。逆変換・加算手段15は、再構築画像をフィルタ16に出力する。 The inverse transformation / addition means 15 inputs the inverse quantization coefficient from the inverse quantization means 14. Further, the inverse conversion / addition means 15 inputs a prediction image from the prediction means 10. The inverse transformation / addition means 15 adds the inverse quantized quantization coefficient and the predicted image to generate a reconstructed image. The inverse transformation / addition means 15 outputs the reconstructed image to the filter 16.

フィルタ16は、逆変換・加算手段15から再構築画像を入力する。フィルタ16は、再構築画像にフィルタ処理を行ない、フィルタ処理された再構築画像を出力する。フィルタ処理は、符号化によって画像に発生する歪みを軽減するものである。例えば、H.264方式の場合、フィルタ16は、デブロックフィルタを用いて再構築画像のフィルタ処理を行う。また、H.265方式の場合、フィルタ16は、SAO(Sample Adaptive Offset)およびデブロックフィルタを用いて再構築画像のフィルタ処理を行う。 The filter 16 inputs the reconstructed image from the inverse transformation / addition means 15. The filter 16 filters the reconstructed image and outputs the filtered reconstructed image. The filtering process reduces the distortion generated in the image due to the coding. For example, H. In the case of the 264 method, the filter 16 filters the reconstructed image by using the deblock filter. In addition, H. In the case of the 265 method, the filter 16 filters the reconstructed image by using the SAO (Sample Adaptive Offset) and the deblock filter.

フレームバッファ17は、フィルタ16から出力されるフィルタ処理後の再構築画像を記憶する。フレームバッファ17に記憶されるフィルタ処理後の再構築画像は、後続フレームの符号化において符号化済み画像として利用される。 The frame buffer 17 stores the reconstructed image after the filter processing output from the filter 16. The filtered reconstructed image stored in the frame buffer 17 is used as an encoded image in the coding of subsequent frames.

〔量子化係数設定手段〕
次に、量子化係数設定手段12の詳細構成について図面を用いて説明する。図3は、量子化係数設定手段12の構成を示すブロック図である。図4は、量子化係数設定手段12における信号の流れの一例を示す概念図である。
[Quantization coefficient setting means]
Next, the detailed configuration of the quantization coefficient setting means 12 will be described with reference to the drawings. FIG. 3 is a block diagram showing the configuration of the quantization coefficient setting means 12. FIG. 4 is a conceptual diagram showing an example of signal flow in the quantization coefficient setting means 12.

量子化係数設定手段12は、QP制御手段21、量子化手段22、量子化係数メモリ23、符号量モデル構築手段24、打ち切り制御手段25および係数打ち切り手段26を備える。 The quantization coefficient setting means 12 includes a QP control means 21, a quantization means 22, a quantization coefficient memory 23, a code amount model construction means 24, a cutoff control means 25, and a coefficient cutoff means 26.

QP制御手段21(量子化パラメータ制御手段とも呼ぶ)は、外部の上位システムなどから目標符号量を入力する。QP制御手段21は、符号化結果の符号量や別途設定されたフレームや画像ブロックごとの目標符号量に基づいて、フレーム全体の量子化係数(QPとも呼ぶ)を決定するための量子化制御パラメータを生成する。QP制御手段21は、生成した量子化制御パラメータを量子化手段22に出力する。 The QP control means 21 (also referred to as a quantization parameter control means) inputs a target code amount from an external host system or the like. The QP control means 21 is a quantization control parameter for determining the quantization coefficient (also referred to as QP) of the entire frame based on the code amount of the coding result and the target code amount for each frame or image block set separately. To generate. The QP control means 21 outputs the generated quantization control parameter to the quantization means 22.

例えば、QP制御手段21は、MPEG−2のTest Model 5方式(以下、TM−5方式)のフレームレベル制御の手法を用いて量子化制御パラメータを生成する(MPEG:Moving Picture Experts Group)。TM−5方式を適用する場合、QP制御手段21は、フレーム符号化タイプによって異なる複雑度推定に基づいたフレーム単位の符号量割り当てと、過去の符号化履歴とに基づいてQPを算出する。また、QP制御手段21は、入力画像と予測画像との差分の統計的性質に基づいてQPを算出してもよい。 For example, the QP control means 21 generates quantization control parameters (MPEG: Moving Picture Experts Group) by using the frame level control method of the Test Model 5 method (hereinafter referred to as TM-5 method) of MPEG-2. When the TM-5 method is applied, the QP control means 21 calculates the QP based on the code amount allocation for each frame based on the complexity estimation that differs depending on the frame coding type and the past coding history. Further, the QP control means 21 may calculate the QP based on the statistical property of the difference between the input image and the predicted image.

量子化手段22は、減算・変換手段11から変換係数を入力するとともに、QP制御手段21から量子化制御パラメータを入力する。量子化手段22は、量子化制御パラメータと変換係数を用いて量子化処理を行ない、量子化された変換係数(以下、量子化係数)を生成する。量子化手段22は、生成した量子化係数メモリ23に量子化係数を格納する。 The quantization means 22 inputs the conversion coefficient from the subtraction / conversion means 11, and also inputs the quantization control parameter from the QP control means 21. The quantization means 22 performs a quantization process using a quantization control parameter and a conversion coefficient to generate a quantized conversion coefficient (hereinafter referred to as a quantization coefficient). The quantization means 22 stores the quantization coefficient in the generated quantization coefficient memory 23.

量子化係数メモリ23は、1フレーム分の量子化係数が格納される。 The quantization coefficient memory 23 stores the quantization coefficient for one frame.

符号量モデル構築手段24は、量子化係数メモリ23に格納された量子化係数を取得し、フレーム全体を量子化した量子化係数を用いて符号量モデルを構築する。符号量モデル構築手段24は、構築した符号量モデルを打ち切り制御手段25に出力する。 The code amount model construction means 24 acquires the quantization coefficient stored in the quantization coefficient memory 23, and constructs the code amount model using the quantization coefficient obtained by quantizing the entire frame. The code amount model construction means 24 outputs the constructed code amount model to the censoring control means 25.

打ち切り制御手段25は、符号量モデル構築手段24から符号量モデルを入力するとともに、目標符号量を入力する。打ち切り制御手段25は、符号量の予測値や別途設定されたフレームや画像ブロックごとの目標符号量と符号量モデルに基づいて、量子化係数を打ち切るための打ち切りパラメータを決定する。打ち切り制御手段25は、決定した打ち切りパラメータを係数打ち切り手段26に出力する。なお、量子化係数を打ち切るとは、量子化係数の少なくとも一部を強制的に0で置換することである。 The censoring control means 25 inputs the code amount model from the code amount model construction means 24 and also inputs the target code amount. The censoring control means 25 determines the censoring parameter for censoring the quantization coefficient based on the predicted value of the code amount, the target code amount for each frame or image block set separately, and the code amount model. The censoring control means 25 outputs the determined censoring parameter to the coefficient censoring means 26. Note that discontinuing the quantization coefficient means forcibly replacing at least a part of the quantization coefficient with 0.

係数打ち切り手段26は、打ち切り制御手段25から打ち切りパラメータを入力するとともに、量子化係数メモリ23に格納された量子化係数を取得する。係数打ち切り手段26は、打ち切りパラメータに従って量子化係数を打ち切る。係数打ち切り手段26は、処理を加えた量子化係数を符号化手段13および逆量子化手段14に出力する。 The coefficient truncation means 26 inputs the truncation parameter from the truncation control means 25 and acquires the quantization coefficient stored in the quantization coefficient memory 23. The coefficient truncation means 26 truncates the quantization coefficient according to the truncation parameter. The coefficient truncation means 26 outputs the processed quantization coefficient to the coding means 13 and the inverse quantization means 14.

以上が、本実施形態の動画像符号化装置1の構成についての説明である。 The above is a description of the configuration of the moving image coding device 1 of the present embodiment.

〔動作〕
次に、本実施形態に係る動画像符号化装置1の動作について図面を参照しながら説明する。
〔motion〕
Next, the operation of the moving image coding device 1 according to the present embodiment will be described with reference to the drawings.

図5は、本実施形態の動画像符号化装置1の動作を示すフローチャートである。なお、以下の図5のフローチャートに関する説明では、動画像符号化装置1の構成要素を各ステップの動作主体として記載しているが、全体的な動作主体は動画像符号化装置1である。 FIG. 5 is a flowchart showing the operation of the moving image coding device 1 of the present embodiment. In the following description of the flowchart of FIG. 5, the components of the moving image coding device 1 are described as the moving main body of each step, but the overall moving main body is the moving image coding device 1.

量子化係数設定手段12は、フレーム全体に適用するQPを決定する(ステップS101)。 The quantization coefficient setting means 12 determines the QP to be applied to the entire frame (step S101).

減算・変換手段11は、ブロックに対して所定の直交変換処理を行ない、変換係数を量子化係数設定手段12に出力する(ステップS102)。 The subtraction / conversion means 11 performs a predetermined orthogonal transformation process on the block, and outputs the conversion coefficient to the quantization coefficient setting means 12 (step S102).

量子化係数設定手段12は、決定したQPに基づいて変換係数の量子化処理を行ない、量子化係数を符号化手段13および逆量子化手段14に出力し、フレーム全体の量子化係数を記憶しておく(ステップS103)。 The quantization coefficient setting means 12 performs the quantization processing of the conversion coefficient based on the determined QP, outputs the quantization coefficient to the coding means 13 and the inverse quantization means 14, and stores the quantization coefficient of the entire frame. (Step S103).

動画像符号化装置1は、フレームを構成する全てのブロックの処理が完了したか判定する(ステップS104)。完了していないブロックがある場合(ステップS104でNo)、ステップS102に戻る。 The moving image coding device 1 determines whether or not the processing of all the blocks constituting the frame is completed (step S104). If there is a block that has not been completed (No in step S104), the process returns to step S102.

量子化係数設定手段12は、フレームを構成する全てのブロックに関する量子化結果の量子化係数の発生状況に基づいてR−ρモデル等の符号量モデルを構築し、モデルパラメータを算出する(ステップS105)。 The quantization coefficient setting means 12 constructs a code amount model such as an R-ρ model based on the generation status of the quantization coefficient of the quantization result for all the blocks constituting the frame, and calculates the model parameters (step S105). ).

量子化係数設定手段12は、符号量モデルを利用してフレームの発生符号量を目標符号量に合わせるように係数打ち切りパラメータを決定する(ステップS106)。 The quantization coefficient setting means 12 determines the coefficient truncation parameter so as to match the generated code amount of the frame with the target code amount by using the code amount model (step S106).

量子化係数設定手段12は、係数打ち切りパラメータに基づいて量子化係数の打ち切り処理を行なう(ステップS107)。 The quantization coefficient setting means 12 performs the quantization coefficient truncation process based on the coefficient truncation parameter (step S107).

符号化手段13は、量子化係数に可変長符号化処理を行ない、符号を出力する(ステップS108)。 The coding means 13 performs a variable-length coding process on the quantization coefficient and outputs a code (step S108).

逆量子化手段14は、量子化係数の逆量子化処理を行なう(ステップS109)。 The inverse quantization means 14 performs an inverse quantization process of the quantization coefficient (step S109).

逆変換・加算手段15は、逆変換処理を行なって1ブロックの処理を完了する(ステップS110)。 The inverse transformation / addition means 15 performs an inverse transformation process to complete the process of one block (step S110).

動画像符号化装置1は、フレームを構成する全てのブロックの処理が完了したかを判定する(ステップS111)。全てのブロックの処理が完了している場合(ステップS110でYes)、図5のフローチャートに沿った処理は終了である。処理が完了していないブロックがある場合(ステップS111でNo)、ステップS107に戻る。 The moving image coding device 1 determines whether or not the processing of all the blocks constituting the frame is completed (step S111). When the processing of all the blocks is completed (Yes in step S110), the processing according to the flowchart of FIG. 5 is completed. If there is a block for which processing has not been completed (No in step S111), the process returns to step S107.

R−ρモデルを適用する一般的な動画像符号化装置では、量子化前の変換係数から構築された符号量モデルに基づいてQPを決定する。一方、本実施形態では、フレーム全体を量子化した量子化係数を用いて構築した符号量モデルに基づいて係数打ち切りパラメータを決定する。 In a general moving image coding device to which the R-ρ model is applied, the QP is determined based on the code amount model constructed from the conversion coefficients before quantization. On the other hand, in the present embodiment, the coefficient cutoff parameter is determined based on the code quantity model constructed by using the quantization coefficient obtained by quantizing the entire frame.

〔係数打ち切りパラメータの決定〕
ここで、係数打ち切りパラメータの決定方法について一例を挙げて説明する。図6は、本実施形態における係数打ち切りパラメータを決定する一例について説明する図である。
[Determination of coefficient censoring parameters]
Here, a method for determining the coefficient truncation parameter will be described with an example. FIG. 6 is a diagram illustrating an example of determining a coefficient truncation parameter in the present embodiment.

図6は、量子化係数を次数によって分類し、非ゼロ係数の個数をDC成分、AC低次成分からAC高次成分に順番に並べたヒストグラムである(DC:Direct Current、AC:Alternating Current)。非ゼロ係数を並べる順番は、例えば、ZigZagスキャンやDiagonalスキャンなどの量子化係数の符号化順に従えばよい。 FIG. 6 is a histogram in which the quantization coefficients are classified according to the order and the number of non-zero coefficients is arranged in order from the DC component and the AC low-order component to the AC high-order component (DC: Direct Current, AC: Alternating Current). .. The order of arranging the non-zero coefficients may be, for example, the coding order of the quantization coefficients such as ZigZag scan and Digital scan.

図6のヒストグラムを用いれば、ある次数を打ち切り閾値として設定し、その次数よりも高次の量子化係数を打ち切った際に、非ゼロの量子化係数のうちどれだけの割合の係数が削除されるかを求めることができる。図6のように打ち切り閾値を設定した場合における非ゼロの量子化係数をR−ρモデルのような符号量モデルに適用すれば、ビットレートがどの程度低減されるかを算出することができる。この関係を用いることによって、打ち切り閾値をどのように設定すれば目標符号量を達成できるのかを決定できる。 Using the histogram of FIG. 6, when a certain order is set as the cutoff threshold and the quantization coefficient higher than that order is cut off, the coefficient of what proportion of the non-zero quantization coefficient is deleted. You can ask for a coefficient. By applying the non-zero quantization coefficient when the truncation threshold is set as shown in FIG. 6 to a code amount model such as the R-ρ model, it is possible to calculate how much the bit rate is reduced. By using this relationship, it is possible to determine how to set the censoring threshold to achieve the target code amount.

係数パラメータの決定方法には、上記の例だけでなく、種々の方式が考えられる。例えば、量子化係数を絶対値ごとに分類したヒストグラムを作成し、ある閾値より絶対値が小さい係数を打ち切った場合の非ゼロ係数削減率や、ビットレート削減率の関係から閾値を決定することもできる。さらに、係数の次数と絶対値の両方を組み合わせた係数打ち切り条件を用いることもできる。すなわち、係数絶対値での打ち切り閾値を係数の次数ごとに異なる値とし、次数が高い係数ほど打ち切り閾値を高くしたり、水平周波数と垂直周波数の両方が高い係数ほど打ち切り閾値を高くしたりする、といった制御を行なうことができる。また、次数と打ち切り閾値の関係を量子化マトリックスの性質に基づいて設定することもできる。また、直交変換を行なうブロックサイズに応じて係数打ち切りパラメータを異なる設定とすることもできる。 As a method for determining the coefficient parameter, various methods can be considered in addition to the above example. For example, it is possible to create a histogram in which the quantization coefficients are classified by absolute value, and determine the threshold value from the relationship between the non-zero coefficient reduction rate when the coefficient whose absolute value is smaller than a certain threshold value is cut off and the bit rate reduction rate. can. Further, a coefficient truncation condition that combines both the order of the coefficient and the absolute value can be used. That is, the cutoff threshold value in the absolute value of the coefficient is set to a different value for each coefficient order, and the higher the order of the coefficient, the higher the cutoff threshold value, or the higher the coefficient of both the horizontal frequency and the vertical frequency, the higher the cutoff threshold value. Such control can be performed. It is also possible to set the relationship between the order and the censoring threshold based on the properties of the quantization matrix. Further, the coefficient truncation parameter can be set differently according to the block size for orthogonal transformation.

以上のように、本実施形態では、フレーム全体の量子化係数の発生状況に鑑みて適切な係数打ち切りパラメータを設定する。そのため、本実施形態によれば、フレーム内で安定した画質を達成できる。すなわち、本実施形態によれば、装置全体の処理量を減らすとともに、安定した画質を実現できる。 As described above, in the present embodiment, an appropriate coefficient truncation parameter is set in consideration of the generation state of the quantization coefficient of the entire frame. Therefore, according to the present embodiment, stable image quality can be achieved within the frame. That is, according to the present embodiment, it is possible to reduce the processing amount of the entire device and realize stable image quality.

また、本実施形態では、初めに設定したQPでフレーム全体の量子化を行なって粗い精度のレート制御を行ない、次に実際の量子化結果に基づいて係数打ち切りを行なうことで、さらに詳細に目標符号量に合致させるレート制御を行なう。そのため、本実施形態によれば、QP制御や符号量モデルに誤差が発生した場合であっても、影響の大きさを抑制することができ、目標符号量との差異を小さく制御できる。 Further, in the present embodiment, the entire frame is quantized by the QP set at the beginning to perform rate control with coarse accuracy, and then the coefficient is truncated based on the actual quantization result to achieve a more detailed target. Perform rate control to match the code amount. Therefore, according to the present embodiment, even when an error occurs in the QP control or the code amount model, the magnitude of the influence can be suppressed and the difference from the target code amount can be controlled to be small.

また、本実施形態では、量子化処理後の量子化係数を用いて符号量モデル構築、打ち切り制御を行なう.そのため、特許文献2(特表2013−532439号公報)に記載の技術よりも処理量が小さく、高速処理が可能である。なぜならば、通常の画像では、量子化処理によって変換係数の大部分はゼロとなるため、符号量モデル構築で処理する量子化係数の数が量子化前の変換係数の数よりもずっと少ないためである。 Further, in the present embodiment, the code amount model is constructed and the truncation control is performed using the quantization coefficient after the quantization process. Therefore, the processing amount is smaller than that of the technique described in Patent Document 2 (Japanese Patent Laid-Open No. 2013-532439), and high-speed processing is possible. This is because in a normal image, most of the conversion coefficients are zeroed by the quantization process, so the number of quantization coefficients processed in the code quantity model construction is much smaller than the number of conversion coefficients before quantization. be.

また、本実施形態によれば、ブロック単位で並列処理することによって、量子化処理や係数打ち切り処理をさらに高速化できる。 Further, according to the present embodiment, the quantization processing and the coefficient truncation processing can be further speeded up by performing parallel processing in block units.

図5のフローチャートでは、ステップS102(変換処理)およびステップS103(量子化処理)をブロック単位で逐次処理しているが、変換処理および量子化処理を複数のブロックに対して並列処理できる。また、図5のフローチャートでは、ステップS107(係数打ち切り処理)、ステップS109(逆量子化処理)およびステップS110(逆変換処理)もブロック単位で逐次処理しているが、これらの処理も複数のブロックに対して並列処理できる。 In the flowchart of FIG. 5, step S102 (conversion process) and step S103 (quantization process) are sequentially processed in block units, but the conversion process and the quantization process can be processed in parallel for a plurality of blocks. Further, in the flowchart of FIG. 5, step S107 (coefficient truncation processing), step S109 (inverse quantization processing), and step S110 (inverse transformation processing) are also sequentially processed in block units, but these processes are also performed in a plurality of blocks. Can be processed in parallel.

(第2の実施形態)
〔構成〕
次に、本発明の第2の実施形態に係る動画像符号化装置について図面を参照しながら説明する。なお、本実施形態の動画像符号化装置の構成は、第1の実施形態(図1)の構成と同様であるが、量子化係数設定手段12の機能が異なっている。
(Second Embodiment)
〔composition〕
Next, the moving image coding apparatus according to the second embodiment of the present invention will be described with reference to the drawings. The configuration of the moving image coding device of this embodiment is the same as that of the first embodiment (FIG. 1), but the functions of the quantization coefficient setting means 12 are different.

図7は、本実施形態の動画像符号化装置が備える量子化係数設定手段12−2の構成を示すブロック図である。図8は、量子化係数設定手段12−2における信号の流れの一例を示す概念図である。量子化係数設定手段12−2は、第1の実施形態の量子化係数設定手段12(図3)において、量子化手段22と量子化係数メモリ23との間に量子化係数分析手段27が追加された構成を有する。量子化係数設定手段12−2の量子化係数分析手段27以外の構成は、第1の実施形態の量子化係数設定手段12と同様であるため、詳細な説明は省略する。 FIG. 7 is a block diagram showing the configuration of the quantization coefficient setting means 12-2 included in the moving image coding apparatus of the present embodiment. FIG. 8 is a conceptual diagram showing an example of the signal flow in the quantization coefficient setting means 12-2. In the quantization coefficient setting means 12-2, in the quantization coefficient setting means 12 (FIG. 3) of the first embodiment, the quantization coefficient analysis means 27 is added between the quantization means 22 and the quantization coefficient memory 23. Has a quantized configuration. Since the configuration of the quantization coefficient setting means 12-2 other than the quantization coefficient analysis means 27 is the same as that of the quantization coefficient setting means 12 of the first embodiment, detailed description thereof will be omitted.

本実施形態においては、量子化手段22は、生成した量子化係数を、量子化係数メモリ23ではなく、量子化係数分析手段27に出力する。 In the present embodiment, the quantization means 22 outputs the generated quantization coefficient to the quantization coefficient analysis means 27 instead of the quantization coefficient memory 23.

量子化係数分析手段27は、量子化手段22から量子化係数を入力する。量子化係数分析手段27は、量子化係数を分析し、処理対象のブロックにおいて量子化後に非ゼロとなる量子化係数が存在するかどうかを検証する(量子化係数分析)。量子化係数分析手段27は、非ゼロとなる量子化係数が存在するかどうかに関する情報(非ゼロ量子化係数有無情報と呼ぶ)を量子化係数に対応付けて量子化係数メモリ23に格納する。 The quantization coefficient analysis means 27 inputs the quantization coefficient from the quantization means 22. The quantization coefficient analysis means 27 analyzes the quantization coefficient and verifies whether or not there is a quantization coefficient that becomes non-zero after quantization in the block to be processed (quantization coefficient analysis). The quantization coefficient analysis means 27 stores information regarding whether or not a non-zero quantization coefficient exists (referred to as non-zero quantization coefficient presence / absence information) in the quantization coefficient memory 23 in association with the quantization coefficient.

本実施形態の動画像符号化装置は、処理対象のブロックの非ゼロ量子化係数有無情報に基づいて、後続処理のスキップ判定を行なう。処理対象のブロックの非ゼロ量子化係数が存在しない場合、係数打ち切り手段26、符号化手段13、逆量子化手段14および逆変換・加算手段15は処理を行わない。一方、処理対象のブロックの非ゼロ量子化係数が存在する場合、係数打ち切り手段26、符号化手段13、逆量子化手段14および逆変換・加算手段15は、処理を実行する。 The moving image coding apparatus of the present embodiment performs a skip determination of subsequent processing based on the non-zero quantization coefficient presence / absence information of the block to be processed. When the non-zero quantization coefficient of the block to be processed does not exist, the coefficient truncation means 26, the coding means 13, the inverse quantization means 14, and the inverse conversion / addition means 15 do not perform processing. On the other hand, when the non-zero quantization coefficient of the block to be processed exists, the coefficient truncation means 26, the coding means 13, the inverse quantization means 14, and the inverse conversion / addition means 15 execute the processing.

以上が、本実施形態の動画像符号化装置の構成に関する説明である。 The above is a description of the configuration of the moving image coding device of the present embodiment.

〔動作〕
次に、本実施形態の動画像符号化装置の動作について図面を参照しながら説明する。
〔motion〕
Next, the operation of the moving image coding apparatus of this embodiment will be described with reference to the drawings.

図9は、本実施形態におけるデータ変換の動作を示すフローチャートである。なお、以下の図9のフローチャートに関する説明では、動画像符号化装置の構成要素を各ステップの動作主体として記載しているが、全体的な動作主体は動画像符号化装置である。以下においては、第1の実施形態と同様の動作については詳細な説明は省略し、異なる動作について説明する。 FIG. 9 is a flowchart showing the operation of data conversion in the present embodiment. In the following description of the flowchart of FIG. 9, the components of the moving image coding device are described as the moving main body of each step, but the overall moving main body is the moving image coding device. In the following, detailed description of the same operation as that of the first embodiment will be omitted, and different operations will be described.

本実施形態のフローチャート(図9)は、第1の実施形態のフローチャート(図5)に量子化係数分析処理(ステップS204)と処理スキップ判定処理(ステップS208)とが追加されている。すなわち、図9のフローチャートでは、図5のフローチャートにおいて、ステップS103とステップS104との間に量子化係数分析処理が追加され、ステップS106とステップS107との間に処理スキップ判定処理が追加されている。 In the flowchart of the present embodiment (FIG. 9), a quantization coefficient analysis process (step S204) and a process skip determination process (step S208) are added to the flowchart of the first embodiment (FIG. 5). That is, in the flowchart of FIG. 9, in the flowchart of FIG. 5, a quantization coefficient analysis process is added between steps S103 and S104, and a process skip determination process is added between steps S106 and S107. ..

なお、図5のステップS101〜S103が図9のステップS201〜S203に対応し、図5のステップS104〜S106が図9のステップS205〜S207に対応し、図5のステップS107〜S111が図9のステップS209〜S213に対応する。 In addition, steps S101 to S103 of FIG. 5 correspond to steps S201 to S203 of FIG. 9, steps S104 to S106 of FIG. 5 correspond to steps S205 to S207 of FIG. 9, and steps S107 to S111 of FIG. 5 correspond to FIG. Corresponds to steps S209 to S213 of.

図5のフローチャートと、図9のフローチャートとの相違点は以下の通りである。 The differences between the flowchart of FIG. 5 and the flowchart of FIG. 9 are as follows.

すなわち、ステップS205において、量子化係数分析手段27は、量子化係数を分析し、処理対象のブロックにおいて量子化後に非ゼロとなる量子化係数が存在するかどうかの情報(非ゼロ量子化係数情報)を出力する。 That is, in step S205, the quantization coefficient analysis means 27 analyzes the quantization coefficient, and information on whether or not there is a quantization coefficient that becomes non-zero after quantization in the block to be processed (non-zero quantization coefficient information). ) Is output.

ステップS208において、動画像符号化装置は、量子化係数分析手段27が出力した非ゼロ量子化係数有無情報に基づいて、後続処理のスキップ判定を行なう。 In step S208, the moving image coding apparatus makes a skip determination of the subsequent processing based on the non-zero quantization coefficient presence / absence information output by the quantization coefficient analysis means 27.

すなわち、非ゼロ量子化係数有無情報が存在しない場合(ステップS208でYes)、係数打ち切り手段26、符号化手段13、逆量子化手段14および逆変換・加算手段15は、そのブロックに関する処理を行わない(ステップS213に進む)。 That is, when there is no non-zero quantization coefficient presence / absence information (Yes in step S208), the coefficient truncation means 26, the coding means 13, the inverse quantization means 14, and the inverse conversion / addition means 15 perform processing related to the block. No (proceed to step S213).

一方、非ゼロ量子化係数有無情報が存在する場合(ステップS208でNo)、係数打ち切り手段26、符号化手段13、逆量子化手段14および逆変換・加算手段15は、そのブロックに関する処理を行う(ステップS209に進む)。 On the other hand, when the non-zero quantization coefficient presence / absence information exists (No in step S208), the coefficient truncation means 26, the coding means 13, the inverse quantization means 14, and the inverse conversion / addition means 15 perform processing related to the block. (Proceed to step S209).

本実施形態では、処理対象のブロックの非ゼロ量子化係数有無情報に基づいて処理をスキップする。そのため、本実施形態によれば、第1の実施系形態よりも処理量を削減でき、さらに高速な処理が可能である。なぜならば、通常の画像では、多くのブロックで量子化係数が全てゼロになるため、量子化係数が全てゼロとなるブロックにおける係数打ち切り以降の処理をスキップすれば処理量を削減できるためである。 In the present embodiment, the processing is skipped based on the non-zero quantization coefficient presence / absence information of the block to be processed. Therefore, according to the present embodiment, the processing amount can be reduced as compared with the first embodiment, and higher speed processing is possible. This is because, in a normal image, the quantization coefficient is all zero in many blocks, so the amount of processing can be reduced by skipping the processing after the coefficient cutoff in the block in which the quantization coefficient is all zero.

(第3の実施形態)
次に、本発明の第3の実施形態について図面を参照しながら説明する。なお、本実施形態の構成は、第2の実施形態(図7)の構成と同様であるが、量子化係数分析手段27の動作が異なっている。
(Third Embodiment)
Next, a third embodiment of the present invention will be described with reference to the drawings. The configuration of this embodiment is the same as that of the second embodiment (FIG. 7), but the operation of the quantization coefficient analysis means 27 is different.

図10は、本実施形態におけるデータ変換の動作を示すフローチャートである。なお、以下の図10のフローチャートに関する説明では、動画像符号化装置の構成要素を各ステップの動作主体として記載しているが、全体的な動作主体は動画像符号化装置である。以下においては、第2の実施形態と同様の動作については詳細な説明は省略し、異なる動作について説明する。 FIG. 10 is a flowchart showing the operation of data conversion in the present embodiment. In the following description of the flowchart of FIG. 10, the components of the moving image coding device are described as the moving main body of each step, but the overall moving main body is the moving image coding device. In the following, detailed description of the same operation as in the second embodiment will be omitted, and different operations will be described.

本実施形態のフローチャート(図10)は、第2の実施形態のフローチャート(図9)とは、ステップS304(量子化係数分析)の動作と、ステップS309(打ち切りスキップ判定)を含む点とが異なる。 The flowchart of the present embodiment (FIG. 10) is different from the flowchart of the second embodiment (FIG. 9) in that the operation of step S304 (quantization coefficient analysis) and step S309 (censoring skip determination) are included. ..

ステップS304において、量子化係数分析手段27は、非ゼロ量子化係数有無の情報に加え、非ゼロ量子化係数が存在する場合には、処理対象ブロック内における非ゼロ係数の分布状況に関する係数分布情報を生成する。量子化係数分析手段27は、生成した係数分布情報を出力する。 In step S304, the quantization coefficient analysis means 27 adds the information on the presence / absence of the non-zero quantization coefficient, and if the non-zero quantization coefficient exists, the coefficient distribution information regarding the distribution status of the non-zero coefficient in the processing target block. To generate. The quantization coefficient analysis means 27 outputs the generated coefficient distribution information.

例えば、量子化係数分析手段27は、ブロックを4×4などさらに細かいサブブロックに分割し、ブロックに含まれる各サブブロックのそれぞれに非ゼロ係数が含まれるか否かを示すフラグ列を出力する。 For example, the quantization coefficient analysis means 27 divides a block into finer subblocks such as 4 × 4, and outputs a flag sequence indicating whether or not each of the subblocks included in the block contains a non-zero coefficient. ..

ステップS309において、動画像符号化装置は、係数打ち切りパラメータと係数分布情報とを用いて、係数打ち切り処理をスキップするかどうかを判定する。このとき、動画像符号化装置は、係数打ち切りパラメータとして、ある閾値以上の次数の係数を打ち切るよう決定された場合、処理対象ブロックのうち、該当する次数以上の位置に該当する対象サブブロックの非ゼロ係数有無のフラグを確認する。 In step S309, the moving image coding apparatus determines whether or not to skip the coefficient censoring process by using the coefficient censoring parameter and the coefficient distribution information. At this time, when the moving image coding device is determined to cut off the coefficient of the order higher than a certain threshold as the coefficient cutoff parameter, the target subblock corresponding to the position of the corresponding order or higher is not included in the processing target block. Check the flag with or without zero coefficient.

全ての対象サブブロックに非ゼロ係数が存在しない場合(ステップS309でYes)、係数打ち切り手段26は、判定結果に基づいて、係数打ち切り処理をスキップする。一方、いずれかの対象サブブロックに非ゼロ係数が存在する場合(ステップS309でNo)、係数打ち切り手段26は、判定結果に基づいて、係数打ち切り処理を実行する(ステップS310)。 When the non-zero coefficient does not exist in all the target subblocks (Yes in step S309), the coefficient censoring means 26 skips the coefficient censoring process based on the determination result. On the other hand, when a non-zero coefficient exists in any of the target subblocks (No in step S309), the coefficient censoring means 26 executes the coefficient censoring process based on the determination result (step S310).

なお、係数分布情報は、上記の例以外にも種々の情報が考えられる。例えば、ブロック内で最も高次に位置する非ゼロ係数の次数情報や、所定の次数以上である非ゼロ係数の個数などを係数分布情報として用いることできる。 As the coefficient distribution information, various information other than the above examples can be considered. For example, the order information of the non-zero coefficient located at the highest order in the block, the number of non-zero coefficients having a predetermined order or more, and the like can be used as the coefficient distribution information.

本実施形態によれば、第2の実施形態と比較して、処理量を削減してさらに高速な処理が可能である。なぜならば、ブロックに含まれる非ゼロの量子化の全てに対して係数打ち切り処理を行なうのではなく、係数分布情報を用いた判定によって打ち切り処理が不要なブロックでの打ち切り処理をスキップすることで処理量を削減できるためである。 According to the present embodiment, as compared with the second embodiment, the processing amount can be reduced and higher speed processing can be performed. This is because the coefficient truncation processing is not performed for all the non-zero quantizations contained in the block, but the processing is performed by skipping the discontinuing processing in the block that does not require the discontinuing processing by the judgment using the coefficient distribution information. This is because the amount can be reduced.

(第4の実施形態)
次に、本発明の第4の実施形態について図面を参照しながら説明する。なお、本実施形態の構成および動作は、それぞれ図7および図10と同様であり、QP制御手段21の動作が異なる。
(Fourth Embodiment)
Next, a fourth embodiment of the present invention will be described with reference to the drawings. The configuration and operation of this embodiment are the same as those of FIGS. 7 and 10, respectively, and the operation of the QP control means 21 is different.

第1の実施形態において、QP制御手段21は、例えば、TM―5のフレームレベル制御等の方法でQPを決定する。これに対し、本実施形態のQP制御手段21は、第1の実施形態のように決定したQPを所定の方法で修正し、より小さなQPとする。例えば、QP制御手段21は、QPで決まる量子化ステップ幅を所定の比率だけ小さくするようにQPを修正する。QP制御手段21は、量子化ステップ幅の縮小比率をI/P/Bなどフレーム符号化タイプごとに異なるように設定してもよい。 In the first embodiment, the QP control means 21 determines the QP by a method such as frame level control of the TM-5. On the other hand, the QP control means 21 of the present embodiment modifies the QP determined as in the first embodiment by a predetermined method to make the QP smaller. For example, the QP control means 21 modifies the QP so that the quantization step width determined by the QP is reduced by a predetermined ratio. The QP control means 21 may set the reduction ratio of the quantization step width to be different for each frame coding type such as I / P / B.

QP制御手段21がQPを修正することによって、量子化後の発生符号量は目標符号量よりもやや大きくなる確率が高くなるが、その後に係数打ち切り処理を行なうことによって符号量を目標符号量へと制御できる。 When the QP control means 21 modifies the QP, the probability that the generated code amount after quantization will be slightly larger than the target code amount increases, but after that, the coefficient cutoff process is performed to reduce the code amount to the target code amount. Can be controlled.

以上のように、本実施形態によれば、符号量を目標符号量により近づける制御が可能になる。第1の実施形態では、フレーム全体の量子化を行なう粗い精度のレート制御で符号量が目標符号量を下回っていた場合には、符号量をそれ以上目標符号量に近づけることはできない。一方、本実施形態では、フレーム全体の量子化を行なう粗い精度のレート制御でのQPを小さい値に修正することによって、この段階で目標符号量を下回る確率を低くすることができる。そのため、係数打ち切りでのレート削減による詳細なレート制御と組み合わせた動作によって、より目標符号量に近づけることができる。 As described above, according to the present embodiment, it is possible to control the code amount to be closer to the target code amount. In the first embodiment, when the code amount is less than the target code amount in the coarsely accurate rate control that quantizes the entire frame, the code amount cannot be brought closer to the target code amount. On the other hand, in the present embodiment, the probability of falling below the target code amount can be reduced at this stage by modifying the QP in the coarsely accurate rate control that quantizes the entire frame to a small value. Therefore, it is possible to get closer to the target code amount by the operation combined with the detailed rate control by the rate reduction at the coefficient truncation.

(第5の実施形態)
次に、本発明の第5の実施形態について図面を参照しながら説明する。なお、本実施形態の構成および動作は、それぞれ図7および図10と同様であり、打ち切り制御手段25の動作が異なる。本実施形態は、ブロックごとのQPが異なる場合に、ブロックごとに異なる打ち切りパラメータを設定する点が第1〜第3の実施形態とは異なる。
(Fifth Embodiment)
Next, a fifth embodiment of the present invention will be described with reference to the drawings. The configuration and operation of this embodiment are the same as those in FIGS. 7 and 10, respectively, and the operation of the censoring control means 25 is different. The present embodiment is different from the first to third embodiments in that different censoring parameters are set for each block when the QP for each block is different.

例えば、QPが小さいブロックでは、打ち切りを行なう次数の閾値を大きくして係数打ち切りを発生しにくくする。逆に、QPが大きいブロックでは、より係数打ち切りをしやすいパラメータとする。 For example, in a block having a small QP, the threshold value of the order of censoring is increased to make it difficult for coefficient censoring to occur. On the contrary, in the block having a large QP, the parameter is set so that the coefficient can be easily terminated.

例えば、フレーム全体のQP分布から求まる量子化ステップをQSave、あるブロックのQPに対応する量子化ステップをQScurとした場合に、QScur/QSaveの値に応じて、係数打ち切りを行なう次数の閾値を以下のように調整する。なお、以下の条件において、0.83は1/1.2に相当する値であり、0.67は1/1.5に相当する値である。
0.67>QScur/QSaveならば閾値次数を−2とする。
0.83>QScur/QSave≧0.67ならば閾値次数を−1とする。
1.2≧QScur/QSave≧0.83ならば閾値次数を変化させない。
1.5≧QScur/QSave>1.2ならば閾値次数を+1とする。
QScur/QSave>1.5ならば閾値次数を+2とする。
For example, when the quantization step obtained from the QP distribution of the entire frame is QSave and the quantization step corresponding to the QP of a certain block is QScur, the threshold value of the order for performing coefficient truncation is as follows according to the value of QScur / QSave. Adjust as follows. Under the following conditions, 0.83 is a value corresponding to 1 / 1.2, and 0.67 is a value corresponding to 1 / 1.5.
If 0.67> QScur / QSave, the threshold order is set to -2.
If 0.83> QScur / QSave ≥ 0.67, the threshold order is set to -1.
If 1.2 ≧ QScur / QSave ≧ 0.83, the threshold order is not changed.
If 1.5 ≧ QScur / QSave> 1.2, the threshold order is set to +1.
If QScur / QSave> 1.5, the threshold order is set to +2.

打ち切りパラメータの設定方法は、上記に限らず、例えば、ブロックのQPが特定の小さい値の範囲にある場合には打ち切りは行わないように設定することもできる。 The method of setting the censoring parameter is not limited to the above, and for example, when the QP of the block is in the range of a specific small value, the censoring may not be performed.

以上のように、本実施形態では、符号化結果の画質を向上させることができる。なぜならば、本実施形態によれば、適応量子化制御など主観画質向上のためにブロックごとに異なるQPを設定する場合に、係数打ち切りにおいてもQP値の差を反映して処理することで、主観画質向上の目的に合致したレート制御が可能となるためである。 As described above, in the present embodiment, the image quality of the coding result can be improved. This is because, according to the present embodiment, when different QPs are set for each block in order to improve subjective image quality such as adaptive quantization control, the difference in QP value is reflected even in the coefficient truncation, so that the subjectivity is subjective. This is because rate control that matches the purpose of improving image quality is possible.

(第6の実施形態)
〔構成〕
次に、本発明の第6の実施形態に係る動画像符号化装置について図面を参照しながら説明する。なお、本実施形態の動画像符号化装置の構成は、第1の実施形態(図1)の構成と同様であるが、量子化係数設定手段12の機能が異なっている。
(Sixth Embodiment)
〔composition〕
Next, the moving image coding apparatus according to the sixth embodiment of the present invention will be described with reference to the drawings. The configuration of the moving image coding device of this embodiment is the same as that of the first embodiment (FIG. 1), but the functions of the quantization coefficient setting means 12 are different.

図11は、本実施形態の動画像符号化装置が備える量子化係数設定手段12−6の構成を示すブロック図である。図12は、量子化係数設定手段12−6における信号の流れの一例を示す概念図である。量子化係数設定手段12−6は、第2の実施形態の量子化係数設定手段12−2(図8)において、係数打ち切り手段26の後段に第2量子化係数メモリ28(追加量子化係数メモリとも呼ぶ)が追加された構成を有する。量子化係数設定手段12−6の第2量子化係数メモリ28以外の構成は、第2の実施形態の量子化係数設定手段12−2と同様であるため、詳細な説明は省略する。 FIG. 11 is a block diagram showing the configuration of the quantization coefficient setting means 12-6 included in the moving image coding apparatus of the present embodiment. FIG. 12 is a conceptual diagram showing an example of signal flow in the quantization coefficient setting means 12-6. In the quantization coefficient setting means 12-2 (FIG. 8) of the second embodiment, the quantization coefficient setting means 12-6 is a second quantization coefficient memory 28 (additional quantization coefficient memory) after the coefficient truncation means 26. Also called) has an additional configuration. Since the configuration of the quantization coefficient setting means 12-6 other than the second quantization coefficient memory 28 is the same as that of the quantization coefficient setting means 12-2 of the second embodiment, detailed description thereof will be omitted.

本実施形態においては、係数打ち切り手段26は、処理を加えた量子化係数を第2量子化係数メモリ28に格納する。 In the present embodiment, the coefficient truncation means 26 stores the processed quantization coefficient in the second quantization coefficient memory 28.

量子化係数設定手段12−6の後段の符号化手段13および逆量子化手段14は、第2量子化係数メモリ28に格納された量子化係数を取得する。 The coding means 13 and the inverse quantization means 14 in the subsequent stage of the quantization coefficient setting means 12-6 acquire the quantization coefficient stored in the second quantization coefficient memory 28.

以上が、本実施形態の動画像符号化装置の構成に関する説明である。 The above is a description of the configuration of the moving image coding device of the present embodiment.

〔動作〕
次に、本実施形態の動画像符号化装置の動作について図面を参照しながら説明する。
〔motion〕
Next, the operation of the moving image coding apparatus of this embodiment will be described with reference to the drawings.

図13は、本実施形態におけるデータ変換の動作を示すフローチャートである。なお、以下の図13のフローチャートに関する説明では、動画像符号化装置の構成要素を各ステップの動作主体として記載しているが、全体的な動作主体は動画像符号化装置である。以下においては、第1〜第5の実施形態と同様の動作については詳細な説明は省略し、異なる動作について説明する。 FIG. 13 is a flowchart showing the operation of data conversion in the present embodiment. In the following description of the flowchart of FIG. 13, the components of the moving image coding device are described as the moving main body of each step, but the overall moving main body is the moving image coding device. In the following, detailed description of the same operation as in the first to fifth embodiments will be omitted, and different operations will be described.

本実施形態のフローチャート(図13)は、第3の実施形態のフローチャート(図10)と異なる箇所が二点ある。一点は、ステップS609で出力される量子化係数を1フレーム分記憶する点である。もう一点は、全てのブロックについて係数打ち切り処理(ステップS610)、逆量子化処理(ステップS611)および逆変換処理(ステップS612)が完了した後に、可変長符号化処理(ステップS614)を実行する点である。すなわち、図13のフローチャートでは、図10のフローチャートにおける可変長符号化処理(ステップS311)をステップS314の後に回し、全てのブロックについて可変長符号化処理(ステップS614−S615)を行う。 The flowchart of the present embodiment (FIG. 13) has two differences from the flowchart of the third embodiment (FIG. 10). One point is that the quantization coefficient output in step S609 is stored for one frame. Another point is that the variable length coding process (step S614) is executed after the coefficient truncation process (step S610), the inverse quantization process (step S611), and the inverse transformation process (step S612) are completed for all the blocks. Is. That is, in the flowchart of FIG. 13, the variable length coding process (step S311) in the flowchart of FIG. 10 is performed after step S314, and the variable length coding process (step S614-S615) is performed for all the blocks.

なお、図10のステップS301〜S310が図13のステップS601〜S611に対応し、図10のステップS312〜S314が図13のステップS610〜S613に対応する。 In addition, steps S301 to S310 of FIG. 10 correspond to steps S601 to S611 of FIG. 13, and steps S321 to S314 of FIG. 10 correspond to steps S610 to S613 of FIG.

図10のフローチャートと、図13のフローチャートとの相違点は以下の通りである。 The differences between the flowchart of FIG. 10 and the flowchart of FIG. 13 are as follows.

すなわち、全てのブロックの係数打ち切り処理(ステップS610)、逆量子化処理(ステップS611)および逆変換処理(ステップS612)が完了した後に、符号化手段13は、いずれかのブロックについて可変長符号化処理を行う(ステップS614)。 That is, after the coefficient truncation processing (step S610), the inverse quantization processing (step S611), and the inverse transformation processing (step S612) of all the blocks are completed, the coding means 13 encodes the variable length for any of the blocks. The process is performed (step S614).

そして、全ブロックについて可変長符号化処理が終わっている場合(ステップS615でYes)、図13のフローチャートに沿った処理を終了とする。一方、全ブロックについて可変長符号化処理が終わっていない場合(ステップS615でNo)、ステップS614に戻り、符号化手段13は、別のブロックの可変長符号化処理を行う。 Then, when the variable-length coding process is completed for all the blocks (Yes in step S615), the process according to the flowchart of FIG. 13 is terminated. On the other hand, when the variable length coding process is not completed for all the blocks (No in step S615), the process returns to step S614, and the coding means 13 performs the variable length coding process for another block.

以上のように、本実施形態では、処理グループ1(ステップS602〜S604)、処理グループ2(ステップS608〜ステップS613)の処理は、それぞれブロック単位で独立して処理することができる。そのため、図13のフローチャートではブロック単位で逐次処理する例を示しているが、複数のブロックを並列処理することも可能である。 As described above, in the present embodiment, the processing of the processing group 1 (steps S602 to S604) and the processing of the processing group 2 (steps S608 to S613) can be independently processed in block units. Therefore, although the flowchart of FIG. 13 shows an example of sequentially processing in block units, it is also possible to process a plurality of blocks in parallel.

また、処理グループ1、処理グループ2、処理グループ3(ステップS614〜ステップS615)は、量子化係数メモリ23、第2量子化係数メモリ28からデータを入出力して処理する。そのため、それぞれの処理グループを異なるプロセッサや演算回路で処理するように構成できる。例えば、処理グループ1と処理グループ2とは並列処理に適したプロセッサであるメニーコアプロセッサやGPUで処理し、並列処理が難しい処理グループ3は汎用プロセッサで処理する、という構成を適用できる。なお、処理の構成は、上記には限らない。例えば、比較的固定的な処理である処理グループ1は専用設計の演算回路、制御内容の更新など、処理内容の変更の可能性がある処理グループ2はGPU、処理グループ3は汎用プロセッサで処理する、といった構成も適用できる。 Further, the processing group 1, the processing group 2, and the processing group 3 (steps S614 to S615) input and output data from the quantization coefficient memory 23 and the second quantization coefficient memory 28 for processing. Therefore, each processing group can be configured to be processed by a different processor or arithmetic circuit. For example, a configuration can be applied in which the processing group 1 and the processing group 2 are processed by a manycore processor or GPU which is a processor suitable for parallel processing, and the processing group 3 where parallel processing is difficult is processed by a general-purpose processor. The processing configuration is not limited to the above. For example, the processing group 1 which is a relatively fixed processing is processed by a GPU for the processing group 2 which may change the processing contents such as a specially designed arithmetic circuit and the update of the control contents, and the processing group 3 is processed by a general-purpose processor. , Etc. can also be applied.

以上のように、本実施形態では、並列処理に適したプロセッサ等で処理するよう構成することによってより高速な処理が可能である。 As described above, in the present embodiment, higher speed processing is possible by configuring the processing with a processor or the like suitable for parallel processing.

以上においては、本発明の実施形態をH.264やH.265などの符号化方式に則って説明してきたが、本発明の実施形態の手法は、これらの符号化方式への応用に限定されるものではない。例えば、本発明の実施形態の手法は、H.264やH.265とは異なるVC−1等の符号化方式や、国際標準の動画像符号化方式等に含まれない符号化方式に適用することも可能である。また、本発明の実施形態が用いるレート制御については、TM−5方式を応用した動作について具体的な例を挙げて詳細に説明したが、例示した動作以外にも種々の方式に応用することができる。 In the above, the embodiment of the present invention is described in H.I. 264 and H. Although the description has been made according to a coding method such as 265, the method of the embodiment of the present invention is not limited to the application to these coding methods. For example, the method of the embodiment of the present invention is described in H.I. 264 and H. It is also possible to apply it to a coding method such as VC-1 which is different from 265, or a coding method which is not included in the international standard moving image coding method or the like. Further, regarding the rate control used in the embodiment of the present invention, the operation to which the TM-5 method is applied has been described in detail with specific examples, but it can be applied to various methods other than the illustrated operation. can.

(ハードウェア)
ここで、図14を用いて、本発明の実施形態に係る動画像符号化装置を実現するためのハードウェア90について説明する。なお、ハードウェア90は、本実施形態の動画像符号化装置を実現するための一例であって、本発明の範囲を限定するものではない。
(hardware)
Here, the hardware 90 for realizing the moving image coding apparatus according to the embodiment of the present invention will be described with reference to FIG. The hardware 90 is an example for realizing the moving image coding device of the present embodiment, and does not limit the scope of the present invention.

図14のように、ハードウェア90は、プロセッサ91、主記憶装置92、補助記憶装置93、入出力インターフェース95およびネットワークアダプター96を備える。プロセッサ91、主記憶装置92、補助記憶装置93、入出力インターフェース95およびネットワークアダプター96は、バス99を介して互いに接続される。また、プロセッサ91、主記憶装置92、補助記憶装置93および入出力インターフェース95は、ネットワークアダプター96を介して、イントラネットやインターネットなどのネットワークに接続される。なお、ハードウェア90の構成要素のそれぞれは、単一であってもよいし、複数であってもよい。 As shown in FIG. 14, the hardware 90 includes a processor 91, a main storage device 92, an auxiliary storage device 93, an input / output interface 95, and a network adapter 96. The processor 91, the main storage device 92, the auxiliary storage device 93, the input / output interface 95, and the network adapter 96 are connected to each other via the bus 99. Further, the processor 91, the main storage device 92, the auxiliary storage device 93, and the input / output interface 95 are connected to a network such as an intranet or the Internet via a network adapter 96. Each of the components of the hardware 90 may be single or may be plural.

プロセッサ91は、補助記憶装置93等に格納されたプログラムを主記憶装置92に展開し、展開されたプログラムを実行する演算装置である。本実施形態においては、ハードウェア90にインストールされたソフトウェアプログラムを用いる構成とすればよい。プロセッサ91は、種々の演算処理や制御処理を実行する。例えば、プロセッサ91は、CPU(Central Processing Unit)によって実現される。また、GPU(Graphics Processing Unit)にプロセッサ91の機能の一部を負わせてもよい。例えば、図15のハードウェア90−2のように、CPU911とGPU912とを含む構成にすることができる。 The processor 91 is an arithmetic unit that expands the program stored in the auxiliary storage device 93 or the like into the main storage device 92 and executes the expanded program. In the present embodiment, the software program installed in the hardware 90 may be used. The processor 91 executes various arithmetic processes and control processes. For example, the processor 91 is realized by a CPU (Central Processing Unit). Further, the GPU (Graphics Processing Unit) may be made to bear a part of the functions of the processor 91. For example, as shown in the hardware 90-2 of FIG. 15, the configuration can include the CPU 911 and the GPU 912.

主記憶装置92は、プログラムが展開される領域を有する。主記憶装置92は、例えばDRAM(Dynamic Random Access Memory)などの揮発性メモリとすればよい。また、MRAM(Magnetoresistive Random Access Memory)などの不揮発性メモリを主記憶装置92として構成・追加してもよい。 The main storage device 92 has an area in which the program is developed. The main storage device 92 may be, for example, a volatile memory such as a DRAM (Dynamic Random Access Memory). Further, a non-volatile memory such as an MRAM (Magnetoresistive Random Access Memory) may be configured and added as the main storage device 92.

補助記憶装置93は、種々のデータを記憶させるための記憶装置である。補助記憶装置93は、ハードディスクやフラッシュメモリなどのローカルディスクとして構成される。 The auxiliary storage device 93 is a storage device for storing various data. The auxiliary storage device 93 is configured as a local disk such as a hard disk or a flash memory.

入出力インターフェース95は、ハードウェア90と周辺機器とを接続規格に基づいて接続するインターフェース(I/F:Interface)である。 The input / output interface 95 is an interface (I / F: Interface) that connects the hardware 90 and peripheral devices based on the connection standard.

ハードウェア90には、必要に応じて、キーボードやマウス、タッチパネルなどの入力機器、ディスプレイや印刷機器などの出力機器を接続してもよい。それらの入力機器や出力機器は、情報や設定の入力や動画像情報の出力などに使用できる。プロセッサ91と入力機器との間のデータ授受は、入出力インターフェース95に仲介させればよい。 If necessary, input devices such as keyboards, mice, and touch panels, and output devices such as displays and printing devices may be connected to the hardware 90. These input devices and output devices can be used for inputting information and settings, outputting moving image information, and the like. Data transfer between the processor 91 and the input device may be mediated by the input / output interface 95.

ネットワークアダプター96は、規格や仕様に基づいてネットワークに接続するためのインターフェースである。入出力インターフェース95およびネットワークアダプター96は、外部機器と接続するインターフェースとして共通化してもよい。 The network adapter 96 is an interface for connecting to a network based on a standard or a specification. The input / output interface 95 and the network adapter 96 may be shared as an interface for connecting to an external device.

また、ハードウェア90には、必要に応じて、リーダライタを備え付けてもよい。リーダライタは、バス99に接続される。リーダライタは、プロセッサ91と図示しない記録媒体(プログラム記録媒体)との間で、記録媒体からのデータ・プログラムの読み出し、ハードウェア90の処理結果の記録媒体への書き込みなどを仲介する。記録媒体は、例えばSD(Secure Digital)カードやUSB(Universal Serial Bus)メモリなどの半導体記録媒体などで実現できる。また、記録媒体は、フレキシブルディスクなどの磁気記録媒体、CD(Compact Disc)やDVD(Digital Versatile Disc)などの光学記録媒体やその他の記録媒体によって実現してもよい。 Further, the hardware 90 may be provided with a reader / writer, if necessary. The reader / writer is connected to the bus 99. The reader / writer mediates between the processor 91 and a recording medium (program recording medium) (not shown), reading a data program from the recording medium, writing the processing result of the hardware 90 to the recording medium, and the like. The recording medium can be realized by, for example, a semiconductor recording medium such as an SD (Secure Digital) card or a USB (Universal Serial Bus) memory. Further, the recording medium may be realized by a magnetic recording medium such as a flexible disk, an optical recording medium such as a CD (Compact Disc) or a DVD (Digital Versatile Disc), or another recording medium.

本発明の実施形態に係る動画像符号化装置は、並列処理を実行できることが好ましい。図16は、本実施形態に係る動画像符号化装置によって並列処理を実行するGPU912の構成例である。 It is preferable that the moving image coding apparatus according to the embodiment of the present invention can execute parallel processing. FIG. 16 is a configuration example of the GPU 912 that executes parallel processing by the moving image coding apparatus according to the present embodiment.

図16のGPU912は、インターフェース921、キャッシュ922および複数のストリーミングマルチプロセッサ923(以下、SM:Streaming Multiprocessor)を含む。なお、図16の構成は概念的な構成例であり、実際のGPU912は、インターフェース921、キャッシュ922およびSM923以外の構成要素を含む。 The GPU 912 of FIG. 16 includes an interface 921, a cache 922, and a plurality of streaming multiprocessors 923 (hereinafter, SM: Streaming Multiprocessor). The configuration of FIG. 16 is a conceptual configuration example, and the actual GPU 912 includes components other than the interface 921, the cache 922, and the SM923.

インターフェース921は、DRAMなどで実現される主記憶装置92やCPU911などとデータをやり取りするための接続部である。 The interface 921 is a connection unit for exchanging data with a main storage device 92, a CPU 911, or the like realized by a DRAM or the like.

キャッシュ922は、SM間で共有される高速のメモリである。 The cache 922 is a high-speed memory shared between SMs.

SM923は、動画像符号化処理を処理するための演算部である。例えば、SM923は、ストリーミングプロセッサと呼ばれる複数のコア(演算装置)や、シェアードメモリ、レジスタなどのメモリを含む。 The SM923 is a calculation unit for processing the moving image coding process. For example, the SM923 includes a plurality of cores (arithmetic units) called a streaming processor, shared memory, and memory such as registers.

以上が、本発明の実施形態に係る動画像符号化装置を実現するためのハードウェアの一例である。本発明の各実施形態の構成要素は、図14〜図16のハードウェアに含まれる構成要素のうち少なくともいずれかを含む回路として実現できる。また、本発明の各実施形態の構成要素は、図14〜図16のハードウェアの構成を有するコンピュータ上で動作するソフトウェアとして実現できる。 The above is an example of hardware for realizing the moving image coding device according to the embodiment of the present invention. The components of each embodiment of the present invention can be realized as a circuit including at least one of the components included in the hardware of FIGS. 14 to 16. In addition, the components of each embodiment of the present invention can be realized as software that operates on a computer having the hardware configurations shown in FIGS. 14 to 16.

なお、図14〜図16のハードウェア構成は、本実施形態の動画像符号化装置を可能とするためのハードウェア構成の一例であって、本発明の範囲を限定するものではない。また、本発明の各実施形態においては、メニーコアやGPUを用いた並列処理により高速化する例を説明したが、複数のCPUやPCクラスタを用いてもよい(PC:Personal Computer)。また、本発明の各実施形態に係る処理は、FPGA(Field-Programmable Gate Array)や専用LSI(Large-Scale Integration)回路などを用いて実現してもよい。 The hardware configurations shown in FIGS. 14 to 16 are examples of hardware configurations for enabling the moving image coding apparatus of the present embodiment, and do not limit the scope of the present invention. Further, in each embodiment of the present invention, an example of speeding up by parallel processing using a manycore or GPU has been described, but a plurality of CPUs or PC clusters may be used (PC: Personal Computer). Further, the processing according to each embodiment of the present invention may be realized by using an FPGA (Field-Programmable Gate Array), a dedicated LSI (Large-Scale Integration) circuit, or the like.

また、本実施形態の動画像符号化装置による処理をコンピュータに実行させるプログラムも本発明の範囲に含まれる。さらに、本発明の実施形態に係るプログラムを記録したプログラム記録媒体も本発明の範囲に含まれる。 Further, the scope of the present invention also includes a program for causing a computer to execute the processing by the moving image coding apparatus of the present embodiment. Further, a program recording medium on which a program according to an embodiment of the present invention is recorded is also included in the scope of the present invention.

(関連技術)
ここで、本発明の各実施形態に係る動画像符号化装置の関連技術について説明する。
(Related technology)
Here, the related technology of the moving image coding apparatus according to each embodiment of the present invention will be described.

〔動画像符号化装置〕
図17は、フレーム内予測およびフレーム間予測を用いる動画像符号化装置1000の構成の一例である。図18は、動画像符号化装置1000における信号の流れの一例を示す概念図である。
[Video coding device]
FIG. 17 is an example of the configuration of the moving image coding device 1000 using the intra-frame prediction and the inter-frame prediction. FIG. 18 is a conceptual diagram showing an example of a signal flow in the moving image coding device 1000.

動画像符号化装置1000は、予測手段100、減算・変換手段101、量子化手段102、逆量子化手段103、逆変換・加算手段104、フィルタ105、符号化手段106、レート制御手段107、フレームバッファ108を備える。 The moving image coding device 1000 includes a prediction means 100, a subtraction / conversion means 101, a quantization means 102, an inverse quantization means 103, an inverse conversion / addition means 104, a filter 105, a coding means 106, a rate control means 107, and a frame. A buffer 108 is provided.

予測手段100は、フレームバッファ108に格納されている符号化済み画像(過去において符号化済みのフレームの画像データ)と入力画像とを用いて、フレーム内またはフレーム間の予測処理を行なうことによって予測画像を生成する。予測手段100は、生成した予測画像を減算・変換手段101および逆変換・加算手段104に出力する。 The prediction means 100 predicts by performing prediction processing within or between frames using the coded image (image data of the frame encoded in the past) and the input image stored in the frame buffer 108. Generate an image. The prediction means 100 outputs the generated prediction image to the subtraction / conversion means 101 and the inverse conversion / addition means 104.

減算・変換手段101は、予測手段100から入力される予測画像を入力画像から減算して予測誤差画像を作成する。減算・変換手段101は、作成した予測誤差画像に対してDCT(Discrete Cosine Transform)と同様の直交変換処理を行ない、変換係数を出力する。例えば、H.264方式では、4×4画素または8×8画素のブロック単位で直交変換処理が行われる。また、H.265方式では、4×4画素から32×32画素までの所定のサイズのブロック単位で直交変換処理行われる。 The subtraction / conversion means 101 subtracts the prediction image input from the prediction means 100 from the input image to create a prediction error image. The subtraction / conversion means 101 performs an orthogonal transform process similar to DCT (Discrete Cosine Transform) on the created prediction error image, and outputs a conversion coefficient. For example, H. In the 264 method, orthogonal transformation processing is performed in block units of 4 × 4 pixels or 8 × 8 pixels. In addition, H. In the 265 method, orthogonal conversion processing is performed in block units of a predetermined size from 4 × 4 pixels to 32 × 32 pixels.

量子化手段102は、減算・変換手段101から入力される変換係数と、レート制御手段107から入力される量子化制御パラメータとを用いて量子化処理を行ない、量子化された変換係数(以下、量子化係数)を生成する。量子化手段102は、生成した量子化係数を逆量子化手段103および符号化手段106に出力する。 The quantization means 102 performs a quantization process using the conversion coefficient input from the subtraction / conversion means 101 and the quantization control parameter input from the rate control means 107, and the quantized conversion coefficient (hereinafter referred to as “)”. Quantization coefficient) is generated. The quantization means 102 outputs the generated quantization coefficient to the inverse quantization means 103 and the coding means 106.

逆量子化手段103は、量子化手段102から量子化係数を入力し、入力した量子化係数を逆量子化する。逆量子化手段103は、逆量子化した量子化係数を逆変換・加算手段104に出力する。 The dequantization means 103 inputs a quantization coefficient from the quantization means 102, and dequantizes the input quantization coefficient. The inverse quantization means 103 outputs the inverse quantization coefficient to the inverse transformation / addition means 104.

逆変換・加算手段104は、逆量子化手段103によって逆量子化された量子化係数と、予測手段100によって生成された予測画像とを入力する。逆変換・加算手段104は、逆量子化された量子化係数と予測画像とを加算処理することによって再構築画像を生成する。逆変換・加算手段104は、生成した再構築画像をフィルタ105に出力する。 The inverse conversion / addition means 104 inputs the quantization coefficient inversely quantized by the inverse quantization means 103 and the prediction image generated by the prediction means 100. The inverse transformation / addition means 104 generates a reconstructed image by adding the inverse quantized quantization coefficient and the predicted image. The inverse transformation / addition means 104 outputs the generated reconstructed image to the filter 105.

フィルタ105は、逆変換・加算手段104によって生成された再構築画像を入力し、再構築画像にフィルタ処理を行なう。フィルタ105は、フィルタ処理された再構築画像をフレームバッファ108に出力する。フィルタ処理は、符号化によって画像に発生する歪みを軽減する処理である。例えば、H.264方式およびH.265方式ではデブロックフィルタが用いられる。また、H.265方式では、SAO(Sample Adaptive Offset)が用いられる。 The filter 105 inputs the reconstructed image generated by the inverse transformation / addition means 104, and filters the reconstructed image. The filter 105 outputs the filtered reconstructed image to the frame buffer 108. The filtering process is a process of reducing the distortion generated in the image due to the coding. For example, H. 264 method and H. In the 265 method, a deblock filter is used. In addition, H. In the 265 method, SAO (Sample Adaptive Offset) is used.

フレームバッファ108は、フィルタ105から出力されるフィルタ処理後の再構築画像を記憶する。フレームバッファ108に記憶されるフィルタ処理後の再構築画像は、後続フレームの符号化において符号化済み画像として利用される。 The frame buffer 108 stores the reconstructed image after the filter processing output from the filter 105. The filtered reconstructed image stored in the frame buffer 108 is used as an encoded image in the coding of subsequent frames.

符号化手段106は、量子化手段102から量子化係数を入力する。符号化手段106は、所定の規則で量子化係数をエントロピー符号化し、符号化結果のビットストリームを出力する。例えば、H.264方式およびH.265方式を適用する場合、符号化手段106は、コンテキスト適応型二値算術符号化(CABAC:Context-based Adaptive Binary Arithmetic Coding)を用いて量子化係数をエントロピー符号化する。また、H.264方式を適用する場合、符号化手段106は、コンテキスト適応可変長符号化(CAVLC:Context-based Adaptive variable-length coding)を用いて量子化係数をエントロピー符号化する。 The coding means 106 inputs the quantization coefficient from the quantization means 102. The coding means 106 entropy-codes the quantization coefficient according to a predetermined rule, and outputs a bit stream of the coding result. For example, H. 264 method and H. When applying the 265 method, the coding means 106 entropy-codes the quantization coefficient using Context-based Adaptive Binary Arithmetic Coding (CABAC). In addition, H. When applying the 264 method, the coding means 106 entropy-codes the quantization coefficient using Context-based Adaptive variable-length coding (CAVLC).

レート制御手段107は、符号化結果の符号量や別途設定されたフレーム、画像ブロックごとの目標符号量に基づいて量子化制御パラメータ(QP:Quantization Parameter)を決定する。レート制御手段107は、量子化手段102にQPを出力することによって、量子化手段102を制御する。レート制御手段107は、出力される符号量を所定のビットレート以下に抑えつつ、高い画質を実現するレート制御処理を行なう。 The rate control means 107 determines the quantization control parameter (QP: Quantization Parameter) based on the code amount of the coding result, the frame separately set, and the target code amount for each image block. The rate control means 107 controls the quantization means 102 by outputting a QP to the quantization means 102. The rate control means 107 performs rate control processing for achieving high image quality while suppressing the output code amount to a predetermined bit rate or less.

〔QP制御〕
図19は、TM−5方式でレート制御を行なう動画像符号化装置の構成を示すブロック図である。図20は、図19の構成における信号の流れの一例を示す概念図である。なお、図19のブロック図では、図17においてレート制御に関わる部分について詳細に示し、その周辺の構成については省略している。
[QP control]
FIG. 19 is a block diagram showing a configuration of a moving image coding device that performs rate control by the TM-5 method. FIG. 20 is a conceptual diagram showing an example of signal flow in the configuration of FIG. In the block diagram of FIG. 19, the portion related to rate control is shown in detail in FIG. 17, and the peripheral configuration is omitted.

量子化手段202は、図示しない減算・変換手段から変換係数を入力する。量子化手段202は、レート制御手段107から入力されるQPに従って変換係数の量子化処理を行ない、量子化係数を生成する。量子化手段202は、生成した量子化係数を逆量子化手段203および符号化手段205に出力する。 The quantization means 202 inputs a conversion coefficient from a subtraction / conversion means (not shown). The quantization means 202 performs the quantization processing of the conversion coefficient according to the QP input from the rate control means 107, and generates the quantization coefficient. The quantization means 202 outputs the generated quantization coefficient to the inverse quantization means 203 and the coding means 205.

逆量子化手段203は、量子化手段202から量子化係数を入力する。逆量子化手段203は、量子化係数を逆量子化し、逆量子化された量子化係数を図示しない逆変換・加算手段に出力する。 The inverse quantization means 203 inputs the quantization coefficient from the quantization means 202. The dequantization means 203 dequantizes the quantization coefficient and outputs the dequantized quantization coefficient to an inverse conversion / addition means (not shown).

符号化手段205は、量子化手段202から量子化係数を入力する。符号化手段205は、量子化係数をエントロピー符号化し、符号化結果のビットストリームを出力するとともに、発生符号量の情報を出力する。 The coding means 205 inputs the quantization coefficient from the quantization means 202. The coding means 205 entropy-codes the quantization coefficient, outputs a bit stream of the coding result, and outputs information on the amount of generated code.

QP制御手段206は、符号化結果の符号量や別途設定されたフレームや画像ブロックごとの目標符号量に基づいてQPを決定する。QP制御手段206は、決定したQPに基づいて量子化手段202を制御する。 The QP control means 206 determines the QP based on the coding amount of the coding result and the target code amount for each frame or image block set separately. The QP control means 206 controls the quantization means 202 based on the determined QP.

〔係数打ち切り制御〕
また、QPの設定以外の方法でレート制御を実現する方式(係数打ち切り制御)が特許文献1(特開2010−087771号公報)に開示されている。特許文献1には、マクロブロック(MB:Macroblock)の量子化係数の分布状況から発生符号量を推定し、その推定符号量と目標符号量の関係から量子化係数を強制的にゼロにする係数位置や打ち切り閾値を制御する技術が開示されている。
[Coefficient censoring control]
Further, a method (coefficient censoring control) for realizing rate control by a method other than the setting of QP is disclosed in Patent Document 1 (Japanese Unexamined Patent Publication No. 2010-087771). Patent Document 1 describes a coefficient that estimates the generated code amount from the distribution of the quantization coefficient of a macroblock (MB: Macroblock) and forcibly sets the quantization coefficient to zero from the relationship between the estimated code amount and the target code amount. A technique for controlling a position and a cutoff threshold is disclosed.

図21は、特許文献1に開示された方式(係数打ち切り制御)でレート制御を行なう動画像符号化装置の構成を示すブロック図である。図22は、図21の構成における信号の流れの一例を示す概念図である。図21において、量子化手段202、逆量子化手段203および符号化手段205は、図19の構成と同様に動作する。 FIG. 21 is a block diagram showing a configuration of a moving image coding device that performs rate control by the method (coefficient censoring control) disclosed in Patent Document 1. FIG. 22 is a conceptual diagram showing an example of signal flow in the configuration of FIG. 21. In FIG. 21, the quantization means 202, the dequantization means 203, and the coding means 205 operate in the same manner as in the configuration of FIG.

係数打ち切り手段301は、打ち切り制御手段303から入力される打ち切りパラメータに従って量子化係数を打ち切る。 The coefficient censoring means 301 cuts off the quantization coefficient according to the censoring parameter input from the censoring control means 303.

符号量推定手段302は、量子化係数の分布状況などから発生符号量を予測する。 The code amount estimation means 302 predicts the generated code amount from the distribution status of the quantization coefficient and the like.

打ち切り制御手段303は、符号量の予測値や別途設定されたフレームや画像ブロックごとの目標符号量に基づいて打ち切りパラメータを決定する。 The censoring control means 303 determines the censoring parameter based on the predicted value of the code amount and the target code amount for each frame or image block set separately.

図23は、TM−5方式および特許文献1のレート制御の動作を示すフローチャートである。これらの方式では、フレームを所定のサイズに分割した画像ブロック単位で、ラスタースキャンなど所定の順番で符号化処理を進め、ブロック単位でレート制御を行なう動作を共通とする。例えば、MPEG−2やH.264では、マクロブロック(MB:Macroblock)と呼ばれる16×16画素のブロックが用いられる。また、H.265方式では、コーディングツリーユニット(CTU:Coding Tree Unit)と呼ばれる16×16画素、32×32画素、64×64画素などのブロックが用いられる。 FIG. 23 is a flowchart showing the operation of the TM-5 method and the rate control of Patent Document 1. In these methods, the operation of performing the coding process in a predetermined order such as raster scan in the image block unit obtained by dividing the frame into a predetermined size and performing the rate control in the block unit is common. For example, MPEG-2 and H.M. In 264, a block of 16 × 16 pixels called a macroblock (MB: Macroblock) is used. In addition, H. In the 265 method, blocks such as 16 × 16 pixels, 32 × 32 pixels, and 64 × 64 pixels, which are called Coding Tree Units (CTUs), are used.

打ち切り制御手段303は、符号化済みブロックで実際に発生した符号量と目標符号量との関係に基づき、符号化対象ブロックの量子化に用いるQPや量子化係数打ち切り等の制御パラメータを決定する(ステップS1001)。 The censoring control means 303 determines control parameters such as QP and quantization coefficient censoring used for quantization of the coded target block based on the relationship between the code amount actually generated in the coded block and the target code amount ( Step S1001).

図示しない減算・変換手段は、ブロックに対して所定の直交変換処理を行ない、変換係数を出力する(ステップS1002)。 A subtraction / conversion means (not shown) performs a predetermined orthogonal transformation process on the block and outputs a conversion coefficient (step S1002).

量子化手段202は、QPに基づいて変換係数の量子化処理を行ない、量子化係数を出力する(ステップS1003)。 The quantization means 202 performs the quantization processing of the conversion coefficient based on the QP, and outputs the quantization coefficient (step S1003).

係数打ち切り手段301は、量子化係数の打ち切り処理を行なう(ステップS1004)。 The coefficient truncation means 301 performs a quantization coefficient truncation process (step S1004).

符号化手段205は、量子化係数に可変長符号化処理を行ない、符号を出力する(ステップS1005)。 The coding means 205 performs a variable-length coding process on the quantization coefficient and outputs a code (step S1005).

逆量子化手段203は、量子化係数の逆量子化処理を行なう(ステップS1006)。 The inverse quantization means 203 performs an inverse quantization process of the quantization coefficient (step S1006).

図示しない逆変換・加算手段は、逆変換処理を行なって1ブロックに対する処理を完了する(ステップS1007)。 An inverse transformation / addition means (not shown) performs an inverse transformation process to complete the process for one block (step S1007).

動画像符号化装置は、フレーム中の全てのブロックに対する処理が完了したかを判定する(ステップS1008)。ステップS1008において、符号化処理が完了していないブロックがある場合(ステップS1008でNo)、ステップS1001に戻る。一方、ステップS1008において、符号化処理が完了していないブロックがない場合(ステップS1008でYes)、図23のフローチャートに沿った処理は終了である。 The moving image coding device determines whether or not the processing for all the blocks in the frame is completed (step S1008). In step S1008, if there is a block for which the coding process has not been completed (No in step S1008), the process returns to step S1001. On the other hand, in step S1008, when there is no block for which the coding process has not been completed (Yes in step S1008), the process according to the flowchart of FIG. 23 is completed.

そして、動画像符号化装置は、ステップS1001に戻ると、直前に符号化したブロックで実際に発生した符号量を反映したうえで次のブロックの量子化制御パラメータを決定する。 Then, when returning to step S1001, the moving image coding apparatus determines the quantization control parameter of the next block after reflecting the code amount actually generated in the block encoded immediately before.

上記の方式(係数打ち切り制御)では、ブロック単位で実際に出力した符号量をフィードバックしてフレーム全体の発生符号量を制御するため、目標符号量への制御を精密に行うことができる。 In the above method (coefficient censoring control), since the code amount actually output in block units is fed back to control the generated code amount of the entire frame, it is possible to precisely control the target code amount.

〔R−ρモデル〕
また、特許文献2(特表2013−532439号公報)には、R−ρモデルと呼ばれるモデルに基づいたレート制御方式が開示されている(R:ビットレート、ρ:量子化後にゼロになる変換係数の比率)。
[R-ρ model]
Further, Patent Document 2 (Japanese Patent Laid-Open No. 2013-532439) discloses a rate control method based on a model called an R-ρ model (R: bit rate, ρ: conversion to be zero after quantization). Coefficient ratio).

一般に、R−ρモデルでは、Rとρとが線形に近い関係にあり、式1のように定式化される(θは係数)。
R=θ(1−ρ)・・・(1)
R−ρモデルに基づくレート制御では、まず、仮に設定したQPでフレーム全体の予測、変換、量子化まで処理し、量子化係数の発生状況からRとρの関係を得る。このとき、係数θが求められる。次に、R−ρモデルを用い、目標符号量を実現するQPを算出する。そして、算出したQPで量子化を行ない、符号を生成する。
Generally, in the R-ρ model, R and ρ have a nearly linear relationship, and are formulated as in Equation 1 (θ is a coefficient).
R = θ (1-ρ) ・ ・ ・ (1)
In the rate control based on the R-ρ model, first, the QP set tentatively is used to process the prediction, conversion, and quantization of the entire frame, and the relationship between R and ρ is obtained from the occurrence status of the quantization coefficient. At this time, the coefficient θ is obtained. Next, the QP that realizes the target code amount is calculated using the R-ρ model. Then, the calculated QP is used for quantization to generate a code.

図24は、R−ρモデルに基づいてレート制御を行なう動画像符号化装置のブロック図である。図25は、図24の構成における信号の流れの一例を示す概念図である。図24の量子化手段202、逆量子化手段203および符号化手段205は、図19の構成と同様に動作する。 FIG. 24 is a block diagram of a moving image coding device that performs rate control based on the R-ρ model. FIG. 25 is a conceptual diagram showing an example of signal flow in the configuration of FIG. 24. The quantization means 202, the dequantization means 203, and the coding means 205 of FIG. 24 operate in the same manner as the configuration of FIG.

符号量モデル構築手段501は、変換処理の結果に基づいてR−ρモデルを構築する。 The code quantity model building means 501 builds an R-ρ model based on the result of the conversion process.

QP制御手段502は、R−ρモデルを利用してフレームの発生符号量を目標符号量に合わせるようにQPを決定する。 The QP control means 502 determines the QP so as to match the generated code amount of the frame with the target code amount by using the R-ρ model.

変換係数メモリ503は、1フレーム分の変換係数を記憶する。 The conversion coefficient memory 503 stores the conversion coefficient for one frame.

図26は、R−ρモデルに基づいたレート制御における動作を示すフローチャートである。 FIG. 26 is a flowchart showing the operation in rate control based on the R-ρ model.

QP制御手段502は、フレーム全体に適用するQPを決定する(ステップS2001)。例えば、R−ρモデルに基づいたレート制御では、TM―5のフレームレベル制御のように、フレーム符号化タイプによって異なる複雑度推定に基づいたフレーム単位の符号量割り当てと、過去の符号化履歴に基づくQP算出などで決定することができる。また、R−ρモデルに基づいたレート制御では、入力画像と予測画像との差分の統計的性質に基づいてQP算出などを用いてもよい。 The QP control means 502 determines the QP to be applied to the entire frame (step S2001). For example, in rate control based on the R-ρ model, like the frame level control of TM-5, the code amount allocation for each frame based on the complexity estimation that differs depending on the frame coding type and the past coding history It can be determined by QP calculation based on the above. Further, in the rate control based on the R-ρ model, QP calculation or the like may be used based on the statistical property of the difference between the input image and the predicted image.

図示しない減算・変換手段は、ブロックに対して所定の直交変換処理を行ない、変換係数を出力し、フレーム全体の変換係数を記憶する(ステップS2002)。 The subtraction / conversion means (not shown) performs a predetermined orthogonal transformation process on the block, outputs the conversion coefficient, and stores the conversion coefficient of the entire frame (step S2002).

動画像符号化装置は、フレーム中の全てのブロックに関する処理が完了したかを判定する(ステップS2003)。処理が完了していないブロックがある場合(ステップS2003でNo)、ステップS2002に戻る。一方、ステップS2003において、処理が完了していないブロックがない場合(ステップS2003でYes)、ステップS2004に進む。 The moving image coding device determines whether or not the processing relating to all the blocks in the frame is completed (step S2003). If there is a block for which processing has not been completed (No in step S2003), the process returns to step S2002. On the other hand, in step S2003, if there is no block for which processing has not been completed (Yes in step S2003), the process proceeds to step S2004.

符号量モデル構築手段501は、フレーム内の全てのブロックにおける変換結果の変換係数の発生状況に基づいて、R−ρモデル等の符号量モデルを構築しモデルパラメータを算出する(ステップS2004)。 The code quantity model construction means 501 constructs a code quantity model such as an R-ρ model and calculates model parameters based on the occurrence status of the conversion coefficient of the conversion result in all the blocks in the frame (step S2004).

QP制御手段502は、R−ρモデルを利用して、フレームの発生符号量を目標符号量に合わせるようにQPを更新する(ステップS2005)。例えば、特許文献2の技術では、変換係数のヒストグラムを構築してQPの値と非ゼロ係数比の関係を計算し、計算値に基づいてQPを変更する。 The QP control means 502 uses the R-ρ model to update the QP so as to match the generated code amount of the frame with the target code amount (step S2005). For example, in the technique of Patent Document 2, a histogram of conversion coefficients is constructed, the relationship between the QP value and the non-zero coefficient ratio is calculated, and the QP is changed based on the calculated value.

量子化手段202は、変更したQPに基づいて変換係数の量子化処理を行ない、量子化係数を出力する(ステップS2006)。 The quantization means 202 performs the quantization processing of the conversion coefficient based on the changed QP, and outputs the quantization coefficient (step S2006).

符号化手段205は、量子化係数に可変長符号化処理を行ない、符号を出力する(ステップS2007)。 The coding means 205 performs a variable-length coding process on the quantization coefficient and outputs a code (step S2007).

逆量子化手段203は、量子化係数の逆量子化処理を行なう(ステップS2008)。 The inverse quantization means 203 performs an inverse quantization process of the quantization coefficient (step S2008).

図示しない逆変換・加算手段は、逆変換処理を行なって1ブロックの処理を完了する(ステップS2009)。 An inverse transformation / addition means (not shown) performs an inverse transformation process to complete the process of one block (step S2009).

動画像符号化装置は、フレーム中の全てのブロックに関する処理が完了したかを判定する(ステップS2010)。処理が完了していないブロックがある場合(ステップS2010でNo)、ステップS2006に戻る。一方、全てのブロックで処理が完了した場合(ステップS2010でYes)、図26のフローチャートに沿った処理は終了である。 The moving image coding device determines whether or not the processing relating to all the blocks in the frame is completed (step S2010). If there is a block for which processing has not been completed (No in step S2010), the process returns to step S2006. On the other hand, when the processing is completed in all the blocks (Yes in step S2010), the processing according to the flowchart of FIG. 26 is completed.

R−ρモデルを利用した方式では、フレーム全体の変換係数の発生状況に鑑みて適切なQPを設定するため、フレーム内で安定した画質を達成できる。 In the method using the R-ρ model, an appropriate QP is set in consideration of the occurrence status of the conversion coefficient of the entire frame, so that stable image quality can be achieved in the frame.

TM−5方式や係数打ち切り制御では、ブロック単位の局所的なフィードバックで制御を行なうため、フィードバックの強度によってはフレーム内でQPなどの制御パラメータが変動したり振動したりすることによって画質が不安定になる場合がある。これは、1フレーム内に絵柄が複雑で符号化が難しい領域と、絵柄が単純で符号化が易しい領域とが混在する場合に顕著となる。また、TM−5方式や係数打ち切り制御には、ブロック単位でのフィードバック制御であるためにブロック単位での逐次処理となり、複数のブロックを並列処理することができず、高速化が難しいという問題点がある。また、特許文献1の係数打ち切り処理を行なう方式は、制御が安定しない場合があるという問題点がある。 In the TM-5 method and coefficient censoring control, control is performed by local feedback in block units, so the image quality is unstable due to fluctuations or vibrations of control parameters such as QP within the frame depending on the strength of the feedback. May become. This becomes remarkable when a region in which the pattern is complicated and difficult to code and a region in which the pattern is simple and easy to code coexist in one frame. In addition, the TM-5 method and the coefficient truncation control have a problem that it is difficult to speed up because the feedback control is performed in block units, so that the sequential processing is performed in block units, and multiple blocks cannot be processed in parallel. There is. Further, the method of performing the coefficient truncation process of Patent Document 1 has a problem that the control may not be stable.

R−ρモデルでは、フレーム全体の変換係数を用いて符号量モデルを構築して種々のQP設定に対応する符号量予測を行なってQPを修正する。R−ρモデルでは、変換係数が画素数と同数の値が発生するために多数の変換係数値を分析することになり、処理量が大きくなる。また、R−ρモデルでは、符号量モデルを用いたQP決定に基づいて制御するため、符号量モデルに誤差が発生した場合の目標符号量との差異が大きくなる可能性がある。 In the R-ρ model, the code amount model is constructed using the conversion coefficient of the entire frame, and the code amount prediction corresponding to various QP settings is performed to correct the QP. In the R-ρ model, since the conversion coefficient is the same as the number of pixels, a large number of conversion coefficient values are analyzed, which increases the amount of processing. Further, since the R-ρ model is controlled based on the QP determination using the code amount model, there is a possibility that the difference from the target code amount when an error occurs in the code amount model becomes large.

特許文献3(特開2011−142660号公報)の装置は、量子化処理を2回以上実行する。量子化処理は、個々の変換係数に乗算または除算を含む演算を行なう比較的負荷の大きな処理である。そのため、特許文献3の装置には、量子化処理を繰り返し実行すると装置全体の処理負荷が大きくなるという問題点がある。 The apparatus of Patent Document 3 (Japanese Unexamined Patent Publication No. 2011-142660) executes the quantization process twice or more. Quantization processing is a relatively heavy processing that performs operations including multiplication or division of individual conversion coefficients. Therefore, the apparatus of Patent Document 3 has a problem that the processing load of the entire apparatus increases when the quantization process is repeatedly executed.

以上の関連技術に対して、本発明の各実施形態によれば、第1符号化処理では量子化処理、第2符号化処理では係数打ち切り処理を行なうように構成することで、処理負荷低減と安定制御を両立できる。さらに、本発明の各実施形態によれば、量子化結果の非ゼロ係数の有無や分布状況の情報に基づいて、ブロック単位で不必要な処理をスキップしてさらに処理負荷を軽減できる。 With respect to the above related techniques, according to each embodiment of the present invention, the processing load can be reduced by configuring the first coding process to perform the quantization process and the second coding process to perform the coefficient truncation process. Both stable control can be achieved. Further, according to each embodiment of the present invention, unnecessary processing can be skipped in block units and the processing load can be further reduced based on the information on the presence / absence of the non-zero coefficient of the quantization result and the distribution status.

以上、実施形態を参照して本発明を説明してきたが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the structure and details of the present invention within the scope of the present invention.

この出願は、2016年10月24日に出願された日本出願特願2016−207469を基礎とする優先権を主張し、その開示の全てをここに取り込む。 This application claims priority on the basis of Japanese application Japanese Patent Application No. 2016-207469 filed on October 24, 2016, the entire disclosure of which is incorporated herein by reference.

1 動画像符号化装置
10 予測手段
11 減算・変換手段
12 量子化係数設定手段
13 符号化手段
14 逆量子化手段
15 逆変換・加算手段
16 フィルタ
17 フレームバッファ
21 QP制御手段
22 量子化手段
23 量子化係数メモリ
24 符号量モデル構築手段
25 打ち切り制御手段
26 係数打ち切り手段
27 量子化係数分析手段
28 第2量子化係数メモリ
1 Video coding device 10 Prediction means 11 Subtraction / conversion means 12 Quantization coefficient setting means 13 Coding means 14 Inverse quantization means 15 Inverse conversion / addition means 16 Filter 17 Frame buffer 21 QP control means 22 Quantization means 23 Quantum Quantization coefficient memory 24 Code amount model construction means 25 termination control means 26 Quantization censoring means 27 Quantization coefficient analysis means 28 Second quantization coefficient memory

Claims (10)

符号化対象画像を構成する処理対象ブロックごとの目標符号量を入力とし、前記符号化対象画像全体の量子化係数を決定するための量子化制御パラメータを前記目標符号量に基づいて生成する量子化パラメータ制御手段と、
前記符号化対象画像に基づいて生成される変換係数を入力とするとともに、前記量子化パラメータ制御手段から前記量子化制御パラメータを入力とし、前記量子化制御パラメータと前記変換係数とを用いて量子化処理を行なうことによって前記量子化係数を生成する量子化手段と、
前記量子化手段によって生成される前記量子化係数が格納される量子化係数メモリと、
前記量子化係数メモリに格納された前記量子化係数を取得し、前記符号化対象画像全体を量子化した前記量子化係数を用いて符号量モデルを構築する符号量モデル構築手段と、
前記符号量モデル構築手段から前記符号量モデルを入力するとともに、前記目標符号量を入力とし、前記目標符号量と前記符号量モデルとに基づいて、前記量子化係数を打ち切るための打ち切りパラメータを決定する打ち切り制御手段と、
前記打ち切り制御手段から前記打ち切りパラメータを入力するとともに、前記量子化係数メモリに格納された前記量子化係数を取得し、前記打ち切りパラメータに従って前記量子化係数を打ち切る係数打ち切り手段とを有する量子化係数設定手段を備える符号化装置。
Quantization in which the target code amount for each processing target block constituting the coded target image is input, and the quantization control parameter for determining the quantization coefficient of the entire coded target image is generated based on the target code amount. Parameter control means and
The conversion coefficient generated based on the coded image is input, the quantization control parameter is input from the quantization parameter control means, and the quantization control parameter and the conversion coefficient are used for quantization. A quantization means that generates the quantization coefficient by performing processing, and
A quantization coefficient memory in which the quantization coefficient generated by the quantization means is stored, and
A code amount model construction means for acquiring the quantization coefficient stored in the quantization coefficient memory and constructing a code amount model using the quantization coefficient obtained by quantizing the entire coded target image.
The code amount model is input from the code amount model construction means, and the target code amount is input, and the cutoff parameter for cutting off the quantization coefficient is determined based on the target code amount and the code amount model. Discontinuation control means and
A quantization coefficient setting having a coefficient cutoff means for inputting the cutoff parameter from the cutoff control means, acquiring the quantization coefficient stored in the quantization coefficient memory, and cutting off the quantization coefficient according to the cutoff parameter. A coding device comprising means.
前記符号化対象画像を符号化する際に用いる符号化済み画像が格納されるフレームバッファと、
前記符号化対象画像を入力とし、前記符号化対象画像に対応する前記符号化済み画像を前記フレームバッファから取得し、前記符号化対象画像と前記符号化済み画像とを用いて予測処理を行なうことによって予測画像を生成する予測手段と、
前記符号化対象画像を入力とし、前記符号化対象画像に対応する前記予測画像を前記予測手段から取得し、前記符号化対象画像から前記予測画像を減算して生成した予測誤差画像に直交変換処理を行って前記変換係数を生成する減算・変換手段と、
前記量子化係数設定手段から前記量子化係数を入力とし、前記量子化係数を逆量子化する逆量子化手段と、
前記逆量子化手段から逆量子化された前記量子化係数を入力とするとともに、前記予測手段から前記予測画像を入力とし、逆量子化された前記量子化係数と前記予測画像との加算を行って再構築画像を生成する逆変換・加算手段と、
前記逆変換・加算手段によって生成された前記再構築画像を入力とし、前記再構築画像にフィルタ処理を行い、フィルタ処理された前記再構築画像を前記フレームバッファに格納するフィルタと、
前記量子化係数設定手段から前記量子化係数を入力とし、前記量子化係数をエントロピー符号化した結果のビットストリームを出力する符号化手段とを備え、
前記量子化係数設定手段は、
前記減算・変換手段から前記変換係数を入力とするとともに、前記処理対象ブロックごとの前記目標符号量を入力とし、前記目標符号量に基づいて前記量子化制御パラメータを決定し、決定した前記量子化制御パラメータと前記変換係数とを用いて前記量子化係数を生成する請求項1に記載の符号化装置。
A frame buffer for storing the coded image used when encoding the coded image, and a frame buffer.
Using the coded target image as an input, the coded image corresponding to the coded target image is acquired from the frame buffer, and prediction processing is performed using the coded target image and the coded image. A prediction means that generates a prediction image by
With the coded target image as an input, the predicted image corresponding to the coded target image is acquired from the prediction means, and the prediction error image generated by subtracting the predicted image from the coded target image is subjected to orthogonal conversion processing. To generate the conversion coefficient by performing the subtraction / conversion means,
An inverse quantization means that takes the quantization coefficient as an input from the quantization coefficient setting means and dequantizes the quantization coefficient,
The quantization coefficient dequantized from the dequantization means is input, and the prediction image is input from the prediction means, and the dequantized quantization coefficient and the prediction image are added. Inverse conversion / addition means to generate a reconstructed image
A filter that takes the reconstructed image generated by the inverse transformation / addition means as an input, filters the reconstructed image, and stores the filtered reconstructed image in the frame buffer.
It is provided with a coding means for inputting the quantization coefficient from the quantization coefficient setting means and outputting a bit stream as a result of entropy coding the quantization coefficient.
The quantization coefficient setting means is
The conversion coefficient is input from the subtraction / conversion means, the target code amount for each processing target block is input, the quantization control parameter is determined based on the target code amount, and the determined quantization is performed. The coding apparatus according to claim 1, wherein the quantization coefficient is generated by using the control parameter and the conversion coefficient.
前記量子化係数設定手段は、
前記量子化手段から前記量子化係数を入力とし、前記量子化係数を分析して前記処理対象ブロックにおいて量子化後に非ゼロとなる前記量子化係数が存在するかどうかを検証し、非ゼロとなる前記量子化係数が存在するかどうかに関する非ゼロ量子化係数有無情報を前記量子化係数に対応付けて前記量子化係数メモリに格納する量子化係数分析手段を有し、
前記係数打ち切り手段は、
前記処理対象ブロックに前記非ゼロ量子化係数有無情報がない場合には前記量子化係数を打ち切らず、
前記処理対象ブロックに前記非ゼロ量子化係数有無情報がある場合には前記量子化係数を打ち切る請求項2に記載の符号化装置。
The quantization coefficient setting means is
The quantization coefficient is input from the quantization means, the quantization coefficient is analyzed, and it is verified whether or not the quantization coefficient that becomes non-zero after quantization exists in the processing target block, and the quantization coefficient becomes non-zero. It has a quantization coefficient analysis means for storing non-zero quantization coefficient presence / absence information regarding whether or not the quantization coefficient exists in the quantization coefficient memory in association with the quantization coefficient.
The coefficient censoring means is
If the processing target block does not have the non-zero quantization coefficient presence / absence information, the quantization coefficient is not cut off.
The coding apparatus according to claim 2, wherein when the processing target block has the non-zero quantization coefficient presence / absence information, the quantization coefficient is cut off.
前記量子化係数分析手段は、
いずれかの前記処理対象ブロック内に非ゼロとなる前記量子化係数が存在する場合には、前記処理対象ブロックにおける非ゼロとなる前記量子化係数の分布状況を示す係数分布情報を生成し、
前記係数打ち切り手段は、
前記打ち切りパラメータと前記係数分布情報とを用いた判定結果に基づいて、
前記処理対象ブロックを構成する少なくともいずれかの対象サブブロックに非ゼロとなる前記量子化係数がない場合には前記量子化係数を打ち切らず、
少なくともいずれかの前記対象サブブロックに非ゼロとなる前記量子化係数がある場合には前記量子化係数を打ち切る請求項3に記載の符号化装置。
The quantization coefficient analysis means is
When the non-zero quantization coefficient exists in any of the processing target blocks, coefficient distribution information indicating the distribution status of the non-zero quantization coefficient in the processing target block is generated.
The coefficient censoring means is
Based on the determination result using the censoring parameter and the coefficient distribution information
If at least one of the target sub-blocks constituting the processing target block does not have the non-zero quantization coefficient, the quantization coefficient is not cut off.
The coding apparatus according to claim 3, wherein when at least one of the target sub-blocks has the quantization coefficient that is non-zero, the quantization coefficient is cut off.
前記量子化パラメータ制御手段は、
決定した前記量子化制御パラメータで決まる量子化ステップ幅を所定の比率だけ小さくするように前記量子化制御パラメータを修正する請求項3または4に記載の符号化装置。
The quantization parameter control means is
The coding apparatus according to claim 3 or 4, wherein the quantization control parameter is modified so that the quantization step width determined by the determined quantization control parameter is reduced by a predetermined ratio.
前記打ち切り制御手段は、
前記処理対象ブロックごとの前記量子化制御パラメータが異なる場合に、前記処理対象ブロックごとに異なる前記打ち切りパラメータを設定する請求項3乃至5のいずれか一項に記載の符号化装置。
The censoring control means
The coding apparatus according to any one of claims 3 to 5, wherein when the quantization control parameter is different for each processing target block, the different termination parameter is set for each processing target block.
前記量子化係数設定手段は、
前記係数打ち切り手段によって係数が打ち切られた前記量子化係数を格納させる追加量子化係数メモリを有する請求項3乃至6のいずれか一項に記載の符号化装置。
The quantization coefficient setting means is
The coding apparatus according to any one of claims 3 to 6, further comprising an additional quantization coefficient memory for storing the quantization coefficient whose coefficient has been terminated by the coefficient termination means.
前記減算・変換手段、前記量子化手段および前記係数打ち切り手段のうち少なくともいずれかは、複数の前記処理対象ブロックに対する処理を並列で実行する請求項2乃至7のいずれか一項に記載の符号化装置。 The coding according to any one of claims 2 to 7, wherein at least one of the subtraction / conversion means, the quantization means, and the coefficient censoring means executes processing for a plurality of the processing target blocks in parallel. Device. 符号化対象画像を構成する処理対象ブロックごとの目標符号量を入力し、
前記符号化対象画像全体の量子化係数を決定するための量子化制御パラメータを前記目標符号量に基づいて生成し、
前記符号化対象画像に基づいて生成される変換係数を入力し、
前記量子化制御パラメータと前記変換係数とを用いて量子化処理を行なうことによって前記量子化係数を生成し、
生成した前記量子化係数を量子化係数メモリに格納し、
前記量子化係数メモリに格納された前記符号化対象画像全体を量子化した前記量子化係数を用いて符号量モデルを構築し、
前記目標符号量と前記符号量モデルとに基づいて、前記量子化係数を打ち切るための打ち切りパラメータを決定し、
前記量子化係数メモリに格納された前記量子化係数を前記打ち切りパラメータに従って打ち切る符号化方法。
Enter the target code amount for each processing target block that constitutes the coded target image,
A quantization control parameter for determining the quantization coefficient of the entire image to be encoded is generated based on the target code amount.
Enter the conversion coefficient generated based on the image to be encoded.
The quantization coefficient is generated by performing a quantization process using the quantization control parameter and the conversion coefficient.
The generated quantization coefficient is stored in the quantization coefficient memory, and is stored in the quantization coefficient memory.
A code amount model is constructed using the quantization coefficient obtained by quantizing the entire coded image stored in the quantization coefficient memory.
Based on the target code amount and the code amount model, the cutoff parameter for cutting off the quantization coefficient is determined.
Quantization coefficient A coding method for censoring the quantization coefficient stored in the memory according to the censoring parameter.
符号化対象画像を構成する処理対象ブロックごとの目標符号量を入力する処理と、
前記符号化対象画像全体の量子化係数を決定するための量子化制御パラメータを前記目標符号量に基づいて生成する処理と、
前記符号化対象画像に基づいて生成される変換係数を入力する処理と、
前記量子化制御パラメータと前記変換係数とを用いて量子化処理を行なうことによって前記量子化係数を生成する処理と、
生成した前記量子化係数を量子化係数メモリに格納する処理と、
前記量子化係数メモリに格納された前記符号化対象画像全体を量子化した前記量子化係数を用いて符号量モデルを構築する処理と、
前記目標符号量と前記符号量モデルとに基づいて、前記量子化係数を打ち切るための打ち切りパラメータを決定する処理と、
前記量子化係数メモリに格納された前記量子化係数を前記打ち切りパラメータに従って打ち切る処理とをコンピュータに実行させるプログラ

Processing to input the target code amount for each processing target block that constitutes the coded target image, and
A process of generating a quantization control parameter for determining the quantization coefficient of the entire image to be encoded based on the target code amount, and a process of generating the quantization control parameter.
The process of inputting the conversion coefficient generated based on the image to be encoded, and
A process of generating the quantization coefficient by performing a quantization process using the quantization control parameter and the conversion coefficient, and a process of generating the quantization coefficient.
The process of storing the generated quantization coefficient in the quantization coefficient memory, and
A process of constructing a code amount model using the quantization coefficient obtained by quantizing the entire coded image stored in the quantization coefficient memory.
A process of determining a truncation parameter for truncating the quantization coefficient based on the target code amount and the code amount model, and
Program for executing a process of aborting the quantized coefficients stored in the quantized coefficient memory in accordance with the abort parameter into the computer.

JP2018547632A 2016-10-24 2017-10-20 Coding device, coding method and program Active JP6943256B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2016207469 2016-10-24
JP2016207469 2016-10-24
PCT/JP2017/038045 WO2018079444A1 (en) 2016-10-24 2017-10-20 Coding device, coding method, and program recording medium

Publications (2)

Publication Number Publication Date
JPWO2018079444A1 JPWO2018079444A1 (en) 2019-09-19
JP6943256B2 true JP6943256B2 (en) 2021-09-29

Family

ID=62024889

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018547632A Active JP6943256B2 (en) 2016-10-24 2017-10-20 Coding device, coding method and program

Country Status (2)

Country Link
JP (1) JP6943256B2 (en)
WO (1) WO2018079444A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021084679A1 (en) * 2019-10-31 2021-05-06

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10210471A (en) * 1997-01-17 1998-08-07 Mitsubishi Electric Corp Image coder and image decoder
JPH10243399A (en) * 1997-02-25 1998-09-11 Sharp Corp Code amount controller and moving image encoder provided with the same
JP5059728B2 (en) * 2008-09-30 2012-10-31 ルネサスエレクトロニクス株式会社 Image coding apparatus and method
US10091504B2 (en) * 2015-01-08 2018-10-02 Microsoft Technology Licensing, Llc Variations of rho-domain rate control

Also Published As

Publication number Publication date
WO2018079444A1 (en) 2018-05-03
JPWO2018079444A1 (en) 2019-09-19

Similar Documents

Publication Publication Date Title
US11076175B2 (en) Video encoding method for encoding division block, video decoding method for decoding division block, and recording medium for implementing the same
KR102294733B1 (en) Methods of determination for chroma quantization parameter and apparatuses for using the same
DK3282705T3 (en) PROCEDURE FOR DECODING AND APPARATUS FOR ENCODING A PICTURE THROUGH INTRAPHIC PREDICTION.
KR20220151140A (en) Method for image encoding and computer readable redording meduim thereof
CN107483947B (en) Video encoding and decoding apparatus and non-transitory computer-readable storage medium
US20140119455A1 (en) Image coding apparatus, image coding method, and program, and image decoding apparatus, image decoding method, and program
KR101614828B1 (en) Method, device, and program for coding and decoding of images
JP2012191294A (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP2022514921A (en) Methods and equipment for the interaction between intra-prediction mode and block difference pulse code modulation mode
TW202332273A (en) Image coding apparatus, image coding method, and storage media
KR20200128577A (en) Intra prediction device, image coding device, image decoding device and program
JP6708211B2 (en) Moving picture coding apparatus, moving picture coding method, and recording medium storing moving picture coding program
CN113545055B (en) Video encoding and decoding method, device and storage medium
JP6943256B2 (en) Coding device, coding method and program
KR20130088114A (en) Image processing device, image processing method, and program
JP5197428B2 (en) Image coding apparatus and image coding method
JP6415637B2 (en) Decoding device, decoding method, program, and storage medium
KR101443865B1 (en) Method and apparatus for inter prediction
US10448035B2 (en) Information compression device, information compression method, non-volatile recording medium, and video coding device
JP5937926B2 (en) Image encoding device, image decoding device, image encoding program, and image decoding program
TW202318872A (en) Image decoder, image decoding method, and program
JP6641149B2 (en) Video encoding device, video decoding device, and program
KR20150057801A (en) Video coding method for fast intra prediction and apparatus thereof
JP6953576B2 (en) Coding device, coding method, program and storage medium
JP6686095B2 (en) Decoding device, decoding method, program, and storage medium

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190408

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200915

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210823

R150 Certificate of patent or registration of utility model

Ref document number: 6943256

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150