JP2018166306A - Coding apparatus, imaging apparatus, coding method, and program - Google Patents

Coding apparatus, imaging apparatus, coding method, and program Download PDF

Info

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
Application number
JP2017063747A
Other languages
Japanese (ja)
Other versions
JP6942504B2 (en
Inventor
貴史 村田
Takashi Murata
貴史 村田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2017063747A priority Critical patent/JP6942504B2/en
Publication of JP2018166306A publication Critical patent/JP2018166306A/en
Application granted granted Critical
Publication of JP6942504B2 publication Critical patent/JP6942504B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technique for suppressing deterioration in image quality while suppressing an increase in storage capacity used by storing a reference image when resolution of a coding target image increases.SOLUTION: The coding apparatus is so configured that, when a resolution in a first direction of a coding target image is a first resolution, selecting means selects a reference image such that a temporal distance between the coding target image and a reference image is within a first distance, and motion vector detecting means searches a search range of a 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 coding target image is a second resolution higher than the first resolution, the selecting means selects the reference image such that the temporal distance between the coding target image and the reference image is within a second distance shorter than the first distance, and the motion vector detection means searches a search range of the motion vector in the second direction as a second search range narrower than the first search range.SELECTED DRAWING: Figure 10

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.

特開2010−239230号公報JP 2010-239230 A

動きベクトル検出に用いる参照画像格納用のラインバッファの水平方向サイズは、画像の水平解像度に依存する。そのため、動画像の高解像度化に伴い、ラインバッファの水平方向サイズを大きくする必要がある。   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.

符号化装置を含む撮像装置100の構成を示すブロック図。The block diagram which shows the structure of the imaging device 100 containing an encoding apparatus. GOP構造の例を示す図。The figure which shows the example of a GOP structure. TemporalIDを用いた構成の例を示す図。The figure which shows the example of a structure using TemporalID. 符号化対象ブロック(CTU(Coding Tree Unit))と動きベクトル検出の探索範囲を示す図。The figure which shows the search range of an encoding object block (CTU (Coding Tree Unit)) and motion vector detection. CTU401の次の符号化対象CTUに対応する動きベクトル検出の探索範囲を示す図。The figure which shows the search range of the motion vector detection corresponding to the encoding object CTU next to CTU401. 画面の右端までが探索範囲となるCTU(43,0)に対応する動きベクトル検出の探索範囲を示す図。The figure which shows the search range of the motion vector detection corresponding to CTU (43,0) which becomes a search range to the right end of a screen. CTU(0,1)に対応する動きベクトル検出の探索範囲を示す図。The figure which shows the search range of the motion vector detection corresponding to CTU (0, 1). 符号化対象CTUの上下の探索範囲が等しくなると共に画面の上端までが探索範囲となるCTU(43,5)に対応する動きベクトル検出の探索範囲を示す図。The figure which shows the search range of the motion vector detection corresponding to CTU (43, 5) from which the search range of the upper and lower sides of encoding object CTU becomes equal, and becomes a search range to the upper end of a screen. CTU(0,6)に対応する動きベクトル検出の探索範囲を示す図。The figure which shows the search range of the motion vector detection corresponding to CTU (0, 6). 撮像装置100が実行する符号化処理のフローチャート。6 is a flowchart of encoding processing executed by the imaging apparatus 100.

以下、添付図面を参照して、本発明の実施形態を説明する。なお、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。また、実施形態の中で説明されている特徴の組み合わせすべてが、本発明に必須とは限らない。また、別々の実施形態の中で説明されている特徴を適宜組み合せることも可能である。   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 imaging apparatus 100 including an encoding apparatus. In the following description, it is assumed that the imaging apparatus 100 is compatible with HEVC. However, the encoding method of the present embodiment is not limited to HEVC, and can be applied to any encoding method involving motion compensation prediction encoding. It is.

撮影される画像は、レンズ101を通して撮像部102に入力される。撮像部102は、画像をデジタル画素データに変換し、現像処理部103に送る。現像処理部103では、ディベイヤー処理、キズ補正、ノイズ除去、拡大縮小処理、YCbCr形式への色変換処理などの画像処理が行われる。画像処理後の、圧縮符号化を行うことができる形式になった画像が、符号化フレームバッファ104に入力される。撮像装置100は、この画像を符号化対象画像として用いる。参照フレームバッファ105は、参照画像を格納する。符号化ブロックバッファ106は、符号化フレームバッファ104に格納されている符号化対象画像をブロック単位で取得し、符号化対象ブロックとして格納する。   The captured image is input to the imaging unit 102 through the lens 101. The imaging unit 102 converts the image into digital pixel data and sends it to the development processing unit 103. The development processing unit 103 performs image processing such as debayer processing, scratch correction, noise removal, enlargement / reduction processing, and color conversion processing to the YCbCr format. An image in a format that can be subjected to compression encoding after image processing is input to the encoding frame buffer 104. The imaging apparatus 100 uses this image as an encoding target image. The reference frame buffer 105 stores a reference image. The encoding block buffer 106 acquires the encoding target image stored in the encoding frame buffer 104 for each block and stores it as an encoding target block.

参照ラインバッファ107は、動きベクトル検出に必要な参照画像を参照フレームバッファ105から取得して格納する。なお、参照ラインバッファ107が同時に保持する参照画像(バッファ画像)は、参照画像の全体ではなく一部である(詳細は図4〜図9を参照して後述)。   The reference line buffer 107 acquires a reference image necessary for motion vector detection from the reference frame buffer 105 and stores it. Note that the reference image (buffer image) simultaneously held by the reference line buffer 107 is not the entire reference image but a part thereof (details will be described later with reference to FIGS. 4 to 9).

符号化フレームバッファ104及び参照フレームバッファ105は、不図示のDRAM(Dynamic Random Access Memory)を用いて実装される。また、符号化ブロックバッファ106及び参照ラインバッファ107は、符号化フレームバッファ104及び参照フレームバッファ105とは異なるメモリを用いて実装される。例えば、符号化フレームバッファ104及び参照フレームバッファ105は、不図示のSRAM(Static Random Access Memory)を用いて実装される。   The encoding frame buffer 104 and the reference frame buffer 105 are implemented using a DRAM (Dynamic Random Access Memory) (not shown). Also, the encoding block buffer 106 and the reference line buffer 107 are implemented using a memory different from the encoding frame buffer 104 and the reference frame buffer 105. For example, the encoding frame buffer 104 and the reference frame buffer 105 are implemented using an unillustrated SRAM (Static Random Access Memory).

動き予測部108は、符号化ブロックバッファ106に格納されている符号化対象ブロックと、参照ラインバッファ107に格納されている参照画像との間でブロックマッチングを行うことにより、動きベクトル検出を行う。動き予測部108は、符号化対象ブロックと、検出された動きベクトルに対応する位置の参照画像(予測画像)との間で画素の差分をとり、その差分画像を直交変換部109に出力する。また、動き予測部108は、ローカルデコード画像作成のために、予測画像を動き補償部116に出力する。   The motion prediction unit 108 performs motion vector detection by performing block matching between the encoding target block stored in the encoding block buffer 106 and the reference image stored in the reference line buffer 107. The motion prediction unit 108 takes a pixel difference between the encoding target block and a reference image (prediction image) at a position corresponding to the detected motion vector, and outputs the difference image to the orthogonal transformation unit 109. In addition, the motion prediction unit 108 outputs the predicted image to the motion compensation unit 116 in order to create a local decoded image.

直交変換部109は、動き予測部108から出力された差分画像に対して離散コサイン変換を行い、変換係数を生成し、量子化部110に出力する。   The orthogonal transform unit 109 performs discrete cosine transform on the difference image output from the motion prediction unit 108, generates a transform coefficient, and outputs the transform coefficient to the quantization unit 110.

量子化部110は、直交変換部109から出力された変換係数に対して、量子化制御部111が出力する量子化ステップサイズに従い、量子化を行う。量子化された変換係数は、符号化ストリーム作成のために可変長符号化部112に出力されると共に、ローカルデコード画像作成のために逆量子化部114に出力される。   The quantization unit 110 quantizes the transform coefficient output from the orthogonal transform unit 109 according to the quantization step size output from the quantization control unit 111. The quantized transform coefficient is output to the variable length encoding unit 112 for generating an encoded stream, and is output to the inverse quantization unit 114 for generating a local decoded image.

可変長符号化部112は、量子化後の変換係数に対してジグザグスキャン、オルタネートスキャン等を行い、可変長符号化を行う。また、可変長符号化部112は、可変長符号化された変換係数に対して、動きベクトル、量子化ステップサイズ、ブロック分割情報、適応オフセット処理用パラメータなどの符号化方式情報を可変長符号化したものを付加し、符号化ストリームを生成する。生成された符号化ストリームは、記録メディア113に記録される。また、可変長符号化部112は、符号化の際にブロックごとの発生符号量を算出し、量子化制御部111に出力する。   The variable length coding unit 112 performs zigzag scanning, alternate scanning, and the like on the quantized transform coefficients to perform variable length coding. In addition, the variable length coding unit 112 performs variable length coding on coding method information such as motion vectors, quantization step sizes, block division information, and parameters for adaptive offset processing with respect to variable length coded transform coefficients. Is added to generate an encoded stream. The generated encoded stream is recorded on the recording medium 113. In addition, the variable length coding unit 112 calculates a generated code amount for each block at the time of coding and outputs it to the quantization control unit 111.

量子化制御部111は、可変長符号化部112から出力された発生符号量を用いて、目標とする符号量になるように量子化ステップサイズを決定し、量子化部110に出力する。   The quantization control unit 111 uses the generated code amount output from the variable length encoding unit 112 to determine a quantization step size so as to be a target code amount, and outputs the quantization step size to the quantization unit 110.

逆量子化部114は、量子化部110から出力された量子化後の変換係数に対して逆量子化を行い、ローカルデコード用の変換係数を生成する。この変換係数は、逆直交変換部115に出力される。   The inverse quantization unit 114 performs inverse quantization on the quantized transform coefficient output from the quantization unit 110 to generate a transform coefficient for local decoding. The transform coefficient is output to the inverse orthogonal transform unit 115.

逆直交変換部115は、逆量子化部114から出力された変換係数に対して逆離散コサイン変換を行い、差分画像を生成する。生成された差分画像は、動き補償部116に出力される。   The inverse orthogonal transform unit 115 performs inverse discrete cosine transform on the transform coefficient output from the inverse quantization unit 114 to generate a difference image. The generated difference image is output to the motion compensation unit 116.

動き補償部116は、動き予測部108から出力された予測画像と、逆直交変換部115から出力された差分画像とを加算することにより、ローカルデコード用の画像データを生成する。生成された画像データは、デブロッキングフィルタ部117に出力される。   The motion compensation unit 116 adds the predicted image output from the motion prediction unit 108 and the difference image output from the inverse orthogonal transform unit 115 to generate image data for local decoding. The generated image data is output to the deblocking filter unit 117.

デブロッキングフィルタ部117は、動き補償部116から出力された画像データに対してデブロッキングフィルタをかける。デブロッキングフィルタ後の画像は、適応オフセット処理部118に出力される。   The deblocking filter unit 117 applies a deblocking filter to the image data output from the motion compensation unit 116. The image after the deblocking filter is output to the adaptive offset processing unit 118.

適応オフセット処理部118は、バンドオフセット処理、エッジオフセット処理、もしくは何も処理をしない、のいずれかの選択を行い、適応オフセット処理を行うバンド位置、エッジ方向、オフセット値などを決定する。そして、適応オフセット処理部118は、デブロッキングフィルタ後の画像に対して適応オフセット処理を行ったものをローカルデコード画像として参照フレームバッファ105に格納する。また、適応オフセット処理部118は、適応オフセット処理としてどの処理を選択したか、バンド位置、エッジ方向、オフセット値などの、適応オフセット処理用のパラメータを、符号化ストリームとして生成するため、可変長符号化部112に出力する。このような動作により、符号化ストリーム及びローカルデコード画像が作成される。   The adaptive offset processing unit 118 selects one of band offset processing, edge offset processing, or no processing, and determines a band position, an edge direction, an offset value, and the like for performing the adaptive offset processing. Then, the adaptive offset processing unit 118 stores, in the reference frame buffer 105, a local decoded image obtained by performing the adaptive offset processing on the image after the deblocking filter. The adaptive offset processing unit 118 generates a parameter for adaptive offset processing such as a band position, an edge direction, and an offset value as an encoded stream, which variable length code has been selected as the adaptive offset processing. To the conversion unit 112. By such an operation, an encoded stream and a local decoded image are created.

探索範囲制御部119は、入力画像の解像度情報に基づいて、動きベクトル検出の垂直探索範囲を決定する。符号化制御部120は、入力画像の解像度情報に基づいて、符号化対象画像と動き検出時に参照する画像(参照画像)との参照関係、即ちGOP(Group of Pictures)構造を決定する。また、符号化制御部120は、ROM(不図示)に格納された制御プログラムに従って撮像装置100の各部を制御することにより、符号化処理を制御する。   The search range control unit 119 determines a vertical search range for motion vector detection based on the resolution information of the input image. The encoding control unit 120 determines a reference relationship between an encoding target image and an image (reference image) referred to at the time of motion detection, that is, a GOP (Group of Pictures) structure, based on the resolution information of the input image. Also, the encoding control unit 120 controls the encoding process by controlling each unit of the imaging apparatus 100 according to a control program stored in a ROM (not shown).

図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 P picture 201 refers to an I picture 202 eight frames before, and this reference is the maximum reference distance in time. A GOP structure in which the maximum reference distance in time is 8 pictures is defined as “M = 8”. At this time, the B picture 203 refers to the P picture 201 or the I picture 202. The B picture 204 refers to the I picture 202 or the B picture 203. The B picture 205 refers to the P picture 201 or the B picture 203. The B picture 206 refers to the I picture 202 or the B picture 204. The B picture 207 refers to the B picture 203 or the B picture 204. The B picture 208 refers to the B picture 203 or the B picture 205. The B picture 209 refers to the P picture 201 or the B picture 205.

図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 P picture 210 refers to the previous I picture 211, and this reference is the maximum reference distance in time. A GOP structure in which the maximum reference distance in time is four pictures is defined as “M = 4”. At this time, the B picture 212 refers to the P picture 210 or the I picture 211. The B picture 213 refers to the I picture 211 or the B picture 212. The B picture 214 refers to the P picture 210 or the B picture 212.

図2(c)において、Pピクチャ215は、3枚前のIピクチャ216を参照しており、この参照が時間的に最大の参照距離である。このように時間的に最大の参照距離が3枚のピクチャであるGOP構造を、「M=3」と定義する。この時、Bピクチャ217及びBピクチャ218は、Pピクチャ215又はIピクチャ216を参照する。   In FIG. 2C, the P picture 215 refers to the previous I picture 216, and this reference is the maximum reference distance in time. A GOP structure in which the maximum reference distance in time is three pictures is defined as “M = 3”. At this time, the B picture 217 and the B picture 218 refer to the P picture 215 or the I picture 216.

図2(d)において、Pピクチャ219は、2枚前のIピクチャ220を参照しており、この参照が時間的に最大の参照距離である。このように時間的に最大の参照距離が2枚のピクチャであるGOP構造を、「M=2」と定義する。この時、Bピクチャ221は、Pピクチャ219又はIピクチャ220を参照する。   In FIG. 2D, the P picture 219 refers to the previous I picture 220, and this reference is the maximum reference distance in time. The GOP structure in which the maximum reference distance in time is two pictures is defined as “M = 2”. At this time, the B picture 221 refers to the P picture 219 or the I picture 220.

このように、符号化対象画像と参照画像との間の時間的な距離は、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 I picture 202, the B pictures 203, 204, 205, and the P picture 201 can be reproduced by taking out and reproducing the stream of the portion of TemporalID = 0, 1, 2. That is, it is possible to extract and reproduce only the 30p portion from the 60p stream. At this time, the temporal ID is 0 for the picture having the maximum temporal reference distance (here, P picture 201).

次に、参照ラインバッファ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 CTU 401 is a CTU at the head of a picture and corresponds to CTU (0, 0). In this case, the reference image 402 serving as a search range for motion vector detection has 544 pixels in the horizontal direction of 0 to 543 and 160 lines in the vertical direction of 0 to 159. The encoding control unit 120 acquires the reference image 402 from the reference frame buffer 105 and stores it in the reference line buffer 107 before encoding the CTU 401.

図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 next CTU 401 to be encoded. The CTU 501 corresponds to CTU (1, 0). In this case, the reference image 502 serving as a search range for motion vector detection has 576 pixels in the horizontal direction of 0 to 575 and 160 lines in the vertical direction of 0 to 159. Prior to encoding of the CTU 501, reference images in the horizontal direction 0 to 543 are already stored in the reference line buffer 107. Therefore, the encoding control unit 120 acquires only the reference image 503 in the horizontal direction 544 to 575 that is newly required from the reference frame buffer 105 and stores it in the reference line buffer 107.

次に、図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 CTU 601 corresponds to the CTU (43, 0). The reference image 602 serving as the search range for motion vector detection at this time has 1056 pixels in the horizontal direction from 864 to 1919 and 160 lines in the vertical direction from 0 to 159. The reference image 603 is a portion of 0 to 863 in the horizontal direction and 0 to 159 in the vertical direction. This portion is outside the search range of the CTU 601, but is necessary when detecting the motion vector of the next CTU line. It has been retained.

図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 CTU 701 corresponds to CTU (0, 1). The reference image 702 serving as a search range for motion vector detection at this time has 544 pixels in the horizontal direction of 0 to 543 and 192 lines in the vertical direction of 0 to 191. At the start of encoding of the CTU 701, the reference image in the vertical direction 0 to 159 has already been stored in the reference line buffer 107 because it has been used for previous encoding. Therefore, the encoding control unit 120 acquires only the reference images 703 in the horizontal direction 0 to 543 and the vertical directions 160 to 191 that are newly required from the reference frame buffer 105 and stores them in the reference line buffer 107.

次に、図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 CTU 801 corresponds to the CTU (43, 5). The reference image 802 serving as a search range for motion vector detection at this time has 1056 pixels in the horizontal direction from 864 to 1919 and 288 lines in the vertical direction from 0 to 287. At this time, the reference line buffer 107 stores a reference image of 0 to 1919 in the horizontal direction which is the same as the resolution of the encoding target image and 0 to 287 in the vertical direction corresponding to the search range.

次に、図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 CTU 901 corresponds to CTU (0, 6). The reference image 902 serving as a search range for motion vector detection at this time has 544 pixels in the horizontal direction of 0 to 543 and 288 lines in the vertical direction of 32 to 319. The reference images 903 in the horizontal direction 0 to 1919 and the vertical direction 0 to 31 do not become the search range in subsequent CTUs. For this reason, the encoding control unit 120 sets a part of the SRAM in which the reference image 903 has been stored as an empty area, and stores a newly required reference image in this part. That is, the encoding control unit 120 uses the reference line buffer 107 to store the reference image 904 in the horizontal direction 0 to 543 and the vertical direction 288 to 319 that are newly required, using the SRAM of the part in which the reference image 903 is stored. To store.

このように、参照ラインバッファ107は、水平方向サイズが符号化対象画像の水平解像度に一致し、垂直方向サイズが垂直方向の最大探索範囲(垂直CTUサイズを含む)に一致するように使用される。符号化対象画像の解像度が1920×1080、CTUサイズが32×32の場合、参照ラインバッファ107の水平方向サイズは、符号化対象画像の水平解像度である1920画素となる。また、参照ラインバッファ107の垂直方向サイズは、垂直探索範囲(垂直CTUサイズを除く)が±128ラインで256ライン、垂直CTUサイズが32ラインなので、合計288ラインとなる。そして、参照ラインバッファ107に記憶されるバッファ画像の水平方向における最大サイズは、水平解像度に対応する1920画素となる。   Thus, the reference line buffer 107 is used so that the horizontal size matches the horizontal resolution of the encoding target image, and the vertical size matches the maximum search range (including the vertical CTU size) in the vertical direction. . When the resolution of the encoding target image is 1920 × 1080 and the CTU size is 32 × 32, the horizontal size of the reference line buffer 107 is 1920 pixels that is the horizontal resolution of the encoding target image. The vertical size of the reference line buffer 107 is 288 lines in total because the vertical search range (excluding the vertical CTU size) is ± 128 lines and 256 lines, and the vertical CTU size is 32 lines. The maximum size of the buffer image stored in the reference line buffer 107 in the horizontal direction is 1920 pixels corresponding to the horizontal resolution.

次に、符号化対象画像の解像度が高くなる場合について説明する。上の説明では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 reference line buffer 107, it is necessary to decrease the vertical size from 288 lines to 144 lines. In this case, the maximum search range in the vertical direction (including the vertical CTU size) is also reduced from 288 lines to 144 lines. As a result, the search range in the vertical direction becomes narrower than the original movement of the subject, and the possibility that the movement cannot be tracked increases, which may lead to image quality degradation.

垂直方向の探索範囲の縮小を補償するために、符号化制御部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 encoding control unit 120 shortens the maximum time distance of the reference image for motion vector detection by changing the GOP structure. For example, consider a case where the GOP structure when the resolution is 1920 × 1080 is M = 8. In this case, when the resolution increases to 3840 × 2160, the encoding control unit 120 changes the GOP structure to M = 4. When the time distance of the reference image is halved, the movement of the corresponding subject is also halved. Accordingly, it is possible to compensate for the halving of the vertical search range accompanying the halving of the vertical size of the reference line buffer 107.

なお、ここでは画素密度の変化に伴う空間的な探索範囲の変化については考慮しないものとする。画素密度に関わらず単純に探索範囲の画素数だけで比較した場合でも、符号化対象画像の解像度の上昇に伴って探索範囲の縮小が生じ、参照画像の時間距離の短縮により探索範囲の画素数の減少を補償することができる。   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 reference line buffer 107 in the vertical direction. For example, even by changing the GOP structure from M = 8 to M = 7, the reduction in the vertical size of the reference line buffer 107 can be compensated to some extent.

図10は、撮像装置100が実行する符号化処理のフローチャートである。本フローチャートの各ステップの処理は、特に断らない限り、符号化制御部120が制御プログラムに従って撮像装置100の各部を制御することにより実現される。   FIG. 10 is a flowchart of the encoding process executed by the imaging apparatus 100. Unless otherwise specified, the processing of each step in this flowchart is realized by the encoding control unit 120 controlling each unit of the imaging apparatus 100 according to the control program.

S1001で、符号化制御部120は、符号化対象画像の水平解像度を確認し、水平解像度が1920であれば処理をS1002へ進め、水平解像度が3840であれば処理をS1004へ進める。   In S1001, the encoding control unit 120 checks the horizontal resolution of the encoding target image. If the horizontal resolution is 1920, the process proceeds to S1002, and if the horizontal resolution is 3840, the process proceeds to S1004.

S1002で、符号化制御部120は、GOP構造をM=8に設定する。S1003で、符号化制御部120は、垂直探索範囲を288ラインに設定する。   In S1002, the encoding control unit 120 sets the GOP structure to M = 8. In S1003, the encoding control unit 120 sets the vertical search range to 288 lines.

S1004で、符号化制御部120は、GOP構造をM=4に設定する。S1005で、符号化制御部120は、垂直探索範囲を144ラインに設定する。   In S1004, the encoding control unit 120 sets the GOP structure to M = 4. In S1005, the encoding control unit 120 sets the vertical search range to 144 lines.

S1006で、符号化制御部120は、符号化対象画像を符号化する。この時、符号化制御部120は、上で設定したGOP構造及び垂直探索範囲を使用して動きベクトルの検出(参照画像の選択、参照ラインバッファ107への参照画像の格納など)を行う。   In S1006, the encoding control unit 120 encodes the encoding target image. At this time, the encoding control unit 120 performs motion vector detection (selection of a reference image, storage of a reference image in the reference line buffer 107, etc.) using the GOP structure and vertical search range set above.

以上説明したように、第1の実施形態によれば、撮像装置100は、符号化対象画像の水平解像度が上昇すると、動きベクトル検出における垂直方向の探索範囲を縮小すると共に、参照画像の時間的な距離の最大値を減少させる。これにより、符号化対象画像の解像度が上昇する場合に、参照画像の格納により使用される記憶容量の増加を抑制しつつ画質劣化を抑制することが可能となる。   As described above, according to the first embodiment, when the horizontal resolution of the encoding target image increases, the imaging apparatus 100 reduces the search range in the vertical direction in motion vector detection and temporally compares the reference image. Reduce the maximum distance. As a result, when the resolution of the encoding target image increases, it is possible to suppress image quality deterioration while suppressing an increase in storage capacity used by storing the reference image.

なお、図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 reference line buffer 107 is a vertical line buffer, the encoding control unit 120 confirms the vertical resolution in S1001. Then, the encoding control unit 120 sets the horizontal search range in S1004 and S1005 so that the horizontal search range is reduced as the vertical resolution increases. When generalized, the encoding control unit 120 reduces the search range in the second direction orthogonal to the first direction in motion vector detection as the resolution in the first direction of the encoding target image increases, The maximum value of the temporal distance of the reference image is decreased. The greater the degree of reduction of the search range, the more the storage capacity of the reference line buffer 107 is suppressed. Also, the greater the degree of decrease in the maximum value of the temporal distance of the reference image, the greater the degree that the search range can be compensated.

[その他の実施形態]
本発明は、上述の実施形態の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 SYMBOLS 104 ... Encoding frame buffer, 105 ... Reference frame buffer, 106 ... Encoding block buffer, 107 ... Reference line buffer, 108 ... Motion estimation part, 109 ... Orthogonal transformation part, 110 ... Quantization part, 112 ... Variable length encoding Unit, 120 ... encoding control unit

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.
前記第1の方向における前記バッファ画像の最大サイズは、前記符号化対象画像の前記第1の方向の解像度に対応する
ことを特徴とする請求項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の距離と前記第2の距離との比は、前記第1の探索範囲と前記第2の探索範囲との比に等しい
ことを特徴とする請求項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の方向は水平方向であり、前記第2の方向は垂直方向である
ことを特徴とする請求項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.
請求項1乃至6のいずれか1項に記載の符号化装置と、
前記動画像を生成する撮像手段と、
を備えることを特徴とする撮像装置。
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.
コンピュータを、請求項1乃至6のいずれか1項に記載の符号化装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the encoding apparatus of any one of Claims 1 thru | or 6.
JP2017063747A 2017-03-28 2017-03-28 Coding device, imaging device, coding method, and program Active JP6942504B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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