JP2018166306A - Coding apparatus, imaging apparatus, coding method, and program - Google Patents
Coding apparatus, imaging apparatus, coding method, and program Download PDFInfo
- Publication number
- JP2018166306A JP2018166306A JP2017063747A JP2017063747A JP2018166306A JP 2018166306 A JP2018166306 A JP 2018166306A JP 2017063747 A JP2017063747 A JP 2017063747A JP 2017063747 A JP2017063747 A JP 2017063747A JP 2018166306 A JP2018166306 A JP 2018166306A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- image
- resolution
- search range
- distance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、符号化装置、撮像装置、符号化方法、及びプログラムに関する。 The present invention relates to an encoding device, an imaging device, an encoding method, and a program.
近年、4kテレビや4kビデオカメラが普及しており、動画像の高解像度化が進んでいる。それに伴い、システムが処理する画素データ量が増加している。動画像の国際標準符号化規格である、H.264やHEVC(High Efficiency Video Coding)などの符号化方式では、動きベクトル検出という技術が用いられている。動きベクトル検出は、これから符号化を行う画像と、それとは時間的に異なる符号化済みの参照画像との間で動きを検出し、その動き情報に基づいて動画像圧縮を行うことにより、符号化効率を高めるものである。 In recent years, 4k televisions and 4k video cameras have become widespread, and the resolution of moving images has been increasing. Along with this, the amount of pixel data processed by the system is increasing. H. is an international standard encoding standard for moving images. In coding schemes such as H.264 and HEVC (High Efficiency Video Coding), a technique called motion vector detection is used. Motion vector detection is performed by detecting motion between an image to be encoded and an encoded reference image that is temporally different from the image to be encoded, and performing video compression based on the motion information. Increases efficiency.
この動きベクトル検出は、ある決められた探索範囲で、符号化を行うブロックごとに動きの検出を行う。探索範囲は広い方が動きベクトル検出の精度は向上するが、回路規模や処理量が増大してしまう。他方、被写体の本来の動きよりも狭い探索範囲を設定した場合、動きを追跡することができないため、動きベクトル検出の精度が低下し、画質劣化につながる。 In this motion vector detection, motion is detected for each block to be encoded within a predetermined search range. A wider search range improves the accuracy of motion vector detection, but increases the circuit scale and processing amount. On the other hand, when a search range narrower than the original motion of the subject is set, since the motion cannot be tracked, the accuracy of motion vector detection is lowered, leading to image quality degradation.
従って、探索範囲を適切に設定することは、動きベクトル検出にとって非常に重要な要素であり、入力画像のフレームレートに応じて探索範囲を変更するといった技術が提案されている(特許文献1参照)。 Therefore, setting the search range appropriately is a very important element for motion vector detection, and a technique has been proposed in which the search range is changed according to the frame rate of the input image (see Patent Document 1). .
動きベクトル検出をハードウェア処理で行う場合、外部メモリに置かれている参照画像のうち探索範囲部分を読み出して内部メモリに保持しておき、動きベクトル検出を行うことになる。この参照画像を格納する内部メモリの構成として、水平方向に画像の水平解像度分のデータを保持しておくラインバッファが用いられることが多い。これは、外部メモリから参照画像を読み出す際に、ラインバッファを用いずに符号化ブロックごとに必要な参照画像を読み出すと、同一の画素を何度も重複して読み出す必要があり、外部メモリからの画像データ読み出しのバス帯域を浪費してしまうためである。 When motion vector detection is performed by hardware processing, the search range portion of the reference image placed in the external memory is read out and held in the internal memory, and motion vector detection is performed. As a configuration of the internal memory for storing the reference image, a line buffer that holds data for the horizontal resolution of the image in the horizontal direction is often used. This is because when reading a reference image from an external memory, if the necessary reference image is read for each coding block without using a line buffer, it is necessary to read the same pixel over and over again. This is because the image data reading bus bandwidth is wasted.
このようなラインバッファが用いられる場合、ラインバッファの水平方向サイズは、画像の水平解像度に対応するサイズとなり、垂直方向サイズは、動きベクトル検出における垂直方向の探索範囲に対応するサイズとなる。 When such a line buffer is used, the horizontal size of the line buffer corresponds to the horizontal resolution of the image, and the vertical size corresponds to the vertical search range in motion vector detection.
動きベクトル検出に用いる参照画像格納用のラインバッファの水平方向サイズは、画像の水平解像度に依存する。そのため、動画像の高解像度化に伴い、ラインバッファの水平方向サイズを大きくする必要がある。 The horizontal size of the reference image storage line buffer used for motion vector detection depends on the horizontal resolution of the image. Therefore, it is necessary to increase the size of the line buffer in the horizontal direction as the resolution of moving images increases.
しかしながら、ラインバッファの垂直方向サイズを維持したまま水平方向サイズを大きくすると、ラインバッファの記憶容量が増加し、回路規模の増大やコストの上昇につながる。他方、回路規模の増大を抑制するためにラインバッファの記憶容量を維持したまま水平方向サイズを大きくすると、垂直方向サイズが小さくなる。その結果、動きベクトル検出における垂直方向の探索可能範囲が狭くなり、画質劣化につながる可能性がある。 However, if the horizontal size is increased while maintaining the vertical size of the line buffer, the storage capacity of the line buffer increases, leading to an increase in circuit scale and cost. On the other hand, if the horizontal size is increased while maintaining the storage capacity of the line buffer in order to suppress an increase in circuit scale, the vertical size is reduced. As a result, the searchable range in the vertical direction in motion vector detection is narrowed, which may lead to image quality degradation.
本発明はこのような状況に鑑みてなされたものであり、符号化対象画像の解像度が上昇する場合に、参照画像の格納により使用される記憶容量の増加を抑制しつつ画質劣化を抑制する技術を提供することを目的とする。 The present invention has been made in view of such a situation. When the resolution of an image to be encoded increases, a technique for suppressing image quality deterioration while suppressing an increase in storage capacity used by storing a reference image. The purpose is to provide.
上記課題を解決するために、本発明は、動画像に含まれる符号化対象画像に対してブロック単位で動き補償予測符号化を行う符号化装置であって、前記動画像から参照画像を選択する選択手段と、前記参照画像の一部を探索することにより、前記符号化対象画像の符号化対象ブロックの動きベクトルを検出する検出手段と、前記動きベクトルに基づいて前記符号化対象ブロックを符号化する符号化手段と、を備え、前記符号化対象画像の第1の方向の解像度が第1の解像度である場合、前記選択手段は、前記符号化対象画像と前記参照画像との間の時間的な距離が第1の距離以内になるように前記参照画像を選択し、前記検出手段は、前記第1の方向に直交する第2の方向における前記動きベクトルの探索範囲を第1の探索範囲として前記探索を行い、前記符号化対象画像の前記第1の方向の解像度が前記第1の解像度よりも高い第2の解像度である場合、前記選択手段は、前記符号化対象画像と前記参照画像との間の時間的な距離が前記第1の距離よりも短い第2の距離以内になるように前記参照画像を選択し、前記検出手段は、前記第2の方向における前記動きベクトルの探索範囲を前記第1の探索範囲よりも狭い第2の探索範囲として前記探索を行うことを特徴とする符号化装置を提供する。 In order to solve the above-described problem, the present invention is an encoding apparatus that performs motion compensation prediction encoding on an encoding target image included in a moving image in units of blocks, and selects a reference image from the moving image A selection unit; a detection unit that detects a motion vector of an encoding target block of the encoding target image by searching a part of the reference image; and the encoding target block is encoded based on the motion vector And when the resolution in the first direction of the encoding target image is the first resolution, the selection unit is configured to select a temporal interval between the encoding target image and the reference image. The reference image is selected so that a short distance is within the first distance, and the detection unit uses the motion vector search range in the second direction orthogonal to the first direction as the first search range. Search And when the resolution in the first direction of the encoding target image is a second resolution higher than the first resolution, the selection unit is configured to select between the encoding target image and the reference image. The reference image is selected so that a temporal distance of the second image is within a second distance shorter than the first distance, and the detection means sets the motion vector search range in the second direction to the second distance. An encoding apparatus is provided that performs the search as a second search range narrower than one search range.
なお、その他の本発明の特徴は、添付図面及び以下の発明を実施するための形態における記載によって更に明らかになるものである。 Other features of the present invention will become more apparent from the accompanying drawings and the following description of the preferred embodiments.
本発明によれば動画像の解像度が上昇する場合に、参照画像の格納により使用される記憶容量の増加を抑制しつつ画質劣化を抑制することが可能となる。 According to the present invention, when the resolution of a moving image increases, it is possible to suppress deterioration in image quality while suppressing an increase in storage capacity used by storing a reference image.
以下、添付図面を参照して、本発明の実施形態を説明する。なお、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。また、実施形態の中で説明されている特徴の組み合わせすべてが、本発明に必須とは限らない。また、別々の実施形態の中で説明されている特徴を適宜組み合せることも可能である。 Embodiments of the present invention will be described below with reference to the accompanying drawings. The technical scope of the present invention is determined by the claims, and is not limited by the following individual embodiments. In addition, not all combinations of features described in the embodiments are essential to the present invention. Moreover, it is possible to appropriately combine the features described in different embodiments.
[第1の実施形態]
図1は、符号化装置を含む撮像装置100の構成を示すブロック図である。以下の説明においては、撮像装置100はHEVCに対応しているものとするが、本実施形態の符号化方式はHEVCに限定されず、動き補償予測符号化を伴う任意の符号化方式に適用可能である。
[First Embodiment]
FIG. 1 is a block diagram illustrating a configuration of an
撮影される画像は、レンズ101を通して撮像部102に入力される。撮像部102は、画像をデジタル画素データに変換し、現像処理部103に送る。現像処理部103では、ディベイヤー処理、キズ補正、ノイズ除去、拡大縮小処理、YCbCr形式への色変換処理などの画像処理が行われる。画像処理後の、圧縮符号化を行うことができる形式になった画像が、符号化フレームバッファ104に入力される。撮像装置100は、この画像を符号化対象画像として用いる。参照フレームバッファ105は、参照画像を格納する。符号化ブロックバッファ106は、符号化フレームバッファ104に格納されている符号化対象画像をブロック単位で取得し、符号化対象ブロックとして格納する。
The captured image is input to the
参照ラインバッファ107は、動きベクトル検出に必要な参照画像を参照フレームバッファ105から取得して格納する。なお、参照ラインバッファ107が同時に保持する参照画像(バッファ画像)は、参照画像の全体ではなく一部である(詳細は図4〜図9を参照して後述)。
The
符号化フレームバッファ104及び参照フレームバッファ105は、不図示のDRAM(Dynamic Random Access Memory)を用いて実装される。また、符号化ブロックバッファ106及び参照ラインバッファ107は、符号化フレームバッファ104及び参照フレームバッファ105とは異なるメモリを用いて実装される。例えば、符号化フレームバッファ104及び参照フレームバッファ105は、不図示のSRAM(Static Random Access Memory)を用いて実装される。
The
動き予測部108は、符号化ブロックバッファ106に格納されている符号化対象ブロックと、参照ラインバッファ107に格納されている参照画像との間でブロックマッチングを行うことにより、動きベクトル検出を行う。動き予測部108は、符号化対象ブロックと、検出された動きベクトルに対応する位置の参照画像(予測画像)との間で画素の差分をとり、その差分画像を直交変換部109に出力する。また、動き予測部108は、ローカルデコード画像作成のために、予測画像を動き補償部116に出力する。
The
直交変換部109は、動き予測部108から出力された差分画像に対して離散コサイン変換を行い、変換係数を生成し、量子化部110に出力する。
The
量子化部110は、直交変換部109から出力された変換係数に対して、量子化制御部111が出力する量子化ステップサイズに従い、量子化を行う。量子化された変換係数は、符号化ストリーム作成のために可変長符号化部112に出力されると共に、ローカルデコード画像作成のために逆量子化部114に出力される。
The
可変長符号化部112は、量子化後の変換係数に対してジグザグスキャン、オルタネートスキャン等を行い、可変長符号化を行う。また、可変長符号化部112は、可変長符号化された変換係数に対して、動きベクトル、量子化ステップサイズ、ブロック分割情報、適応オフセット処理用パラメータなどの符号化方式情報を可変長符号化したものを付加し、符号化ストリームを生成する。生成された符号化ストリームは、記録メディア113に記録される。また、可変長符号化部112は、符号化の際にブロックごとの発生符号量を算出し、量子化制御部111に出力する。
The variable
量子化制御部111は、可変長符号化部112から出力された発生符号量を用いて、目標とする符号量になるように量子化ステップサイズを決定し、量子化部110に出力する。
The
逆量子化部114は、量子化部110から出力された量子化後の変換係数に対して逆量子化を行い、ローカルデコード用の変換係数を生成する。この変換係数は、逆直交変換部115に出力される。
The
逆直交変換部115は、逆量子化部114から出力された変換係数に対して逆離散コサイン変換を行い、差分画像を生成する。生成された差分画像は、動き補償部116に出力される。
The inverse
動き補償部116は、動き予測部108から出力された予測画像と、逆直交変換部115から出力された差分画像とを加算することにより、ローカルデコード用の画像データを生成する。生成された画像データは、デブロッキングフィルタ部117に出力される。
The
デブロッキングフィルタ部117は、動き補償部116から出力された画像データに対してデブロッキングフィルタをかける。デブロッキングフィルタ後の画像は、適応オフセット処理部118に出力される。
The
適応オフセット処理部118は、バンドオフセット処理、エッジオフセット処理、もしくは何も処理をしない、のいずれかの選択を行い、適応オフセット処理を行うバンド位置、エッジ方向、オフセット値などを決定する。そして、適応オフセット処理部118は、デブロッキングフィルタ後の画像に対して適応オフセット処理を行ったものをローカルデコード画像として参照フレームバッファ105に格納する。また、適応オフセット処理部118は、適応オフセット処理としてどの処理を選択したか、バンド位置、エッジ方向、オフセット値などの、適応オフセット処理用のパラメータを、符号化ストリームとして生成するため、可変長符号化部112に出力する。このような動作により、符号化ストリーム及びローカルデコード画像が作成される。
The adaptive offset
探索範囲制御部119は、入力画像の解像度情報に基づいて、動きベクトル検出の垂直探索範囲を決定する。符号化制御部120は、入力画像の解像度情報に基づいて、符号化対象画像と動き検出時に参照する画像(参照画像)との参照関係、即ちGOP(Group of Pictures)構造を決定する。また、符号化制御部120は、ROM(不図示)に格納された制御プログラムに従って撮像装置100の各部を制御することにより、符号化処理を制御する。
The search
図2は、GOP構造の例を示す図である。図2において、「I」、「P」、「B」はそれぞれIピクチャ、Pピクチャ、Bピクチャを表す。各ピクチャは表示順に並んでいる。図2(a)において、Pピクチャ201は、8枚前のIピクチャ202を参照しており、この参照が時間的に最大の参照距離である。このように時間的に最大の参照距離が8枚のピクチャであるGOP構造を、「M=8」と定義する。この時、Bピクチャ203は、Pピクチャ201又はIピクチャ202を参照する。Bピクチャ204は、Iピクチャ202又はBピクチャ203を参照する。Bピクチャ205は、Pピクチャ201又はBピクチャ203を参照する。Bピクチャ206は、Iピクチャ202又はBピクチャ204を参照する。Bピクチャ207は、Bピクチャ203又はBピクチャ204を参照する。Bピクチャ208は、Bピクチャ203又はBピクチャ205を参照する。Bピクチャ209は、Pピクチャ201又はBピクチャ205を参照する。
FIG. 2 is a diagram illustrating an example of a GOP structure. In FIG. 2, “I”, “P”, and “B” represent an I picture, a P picture, and a B picture, respectively. Each picture is arranged in the display order. In FIG. 2A, a
図2(b)において、Pピクチャ210は、4枚前のIピクチャ211を参照しており、この参照が時間的に最大の参照距離である。このように時間的に最大の参照距離が4枚のピクチャであるGOP構造を、「M=4」と定義する。この時、Bピクチャ212は、Pピクチャ210又はIピクチャ211を参照する。Bピクチャ213は、Iピクチャ211又はBピクチャ212を参照する。Bピクチャ214は、Pピクチャ210又はBピクチャ212を参照する。
In FIG. 2B, a
図2(c)において、Pピクチャ215は、3枚前のIピクチャ216を参照しており、この参照が時間的に最大の参照距離である。このように時間的に最大の参照距離が3枚のピクチャであるGOP構造を、「M=3」と定義する。この時、Bピクチャ217及びBピクチャ218は、Pピクチャ215又はIピクチャ216を参照する。
In FIG. 2C, the
図2(d)において、Pピクチャ219は、2枚前のIピクチャ220を参照しており、この参照が時間的に最大の参照距離である。このように時間的に最大の参照距離が2枚のピクチャであるGOP構造を、「M=2」と定義する。この時、Bピクチャ221は、Pピクチャ219又はIピクチャ220を参照する。
In FIG. 2D, the
このように、符号化対象画像と参照画像との間の時間的な距離は、Mの値により規定される距離以内である。なお、図2(a)〜(d)の例では、Pピクチャの参照先が時間的に最大の参照距離である。しかしながら、Bピクチャの参照先が時間的に最大の参照距離となるようにGOP構造を構成してもよい。また、M=2,3,4,8の場合のみを例示したが、参照距離はこれらに限定されず、他の参照距離(例えばM=5やM=9)のGOP構造を用いることも可能である。 Thus, the temporal distance between the encoding target image and the reference image is within a distance defined by the value of M. In the examples of FIGS. 2A to 2D, the reference destination of the P picture is the maximum reference distance in terms of time. However, the GOP structure may be configured such that the reference destination of the B picture is the maximum reference distance in time. Moreover, although only the case of M = 2, 3, 4, and 8 was illustrated, the reference distance is not limited to these, and a GOP structure with other reference distances (for example, M = 5 and M = 9) can be used. It is.
HEVCにおいては、時間階層構造を利用することができる。この時間階層構造により、ストリームにTemporalID(時間識別子)を付与することで、対応した時間解像度で動画像を出力できるようになる。例えば、1秒間60フレームで符号化された60p(p:progressive)のストリームから、30pや15pのストリームを抽出することができる。 In HEVC, a time hierarchical structure can be used. By assigning a temporal ID (time identifier) to the stream according to this time hierarchical structure, a moving image can be output at a corresponding time resolution. For example, a 30p or 15p stream can be extracted from a 60p (p: progressive) stream encoded at 60 frames per second.
図3に、TemporalIDを用いた構成の例を示す。この例では、動画像は、図2(a)に示したM=8のGOP構造において、TemporalIDの異なる4つの階層で符号化されている。例えば、TemporalID=0,1,2の部分のストリームを取り出して再生することにより、Iピクチャ202、Bピクチャ203,204,205、Pピクチャ201の再生を行うことができる。即ち、60pのストリームから30pの部分のみを取り出して再生することが可能となる。この時、時間的な参照距離が最大となるピクチャ(ここではPピクチャ201)は、TemoralIDが0となる。
FIG. 3 shows an example of a configuration using TemporalID. In this example, a moving image is encoded in four layers having different Temporal IDs in the GOP structure of M = 8 shown in FIG. For example, the
次に、参照ラインバッファ107(バッファメモリ)への参照画像の格納方法について説明する。ここでは、符号化対象画像の解像度を1920×1080とし、動きベクトル検出の水平方向の探索範囲を±512画素、垂直方向の探索範囲を±128ラインの場合を例に説明する。 Next, a method for storing a reference image in the reference line buffer 107 (buffer memory) will be described. Here, an example will be described in which the resolution of the encoding target image is 1920 × 1080, the horizontal search range for motion vector detection is ± 512 pixels, and the vertical search range is ± 128 lines.
図4に、符号化対象ブロック(CTU(Coding Tree Unit))と動きベクトル検出の探索範囲を示す。CTUサイズは32×32画素とする。水平CTU位置がx、垂直CTU位置がyの場合のCTUをCTU(x,y)と表現する。 FIG. 4 shows an encoding target block (CTU (Coding Tree Unit)) and a search range for motion vector detection. The CTU size is 32 × 32 pixels. A CTU when the horizontal CTU position is x and the vertical CTU position is y is expressed as CTU (x, y).
CTU401は、ピクチャ先頭のCTUであり、CTU(0,0)に対応する。この場合の動きベクトル検出の探索範囲となる参照画像402は、水平方向が0〜543の544画素、垂直方向が0〜159の160ラインとなる。符号化制御部120は、CTU401の符号化前に、参照画像402を参照フレームバッファ105から取得し、参照ラインバッファ107に格納しておく。
A
図5は、CTU401の次の符号化対象CTUに対応する動きベクトル検出の探索範囲を示す図である。CTU501は、CTU(1,0)に対応する。この場合の動きベクトル検出の探索範囲となる参照画像502は、水平方向が0〜575の576画素、垂直方向が0〜159の160ラインとなる。CTU501の符号化前に、水平方向0〜543までの参照画像は既に参照ラインバッファ107に格納されている。そのため、符号化制御部120は、新たに必要となる水平方向544〜575の参照画像503のみを参照フレームバッファ105から取得し、参照ラインバッファ107に格納する。
FIG. 5 is a diagram illustrating a search range of motion vector detection corresponding to the
次に、図6を参照して、画面の右端までが探索範囲となるCTU(43,0)の符号化について説明する。図6は、この時の動きベクトル検出の探索範囲を示す。CTU601は、CTU(43,0)に対応する。この時の動きベクトル検出の探索範囲となる参照画像602は、水平方向が864〜1919の1056画素、垂直方向が0〜159の160ラインとなる。参照画像603は、水平方向0〜863、垂直方向0〜159の部分であり、この部分はCTU601の探索範囲外だが、次のCTUラインの動きベクトル検出時に必要となるため、参照ラインバッファ107に保持したままとなっている。
Next, encoding of CTU (43, 0) in which the search range is up to the right end of the screen will be described with reference to FIG. FIG. 6 shows the search range of motion vector detection at this time. The
図7を参照して、次のCTUラインであるCTU(0,1)の符号化について説明する。図7は、この時の動きベクトル検出の探索範囲を示す。CTU701は、CTU(0,1)に対応する。この時の動きベクトル検出の探索範囲となる参照画像702は、水平方向が0〜543の544画素、垂直方向が0〜191の192ラインとなる。CTU701の符号化開始時点で、垂直方向0〜159の部分の参照画像は、それまでの符号化時に使用されているため、参照ラインバッファ107に既に格納されている。そのため、符号化制御部120は、新たに必要となる水平方向0〜543、垂直方向160〜191の参照画像703のみを参照フレームバッファ105から取得し、参照ラインバッファ107に格納する。
With reference to FIG. 7, encoding of CTU (0, 1), which is the next CTU line, will be described. FIG. 7 shows the search range of motion vector detection at this time. The
次に、図8を参照して、符号化対象CTUの上下の探索範囲が等しくなると共に画面の上端までが探索範囲となるCTU(43,5)の符号化について説明する。図8は、この時の動きベクトル検出の探索範囲を示す。CTU801は、CTU(43,5)に対応する。この時の動きベクトル検出の探索範囲となる参照画像802は、水平方向が864〜1919の1056画素、垂直方向が0〜287の288ラインとなる。この時、参照ラインバッファ107には、水平方向が符号化対象画像の解像度と同じ0〜1919、垂直方向が探索範囲分である0〜287の部分の参照画像が格納されている。
Next, the encoding of CTU (43, 5) in which the upper and lower search ranges of the encoding target CTU are equal and the search range is the search range will be described with reference to FIG. FIG. 8 shows the search range of motion vector detection at this time. The
次に、図9を参照して、更に次のCTUラインであるCTU(0,6)の符号化について説明する。図9は、この時の動きベクトル検出の探索範囲を示す。CTU901は、CTU(0,6)に対応する。この時の動きベクトル検出の探索範囲となる参照画像902は、水平方向が0〜543の544画素、垂直方向が32〜319の288ラインとなる。水平方向0〜1919、垂直方向0〜31の参照画像903は、これ以降のCTUで探索範囲となることはない。そのため、符号化制御部120は、参照画像903を格納していた部分のSRAMを空き領域とし、この部分に、新たに必要となる参照画像を格納していく。即ち、符号化制御部120は、新たに必要となる水平方向0〜543、垂直方向288〜319の参照画像904を、参照画像903を格納していた部分のSRAMを使用して参照ラインバッファ107に格納する。
Next, encoding of CTU (0, 6), which is the next CTU line, will be described with reference to FIG. FIG. 9 shows the search range of motion vector detection at this time. The
このように、参照ラインバッファ107は、水平方向サイズが符号化対象画像の水平解像度に一致し、垂直方向サイズが垂直方向の最大探索範囲(垂直CTUサイズを含む)に一致するように使用される。符号化対象画像の解像度が1920×1080、CTUサイズが32×32の場合、参照ラインバッファ107の水平方向サイズは、符号化対象画像の水平解像度である1920画素となる。また、参照ラインバッファ107の垂直方向サイズは、垂直探索範囲(垂直CTUサイズを除く)が±128ラインで256ライン、垂直CTUサイズが32ラインなので、合計288ラインとなる。そして、参照ラインバッファ107に記憶されるバッファ画像の水平方向における最大サイズは、水平解像度に対応する1920画素となる。
Thus, the
次に、符号化対象画像の解像度が高くなる場合について説明する。上の説明では1920×1080であった解像度が、3840×2160に上昇した場合を考える。参照ラインバッファ107の記憶容量を維持したまま水平方向サイズを1920画素から3840画素に増加させるためには、垂直方向サイズを288ラインから144ラインに減少させる必要がある。この場合、垂直方向の最大探索範囲(垂直CTUサイズを含む)も、288ラインから144ラインに縮小する。その結果、垂直方向の探索範囲が被写体の本来の動きよりも狭くなり動きを追跡することができない可能性が上昇し、画質劣化につながる恐れがある。
Next, a case where the resolution of the encoding target image is increased will be described. In the above description, consider a case where the resolution which was 1920 × 1080 has increased to 3840 × 2160. In order to increase the horizontal size from 1920 pixels to 3840 pixels while maintaining the storage capacity of the
垂直方向の探索範囲の縮小を補償するために、符号化制御部120は、GOP構造を変更することにより、動きベクトル検出のための参照画像の最大時間距離を短縮する。例えば、解像度が1920×1080の場合のGOP構造がM=8である場合を考える。この場合、解像度が3840×2160に上昇すると、符号化制御部120は、GOP構造をM=4に変更する。参照画像の時間距離が半分になると、対応する被写体の動きも半分になる。従って、参照ラインバッファ107の垂直方向サイズの半減に伴う垂直方向の探索範囲の半減を補償することができる。
In order to compensate for the reduction in the search range in the vertical direction, the
なお、ここでは画素密度の変化に伴う空間的な探索範囲の変化については考慮しないものとする。画素密度に関わらず単純に探索範囲の画素数だけで比較した場合でも、符号化対象画像の解像度の上昇に伴って探索範囲の縮小が生じ、参照画像の時間距離の短縮により探索範囲の画素数の減少を補償することができる。 Here, it is assumed that a change in the spatial search range due to a change in pixel density is not considered. Regardless of the pixel density, even if the comparison is made only with the number of pixels in the search range, the search range is reduced as the resolution of the encoding target image increases, and the number of pixels in the search range is reduced by reducing the time distance of the reference image. Can be compensated for.
また、参照画像の最大時間距離の短縮率は、必ずしも参照ラインバッファ107の垂直方向サイズの縮小率と一致していなくてもよい。例えば、GOP構造をM=8からM=7に変更するだけでも、参照ラインバッファ107の垂直方向サイズの縮小をある程度は補償することができる。
Further, the reduction rate of the maximum time distance of the reference image does not necessarily match the reduction rate of the size of the
図10は、撮像装置100が実行する符号化処理のフローチャートである。本フローチャートの各ステップの処理は、特に断らない限り、符号化制御部120が制御プログラムに従って撮像装置100の各部を制御することにより実現される。
FIG. 10 is a flowchart of the encoding process executed by the
S1001で、符号化制御部120は、符号化対象画像の水平解像度を確認し、水平解像度が1920であれば処理をS1002へ進め、水平解像度が3840であれば処理をS1004へ進める。
In S1001, the
S1002で、符号化制御部120は、GOP構造をM=8に設定する。S1003で、符号化制御部120は、垂直探索範囲を288ラインに設定する。
In S1002, the
S1004で、符号化制御部120は、GOP構造をM=4に設定する。S1005で、符号化制御部120は、垂直探索範囲を144ラインに設定する。
In S1004, the
S1006で、符号化制御部120は、符号化対象画像を符号化する。この時、符号化制御部120は、上で設定したGOP構造及び垂直探索範囲を使用して動きベクトルの検出(参照画像の選択、参照ラインバッファ107への参照画像の格納など)を行う。
In S1006, the
以上説明したように、第1の実施形態によれば、撮像装置100は、符号化対象画像の水平解像度が上昇すると、動きベクトル検出における垂直方向の探索範囲を縮小すると共に、参照画像の時間的な距離の最大値を減少させる。これにより、符号化対象画像の解像度が上昇する場合に、参照画像の格納により使用される記憶容量の増加を抑制しつつ画質劣化を抑制することが可能となる。
As described above, according to the first embodiment, when the horizontal resolution of the encoding target image increases, the
なお、図10には水平解像度が1920の場合と3840の場合しか示されていないが、本実施形態の水平解像度はこれに限定されない。また、GOP構造及び垂直探索範囲に関しても、図10に示されるものは例に過ぎず、本実施形態は図10の構成に限定される訳ではない。また、図10で説明した水平と垂直との関係は、交換可能である。即ち、参照ラインバッファ107が垂直ラインバッファである場合、符号化制御部120は、S1001において垂直解像度を確認する。そして、符号化制御部120は、垂直解像度の上昇に伴って水平探索範囲が縮小するように、S1004及びS1005において水平探索範囲を設定する。一般化すると、符号化制御部120は、符号化対象画像の第1の方向の解像度の上昇に伴い、動きベクトル検出において第1の方向に直交する第2の方向の探索範囲を縮小すると共に、参照画像の時間的な距離の最大値を減少させる。探索範囲の縮小の度合いが大きいほど、参照ラインバッファ107の記憶容量の増加が抑制される。また、参照画像の時間的な距離の最大値の減少の度合いが大きいほど、探索範囲の縮小を補償できる度合いが大きくなる。
Note that FIG. 10 shows only cases where the horizontal resolution is 1920 and 3840, but the horizontal resolution of the present embodiment is not limited to this. Also, regarding the GOP structure and the vertical search range, what is shown in FIG. 10 is merely an example, and the present embodiment is not limited to the configuration of FIG. Further, the relationship between the horizontal and the vertical explained in FIG. 10 can be exchanged. That is, when the
[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
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.
104…符号化フレームバッファ、105…参照フレームバッファ、106…符号化ブロックバッファ、107…参照ラインバッファ、108…動き予測部、109…直交変換部、110…量子化部、112…可変長符号化部、120…符号化制御部
DESCRIPTION OF
Claims (9)
前記動画像から参照画像を選択する選択手段と、
前記参照画像の一部を探索することにより、前記符号化対象画像の符号化対象ブロックの動きベクトルを検出する検出手段と、
前記動きベクトルに基づいて前記符号化対象ブロックを符号化する符号化手段と、
を備え、
前記符号化対象画像の第1の方向の解像度が第1の解像度である場合、
前記選択手段は、前記符号化対象画像と前記参照画像との間の時間的な距離が第1の距離以内になるように前記参照画像を選択し、
前記検出手段は、前記第1の方向に直交する第2の方向における前記動きベクトルの探索範囲を第1の探索範囲として前記探索を行い、
前記符号化対象画像の前記第1の方向の解像度が前記第1の解像度よりも高い第2の解像度である場合、
前記選択手段は、前記符号化対象画像と前記参照画像との間の時間的な距離が前記第1の距離よりも短い第2の距離以内になるように前記参照画像を選択し、
前記検出手段は、前記第2の方向における前記動きベクトルの探索範囲を前記第1の探索範囲よりも狭い第2の探索範囲として前記探索を行う
ことを特徴とする符号化装置。 An encoding device that performs motion compensation prediction encoding on a block-by-block basis for an encoding target image included in a moving image,
Selecting means for selecting a reference image from the moving images;
Detecting means for detecting a motion vector of an encoding target block of the encoding target image by searching a part of the reference image;
Encoding means for encoding the encoding target block based on the motion vector;
With
When the resolution in the first direction of the encoding target image is the first resolution,
The selection means selects the reference image so that a temporal distance between the encoding target image and the reference image is within a first distance,
The detection means performs the search using a search range of the motion vector in a second direction orthogonal to the first direction as a first search range,
When the resolution in the first direction of the encoding target image is a second resolution higher than the first resolution,
The selection unit selects the reference image so that a temporal distance between the encoding target image and the reference image is within a second distance shorter than the first distance;
The encoding device characterized in that the detection means performs the search using a search range of the motion vector in the second direction as a second search range narrower than the first search range.
前記検出手段は、前記バッファメモリに記憶された前記参照画像の前記一部を探索することにより前記動きベクトルを検出する
ことを特徴とする請求項1に記載の符号化装置。 Control means for controlling a buffer memory to store a buffer image including the part of the reference image corresponding to the motion vector search range;
The encoding apparatus according to claim 1, wherein the detection unit detects the motion vector by searching the part of the reference image stored in the buffer memory.
ことを特徴とする請求項2に記載の符号化装置。 The encoding apparatus according to claim 2, wherein the maximum size of the buffer image in the first direction corresponds to the resolution in the first direction of the encoding target image.
ことを特徴とする請求項1乃至3のいずれか1項に記載の符号化装置。 The ratio between the first distance and the second distance is equal to the ratio between the first search range and the second search range. 4. The encoding device described.
前記符号化対象画像の前記第1の方向の解像度が前記第1の解像度であって前記符号化対象画像と前記参照画像との間の時間的な距離が前記第1の距離である場合、及び、前記符号化対象画像の前記第1の方向の解像度が前記第2の解像度であって前記符号化対象画像と前記参照画像との間の時間的な距離が前記第2の距離である場合には、前記符号化対象画像は、最も低い時間階層に属する
ことを特徴とする請求項1乃至4のいずれか1項に記載の符号化装置。 The encoding means is configured to perform encoding with a temporal hierarchical structure,
The resolution of the encoding target image in the first direction is the first resolution, and the temporal distance between the encoding target image and the reference image is the first distance; and When the resolution of the encoding target image in the first direction is the second resolution and the temporal distance between the encoding target image and the reference image is the second distance. The encoding apparatus according to claim 1, wherein the encoding target image belongs to the lowest time hierarchy.
ことを特徴とする請求項1乃至5のいずれか1項に記載の符号化装置。 The encoding apparatus according to claim 1, wherein the first direction is a horizontal direction and the second direction is a vertical direction.
前記動画像を生成する撮像手段と、
を備えることを特徴とする撮像装置。 The encoding device according to any one of claims 1 to 6,
Imaging means for generating the moving image;
An imaging apparatus comprising:
前記動画像から参照画像を選択する選択工程と、
前記参照画像の一部を探索することにより、前記符号化対象画像の符号化対象ブロックの動きベクトルを検出する検出工程と、
前記動きベクトルに基づいて前記符号化対象ブロックを符号化する符号化工程と、
を備え、
前記符号化対象画像の第1の方向の解像度が第1の解像度である場合、
前記選択工程は、前記符号化対象画像と前記参照画像との間の時間的な距離が第1の距離以内になるように前記参照画像を選択し、
前記検出工程は、前記第1の方向に直交する第2の方向における前記動きベクトルの探索範囲を第1の探索範囲として前記探索を行い、
前記符号化対象画像の前記第1の方向の解像度が前記第1の解像度よりも高い第2の解像度である場合、
前記選択工程は、前記符号化対象画像と前記参照画像との間の時間的な距離が前記第1の距離よりも短い第2の距離以内になるように前記参照画像を選択し、
前記検出工程は、前記第2の方向における前記動きベクトルの探索範囲を前記第1の探索範囲よりも狭い第2の探索範囲として前記探索を行う
ことを特徴とする符号化方法。 An encoding method executed by an encoding device that performs motion compensation prediction encoding on a block-by-block basis for an encoding target image included in a moving image,
A selection step of selecting a reference image from the moving image;
Detecting a motion vector of an encoding target block of the encoding target image by searching a part of the reference image; and
An encoding step of encoding the encoding target block based on the motion vector;
With
When the resolution in the first direction of the encoding target image is the first resolution,
The selection step selects the reference image so that a temporal distance between the encoding target image and the reference image is within a first distance,
The detection step performs the search using a search range of the motion vector in a second direction orthogonal to the first direction as a first search range,
When the resolution in the first direction of the encoding target image is a second resolution higher than the first resolution,
The selection step selects the reference image so that a temporal distance between the encoding target image and the reference image is within a second distance shorter than the first distance,
The encoding method, wherein the detection step performs the search with a search range of the motion vector in the second direction as a second search range narrower than the first search range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017063747A JP6942504B2 (en) | 2017-03-28 | 2017-03-28 | Coding device, imaging device, coding method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017063747A JP6942504B2 (en) | 2017-03-28 | 2017-03-28 | Coding device, imaging device, coding method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018166306A true JP2018166306A (en) | 2018-10-25 |
JP6942504B2 JP6942504B2 (en) | 2021-09-29 |
Family
ID=63923016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017063747A Active JP6942504B2 (en) | 2017-03-28 | 2017-03-28 | Coding device, imaging device, coding method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6942504B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000261809A (en) * | 1999-03-05 | 2000-09-22 | Kdd Corp | Image coder coping with feature of picture |
JP2000324498A (en) * | 1999-05-13 | 2000-11-24 | Nec Corp | Animation encoding device |
WO2005076629A1 (en) * | 2004-02-09 | 2005-08-18 | Sanyo Electric Co., Ltd | Image encoding device and method, image decoding device and method, and imaging device |
JP2009284058A (en) * | 2008-05-20 | 2009-12-03 | Mitsubishi Electric Corp | Moving image encoding device |
JP2016195326A (en) * | 2015-03-31 | 2016-11-17 | 富士通株式会社 | Video encoder, video coding method, and computer program for video coding |
-
2017
- 2017-03-28 JP JP2017063747A patent/JP6942504B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000261809A (en) * | 1999-03-05 | 2000-09-22 | Kdd Corp | Image coder coping with feature of picture |
JP2000324498A (en) * | 1999-05-13 | 2000-11-24 | Nec Corp | Animation encoding device |
WO2005076629A1 (en) * | 2004-02-09 | 2005-08-18 | Sanyo Electric Co., Ltd | Image encoding device and method, image decoding device and method, and imaging device |
JP2009284058A (en) * | 2008-05-20 | 2009-12-03 | Mitsubishi Electric Corp | Moving image encoding device |
JP2016195326A (en) * | 2015-03-31 | 2016-11-17 | 富士通株式会社 | Video encoder, video coding method, and computer program for video coding |
Also Published As
Publication number | Publication date |
---|---|
JP6942504B2 (en) | 2021-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11902563B2 (en) | Encoding and decoding method and device, encoder side apparatus and decoder side apparatus | |
US20070047653A1 (en) | Enhanced motion estimation method, video encoding method and apparatus using the same | |
US20050238100A1 (en) | Video encoding method for encoding P frame and B frame using I frames | |
CN108076347B (en) | Method and device for acquiring coding starting point | |
CN113259661A (en) | Method and device for video decoding | |
US8514935B2 (en) | Image coding apparatus, image coding method, integrated circuit, and camera | |
JP5313326B2 (en) | Image decoding apparatus, method and program, and image encoding apparatus, method and program | |
CN112740696A (en) | Video encoding and decoding | |
US20220377319A1 (en) | Prediction weighted table-based image/video coding method and apparatus | |
TW201924352A (en) | Method and encoder for encoding a video stream in a video coding format supporting auxiliary frames | |
US9762916B2 (en) | Encoding apparatus and method | |
JP2007134755A (en) | Moving picture encoder and image recording and reproducing device | |
WO2006126694A2 (en) | Video coding using an alternative reference frame for motion compensated prediction | |
US11290740B2 (en) | Image coding apparatus, image coding method, and storage medium | |
CN115996214A (en) | Multimedia data processing method, device, equipment and storage medium | |
US9648336B2 (en) | Encoding apparatus and method | |
JP6253406B2 (en) | Image encoding apparatus, imaging apparatus, image encoding method, and program | |
US9743079B2 (en) | Image processing apparatus and image processing method for the collective transfer of prediction parameters between storage units | |
TW202110194A (en) | Gradual random access (gra) signalling in video coding | |
JP2018085660A (en) | Image encoder | |
JP5053774B2 (en) | Video encoding device | |
JP6942504B2 (en) | Coding device, imaging device, coding method, and program | |
CN118216148A (en) | Video coding method and related device thereof | |
CN114128272A (en) | Video or image coding based on mapping of luma samples and scaling of chroma samples | |
JP2018191136A (en) | Encoding device, encoding method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200324 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210210 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210305 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210401 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210810 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210908 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6942504 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |