JP2017098753A - Encoding apparatus, imaging apparatus, encoding apparatus control method, program, and storage medium - Google Patents
Encoding apparatus, imaging apparatus, encoding apparatus control method, program, and storage medium Download PDFInfo
- Publication number
- JP2017098753A JP2017098753A JP2015229037A JP2015229037A JP2017098753A JP 2017098753 A JP2017098753 A JP 2017098753A JP 2015229037 A JP2015229037 A JP 2015229037A JP 2015229037 A JP2015229037 A JP 2015229037A JP 2017098753 A JP2017098753 A JP 2017098753A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- line
- quantization
- step size
- divided
- 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.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、符号化装置、撮像装置、符号化装置の制御方法、プログラム及び記憶媒体に関する。 The present invention relates to an encoding apparatus, an imaging apparatus, an encoding apparatus control method, a program, and a storage medium.
動画像は連続する複数のフレームから構成されており、例えばH.264やJPEG2000等の技術を用いて圧縮符号化し、記録されている。圧縮符号化及び復号化技術は、映像信号の格納に必要な記憶容量や伝送に必要な帯域を減少させることができるため、マルチメディア産業には極めて重要な技術である。近年は水平画素数3840画素以上、秒間60フレーム以上など、符号化対象となる動画像の高解像度化、高フレームレート化がますます進んでおり圧縮符号化に非常に高い演算性能が要求されている。 A moving image is composed of a plurality of continuous frames. H.264, JPEG2000, and other techniques are used for compression encoding and recording. Compression encoding and decoding techniques are extremely important for the multimedia industry because they can reduce the storage capacity required for storing video signals and the bandwidth required for transmission. In recent years, higher resolution and higher frame rate of moving images to be encoded such as 3840 pixels or more and 60 frames or more per second are required, and very high calculation performance is required for compression encoding. Yes.
このような動画像を実時間で圧縮符号化するために、1フレームを空間的に分割し、圧縮符号化処理を並列化する手法が知られている。しかしながら、画像を分割してそれぞれを圧縮符号化処理した場合、分割画像間で量子化ステップサイズが異なってしまうため、分割境界上に歪が発生し圧縮効率を低下させてしまう。 In order to perform compression encoding of such a moving image in real time, a method of spatially dividing one frame and parallelizing compression encoding processing is known. However, when an image is divided and each of them is compression-encoded, the quantization step size differs between the divided images, so that distortion occurs on the division boundary and the compression efficiency is lowered.
例えば、ライン毎に量子化ステップサイズを設定する場合を挙げる。画像を分割しない場合は上のラインの量子化ステップサイズを参照することで、ライン間の量子化ステップサイズに大きな差が生じないように量子化ステップサイズを設定することができる。しかし、画面を分割し、各分割画像を並列に符号化処理した場合、分割境界を跨いで量子化ステップサイズを参照することはできないため、分割境界を跨いだライン間で量子化ステップサイズに差異が生じてしまう。結果として、分割境界線上に歪が発生することで画質が劣化してしまう。 For example, a case where a quantization step size is set for each line is given. If the image is not divided, the quantization step size can be set by referring to the quantization step size of the upper line so as not to cause a large difference in the quantization step size between the lines. However, if the screen is divided and each divided image is encoded in parallel, the quantization step size cannot be referred across the division boundary, so there is a difference in the quantization step size between the lines across the division boundary. Will occur. As a result, image quality deteriorates due to distortion occurring on the dividing boundary line.
これに対し、分割処理による圧縮効率の低下を抑えるための並列化方法が提案されている(特許文献1を参照)。 On the other hand, a parallelization method for suppressing a decrease in compression efficiency due to division processing has been proposed (see Patent Document 1).
特許文献1は、画像を分割し、各分割画像用の符号化器で圧縮符号化する方法を開示する。当該方法では、各符号化器は、自身の処理する分割画像と隣接する分割画像を処理する符号化器から、分割境界付近の量子化ステップサイズ等の符号化情報を取得して、分割境界付近の符号化条件を近づける。これにより、分割境界上の歪を軽減しようとするものである。 Patent Document 1 discloses a method of dividing an image and compressing and coding with an encoder for each divided image. In this method, each encoder acquires encoding information such as a quantization step size near the division boundary from the encoder that processes the divided image adjacent to the divided image to be processed, and the vicinity of the division boundary. The encoding condition is made closer. This is intended to reduce distortion on the division boundary.
しかし、特許文献1の方法では、分割境界付近の符号化情報を取得するために、隣接する分割画像を処理する符号化器が分割境界付近の領域の処理を終了するまで待つ必要がある。例えば、上下に分割した画像について分割境界付近の情報を符号化器間で交換する場合、下に位置する分割画像の処理を開始するためには、上に位置する分割画像の圧縮符号化処理の終了を待機しなければならない。そして、その待機期間の間は、圧縮符号化処理を実行することができない。よって、特許文献1の方法では、分割境界付近の情報を取得するまでの待機時間が生じ、実時間当たりの処理性能が低下してしまう。 However, in the method of Patent Document 1, in order to acquire coding information in the vicinity of the division boundary, it is necessary to wait until the encoder that processes the adjacent divided images finishes the processing in the region near the division boundary. For example, when information near the division boundary is exchanged between the encoders for the vertically divided image, in order to start the processing of the divided image positioned below, the compression encoding processing of the divided image positioned above is performed. Must wait for termination. During the standby period, the compression encoding process cannot be executed. Therefore, in the method of Patent Literature 1, a waiting time until information near the division boundary is acquired is generated, and processing performance per real time is deteriorated.
そこで本発明では、複数の符号化器のそれぞれが、対応する分割画像を独立して圧縮符号化する場合に、分割境界付近の符号化条件を近づけるための新たな手法を提案し、実時間当たりの処理性能を落とすことなく分割画像間の歪を軽減することを可能とする。 Therefore, in the present invention, when each of the plurality of encoders independently compresses and encodes the corresponding divided image, a new method for bringing the encoding condition near the division boundary closer is proposed. It is possible to reduce distortion between divided images without degrading the processing performance.
上記課題を解決するための本発明は、符号化装置であって、
時間的に連続する複数のフレームを空間的に隣接する第1の領域と第2の領域を含む複数の領域に分割する分割手段であって、前記第1の領域を構成する分割画像の複数のラインのうちの最終ラインと、前記第2の領域を構成する分割画像の複数のラインのうちの先頭ラインとが分割境界を構成するように各フレームを複数の分割画像に分割する分割手段と、
前記複数の分割画像をそれぞれ独立して符号化する複数の符号化手段を含む並列符号化手段と、
前記複数の分割画像の前記複数の符号化手段への入力を制御する切替手段であって、第1の領域を構成する分割画像の入力の後に、当該分割画像に対応するフレームの次のフレームの第2の領域を構成する分割画像が入力されるように制御する切替手段とを備え、
前記複数の符号化手段は、それぞれ、
入力された分割画像に対応するデータについて、前のラインの符号化結果に応じて量子化ステップサイズを設定し、設定された量子化ステップサイズを使用してライン毎に量子化する量子化手段と、
量子化されたデータを符号化する符号化手段と
を備え、
前記量子化手段は、前記第2の領域を構成する分割画像の先頭ラインのデータを量子化する際には、当該分割画像に対応するフレームの前のフレームの前記第1の領域の分割画像の最終ラインの符号化結果に応じて、量子化ステップサイズを設定することを特徴とする。
The present invention for solving the above problems is an encoding device,
Dividing means for dividing a plurality of temporally continuous frames into a plurality of regions including a first region and a second region that are spatially adjacent to each other, and a plurality of divided images constituting the first region A dividing unit that divides each frame into a plurality of divided images so that a final line of the lines and a leading line of a plurality of lines of the divided images that form the second region form a dividing boundary;
Parallel encoding means including a plurality of encoding means for independently encoding the plurality of divided images;
A switching unit that controls input of the plurality of divided images to the plurality of encoding units, and after the input of the divided images constituting the first region, Switching means for controlling so that the divided images constituting the second region are input,
Each of the plurality of encoding means is
Quantization means for setting the quantization step size according to the encoding result of the previous line for the data corresponding to the input divided image, and performing quantization for each line using the set quantization step size; ,
Encoding means for encoding the quantized data,
When the quantization means quantizes the data of the first line of the divided image constituting the second area, the quantization means includes the divided image of the first area of the frame preceding the frame corresponding to the divided image. The quantization step size is set according to the encoding result of the final line.
本発明によれば、複数の符号化器のそれぞれが対応する分割画像を独立して圧縮符号化する符号化方法において、分割境界付近の符号化条件を近づけるための新たな手法により実時間当たりの処理性能を落とすことなく分割画像間の歪を軽減することが可能となる。 According to the present invention, in an encoding method in which each of a plurality of encoders independently compress-encodes a corresponding divided image, a new method for bringing the encoding condition near the division boundary closer to the real time. It becomes possible to reduce the distortion between the divided images without degrading the processing performance.
以下、発明の実施形態を添付の図面を参照して詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[実施形態1]
以下、発明の第1の実施形態に対応する符号化装置の構成及び動作について説明する。図1は、発明の実施形態1に係る符号化装置100の構成の一例を示すブロック図である。本実施形態では、当該符号化装置100としてデジタルカメラを想定した場合を説明する。デジタルカメラは、図2(a)に示すR、G1、G2、Bベイヤー配列の画像データをそのまま圧縮する。但し、発明の実施形態はこれに限らず、例えばRGB画像、YUV画像或いはグレースケール画像を圧縮符号化の対象としても良い。
[Embodiment 1]
The configuration and operation of the encoding apparatus corresponding to the first embodiment of the invention will be described below. FIG. 1 is a block diagram showing an example of a configuration of an
また、符号化装置100は、デジタルビデオカメラ以外に、例えばパーソナルコンピュータ、携帯電話、スマートフォン、PDA、タブレット端末、デジタルスチルカメラなどの、動画撮影機能を有する任意の情報処理装置或いは撮像装置とすることができる。なお、図1は、デジタルビデオカメラ等として機能する場合を考慮して撮像部103を含む構成を示した。しかし、発明の実施形態として、撮影済みの動画像を処理するための画像処理装置として、撮像部103を有しない構成で実現してもよい。図1の符号化装置100において、撮像素子のような物理的デバイスを除き、各ブロックは専用ロジック回路やメモリを用いてハードウェア的に構成されてもよい。或いは、メモリに記憶されている処理プログラムをCPU等のコンピュータが実行することにより、ソフトウェア的に構成されてもよい。
In addition to the digital video camera, the
本実施形態における符号化装置100は、被写体の撮影指示をユーザから受け付けるための操作部101を備える。操作部101はシャッタースイッチのような押しボタンとして構成されても良いし、あるいは、所定の操作用インタフェースを表示するタッチパネルとして構成されても良い。制御部102は、内部バス114を介して各構成要素と接続され、操作部101から送られた撮影開始を指示する信号に応じて、符号化装置100の全体的動作を制御する。制御部102は、例えばCPUと当該CPUが実行する制御プログラムを格納するメモリとして構成されてもよい。その場合、CPUは操作部101からの信号に応じて、メモリから制御プログラムを読みだし符号化装置100を制御する。また、制御部102は、本実施形態に対応する処理に応じてプログラミングされた専用ロジック回路として構成されてもよい。
The
撮影開始指示を受け付けた後、制御部102は、撮像部103の動作を制御して被写体の撮像画像を取得する。撮像部103は、例えば撮像レンズと、図2(a)に示すベイヤー配列のカラーフィルターを有するイメージセンサとを有するように構成され、被写体の光学像が撮像レンズによってイメージセンサに結像された後、結像された光学像からRAW画像データに変換される。尚、イメージセンサはCMOSやCCDで構成される。
After receiving the imaging start instruction, the
撮像部103が生成したRAW画像データは信号処理部104に送られ、RAW画像データに対して修復処理が実施される。修復処理には、撮像部103のイメージセンサにおける欠落画素や信頼性の低い画素の値に対し周辺画素値を用いて修復対象の画素を補間したり、所定のオフセット値を減算したりする処理が含まれる。信号処理部104は、修復処理したRAW画像データをシーンチェンジ検出部105及び色分離部106に出力する。
The RAW image data generated by the
シーンチェンジ検出部105は信号処理部104から受信したRAW画像データを基に、シーンチェンジを検出し、後述する並列符号化部109にシーンチェンジ情報を供給する。本実施形態におけるシーンチェンジ検出方法は特別に限定されるものではなく、公知の任意の方法を適用することができる。例えば、フレーム毎に積算値あるいは分散値を求めておき、直前フレームと現フレームとの積算値あるいは分散値の変化或いは差分が所定の値以上に大きい場合をシーンチェンジとみなす方法を一例として利用することができる。
The scene
色分離部106は、信号処理部104から供給されたRAW画像データを図2(b)に示すようにR、G1、G2、Bの画素毎に独立したプレーン画像データ(以下、単に「プレーン画像」という)に分離する。これ以降の説明では、複数のプレーン画像のうちの1つのみを取り上げて記述するが、発明の実施形態に対応する符号化装置100は、同様の処理を各プレーン画像に対して実行するように構成されている。色分離部106によって分離・生成された各色のプレーン画像は画像分割部107によって図2(c)に示すように上下の2つの領域に2分割される。本実施形態では、上下に2分割した分割画像のうち、上側の領域の分割画像を分割画像0、下側の領域の分割画像を分割画像を分割画像1と呼ぶ。
The
画像分割部107で画像を分割した後、分割画像は入力切替部108を介して並列符号化部109に供給される。入力切替部108は、分割画像0及び分割画像1の供給先を、並列符号化部109を構成する符号化部0と符号化部1との間でフレーム毎に交互に切り替える。ここで図3を参照して、入力切替部108による分割画像の送信先の切り替えについて説明する。撮影フレームに対して、フレーム0、フレーム1、フレーム2、とインデックスを付けた場合、入力切替部108はインデックスが偶数であるか、奇数であるかによって分割画像0、分割画像1をそれぞれ符号化部0、符号化部1のいずれに送るかを切り替える。例えば、偶数インデックスのフレームを符号化する場合は、分割画像0を符号化部0に、分割画像1を符号化部1に送り、奇数インデックスのフレームを符号化する場合は、分割画像0を符号化部1に、分割画像1を符号化部0に送るように入力切替部108は動作することができる。1つの符号化部に着目すると、分割画像0、分割画像1、分割画像0、分割画像1というように、入力される分割画像の各フレームにおける空間的位置が巡回的に切り替わる。
After the
図4(a)は、並列符号化部109が有する各符号化部の構成の一例を示す図である。符号化部0及び符号化部1は図4(a)に示す構成を有し、それぞれに送られた分割画像を圧縮符号化する。ここで、符号化部0、符号化部1は互いに独立して圧縮符号化を実行する。符号化部0及び符号化部1は、入力切替部108から供給された分割画像に対し離散ウェーブレット変換部401において離散ウェーブレット変換を実行して周波数分離を行い、各分割画像につきウェーブレット係数からなる複数のサブバンド画像を生成する。
FIG. 4A is a diagram illustrating an example of the configuration of each encoding unit included in the
図4(b)は、離散ウェーブレット変換部401により生成されたウェーブレット係数T1HH〜T3LLの配列の一例を示す。ここでは3回の帯域分割を行って、分解レベル1から分解レベル3までのサブバンド画像が生成される場合を示している。離散ウェーブレット変換部401にて変換された分解レベル1〜3のウェーブレット係数T1HH〜T3LLは、サブバンド画像として量子化部402に入力される。以降の並列符号化部109内の符号化部0及び符号化部1を構成する各ブロックの説明は、複数のサブバンド画像のうちの1つのサブバンド画像を採り上げて説明するが、本実施形態に対応する並列符号化部109では各サブバンド画像に同様の処理を行う。また、本実施形態では量子化対象の係数を生成するための変換処理として離散ウェーブレット変換を行う場合について説明するが、当該変換処理の代わりに他の所定の変換処理を実行しても良い。その場合も、処理結果として得られる変換係数が量子化部402に供給され量子化処理が実行される。
FIG. 4B shows an example of an array of wavelet coefficients T1HH to T3LL generated by the discrete
量子化部402は、離散ウェーブレット変換部401から供給されたサブバンド画像に、量子化制御部403によって設定された量子化パラメータ、つまり、量子化ステップサイズを用いて量子化処理を施す。本実施形態ではサブバンド画像を構成する係数のライン毎に量子化ステップサイズを設定する。量子化制御部403は係数のライン単位に量子化ステップサイズを設定する。また、量子化制御部403は、処理対象のフレームの分割画像0の最終ラインで用いた量子化ステップサイズを記憶し、次フレームの分割画像1の先頭ラインの量子化ステップサイズとして用いる。また、量子化制御部403は、処理対象のフレームの同一分割画像の前のラインで用いた量子化ステップサイズと前のラインの発生符号量とを記憶し、処理対象のラインの量子化ステップサイズを、当該前のラインの発生符号量と、目標符号量とに基づき決定する。当該処理については図6を参照して後述する。
The
更に量子化制御部403には、シーンチェンジ検出部105におけるシーンチェンジの判定結果を示すシーンチェンジ情報が入力される。当該シーンチェンジ情報がシーンチェンジ検出を示す場合、分割画像1の先頭ラインの量子化ステップサイズとして、直前フレームの分割画像0の最終ラインで用いた量子化ステップサイズでは無く、統計値などにより予め定めた量子化ステップサイズを用いる。同様にして、符号化対象の時間的に連続する複数のフレームのうち先頭フレームの分割画像1が入力された場合も、量子化制御部403は予め定めた量子化ステップサイズを先頭ラインのために用いる。先頭フレームに含まれる分割画像の全て先頭ラインには予め定めた量子化ステップサイズが設定されることになる。量子化部402によって量子化された係数のラインは、エントロピー符号化部404に送られて圧縮符号化される。エントロピー符号化部404が用いる圧縮符号化方式には、例えばDPCMやハフマン符号等が含まれる。エントロピー符号化部404において生成された符号化データの発生符号量は量子化制御部403に通知される。
Furthermore, scene change information indicating a scene change determination result in the scene
次に、符号化ストリーム生成部110は並列符号化部109で生成された全プレーン画像、全サブバンド画像の符号をまとめ、符号化条件などを示すヘッダを付加し、復号可能なストリームを生成する。また、符号化ストリーム生成部110は全サブバンド、全プレーン分の符号が揃うまでは一時記憶部111に並列符号化部109から送られた符号を退避する。一時記憶部111は例えばDRAMやSRAMなどで構成することができる。符号化ストリーム生成部110は全サブバンド、全プレーン分の符号が揃った時点で一時記憶部111に退避した符号を読み出してストリームを生成する。符号化ストリーム生成部110によって生成されたストリームはメモリI/O部112を介して記憶媒体113に書きこまれる。記憶媒体113は磁気ディスク及び半導体メモリなどで構成することができる。
Next, the encoded
次に、並列符号化部109を構成する符号化部0、符号化部1における圧縮符号化処理の詳細を図5に示すフローチャートに基づき説明する。該フローチャートに対応する処理は、例えば、並列符号化部109として機能する1以上のプロセッサが対応するプログラムを実行することにより実現できる。
Next, details of compression encoding processing in the encoding unit 0 and the encoding unit 1 constituting the
S501において、離散ウェーブレット変換部401が、分割画像に対し離散ウェーブレット変換を実行して周波数分離を行い複数のサブバンド画像を生成する。S502では、シーンチェンジ検出部105からのシーンチェンジ情報の内容に従い、量子化制御部403がシーンチェンジが検出されたか否かを判定する。シーンチェンジが検出された場合(S502で「YES」)、S503に移行して、所定の量子化ステップサイズを、処理対象の分割画像の先頭ラインの量子化ステップサイズに設定する。一方、シーンチェンジが検出されていない場合(S502で「NO」)、S504に移行し、量子化制御部403は処理対象画像が分割画像0であるか否かを判定する。処理対象画像が分割画像0である場合(S504で「YES」)、S503に移行して、量子化制御部403は所定の量子化ステップサイズを分割画像0の先頭ラインの量子化ステップサイズに設定する。分割画像0は先頭ラインが分割境界を構成しないため、先頭ラインに対して予め定められた量子化ステップサイズを設定する。
In step S501, the discrete
一方、処理対象画像が分割画像1である場合(S504で「NO」)、S505に移行して、量子化制御部403は当該処理対象の分割画像が先頭フレームに属するか否かを判定する。もし、先頭フレームの分割画像1であった場合(S505で「YES」)、S503に移行して、量子化制御部403は所定の量子化ステップサイズを分割画像1の先頭ラインの量子化ステップサイズに設定する。一方、先頭フレームに属しない分割画像1であった場合(S505で「NO」)、S506に移行する。S506では、量子化制御部403は、同一符号化部において直前に処理したフレームの分割画像0の最終ラインの量子化ステップサイズを先頭ラインの量子化ステップサイズに設定する。
On the other hand, when the processing target image is the divided image 1 (“NO” in S504), the process proceeds to S505, and the
この様子を図4(b)に示す。直前のフレームN−1に属する分割画像0は、現フレームNの分割画像1を処理する符号化部と同一の符号化部において処理される。同符号化部の量子化制御部403は、分割画像0の最終ラインの量子化ステップサイズを保持しておく。量子化制御部403は、現フレームNに属する分割画像1の先頭ラインの量子化ステップサイズを設定する場合に、保持している直前に処理した分割画像0の最終ラインの量子化ステップサイズを設定する。
This is shown in FIG. The divided image 0 belonging to the immediately preceding frame N-1 is processed in the same encoding unit as the encoding unit that processes the divided image 1 of the current frame N. The
S503またはS506において先頭ラインの量子化ステップサイズが設定されると、S507に移行して、量子化部402が設定された量子化ステップサイズを用いて、処理対象の分割画像の1ラインを量子化する。続くS508では、エントロピー符号化部404が量子化されたラインを圧縮符号化する。続くS509において、エントロピー符号化部404は符号化結果を符号化ストリーム生成部110に出力する。また、発生符号量の情報を量子化制御部403に通知する。
When the quantization step size of the first line is set in S503 or S506, the process proceeds to S507, and the
その後、量子化制御部403はS510にて処理対象の分割画像の最終ラインを処理したか否かを判定し、最終ラインまで処理が完了していない場合(S510で「NO」)、S511に移行する。S511において、量子化制御部403は次のラインの量子化ステップサイズを設定し、S507に戻って処理を繰り返す。S511における処理の一例は図6を参照して後述する。最終ラインを処理した場合(S510で「YES」)、量子化制御部403は処理対象画像が分割画像1であったか否かを判定する。分割画像1であった場合(S512で「YES」)は、そのまま符号化処理を終了する。一方、処理対象画像が分割画像1ではなく分割画像0であった場合(S512で「NO」)、S513に移行し、量子化制御部403は最終ラインの量子化ステップサイズを記憶し、符号化処理を終了する。
After that, the
図6は、図5のS511における量子化制御部403の量子化ステップサイズの設定処理の一例を示すフローチャートである。S601において、量子化制御部403は、S508の1ライン分の符号化により発生した符号量を積算発生符号量(S)に加算する。なお、積算発生符号量(S)は、分割画像単位に初期化されている。次にS602において、量子化制御部403はライン毎の目標符号量を積算目標符号量(T)に加算する。積算目標符号量(T)も分割画像単位に初期化されている。ここで、ライン毎の目標符号量は、例えば、分割画像の目標符号量を分割画像のライン数で割った値として計算することができる。また、分割画像の目標符号量は、例えば、分割画像の解像度と、分割画像の係数ビットの精度と圧縮比との積として計算することができる。
FIG. 6 is a flowchart illustrating an example of the quantization step size setting process of the
続くS603では、上記ステップで算出した積算発生符号量(S)と積算目標符号量(T)とを比較し、S=Tの場合(S603で「YES」)、S604に移行する。このとき、量子化制御部403は、直前のラインについて設定した前回の量子化ステップサイズと同じ値を設定する。一方、S≠Tの場合(S603で「NO」)、S605に移行する。S605においてS>Tと判定された場合(S605で「YES」)、発生符号量を減らすためにS606において前回よりも大きい量子化ステップサイズを設定する。一方、S605においてS<Tと判定された場合(S605で「NO」)、発生符号量を増やすためにS607において前回よりも小さい量子化ステップサイズを設定する。その後、図5のS507に戻る。量子化ステップサイズを変更する場合は、例えば予め定められた複数段の量子化ステップサイズにおいて1段分だけ大きくするか、あるいは、小さくするかにより変更することができる。
In subsequent S603, the accumulated generated code amount (S) calculated in the above step is compared with the accumulated target code amount (T). If S = T (“YES” in S603), the process proceeds to S604. At this time, the
なお、上述の量子化ステップサイズの設定方法は一例として記載したものであって、前のラインにおいて使用された量子化ステップサイズに基づき符号化対象のラインの量子化ステップサイズを設定する方法であれば、これに限定されるものではない。例えば、S、Tの大小関係に基づく上記方法だけでなく、ライン毎のSとTとの間の差分の大きさ、隣接するライン間での差分の変化の度合い、差分の変化の方向(増加と減少)等に基づき量子化ステップサイズを設定してもよい。 The quantization step size setting method described above is described as an example, and the quantization step size of the encoding target line may be set based on the quantization step size used in the previous line. For example, it is not limited to this. For example, not only the above method based on the magnitude relationship between S and T, but also the magnitude of the difference between S and T for each line, the degree of change of the difference between adjacent lines, the direction of change of the difference (increase Quantization step size may be set on the basis of (decrease).
以上のように、本実施形態に対応する符号化装置100は、上下2分割した分割画像のそれぞれの送信先となる符号化部をフレーム毎に巡回的に切り替え、同一符号化部における直前のフレームの分割画像0に基づき、処理対象の現フレームの分割画像1の先頭ラインの量子化ステップサイズを設定する。一般に時間的に隣り合うフレームは互いに高い類似性を持っているため、直前の分割画像0の量子化ステップサイズと、同位置に存在する現フレームの分割画像0の量子化ステップサイズはほぼ同じと考えることができる。そのため直前のフレームの分割画像0の最終ラインの量子化設定を現フレームの分割画像1の先頭ラインの量子化設定に用いることは、現フレームの分割画像0の最終ラインの量子化設定を現フレームの分割画像1の先頭ラインの量子化設定に用いることとほぼ等価とみなすことができる。
As described above, the
このようにして本実施形態では時間的に隣り合うフレームの類似性が非常に高いことを利用し、直前フレームの分割画像0の量子化情報を現フレームの分割画像1の量子化制御に用いることができる。これにより、分割画像間で量子化制御に連続性を持たせて分割画像間の歪を軽減し、分割境界上のノイズを低減することが出来る。 In this way, in this embodiment, the fact that the similarity between temporally adjacent frames is very high is used, and the quantization information of the divided image 0 of the immediately preceding frame is used for the quantization control of the divided image 1 of the current frame. Can do. Accordingly, it is possible to reduce the distortion between the divided images by giving the continuity to the quantization control between the divided images, and to reduce the noise on the divided boundary.
[実施形態2]
次に発明の第2の実施形態について説明する。本実施形態に対応する符号化装置700の構成例を図7に示す。図7において実施形態1の符号化装置100と異なるのは、画像分割部701、入力切替部702、並列符号化部703の構成である。以下では、当該構成について主に説明することとし、符号化装置100と共通の構成については説明を省略する。
[Embodiment 2]
Next, a second embodiment of the invention will be described. A configuration example of an
まず、画像分割部701は、色分離部106によって分離・生成された各色のプレーン画像を、図8(a)に示すように上下に上中下の3つの領域に3分割する。本実施形態では、上下に3分割した分割画像のうち、上側の領域の分割画像から分割画像0、分割画像1、分割画像2と呼ぶ。これ以降の説明では、複数のプレーン画像のうちの1つのみを取り上げて記述するが、発明の実施形態に対応する符号化装置700は、同様の処理を各プレーン画像に対して実行するように構成されている。
First, the
画像分割部701で画像を3分割した後、分割画像は入力切替部702を介して並列符号化部703に供給される。入力切替部702は、分割画像0、分割画像1及び分割画像2の供給先を、並列符号化部703を構成する符号化部0、符号化部1及び符号化部2の間でフレーム毎に巡回的に切り替える。ここで、図8(b)を参照して入力切替部702によるフレーム毎の分割画像の送信先の切り替えについて説明する。撮影フレームに対して、フレーム0、フレーム1、フレーム2、とインデックスを付けた場合、入力切替部702はインデックスを3で除算したときの剰余によって分割画像0、分割画像1及び分割画像2をそれぞれ符号化部0、符号化部1、及び符号化部2のいずれに送るかを切り替える。
After the image is divided into three by the
例えば、剰余が0のフレームを符号化する場合は、分割画像0を符号化部0に、分割画像1を符号化部1に、分割画像2を符号化部2に送る。剰余が1のフレームを符号化する場合は、分割画像0を符号化部1に、分割画像1を符号化部2に、分割画像2を符号化部0に送る。また、剰余が2のフレームを符号化する場合は、分割画像0を符号化部2に、分割画像1を符号化部0に、分割画像2を符号化部1に送る。1つの符号化部に着目すると、分割画像0、分割画像1、分割画像2、分割画像0、分割画像1、分割画像2というように、入力される分割画像の各フレームにおける空間的位置が巡回的に切り替わる。
For example, when a frame with a remainder of 0 is encoded, the divided image 0 is sent to the encoding unit 0, the divided image 1 is sent to the encoding unit 1, and the divided
並列符号化部703に含まれる符号化部0、符号化部1及び符号化部2の各構成は、図4(a)に示したものと同様であり、各符号化部に送られた分割画像は圧縮符号化される。本実施形態においても、符号化部0、符号化部1及び符号化部2は互いに独立して圧縮符号化を実行する。
Each configuration of the encoding unit 0, the encoding unit 1, and the
次に、並列符号化部703を構成する符号化部0、符号化部1及び符号化部2における圧縮符号化処理の詳細を説明する。当該圧縮符号化処理は、図5に示したフローチャートのステップにおける処理を修正することにより実行することができる。具体的には、S510とS513との間に実行されるS512における処理を、処理対象の分割画像が分割画像2に該当するか否かを判定する処理と入れ替える。この判定の結果、処理対象の分割画像が分割画像2であった場合(S512で「YES」)、そのまま符号化処理を終了する。分割画像2は最終ラインが分割境界を構成しないため、最終ラインに対して設定された量子化ステップサイズを記憶しておく必要がないからである。一方、処理対象画像が分割画像2ではなく分割画像0または分割画像1であった場合(S512で「NO」)、S513に移行し、量子化制御部403は最終ラインの量子化ステップサイズを記憶し、符号化処理を終了する。
Next, details of compression encoding processing in the encoding unit 0, the encoding unit 1, and the
以上のように、本実施形態に対応する符号化装置は、上下3分割した分割画像のそれぞれの送信先となる符号化部をフレーム毎に切り替え、同一符号化部における直前のフレームの分割画像と現フレームの分割画像とを空間的に連続する画像とみなして量子化制御を行う。一般に時間的に隣り合うフレームは互いに高い類似性を持っているため、直前の分割画像の量子化ステップサイズと、同位置に存在する現フレームの分割画像の量子化ステップサイズはほぼ同じと考えることができる。そのため、直前のフレームの分割画像0または1の最終ラインの量子化設定を現フレームの分割画像1または2の先頭ラインの量子化設定に用いることは、現フレームの分割画像0または1の最終ラインの量子化設定を現フレームの分割画像1または2の先頭ラインの量子化設定に用いることとほぼ等価とみなすことができる。このようにして本実施形態でも、時間的に隣り合うフレームの類似性が非常に高いことを利用し、直前のフレームの分割画像の量子化情報を現フレームの分割画像の量子化制御に用いることができる。これにより分割画像間で量子化制御に連続性を持たせて分割画像間の歪を軽減し、分割境界上のノイズを低減することができる。
As described above, the encoding device corresponding to the present embodiment switches the encoding unit serving as the transmission destination of each of the divided images divided into the upper and lower parts for each frame, and the divided image of the immediately preceding frame in the same encoding unit and Quantization control is performed by regarding the divided images of the current frame as spatially continuous images. Generally, temporally adjacent frames have high similarity to each other, so the quantization step size of the previous divided image and the quantization step size of the divided image of the current frame existing at the same position should be almost the same. Can do. Therefore, using the quantization setting of the last line of the divided image 0 or 1 of the previous frame as the quantization setting of the first line of the divided
上述の実施形態2では、上下3分割の例を上げたが、上下分割であるのならば3以上の分割数Nで分割しても良い。その場合は、画像分割部701は上下N分割で画像を分割するように構成され、また符号化部703はN個の符号化部で構成される。また、図5のS512は、処理対象の分割画像の最終ラインが分割境界を構成するか否かを判定する処理をと入れ替える。このとき、分割数Nを最大としてウェーブレット係数の分解レベルに応じて分割数を異ならせても良い。
In the above-described second embodiment, the example of the upper and lower three divisions has been described. In that case, the
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes 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 a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
401:離散ウェーブレット部、402:量子化部、403:量子化制御部、404:エントロピー符号化部 401: discrete wavelet unit, 402: quantization unit, 403: quantization control unit, 404: entropy coding unit
Claims (14)
前記複数の分割画像をそれぞれ独立して符号化する複数の符号化手段を含む並列符号化手段と、
前記複数の分割画像の前記複数の符号化手段への入力を制御する切替手段であって、第1の領域を構成する分割画像の入力の後に、当該分割画像に対応するフレームの次のフレームの第2の領域を構成する分割画像が入力されるように制御する切替手段と、
を備え、
前記複数の符号化手段は、それぞれ、
入力された分割画像に対応するデータについて、前のラインの符号化結果に応じて量子化ステップサイズを設定し、設定された量子化ステップサイズを使用してライン毎に量子化する量子化手段と、
量子化されたデータを符号化する符号化手段と
を備え、
前記量子化手段は、前記第2の領域を構成する分割画像の先頭ラインのデータを量子化する際には、当該分割画像に対応するフレームの前のフレームの前記第1の領域の分割画像の最終ラインの符号化結果に応じて、量子化ステップサイズを設定することを特徴とする符号化装置。 Dividing means for dividing a plurality of temporally continuous frames into a plurality of regions including a first region and a second region that are spatially adjacent to each other, and a plurality of divided images constituting the first region A dividing unit that divides each frame into a plurality of divided images so that a final line of the lines and a leading line of a plurality of lines of the divided images that form the second region form a dividing boundary;
Parallel encoding means including a plurality of encoding means for independently encoding the plurality of divided images;
A switching unit that controls input of the plurality of divided images to the plurality of encoding units, and after the input of the divided images constituting the first region, Switching means for controlling the divided images constituting the second area to be input;
With
Each of the plurality of encoding means is
Quantization means for setting the quantization step size according to the encoding result of the previous line for the data corresponding to the input divided image, and performing quantization for each line using the set quantization step size; ,
Encoding means for encoding the quantized data,
When the quantization means quantizes the data of the first line of the divided image constituting the second area, the quantization means includes the divided image of the first area of the frame preceding the frame corresponding to the divided image. An encoding apparatus, wherein a quantization step size is set according to an encoding result of a final line.
前記第2の領域の分割画像の先頭ラインのデータを量子化する際の前記量子化ステップサイズの前記設定を、該記憶した量子化ステップサイズに基づき行うことを特徴とする請求項1に記載の符号化装置。 The quantization means stores the quantization step size when the quantization step size is set for the final line of the divided image of the first region,
The said setting of the said quantization step size at the time of quantizing the data of the head line of the division | segmentation image of a said 2nd area | region is performed based on this memorize | stored quantization step size. Encoding device.
前記第2の領域の分割画像の前記最終ラインが分割境界を構成する場合に、設定した量子化ステップサイズを記憶し、
前記第2の領域の分割画像の前記最終ラインが分割境界を構成しない場合は、設定した量子化ステップサイズを記憶しない
ことを特徴とする請求項2に記載の符号化装置。 When the quantization means sets the quantization step size for the final line of the divided image of the second region,
Storing the set quantization step size when the final line of the divided image of the second region constitutes a dividing boundary;
The encoding apparatus according to claim 2, wherein the set quantization step size is not stored when the final line of the divided image of the second region does not form a division boundary.
前記検出手段が所定の変化を検出した場合に、前記量子化手段は前記第2のフレームの複数の分割画像の全ての先頭ラインについて予め定められた量子化ステップサイズを設定することを特徴とする請求項1乃至6のいずれか1項に記載の符号化装置。 Detection means for detecting a change between a first frame and a second frame that are temporally adjacent;
When the detection unit detects a predetermined change, the quantization unit sets a predetermined quantization step size for all head lines of the plurality of divided images of the second frame. The encoding device according to any one of claims 1 to 6.
前記量子化手段は、前記係数を量子化することを特徴とする請求項1乃至8のいずれか1項に記載の符号化装置。 Further comprising conversion means for performing a conversion process for converting the input divided image into a coefficient to be quantized.
The encoding apparatus according to claim 1, wherein the quantization unit quantizes the coefficient.
請求項1乃至10のいずれか1項に記載の符号化装置と
を備えることを特徴とする撮像装置。 Imaging means for imaging a subject and generating a plurality of temporally continuous frames;
An imaging apparatus comprising: the encoding apparatus according to claim 1.
分割手段が、時間的に連続する複数のフレームを空間的に隣接する第1の領域と第2の領域を含む複数の領域に分割する分割工程であって、前記第1の領域を構成する分割画像の複数のラインのうちの最終ラインと、前記第2の領域を構成する分割画像の複数のラインのうちの先頭ラインとが分割境界を構成するように各フレームを複数の分割画像に分割する分割工程と、
複数の符号化手段が、前記複数の分割画像をそれぞれ独立して符号化する並列符号化工程と、
切替手段が、前記複数の分割画像の前記複数の符号化手段への入力を制御する切替工程であって、第1の領域を構成する分割画像の入力の後に、該分割画像に対応するフレームの次のフレームの第2の領域を構成する分割画像が入力されるように制御する切替工程と、
を有し、
前記複数の符号化手段のそれぞれが、
入力された分割画像に対応するデータについて、前のラインの符号化結果に応じて量子化ステップサイズを設定し、設定された量子化ステップサイズを使用してライン毎に量子化する量子化工程と、
量子化されたデータを符号化する符号化工程と
を実行し、
前記量子化工程では、前記第2の領域を構成する分割画像の先頭ラインのデータを量子化する際には、当該分割画像に対応するフレームの前のフレームの前記第1の領域の分割画像の最終ラインの符号化結果に応じて、量子化ステップサイズが設定されることを特徴とする符号化装置の制御方法。 A method for controlling an encoding device, comprising:
A dividing step of dividing a plurality of temporally continuous frames into a plurality of regions including a first region and a second region that are spatially adjacent to each other, and forming the first region; Each frame is divided into a plurality of divided images such that the last line of the plurality of lines of the image and the first line of the plurality of lines of the divided image constituting the second region form a division boundary. Dividing process;
A plurality of encoding means, wherein the plurality of divided images are independently encoded, and a parallel encoding step;
A switching means for controlling the input of the plurality of divided images to the plurality of encoding means, and after the input of the divided images constituting the first region, the frame corresponding to the divided images; A switching step for controlling the divided images constituting the second region of the next frame to be input;
Have
Each of the plurality of encoding means is
For the data corresponding to the input divided image, a quantization step size is set according to the encoding result of the previous line, and a quantization step is performed for each line using the set quantization step size. ,
Performing an encoding step of encoding the quantized data;
In the quantization step, when the data of the first line of the divided image constituting the second area is quantized, the divided image of the first area of the frame preceding the frame corresponding to the divided image is displayed. A method for controlling an encoding apparatus, characterized in that a quantization step size is set according to an encoding result of a final line.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2015229037A JP2017098753A (en) | 2015-11-24 | 2015-11-24 | Encoding apparatus, imaging apparatus, encoding apparatus control method, program, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2015229037A JP2017098753A (en) | 2015-11-24 | 2015-11-24 | Encoding apparatus, imaging apparatus, encoding apparatus control method, program, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2017098753A true JP2017098753A (en) | 2017-06-01 |
Family
ID=58818215
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2015229037A Pending JP2017098753A (en) | 2015-11-24 | 2015-11-24 | Encoding apparatus, imaging apparatus, encoding apparatus control method, program, and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2017098753A (en) |
-
2015
- 2015-11-24 JP JP2015229037A patent/JP2017098753A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| RU2612600C2 (en) | Method for content adaptive entropy coding of data on operating conditions and reference types for next generation video | |
| JP5302769B2 (en) | Scan conversion apparatus, image encoding apparatus, and control method thereof | |
| JP7303894B2 (en) | Encoders, decoders and corresponding inter-prediction methods | |
| JP5520122B2 (en) | Data converter | |
| US10721485B2 (en) | Image coding apparatus, image coding method, and non-transitory computer-readable storage medium | |
| JP2022548351A (en) | Methods for building a merge candidate list | |
| US10051276B2 (en) | Image encoding apparatus, method and imaging apparatus | |
| JP2017537491A (en) | Scalable conversion hardware architecture with improved transposition buffer | |
| JP6727011B2 (en) | Image coding apparatus and control method thereof | |
| JP6512916B2 (en) | Image pickup apparatus, control method thereof and program | |
| JP2017513437A (en) | Data encoding and decoding | |
| US10516896B2 (en) | Encoding device, encoding method, and storage medium | |
| JP6946671B2 (en) | Image processing device and image processing method | |
| US9762926B2 (en) | Image processing device and image processing method, program, and imaging apparatus | |
| JP2015076765A (en) | Image processing apparatus, control method therefor, and computer program | |
| JP2017098753A (en) | Encoding apparatus, imaging apparatus, encoding apparatus control method, program, and storage medium | |
| KR20130101900A (en) | Electronic apparatus and method for encoding | |
| JP2018006999A (en) | Image encoding device and control method therefor | |
| US9942569B2 (en) | Image encoding apparatus and control method of the same | |
| JP2016195370A (en) | Image processing apparatus, image processing method, and program | |
| US20250280125A1 (en) | Image data encoding and decoding | |
| JP2023008624A (en) | Imaging apparatus and control method thereof and program | |
| JP6812214B2 (en) | Image coding device, image coding method, and program | |
| JP6581469B2 (en) | Image encoding apparatus, control method therefor, program, and storage medium | |
| JP2016066922A (en) | Signal processing apparatus, imaging apparatus, and signal processing method therefor. |