JP2022043080A - Image encoding device, image encoding method, and program - Google Patents

Image encoding device, image encoding method, and program Download PDF

Info

Publication number
JP2022043080A
JP2022043080A JP2021194694A JP2021194694A JP2022043080A JP 2022043080 A JP2022043080 A JP 2022043080A JP 2021194694 A JP2021194694 A JP 2021194694A JP 2021194694 A JP2021194694 A JP 2021194694A JP 2022043080 A JP2022043080 A JP 2022043080A
Authority
JP
Japan
Prior art keywords
quantization parameter
quantization
data
subband
common
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
JP2021194694A
Other languages
Japanese (ja)
Other versions
JP7321237B2 (en
Inventor
成記 望月
Shigeki Mochizuki
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
Priority claimed from JP2017119887A external-priority patent/JP6986868B2/en
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2021194694A priority Critical patent/JP7321237B2/en
Publication of JP2022043080A publication Critical patent/JP2022043080A/en
Application granted granted Critical
Publication of JP7321237B2 publication Critical patent/JP7321237B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To make it possible to record RAW data compactly by suppressing a data amount of quantization parameters to be included in encoded data while implementing irreversible compression through flexible quantization control in compression of the RAW data.
SOLUTION: An image encoding device includes: generation means for generating multiple pieces of sub-band data from RAW data; quantization parameter generation means which generates a first quantization parameter and generates a second quantization parameter from the first quantization parameter; quantization means which uses the second quantization parameter to quantize the multiple pieces of sub-band data for each segment; and encoding means for encoding a quantization result that is obtained by the quantization, with sub-band data defined as a unit and encoding the first quantization parameter, thereby generating encoded data.
SELECTED DRAWING: Figure 1
COPYRIGHT: (C)2022,JPO&INPIT

Description

本発明は、画像符号化装置、画像符号化方法、プログラムに関する。 The present invention relates to an image coding apparatus, an image coding method, and a program.

昨今のデジタルカメラの撮像素子にはCCD又はCMOSイメージセンサが多く採用されており、単板式の撮像素子ではいわゆるベイヤー配列のカラーフィルタを通すことにより緑、青、赤の画素データ(以下、RAWデータと呼ぶ)が得られる。デジタルカメラでは、RAWデータに対し、デモザイク処理、ノイズ除去処理、光学歪み補正、色補正処理等を含む現像処理を行い最終的な画像データを生成し、静止画の場合はJPEG、動画の場合はH.264等の符号化方式により圧縮画像データを記録することができる。一方でユーザ自身の好みに応じて現像処理が実行できるように現像処理前のRAWデータを記録する機能も搭載されている。 CCD or CMOS image sensors are often used in the image sensors of digital cameras these days, and in single-panel image sensors, green, blue, and red pixel data (hereinafter referred to as RAW data) are obtained by passing through a so-called Bayer-arranged color filter. Called) is obtained. In a digital camera, RAW data is subjected to development processing including demosaic processing, noise removal processing, optical distortion correction, color correction processing, etc. to generate final image data. JPEG for still images and JPEG for moving images. H. Compressed image data can be recorded by a coding method such as 264. On the other hand, it is also equipped with a function to record RAW data before the development process so that the development process can be executed according to the user's own preference.

RAWデータの記録形式には、非圧縮又は可逆圧縮形式を採用する場合が多く、一般に記録されるRAWデータのサイズは、現像後の圧縮画像データよりも大きくなる。その一方、撮像素子の高密度化、高画素化に伴い、RAWデータをコンパクトに記録することが重要となってきている。そこで、視覚的に無損失な非可逆圧縮形式として、RAWデータから複数のカラーチャネルを生成し、各チャネルに対して2次元離散ウェーブレット変換を行い、生成された各サブバンドを個別に量子化して圧縮して符号化データとして記録する方法等が提案されている(特許文献1を参照)。 In many cases, an uncompressed or lossless compressed format is adopted as the recording format of the RAW data, and the size of the RAW data generally recorded is larger than that of the compressed image data after development. On the other hand, as the density and the number of pixels of the image sensor increase, it is becoming important to record RAW data compactly. Therefore, as a visually lossless lossy compression format, multiple color channels are generated from the RAW data, two-dimensional discrete wavelet transform is performed for each channel, and each generated subband is individually quantized. A method of compressing and recording as encoded data has been proposed (see Patent Document 1).

特表2002-516540号公報Special Table 2002-516540

しかしながら、RAWデータから4つのカラーチャネルを生成し、2次元離散ウェーブレット変換により3階層のオクターブ分割を行った場合、チャネル毎に10サブバンドに分割されるため、4チャネル×10のサブバンドが生成されることになる。これらのサブバンドを個別に量子化する場合4×10=40個の量子化パラメータを必要とする。更に画面内の特徴に応じて所定ブロック単位のより細かい量子化制御を行うこと想定した場合、4×10×ブロック分割数分の量子化パラメータが必要となる。これらの量子化パラメータが全て符号化データに含まれるので、RAWデータの圧縮に伴う量子化パラメータのデータ量が肥大化する。この場合、視覚的に無損失な画質を維持しつつコンパクトにRAWデータを記録することが困難となる。 However, when 4 color channels are generated from RAW data and 3 layers of octave division are performed by 2D discrete wavelet transform, each channel is divided into 10 subbands, so 4 channels × 10 subbands are generated. Will be done. Quantizing these subbands individually requires 4 × 10 = 40 quantization parameters. Further, assuming that finer quantization control in a predetermined block unit is performed according to the features in the screen, the quantization parameters for 4 × 10 × the number of block divisions are required. Since all of these quantization parameters are included in the coded data, the amount of data of the quantization parameters accompanying the compression of the RAW data becomes bloated. In this case, it becomes difficult to compactly record RAW data while maintaining visually lossless image quality.

そこで本発明は、RAWデータの圧縮において柔軟な量子化制御により非可逆圧縮を実現しつつ、符号化データに含める量子化パラメータのデータ量を抑制することで、コンパクトにRAWデータを記録することを可能にする技術を提供する。 Therefore, the present invention realizes lossy compression by flexible quantization control in the compression of RAW data, and suppresses the amount of data of the quantization parameter included in the coded data to compactly record the RAW data. Providing the technology that makes it possible.

上記の目的を達成するため、本発明による画像符号化装置は、
2以上の分解レベルの離散ウェーブレット変換を行い、RAWデータから複数のサブバンドデータを生成する生成手段と、
前記複数のサブバンドデータをそれぞれ同じ数の量子化単位に分割し、前記量子化単位ごとに個別に設定され、同一の量子化単位に含まれる複数のサブバンドデータに共通に割り当てられる共通量子化パラメータを生成し、前記共通量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための量子化パラメータを生成する量子化パラメータ生成手段と、
前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化する量子化手段と、
前記量子化により得られた量子化結果をサブバンド毎に符号化する符号化手段とを備える。
In order to achieve the above object, the image coding apparatus according to the present invention is
A generation means that performs discrete wavelet transform of two or more decomposition levels and generates multiple subband data from RAW data.
Common quantization in which the plurality of subband data is divided into the same number of quantization units, individually set for each quantization unit, and commonly assigned to a plurality of subband data included in the same quantization unit. A quantization parameter generation means for generating a parameter and generating a quantization parameter for quantizing each of the plurality of subband data based on the common quantization parameter.
A quantization means for quantizing each of the plurality of subband data based on the quantization parameters for quantizing the plurality of subband data, respectively.
It is provided with a coding means for coding the quantization result obtained by the quantization for each subband.

本発明によれば、RAWデータの圧縮における柔軟な量子化制御により非可逆圧縮を実現しつつ、符号化データに含める量子化パラメータのデータ量を抑制することでコンパクトにRAWデータを記録することが可能になる。 According to the present invention, it is possible to record RAW data compactly by suppressing the amount of quantization parameter data included in the coded data while realizing lossy compression by flexible quantization control in compression of RAW data. It will be possible.

発明の実施形態に対応する画像処理装置の構成例を示すブロック図、及び、ベイヤー配列のRAWデータを示す図。The block diagram which shows the structural example of the image processing apparatus corresponding to the embodiment of an invention, and the figure which shows the RAW data of the Bayer array. 発明の実施形態に対応するRAWデータ符号化・復号部103の構成例を示すブロック図。The block diagram which shows the structural example of the RAW data coding / decoding unit 103 corresponding to the embodiment of an invention. 発明の実施形態に対応するチャネル変換の例を示す図。The figure which shows the example of the channel conversion corresponding to the embodiment of an invention. 発明の実施形態に対応する周波数変換(サブバンド分割)、及び、予測符号化方法(MED予測)を説明するための図。The figure for demonstrating the frequency conversion (subband division) corresponding to the embodiment of an invention, and the predictive coding method (MED prediction). 発明の実施形態に対応する、量子化制御単位の一例を示す図。The figure which shows an example of the quantization control unit corresponding to the embodiment of an invention. 発明の実施形態に対応する、画質特性に基づく量子化制御単位の一例を示す図。The figure which shows an example of the quantization control unit based on the image quality characteristic corresponding to the embodiment of an invention. 発明の実施形態に対応する、画質特性に基づく量子化制御の処理の一例に対応するフローチャート。The flowchart corresponding to an example of the quantization control processing based on the image quality characteristic corresponding to the embodiment of the invention. 発明の実施形態に対応する、画質制御に関わる量子化制御単位とRAWデータの関係を示す図。The figure which shows the relationship between the quantization control unit and RAW data which are related to the image quality control corresponding to the embodiment of an invention. 発明の実施形態に対応する、符号化データのデータ構造の一例を示す図。The figure which shows an example of the data structure of the coded data corresponding to the embodiment of an invention. 発明の実施形態に対応する、ヘッダ情報のシンタクス要素の一例を示す図。The figure which shows an example of the syntax element of the header information corresponding to the embodiment of an invention. 発明の実施形態に対応する、共通量子化パラメータの2次元座標系へのマッピング例を示す図。The figure which shows the mapping example to the 2D coordinate system of the common quantization parameter corresponding to the embodiment of an invention. 発明の第2の実施形態に対応する、画質特性に基づく量子化制御単位の一例を示す図。The figure which shows an example of the quantization control unit based on the image quality characteristic corresponding to the 2nd Embodiment of an invention. 発明の実施形態2に対応する、符号化データに含まれるデータ量の従来手法との比較を示す図。The figure which shows the comparison with the conventional method of the amount of data contained in the coded data corresponding to Embodiment 2 of the invention.

以下、図面を参照しながら本発明の好適な実施の形態を説明する。 Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

[実施形態1]
以下、発明の実施形態を説明する。図1(a)は、発明の実施形態に対応する撮像装置100を示す。撮像装置100は、例えばデジタルカメラ、デジタルビデオカメラとして実現することができる。また、それ以外に、例えばパーソナルコンピュータ、携帯電話、スマートフォン、PDA、タブレット端末、携帯型メディアプレーヤなどの任意の情報処理端末或いは画像処理装置として実現することもできる。なお、図1(a)は、撮像装置であるデジタルカメラ等として機能する場合を考慮して撮像部102を含む構成を示した。しかし、発明の実施形態として、RAW画像を圧縮し、記録、再生することが可能な画像符号化装置・画像復号装置、画像記録装置、画像圧縮装置、画像復元装置等として、撮像部102を有しない構成で実現してもよい。
[Embodiment 1]
Hereinafter, embodiments of the invention will be described. FIG. 1A shows an image pickup apparatus 100 corresponding to an embodiment of the invention. The image pickup apparatus 100 can be realized as, for example, a digital camera or a digital video camera. In addition, it can also be realized as an arbitrary information processing terminal or image processing device such as a personal computer, a mobile phone, a smartphone, a PDA, a tablet terminal, and a portable media player. Note that FIG. 1A shows a configuration including an image pickup unit 102 in consideration of a case where it functions as a digital camera or the like as an image pickup device. However, as an embodiment of the invention, the image pickup unit 102 is provided as an image coding device / image decoding device, an image recording device, an image compression device, an image restoration device, etc. capable of compressing, recording, and reproducing a RAW image. It may be realized with a configuration that does not.

撮像装置100において、制御部101は、撮像装置100を構成する各処理部を制御する。撮像部102は、光学レンズ、絞り、フォーカス制御及びレンズ駆動部を含む光学ズームが可能なレンズ光学系とレンズ光学系からの光情報を電気信号に変換するCCDイメージセンサ又は、CMOSイメージセンサなどの撮像素子を含む。撮像部102は、撮像素子により得られた電気信号をディジタル信号へ変換したRAWデータは、RAWデータ符号化・復号部103へ出力する。 In the image pickup apparatus 100, the control unit 101 controls each processing unit constituting the image pickup apparatus 100. The image pickup unit 102 is a lens optical system capable of optical zoom including an optical lens, an aperture, a focus control, and a lens drive unit, and a CCD image sensor or a CMOS image sensor that converts optical information from the lens optical system into an electric signal. Includes an image pickup element. The image pickup unit 102 outputs the RAW data obtained by converting the electric signal obtained by the image pickup element into a digital signal to the RAW data coding / decoding unit 103.

ここでRAWデータは、図1(b)に示すように受光した画素領域である有効撮像領域と遮光された画素領域であるオプティカルブラック領域とで構成される。各画素はR(赤)、G1(緑)、G2(緑)、B(青)の周期的なパターンで構成されており、人間の視覚的な感度は色成分よりも輝度成分に敏感なことから輝度成分を多く含む緑が赤や青に対して2倍の面積が割り当てられている。本実施形態ではRAWデータは、ベイヤー配列の4色要素で構成されるものとするが、その配列や色要素はこの構成に限定されず他の方式であっても良い。 Here, the RAW data is composed of an effective imaging region, which is a light-receiving pixel region, and an optical black region, which is a light-shielded pixel region, as shown in FIG. 1 (b). Each pixel is composed of a periodic pattern of R (red), G1 (green), G2 (green), and B (blue), and human visual sensitivity is more sensitive to the luminance component than the color component. The area of green, which contains a lot of luminance components, is twice as large as that of red and blue. In the present embodiment, the RAW data is composed of four color elements of the Bayer arrangement, but the arrangement and the color elements are not limited to this configuration and may be another method.

RAWデータ符号化・復号部103は、撮像部102が取得したRAWデータを符号化し、生成した符号化データをメモリ105へ書き込みを行う。また、符号化されていないRAWデータを記録媒体107から取得して、本実施形態に対応する符号化処理を実行して符号化データを生成してもよい。また、RAWデータ符号化・復号部103は、符号化データを復号してRAWデータを復元することができる。RAWデータ符号化・復号部103に関わる詳細な構成や動作については後述する。 The RAW data coding / decoding unit 103 encodes the RAW data acquired by the imaging unit 102 and writes the generated encoded data to the memory 105. Further, the unencoded RAW data may be acquired from the recording medium 107 and the coding process corresponding to the present embodiment may be executed to generate the encoded data. Further, the RAW data coding / decoding unit 103 can decode the coded data and restore the RAW data. The detailed configuration and operation related to the RAW data coding / decoding unit 103 will be described later.

メモリI/F部104は、各処理部からのメモリ・アクセス要求を調停し、メモリ105に対する読み出し、又は書き込み制御を行う。メモリ105は、撮像装置100を構成する各処理部から出力される各種データを格納するための例えば揮発性メモリで構成される記憶領域である。記録処理部106は、メモリ105へ格納された符号化データを読み出し、所定の記録フォーマット化を行い記録媒体107へ記録する。記録媒体107は、例えば不揮発性メモリで構成される記録メディアであり、撮像装置100に対して着脱可能に構成されている。以上の処理部により撮像装置が構成されている。 The memory I / F unit 104 arbitrates the memory access request from each processing unit, and performs read / write control for the memory 105. The memory 105 is a storage area composed of, for example, a volatile memory for storing various data output from each processing unit constituting the image pickup apparatus 100. The recording processing unit 106 reads out the coded data stored in the memory 105, performs a predetermined recording format, and records the data on the recording medium 107. The recording medium 107 is, for example, a recording medium composed of a non-volatile memory, and is configured to be removable from the image pickup apparatus 100. The image pickup apparatus is composed of the above processing units.

続いて、RAWデータ符号化・復号部103の詳細な構成及び処理の流れについて図2(a)及び図2(b)に示すブロック図を参照しながら説明を行う。図2(a)は、RAWデータ符号化・復号部103のうちRAWデータ符号化部103Eの構成を示し、図2(b)はRAWデータ符号化・復号部103のうちRAWデータ復号部103Dの構成を示す。 Subsequently, the detailed configuration and processing flow of the RAW data coding / decoding unit 103 will be described with reference to the block diagrams shown in FIGS. 2 (a) and 2 (b). FIG. 2A shows the configuration of the RAW data coding unit 103E of the RAW data coding / decoding unit 103, and FIG. 2B shows the configuration of the RAW data decoding unit 103D of the RAW data coding / decoding unit 103. The configuration is shown.

図2(a)においてRAWデータ符号化部103Eは、主にチャネル変換部201、周波数変換部202、量子化パラメータ生成部203、量子化部204、符号化部205及び量子化パラメータ符号化部206で構成されている。チャネル変換部201は、図3に示すように入力されたベイヤー配列のRAWデータを複数のチャネルに変換する。周波数変換部202、量子化部204は変換により得られたチャネル数に対応するブロックが用意され、並列に処理される。本実施形態では、チャネル変換部201は、例えば、RAWデータをベイヤー配列のR、G1、G2、B毎に4つのチャネルへ変換し、更にR、G1、G2、Bに対して以下の変換式1によりC0からC3の4つのチャネルへ変換することができる。 In FIG. 2A, the RAW data coding unit 103E mainly includes a channel conversion unit 201, a frequency conversion unit 202, a quantization parameter generation unit 203, a quantization unit 204, a coding unit 205, and a quantization parameter coding unit 206. It is composed of. The channel conversion unit 201 converts the RAW data of the Bayer array input as shown in FIG. 3 into a plurality of channels. The frequency conversion unit 202 and the quantization unit 204 are prepared with blocks corresponding to the number of channels obtained by the conversion, and are processed in parallel. In the present embodiment, for example, the channel conversion unit 201 converts RAW data into four channels for each of R, G1, G2, and B of the Bayer array, and further converts the following conversion formulas for R, G1, G2, and B. 1 can be converted from C0 to 4 channels of C3.

C0=a+c
C1=B-G2 式1
C2=R-G1
C3=b-a
但し、a=G2+[C1/2]、b=G1+[C2/2]、c=a+[C3/2]
また、式1において床関数[x]は、x以下の最大整数を表す。
C0 = a + c
C1 = B-G2 formula 1
C2 = R-G1
C3 = ba
However, a = G2 + [C1 / 2], b = G1 + [C2 / 2], c = a + [C3 / 2]
Further, in equation 1, the floor function [x] represents the maximum integer less than or equal to x.

尚、ここでは図3(a)に示すように4つのチャネルへ変換する構成例を示しているが、図3(b)や図3(c)に示すようにR、G1とG2を合わせたG、B毎の3つのチャネルへ変換しても良く、チャネル数や変換方法は上記以外の方法であっても良い。 Although a configuration example for converting to four channels is shown here as shown in FIG. 3A, R, G1 and G2 are combined as shown in FIGS. 3B and 3C. It may be converted into three channels for each of G and B, and the number of channels and the conversion method may be a method other than the above.

次に、周波数変換部202は、チャネル単位に所定の分解レベル(以降、単に「レベル」または「lev」と呼ぶ)で離散ウェーブレット変換による周波数変換処理を行い、生成された複数のサブバンドデータ(変換係数)を量子化パラメータ生成部203及び量子化部204へ出力する。 Next, the frequency conversion unit 202 performs frequency conversion processing by discrete wavelet conversion at a predetermined decomposition level (hereinafter, simply referred to as “level” or “lev”) for each channel, and a plurality of subband data (hereinafter, simply referred to as “level” or “lev”) are generated. The conversion coefficient) is output to the quantization parameter generation unit 203 and the quantization unit 204.

図4(a)は、lev=1のサブバンド分割処理に関わる離散ウェーブレット変換を実現するためのフィルタバンク構成を示しており、離散ウェーブレット変換処理を水平、垂直方向に実行した結果、図4(b)に示すように最初に1つの低周波数サブバンド(LL)と3つの高周波数サブバンド(HL、LH、HH)へ分割される。図4(a)に示すローパスフィルタ(以降、lpfと呼ぶ)及びハイパスフィルタ(以降、hpfと呼ぶ)の伝達関数をそれぞれ下式2,3に示す。
lpf(z)=(-z-2+2z-1+6+2z-z2)/8 式2
hpf(z)=(-z-1+2-z)/2 式3
FIG. 4A shows a filter bank configuration for realizing the discrete wavelet transform related to the subband division process of lev = 1, and as a result of executing the discrete wavelet transform process in the horizontal and vertical directions, FIG. 4 (a) shows. As shown in b), it is first divided into one low frequency subband (LL) and three high frequency subbands (HL, LH, HH). The transfer functions of the low-pass filter (hereinafter referred to as lpf) and the high-pass filter (hereinafter referred to as hpf) shown in FIG. 4A are shown in the following equations 2 and 3, respectively.
lpf (z) = (-z -2 + 2z -1 + 6 + 2z-z 2 ) / 8 Equation 2
hpf (z) = (-z -1 + 2-z) / 2 Equation 3

