Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7321237B2 - Image encoding device, image encoding method, program - Google Patents
[go: Go Back, main page]

JP7321237B2 - Image encoding device, image encoding method, program - Google Patents

Image encoding device, image encoding method, program Download PDF

Info

Publication number
JP7321237B2
JP7321237B2 JP2021194694A JP2021194694A JP7321237B2 JP 7321237 B2 JP7321237 B2 JP 7321237B2 JP 2021194694 A JP2021194694 A JP 2021194694A JP 2021194694 A JP2021194694 A JP 2021194694A JP 7321237 B2 JP7321237 B2 JP 7321237B2
Authority
JP
Japan
Prior art keywords
quantization
quantization parameter
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.)
Active
Application number
JP2021194694A
Other languages
Japanese (ja)
Other versions
JP2022043080A (en
Inventor
成記 望月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

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

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

RAWデータの記録形式には、非圧縮又は可逆圧縮形式を採用する場合が多く、一般に記録されるRAWデータのサイズは、現像後の圧縮画像データよりも大きくなる。その一方、撮像素子の高密度化、高画素化に伴い、RAWデータをコンパクトに記録することが重要となってきている。そこで、視覚的に無損失な非可逆圧縮形式として、RAWデータから複数のカラーチャネルを生成し、各チャネルに対して2次元離散ウェーブレット変換を行い、生成された各サブバンドを個別に量子化して圧縮して符号化データとして記録する方法等が提案されている(特許文献1を参照)。 A non-compressed or reversible compression format is often used as the recording format of RAW data, and the size of recorded RAW data is generally larger than that of compressed image data after development. On the other hand, as the density and number of pixels of image pickup devices increase, it is becoming important to record RAW data in a compact manner. Therefore, as a visually lossless lossy compression format, multiple color channels are generated from the RAW data, a two-dimensional discrete wavelet transform is performed on 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号公報Japanese Patent Publication No. 2002-516540

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

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

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

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

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

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

[実施形態1]
以下、発明の実施形態を説明する。図1(a)は、発明の実施形態に対応する撮像装置100を示す。撮像装置100は、例えばデジタルカメラ、デジタルビデオカメラとして実現することができる。また、それ以外に、例えばパーソナルコンピュータ、携帯電話、スマートフォン、PDA、タブレット端末、携帯型メディアプレーヤなどの任意の情報処理端末或いは画像処理装置として実現することもできる。なお、図1(a)は、撮像装置であるデジタルカメラ等として機能する場合を考慮して撮像部102を含む構成を示した。しかし、発明の実施形態として、RAW画像を圧縮し、記録、再生することが可能な画像符号化装置・画像復号装置、画像記録装置、画像圧縮装置、画像復元装置等として、撮像部102を有しない構成で実現してもよい。
[Embodiment 1]
Embodiments of the invention will be described below. FIG. 1(a) shows an imaging device 100 corresponding to an embodiment of the invention. The imaging device 100 can be implemented 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, mobile phone, smart phone, PDA, tablet terminal, portable media player, or the like. Note that FIG. 1A shows a configuration including an imaging unit 102 in consideration of a case where it functions as an imaging device such as a digital camera. However, as an embodiment of the invention, the imaging unit 102 is provided as an image encoding device/image decoding device, an image recording device, an image compression device, an image restoration device, etc. that can compress, record, and reproduce 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 imaging device 100 , the control unit 101 controls each processing unit that configures the imaging device 100 . The imaging unit 102 includes a lens optical system capable of optical zoom including an optical lens, an aperture, a focus control and a lens driving unit, and a CCD image sensor or CMOS image sensor that converts optical information from the lens optical system into an electric signal. Includes an image sensor. The imaging unit 102 outputs RAW data obtained by converting an electrical signal obtained by the imaging device into a digital signal to the RAW data encoding/decoding unit 103 .

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

RAWデータ符号化・復号部103は、撮像部102が取得したRAWデータを符号化し、生成した符号化データをメモリ105へ書き込みを行う。また、符号化されていないRAWデータを記録媒体107から取得して、本実施形態に対応する符号化処理を実行して符号化データを生成してもよい。また、RAWデータ符号化・復号部103は、符号化データを復号してRAWデータを復元することができる。RAWデータ符号化・復号部103に関わる詳細な構成や動作については後述する。 A RAW data encoding/decoding unit 103 encodes the RAW data acquired by the imaging unit 102 and writes the generated encoded data to the memory 105 . Alternatively, unencoded RAW data may be acquired from the recording medium 107 and encoded data may be generated by executing encoding processing corresponding to the present embodiment. Also, the RAW data encoding/decoding unit 103 can decode the encoded data to restore the RAW data. A detailed configuration and operation of the RAW data encoding/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 memory access requests from each processing unit and controls reading or writing to the memory 105 . The memory 105 is a storage area configured by, for example, a volatile memory for storing various data output from each processing unit that configures the imaging apparatus 100 . The recording processing unit 106 reads the encoded data stored in the memory 105 , converts it into a predetermined recording format, and records it on the recording medium 107 . The recording medium 107 is a recording medium composed of, for example, a non-volatile memory, and is detachably attached to the imaging apparatus 100 . An imaging apparatus is configured by the above-described processing units.

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

図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つのチャネルへ変換することができる。 2A, the RAW data encoding unit 103E mainly includes a channel transform unit 201, a frequency transform unit 202, a quantization parameter generation unit 203, a quantization unit 204, an encoding unit 205, and a quantization parameter encoding unit 206. consists of The channel conversion unit 201 converts the input Bayer array RAW data as shown in FIG. 3 into a plurality of channels. For the frequency conversion unit 202 and the quantization unit 204, blocks corresponding to the number of channels obtained by conversion are prepared and processed in parallel. In this embodiment, the channel conversion unit 201 converts the RAW data into four channels for each of R, G1, G2, and B in the Bayer array, and further converts R, G1, G2, and B using the following conversion formula: 1 can be converted into four channels C0 to 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]
Also, 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つのチャネルへ変換しても良く、チャネル数や変換方法は上記以外の方法であっても良い。 Here, as shown in FIG. 3(a), an example of the configuration for conversion into four channels is shown, but as shown in FIGS. 3(b) and 3(c), R, G1 and G2 are combined. It may be converted into three channels for each of G and B, and the number of channels and conversion method may be other methods than the above.

