JP2020028022A - Image encoding apparatus, control method therefor, and program - Google Patents

Image encoding apparatus, control method therefor, and program Download PDF

Info

Publication number
JP2020028022A
JP2020028022A JP2018151964A JP2018151964A JP2020028022A JP 2020028022 A JP2020028022 A JP 2020028022A JP 2018151964 A JP2018151964 A JP 2018151964A JP 2018151964 A JP2018151964 A JP 2018151964A JP 2020028022 A JP2020028022 A JP 2020028022A
Authority
JP
Japan
Prior art keywords
encoding
block
component
interest
code amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018151964A
Other languages
Japanese (ja)
Other versions
JP7121584B2 (en
Inventor
金子 唯史
Tadashi Kaneko
金子  唯史
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2018151964A priority Critical patent/JP7121584B2/en
Publication of JP2020028022A publication Critical patent/JP2020028022A/en
Application granted granted Critical
Publication of JP7121584B2 publication Critical patent/JP7121584B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

To suppress image quality degradation for an image in which the complexity of a luminance component is high and the complexity of a chrominance component is low even in a simple encoding process, and generates encoded data of a target code amount.SOLUTION: An image encoding apparatus includes a detection unit that detects the complexity of each of a luminance component and a chrominance component in a target block in an image to be encoded, first encoding means that performs provisional DPCM encoding on each of the luminance component and the chrominance component in the target block by using a plurality of different quantization parameters, and determines a code amount for each of the quantization parameters, a determination unit that determines whether to perform the DPCM encoding or PCM encoding for the target block on the basis of the result of detection by the detection unit, the code amount for each of the quantization parameter obtained by the first coding unit, and the target code amount set in advance, and determines an offset for reducing a quantization parameter of the chrominance component with respect to the luminance component when the DPCM encoding is performed, and a second encoding unit that generates encoded data of the target code amount from the target block on the basis of the result of the determination by the determination unit.SELECTED DRAWING: Figure 1

Description

本発明は画像符号化技術、特にDPCMを用いた画像符号化技術に関するものである。   The present invention relates to an image coding technique, and more particularly to an image coding technique using DPCM.

近年、デジタルビデオなどの撮像装置は高解像度化、高フレームレート化に伴って、システムで扱う画像データ量が著しく増加しており、画像メモリやバスインターフェース回路の高速化が必要となり、装置の高コスト化を招いている。そこで、画像メモリやバスインターフェースの前後で画像の圧縮符号化を行って、画像データ量を削減する事で回路の高速化を抑制する技術がある。この用途の画像符号化方式は回路規模が小型で、符号化遅延の小さい事が望まれる。そのため、従来のJPEGやMPEG2に代表されるDCTベースの符号化方式は不向きである。そこでDPCMベースの予測符号化方式での提案がされている(例えば特許文献1)。   In recent years, with the increase in resolution and frame rate of imaging devices for digital video and the like, the amount of image data handled by the system has increased remarkably, and it has become necessary to increase the speed of image memories and bus interface circuits. It is costly. Therefore, there is a technique for compressing and encoding an image before and after an image memory and a bus interface to reduce the amount of image data, thereby suppressing an increase in circuit speed. It is desired that the image coding system for this purpose has a small circuit scale and a small coding delay. Therefore, the conventional DCT-based coding method represented by JPEG or MPEG2 is not suitable. Therefore, a proposal has been made for a DPCM-based predictive coding method (for example, Patent Document 1).

特開2016−213528号公報JP-A-2006-213528

特許文献1に記載の符号化方法によれば、輝度信号と色差信号で表される画像のブロックの符号化において、輝度信号の複雑度が高く、色差信号が平坦なブロックの場合、そのブロックの輝度信号の画質劣化はあまり目立たないものの、色差信号の画質劣化が目立つというという問題が存在する。   According to the encoding method described in Patent Document 1, in encoding a block of an image represented by a luminance signal and a chrominance signal, if the luminance signal has a high complexity and the chrominance signal is a flat block, Although the image quality degradation of the luminance signal is not so noticeable, there is a problem that the image quality degradation of the color difference signal is noticeable.

本発明は上記課題に鑑みなされたものであり、輝度信号の複雑度が高く、色差信号が低いような画像であってもこれまでよりも画質劣化を抑制する符号化データを生成する技術を提供しようとするものである。   The present invention has been made in view of the above problems, and provides a technique for generating encoded data that suppresses image quality deterioration even in an image having a high luminance signal complexity and a low color difference signal. What you want to do.

この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
輝度成分と色差成分で構成される画像データから、予め設定されたサイズのブロックを単位に入力し、当該ブロックを単位に符号化データを生成する画像符号化装置であって、
着目ブロック内の輝度成分、色差成分それぞれの複雑度を検出する検出手段と、
前記着目ブロック内の輝度成分、色差成分それぞれについて、互いに異なる複数の量子化パラメータを用いて仮のDPCM符号化し、量子化パラメータ毎の符号量を求める第1の符号化手段と、
前記検出手段による検出の結果、前記第1の符号化手段で求めた量子化パラメータ毎の符号量、並びに、予め設定された目標符号量に基づき、前記着目ブロックに対してDPCM符号化するか、PCM符号化するか、並びに、DPCM符号化する場合には輝度成分に対して色差成分の量子化パラメータを小さくするためのオフセットを判定する判定手段と
該判定手段の判定の結果に基づき、前記着目ブロックから前記目標符号量の符号化データを生成する第2の符号化手段とを有し、
前記第2の符号化手段は、
該判定手段が、前記着目ブロックに対して前記PCM符号化すると判定した場合、当該着目ブロックの輝度成分及び色差成分のデータをPCM符号化を行って、前記目標符号量の符号化データを生成し、
該判定手段が、前記着目ブロックに対して前記DPCM符号化し、前記オフセットを無しにすると判定した場合には、当該着目ブロックの輝度成分及び色差成分を同じ量子化パラメータを用いて、DPCM符号化して、前記目標符号量の符号化データを生成し、
該判定手段が、前記着目ブロックに対して前記DPCM符号化し、前記オフセットを設定すると判定した場合には、当該着目ブロックの輝度成分、前記色差成分に対して前記オフセットに従った量子化パラメータを用いて、DPCM符号化し、前記目標符号量の符号化データを生成することを特徴とする。
In order to solve this problem, for example, an image encoding device of the present invention has the following configuration. That is,
An image encoding apparatus configured to input a block of a predetermined size as a unit from image data including a luminance component and a chrominance component in units, and generate encoded data in units of the block.
Detecting means for detecting the complexity of each of the luminance component and the color difference component in the block of interest;
First encoding means for provisionally DPCM-encoding each of the luminance component and the chrominance component in the block of interest using a plurality of mutually different quantization parameters, and calculating a code amount for each quantization parameter;
As a result of the detection by the detection unit, based on the code amount for each quantization parameter obtained by the first encoding unit and the target code amount set in advance, whether to perform DPCM encoding on the block of interest, Judgment means for judging whether to perform PCM encoding or, in the case of DPCM encoding, an offset for reducing a quantization parameter of a chrominance component with respect to a luminance component, and And second encoding means for generating encoded data of the target code amount from the block.
The second encoding means includes:
When the determination means determines that the target block is to be subjected to the PCM encoding, the data of the luminance component and the chrominance component of the target block are subjected to the PCM encoding to generate encoded data of the target code amount. ,
When the determination unit determines that the block of interest is subjected to the DPCM encoding and the offset is eliminated, the luminance component and the color difference component of the block of interest are subjected to DPCM encoding using the same quantization parameter. Generating encoded data of the target code amount,
When the determination unit determines that the DPCM encoding is performed on the block of interest and the offset is set, a quantization parameter according to the offset is used for the luminance component and the color difference component of the block of interest. Then, DPCM encoding is performed to generate encoded data of the target code amount.

本発明によれば、単純な符号化処理でありながら、輝度成分の複雑度が高く、色差成分の複雑度が低いような画像に対して画質劣化を抑制でき、かつ、目標符号量の符号化データを生成することが可能になる。   Advantageous Effects of Invention According to the present invention, it is possible to suppress image quality degradation for an image in which the complexity of a luminance component is high and the complexity of a chrominance component is low while performing simple encoding processing, and encoding of a target code amount is performed. It is possible to generate data.

実施形態の画像符号化装置のブロック構成図。FIG. 1 is a block diagram of an image encoding device according to an embodiment. 実施形態の画像復号装置のブロック構成図。FIG. 2 is a block diagram of the image decoding apparatus according to the embodiment. 実施形態における符号化部のブロック構成図。FIG. 2 is a block diagram of an encoding unit according to the embodiment. 符号化対象のブロックの成分値の並びの例を示す図。FIG. 3 is a diagram illustrating an example of a sequence of component values of a block to be encoded. 実施形態における符号化パラメータ決定部の処理内容を示すフローチャート。9 is a flowchart illustrating processing performed by an encoding parameter determination unit according to the embodiment. 実施形態における符号化パラメータ決定部における符号化モードの決定処理を示すフローチャート。9 is a flowchart illustrating a coding mode determining process in a coding parameter determining unit according to the embodiment. 実施形態における目標符号量に対する量子化パラメータの決定処理を説明するための図。FIG. 5 is a diagram for explaining a process of determining a quantization parameter for a target code amount in the embodiment. 実施形態における1ブロックの符号化データのデータ構造を示す図。FIG. 4 is a diagram illustrating a data structure of encoded data of one block according to the embodiment.

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。なお、以下に示す実施形態における構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。

[第1の実施形態]
図1は、本実施形態に係る画像符号化装置の構成例を示すブロック図である。この画像符号化装置100は、入力端子101、仮符号化処理部110、本符号化処理部120、および、出力端子102を有する。仮符号化処理部110は、複雑度検出部111、複数の符号化部112〜114、符号化パラメータ決定部115から構成される。また、本符号化処理部120は、遅延部121、符号化部122、多重化部123、QP生成部124で構成されている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the configurations in the embodiments described below are merely examples, and the present invention is not limited to the illustrated configurations.

[First Embodiment]
FIG. 1 is a block diagram illustrating a configuration example of an image encoding device according to the present embodiment. The image encoding device 100 has an input terminal 101, a temporary encoding processing unit 110, a main encoding processing unit 120, and an output terminal 102. The temporary encoding processing unit 110 includes a complexity detection unit 111, a plurality of encoding units 112 to 114, and an encoding parameter determination unit 115. Further, the encoding processing unit 120 includes a delay unit 121, an encoding unit 122, a multiplexing unit 123, and a QP generation unit 124.

本実施形態における画像符号化装置100は、入力端子101から入力される画像データを符号化して符号化データを生成し、その符号化データを出力端子102よりストリームデータとして出力する。符号化対象の画像データは、予め設定されたブロック単位に入力端子101を介して入力されるものとする。また、符号化対象の画像データの信号フォーマットは、輝度成分Y、色差成分Cb、CrによるYCbCr4:2:2であり、各成分のビット深度は10ビットとする。また実施形態では、符号化対象のブロックは、水平方向32画素、垂直方向1画素の領域に対応する。そして、1ブロックに含まれる成分の内訳は、水平32×垂直1画素分の輝度値Y、水平16×垂直1画素分の色差成分値Cb、および、水平16×垂直1画素分の色差成分値Crの合計64個の画素成分値で構成されるものとする。   The image encoding device 100 according to the present embodiment encodes image data input from an input terminal 101 to generate encoded data, and outputs the encoded data from an output terminal 102 as stream data. It is assumed that the image data to be encoded is input via the input terminal 101 in units of blocks set in advance. The signal format of the image data to be encoded is a luminance component Y, a color difference component Cb, and YCbCr 4: 2: 2 using Cr, and the bit depth of each component is 10 bits. In the embodiment, the block to be encoded corresponds to an area of 32 pixels in the horizontal direction and 1 pixel in the vertical direction. The components included in one block are composed of a luminance value Y of horizontal 32 × vertical one pixel, a color difference component value Cb of horizontal 16 × vertical one pixel, and a color difference component value of horizontal 16 × vertical one pixel. It is assumed that it is composed of a total of 64 pixel component values of Cr.

なお、1つのブロック内の各成分は、ラスタースキャン順(画像の左から右方向に並んでいるものとする)に並んでいるものとする。また、実施形態において、画像データのビット数は10ビットに限定されるものではなく、8ビット、12ビットなどであってもよい。また、ブロックのサイズは水平32画素×垂直1画素に限られるものではなく任意のサイズでよい。例えば水平8画素×垂直8画素のように2次元構造であってもかまわない。   Note that the components in one block are arranged in a raster scan order (assume that the components are arranged from left to right in the image). In the embodiment, the number of bits of the image data is not limited to 10 bits, but may be 8 bits, 12 bits, or the like. Further, the size of the block is not limited to 32 horizontal pixels × 1 vertical pixel, but may be any size. For example, a two-dimensional structure such as 8 horizontal pixels × 8 vertical pixels may be used.

本実施形態では、1ブロック分の画像データを6/10の圧縮率で符号化されるものとして説明する。1ブロックには64個の成分値が含まれ、各成分値は10ビットとしているので、1ブロックのデータ量は、10×64=640ビットであるので、1ブロックの符号化データの符号量は384ビット(=640ビット×6/10)になる。符号化対象のブロックの画像データの各成分は、図4に示すようにラスタースキャン順であって、Cb0、Y0、Cr0、Y1、・・・の順で多重化されて入力端子101を介し、画像符号化装置100に入力されるものとする。   In the present embodiment, description will be made on the assumption that image data for one block is encoded at a compression ratio of 6/10. One block contains 64 component values, and each component value has 10 bits. Therefore, the data amount of one block is 10 × 64 = 640 bits, so that the code amount of the encoded data of one block is This is 384 bits (= 640 bits × 6/10). The components of the image data of the block to be encoded are multiplexed in the order of Cb0, Y0, Cr0, Y1,... In the raster scan order as shown in FIG. It is assumed that the image is input to the image encoding device 100.

仮符号化処理部110内の符号化部111〜114、および、本符号化処理部120内の符号化部122はともに同じ構成である。そこで、まず、図3を参照して、そのうちの1つを符号化部300として説明する。   Encoding sections 111 to 114 in provisional encoding processing section 110 and encoding section 122 in main encoding processing section 120 have the same configuration. Therefore, first, one of them will be described as an encoding unit 300 with reference to FIG.

符号化部300の外部からは、画像データ、量子化パラメータ(以降、QP)、符号化モードが入力されている。なお、ここで言う画像データは、図4に示す1ブロック内の各成分値であるが、便宜的に以下では各成分を、画素、画素データ、画素値としても説明する。   Image data, a quantization parameter (hereinafter, QP), and a coding mode are input from outside the coding unit 300. Note that the image data referred to here is each component value in one block shown in FIG. 4, but for convenience, each component will also be described as a pixel, pixel data, or pixel value.

減算器301は、入力された画素値から、後述の予測値生成部305で生成された予測値を減算して、予測差分データを算出する。予測差分データは、正負の符号を持つデータであり、画素値の変動が比較的小さい平坦な部分では0付近の値となり、また、変動の大きいエッジ部分などでは大きな差分値になる。予測差分データは一般に0を中心としたラプラス分布の特性を持つ。   The subtracter 301 subtracts a prediction value generated by a prediction value generation unit 305 described later from the input pixel value to calculate prediction difference data. The prediction difference data is data having a positive or negative sign. The prediction difference data has a value near 0 in a flat portion where the change in pixel value is relatively small, and has a large difference value in an edge portion where the change is large. The prediction difference data generally has a Laplace distribution characteristic centered on 0.

セレクタ307は2つの入力端子と1つの出力端子を有し、符号化モードに応じて、その2つの入力端子の一方に供給されたデータを選択し、出力端子より出力する。具体的には、セレクタ307は、DPCMモードの場合は減算器301からの予測差分データを選択し、PCMモードの場合は入力された画素データを選択する。そして、セレクタ307は、選択したデータ(予測差分データまたは画素データ)を量子化部302に出力する。なお、符号化モードについては後述する。   The selector 307 has two input terminals and one output terminal, selects data supplied to one of the two input terminals according to the encoding mode, and outputs the data from the output terminal. Specifically, the selector 307 selects the prediction difference data from the subtractor 301 in the case of the DPCM mode, and selects the input pixel data in the case of the PCM mode. Then, the selector 307 outputs the selected data (predicted difference data or pixel data) to the quantization unit 302. The encoding mode will be described later.

量子化部302は、セレクタ307から出力されたデータを、設定されたQPに応じた量子化ステップ値を用いて量子化する。量子化部302は、量子化後のデータ(以降、量子化データ)を、逆量子化部303、可変長符号化部306および符号化部300の外部に出力する。なお、量子化部302内には、外部から設定されるQPに対して実際に用いる量子化ステップ値(ただしゼロより大きい値)との関係を示すテーブルを保持しているものとする。QPが大きくなればなるほど量子化ステップ値も大きくなる関係にある。   The quantization unit 302 quantizes the data output from the selector 307 using a quantization step value according to the set QP. The quantization unit 302 outputs the quantized data (hereinafter, “quantized data”) to the outside of the inverse quantization unit 303, the variable length coding unit 306, and the coding unit 300. It is assumed that the quantization unit 302 holds a table indicating a relationship between a QP set from the outside and a quantization step value (a value larger than zero) actually used. There is a relationship that the larger the QP, the larger the quantization step value.

逆量子化部303は、量子化部302からの量子化データを、前記量子化部302と同じ量子化ステップ値を用いて逆量子する。   The inverse quantization unit 303 inversely quantizes the quantized data from the quantization unit 302 using the same quantization step value as the quantization unit 302.

加算器304は、逆量子化された予測差分データと、後述の予測値とを加算し、復号値を算出する。   The adder 304 adds the dequantized prediction difference data and a prediction value described later to calculate a decoded value.

予測値生成部305は、符号化対象の画素値に対する予測値を、復号値から生成する。予測値生成部305には色成分Y,Cb、Crそれぞれに少なくとも1画素分の復号値を保持するメモリ(保持手段)を有しており、符号化対象の成分値と同じ成分値の復号値を用いて予測値を生成する。例えば、符号化対象の成分値が輝度成分値の場合、その符号化対象の輝度成分値の左側(符号化済み)の最も近い輝度成分の復号値を、その予測値とする。なお、符号化ブロックの左端から3つの成分値については、それより左の復号値が存在しないので、所定の値を予測値として用いる。例えば信号レンジの中間値(ビット深度10ビットの場合は中央の“512”)等をその所定の値として用いる。   The predicted value generation unit 305 generates a predicted value for the pixel value to be encoded from the decoded value. The predicted value generation unit 305 has a memory (holding unit) for holding a decoded value of at least one pixel for each of the color components Y, Cb, and Cr, and decodes a decoded value of the same component value as the component value to be encoded. Is used to generate a predicted value. For example, if the component value to be encoded is a luminance component value, the decoded value of the closest luminance component on the left side (encoded) of the luminance component value to be encoded is set as the predicted value. Note that, for the three component values from the left end of the encoded block, there are no decoded values to the left, so a predetermined value is used as the predicted value. For example, an intermediate value of the signal range ("512" at the center when the bit depth is 10 bits) is used as the predetermined value.

可変長符号化部306は入力された量子化データに対して所定の可変長符号化方式による符号化を行って、画素毎に符号データと符号長(ビット数)を出力する。所定の可変長符号化方式とはハフマン符号、ゴロム符号などでよい。可変長符号化部306は、入力値が0の場合に最も短い符号長の符号データを出力し、入力値の絶対値が大きくなるほど、長い符号長の符号データを出力する。入力される予測差分データは前述のように0中心のラプラス分布特性であり、0付近の発生頻度が高く、予測差分データの絶対値が大きいほど発生頻度が低い。発生頻度の高い値に短い符号データを割り当て、発生頻度の低い値に長い符号データを割り当てる事により、符号化ブロック全体としては発生する符号長を小さくする事ができる所以である。   The variable length coding unit 306 performs coding on the input quantized data according to a predetermined variable length coding method, and outputs code data and a code length (number of bits) for each pixel. The predetermined variable length coding method may be a Huffman code, a Golomb code, or the like. When the input value is 0, the variable-length encoding unit 306 outputs code data with the shortest code length, and outputs code data with a longer code length as the absolute value of the input value increases. As described above, the input prediction difference data has the Laplace distribution characteristic centered on 0, and the occurrence frequency near 0 is high, and the occurrence frequency is low as the absolute value of the prediction difference data is large. By allocating short code data to a value with a high frequency of occurrence and allocating long code data to a value with a low frequency of occurrence, the code length generated in the entire coded block can be reduced.

次に符号化モードについて説明する。実施形態における符号化部300における符号化モードは、上記の通り、DPCMモードとPCMモードがある。DPCMモードは減算器301で予測差分データを生成し、量子化部302で量子化し、可変長符号化部306で可変長符号化を行うモードであり、画像データやQPによって可変長の符号が生成される符号化モードである。一方、PCMモードは、入力された画像データをそのまま量子化部302で量子化して量子化データとして出力するモードであり、QPによって固定長の符号が生成される符号化モードである。   Next, the encoding mode will be described. As described above, the encoding mode in the encoding unit 300 in the embodiment includes the DPCM mode and the PCM mode. The DPCM mode is a mode in which prediction difference data is generated by a subtractor 301, quantized by a quantization unit 302, and variable-length encoded by a variable-length encoding unit 306. A variable-length code is generated by image data and QP. Is the encoding mode to be used. On the other hand, the PCM mode is a mode in which the input image data is directly quantized by the quantization unit 302 and output as quantized data, and is a coding mode in which a fixed-length code is generated by QP.

以上、仮符号化処理部110内の符号化部111〜114、本符号化処理部120内の符号化部122の構成と動作について説明した。次に、仮符号化処理部110について詳しく説明する。   The configuration and operation of the encoding units 111 to 114 in the temporary encoding processing unit 110 and the encoding unit 122 in the main encoding processing unit 120 have been described above. Next, the temporary encoding processing unit 110 will be described in detail.

符号化部112〜114には、それぞれ異なるQP(0〜N)が設定されている。そして、符号化部112〜114は、それぞれに設定されたQPに従って仮符号化を行い、生成される符号化データの符号長を符号化パラメータ決定部115に出力する。符号化対象の着目ブロック内の画素データは、図4に示すようにCb0、Y0、Cr0、Y1・・・と1画素ずつ入力されるので、符号化部112〜114それぞれは、この順番に符号した際に得られる符号長を出力することになる。   Different QPs (0 to N) are set in the encoding units 112 to 114, respectively. Then, encoding sections 112 to 114 perform provisional encoding according to the QP set for each, and output the code length of the encoded data to be generated to encoding parameter determination section 115. The pixel data in the block of interest to be coded is input as Cb0, Y0, Cr0, Y1... One pixel at a time as shown in FIG. Then, the code length obtained in this case is output.

複雑度検出部111は、符号化対象の着目ブロックが示す画像の複雑度を、輝度成分と色差成分毎に算出し出力する。実施形態では、複雑度として分散を採用するものとする。したがって、輝度成分の複雑度は、輝度成分Yの画素値の分散となる。また、色差成分の複雑度は、成分値Cbの分散と成分値Crの分散の平均値(平均分散)とする。複雑度検出部111は、算出された輝度成分の複雑度、色差成分の複雑度を符号化パラメータ決定部115に出力する。なお、ここでは複雑度として分散を求めるものとしたが、ブロック内での画素値の変動の程度を示す指標値であれば特にその種類は問わない。例えば演算を単純化させるために、精度が多少は落ちるが、成分値の最大値と最小値との差分を複雑度としてもよい。   The complexity detector 111 calculates and outputs the complexity of the image indicated by the target block to be encoded for each of the luminance component and the color difference component. In the embodiment, variance is adopted as the complexity. Therefore, the complexity of the luminance component is the variance of the pixel values of the luminance component Y. The complexity of the color difference component is defined as an average value (average variance) of the variance of the component value Cb and the variance of the component value Cr. The complexity detection unit 111 outputs the calculated complexity of the luminance component and the complexity of the chrominance component to the encoding parameter determination unit 115. Here, the variance is calculated as the complexity, but the type is not particularly limited as long as it is an index value indicating the degree of variation of the pixel value in the block. For example, in order to simplify the calculation, although the accuracy is slightly lowered, the difference between the maximum value and the minimum value of the component values may be used as the complexity.

符号化部112〜114は前述の符号化部300であり、量子化データ、符号データ、符号長を出力するが、この仮符号化処理部110は、各符号化部112〜114から符号長のみを利用する。   The encoding units 112 to 114 are the encoding units 300 described above, and output the quantized data, the encoded data, and the code length. The temporary encoding processing unit 110 outputs only the code length from each of the encoding units 112 to 114. Use

符号化パラメータ決定部115は、符号化部112〜114からの符号長と、複雑度検出部111からの輝度成分の複雑度と色差成分の複雑度を用いて、着目ブロックに対する符号化モード、最適なQPを決定する。特に、符号化パラメータ決定部115は、符号化モードとしてDPCMモードを決定した場合には、さらに、後述する色差優遇モードについても決定する。以下、符号化パラメータ決定部115における処理内容について詳細に説明する。   The encoding parameter determination unit 115 uses the code lengths from the encoding units 112 to 114 and the complexity of the luminance component and the complexity of the chrominance components from the complexity detection unit 111 to determine the encoding mode for the block of interest. A good QP is determined. In particular, when the encoding parameter determination unit 115 determines the DPCM mode as the encoding mode, the encoding parameter determination unit 115 further determines a preferential color difference mode described later. Hereinafter, the processing content of the encoding parameter determination unit 115 will be described in detail.

実施形態における、符号化パラメータ決定部115の処理手順について、図5を用いて説明する。なお、符号化パラメータ決定部115は、符号化部112〜114に設定されているQPことを知っている(保持している)ものとする。   A processing procedure of the encoding parameter determination unit 115 in the embodiment will be described with reference to FIG. It is assumed that the encoding parameter determination unit 115 knows (holds) the QP set in the encoding units 112 to 114.

S501にて、符号化パラメータ決定部115は、着目ブロック内の各画素の符号長を、符号化部112〜114から取得する。   In S501, the coding parameter determination unit 115 acquires the code length of each pixel in the block of interest from the coding units 112 to 114.

次に、S502にて、符号化パラメータ決定部115は、取得した画素毎の符号長を累積して、着目ブロックの符号量を求める。ここで、符号化パラメータ決定部115は、量子化パラメータ毎(QP毎)に、輝度成分値(Y0、Y1,Y2…)の符号量(符号長の合計)、色差成分値(Cb0,Cr0、Cb1,Cr1…)の符号量の算出を行う。ここで、QP値:qpを要素とした場合、輝度成分の符号量をbl_size_y[qp]、色差成分の符号量をbl_size_c[qp]と定義する。符号化パラメータ決定部115内の不図示のメモリに、bl_size_y[qp]、色差成分の符号量をbl_size_c[qp]を保持する。実施形態では、符号化パラメータが0乃至Nであるので、符号化パラメータ決定部115が有する不図示のメモリには、
bl_size_y[0]、bl_size_c[0]、
bl_size_y[1]、bl_size_c[1]、

bl_size_y[N]、bl_size_c[N]
が格納されることになる。
Next, in S502, the coding parameter determination unit 115 accumulates the obtained code length of each pixel to obtain the code amount of the block of interest. Here, the encoding parameter determination unit 115 determines the code amount (total code length) of the luminance component values (Y0, Y1, Y2,...) And the color difference component values (Cb0, Cr0, Cb1, Cr1...) Are calculated. Here, when the QP value: qp is an element, the code amount of the luminance component is defined as bl_size_y [qp], and the code amount of the color difference component is defined as bl_size_c [qp]. In a memory (not shown) in the encoding parameter determination unit 115, bl_size_y [qp] and the code amount of the color difference component bl_size_c [qp] are stored. In the embodiment, since the coding parameters are 0 to N, the memory (not shown) of the coding parameter determination unit 115 includes:
bl_size_y [0], bl_size_c [0],
bl_size_y [1], bl_size_c [1],
:
bl_size_y [N], bl_size_c [N]
Will be stored.

次に、S503にて、符号化パラメータ決定部115は、複雑度検出部111から着目ブロックの輝度成分の複雑度と色差成分の複雑度を取得する。ここで輝度成分の複雑度をcmplx_y、色差成分の複雑度をcmplx_cと表現することとする。   Next, in S503, the encoding parameter determination unit 115 acquires the complexity of the luminance component and the complexity of the color difference component of the block of interest from the complexity detection unit 111. Here, the complexity of the luminance component is expressed as cmplx_y, and the complexity of the color difference component is expressed as cmplx_c.

S504にて、符号化パラメータ決定部115は、輝度成分の複雑度cmplx_y、色差成分の複雑度cmplx_cを用いて色差優遇モードの有効/無効を決定する。   In S504, the encoding parameter determination unit 115 determines the validity / invalidity of the preferential color difference mode using the complexity cmplx_y of the luminance component and the complexity cmplx_c of the color difference component.

色差優遇モードが無効の場合は、輝度成分と色差成分は同じQP値を用いて符号化され、輝度成分と色差成分の符号化誤差は同等となる。一方、色差優遇モードが有効の場合は輝度成分より色差成分に対して小さいQP値を割り当て符号化する。つまり、輝度成分については或る程度の符号化誤差を許容する代わり、色差成分の符号化誤差を低減させるのが、色差優遇モード=有効の場合である。   When the preferential color difference mode is invalid, the luminance component and the color difference component are encoded using the same QP value, and the encoding errors of the luminance component and the color difference component become equal. On the other hand, when the preferential color difference mode is valid, a smaller QP value is assigned to the color difference component than the luminance component and encoded. That is, instead of allowing a certain amount of coding error for the luminance component, the coding error of the chrominance component is reduced when the preferential color difference mode is valid.

以下は、符号化パラメータ決定部115による、色差優遇モードの有効(TRUE)・無効(FALSE)の決定にかかる処理の具体例である。   The following is a specific example of processing for determining whether the preferential color difference mode is valid (TRUE) or invalid (FALSE) by the encoding parameter determination unit 115.

符号化パラメータ決定部115は、輝度成分の複雑度cmplx_y、色差成分の複雑度cmplx_cと、所定の輝度成分の複雑度の閾値TH_CMPLX_Y、所定の色差成分の複雑度の閾値TH_CMPLX_Cを用いて、色差優遇モードcare_modeを以下の判定式により決定する。
if ((cmplx_y>TH_CMPLX_Y) & (cmplx_c<TH_CMPLX_C))
care_mode = 有効(TRUE)
else
care_mode = 無効(FALSE)
The encoding parameter determination unit 115 performs the color difference preferential treatment using the complexity cmplx_y of the luminance component, the complexity cmplx_c of the chrominance component, the threshold value TH_CMPRX_Y of the complexity of the predetermined luminance component, and the threshold value TH_CMPLX_C of the complexity of the predetermined color difference component. The mode care_mode is determined by the following determination formula.
if ((cmplx_y> TH_CMPLX_Y) & (cmplx_c <TH_CMPLX_C))
care_mode = enabled (TRUE)
else
care_mode = invalid (FALSE)

すなわち、輝度成分の複雑度cmplx_yが所定の輝度成分の複雑度の閾値TH_CMPLX_Yよりも大きく、かつ、色差成分の複雑度cmplx_cが所定の色差成分の複雑度の閾値TH_CMPLX_Cよりも小さい場合に、色差優遇モードを“有効”とし、それ以外の場合に、“無効”とする。   That is, when the complexity cmplx_y of the luminance component is larger than the threshold value TH_CMPRX_Y of the complexity of the predetermined luminance component, and the complexity cmplx_c of the chrominance component is smaller than the threshold value TH_CMPLX_C of the complexity of the predetermined chrominance component, the color difference preferential treatment is performed. The mode is set to “valid”, and otherwise, set to “invalid”.

S505にて、符号化パラメータ決定部115は、輝度成分の符号量bl_size_y[qp]と、色差成分の符号量bl_size_c[qp]と、所定の色差QPオフセット値OFFSET_QP_C、並びに、S504で決定された色差優遇モード(有効or無効)に従って、着目ブロックの符号化における最適QPを決定する。このS505の具体的な処理内容を図7のフローチャートに示す。   In S505, the coding parameter determination unit 115 determines the code amount bl_size_y [qp] of the luminance component, the code amount bl_size_c [qp] of the color difference component, the predetermined color difference QP offset value OFFSET_QP_C, and the color difference determined in S504. According to the preferential mode (valid or invalid), the optimal QP in coding the block of interest is determined. FIG. 7 is a flowchart showing the specific processing in step S505.

図6はS505の詳細な処理方法を示すフローチャートである。処理の概要としてはQP毎の輝度成分と色差成分の符号量から着目ブロックの符号量を算出し、その符号量が目標符号量以下となる最も小さいQPを選定する事である。   FIG. 6 is a flowchart showing the detailed processing method of S505. As an outline of the processing, the code amount of the block of interest is calculated from the code amounts of the luminance component and the color difference component for each QP, and the smallest QP whose code amount is equal to or less than the target code amount is selected.

S601にて、符号化パラメータ決定部115は、色差優遇モードcare_modeの有効(True)/無効(FALSE)を判定する。   In S601, the coding parameter determination unit 115 determines whether the preferential color difference mode care_mode is valid (True) or invalid (FALSE).

色差優遇モードcare_modeが無効の場合、符号化パラメータ決定部115は処理をS602に進め、有効の場合は処理をS603に進める。   If the preferential color difference mode care_mode is invalid, the coding parameter determination unit 115 proceeds with the process to step S602; otherwise, the process proceeds to step S603.

S602にて、符号化パラメータ決定部115は、変数offsetを値“0”に設定する。これは、色差優遇モードcare_modeが無効の場合、輝度成分に対するQPと色差成分に対するQPとを同じにする(オフセットを設けない)ためである。   In S602, encoding parameter determination section 115 sets variable offset to a value “0”. This is because when the color difference preferential mode care_mode is invalid, the QP for the luminance component and the QP for the color difference component are made the same (no offset is provided).

S603にて、符号化パラメータ決定部115は、予め設定された所定の色差QPオフセット値OFFSET_QP_Cを変数offsetにセットする。これは輝度成分に対して色差成分の符号化誤差を小さくするためである。   In S603, encoding parameter determination section 115 sets a predetermined color difference QP offset value OFFSET_QP_C set in advance to variable offset. This is to reduce the encoding error of the chrominance component with respect to the luminance component.

次に、S604に進み、符号化パラメータ決定部115は、本処理において符号量算出に用いる変数qpを“0”をセットすることで、初期化する。   Next, proceeding to S604, the encoding parameter determination unit 115 initializes the variable qp used for calculating the code amount by setting “0” in this process.

S605には、符号化パラメータ決定部115は、次に色差成分用のQPである“qpc”の算出を行う。色差成分用のQP値“qpc”は、qp値からoffsetを引いた数である。なお、負数にならないようMAX()関数を用いて“0”にクリップさせている。色差優遇モードが無効の場合はoffset=0となるのでqp=qpcとなる。色差優遇モードが有効の場合、qpcがoffset分、小さい値となる。qpcは以下のブロック全体の符号量の算出で用いられる。   In S605, the encoding parameter determination unit 115 next calculates “qpc” which is a QP for a color difference component. The QP value “qpc” for the color difference component is a number obtained by subtracting offset from the qp value. Note that the value is clipped to “0” using the MAX () function so as not to be a negative number. When the preferential color difference mode is invalid, offset = 0 and qp = qpc. When the color difference preferential mode is valid, qpc becomes a small value by the amount of offset. qpc is used in the following calculation of the code amount of the entire block.

S606にて、符号化パラメータ決定部115は着目ブロックの全体の符号量bl_size(qp)の算出を行う。   In S606, the encoding parameter determination unit 115 calculates the code amount bl_size (qp) of the entire block of interest.

着目ブロックの全体の符号量bl_size(qp)は、輝度成分の符号量bl_size_y[qp]、色差成分の符号量bl_size_c[qpc]と、符号化ブロック毎に必要なヘッダ情報の符号量bl_size_hを加算する事により算出される。ここで色差成分の符号量の引数が「qpc」となる点に注意されたい。   The code amount bl_size (qp) of the entire block of interest is obtained by adding the code amount bl_size_y [qp] of the luminance component, the code amount bl_size_c [qpc] of the color difference component, and the code amount bl_size_h of the header information necessary for each coding block. It is calculated by the thing. Here, it should be noted that the argument of the code amount of the color difference component is “qpc”.

ヘッダ情報は例えば、符号化モードを示す1ビット、色差優遇モードが有効/無効かを示す1ビット、QP値を表す4ビットの計6ビットである。なお、QP値を表すビット数は、4ビットに限らず何ビットでも良い(QPの最大値Nで決まる)。   The header information is, for example, 1 bit indicating the encoding mode, 1 bit indicating whether the preferential color difference mode is enabled / disabled, and 4 bits indicating the QP value, for a total of 6 bits. The number of bits representing the QP value is not limited to 4 bits, but may be any number of bits (determined by the maximum value N of QP).

次にS607にて、符号化パラメータ決定部115は、算出した着目ブロックの符号量bl_size(qp)が目標符号量TARGET_SIZE(実施形態では384ビット)以下であるという条件を満たすか否か判定する。この条件を満たす場合、すなわち、符号化ブロックの符号量bl_size(qp)が目標符号量TARGET_SIZE以下の場合、符号化パラメータ決定部115は処理をS608に移行する。   Next, in S607, the coding parameter determination unit 115 determines whether or not the condition that the calculated code amount bl_size (qp) of the target block is equal to or smaller than the target code amount TARGET_SIZE (384 bits in the embodiment). If this condition is satisfied, that is, if the code amount bl_size (qp) of the coding block is equal to or smaller than the target code amount TARGET_SIZE, the coding parameter determination unit 115 shifts the processing to S608.

S608にて、符号化パラメータ決定部115は、この段階のqp値が最適QPとして変数sel_qpにqp値をセットする。そして、S612にて、符号化パラメータ決定部115は、着目ブロックをDPCM符号化するため、符号化モードenc_modeをDPCMモードとして決定し、本処理を終了する。   In S608, encoding parameter determination section 115 sets the qp value in variable sel_qp as the qp value at this stage as the optimal QP. Then, in S612, the encoding parameter determination unit 115 determines the encoding mode enc_mode as the DPCM mode in order to perform the DPCM encoding on the block of interest, and ends this processing.

一方、符号量bl_size(qp)が目標符号量TARGET_SIZEを超える場合、符号化パラメータ決定部115は処理をS609に移行する。このS609にて、符号化パラメータ決定部115は、QPの許容最大値であるMAX_QPまで、qpをインクリメントしたか否かを判定する。MAX_QPまで到達していないと判定した場合、符号化パラメータ決定部115は処理をS610に進め、qpを“1”だけ増加させ、qp値を更新する。そして、符号化パラメータ決定部115は、処理をS605に戻す。   On the other hand, when the code amount bl_size (qp) exceeds the target code amount TARGET_SIZE, the coding parameter determination unit 115 shifts the processing to S609. In S609, coding parameter determination section 115 determines whether or not qp has been incremented up to MAX_QP, which is the allowable maximum value of QP. If it is determined that it has not reached MAX_QP, the coding parameter determination unit 115 advances the process to S610, increases qp by “1”, and updates the qp value. Then, the coding parameter determination unit 115 returns the processing to S605.

上記処理を繰り返し、符号量bl_size(qp)が目標符号量TARGET_SIZEを超えると判定されたまま、qp値が許容最大QP値であるMAX_QPに到達してまった場合、符号化パラメータ決定部115は、処理をS611に進める。このS611にて、符号化パラメータ決定部115は、着目ブロックをPCM符号化するため、符号化モードenc_modeをPCMモードに設定し、本処理を終了する。   If the qp value reaches MAX_QP which is the maximum allowable QP value while it is determined that the code amount bl_size (qp) exceeds the target code amount TARGET_SIZE, the coding parameter determination unit 115 repeats the above processing. The process proceeds to S611. In S611, the encoding parameter determination unit 115 sets the encoding mode enc_mode to the PCM mode in order to perform the PCM encoding on the block of interest, and ends this processing.

次に図7(a),(b)を参照して具体的な符号量の一例を示しながら、最適QPの選定について説明する。実施形態では、目標符号量TARGET_SIZEは384ビット、OFFSET_QP_Cは8、MAX_QPは15であるものとする。   Next, the selection of the optimal QP will be described with reference to FIGS. 7A and 7B, showing an example of a specific code amount. In the embodiment, it is assumed that the target code amount TARGET_SIZE is 384 bits, OFFSET_QP_C is 8, and MAX_QP is 15.

図7(a)は、着目ブロックに対して、offset=0にし、QP:0〜15で仮符号化した際の輝度、色差それぞれの符号量及び合計符号量との関係を示している。ちょうど、着目ブロックに対し、符号化部112〜113それぞれが符号化した際の輝度成分と色差成分の符号量を表していると考えると分かり易い。   FIG. 7A shows the relationship between the code amount of each of the luminance and chrominance and the total code amount when provisional encoding is performed with offset = 0 and QP: 0 to 15 for the block of interest. It is easy to understand if it is assumed that the coding unit 112-113 represents the coding amount of the luminance component and the chrominance component when the coding unit 112-113 codes the target block.

着目ブロックに対して色差優遇モードcsare_modeが“無効”と決定された場合、ヘッダ符号量、輝度成分符号量、色差成分符号量の合計が目標符号量の384以下となる最小のqpは、図7(a)から、合計が“379”ビットのqp=7の場合である。色差優遇モードが無効であるので、着目ブロック内の輝度、色差はともに同じqp値を用いて量子化されることになる点に注意されたい。   When the color difference preferential mode csare_mode is determined to be “invalid” for the block of interest, the minimum qp at which the sum of the header code amount, the luminance component code amount, and the color difference component code amount is 384 or less of the target code amount is as shown in FIG. (A) shows a case where the sum is qp = 7 of “379” bits. Note that since the preferential color difference mode is invalid, both the luminance and the color difference in the block of interest are quantized using the same qp value.

図7(b)は、色差優遇モードが“有効”の場合の、着目ブロックに対して、QP:0〜15で仮符号化した際の輝度、色差それぞれの符号量及び合計符号量との関係を示している。色差優遇モードが有効であるので、輝度成分の符号量に対し、色差成分の符号量はqp−8だけずれた位置の符号量が示されている点に注意されたい。qpが0〜8の範囲で、色差成分の符号量が“135”となっているのは、qp−8の値が“0”にクリップされているためである。   FIG. 7B shows the relationship between the code amount of each of the luminance and chrominance when the target block is provisionally coded at QP: 0 to 15 and the total code amount when the preferential color difference mode is “valid”. Is shown. It should be noted that since the preferential color difference mode is effective, the code amount of the chrominance component is shown at a position shifted by qp-8 from the code amount of the luminance component. The reason why the code amount of the color difference component is “135” in the range where qp is 0 to 8 is that the value of qp−8 is clipped to “0”.

さて、色差優遇モードが“有効”の場合、着目ブロックの符号量の合計が目標符号量の384以下となる最小のqpは、合計が378ビットのqp=10の場合となる。   When the color difference preferential mode is “valid”, the minimum qp in which the total code amount of the block of interest is 384 or less of the target code amount is a case in which qp = 10 with a total of 378 bits.

上記からわかるように、色差優遇モードが“無効”の場合は輝度成分、色差成分ともqp=7となるのに対して、色差優遇モードが“有効”の場合では輝度成分のqpは10、色差成分のqpは2となることを意味する。つまり、色差優遇モードが“無効”の場合と比較して、輝度成分のQPが“3”高くなった代わりに、色差成分のQPは“5”低くなり、色差成分の符号化誤差を低減させる事ができる。   As can be seen from the above, when the preferential color difference mode is “invalid”, both the luminance component and the chroma component are qp = 7, whereas when the preferential color difference mode is “valid”, the qp of the luminance component is 10, and the chroma It means that qp of the component is 2. That is, as compared with the case where the preferential color difference mode is “invalid”, the QP of the luminance component is increased by “3”, but the QP of the chrominance component is decreased by “5”, thereby reducing the encoding error of the chrominance component. Can do things.

一般的な自然画の場合、輝度成分の複雑度と色差成分の複雑度は同程度であって、輝度成分と色差成分は同じQP値を用いて符号化する事でそれぞれの符号化誤差は同等となり、主観的な画質評価においても輝度成分と色差成分は同等の画質となり好適と言える。しかし、輝度成分の複雑度が高く、色差成分の複雑度が低く、それが著しく差があるような場合、複雑度の高い輝度成分の画質劣化はあまり目立たないが、複雑度の低い色差成分の画質劣化が目立つというという現象が発生する。そこで、輝度成分の複雑度が高く、色差成分の複雑度が低い符号化ブロックは、色差優遇モードを有効にして符号化する事によって、色差成分の画質劣化を視覚的に目立たなくする効果がある。   In the case of a general natural image, the complexity of the luminance component and the complexity of the chrominance component are almost the same, and the encoding error of the luminance component and the chrominance component is equal by encoding using the same QP value. In the subjective image quality evaluation, the luminance component and the color difference component have the same image quality, which is preferable. However, when the complexity of the luminance component is high and the complexity of the chrominance component is low, and there is a remarkable difference, the image quality degradation of the high-complexity luminance component is not so conspicuous, but the The phenomenon that image quality degradation is conspicuous occurs. Therefore, a coding block having a high complexity of the luminance component and a low complexity of the chrominance component has an effect of making the image quality deterioration of the chrominance component visually inconspicuous by coding by enabling the preferential color difference mode. .

上記のようにして、符号化パラメータ決定部115は、着目ブロックに対し、符号化モード、色差優遇モード、最適QP値を決定する。以降、これら符号化モード、色差優遇モード、最適QP値を、符号化パラメータと呼ぶ。そして、符号化パラメータ決定部115は決定した符号化パラメータを本符号化処理部120に出力する。   As described above, the encoding parameter determination unit 115 determines the encoding mode, the preferential color difference mode, and the optimal QP value for the block of interest. Hereinafter, these encoding modes, preferential color difference modes, and optimal QP values are referred to as encoding parameters. Then, encoding parameter determination section 115 outputs the determined encoding parameter to main encoding processing section 120.

次に、実施形態における本符号化処理部120の処理内容について説明する。   Next, processing contents of the main encoding processing unit 120 in the embodiment will be described.

符号化対象の着目ブロックの画像データは遅延部121に入力される。この遅延部12は、上記の仮符号化処理部100内の符号化パラメータ決定部115が符号化パラメータを決定するに要する時間だけ遅延させるものであり、少なくとも1ブロック分の容量を持つバッファメモリで構成すればよい。   The image data of the target block to be encoded is input to the delay unit 121. The delay unit 12 delays the time required for the coding parameter determination unit 115 in the temporary coding processing unit 100 to determine the coding parameter, and is a buffer memory having a capacity of at least one block. What is necessary is just to comprise.

これにより、符号化部122は、仮符号化処理部100で決定した符号パラメータに従って、着目ブロックの符号化を行うことが可能になる。   Accordingly, the encoding unit 122 can encode the block of interest according to the code parameters determined by the temporary encoding processing unit 100.

符号化部122は、先に示した符号化部300の構造を有し、仮符号化処理部100で符号化パラメータを用いて、遅延部121で遅延して入力される着目ブロックの本符号化処理を実行する。この結果、符号化部122は、符号化パラメータ決定部115で算出したブロック符号量と同じ符号量の符号化データを生成し、多重化部123に出力することになる。   The coding unit 122 has the structure of the coding unit 300 described above, and uses the coding parameters in the temporary coding processing unit 100 to perform the main coding of the block of interest input delayed by the delay unit 121. Execute the process. As a result, the encoding unit 122 generates encoded data having the same code amount as the block code amount calculated by the encoding parameter determination unit 115, and outputs the encoded data to the multiplexing unit 123.

QP生成部124は、色差優遇モードが無効の場合、着目ブロック内の全画素(全成分)について、設定されたQPをそのまま符号化部122に供給する。   When the preferential color difference mode is invalid, the QP generation unit 124 supplies the set QP to the encoding unit 122 as it is for all pixels (all components) in the block of interest.

一方、色差優遇モードが有効の場合、QP生成部124は、色成分の種類に応じたQPを生成し、符号化部122に供給する。具体的には、QP生成部124は、輝度成分が符号化されるタイミングでは、設定されたQPを符号化部122に供給する。一方、色差成分が符号化されるタイミングでは、QP生成部124は、「QP−OFFSET_QP_C」(実施形態では「QP−8」)を符号化部122に供給する。ただし、「QP−OFFSET_QP_C」が負となる場合には、QP生成部124は“0”をQPとして符号化部122に供給する。   On the other hand, when the preferential color difference mode is valid, the QP generation unit 124 generates a QP corresponding to the type of the color component, and supplies the QP to the encoding unit 122. Specifically, the QP generation unit 124 supplies the set QP to the encoding unit 122 at the timing when the luminance component is encoded. On the other hand, at the timing when the color difference component is encoded, the QP generation unit 124 supplies “QP-OFFSET_QP_C” (“QP-8” in the embodiment) to the encoding unit 122. However, when “QP-OFFSET_QP_C” is negative, the QP generation unit 124 supplies “0” as a QP to the encoding unit 122.

多重化部123は、符号化部122からの符号データ、符号長、量子化データ、符号化パラメータ決定部115からの符号化パラメータを入力し、ブロック毎に所定のフォーマットで多重化を行い、出力する。具体的な出力フォーマットを図8(a)、(b)を参照して以下に説明する。   The multiplexing unit 123 receives the code data, the code length, the quantized data from the coding unit 122, and the coding parameters from the coding parameter determination unit 115, performs multiplexing in a predetermined format for each block, and outputs I do. A specific output format will be described below with reference to FIGS.

図8(a)は、符号化モードがDPCMモード時の1ブロック分の符号化データ構造を示している。ブロックの全体の符号化データ901(384ビット)は、ヘッダ部902(6ビット)と、ペイロードである画素データ部903(378ビット)から構成される。   FIG. 8A shows an encoded data structure for one block when the encoding mode is the DPCM mode. Encoded data 901 (384 bits) of the entire block includes a header section 902 (6 bits) and a pixel data section 903 (378 bits) as a payload.

ヘッダ部902は、符号化モード904(1ビット)、色差優遇モード905(1ビット)、最適QP値906(4ビット)で構成される。続いて画素データ部903には画素数分(64画素分)の可変長の符号化データが格納される。なお、符号化モード904は、DPCMモードであることを示す値(例えば“1”)を持つことになる。   The header section 902 includes an encoding mode 904 (1 bit), a preferential color difference mode 905 (1 bit), and an optimal QP value 906 (4 bits). Subsequently, the pixel data section 903 stores variable-length encoded data for the number of pixels (64 pixels). Note that the encoding mode 904 has a value (for example, “1”) indicating the DPCM mode.

なお、図8(a)のqp=7のように、輝度成分と色差成分の合計符号量“373”(=312+61)ビットであり、ペイロード部として確保された“378”ビットに満たない場合には、後端に不足分のダミービットを付加することで、固定長の目標符号量の符号化データとする。   When qp = 7 in FIG. 8A, the total code amount of the luminance component and the chrominance component is “373” (= 312 + 61) bits, and the code amount is less than “378” bits secured as the payload portion. Is added to the trailing end with insufficient dummy bits to obtain coded data having a fixed-length target code amount.

図8(b)は符号化モードがPCMモード時の符号化フォーマットのデータ構造を表す図である。PCMモードの場合、ブロックの全体の符号化データ911(384ビット)は、ヘッダ部912(1ビット)と、画素データ部913(383ビット)から構成される。ヘッダ部912には、PCMモードであること(非DPCMモードであること)を示す値(例えば“0”)が格納される。そして、後続する画素データ部913には画素数分(64画素分)のPCMデータが格納される。   FIG. 8B is a diagram illustrating a data structure of an encoding format when the encoding mode is the PCM mode. In the PCM mode, the encoded data 911 (384 bits) of the entire block is composed of a header section 912 (1 bit) and a pixel data section 913 (383 bits). The header section 912 stores a value (for example, “0”) indicating the PCM mode (the non-DPCM mode). The subsequent pixel data portion 913 stores PCM data for the number of pixels (64 pixels).

ここでPCMモード時の符号化方法について説明する。PCMモードは、上記説明からわかるように、DPCMモードでは目標符号量以下とならなかった場合(S609がNoと判定された場合)に用いられる符号化モードである。データ構造は図8(b)に示すようにヘッダ部にPCMモードを示す符号化モード1ビットと、画素データ部のPCMデータで構成されている。PCMデータは全画素を固定長に量子化されたデータが格納される。1つのブロックには64個の成分値が格納されているので、1成分当たり6ビットとすると、384(=6×64)ビット分必要になり、確保された383ビットより1ビット多くなってしまう。そこで、本実施形態では、輝度成分の最初の輝度成分Y0を5ビットに量子化し、他の31個の輝度成分値と、32個の色差成分値については6ビットに量子化する。こうすることで、ヘッダ部1ビットと画素データ部383ビットあわせて384ビットに符号化データとすることができる。なお、5ビットにする輝度成分の位置は、最初とするではなく、中央、最後尾など、どこでもあってもかまわない。要するに、復号装置と共通の認識であればよい。   Here, an encoding method in the PCM mode will be described. As can be seen from the above description, the PCM mode is an encoding mode used when the code amount does not become equal to or less than the target code amount in the DPCM mode (when S609 is determined to be No). The data structure includes, as shown in FIG. 8B, one bit of an encoding mode indicating the PCM mode in the header part and PCM data in the pixel data part. The PCM data stores data obtained by quantizing all pixels to a fixed length. Since 64 components are stored in one block, if each component has 6 bits, 384 (= 6 × 64) bits are required, which is one bit more than the reserved 383 bits. . Therefore, in the present embodiment, the first luminance component Y0 of the luminance component is quantized to 5 bits, and the other 31 luminance component values and 32 color difference component values are quantized to 6 bits. By doing so, the coded data can be 384 bits including the 1-bit header part and the 383 bits of the pixel data part. Note that the position of the luminance component to be made up of 5 bits does not have to be at the beginning, but may be anywhere, such as the center or the tail. In short, any recognition that is common to the decoding device may be used.

実施形態のQP生成部124について更に詳しく説明する。QP生成部124は、符号化モードがDPCMモードで、かつ色差優遇モードが無効の場合は、輝度成分、色差成分を問わず、符号化パラメータ115が決定した最適QPが適用されるようにQPを生成して出力する。そして、符号化モードがDPCMモードで、かつ色差優遇モードが有効の場合は、輝度成分のQPは符号化パラメータ115が決定した最適QPを生成し、色差成分については、符号化パラメータ115が決定した最適QPより所定のオフセット(OFFSET_QP_C)分小さいQPが適用されるようにQPを生成して出力する。ただし、QP生成部124、オフセットを減じた値が負になる場合には、“0”を生成し出力する。   The QP generation unit 124 according to the embodiment will be described in more detail. When the encoding mode is the DPCM mode and the color difference preferential mode is invalid, the QP generation unit 124 generates the QP so that the optimal QP determined by the encoding parameter 115 is applied regardless of the luminance component and the color difference component. Generate and output. When the encoding mode is the DPCM mode and the preferential color difference mode is valid, the QP of the luminance component generates an optimal QP determined by the encoding parameter 115, and the encoding parameter 115 determines the color difference component. A QP is generated and output such that a QP smaller by a predetermined offset (OFFSET_QP_C) than the optimal QP is applied. However, when the value obtained by subtracting the offset becomes negative, the QP generation unit 124 generates and outputs “0”.

そして、符号化モードがPCMモードの場合は、QP生成部124は、上記に述べたPCMモード時の量子化がなされるようにQPを生成して出力する。例えば、輝度成分の最初の画素だけ5ビットに量子化されるQPが適用され、その他の画素に対しては6ビットに量子化されるQPが適用されるようにQPを生成して出力する。そして、PCMモードの場合、符号化部122は、量子化後のデータをそのまま符号化データとして出力すればよいであろう。   When the encoding mode is the PCM mode, the QP generation unit 124 generates and outputs a QP so that the quantization in the PCM mode described above is performed. For example, a QP is generated and output such that a QP quantized to 5 bits is applied only to the first pixel of the luminance component, and a QP quantized to 6 bits is applied to other pixels. Then, in the case of the PCM mode, the encoding unit 122 may output the quantized data as encoded data as it is.

多重化部123は、上記のようにして生成されたヘッダ部と画素データ部とを多重化し、出力端子102を介して、不図示の画像メモリ、バスインターフェースに出力する。   The multiplexing section 123 multiplexes the header section and the pixel data section generated as described above, and outputs the multiplexed section to an image memory and a bus interface (not shown) via the output terminal 102.

次に、図2を参照して、実施形態における画像復号装置について説明する。同図は、画像復号装置のブロック構成図である。以下、本実施形態の画像復号化装置の構成例において各ブロックの動作について説明する。画像復号装置200は、入力端子201、分離部203、可変長復号部204、加算器205、セレクタ206、逆量子化部207、予測部208、QP生成部209、および、出力端子202で構成されている。   Next, an image decoding apparatus according to the embodiment will be described with reference to FIG. FIG. 1 is a block diagram of the image decoding apparatus. Hereinafter, the operation of each block in the configuration example of the image decoding device according to the present embodiment will be described. The image decoding device 200 includes an input terminal 201, a separation unit 203, a variable length decoding unit 204, an adder 205, a selector 206, an inverse quantization unit 207, a prediction unit 208, a QP generation unit 209, and an output terminal 202. ing.

不図示の画像メモリに格納された、画像符号化装置100で生成された符号化データは、バスインターフェースを介して読み出され、入力端子201に入力され、分離部203に供給される。   Encoded data generated by the image encoding device 100 and stored in an image memory (not shown) is read via a bus interface, input to an input terminal 201, and supplied to a separation unit 203.

分離部203は、入力したストリームデータを所定のフォーマットに従ってデコードして、符号化モード、色差優遇モード、QP値、符号データを分離し、処理サイクル毎に順次出力する。そして、先頭の1ビットがPCMモードを示す場合、分離部203は、画素データが量子化データであると判定し、セレクタ206に出力する。また、先頭の1ビットがDPCMモードを示している場合、分離部203は、符号化画素データは可変長データとして可変長復号化部204に出力する。   The separation unit 203 decodes the input stream data according to a predetermined format, separates the encoding mode, the preferential color difference mode, the QP value, and the code data, and sequentially outputs the data in each processing cycle. If the first bit indicates the PCM mode, the separating unit 203 determines that the pixel data is quantized data, and outputs the pixel data to the selector 206. When the first bit indicates the DPCM mode, the separation unit 203 outputs the encoded pixel data to the variable-length decoding unit 204 as variable-length data.

可変長復号化部204は入力されたDPCMデータの可変長復号を行って復号して得た予測差分データを加算器205に出力する。   The variable-length decoding unit 204 performs variable-length decoding on the input DPCM data and outputs prediction difference data obtained by decoding to the adder 205.

セレクタ206は符号化モードがPCMモードの場合は、分離部203からの量子化データを選択する。また、符号化モードがDPCMモードの場合は、セレクタ206は可変長復号部204からの予測差分データを選択し、逆量子化部2017へ出力する。   When the encoding mode is the PCM mode, the selector 206 selects the quantized data from the separation unit 203. When the encoding mode is the DPCM mode, the selector 206 selects the prediction difference data from the variable length decoding unit 204 and outputs the data to the inverse quantization unit 2017.

QP生成部209は、分離部203でデコードされた符号化モード、最適QP値に応じて、符号化ブロックの成分毎のQPを生成して逆量子化部207へ出力する。生成されるQP値は符号化装置100におけるQP生成部124と同じなので詳細な説明は省略する。   QP generating section 209 generates a QP for each component of the coded block according to the coding mode decoded by separating section 203 and the optimal QP value, and outputs the generated QP to inverse quantization section 207. The generated QP value is the same as that of the QP generation unit 124 in the encoding device 100, and thus a detailed description is omitted.

逆量子化部207はQP値を用いて、セレクタ206からの予測差分データを逆量子化して、加算器205とセレクタ209に出力する。   The inverse quantization unit 207 inversely quantizes the prediction difference data from the selector 206 using the QP value, and outputs the result to the adder 205 and the selector 209.

加算器205は、後述の予測部208からの予測値と予測差分データを加算して復号値として、予測生成部208とセレクタ209に出力する。   The adder 205 adds the prediction value from the prediction unit 208 described later and the prediction difference data, and outputs the result to the prediction generation unit 208 and the selector 209 as a decoded value.

予測値生成部208は復号値から予測値を生成する。予測値生成部208には色成分毎に少なくとも1個の復号値を保持する保持手段を有しており、符号化対象色成分と同じ色成分の復号値を用いて予測値が生成される。例えば、符号化対象が輝度成分Yである場合、同じ輝度成分であり、その左側(復号済み)で最も近い位置の復号値を予測値とする。なお、符号化ブロックの最初の画素は復号値が存在しないので、所定の値を予測値として用いる。例えば信号レンジの中間値(ビット深度10ビットの場合は512)等を用いる。   The predicted value generation unit 208 generates a predicted value from the decoded value. The predicted value generation unit 208 has a holding unit that stores at least one decoded value for each color component, and generates a predicted value using the decoded value of the same color component as the encoding target color component. For example, when the encoding target is the luminance component Y, the decoded value at the closest position on the left side (decoded) of the same luminance component is set as the predicted value. Note that the first pixel of the encoded block has no decoded value, so a predetermined value is used as a predicted value. For example, an intermediate value of the signal range (512 for a bit depth of 10 bits) is used.

セレクタ209は符号化モードがPCMモードの場合は、逆量子化207からの、PCM復号データを選択し、符号化モードがDPCMモードの場合は加算器205からのDPCM復号値を選択して出力する。出力された復号データは出力端子202を介し、外部へと出力される。   The selector 209 selects PCM decoded data from the inverse quantization 207 when the encoding mode is the PCM mode, and selects and outputs the DPCM decoded value from the adder 205 when the encoding mode is the DPCM mode. . The output decoded data is output to the outside via the output terminal 202.

以上説明したように本実施形態によれば、単純な符号化処理でありながら、輝度成分の複雑度が高く、色差成分の複雑度が低いような画像に対して画質劣化を抑制でき、かつ、目標符号量の符号化データを生成することが可能になる。   As described above, according to the present embodiment, image quality degradation can be suppressed for an image in which the complexity of the luminance component is high and the complexity of the color difference component is low, even though the encoding process is simple, and It becomes possible to generate encoded data of a target code amount.

なお、上記実施形態に相当する処理や制御を、コンピュータプログラムで実現させても構わない。この場合、図1に示す各種処理部は、プログラムを構成するプロシージャや関数で実現することになる。   The processing and control corresponding to the above embodiment may be realized by a computer program. In this case, the various processing units shown in FIG. 1 are realized by procedures and functions constituting a program.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Examples)
The present invention supplies a program for realizing one or more functions of the above-described embodiments to a system or an apparatus via a network or a storage medium, and one or more processors in a computer of the system or the apparatus read and execute the program. This processing can be realized. Further, it can be realized by a circuit (for example, an ASIC) that realizes one or more functions.

100…画像符号化装置、101…入力端子、102…出力端子、110…仮符号化処理部、111…複雑度検出部、112〜114…符号化部、115…符号化パラメータ決定部、120…本符号化処理部、121…遅延部、122…QP生成部、123…符号化部、123…多重化部 Reference numeral 100: image encoding device, 101: input terminal, 102: output terminal, 110: provisional encoding processing unit, 111: complexity detection unit, 112 to 114: encoding unit, 115: encoding parameter determination unit, 120 ... Main encoding processing unit, 121 delay unit, 122 QP generation unit, 123 encoding unit, 123 multiplexing unit

Claims (7)

輝度成分と色差成分で構成される画像データから、予め設定されたサイズのブロックを単位に入力し、当該ブロックを単位に符号化データを生成する画像符号化装置であって、
着目ブロック内の輝度成分、色差成分それぞれの複雑度を検出する検出手段と、
前記着目ブロック内の輝度成分、色差成分それぞれについて、互いに異なる複数の量子化パラメータを用いて仮のDPCM符号化し、量子化パラメータ毎の符号量を求める第1の符号化手段と、
前記検出手段による検出の結果、前記第1の符号化手段で求めた量子化パラメータ毎の符号量、並びに、予め設定された目標符号量に基づき、前記着目ブロックに対してDPCM符号化するか、PCM符号化するか、並びに、DPCM符号化する場合には輝度成分に対して色差成分の量子化パラメータを小さくするためのオフセットを判定する判定手段と、
該判定手段の判定の結果に基づき、前記着目ブロックから前記目標符号量の符号化データを生成する第2の符号化手段とを有し、
前記第2の符号化手段は、
該判定手段が、前記着目ブロックに対して前記PCM符号化すると判定した場合、当該着目ブロックの輝度成分及び色差成分のデータをPCM符号化を行って、前記目標符号量の符号化データを生成し、
該判定手段が、前記着目ブロックに対して前記DPCM符号化し、前記オフセットを無しにすると判定した場合には、当該着目ブロックの輝度成分及び色差成分を同じ量子化パラメータを用いて、DPCM符号化して、前記目標符号量の符号化データを生成し、
該判定手段が、前記着目ブロックに対して前記DPCM符号化し、前記オフセットを設定すると判定した場合には、当該着目ブロックの輝度成分、前記色差成分に対して前記オフセットに従った量子化パラメータを用いて、DPCM符号化し、前記目標符号量の符号化データを生成する
ことを特徴とする画像符号化装置。
An image encoding apparatus that inputs a block of a predetermined size in units from image data including a luminance component and a chrominance component, and generates encoded data in units of the block.
Detecting means for detecting the complexity of each of the luminance component and the color difference component in the block of interest;
First encoding means for provisionally DPCM-encoding each of the luminance component and the chrominance component in the block of interest using a plurality of mutually different quantization parameters, and calculating a code amount for each quantization parameter;
As a result of the detection by the detection unit, based on the code amount for each quantization parameter obtained by the first encoding unit and the target code amount set in advance, whether to perform DPCM encoding on the block of interest, A determination unit that determines whether to perform PCM encoding or, when performing DPCM encoding, an offset for reducing a quantization parameter of a chrominance component with respect to a luminance component;
A second encoding unit that generates encoded data of the target code amount from the block of interest based on a result of the determination by the determination unit,
The second encoding means includes:
When the determination means determines that the target block is to be subjected to the PCM encoding, the data of the luminance component and the chrominance component of the target block are subjected to the PCM encoding to generate encoded data of the target code amount. ,
When the determination unit determines that the block of interest is subjected to the DPCM encoding and the offset is eliminated, the luminance component and the color difference component of the block of interest are subjected to DPCM encoding using the same quantization parameter. Generating encoded data of the target code amount,
When the determination unit determines that the DPCM encoding is performed on the block of interest and the offset is set, a quantization parameter according to the offset is used for the luminance component and the color difference component of the block of interest. An image encoding apparatus that performs DPCM encoding to generate encoded data of the target code amount.
前記検出手段は、前記着目ブロック内の輝度成分、色差成分の分散を、それぞれの成分の複雑度として検出することを特徴とする請求項1に記載の画像符号化装置。   2. The image encoding apparatus according to claim 1, wherein the detection unit detects a variance of a luminance component and a chrominance component in the block of interest as complexity of each component. 前記判定手段は、
前記着目ブロック内の輝度成分の複雑度が予め設定された輝度成分の閾値より大きく、かつ、前記着目ブロック内の色差成分の複雑度が予め設定された色差成分の閾値より小さいという条件を満たすか否かを判定し、
前記条件を満たすと判定した場合に前記オフセットを設定すると判定し、
前記条件を満たさない場合に前記オフセットを無しにすると判定する
ことを特徴とする請求項1又は2に記載の画像符号化装置。
The determining means includes:
Whether the condition that the complexity of the luminance component in the block of interest is larger than a preset threshold of the luminance component and the complexity of the color difference component in the block of interest is smaller than the threshold of the preset color difference component Judge whether or not
When it is determined that the condition is satisfied, it is determined that the offset is to be set,
The image encoding device according to claim 1, wherein it is determined that the offset is absent when the condition is not satisfied.
1つのブロックの符号化データのヘッダ部のサイズをbl_size_hとし、
第i番目の量子化パラメータに従って前記着目ブロックの輝度成分をDPCM符号化した際の符号量をbl_size_y(i)、色差成分をDPCM符号化した際の符号量をbl_size_c(i)とし、
前記目標符号量をTARGET_SIZEとし、
量子化パラメータの許容最大値をNとし、
オフセットを設定すると判定された場合に予め設定された値を持ち、オフセットを無しと判定された場合の値“0”を持つ値をoffsetと定義したとき、
前記判定手段は、前記N以下であって、
TARGET_SIZE≧{bl_size_h+bl_size_y(j)+bl_size_c(j−offset)}
を満たす最小の整数jを求め、
前記着目ブロックの輝度成分に対する量子化パラメータをj、
前記着目ブロックの色差成分に対する量子化パラメータをj−offset
として判定することを特徴とする請求項1乃至3のいずれか1項に記載の画像符号化装置。
The size of the header part of the encoded data of one block is bl_size_h,
According to the i-th quantization parameter, the code amount when the luminance component of the block of interest is subjected to the DPCM coding is bl_size_y (i), and the code amount when the chrominance component is subjected to the DPCM coding is bl_size_c (i).
The target code amount is TARGET_SIZE,
Let N be the maximum allowable value of the quantization parameter,
When a value having a preset value when it is determined to set an offset and a value having a value “0” when it is determined to have no offset is defined as an offset,
The determination means is equal to or less than the N,
TARGET_SIZE ≧ {bl_size_h + bl_size_y (j) + bl_size_c (j-offset)}
Find the smallest integer j that satisfies
The quantization parameter for the luminance component of the block of interest is j,
The quantization parameter for the chrominance component of the block of interest is j-offset
The image encoding apparatus according to any one of claims 1 to 3, wherein the determination is made as:
前記判定手段は、前記N以下であって、
TARGET_SIZE≧{bl_size_h+bl_size_y(j)+bl_size_c(j−offset)}
を満たす最小の整数jを求めることができなかった場合、前記着目ブロックに対してPCM符号化を行うと判定する
ことを特徴とする請求項4に記載の画像符号化装置。
The determination means is equal to or less than the N,
TARGET_SIZE ≧ {bl_size_h + bl_size_y (j) + bl_size_c (j-offset)}
The image encoding device according to claim 4, wherein if the minimum integer j that satisfies is not determined, it is determined that PCM encoding is to be performed on the block of interest.
輝度成分と色差成分で構成される画像データから、予め設定されたサイズのブロックを単位に入力し、当該ブロックを単位に符号化データを生成する画像符号化装置の制御方法であって、
着目ブロック内の輝度成分、色差成分それぞれの複雑度を検出する検出工程と、
前記着目ブロック内の輝度成分、色差成分それぞれについて、互いに異なる複数の量子化パラメータを用いて仮のDPCM符号化し、量子化パラメータ毎の符号量を求める第1の符号化工程と、
前記検出工程による検出の結果、前記第1の符号化工程で求めた量子化パラメータ毎の符号量、並びに、予め設定された目標符号量に基づき、前記着目ブロックに対してDPCM符号化するか、PCM符号化するか、並びに、DPCM符号化する場合には輝度成分に対して色差成分の量子化パラメータを小さくするためのオフセットを判定する判定工程と、
該判定工程の判定の結果に基づき、前記着目ブロックから前記目標符号量の符号化データを生成する第2の符号化工程とを有し、
前記第2の符号化工程では、
該判定工程が、前記着目ブロックに対して前記PCM符号化すると判定した場合、当該着目ブロックの輝度成分及び色差成分のデータをPCM符号化を行って、前記目標符号量の符号化データを生成し、
該判定工程が、前記着目ブロックに対して前記DPCM符号化し、前記オフセットを無しにすると判定した場合には、当該着目ブロックの輝度成分及び色差成分を同じ量子化パラメータを用いて、DPCM符号化して、前記目標符号量の符号化データを生成し、
該判定工程が、前記着目ブロックに対して前記DPCM符号化し、前記オフセットを設定すると判定した場合には、当該着目ブロックの輝度成分、前記色差成分に対して前記オフセットに従った量子化パラメータを用いて、DPCM符号化し、前記目標符号量の符号化データを生成する
ことを特徴とする画像符号化装置の制御方法。
A control method of an image coding apparatus that inputs a block of a predetermined size as a unit from image data composed of a luminance component and a chrominance component and generates encoded data in a unit of the block,
A detection step of detecting the complexity of each of the luminance component and the chrominance component in the block of interest;
A first encoding step of tentatively DPCM-encoding each of the luminance component and the chrominance component in the block of interest using a plurality of mutually different quantization parameters, and obtaining a code amount for each quantization parameter;
As a result of the detection by the detection step, based on the code amount for each quantization parameter obtained in the first encoding step, and the target code amount set in advance, whether the block of interest is DPCM-encoded, A determination step of determining an offset for reducing a quantization parameter of a chrominance component with respect to a luminance component in the case of performing PCM encoding and, in the case of performing DPCM encoding,
A second encoding step of generating encoded data of the target code amount from the block of interest based on a result of the determination in the determination step,
In the second encoding step,
When the determination step determines that the PCM encoding is performed on the block of interest, the data of the luminance component and the color difference component of the block of interest is subjected to PCM encoding to generate encoded data of the target code amount. ,
When the determination step determines that the block of interest is subjected to the DPCM encoding and the offset is eliminated, the luminance component and the color difference component of the block of interest are subjected to DPCM encoding using the same quantization parameter. Generating encoded data of the target code amount,
When the determination step determines that the block of interest is subjected to the DPCM encoding and the offset is set, a quantization parameter according to the offset is used for the luminance component and the color difference component of the block of interest. A DPCM encoding method to generate encoded data of the target code amount.
コンピュータが読み込み実行することで、前記コンピュータに、請求項1乃至5のいずれか1項に記載の装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the device according to claim 1 when read and executed by the computer.
JP2018151964A 2018-08-10 2018-08-10 Image encoding device and its control method and program Active JP7121584B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018151964A JP7121584B2 (en) 2018-08-10 2018-08-10 Image encoding device and its control method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018151964A JP7121584B2 (en) 2018-08-10 2018-08-10 Image encoding device and its control method and program