また、「↓2」は2対1のダウンサンプリングを表す。従って、水平方向と垂直方向とで1回ずつのダウンサンプリングが実行されるので、サブバンドのサイズは元のサイズの1/4となる。levが1よりも大きい場合には、低周波数サブバンド(LL)に対して階層的にサブバンド分割が実行され、例えばlev=3の場合は、図4(c)に示すように10個のサブバンドに対応したサブバンドデータが生成される。尚、ここでは離散ウェーブレット変換は上記式2、3に示すように5タップのlpfと3タップのhpfで構成しているが、これとは異なるタップ数及び異なる係数のフィルタ構成であっても良い。 Further, "↓ 2" represents 2 to 1 downsampling. Therefore, since downsampling is performed once in the horizontal direction and once in the vertical direction, the size of the subband becomes 1/4 of the original size. When the lev is larger than 1, subband division is performed hierarchically for the low frequency subband (LL). For example, when lev = 3, 10 pieces are performed as shown in FIG. 4 (c). Subband data corresponding to the subband is generated. Here, the discrete wavelet transform is composed of a 5-tap lpf and a 3-tap hpf as shown in the above equations 2 and 3, but a filter configuration having a different number of taps and different coefficients may be used. ..

量子化パラメータ生成部203は、周波数変換部202により生成されたサブバンドデータ(変換係数)に対して量子化処理を行うための全チャネル、全サブバンドに共通の第1の量子化パラメータを生成し、量子化パラメータ符号化部206へ出力する。また、第1の量子化パラメータから各チャネル、各サブバンドのための個別の第2の量子化パラメータを生成し、量子化部204へ供給する。第1の量子化パラメータ及び第2の量子化パラメータの生成単位やその生成方法については、図5から図7等を参照して後述する。 The quantization parameter generation unit 203 generates a first quantization parameter common to all channels and all subbands for performing quantization processing on the subband data (conversion coefficient) generated by the frequency conversion unit 202. Then, it is output to the quantization parameter coding unit 206. In addition, a separate second quantization parameter for each channel and each subband is generated from the first quantization parameter and supplied to the quantization unit 204. The generation unit of the first quantization parameter and the second quantization parameter and the generation method thereof will be described later with reference to FIGS. 5 to 7 and the like.

量子化部204は、周波数変換部202から入力されたサブバンドデータ(変換係数)に対して量子化パラメータ生成部203から供給された第2の量子化パラメータに基づき量子化処理を行い、量子化結果として量子化後のサブバンドデータ(変換係数)を符号化部205へ出力する。 The quantization unit 204 performs a quantization process on the subband data (conversion coefficient) input from the frequency conversion unit 202 based on the second quantization parameter supplied from the quantization parameter generation unit 203, and quantizes the subband data (conversion coefficient). As a result, the quantized subband data (conversion coefficient) is output to the coding unit 205.

符号化部205は、量子化部204から入力された量子化後のサブバンドデータ(変換係数)に対して、サブバンド毎にラスタースキャン順で予測差分型エントロピー符号化を行う。これにより、量子化後のサブバンドデータはサブバンド単位で符号化されことになる。ここでは、図4(d)に示すように符号化対象データ(変換係数)の周辺データからMED(Median Edge Detector)予測により予測値pdを生成し、符号化対象データxの値xdと予測値pdとの差分データを例えばハフマン符号化、ゴロム符号化等によりエントロピー符号化を行い、生成した符号化データをメモリ105へ格納する。このとき、各サブバンドのラスタースキャン順で先頭のデータには周辺データがないため、符号化対象データxの値xdがそのまま符号化される。そして、それ以降の符号化対象データについては差分データが符号化される。尚、予測符号化方式やエントロピー符号化方式は、他の方式であっても良い。また、各サブバンド別にライン単位に発生した発生符号量を量子化パラメータ生成部203へ供給する。また、ここで生成される符号化データの具体的なデータ構造については図9及び図10を参照して後述する。 The coding unit 205 performs predictive difference type entropy coding for each subband in the raster scan order for the quantized subband data (conversion coefficient) input from the quantization unit 204. As a result, the quantized sub-band data is encoded in sub-band units. Here, as shown in FIG. 4D, the predicted value pd is generated from the peripheral data of the coded target data (conversion coefficient) by MED (Media Edge Detector) prediction, and the value xd and the predicted value of the coded target data x are generated. The difference data from the pd is entropy-encoded by, for example, Huffman coding, Golomb coding, or the like, and the generated coded data is stored in the memory 105. At this time, since there is no peripheral data in the first data in the raster scan order of each subband, the value xd of the coded target data x is encoded as it is. Then, the difference data is encoded for the subsequent coding target data. The predictive coding method and the entropy coding method may be other methods. Further, the generated code amount generated in line units for each subband is supplied to the quantization parameter generation unit 203. The specific data structure of the coded data generated here will be described later with reference to FIGS. 9 and 10.

量子化パラメータ符号化部206は、量子化パラメータ生成部203から入力された第1の量子化パラメータを符号化する処理部である。量子化パラメータ符号化部206は、符号化部205と共通の符号化方式により量子化パラメータを符号化し、生成した符号化済みの量子化パラメータをメモリ105へ格納する。図2(a)では量子化パラメータ符号化部206を符号化部205とは独立に設ける場合を示したが、両者は共通の符号化方式を採用するので、量子化パラメータ符号化部206の機能を符号化部205で共通化するように構成することも可能である。RAWデータ符号化部103Eは以上のように構成される。 The quantization parameter coding unit 206 is a processing unit that encodes the first quantization parameter input from the quantization parameter generation unit 203. The quantization parameter coding unit 206 encodes the quantization parameter by a coding method common to the coding unit 205, and stores the generated encoded quantization parameter in the memory 105. FIG. 2A shows a case where the quantization parameter coding unit 206 is provided independently of the coding unit 205, but since both adopt a common coding method, the function of the quantization parameter coding unit 206 is shown. Can be configured to be common in the coding unit 205. The RAW data coding unit 103E is configured as described above.

次に、RAWデータ復号部103Dの構成を説明する。RAWデータ復号部103Dは、主に復号部211、量子化パラメータ復号部212、量子化パラメータ生成部213、逆量子化部214、周波数逆変換部215、チャネル逆変換部216で構成されている。 Next, the configuration of the RAW data decoding unit 103D will be described. The RAW data decoding unit 103D is mainly composed of a decoding unit 211, a quantization parameter decoding unit 212, a quantization parameter generation unit 213, an inverse quantization unit 214, a frequency inverse conversion unit 215, and a channel inverse conversion unit 216.

まず、復号部211は、メモリ105から入力される符号化データを、RAWデータ符号化部103Eが採用した符号化方式に対応する復号方式により復号し、量子化済みのサブバンドデータ(変換係数)を復元する。例えば、予測差分型エントロピー符号化方式が用いられていた場合、対応する予測差分型エントロピー復号方式を採用する。このとき、図4(d)に示すように符号化データは、符号化対象データ(変換係数)の周辺データから生成された予測値pdと符号化対象データxの値xdとの差分データがエントロピー符号化されたものである。そこで、復号部211は符号化データをエントロピー復号方式により復号して差分データを復元すると、復号対象データ周辺の復号済みデータから予測値pdを生成し、差分データを加算することにより符号化対象データxを復元する。符号化データはサブバンド単位に符号化されたデータで構成されているので、復号部211でもサブバンド単位に変換係数を復元する。 First, the decoding unit 211 decodes the coded data input from the memory 105 by a decoding method corresponding to the coding method adopted by the RAW data coding unit 103E, and the quantized subband data (conversion coefficient). To restore. For example, when the predicted difference type entropy coding method is used, the corresponding predicted difference type entropy decoding method is adopted. At this time, as shown in FIG. 4D, the coded data is the entropy of the difference data between the predicted value pd generated from the peripheral data of the coded target data (conversion coefficient) and the value xd of the coded target data x. It is encoded. Therefore, when the decoding unit 211 decodes the coded data by the entropy decoding method and restores the difference data, the predicted value pd is generated from the decoded data around the decoding target data, and the difference data is added to the coded target data. Restore x. Since the coded data is composed of data encoded in subband units, the decoding unit 211 also restores the conversion coefficient in subband units.

量子化パラメータ復号部212は、メモリ105から入力された符号化データに含まれる、符号化された第1の量子化パラメータを復号部211と共通の復号方式により復号し、第1の量子化パラメータを復元する。また、量子化パラメータ復号部212は、チャネル、サブバンド単位の第2の量子化パラメータを算出するための所定の係数(後述する式5のα、β)も復号する。復号結果は量子化パラメータ生成部213に出力する。量子化パラメータ生成部213は、量子化パラメータ復号部212から提供された第1の量子化パラメータと、所定の係数とからチャネル、サブバンド単位の第2の量子化パラメータを生成し、逆量子化部214に提供する。 The quantization parameter decoding unit 212 decodes the coded first quantization parameter included in the coded data input from the memory 105 by the same decoding method as the decoding unit 211, and the first quantization parameter. To restore. Further, the quantization parameter decoding unit 212 also decodes a predetermined coefficient (α, β in the formula 5 described later) for calculating the second quantization parameter in units of channels and subbands. The decoding result is output to the quantization parameter generation unit 213. The quantization parameter generation unit 213 generates a channel and sub-band unit second quantization parameter from the first quantization parameter provided by the quantization parameter decoding unit 212 and a predetermined coefficient, and dequantizes. Provided to unit 214.

逆量子化部214は、復号部211から出力されたチャネル単位の量子化済みサブバンドデータを、量子化パラメータ生成部213から提供された第2の量子化パラメータを用いて逆量子化して、サブバンドデータを復元する。周波数逆変換部215は、離散ウェーブレット逆変換による周波数逆変換処理を行い、所定の分割レベルのサブバンドデータ(変換係数)からチャネルを復元する。チャネル逆変換部216は、入力されたチャネルデータを逆変換して、元のRAWデータを復元する。例えば、RAWデータ符号化部103Eのチャネル変換部201がベイヤー配列のR、G1、G2、Bを式1に従いC0からC3の4つのチャネルへ変換していた場合、式1に対応する逆変換処理に従い、C0からC3の4つのチャネルからR、G1、G2、BのRAWデータを復元する。RAWデータ復号部103Dは以上のように構成される。 The dequantization unit 214 dequantizes the channel-based quantized sub-band data output from the decoding unit 211 using the second quantization parameter provided by the quantization parameter generation unit 213, and sub-quantizes the sub-quantization. Restore the band data. The frequency inverse transform unit 215 performs frequency inverse transform processing by discrete wavelet inverse transform, and restores a channel from subband data (conversion coefficient) of a predetermined division level. The channel inverse conversion unit 216 reversely converts the input channel data and restores the original RAW data. For example, when the channel conversion unit 201 of the RAW data coding unit 103E converts R, G1, G2, and B of the Bayer array into four channels C0 to C3 according to the formula 1, the inverse conversion process corresponding to the formula 1 According to this, the RAW data of R, G1, G2, and B are restored from the four channels C0 to C3. The RAW data decoding unit 103D is configured as described above.

次に、量子化パラメータ生成部203における量子化パラメータ生成処理を説明する。本実施形態では、全チャネル、全サブバンドに共通の第1の量子化パラメータを生成し、当該第1の量子化パラメータから各チャネル、各サブバンドのための個別の第2の量子化パラメータを生成する。量子化パラメータ生成部203は、符号化前に予め設定された目標符号量に基づき、所定のサブバンドデータ単位に符号量制御に関わる量子化パラメータ生成処理を行い、まず全チャネル、全サブバンドに共通の第1の量子化パラメータを生成する。 Next, the quantization parameter generation process in the quantization parameter generation unit 203 will be described. In this embodiment, a first quantization parameter common to all channels and all subbands is generated, and a separate second quantization parameter for each channel and each subband is obtained from the first quantization parameter. Generate. The quantization parameter generation unit 203 performs a quantization parameter generation process related to code amount control in a predetermined subband data unit based on a target code amount set in advance before coding, and first performs all channels and all subbands. Generate a common first quantization parameter.

本実施形態では第1の量子化パラメータを直接に生成するのではなく、2段階に分けて生成する場合を説明する。まず、各サブバンドデータについて所定のライン単位に、全チャネル、全サブバンドの共通の量子化パラメータ(第3の量子化パラメータ)を生成する。そして、上記所定のラインをセグメントと呼ぶ単位で分割し、セグメントにおけるサブバンドデータの画質特性に応じて、第3の量子化パラメータを修正して第1の量子化パラメータを生成する。以下、第1の量子化パラメータの生成手順について詳細に説明する。 In this embodiment, a case where the first quantization parameter is not directly generated but is generated in two stages will be described. First, a common quantization parameter (third quantization parameter) for all channels and all subbands is generated for each subband data in a predetermined line unit. Then, the predetermined line is divided into units called segments, and the third quantization parameter is modified according to the image quality characteristics of the subband data in the segment to generate the first quantization parameter. Hereinafter, the procedure for generating the first quantization parameter will be described in detail.

図5は、各チャネルをlev=3でサブバンド分割した場合の符号量制御に関わる符号量の評価及び量子化パラメータを更新する単位を示す。C0からC3までの4つのチャネルのレベル3のサブバンド(3LL,3HL,3LH,3HH)の垂直方向に1×N(Nは整数)ライン分、レベル2のサブバンド(2HL,2LH,2HH)の垂直方向に2×Nライン分、レベル1のサブバンド(1HL,1LH,1HH)の垂直方向に4×Nライン分のサブバンドデータを纏めて1つの処理単位(第1の処理単位)とする。図5に示すように、第1の処理単位は、サブバンドをそれぞれ垂直方向に所定のラインごとに分割した領域(バンド)として設定される。特に、図5はN=1の場合を示している。 FIG. 5 shows a unit for updating the code amount evaluation and the quantization parameter related to the code amount control when each channel is subbanded at lev = 3. Level 3 subbands (2HL, 2LH, 2HH) for 1 × N (N is an integer) line in the vertical direction of the level 3 subbands (3LL, 3HL, 3LH, 3HH) of the four channels from C0 to C3. 2 x N lines in the vertical direction and 4 x N lines in the vertical direction of the level 1 subband (1HL, 1LH, 1HH) are combined into one processing unit (first processing unit). do. As shown in FIG. 5, the first processing unit is set as a region (band) in which each subband is vertically divided into predetermined lines. In particular, FIG. 5 shows the case where N = 1.

量子化パラメータ生成部203は、第1の処理単位に対応する目標符号量と発生符号量とを比較し、次の同処理単位の全チャネル、全サブバンドのデータに対する発生符号量を目標発生符号量に近づけるようにフィードバック制御を行い、全チャネル、全サブバンドに共通の第3の量子化パラメータ(QpBr)を生成する。尚、RAWデータに対して画面内の符号量制御を行わない場合には、上記に示すような符号量制御単位に関係なく全画面固定となる全チャネル、全サブバンドに共通のQpBrを設定又は生成すれば良い。このときの符号量の制御は以下の式4に従って実行することができる。 The quantization parameter generation unit 203 compares the target code amount corresponding to the first processing unit with the generated code amount, and determines the generated code amount for the data of all channels and all subbands of the next processing unit. Feedback control is performed so as to approach the quantity, and a third quantization parameter (QpBr) common to all channels and all subbands is generated. When the code amount control in the screen is not performed for the RAW data, QpBr common to all channels and all subbands that are fixed to the entire screen is set or set regardless of the code amount control unit as shown above. Just generate it. The control of the code amount at this time can be executed according to the following equation 4.

QpBr(i)=QpBr(0)+r×Σ{S(i-1)-T(i-1)} 式4
QpBr(0) : 初期量子化パラメータ
QpBr(i):i番目の量子化パラメータ(i>0)
r:制御感度
S:発生符号量
T:目標符号量
QpBr (i) = QpBr (0) + r × Σ {S (i-1) -T (i-1)} Equation 4
QpBr (0): Initial quantization parameter QpBr (i): i-th quantization parameter (i> 0)
r: Control sensitivity
S: Generated code amount
T: Target code amount

式4では、サブバンドデータに設定された各バンド(第1の処理単位)のうちの先頭のバンドに対して設定した初期量子化パラメータを基準とし、発生符号量と目標符号量との差分の大きさに応じて当該初期量子化パラメータを調整する。具体的に、先頭のバンド以降に発生した符号量の合計(総発生符号量)と、対応する目標符号量の合計(総目標符号量)との符号量差分が小さくなるように初期量子化パラメータの値を調整して、処理対象のバンドのための第3の量子化パラメータを決定する。先頭のバンドに対して設定される初期量子化パラメータは、圧縮率などに基づいて量子化パラメータ生成部203が決定したパラメータを用いることができる。 In Equation 4, the difference between the generated code amount and the target code amount is based on the initial quantization parameter set for the first band of each band (first processing unit) set in the subband data. The initial quantization parameter is adjusted according to the magnitude. Specifically, the initial quantization parameter is such that the code amount difference between the total code amount generated after the first band (total generated code amount) and the total of the corresponding target code amounts (total target code amount) becomes small. Adjust the value of to determine the third quantization parameter for the band to be processed. As the initial quantization parameter set for the first band, a parameter determined by the quantization parameter generation unit 203 based on the compression rate or the like can be used.

このようにして、バンドごとに第3の量子化パラメータ(QpBr)を生成した後、量子化パラメータ生成部203はバンドを更に細分化(セグメント化)し、第2の処理単位であるセグメントごとのサブバンドデータの画質評価結果に応じて第3の量子化パラメータ(QpBr)を調整して第1の量子化パラメータ(QpBs)を生成する。これにより、RAWデータの特性に応じて量子化の強弱を調整する画質制御に関わる量子化パラメータ生成を行うことができる。 In this way, after the third quantization parameter (QpBr) is generated for each band, the quantization parameter generation unit 203 further subdivides (segments) the band, and for each segment, which is the second processing unit. The third quantization parameter (QpBr) is adjusted according to the image quality evaluation result of the subband data to generate the first quantization parameter (QpBs). This makes it possible to generate quantization parameters related to image quality control that adjusts the strength of quantization according to the characteristics of RAW data.

図6(a)は、各チャネルをlev=3でサブバンド分割した場合の画質制御に関わるサブバンドデータの評価及び量子化パラメータを更新する第2の処理単位(セグメント)を示す。各セグメントでは、全チャネルのレベル3のサブバンド(3LL,3HL,3LH,3HH)の水平、垂直方向それぞれに(1×M)×(1×N)(M、Nはそれぞれ整数)、レベル2のサブバンド(2HL,2LH,2HH)の水平、垂直方向にそれぞれ(2×M)×(2×N)、レベル1のサブバンド(1HL,1LH,1HH)の水平、垂直方向にそれぞれ(4×M)×(4×N)としている。 FIG. 6A shows a second processing unit (segment) for updating the evaluation and quantization parameters of the subband data related to the image quality control when each channel is subbanded at lev = 3. In each segment, level 3 subbands (3LL, 3HL, 3LH, 3HH) of all channels are (1 × M) × (1 × N) (M and N are integers) and level 2 in the horizontal and vertical directions, respectively. Subbands (2HL, 2LH, 2HH) horizontally and vertically (2 × M) × (2 × N), and level 1 subbands (1HL, 1LH, 1HH) horizontally and vertically (4), respectively. × M) × (4 × N).

ここに示す第2の処理単位としてのセグメントは、第1の処理単位としてのバンドを水平方向に細分化したものである。本実施形態ではセグメント化は、各サブバンドに含まれるセグメント数が一致するように行う。M=1、N=1とすると、セグメントはレベル1相当でバンドを水平方向に4画素単位に分割したものと捉えることができる。量子化パラメータ生成部203は、バンドごとに算出した第3の量子化パラメータQpBrを、セグメントごとの画質特性に応じて修正することで、セグメントごとの第1の量子化パラメータ(QpBs)を生成する。 The segment as the second processing unit shown here is a horizontally subdivided band as the first processing unit. In the present embodiment, segmentation is performed so that the number of segments included in each subband matches. When M = 1 and N = 1, the segment corresponds to level 1 and the band can be regarded as horizontally divided into 4 pixel units. The quantization parameter generation unit 203 generates the first quantization parameter (QpBs) for each segment by modifying the third quantization parameter QpBr calculated for each band according to the image quality characteristics for each segment. ..

図6(b)は、M=1、N=1とした場合の、第1の量子化パラメータ(QpBs)とサブバンドデータとの関係を示す。ここに示すように、1つのセグメントに含まれる各チャネルの複数のサブバンドデータに対して1つの第1の量子化パラメータ(QpBs)が生成される。 FIG. 6B shows the relationship between the first quantization parameter (QpBs) and the subband data when M = 1 and N = 1. As shown here, one first quantization parameter (QpBs) is generated for a plurality of subband data of each channel contained in one segment.

セグメントごとの画質評価ついては、各セグメントに含まれるサブバンドデータのうち、例えば3LLのサブバンドデータを低周波成分として評価し、1HL,1LH,1HHのサブバンドデータにより高周波成分を評価する。このとき、低周波成分の振幅が小さい程量子化を細かく、高周波成分の振幅が大きい程量子化を粗く制御するように符号量制御により、第3の量子化パラメータ(QpBr)に対してゲイン、オフセット調整を行うようにフィードフォワード制御すれば良い。 Regarding the image quality evaluation for each segment, for example, among the subband data included in each segment, the subband data of 3LL is evaluated as a low frequency component, and the high frequency component is evaluated by the subband data of 1HL, 1LH, and 1HH. At this time, the smaller the amplitude of the low-frequency component, the finer the quantization, and the larger the amplitude of the high-frequency component, the coarser the quantization is controlled. Feed forward control may be performed so as to adjust the offset.

図7は、量子化パラメータ生成部203が実行する、画質評価に基づく第3の量子化パラメータ(QpBr)の調整処理の一例に対応するフローチャートを示す。該フローチャートに対応する処理は、例えば、量子化パラメータ生成部203として機能する1以上のプロセッサが対応するプログラム(ROM等に格納)を実行することにより実現できる。 FIG. 7 shows a flowchart corresponding to an example of the adjustment process of the third quantization parameter (QpBr) based on the image quality evaluation executed by the quantization parameter generation unit 203. The process corresponding to the flowchart can be realized, for example, by executing a program (stored in ROM or the like) corresponding to one or more processors functioning as the quantization parameter generation unit 203.

S701において、量子化パラメータ生成部203は低周波成分について判定を行う。3LLの変換係数と、判定用に設定された閾値Th1とを比較し、3LLの変換係数が閾値以下の大きさであれば(S701で「YES」)、処理はS702に進む。S702において、量子化パラメータ生成部203は処理対象のセグメントが属するバンドに対して設定された第3の量子化パラメータQpBrの値を減少させる。例えば、QpBrに対して1未満の係数を掛けるか、あるいはQpBrから所定値を減算する。 In S701, the quantization parameter generation unit 203 determines the low frequency component. The conversion coefficient of 3LL is compared with the threshold value Th1 set for determination, and if the conversion coefficient of 3LL is greater than or equal to the threshold value (“YES” in S701), the process proceeds to S702. In S702, the quantization parameter generation unit 203 reduces the value of the third quantization parameter QpBr set for the band to which the segment to be processed belongs. For example, QpBr is multiplied by a coefficient less than 1, or a predetermined value is subtracted from QpBr.

S701の判定で、3LLの変換係数が閾値Th1より大きい場合(S701で「NO」)、処理はS703に進む。S703において量子化パラメータ生成部203は、高周波成分について判定を行う。1HL、1LH、1HHの変換係数の平均値と、判定用に設定された閾値Th2とを比較し、平均値が閾値Th2より小さい場合(S703で「NO」)、処理はS704に進む。また、平均値が閾値Th2以上の大きさであれば(S703で「YES」)、処理はS705に進む。S704ではQpBrの値を維持する。S705ではQpBrの値を増大させる。例えば、QpBrに対して1以上の係数を掛けるか、あるいはQpBrに所定値を加算する。 In the determination of S701, when the conversion coefficient of 3LL is larger than the threshold value Th1 (“NO” in S701), the process proceeds to S703. In S703, the quantization parameter generation unit 203 determines the high frequency component. The average value of the conversion coefficients of 1HL, 1LH, and 1HH is compared with the threshold value Th2 set for determination, and if the average value is smaller than the threshold value Th2 (“NO” in S703), the process proceeds to S704. If the average value is greater than or equal to the threshold value Th2 (“YES” in S703), the process proceeds to S705. In S704, the value of QpBr is maintained. In S705, the value of QpBr is increased. For example, QpBr is multiplied by a coefficient of 1 or more, or a predetermined value is added to QpBr.

以上により、セグメント毎に第3の量子化パラメータQpBrを調整して得られた結果を当該セグメントの第1の量子化パラメータQpBsとする。尚、画質制御に関わる量子化制御を行なわない場合には、QpBrをそのままQpBsとすれば良い。 As described above, the result obtained by adjusting the third quantization parameter QpBr for each segment is used as the first quantization parameter QpBs of the segment. When the quantization control related to the image quality control is not performed, QpBr may be used as it is as QpBs.

以上により生成された全チャネル、全サブバンドに共通の第1の量子化パラメータQpBsは、例えば上記のM=1、N=1とした場合、図8に示すように各チャネルの8×8画素相当に対応し、元のRAWデータの16×16画素相当のRAWデータのブロック単位の量子化制御が可能となる。 The first quantization parameter QpBs common to all channels and all subbands generated as described above is, for example, 8 × 8 pixels of each channel as shown in FIG. 8 when the above M = 1 and N = 1. Correspondingly, it is possible to control the quantization of the RAW data corresponding to 16 × 16 pixels of the original RAW data in block units.

次に、第1の量子化パラメータQpBsを用いて各チャネル、各サブバンドのための個別の第2の量子化パラメータQpSbを生成する処理について説明する。本実施形態では上述のように、セグメント毎に1つの第1の量子化パラメータQpBsが生成されるが、各チャネルの各セグメントの量子化はQpBsをそのまま用いるのではなく、チャネル、セグメントに個別に対応した第2の量子化パラメータQpSbをQpBsから生成して量子化処理を行う。以下、QpSbの生成処理について説明する。 Next, a process of generating a separate second quantization parameter QpSb for each channel and each subband using the first quantization parameter QpBs will be described. In this embodiment, as described above, one first quantization parameter QpBs is generated for each segment, but the quantization of each segment of each channel does not use QpBs as it is, but individually for each channel and segment. The corresponding second quantization parameter QpSb is generated from QpBs and the quantization process is performed. Hereinafter, the QpSb generation process will be described.

式5は、QpSb生成のための計算式である。
QpSb[i][j]=QpBs×α[i][j]+β[i][j] 式5
QpSb:各チャネル、各サブバンド個別の第2の量子化パラメータ
QpBs:全チャネル、全サブバンド共通の第1の量子化パラメータ
α:傾き
β:切片
i:チャネルインデックス(0~3)
j:サブバンドインデックス(0~9)
Equation 5 is a calculation equation for generating QpSb.
QpSb [i] [j] = QpBs × α [i] [j] + β [i] [j] Equation 5
QpSb: Second quantization parameter for each channel and each subband
QpBs: First quantization parameter common to all channels and all subbands α: Slope β: Intercept
i: Channel index (0-3)
j: Subband index (0-9)

式5において、傾きα及び切片βは、各チャネル、各サブバンドに個別に与えられる係数(変数)であって、予め定めておくことができる。αの値は、チャネルC0からC3について、C0>C1=C2>C3の関係で値が大きくなり、αが大きいほどQpSbの値が大きくなる。また、各サブバンドについては低周波成分寄りのサブバンドほど量子化パラメータの値を小さくするためα、βの値を小さくし、高周波成分寄りのサブバンドほど量子化パラメータの値を大きくするためにα、βの値を大きくする。 In Equation 5, the slope α and the intercept β are coefficients (variables) individually given to each channel and each subband, and can be predetermined. The value of α increases for channels C0 to C3 in the relationship of C0> C1 = C2> C3, and the larger α, the larger the value of QpSb. In addition, for each subband, the values of α and β are made smaller in order to make the value of the quantization parameter smaller in the subband closer to the low frequency component, and the value of the quantization parameter is made larger in the subband closer to the high frequency component. Increase the values of α and β.

また、α[i][j]、β[i][j]の各値は予め設定されるものであるが、設定される圧縮率に応じて複数の組み合わせが用意されても良い。例えば、圧縮率が高い場合にはQpSbの値が大きすぎると情報が消失してしまうので、QpSbが大きくなりすぎないようにα、βの値を小さめに調整することができる。 Further, although each value of α [i] [j] and β [i] [j] is set in advance, a plurality of combinations may be prepared according to the set compression rate. For example, when the compression rate is high, information is lost if the value of QpSb is too large, so the values of α and β can be adjusted to be small so that the value of QpSb does not become too large.

このようにして、各チャネル、各サブバンドの個別の重み係数α、βにより第1の量子化パラメータQpBsを修正して第2の量子化パラメータQpSbを生成するので、各チャネル、各サブバンドに対して柔軟に量子化制御することが可能になる。量子化部204は、式5に基づき生成された各チャネル、各サブバンドの第2の量子化パラメータQpSbを用いて、周波数変換部202から得られた変換係数を量子化する。 In this way, the first quantization parameter QpBs is modified by the individual weight coefficients α and β of each channel and each subband to generate the second quantization parameter QpSb, so that each channel and each subband On the other hand, it becomes possible to flexibly control the quantization. The quantization unit 204 quantizes the conversion coefficient obtained from the frequency conversion unit 202 using the second quantization parameter QpSb of each channel and each subband generated based on the equation 5.

また、RAWデータ復号部103における第2の量子化パラメータQpSbの生成方法も、上述の式5に従って行うことができる。その際、第1の量子化パラメータQpSrとα、βの各値は、量子化パラメータ復号部212から提供される。 Further, the method of generating the second quantization parameter QpSb in the RAW data decoding unit 103 can also be performed according to the above equation 5. At that time, the first quantization parameter QpSr and each value of α and β are provided by the quantization parameter decoding unit 212.

以上のようにしてRAWデータ符号化・復号部103で符号化された各チャネルのサブバンドデータ、及び、第1の量子化パラメータQpBsは、記録処理部106により所定のデータ形式に基づき多重化され、符号化データとして記録される。図9(a)は、符号化データを記録する場合のデータ構造の一例を示す。図9(a)に示すように、符号化データは階層構造となっており、符号化データ全体に関わる情報を示す「main_header」から始まり、RAWデータを複数の画素ブロック単位にタイル分割して符号化することを想定して「tile_header」と「tile_data」によりタイル単位にデータを格納することが可能となっている。上記説明においては、RAWデータをチャネル、サブバンドデータ単位に直接符号化する場合を説明したが、タイルに限らずRAWデータ内の所定の集合を単位として本発明を適用することができる。即ち、RAWデータをタイルに分割し、当該タイルについてチャネル、サブバンドデータ単位に符号化する場合も、上記と同様の処理をRAWデータを複数に分割して得られたタイル単位に実行すればよい。この場合、タイル単位に各チャネルのサブバンドデータ、及び、第1の量子化パラメータQpBsが符号化されて、符号化データに包含される。タイル分割を行わない場合は、「tile_header」と「tile_data」は1つのみとなる。 The subband data of each channel encoded by the RAW data coding / decoding unit 103 as described above and the first quantization parameter QpBs are multiplexed by the recording processing unit 106 based on a predetermined data format. , Recorded as coded data. FIG. 9A shows an example of a data structure for recording encoded data. As shown in FIG. 9A, the coded data has a hierarchical structure, starting with "main_header" indicating information related to the entire coded data, and the RAW data is tiled and coded in units of a plurality of pixel blocks. It is possible to store data in tile units by "tile_header" and "tile_data" on the assumption that the data will be changed. In the above description, the case where the RAW data is directly encoded in the channel and subband data units has been described, but the present invention can be applied not only to tiles but also to a predetermined set in the RAW data as a unit. That is, when the RAW data is divided into tiles and the tiles are encoded in channel and subband data units, the same processing as above may be executed in the tile units obtained by dividing the RAW data into a plurality of tiles. .. In this case, the subband data of each channel and the first quantization parameter QpBs are encoded for each tile and included in the encoded data. When tile division is not performed, there is only one "tile_header" and "tile_data".

「tile_data」は以下の要素を含む。まず符号化された第1の量子化パラメータQpBsに関わる情報を示す「qp_header」と符号化された第1の量子化パラメータ自体である「coded_qp_data」が配置される。続く「coded_raw_data」は、チャネル単位に並んで配置されており、各チャネルに関わる情報を示す「channel_header」とそのチャネル毎の本体データである「channel_data」の順にチャネル分の符号化済みのデータが格納される。「channel_data」は、サブバンド毎の符号化されたデータの集合で構成されており、各サブバンドに関わる情報を示す「sb_header」と符号化されたサブバンド毎のデータである「sb_data」がサブバンドインデックス順に並んでいる。サブバンドインデックスは、図9(b)に示す通りである。 "Tile_data" includes the following elements. First, "qp_header" indicating information related to the coded first quantization parameter QpBs and "coded_qp_data" which is the coded first quantization parameter itself are arranged. The following "coded_raw_data" is arranged side by side in channel units, and the coded data for each channel is stored in the order of "channel_header" indicating information related to each channel and "channel_data" which is the main body data for each channel. Will be done. "Channel_data" is composed of a set of coded data for each subband, and "sb_header" indicating information related to each subband and "sb_data" which is coded data for each subband are subs. They are arranged in band index order. The subband index is as shown in FIG. 9B.

続いて、各ヘッダ情報のシンタクス要素について図10に基づき説明を行う。「main_header」は以下の要素で構成される。「coded_data_size」は符号化データ全体のデータ量を示す。「width」はRAWデータの幅を示す。「height」はRAWデータの高さを示す。「depth」はRAWデータのビット深度を示す。「channel」はRAWデータの符号化時のチャネル数を示す。「type」はチャネル変換のタイプを示す。「lev」は各チャネルのサブバンドレベルを示す。 Subsequently, the syntax elements of each header information will be described with reference to FIG. "Main_header" is composed of the following elements. "Code_data_size" indicates the amount of data of the entire encoded data. "Width" indicates the width of the RAW data. "Height" indicates the height of the RAW data. "Dept" indicates the bit depth of the RAW data. “Channel” indicates the number of channels when encoding RAW data. "Type" indicates the type of channel conversion. “Lev” indicates the subband level of each channel.

「tile_header」は、以下の要素で構成される。「tile_index」はタイル分割位置を識別するためのタイルのインデックスを示す。「tile_data_size」はタイルに含まれるデータ量を示す。「tile_width」はタイルの幅を示す。「tile_height」はタイルの高さを示す。 "Tile_header" is composed of the following elements. "Tile_index" indicates the index of the tile for identifying the tile division position. "Tile_data_size" indicates the amount of data contained in the tile. "Tile_width" indicates the width of the tile. "Tile_height" indicates the height of the tile.

「qp_header」は、以下の要素で構成される。「qp_data_size」は符号化された第1の量子化パラメータのデータ量を示す。「qp_width」は、第1の量子化パラメータの幅、即ちRAWデータに対応する水平方向の第1の量子化パラメータの数を示す。「qp_height」は、第1の量子化パラメータの高さ、即ちRAWデータに対応する垂直方向の第1の量子化パラメータ数を示す。 "Qp_header" is composed of the following elements. “Qp_data_size” indicates the amount of data of the first coded quantization parameter. “Qp_width” indicates the width of the first quantization parameter, that is, the number of horizontal first quantization parameters corresponding to the RAW data. “Qp_height” indicates the height of the first quantization parameter, that is, the number of the first quantization parameters in the vertical direction corresponding to the RAW data.

「channel_header」は、以下の要素で構成される。「channel_index」はチャネルを識別するためのチャネルのインデックスを示す。「channel_data_size」はチャネルのデータ量を示す。「sb_header」は、以下の要素で構成される。「sb_index」はサブバンドを識別するためのサブバンドインデックスを示す。「sb_data_size」はサブバンドの符号化されたデータ量を示す。「sb_qp_a」は、各サブバンドに対する量子化パラメータを生成するための式5に示すα値を示す。「sb_qp_b」は、各サブバンドに対する量子化パラメータを生成するための式5に示すβ値を示す。 "Channel_header" is composed of the following elements. "Channel_index" indicates the index of the channel for identifying the channel. "Channel_data_size" indicates the amount of data in the channel. "Sb_header" is composed of the following elements. “Sb_index” indicates a subband index for identifying a subband. “Sb_data_size” indicates the amount of coded data of the subband. “Sb_qp_a” indicates the α value shown in Equation 5 for generating the quantization parameter for each subband. “Sb_qp_b” indicates the β value shown in Equation 5 for generating the quantization parameter for each subband.

以上の実施形態に対応する発明によれば、各チャネル、各サブバンドの量子化パラメータを全て記録するのではなく、全チャネル、全サブバンドの共通の量子化パラメータを記録し、当該共通量子化パラメータから各チャネル、各サブバンドの量子化パラメータを生成可能にする。これにより、以下に述べるような量子化パラメータのデータ量抑制の効果を達成することができる。 According to the invention corresponding to the above embodiment, instead of recording all the quantization parameters of each channel and each subband, the common quantization parameters of all channels and all subbands are recorded and the common quantization is performed. Quantization parameters for each channel and each subband can be generated from the parameters. As a result, the effect of suppressing the amount of data of the quantization parameter as described below can be achieved.

各チャネル、各サブバンドの個別の量子化パラメータを全て記録する場合(従来例)と、全チャネル、全サブバンド共通の量子化パラメータを記録する場合(本実施形態)とでデータ量の比較を考える。ここで、レベル1からレベル3までの各サブバンドについて1つずつの量子化パラメータが記録されることになる。よって、1セグメントについて記録することになる量子化パラメータのデータサイズは、(1×4サブバンド+1×3サブバンド+1×3サブバンド)×4チャネル分となり全体で40となる。一方、共通量子化パラメータは、1つだけあればよいため1となり、記録対象とする量子化パラメータを共通の量子化パラメータとすることで量子化パラメータのサイズを40分の1に削減することできる。 Compare the amount of data between the case of recording all the individual quantization parameters of each channel and each subband (conventional example) and the case of recording the quantization parameters common to all channels and all subbands (this embodiment). think. Here, one quantization parameter is recorded for each subband from level 1 to level 3. Therefore, the data size of the quantization parameter to be recorded for one segment is (1 × 4 subband + 1 × 3 subband + 1 × 3 subband) × 4 channels, which is 40 in total. On the other hand, since only one common quantization parameter is required, it becomes 1, and the size of the quantization parameter can be reduced to 1/40 by setting the quantization parameter to be recorded as the common quantization parameter. ..

更に、図11に示すように記録対象の共通の量子化パラメータは2次元座標系にマップされた画面データと見なすことができるので、量子化パラメータの符号化に用いた予測差分符号化方式(MED予測)を同様に適用することでより量子化パラメータのデータ量を削減することが可能となる。図11(b)において、QpBs[p, q]は、各セグメントに割り当てられた共通量子化パラメータを示し、pは、1から垂直方向のセグメントの分割数Pまでの値を取り、qは、1から水平方向のセグメントの分割数Qまでの値を取り得る。[p, q]の各値は、サブバンドにおける各セグメントの位置と対応する。 Further, as shown in FIG. 11, since the common quantization parameter to be recorded can be regarded as screen data mapped to the two-dimensional coordinate system, the predicted difference coding method (MED) used for coding the quantization parameter can be regarded. By applying the prediction) in the same way, it is possible to further reduce the amount of data of the quantization parameter. In FIG. 11 (b), QpBs [p, q] indicate common quantization parameters assigned to each segment, p takes a value from 1 to the number of divisions P of the vertical segment, and q is. Values from 1 to the number of divisions Q of the horizontal segment can be taken. Each value of [p, q] corresponds to the position of each segment in the subband.

以上のようにRAWデータを複数のチャネルに変換し、各チャネル単位にサブバンド分割を行う場合に、セグメント単位に全チャネル、全サブバンドに共通の量子化パラメータと重み付け関数とにより各チャネル、各サブバンド個別の量子化パラメータを生成することができる。これにより、柔軟な量子化制御を実現しつつ、共通の量子化パラメータを2次元データとして予測符号化を行うことで量子化パラメータのデータ量を大幅に削減し、高画質且つコンパクトにRAWデータを記録することが可能となる。 When RAW data is converted into multiple channels as described above and subband division is performed for each channel, all channels are divided into segments, and each channel is divided by a quantization parameter and a weighting function common to all subbands. Quantization parameters for individual subbands can be generated. As a result, while realizing flexible quantization control, the amount of data of the quantization parameter is greatly reduced by performing predictive coding using the common quantization parameter as two-dimensional data, and the RAW data can be obtained with high image quality and compactness. It becomes possible to record.

[実施形態2]
以下、発明の第2の実施形態について説明する。本実施形態の撮像装置は、実施形態1の撮像装置と同様の構成とすることができる。但し、RAWデータ符号化・復号部103の量子化パラメータ生成部203における第1の量子化パラメータの生成単位と、各チャネル、各サブバンド個別の第2の量子化パラメータを生成するプロセスとが異なる。実施形態1と共通の構成の説明は本実施形態では省略するものとし、主に量子化パラメータ生成方法の相違に係る構成について説明する。
[Embodiment 2]
Hereinafter, the second embodiment of the invention will be described. The image pickup device of the present embodiment can have the same configuration as the image pickup device of the first embodiment. However, the generation unit of the first quantization parameter in the quantization parameter generation unit 203 of the RAW data coding / decoding unit 103 is different from the process of generating the second quantization parameter for each channel and each subband. .. The description of the configuration common to the first embodiment will be omitted in the present embodiment, and the configuration related to the difference in the quantization parameter generation method will be mainly described.

図12(a)は、各チャネルをlev=3でサブバンド分割した場合の画質制御に関わるサブバンドデータの評価及び量子化パラメータを更新する単位を示しており、全チャネルのレベル3のサブバンド(3LL,3HL,3LH,3HH)の水平、垂直方向それぞれに(1×M)×1ライン(Mはそれぞれ整数)に対し、レベル2のサブバンド(2HL,2LH,2HH)の水平、垂直方向にそれぞれ(2×M)×1ライン、レベル1のサブバンド(1HL,1LH,1HH)の水平、垂直方向にそれぞれ(4×M)×1ラインのサブバンドデータに対応する共通の第1の量子化パラメータ(QpBs)を生成する。 FIG. 12A shows a unit for updating the evaluation and quantization parameters of the subband data related to image quality control when each channel is subbanded at lev = 3, and is a level 3 subband of all channels. (3LL, 3HL, 3LH, 3HH) horizontal and vertical directions (1 × M) × 1 line (M is an integer), while level 2 subbands (2HL, 2LH, 2HH) are horizontal and vertical. 1st common 1st line corresponding to (4 × M) × 1 line of subband data of (4 × M) × 1 line in the horizontal and vertical directions of the level 1 subband (1HL, 1LH, 1HH), respectively. Generate quantization parameters (QpBs).

図6(a)に示した画質制御に関わるセグメントと比較すると、図12(a)ではレベル1においてセグメントサイズが垂直方向に4分の1となっている。よって、仮にM=1とした場合の第1の量子化パラメータ(QpBs)とサブバンドデータとの関係は、図12(b)のようになる。ここでは、レベル1においてセグメントサイズが4×1となっているため、4×4のセグメントに換算すると第1の量子化パラメータ(QpBs)が4つ存在することになる。これにより、実施形態1と比較して垂直方向により細かい量子化制御が可能となっている。尚、同様に水平方向に対しても細かくすることも可能である。 Compared with the segment related to image quality control shown in FIG. 6A, in FIG. 12A, the segment size at level 1 is one-fourth in the vertical direction. Therefore, the relationship between the first quantization parameter (QpBs) and the subband data when M = 1 is as shown in FIG. 12 (b). Here, since the segment size is 4 × 1 at level 1, there are four first quantization parameters (QpBs) when converted into a 4 × 4 segment. This enables finer quantization control in the vertical direction as compared with the first embodiment. Similarly, it is possible to make the size finer in the horizontal direction.

画質制御に関わるサブバンドデータの評価方法は、実施形態1と実質的には同様であるが、本実施形態では低周波成分として評価する対象を3LLではなくサブバンド分割工程で中間的に生成される1LL相当のサブバンドデータとする。処理の流れは図7に示したフローチャートと同様であるが、S701における判定対象は3LLではなく1LLの変換係数となる。 The evaluation method of the subband data related to the image quality control is substantially the same as that of the first embodiment, but in the present embodiment, the target to be evaluated as the low frequency component is generated intermediately in the subband division step instead of 3LL. Subband data equivalent to 1LL. The processing flow is the same as the flowchart shown in FIG. 7, but the determination target in S701 is not 3LL but a conversion coefficient of 1LL.

本実施形態では、例えばM=1の4×4のセグメントに換算した場合、画質制御の対象となるライン単位の量子化パラメータ数がレベル1からレベル3で異なるため、実施形態1のようにレベル1からレベル3まで第1の量子化パラメータQpBsを共通に使用できない。そこで、本実施形態では、レベル1における4つのQpBsから、各レベルのQpLv1~QpLv3を以下の式6に示す計算式に基づき生成し、これらを用いて各チャネル、各サブバンドに対応する個別の第2の量子化パラメータQpSbを生成する。
QpLv1[m]=QpBs[m]
QpLv2[n]=(QpBs[n×2]+QpBs[n×2+1])>>1 式6
QpLv3[n]=(QpBs[0]+QpBs[1]+QpBs[2]+QpBs[3])>>2
m :セグメント単位のレベル1のサブバンドに対するライン数(0~3)
n :セグメント単位のレベル2のサブバンドに対するライン数(0~1)
>>:右ビットシフト
In the present embodiment, for example, when converted into a 4 × 4 segment of M = 1, the number of quantization parameters for each line subject to image quality control differs from level 1 to level 3, so that the level is the same as in the first embodiment. The first quantization parameter QpBs from 1 to level 3 cannot be used in common. Therefore, in the present embodiment, QpLv1 to QpLv3 of each level are generated from the four QpBs at the level 1 based on the calculation formula shown in the following formula 6, and these are used to individually correspond to each channel and each subband. The second quantization parameter QpSb is generated.
QpLv1 [m] = QpBs [m]
QpLv2 [n] = (QpBs [n × 2] + QpBs [n × 2 + 1]) >> 1 Equation 6
QpLv3 [n] = (QpBs [0] + QpBs [1] + QpBs [2] + QpBs [3]) >> 2
m: Number of lines for level 1 subband in segment (0 to 3)
n: Number of lines for level 2 subbands in segment units (0 to 1)
>>: Right bit shift

尚、式6に示すようにレベル2及びレベル3の量子化パラメータを対応するQpBsの平均値により算出しているが、最大値や最小値のQpBsを選択するようにしても良い。また、QpLv3をQpLv2の平均値、最大値又は最小値として算出しても良い。最終的な量子化に用いる各チャネル、各サブバンドの第2の量子化パラメータ(QpSb)は、前述の式5におけるQpBsをQpLv1~QpLv3に置き換えて算出すれば良く、各量子化パラメータと量子化対象のサブバンドとの関係は、図12(c)に示すようになる。 As shown in Equation 6, the level 2 and level 3 quantization parameters are calculated by the average value of the corresponding QpBs, but the maximum value or the minimum value of QpBs may be selected. Further, QpLv3 may be calculated as an average value, a maximum value or a minimum value of QpLv2. The second quantization parameter (QpSb) of each channel and each subband used for the final quantization may be calculated by replacing QpBs in the above equation 5 with QpLv1 to QpLv3, and each quantization parameter and quantization may be performed. The relationship with the target subband is shown in FIG. 12 (c).

次に、図13を参照して、本実施形態における、記録される量子化パラメータのデータ量の削減度合いについて説明する。対比される従来例において、各レベルにつき1ライン単位に量子化パラメータを記録すると仮定すると、レベル3のサブバンドの量子化パラメータを1とした場合、レベル2はレベル3の2倍、レベル1はレベル3の4倍の量子化パラメータを記録することになる。よって、1セグメントについて記録することになる量子化パラメータのデータサイズは、(1×4サブバンド+2×3サブバンド+4×3サブバンド)×4チャネル分となり全体で88となる。一方、共通の量子化パラメータは、レベル1のサブバンド相当であるため4となり、記録対象とする量子化パラメータを共通の量子化パラメータとすることで量子化パラメータのサイズを22分の1に削減することできる。 Next, with reference to FIG. 13, the degree of reduction in the amount of recorded quantization parameter data in the present embodiment will be described. In the conventional example to be compared, assuming that the quantization parameter is recorded in units of one line for each level, when the quantization parameter of the subband of level 3 is 1, level 2 is twice level 3 and level 1 is. Quantization parameters that are four times higher than level 3 will be recorded. Therefore, the data size of the quantization parameter to be recorded for one segment is (1 × 4 subband + 2 × 3 subband + 4 × 3 subband) × 4 channels, which is 88 in total. On the other hand, the common quantization parameter is 4 because it corresponds to the level 1 subband, and the size of the quantization parameter is reduced to 1/22 by using the common quantization parameter as the recording target. Can be done.

このように、本実施形態のように垂直方向により細かい量子化制御を行なった場合であっても、従来例と比較して十分なデータ削減効果が期待できるものである。また、実施形態1と同様に、本実施形態でも柔軟な量子化制御を実現しつつ、共通の量子化パラメータを2次元データとして予測符号化を行うことで量子化パラメータのデータ量を大幅に削減し、高画質且つコンパクトにRAWデータを記録することが可能となる。 As described above, even when finer quantization control is performed in the vertical direction as in the present embodiment, a sufficient data reduction effect can be expected as compared with the conventional example. Further, as in the first embodiment, the present embodiment also realizes flexible quantization control, and the amount of data of the quantization parameter is significantly reduced by performing predictive coding using the common quantization parameter as two-dimensional data. However, it is possible to record RAW data with high image quality and compactness.

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

100:撮像装置、101:制御部、102:撮像部、103:RAWデータ符号化・復号部、104:メモリI/F部、105:メモリ、106:記録処理部、107:記録媒体 100: Imaging device, 101: Control unit, 102: Imaging unit, 103: RAW data coding / decoding unit, 104: Memory I / F unit, 105: Memory, 106: Recording processing unit, 107: Recording medium

Claims (20)

2以上の分解レベルの離散ウェーブレット変換を行い、RAWデータから複数のサブバンドデータを生成する生成手段と、
前記複数のサブバンドデータをそれぞれ同じ数の量子化単位に分割し、前記量子化単位ごとに個別に設定され、同一の量子化単位に含まれる複数のサブバンドデータに共通に割り当てられる共通量子化パラメータを生成し、前記共通量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための量子化パラメータを生成する量子化パラメータ生成手段と、
前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化する量子化手段と、
前記量子化により得られた量子化結果をサブバンド毎に符号化する符号化手段と、
を備えることを特徴とする画像符号化装置。
A generation means that performs discrete wavelet transform of two or more decomposition levels and generates multiple subband data from RAW data.
Common quantization in which the plurality of subband data is divided into the same number of quantization units, individually set for each quantization unit, and commonly assigned to a plurality of subband data included in the same quantization unit. A quantization parameter generation means for generating a parameter and generating a quantization parameter for quantizing each of the plurality of subband data based on the common quantization parameter.
A quantization means for quantizing each of the plurality of subband data based on the quantization parameters for quantizing the plurality of subband data, respectively.
A coding means for coding the quantization result obtained by the above-mentioned quantization for each subband,
An image coding apparatus comprising:
前記符号化手段は、前記共通量子化パラメータを符号化することを特徴とする請求項1に記載の画像符号化装置。 The image coding apparatus according to claim 1, wherein the coding means encodes the common quantization parameter. 前記符号化手段により符号化された前記複数のサブバンドデータと、前記共通量子化パラメータとを、所定のデータ構造で記録する記録処理手段を備えることを特徴とする請求項1または2に記載の画像符号化装置。 The invention according to claim 1 or 2, wherein the recording processing means for recording the plurality of subband data encoded by the coding means and the common quantization parameter in a predetermined data structure is provided. Image coding device. 前記量子化パラメータ生成手段は、量子化単位ごとに複数の共通量子化パラメータを生成し、前記複数の共通量子化パラメータから、量子化単位に含まれる複数のサブバンドデータをそれぞれ量子化するための量子化パラメータを生成する、
ことを特徴とする請求項1に記載の画像符号化装置。
The quantization parameter generation means generates a plurality of common quantization parameters for each quantization unit, and quantizes a plurality of subband data included in the quantization unit from the plurality of common quantization parameters. Generate quantization parameters,
The image coding apparatus according to claim 1.
前記量子化パラメータ生成手段は、
量子化単位ごとの複数の共通量子化パラメータとして、分解レベル1のサブバンドのレベル1の所定のラインごとに、レベル1共通量子化パラメータを生成し、
量子化単位ごとに、複数の前記レベル1共通量子化パラメータに基づいて、各分解レベルの所定のラインごとの各レベル共通量子化パラメータを生成し、
前記各レベル共通量子化パラメータと、複数のサブバンドごとに設定された係数とに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータを生成する、
ことを特徴とする請求項4に記載の画像符号化装置。
The quantization parameter generation means is
As a plurality of common quantization parameters for each quantization unit, a level 1 common quantization parameter is generated for each predetermined line of level 1 of the subband of decomposition level 1.
For each quantization unit, each level common quantization parameter for each predetermined line of each decomposition level is generated based on the plurality of the level 1 common quantization parameters.
Based on the common quantization parameter for each level and the coefficient set for each of the plurality of subbands, the quantization parameter for quantizing the plurality of subband data is generated.
The image coding apparatus according to claim 4.
前記所定のラインは、1ラインであることを特徴とする請求項5に記載の画像符号化装置。 The image coding apparatus according to claim 5, wherein the predetermined line is one line. 前記符号化手段により符号化された前記複数のサブバンドデータと、前記共通量子化パラメータであるレベル1共通量子化パラメータとを、所定のデータ構造で記録する記録処理手段を備えることを特徴とする請求項5または6に記載の画像符号化装置。 It is characterized by comprising a recording processing means for recording the plurality of subband data encoded by the coding means and the level 1 common quantization parameter which is the common quantization parameter in a predetermined data structure. The image coding apparatus according to claim 5 or 6. 前記符号化手段は、前記共通量子化パラメータであるレベル1共通量子化パラメータを符号化し、
前記記録処理手段は、前記符号化手段により符号化されたレベル1共通量子化パラメータを、前記符号化手段により符号化された前記複数のサブバンドデータと共に所定のデータ構造で記録することを特徴とする請求項7に記載の画像符号化装置。
The coding means encodes the level 1 common quantization parameter, which is the common quantization parameter.
The recording processing means is characterized in that a level 1 common quantization parameter encoded by the coding means is recorded in a predetermined data structure together with the plurality of subband data encoded by the coding means. The image coding apparatus according to claim 7.
前記量子化パラメータ生成手段は、
前記複数のサブバンドデータを前記所定のライン単位に量子化し符号化した場合の、目標符号量と符号化した結果の発生符号量との差分に基づいて決定された第3の量子化パラメータに基づいて、前記共通量子化パラメータを生成する
ことを特徴とする請求項5乃至8のいずれか1項に記載の画像符号化装置。
The quantization parameter generation means is
Based on the third quantization parameter determined based on the difference between the target code amount and the generated code amount as a result of coding when the plurality of subband data are quantized and coded in the predetermined line unit. The image coding apparatus according to any one of claims 5 to 8, wherein the common quantization parameter is generated.
前記量子化パラメータ生成手段は、前記第3の量子化パラメータを、前記量子化単位ごとの画質特性に応じて修正することにより前記共通量子化パラメータを生成することを特徴とする請求項9に記載の画像符号化装置。 The ninth aspect of claim 9, wherein the quantization parameter generation means generates the common quantization parameter by modifying the third quantization parameter according to the image quality characteristics of each quantization unit. Image encoder. 前記量子化パラメータ生成手段は、前記第3の量子化パラメータを、レベル1のサブバンドデータの前記量子化単位の前記所定のラインごとの画質特性に応じて修正することにより、前記共通量子化パラメータを生成することを特徴とする請求項10に記載の画像符号化装置。 The quantization parameter generation means modifies the third quantization parameter according to the image quality characteristics of each predetermined line of the quantization unit of the level 1 subband data, thereby modifying the common quantization parameter. The image coding apparatus according to claim 10, wherein the image coding apparatus is generated. 前記量子化パラメータ生成手段は、
低周波成分の振幅が小さいことを示す画質特性の場合に、前記第3の量子化パラメータを減少させて前記共通量子化パラメータを生成し、
高周波成分の振幅が大きいことを示す画質特性の場合に、前記第3の量子化パラメータを増大させて前記共通量子化パラメータを生成する
ことを特徴とする請求項9乃至11のいずれか1項に記載の画像符号化装置。
The quantization parameter generation means is
In the case of the image quality characteristic indicating that the amplitude of the low frequency component is small, the third quantization parameter is reduced to generate the common quantization parameter.
The invention according to any one of claims 9 to 11, wherein the common quantization parameter is generated by increasing the third quantization parameter in the case of the image quality characteristic indicating that the amplitude of the high frequency component is large. The image encoding device of the description.
前記係数は、前記RAWデータについて設定される圧縮率に応じて設定されることを特徴とする請求項5に記載の画像符号化装置。 The image coding apparatus according to claim 5, wherein the coefficient is set according to a compression rate set for the RAW data. 前記係数は、複数の量子化単位の共通量子化パラメータに対して共通に割り当てられることを特徴とする請求項5に記載の画像符号化装置。 The image coding apparatus according to claim 5, wherein the coefficient is commonly assigned to a common quantization parameter of a plurality of quantization units. 前記複数のサブバンドごとに設定された係数は、高周波成分のサブバンドほど、量子化パラメータが大きくなる係数が設定されていることを特徴とする請求項5に記載の画像符号化装置。 The image coding apparatus according to claim 5, wherein the coefficient set for each of the plurality of subbands is set to a coefficient in which the quantization parameter becomes larger as the subband of the high frequency component becomes larger. 前記記録処理手段は、前記係数を前記複数のサブバンドデータと共に前記所定のデータ構造で記録することを特徴とする請求項8に記載の画像符号化装置。 The image coding apparatus according to claim 8, wherein the recording processing means records the coefficient together with the plurality of subband data in the predetermined data structure. 前記生成手段は、前記RAWデータを変換して得られる複数のチャネルのそれぞれについて前記複数のサブバンドデータを生成し、
前記共通量子化パラメータは、前記量子化単位の前記複数のチャネルのそれぞれの前記複数のサブバンドデータについて共通に割り当てられる
ことを特徴とする請求項1乃至16のいずれか1項に記載の画像符号化装置。
The generation means generates the plurality of subband data for each of the plurality of channels obtained by converting the RAW data.
The image code according to any one of claims 1 to 16, wherein the common quantization parameter is commonly assigned to the plurality of subband data of each of the plurality of channels of the quantization unit. Quantization device.
前記生成手段は、前記RAWデータを変換して得られる複数のチャネルのそれぞれについて前記複数のサブバンドデータを生成し、
前記共通量子化パラメータは、前記量子化単位の前記複数のチャネルのそれぞれの前記複数のサブバンドデータについて共通に割り当てられ、
前記係数は、前記複数のサブバンドおよび前記複数のチャネルごとに設定される、
ことを特徴とする請求項5に記載の画像符号化装置。
The generation means generates the plurality of subband data for each of the plurality of channels obtained by converting the RAW data.
The common quantization parameter is commonly assigned to the plurality of subband data of each of the plurality of channels of the quantization unit.
The coefficients are set for each of the plurality of subbands and the plurality of channels.
The image coding apparatus according to claim 5.
2以上の分解レベルの離散ウェーブレット変換を行い、RAWデータから複数のサブバンドデータを生成する工程と、
前記複数のサブバンドデータをそれぞれ同じ数の量子化単位に分割し、前記量子化単位ごとに個別に設定され、同一の量子化単位に含まれる複数のサブバンドデータに共通に割り当てられる共通量子化パラメータを生成する工程と、
前記共通量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための量子化パラメータを生成する工程と、
前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化する工程と、
前記量子化により得られた量子化結果をサブバンド毎に符号化する工程と、
を含む、画像符号化方法。
A process of generating multiple subband data from RAW data by performing discrete wavelet transforms with two or more decomposition levels,
Common quantization in which the plurality of subband data is divided into the same number of quantization units, individually set for each quantization unit, and commonly assigned to a plurality of subband data included in the same quantization unit. The process of generating parameters and
A step of generating a quantization parameter for quantizing each of the plurality of subband data based on the common quantization parameter, and a step of generating the quantization parameter.
A step of quantizing each of the plurality of subband data based on the quantization parameter for quantizing the plurality of subband data, respectively.
The step of encoding the quantization result obtained by the above-mentioned quantization for each subband,
Image encoding methods, including.
コンピュータを請求項1から18のいずれか1項に記載の画像符号化装置の各手段として動作させるためのプログラム。 A program for operating a computer as each means of the image coding apparatus according to any one of claims 1 to 18.
JP2021194694A 2017-06-19 2021-11-30 Image encoding device, image encoding method, program Active JP7321237B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021194694A JP7321237B2 (en) 2017-06-19 2021-11-30 Image encoding device, image encoding method, program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017119887A JP6986868B2 (en) 2017-06-19 2017-06-19 Image coding device, image decoding device, image coding method, image decoding method, program
JP2021194694A JP7321237B2 (en) 2017-06-19 2021-11-30 Image encoding device, image encoding method, program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2017119887A Division JP6986868B2 (en) 2017-06-19 2017-06-19 Image coding device, image decoding device, image coding method, image decoding method, program

Publications (2)

Publication Number Publication Date
JP2022043080A true JP2022043080A (en) 2022-03-15
JP7321237B2 JP7321237B2 (en) 2023-08-04

Family

ID=87474516

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021194694A Active JP7321237B2 (en) 2017-06-19 2021-11-30 Image encoding device, image encoding method, program

Country Status (1)

Country Link
JP (1) JP7321237B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001326936A (en) * 2000-03-10 2001-11-22 Sony Corp Image encoding device and method
JP2017085545A (en) * 2015-10-27 2017-05-18 キヤノン株式会社 Image processing apparatus and control method of the same, and computer program
JP2017085247A (en) * 2015-10-23 2017-05-18 キヤノン株式会社 Encoding method, encoding device, imaging apparatus and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001326936A (en) * 2000-03-10 2001-11-22 Sony Corp Image encoding device and method
JP2017085247A (en) * 2015-10-23 2017-05-18 キヤノン株式会社 Encoding method, encoding device, imaging apparatus and program
JP2017085545A (en) * 2015-10-27 2017-05-18 キヤノン株式会社 Image processing apparatus and control method of the same, and computer program

Also Published As

Publication number Publication date
JP7321237B2 (en) 2023-08-04

Similar Documents

Publication Publication Date Title
JP6722995B2 (en) Encoding method, encoding device, imaging device, and program
JP6986868B2 (en) Image coding device, image decoding device, image coding method, image decoding method, program
JP2006014121A (en) Image encoding method, image encoding apparatus, and imaging apparatus
US20210136394A1 (en) Encoding apparatus and encoding method, and decoding apparatus and decoding method
JP6857973B2 (en) Image coding device and its control method
JP6857970B2 (en) Image coding device and its control method
JP7033013B2 (en) Image coding device, image decoding device, their control method, and program
JP7001383B2 (en) Coding device, coding method, and program
JP7129326B2 (en) IMAGING DEVICE, CONTROL METHOD AND PROGRAM THEREOF
JP7321237B2 (en) Image encoding device, image encoding method, program
JP6465570B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6849359B2 (en) Coding device, coding device control method, and program
JP6465571B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP7016660B2 (en) Coding device, its control method, and control program, and image pickup device.
JP6806466B2 (en) Image coding device and its control method
JP6813991B2 (en) Image coding device and its control method and program
JP6775339B2 (en) Image coding device and its control method
JP6875817B2 (en) Image processing equipment, imaging equipment, image processing methods and programs
JP2021182700A (en) Encoding device and method, program and storage medium
JP2001231009A (en) Image data storage device ad method
JP2017098898A (en) Image encoding device, control method of the same, program, and storage medium
JP6812214B2 (en) Image coding device, image coding method, and program
JP2023070055A (en) Image encoding device, control method thereof, and program
JP2021069059A (en) Image processing device and image processing method
JP4136680B2 (en) Imaging apparatus, imaging method, computer program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230327

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230725

R151 Written notification of patent or utility model registration

Ref document number: 7321237

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151