次に、周波数変換部202は、チャネル単位に所定の分解レベル(以降、単に「レベル」または「lev」と呼ぶ)で離散ウェーブレット変換による周波数変換処理を行い、生成された複数のサブバンドデータ(変換係数)を量子化パラメータ生成部203及び量子化部204へ出力する。 Next, frequency transform section 202 performs frequency transform processing by discrete wavelet transform at a predetermined decomposition level (hereinafter simply referred to as “level” or “lev”) for each channel, and generates a plurality of subband data ( transform coefficients) to the quantization parameter generation section 203 and the quantization section 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. 4(a) shows a filter bank configuration for realizing the discrete wavelet transform related to subband division processing with lev=1. As a result of executing the discrete wavelet transform processing in the horizontal and vertical directions, It is first split into one low frequency sub-band (LL) and three high frequency sub-bands (HL, LH, HH) as shown in b). 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.
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で構成しているが、これとは異なるタップ数及び異なる係数のフィルタ構成であっても良い。 Also, "↓2" represents 2:1 downsampling. Therefore, one downsampling is performed in the horizontal direction and one in the vertical direction, so that the size of the subbands is 1/4 of the original size. If lev is greater than 1, subband division is performed hierarchically for the low-frequency subband (LL), e.g., if lev=3, then 10 subbands as shown in FIG. Subband data corresponding to the subband is generated. Here, the discrete wavelet transform is composed of 5-tap lpf and 3-tap hpf as shown in the above equations 2 and 3, but a filter configuration with a different number of taps and different coefficients may be used. .

量子化パラメータ生成部203は、周波数変換部202により生成されたサブバンドデータ(変換係数)に対して量子化処理を行うための全チャネル、全サブバンドに共通の第1の量子化パラメータを生成し、量子化パラメータ符号化部206へ出力する。また、第1の量子化パラメータから各チャネル、各サブバンドのための個別の第2の量子化パラメータを生成し、量子化部204へ供給する。第1の量子化パラメータ及び第2の量子化パラメータの生成単位やその生成方法については、図5から図7等を参照して後述する。 Quantization parameter generation section 203 generates a first quantization parameter common to all channels and all subbands for performing quantization processing on subband data (transform coefficients) generated by frequency transformation section 202. and output to quantization parameter coding section 206 . Also, a second quantization parameter for each channel and each subband is generated from the first quantization parameter and supplied to the quantization section 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 quantization processing on the subband data (transform coefficients) input from the frequency transform unit 202 based on the second quantization parameter supplied from the quantization parameter generation unit 203, and performs quantization. As a result, quantized subband data (transform coefficients) are output to encoding section 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 differential entropy coding on the quantized subband data (transform coefficients) input from the quantization unit 204 in raster scan order for each subband. As a result, the subband data after quantization is encoded in units of subbands. Here, as shown in FIG. 4D, a predicted value pd is generated by MED (Median Edge Detector) prediction from peripheral data of the data to be encoded (transform coefficient), and the value xd of the data to be encoded x and the predicted value The difference data from pd is entropy coded by 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 leading data in the raster scan order of each subband, the value xd of the encoding target data x is encoded as it is. Then, difference data is encoded for subsequent encoding target data. Note that the predictive coding method and the entropy coding method may be other methods. In addition, the amount of code generated for each line for each subband is supplied to the quantization parameter generating section 203 . A specific data structure of the encoded data generated here will be described later with reference to FIGS. 9 and 10. FIG.

量子化パラメータ符号化部206は、量子化パラメータ生成部203から入力された第1の量子化パラメータを符号化する処理部である。量子化パラメータ符号化部206は、符号化部205と共通の符号化方式により量子化パラメータを符号化し、生成した符号化済みの量子化パラメータをメモリ105へ格納する。図2(a)では量子化パラメータ符号化部206を符号化部205とは独立に設ける場合を示したが、両者は共通の符号化方式を採用するので、量子化パラメータ符号化部206の機能を符号化部205で共通化するように構成することも可能である。RAWデータ符号化部103Eは以上のように構成される。 The quantization parameter encoding unit 206 is a processing unit that encodes the first quantization parameter input from the quantization parameter generation unit 203 . Quantization parameter encoding section 206 encodes the quantization parameter by the same encoding method as encoding section 205 and stores the generated encoded quantization parameter in memory 105 . FIG. 2(a) shows the case where the quantization parameter encoding unit 206 is provided independently of the encoding unit 205, but since both employ a common encoding method, the function of the quantization parameter encoding unit 206 is can be shared by the encoding unit 205 . The RAW data encoding 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. RAW data decoding section 103D mainly includes decoding section 211, quantization parameter decoding section 212, quantization parameter generation section 213, inverse quantization section 214, frequency inverse transform section 215, and channel inverse transform section 216.

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

量子化パラメータ復号部212は、メモリ105から入力された符号化データに含まれる、符号化された第1の量子化パラメータを復号部211と共通の復号方式により復号し、第1の量子化パラメータを復元する。また、量子化パラメータ復号部212は、チャネル、サブバンド単位の第2の量子化パラメータを算出するための所定の係数(後述する式5のα、β)も復号する。復号結果は量子化パラメータ生成部213に出力する。量子化パラメータ生成部213は、量子化パラメータ復号部212から提供された第1の量子化パラメータと、所定の係数とからチャネル、サブバンド単位の第2の量子化パラメータを生成し、逆量子化部214に提供する。 Quantization parameter decoding section 212 decodes the coded first quantization parameter included in the coded data input from memory 105 by a decoding method common to decoding section 211, and obtains the first quantization parameter to restore. Quantization parameter decoding section 212 also decodes predetermined coefficients (α and β in Equation 5 described later) for calculating the second quantization parameter for each channel and subband. The decoding result is output to quantization parameter generation section 213 . Quantization parameter generation section 213 generates a second quantization parameter for each channel and subband from the first quantization parameter provided from quantization parameter decoding section 212 and a predetermined coefficient, and performs inverse quantization. 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は以上のように構成される。 Inverse quantization section 214 inversely quantizes the quantized subband data in channel units output from decoding section 211 using the second quantization parameter provided from quantization parameter generation section 213, Restore band data. The frequency inverse transform unit 215 performs frequency inverse transform processing by discrete wavelet inverse transform, and restores channels from subband data (transform coefficients) of a predetermined division level. The channel inverse transform unit 216 inverse transforms the input channel data to restore the original RAW data. For example, when the channel conversion unit 201 of the RAW data encoding unit 103E converts R, G1, G2, and B in the Bayer array into four channels C0 to C3 according to Equation 1, inverse conversion processing corresponding to Equation 1 RAW data of R, G1, G2, and B are restored from four channels C0 to C3 according to . The RAW data decoding unit 103D is configured as described above.

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

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

図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 quantization parameter related to code amount control when each channel is divided into subbands with lev=3. Level 2 subbands (2HL, 2LH, 2HH) for 1×N (N is an integer) lines in the vertical direction of level 3 subbands (3LL, 3HL, 3LH, 3HH) of four channels from C0 to C3 2×N lines in the vertical direction and 4×N lines in the vertical direction of the level 1 subbands (1HL, 1LH, 1HH) are grouped together into one processing unit (first processing unit). do. As shown in FIG. 5, the first processing unit is set as a region (band) obtained by vertically dividing each sub-band into predetermined lines. In particular, FIG. 5 shows the case of N=1.

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

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 size

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

このようにして、バンドごとに第3の量子化パラメータ(QpBr)を生成した後、量子化パラメータ生成部203はバンドを更に細分化(セグメント化)し、第2の処理単位であるセグメントごとのサブバンドデータの画質評価結果に応じて第3の量子化パラメータ(QpBr)を調整して第1の量子化パラメータ(QpBs)を生成する。これにより、RAWデータの特性に応じて量子化の強弱を調整する画質制御に関わる量子化パラメータ生成を行うことができる。 After generating the third quantization parameter (QpBr) for each band in this way, the quantization parameter generation unit 203 further subdivides (segments) the band into segments, which are second processing units. A first quantization parameter (QpBs) is generated by adjusting the third quantization parameter (QpBr) according to the image quality evaluation result of the subband data. Thereby, it is possible to generate a quantization parameter related to image quality control that adjusts the intensity 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 subband data related to image quality control when each channel is divided into subbands at lev=3. In each segment, the level 3 subbands (3LL, 3HL, 3LH, 3HH) of all channels are horizontally and vertically (1×M)×(1×N) (M and N are integers), respectively, and level 2 (2×M)×(2×N) in the horizontal and vertical directions of subbands (2HL, 2LH, 2HH) of level 1, and (4 xM) x (4 x N).

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

セグメントごとの画質評価ついては、各セグメントに含まれるサブバンドデータのうち、例えば3LLのサブバンドデータを低周波成分として評価し、1HL,1LH,1HHのサブバンドデータにより高周波成分を評価する。このとき、低周波成分の振幅が小さい程量子化を細かく、高周波成分の振幅が大きい程量子化を粗く制御するように符号量制御により、第3の量子化パラメータ(QpBr)に対してゲイン、オフセット調整を行うようにフィードフォワード制御すれば良い。 As for the image quality evaluation for each segment, among the subband data included in each segment, for example, the 3LL subband data is evaluated as the low frequency component, and the 1HL, 1LH, and 1HH subband data are used to evaluate the high frequency component. At this time, the code amount control is performed so that 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. Feedforward 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 adjustment processing of the third quantization parameter (QpBr) based on image quality evaluation, executed by the quantization parameter generation unit 203 . The processing corresponding to the flowchart can be realized, for example, by one or more processors functioning as the quantization parameter generation unit 203 executing corresponding programs (stored in ROM or the like).

S701において、量子化パラメータ生成部203は低周波成分について判定を行う。3LLの変換係数と、判定用に設定された閾値Th1とを比較し、3LLの変換係数が閾値以下の大きさであれば(S701で「YES」)、処理はS702に進む。S702において、量子化パラメータ生成部203は処理対象のセグメントが属するバンドに対して設定された第3の量子化パラメータQpBrの値を減少させる。例えば、QpBrに対して1未満の係数を掛けるか、あるいはQpBrから所定値を減算する。 In S701, the quantization parameter generation unit 203 determines low frequency components. The 3LL transform coefficient is compared with the threshold Th1 set for determination, and if the 3LL transform coefficient is equal to or less than the threshold ("YES" in S701), the process proceeds to S702. In S702, the quantization parameter generation unit 203 decreases 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 factor 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に所定値を加算する。 If it is determined in S701 that the conversion coefficient of 3LL is greater than the threshold Th1 ("NO" in S701), the process proceeds to S703. In S703, the quantization parameter generation unit 203 determines high frequency components. 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 Th2 ("YES" in S703), the process proceeds to S705. At S704, the value of QpBr is maintained. At S705, the value of QpBr is increased. For example, QpBr is multiplied by a factor 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 set as the first quantization parameter QpBs of the segment. When quantization control related to image quality control is not performed, QpBr may be set to QpBs as it is.

以上により生成された全チャネル、全サブバンドに共通の第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 in the above manner is, for example, when M=1 and N=1, 8×8 pixels of each channel as shown in FIG. Quantization control for each block of RAW data corresponding to 16×16 pixels of the original RAW data is possible.

次に、第1の量子化パラメータQpBsを用いて各チャネル、各サブバンドのための個別の第2の量子化パラメータQpSbを生成する処理について説明する。本実施形態では上述のように、セグメント毎に1つの第1の量子化パラメータQpBsが生成されるが、各チャネルの各セグメントの量子化はQpBsをそのまま用いるのではなく、チャネル、セグメントに個別に対応した第2の量子化パラメータQpSbをQpBsから生成して量子化処理を行う。以下、QpSbの生成処理について説明する。 Next, the process of using the first quantization parameter QpBs to generate a separate second quantization parameter QpSb for each channel, each subband will be described. In the present 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 separately A corresponding second quantization parameter QpSb is generated from QpBs and quantization processing is performed. The QpSb generation process will be described below.

式5は、QpSb生成のための計算式である。
QpSb[i][j]=QpBs×α[i][j]+β[i][j] 式5
QpSb:各チャネル、各サブバンド個別の第2の量子化パラメータ
QpBs:全チャネル、全サブバンド共通の第1の量子化パラメータ
α:傾き
β:切片
i:チャネルインデックス(0~3)
j:サブバンドインデックス(0~9)
Formula 5 is a calculation formula for QpSb generation.
QpSb[i][j]=QpBs×α[i][j]+β[i][j] Equation 5
QpSb: second quantization parameter for each channel, each subband separately
QpBs: First quantization parameter common to all channels and all subbands α: slope β: intercept
i: channel index (0-3)
j: subband index (0 to 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 determined in advance. The value of α increases with the relationship C0>C1=C2>C3 for channels C0 to C3, and the larger the value of α, the larger the value of QpSb. For each subband, the values of α and β are decreased in order to decrease the quantization parameter values for the subbands closer to the low frequency components, and the quantization parameter values are increased for the subbands closer to the high frequency components. Increase the values of α and β.

また、α[i][j]、β[i][j]の各値は予め設定されるものであるが、設定される圧縮率に応じて複数の組み合わせが用意されても良い。例えば、圧縮率が高い場合にはQpSbの値が大きすぎると情報が消失してしまうので、QpSbが大きくなりすぎないようにα、βの値を小さめに調整することができる。 Also, each value of α[i][j] and β[i][j] is set in advance, but 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. Therefore, the values of α and β can be adjusted to be smaller so that 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 weighting factors α, β for each channel, each subband to generate the second quantization parameter QpSb, so that for each channel, each subband: It becomes possible to flexibly control the quantization. The quantization section 204 quantizes the transform coefficients obtained from the frequency transform section 202 using the second quantization parameter QpSb for each channel and each subband generated based on Equation 5.

また、RAWデータ復号部103における第2の量子化パラメータQpSbの生成方法も、上述の式5に従って行うことができる。その際、第1の量子化パラメータQpSrとα、βの各値は、量子化パラメータ復号部212から提供される。 The method of generating the second quantization parameter QpSb in RAW data decoding section 103 can also be performed according to Equation 5 above. At that time, the first quantization parameter QpSr and the values of α and β are provided from 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 encoding/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. , are recorded as encoded data. FIG. 9(a) shows an example of a data structure for recording encoded data. As shown in FIG. 9(a), the encoded data has a hierarchical structure, starting with "main_header" indicating information related to the entire encoded data, and dividing the RAW data into tiles into a plurality of pixel blocks for encoding. Data can be stored in units of tiles by 'tile_header' and 'tile_data' on the assumption that the data will be converted into a tile. In the above description, a case has been described in which RAW data is directly encoded in units of channel and subband data, but the present invention can be applied not only to tiles but also to units of predetermined sets in RAW data. That is, when the RAW data is divided into tiles and the tiles are encoded in units of channel and subband data, the same processing as described above may be performed for each tile obtained by dividing the RAW data into a plurality of pieces. . In this case, the subband data of each channel and the first quantization parameter QpBs are coded for each tile and included in the coded data. If tile division is not performed, there will be only one "tile_header" and one "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" contains the following elements: First, "qp_header" indicating information related to the encoded first quantization parameter QpBs and "coded_qp_data" which is the encoded first quantization parameter itself are arranged. The following "coded_raw_data" is arranged in units of channels, and the coded data for each channel is stored in order of "channel_header" indicating information related to each channel and "channel_data" which is the main data for each channel. be done. "channel_data" is composed of a set of coded data for each sub-band, and "sb_header" indicating information related to each sub-band and "sb_data" as coded data for each sub-band are sub-bands. They are arranged in band index order. The subband index is as shown in FIG. 9(b).

続いて、各ヘッダ情報のシンタクス要素について図10に基づき説明を行う。「main_header」は以下の要素で構成される。「coded_data_size」は符号化データ全体のデータ量を示す。「width」はRAWデータの幅を示す。「height」はRAWデータの高さを示す。「depth」はRAWデータのビット深度を示す。「channel」はRAWデータの符号化時のチャネル数を示す。「type」はチャネル変換のタイプを示す。「lev」は各チャネルのサブバンドレベルを示す。 Next, the syntax elements of each header information will be explained based on FIG. "main_header" consists of the following elements. "coded_data_size" indicates the data size of the entire encoded data. "width" indicates the width of RAW data. "height" indicates the height of the RAW data. "depth" indicates the bit depth of RAW data. "channel" indicates the number of channels when encoding RAW data. "type" indicates the type of channel transform. "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 a tile index for identifying a tile division position. "tile_data_size" indicates the amount of data included 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 data size of the encoded first quantization parameter. “qp_width” indicates the width of the first quantization parameter, that is, the number of horizontal first quantization parameters corresponding to RAW data. "qp_height" indicates the height of the first quantization parameter, that is, the first quantization parameter number 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 a channel index for identifying a channel. "channel_data_size" indicates the data amount of 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 coded data amount of the sub-band. 'sb_qp_a' denotes the α value shown in Equation 5 for generating the quantization parameter for each subband. 'sb_qp_b' denotes the β value shown in Equation 5 for generating the quantization parameter for each subband.

以上の実施形態に対応する発明によれば、各チャネル、各サブバンドの量子化パラメータを全て記録するのではなく、全チャネル、全サブバンドの共通の量子化パラメータを記録し、当該共通量子化パラメータから各チャネル、各サブバンドの量子化パラメータを生成可能にする。これにより、以下に述べるような量子化パラメータのデータ量抑制の効果を達成することができる。 According to the invention corresponding to the above embodiments, instead of recording all quantization parameters for each channel and each subband, common quantization parameters for 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. This makes it possible to achieve the effect of reducing the data amount of the quantization parameter as described below.

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

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

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

[実施形態2]
以下、発明の第2の実施形態について説明する。本実施形態の撮像装置は、実施形態1の撮像装置と同様の構成とすることができる。但し、RAWデータ符号化・復号部103の量子化パラメータ生成部203における第1の量子化パラメータの生成単位と、各チャネル、各サブバンド個別の第2の量子化パラメータを生成するプロセスとが異なる。実施形態1と共通の構成の説明は本実施形態では省略するものとし、主に量子化パラメータ生成方法の相違に係る構成について説明する。
[Embodiment 2]
A second embodiment of the invention will be described below. The imaging device of this embodiment can have the same configuration as that of the imaging 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 encoding/decoding unit 103 and the process of generating the second quantization parameter for each channel and each subband are different. . The description of the configuration common to the first embodiment will be omitted in this 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. 12(a) shows units for evaluating subband data and updating quantization parameters related to image quality control when each channel is divided into subbands at lev=3. For (3LL, 3HL, 3LH, 3HH) horizontal and vertical directions (1×M)×1 line (M is an integer), level 2 sub-bands (2HL, 2LH, 2HH) horizontal and vertical directions , and horizontal and vertical subband data of level 1 subbands (1HL, 1LH, 1HH) and horizontal and vertical subband data of (4.times.M).times.1 line 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, the segment size is 1/4 in the vertical direction at level 1 in FIG. 12A. 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 to 4×4 segments. This enables finer quantization control in the vertical direction than in the first embodiment. It should be noted that it is also possible to make finer in the horizontal direction as well.

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

本実施形態では、例えば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 to 4×4 segments with M=1, the number of quantization parameters for each line to be subjected to image quality control differs from level 1 to level 3. From level 1 to level 3, the first quantization parameter QpBs cannot be used in common. Therefore, in this embodiment, from the four QpBs at level 1, QpLv1 to QpLv3 of each level are generated based on the calculation formula shown in Equation 6 below, and using these, individual channels corresponding to each channel and each subband Generate a second quantization parameter QpSb.
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 (0 to 3) for level 1 subbands in segment units
n : Number of lines (0 to 1) for level 2 subbands in segment units
>>: right bit shift

尚、式6に示すようにレベル2及びレベル3の量子化パラメータを対応するQpBsの平均値により算出しているが、最大値や最小値のQpBsを選択するようにしても良い。また、QpLv3をQpLv2の平均値、最大値又は最小値として算出しても良い。最終的な量子化に用いる各チャネル、各サブバンドの第2の量子化パラメータ(QpSb)は、前述の式5におけるQpBsをQpLv1~QpLv3に置き換えて算出すれば良く、各量子化パラメータと量子化対象のサブバンドとの関係は、図12(c)に示すようになる。 As shown in Equation 6, the quantization parameters of level 2 and level 3 are calculated from the average value of the corresponding QpBs, but the maximum or minimum value of QpBs may be selected. Also, QpLv3 may be calculated as the average value, maximum value, or minimum value of QpLv2. The second quantization parameter (QpSb) of each channel and each subband used for final quantization can be calculated by replacing QpBs in Equation 5 with QpLv1 to QpLv3. The relationship with the target subband is as 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 this embodiment will be described. In the comparative conventional example, assuming that the quantization parameter is recorded in units of one line for each level, if the quantization parameter of the subband of level 3 is 1, level 2 is twice that of level 3, and level 1 is twice as much as level 3. Four times the quantization parameter of level 3 will be recorded. Therefore, the data size of the quantization parameters to be recorded for one segment is (1×4 subbands+2×3 subbands+4×3 subbands)×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 by using the common quantization parameter as the quantization parameter to be recorded, the size of the quantization parameter is reduced to 1/22. can do

このように、本実施形態のように垂直方向により細かい量子化制御を行なった場合であっても、従来例と比較して十分なデータ削減効果が期待できるものである。また、実施形態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. As in the first embodiment, this embodiment also achieves flexible quantization control while performing predictive coding using a common quantization parameter as two-dimensional data, thereby significantly reducing the data amount of the quantization parameter. RAW data can be recorded compactly with high image quality.

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

Claims (19)

2以上の分解レベルの離散ウェーブレット変換を行い、RAWデータから複数のサブバンドデータを生成する生成手段と、
前記複数のサブバンドデータをそれぞれ同じ数の量子化単位に分割し、前記量子化単位ごとに個別に設定され、同一の量子化単位に含まれる複数のサブバンドデータに共通に割り当てられる共通量子化パラメータを生成し、前記共通量子化パラメータと前記複数のサブバンドデータのそれぞれに設定される係数とに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための量子化パラメータを生成する量子化パラメータ生成手段と、
前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化する量子化手段と、
前記量子化により得られた量子化結果をサブバンド毎に符号化する符号化手段と、
を備えることを特徴とする画像符号化装置。
generating means for performing a discrete wavelet transform with two or more decomposition levels to generate a plurality of subband data from raw data;
common quantization that divides the plurality of subband data into the same number of quantization units, individually sets each quantization unit, and commonly assigns the plurality of subband data included in the same quantization unit quantization for generating parameters, and generating quantization parameters for quantizing each of the plurality of subband data based on the common quantization parameter and coefficients set for each of the plurality of subband data; parameter generation means;
quantization means for quantizing each of the plurality of sub-band data based on the quantization parameter for quantizing each of the plurality of sub-band data;
encoding means for encoding the quantization result obtained by the quantization for each subband;
An image encoding device comprising:
前記符号化手段は、前記共通量子化パラメータを符号化することを特徴とする請求項1に記載の画像符号化装置。 2. The image encoding apparatus according to claim 1, wherein said encoding means encodes said common quantization parameter. 前記符号化手段により符号化された前記複数のサブバンドデータと、前記共通量子化パラメータとを、所定のデータ構造で記録する記録処理手段を備えることを特徴とする請求項1または2に記載の画像符号化装置。 3. The apparatus according to claim 1, further comprising recording processing means for recording said plurality of subband data encoded by said encoding means and said common quantization parameter in a predetermined data structure. 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 the quantization parameters,
2. The image coding apparatus according to claim 1, characterized by:
前記量子化パラメータ生成手段は、
量子化単位ごとの複数の共通量子化パラメータとして、分解レベル1のサブバンドのレベル1の所定のラインごとに、レベル1共通量子化パラメータを生成し、
量子化単位ごとに、複数の前記レベル1共通量子化パラメータに基づいて、各分解レベルの所定のラインごとの各レベル共通量子化パラメータを生成し、
前記各レベル共通量子化パラメータと、複数のサブバンドごとに設定された係数とに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータを生成する、
ことを特徴とする請求項4に記載の画像符号化装置。
The quantization parameter generation means is
generating a level 1 common quantization parameter for each predetermined line of level 1 of subbands of decomposition level 1 as a plurality of common quantization parameters for each quantization unit;
generating each level common quantization parameter for each predetermined line of each decomposition level based on the plurality of level 1 common quantization parameters for each quantization unit;
generating the quantization parameter for quantizing each of the plurality of subband data based on the common quantization parameter for each level and a coefficient set for each of the plurality of subbands;
5. The image coding apparatus according to claim 4, characterized by:
前記所定のラインは、1ラインであることを特徴とする請求項5に記載の画像符号化装置。 6. The image coding apparatus according to claim 5, wherein said predetermined line is one line. 前記符号化手段により符号化された前記複数のサブバンドデータと、前記共通量子化パラメータであるレベル1共通量子化パラメータとを、所定のデータ構造で記録する記録処理手段を備えることを特徴とする請求項5または6に記載の画像符号化装置。 A recording processing means for recording the plurality of subband data encoded by the encoding means and the level 1 common quantization parameter, which is the common quantization parameter, in a predetermined data structure. 7. The image encoding device according to claim 5 or 6. 前記符号化手段は、前記共通量子化パラメータであるレベル1共通量子化パラメータを符号化し、
前記記録処理手段は、前記符号化手段により符号化されたレベル1共通量子化パラメータを、前記符号化手段により符号化された前記複数のサブバンドデータと共に所定のデータ構造で記録することを特徴とする請求項7に記載の画像符号化装置。
The encoding means encodes the level 1 common quantization parameter, which is the common quantization parameter,
The recording processing means records the level 1 common quantization parameter encoded by the encoding means in a predetermined data structure together with the plurality of subband data encoded by the encoding means. 8. The image encoding device according to claim 7.
前記量子化パラメータ生成手段は、
前記複数のサブバンドデータを前記所定のライン単位に量子化し符号化した場合の、目標符号量と符号化した結果の発生符号量との差分に基づいて決定された第3の量子化パラメータを、前記量子化単位ごとの周波数成分の振幅の大きさに関する画質特性に基づき増減させることにより、前記共通量子化パラメータを生成することを特徴とする請求項5乃至8のいずれか1項に記載の画像符号化装置。
The quantization parameter generation means is
a third quantization parameter determined based on a difference between a target code amount and a generated code amount as a result of encoding when the plurality of subband data are quantized and encoded in units of the predetermined line , 9. The image according to any one of claims 5 to 8, wherein the common quantization parameter is generated by increasing or decreasing the amplitude of the frequency component for each quantization unit based on the image quality characteristics. Encoding device.
前記量子化パラメータ生成手段は、前記第3の量子化パラメータを、レベル1のサブバンドデータの前記量子化単位の前記所定のラインごとの前記画質特性に応じて修正することにより、前記共通量子化パラメータを生成することを特徴とする請求項に記載の画像符号化装置。 The quantization parameter generating means corrects the third quantization parameter according to the image quality characteristic for each of the predetermined lines of the quantization unit of level 1 subband data, thereby performing the common quantization. 10. The image encoding device according to claim 9 , wherein parameters are generated. 前記量子化パラメータ生成手段は、
低周波成分の振幅が小さいことを示す画質特性の場合に、前記第3の量子化パラメータを減少させて前記共通量子化パラメータを生成し、
高周波成分の振幅が大きいことを示す画質特性の場合に、前記第3の量子化パラメータを増大させて前記共通量子化パラメータを生成する
ことを特徴とする請求項9または10に記載の画像符号化装置。
The quantization parameter generation means is
reducing the third quantization parameter to generate the common quantization parameter when the image quality characteristic indicates that the amplitude of the low-frequency component is small;
11. The image coding according to claim 9, wherein in the case of image quality characteristics indicating that the amplitude of high frequency components is large, the third quantization parameter is increased to generate the common quantization parameter. Device.
前記係数は、前記RAWデータについて設定される圧縮率に応じて設定されることを特徴とする請求項5に記載の画像符号化装置。 6. The image encoding apparatus according to claim 5, wherein said coefficient is set according to a compression rate set for said RAW data. 前記係数は、複数の量子化単位の共通量子化パラメータに対して共通に割り当てられることを特徴とする請求項5に記載の画像符号化装置。 6. The image coding apparatus according to claim 5, wherein the coefficient is commonly assigned to a common quantization parameter for a plurality of quantization units. 前記複数のサブバンドごとに設定された係数は、高周波成分のサブバンドほど、量子化パラメータが大きくなる係数が設定されていることを特徴とする請求項5に記載の画像符号化装置。 6. The image coding apparatus according to claim 5, wherein the coefficients set for each of the plurality of subbands are such that the higher the frequency component of the subband, the larger the quantization parameter. 前記記録処理手段は、前記係数を前記複数のサブバンドデータと共に前記所定のデータ構造で記録することを特徴とする請求項8に記載の画像符号化装置。 9. The image encoding apparatus according to claim 8, wherein said recording processing means records said coefficients together with said plurality of subband data in said predetermined data structure. 前記生成手段は、前記RAWデータを変換して得られる複数のチャネルのそれぞれについて前記複数のサブバンドデータを生成し、
前記共通量子化パラメータは、前記量子化単位の前記複数のチャネルのそれぞれの前記複数のサブバンドデータについて共通に割り当てられる
ことを特徴とする請求項1乃至15のいずれか1項に記載の画像符号化装置。
the generating means generates the plurality of subband data for each of a plurality of channels obtained by converting the RAW data;
16. The image code according to any one of claims 1 to 15 , 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. conversion device.
前記生成手段は、前記RAWデータを変換して得られる複数のチャネルのそれぞれについて前記複数のサブバンドデータを生成し、
前記共通量子化パラメータは、前記量子化単位の前記複数のチャネルのそれぞれの前記複数のサブバンドデータについて共通に割り当てられ、
前記係数は、前記複数のサブバンドおよび前記複数のチャネルごとに設定される、
ことを特徴とする請求項5に記載の画像符号化装置。
the generating means generates the plurality of subband data for each of a plurality of channels obtained by converting the RAW data;
the common quantization parameter is assigned in common to each of the plurality of subband data of the plurality of channels of the quantization unit;
the coefficient is set for each of the plurality of subbands and the plurality of channels;
6. The image coding apparatus according to claim 5, characterized by:
2以上の分解レベルの離散ウェーブレット変換を行い、RAWデータから複数のサブバンドデータを生成する工程と、
前記複数のサブバンドデータをそれぞれ同じ数の量子化単位に分割し、前記量子化単位ごとに個別に設定され、同一の量子化単位に含まれる複数のサブバンドデータに共通に割り当てられる共通量子化パラメータを生成する工程と、
前記共通量子化パラメータと前記複数のサブバンドデータのそれぞれに設定される係数とに基づいて、前記複数のサブバンドデータをそれぞれ量子化するための量子化パラメータを生成する工程と、
前記複数のサブバンドデータをそれぞれ量子化するための前記量子化パラメータに基づいて、前記複数のサブバンドデータをそれぞれ量子化する工程と、
前記量子化により得られた量子化結果をサブバンド毎に符号化する工程と、
を含む、画像符号化方法。
performing a discrete wavelet transform with two or more levels of decomposition to generate a plurality of subband data from the raw data;
common quantization that divides the plurality of subband data into the same number of quantization units, individually sets each quantization unit, and commonly assigns the plurality of subband data included in the same quantization unit generating parameters;
generating a quantization parameter for quantizing each of the plurality of subband data based on the common quantization parameter and a coefficient set for each of the plurality of subband data;
quantizing each of the plurality of sub-band data based on the quantization parameter for quantizing each of the plurality of sub-band data;
encoding the quantization result obtained by the quantization for each subband;
An image encoding method, comprising:
コンピュータを請求項1から17のいずれか1項に記載の画像符号化装置の各手段として動作させるためのプログラム。 A program for operating a computer as each means of the image encoding device according to any one of claims 1 to 17 .
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 JP2022043080A (en) 2022-03-15
JP7321237B2 true 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 coding apparatus 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, control method therefor, and computer 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 coding apparatus 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, control method therefor, and computer program

Also Published As

Publication number Publication date
JP2022043080A (en) 2022-03-15

Similar Documents

Publication Publication Date Title
JP6986868B2 (en) Image coding device, image decoding device, image coding method, image decoding method, program
JP2017085247A (en) Encoding method, encoding device, imaging apparatus and program
US10032252B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and non-transitory computer readable storage medium
JP2021103875A (en) Image encoder and image decoder and method for controlling these, and program, and imaging apparatus
JP6857973B2 (en) Image coding device and its control method
JP7129326B2 (en) IMAGING DEVICE, CONTROL METHOD AND PROGRAM THEREOF
JP7001383B2 (en) Coding device, coding method, and program
JP7033013B2 (en) Image coding device, image decoding device, their control method, and program
JP6857970B2 (en) Image coding device and its control method
JP6849359B2 (en) Coding device, coding device control method, and program
JP6875817B2 (en) Image processing equipment, imaging equipment, image processing methods and programs
JP2017216625A (en) Image encoding device and its control method
JP7321237B2 (en) Image encoding device, image encoding method, program
JP6792370B2 (en) Image processing equipment, its control method, and computer programs
JP7016660B2 (en) Coding device, its control method, and control program, and image pickup device.
JP6775339B2 (en) Image coding device and its control method
JP6465570B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2021184575A (en) Imaging device and its control method and program
JP6813991B2 (en) Image coding device and its control method and program
JP2021182700A (en) Encoding device and method, program and storage medium
JP6916618B2 (en) Image coding device and its control method and program
JP6564314B2 (en) Image encoding apparatus, control method thereof, program, and storage medium
JP7469865B2 (en) Image processing device and image processing method
JP7589023B2 (en) Encoding device and method, imaging device, program, and storage medium
JP7465073B2 (en) Image encoding device, control method and program thereof

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