Publications (2)

Publication Number Publication Date
JP2020028022A true JP2020028022A (en) 2020-02-20
JP7121584B2 JP7121584B2 (en) 2022-08-18

Family

ID=69622240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018151964A Active JP7121584B2 (en) 2018-08-10 2018-08-10 Image encoding device and its control method and program

Country Status (1)

Country Link
JP (1) JP7121584B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7514325B2 (en) 2021-05-25 2024-07-10 テンセント・アメリカ・エルエルシー METHOD, APPARATUS, NON-TRANSITORY COMPUTER-READABLE STORAGE MEDIUM AND COMPUTER PROGRAM FOR VIDEO CODING - Patent application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070092001A1 (en) * 2005-10-21 2007-04-26 Hiroshi Arakawa Moving picture coding apparatus, method and computer program
US20110292247A1 (en) * 2010-05-27 2011-12-01 Sony Corporation Image compression method with random access capability
JP2011259362A (en) * 2010-06-11 2011-12-22 Sony Corp Image processing system and method of the same
US20160323578A1 (en) * 2015-04-28 2016-11-03 Canon Kabushiki Kaisha Image processing apparatus and image processing method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070092001A1 (en) * 2005-10-21 2007-04-26 Hiroshi Arakawa Moving picture coding apparatus, method and computer program
JP2007116558A (en) * 2005-10-21 2007-05-10 Matsushita Electric Ind Co Ltd Moving image encoding apparatus
US20110292247A1 (en) * 2010-05-27 2011-12-01 Sony Corporation Image compression method with random access capability
JP2013530610A (en) * 2010-05-27 2013-07-25 ソニー株式会社 Image compression method using random access function
JP2011259362A (en) * 2010-06-11 2011-12-22 Sony Corp Image processing system and method of the same
US20130077676A1 (en) * 2010-06-11 2013-03-28 Kazushi Sato Image processing device and method
US20160323578A1 (en) * 2015-04-28 2016-11-03 Canon Kabushiki Kaisha Image processing apparatus and image processing method
JP2016213528A (en) * 2015-04-28 2016-12-15 キヤノン株式会社 Image encoder, image processing apparatus, image coding method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DAVID FLYNN, ET AL.: "RExt: CU-adaptive chroma QP offsets", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT -VC) OF ITU-T SG16 WP3 AND ISO/IEC JTC1/SC29/WG11 15TH, vol. JCTVC-O0044, JPN6022027984, 31 October 2013 (2013-10-31), pages 1 - 4, ISSN: 0004821346 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7514325B2 (en) 2021-05-25 2024-07-10 テンセント・アメリカ・エルエルシー METHOD, APPARATUS, NON-TRANSITORY COMPUTER-READABLE STORAGE MEDIUM AND COMPUTER PROGRAM FOR VIDEO CODING - Patent application

Also Published As

Publication number Publication date
JP7121584B2 (en) 2022-08-18

Similar Documents

Publication Publication Date Title
US11166042B2 (en) Encoding/decoding with flags to indicate switching of color spaces, color sampling rates and/or bit depths
JP6626295B2 (en) Image encoding device, image processing device, image encoding method
US9749632B2 (en) Method for determining color difference component quantization parameter and device using the method
JP6512928B2 (en) Image coding apparatus, image processing apparatus, image coding method
US8204105B2 (en) Transcoder and coded image conversion method
US7443320B2 (en) Decoding method and encoding method
JP3888597B2 (en) Motion compensation coding apparatus and motion compensation coding / decoding method
TW201804797A (en) Methods and apparatuses of video data processing and associated non-transitory computer readable medium
US9942550B2 (en) Image encoding device, image encoding method and program, image decoding device, and image decoding method and program
US9131249B2 (en) Apparatus for encoding moving images to minimize an amount of generated code
US8879628B2 (en) Floating point video coding
JP7362847B2 (en) Quantization parameter signaling
KR20190016502A (en) Substream multiplexing for display stream compression
KR20180122354A (en) Apparatus and methods for adaptive computation of quantization parameters in display stream compression
JP6502739B2 (en) Image coding apparatus, image processing apparatus, image coding method
JP6502753B2 (en) Image coding apparatus, image processing apparatus, image coding method
JP7121584B2 (en) Image encoding device and its control method and program
JP2023553996A (en) Derivation of offset in inter-component transform coefficient level restoration
JP2024515888A (en) Method, device and storage medium for multiple symbol arithmetic coding - Patents.com
JP6985924B2 (en) Image coding device, image processing device, image coding method
KR102020953B1 (en) Image Reencoding Method based on Decoding Data of Image of Camera and System thereof
JP6749725B2 (en) Image coding apparatus, image processing apparatus, and image coding method
JP7444541B2 (en) Image encoding device, image decoding device, imaging device, image encoding method, image decoding method, and program
JP3948442B2 (en) Motion compensation decoding apparatus
JP2020028021A (en) Image encoding apparatus, control method of the same, and program

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220616

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220805

R151 Written notification of patent or utility model registration

Ref document number: 7121584

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151