JP2019022225A - Image compression apparatus and program - Google Patents

Image compression apparatus and program Download PDF

Info

Publication number
JP2019022225A
JP2019022225A JP2018188616A JP2018188616A JP2019022225A JP 2019022225 A JP2019022225 A JP 2019022225A JP 2018188616 A JP2018188616 A JP 2018188616A JP 2018188616 A JP2018188616 A JP 2018188616A JP 2019022225 A JP2019022225 A JP 2019022225A
Authority
JP
Japan
Prior art keywords
image
unit
sample points
compression
thinned
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
Application number
JP2018188616A
Other languages
Japanese (ja)
Inventor
安藤 一郎
Ichiro Ando
一郎 安藤
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2018188616A priority Critical patent/JP2019022225A/en
Publication of JP2019022225A publication Critical patent/JP2019022225A/en
Pending legal-status Critical Current

Links

Images

Abstract

To suppress coding efficiency decreases and image quality degradation during compression.SOLUTION: A decimation part of an image compression device generates a decimation image by discretely extracting sample points along a row direction from an image of a compression source such that points between sample points in odd-numbered rows and sample points in even-numbered rows are displaced in a row direction. A first image forming section forms a first image by extracting sample points in odd-numbered rows from the decimation image. A second image forming section forms a second image by extracting sample points in even-numbered rows from the decimation image. A coding section codes the first image and the second image, respectively. An output section outputs coded information of the first image and the coded information of the second image such that these pieces of information are associated with added information indicating a system for decoding to the decimation image.SELECTED DRAWING: Figure 2

Description

本発明は、画像圧縮装置およびプログラムに関する。   The present invention relates to an image compression apparatus and a program.

従来から、画像の圧縮符号化のときに標本点を間引きすることで、情報量を効率よく削減することが知られている。例えば、垂直方向や水平方向と比べて斜め方向の解像度低下は視覚的に認識しづらい点に着目し、画像を斜め方向に間引きして符号化することも行われている(例えば、特許文献1)。   Conventionally, it has been known that the amount of information can be efficiently reduced by thinning sample points when compressing and encoding an image. For example, attention is paid to the point that it is difficult to visually recognize a decrease in resolution in an oblique direction as compared with the vertical direction and the horizontal direction, and an image is thinned out in an oblique direction and encoded (for example, Patent Document 1). ).

特表2005−522958号公報JP 2005-522958 A

しかし、斜め方向の間引きを行った画像を圧縮する場合、絵柄によっては隣接する標本点との相関が低下し、符号化効率の低下や画質劣化が生じることがある。   However, when compressing an image that has been thinned in an oblique direction, the correlation with adjacent sample points may be reduced depending on the pattern, resulting in a reduction in coding efficiency and image quality degradation.

本発明の一例としての画像圧縮装置は、間引き部と、第1画像生成部と、第2画像生成部と、符号化部と、出力部とを備える。間引き部は、奇数番目の行の標本点と偶数番目の行の標本点との位置が行方向にずれるように、圧縮元の画像から行方向に沿って標本点を離散的に抽出して間引き画像を生成する。第1画像生成部は、間引き画像から奇数番目の行の標本点を抽出して第1画像を生成する。第2画像生成部は、間引き画像から偶数番目の行の標本点を抽出して第2画像を生成する。符号化部は、第1画像および第2画像をそれぞれ符号化する。出力部は、第1画像の符号化情報および第2画像の符号化情報に、間引き画像への復号方式を示す付帯情報を対応付けて出力する。   An image compression apparatus as an example of the present invention includes a thinning unit, a first image generation unit, a second image generation unit, an encoding unit, and an output unit. The thinning unit discretely extracts sample points along the row direction from the compression source image so that the positions of the sample points of the odd-numbered rows and the sample points of the even-numbered rows are shifted in the row direction. Generate an image. The first image generation unit generates a first image by extracting the sample points in the odd-numbered rows from the thinned image. The second image generation unit generates a second image by extracting even-numbered sample points from the thinned image. The encoding unit encodes the first image and the second image, respectively. The output unit outputs the encoded information of the first image and the encoded information of the second image in association with incidental information indicating a decoding method for the thinned image.

本発明の一例によれば、圧縮時における符号化効率の低下や画質劣化を抑制できる。   According to an example of the present invention, it is possible to suppress a decrease in encoding efficiency and image quality degradation during compression.

第1実施形態の電子カメラの構成例を示す図The figure which shows the structural example of the electronic camera of 1st Embodiment. 図1の圧縮処理部の構成例を示す図The figure which shows the structural example of the compression process part of FIG. (a)〜(e):YUV4:4:4形式の画像での圧縮時の間引き例を示す図(A)-(e): The figure which shows the thinning-out example at the time of the compression by the image of YUV4: 4: 4 format (a)〜(e):YUV4:2:2形式の画像での圧縮時の間引き例を示す図(A)-(e): The figure which shows the thinning-out example at the time of the compression by the image of a YUV4: 2: 2 format (a)〜(e):YUV4:2:0形式の画像での圧縮時の間引きの一例を示す図(A)-(e): The figure which shows an example of the thinning | decimation at the time of compression with the image of a YUV4: 2: 0 format (a)〜(e):YUV4:2:0形式の画像での圧縮時の間引きの別例を示す図(A)-(e): The figure which shows another example of the thinning | decimation at the time of compression with the image of YUV4: 2: 0 format 図2の符号化部の構成例を示す図The figure which shows the structural example of the encoding part of FIG. 図1の復号処理部の構成例を示す図The figure which shows the structural example of the decoding process part of FIG. (a)〜(c):YUV4:4:4形式の画像での復号時の補間例を示す図(A)-(c): The figure which shows the example of interpolation at the time of decoding with the image of YUV4: 4: 4 format (a)〜(c):YUV4:2:2形式の画像での復号時の補間例を示す図(A)-(c): The figure which shows the example of interpolation at the time of the decoding at the image of YUV4: 2: 2 format (a)〜(c):YUV4:2:0形式の画像での復号時の補間の一例を示す図(A)-(c): The figure which shows an example of the interpolation at the time of decoding with the image of a YUV4: 2: 0 format (a)〜(c):YUV4:2:0形式の画像での復号時の補間の別例を示す図(A)-(c): The figure which shows another example of the interpolation at the time of decoding with the image of a YUV4: 2: 0 format 図8の復号部の構成例を示す図The figure which shows the structural example of the decoding part of FIG. 圧縮処理部での動画像の圧縮動作例を示す流れ図Flow chart showing an example of moving image compression operation in the compression processing unit (a)〜(c):第1実施形態での動画像の符号化形式の例を示す図(A)-(c): The figure which shows the example of the encoding format of the moving image in 1st Embodiment. 復号処理部での動画像の復号動作例を示す流れ図Flow chart showing an example of a moving image decoding operation in the decoding processing unit 補間部での補間処理の例を示す図The figure which shows the example of the interpolation process in an interpolation part 第2実施形態での圧縮処理部の構成例を示す図The figure which shows the structural example of the compression process part in 2nd Embodiment. 第2実施形態での復号処理部の構成例を示す図The figure which shows the structural example of the decoding process part in 2nd Embodiment. 第2実施形態の圧縮処理部での動画像の圧縮動作例を示す流れ図Flow chart showing an example of a moving image compression operation in the compression processing unit of the second embodiment (a),(b):第2実施形態での動画像の符号化形式の例を示す図(A), (b): The figure which shows the example of the encoding format of the moving image in 2nd Embodiment. 或るフレームの第2画像を、同じフレームの第1画像を参照して動き補償予測する例を示す図The figure which shows the example which carries out motion compensation prediction of the 2nd image of a certain frame with reference to the 1st image of the same frame 図20の#310での圧縮符号化処理の例を示す流れ図FIG. 20 is a flowchart illustrating an example of the compression encoding process in # 310 of FIG. 図23の#404での動き補償予測の処理例を示す流れ図23 is a flowchart showing an example of motion compensation prediction processing in # 404 of FIG. 第2実施形態の復号処理部での動画像の復号動作例を示す流れ図A flowchart showing an example of a moving image decoding operation in the decoding processing unit of the second embodiment. 図25の#604での復号処理の例を示す流れ図FIG. 25 is a flowchart showing an example of the decoding process in # 604 of FIG. 図26の#705での動き補償予測の処理例を示す流れ図26 is a flowchart showing an example of motion compensation prediction processing in # 705 of FIG. 第3実施形態での装置構成例を示す図The figure which shows the apparatus structural example in 3rd Embodiment.

<第1実施形態の説明>
図1は、撮像装置、画像圧縮装置、画像復号装置の一例である第1実施形態の電子カメラの構成例を示す図である。なお、第1実施形態の電子カメラ100は動画撮影機能を有している。
<Description of First Embodiment>
FIG. 1 is a diagram illustrating a configuration example of an electronic camera according to the first embodiment which is an example of an imaging device, an image compression device, and an image decoding device. Note that the electronic camera 100 of the first embodiment has a moving image shooting function.

電子カメラ100は、撮像光学系101と、撮像素子102と、信号処理部103と、画像処理エンジン104と、第1メモリ105および第2メモリ106と、記録I/F107と、モニタ108と、操作部109とを有している。ここで、信号処理部103、第1メモリ105、第2メモリ106、記録I/F107、モニタ108および操作部109は、それぞれ画像処理エンジン104と接続されている。なお、操作部109は、ユーザの操作(例えば動画撮影の指示や、モード切り替えの指示など)を受け付けるスイッチである。   The electronic camera 100 includes an imaging optical system 101, an imaging element 102, a signal processing unit 103, an image processing engine 104, a first memory 105 and a second memory 106, a recording I / F 107, a monitor 108, and an operation. Part 109. Here, the signal processing unit 103, the first memory 105, the second memory 106, the recording I / F 107, the monitor 108, and the operation unit 109 are each connected to the image processing engine 104. The operation unit 109 is a switch that receives a user operation (for example, an instruction for moving image shooting, an instruction for mode switching, or the like).

撮像光学系101は、例えばズームレンズやフォーカスレンズを含む複数のレンズで構成されている。なお、簡単のため、図1では撮像光学系101を1枚のレンズで図示する。   The imaging optical system 101 includes a plurality of lenses including, for example, a zoom lens and a focus lens. For simplicity, the imaging optical system 101 is illustrated as a single lens in FIG.

撮像素子102は、撮像光学系101を通過した光束による被写体の結像を撮像(撮影)するデバイスである。なお、電子カメラ100の撮影モードの1つである動画撮影モードでは、撮像素子102は、不揮発性の記憶媒体(110)への記録を伴う動画像の撮影を実行する。撮像素子102の出力は、画像処理エンジン104に接続されている。上述の撮像素子102は、順次走査方式の固体撮像素子(例えばCCD)であってもよく、XYアドレス方式の固体撮像素子(例えばCMOS)であってもよい。   The image sensor 102 is a device that images (captures) an image of a subject formed by a light beam that has passed through the imaging optical system 101. Note that in the moving image shooting mode, which is one of the shooting modes of the electronic camera 100, the image sensor 102 performs shooting of a moving image with recording in a nonvolatile storage medium (110). The output of the image sensor 102 is connected to the image processing engine 104. The above-described imaging device 102 may be a progressive scanning solid-state imaging device (for example, a CCD) or an XY addressing solid-state imaging device (for example, a CMOS).

ここで、撮像素子102の受光面には、複数の受光素子(画素)がマトリクス状に配列されている。そして、撮像素子102の画素には、それぞれが異なる色成分の光を透過させる複数種類のカラーフィルタが所定の色配列に従って配置される。そのため、撮像素子102の各画素は、カラーフィルタでの色分解によって各色成分に対応する電気信号を出力する。例えば、第1実施形態では、赤色(R)、緑色(G)、青色(B)のカラーフィルタが公知のベイヤ配列にしたがって受光面に周期的に配置されている。これにより、撮像素子102は、撮影時にカラーの画像を取得することができる。   Here, a plurality of light receiving elements (pixels) are arranged in a matrix on the light receiving surface of the image sensor 102. A plurality of types of color filters that transmit light of different color components are arranged in the pixels of the image sensor 102 according to a predetermined color arrangement. Therefore, each pixel of the image sensor 102 outputs an electrical signal corresponding to each color component by color separation in the color filter. For example, in the first embodiment, red (R), green (G), and blue (B) color filters are periodically arranged on the light receiving surface according to a known Bayer array. Thereby, the image sensor 102 can acquire a color image at the time of photographing.

信号処理部103は、撮像素子102から入力される画像信号に対して、アナログ信号処理(相関二重サンプリング、黒レベル補正など)と、A/D変換処理と、デジタル信号処理(欠陥画素補正など)とを順次施す。信号処理部103から出力される画像(RAW画像)のデータは、画像処理エンジン104に入力される。   The signal processing unit 103 performs analog signal processing (correlated double sampling, black level correction, etc.), A / D conversion processing, and digital signal processing (defective pixel correction, etc.) on the image signal input from the image sensor 102. ) In order. Data of the image (RAW image) output from the signal processing unit 103 is input to the image processing engine 104.

画像処理エンジン104は、電子カメラ100の動作を統括的に制御するプロセッサである。例えば、画像処理エンジン104は、撮像素子102から入力される画像信号を用いて、オートフォーカス(AF)、自動露出(AE)の制御を行う。   The image processing engine 104 is a processor that comprehensively controls the operation of the electronic camera 100. For example, the image processing engine 104 controls autofocus (AF) and automatic exposure (AE) using an image signal input from the image sensor 102.

また、画像処理エンジン104は、画像処理部111と、圧縮処理部112と、復号処理部113とを有する。   The image processing engine 104 includes an image processing unit 111, a compression processing unit 112, and a decoding processing unit 113.

画像処理部111は、RAW画像に対して、例えば、色補間処理、階調変換処理、ホワイトバランス調整処理、色変換処理などを施す。上述の色補間処理により、ベイヤ配列で各色がモザイク状に配置された状態のRAW画像が、各画素でそれぞれRGBの情報を有するRGB画像に変換される。また、上述の色変換処理により、色補間後のRGB画像がYUV色空間のカラー画像(YUV画像)に変換される。   The image processing unit 111 performs, for example, color interpolation processing, gradation conversion processing, white balance adjustment processing, color conversion processing, and the like on the RAW image. By the color interpolation process described above, a RAW image in which each color is arranged in a mosaic pattern in a Bayer array is converted into an RGB image having RGB information at each pixel. In addition, the RGB image after color interpolation is converted into a color image (YUV image) in the YUV color space by the color conversion process described above.

圧縮処理部112は、画像圧縮装置の一例であって、画像処理部111から出力される画像を圧縮符号化する。なお、圧縮処理部112の構成例については後述する。   The compression processing unit 112 is an example of an image compression device, and compresses and encodes an image output from the image processing unit 111. A configuration example of the compression processing unit 112 will be described later.

復号処理部113は、画像復号装置の一例であって、圧縮処理部112で圧縮符号化された画像のデータを復号する。なお、復号処理部113の構成例については後述する。   The decoding processing unit 113 is an example of an image decoding device, and decodes the image data compression-encoded by the compression processing unit 112. A configuration example of the decoding processing unit 113 will be described later.

なお、画像処理エンジン104に含まれる画像処理部111、圧縮処理部112および復号処理部113の機能ブロックは、ハードウェア的には任意のプロセッサ、メモリ、その他のLSIで実現でき、ソフトウェア的にはメモリにロードされたプログラムなどによって実現される。   The functional blocks of the image processing unit 111, the compression processing unit 112, and the decoding processing unit 113 included in the image processing engine 104 can be realized by an arbitrary processor, memory, or other LSI in terms of hardware, and in terms of software This is realized by a program loaded in the memory.

第1メモリ105は、画像処理の前工程や後工程で画像のデータを一時的に記憶する。例えば、第1メモリ105は、揮発性の記憶媒体であるSDRAMである。また、第2メモリ106は、画像処理エンジン104で実行されるプログラムや、このプログラムで使用される各種データを記憶する。例えば、第2メモリ106は、フラッシュメモリ等の不揮発性メモリである。   The first memory 105 temporarily stores image data in the pre-process and post-process of image processing. For example, the first memory 105 is an SDRAM that is a volatile storage medium. The second memory 106 stores a program executed by the image processing engine 104 and various data used by this program. For example, the second memory 106 is a nonvolatile memory such as a flash memory.

記録I/F107は、不揮発性の記憶媒体110を接続するためのコネクタを有している。そして、記録I/F107は、コネクタに接続された記憶媒体110に対して動画像のデータの書き込み/読み込みを実行する。記憶媒体110は、ハードディスクや、半導体メモリを内蔵したメモリカードなどである。なお、図1では記憶媒体110の一例としてメモリカードを図示する。   The recording I / F 107 has a connector for connecting the nonvolatile storage medium 110. The recording I / F 107 writes / reads moving image data to / from the storage medium 110 connected to the connector. The storage medium 110 is a hard disk, a memory card incorporating a semiconductor memory, or the like. In FIG. 1, a memory card is illustrated as an example of the storage medium 110.

モニタ108は、各種の画像を表示する表示デバイスである。例えば、モニタ108は、画像処理エンジン104の制御により、動画撮影時のビューファインダ表示や、撮影した動画像の再生表示を行う。   The monitor 108 is a display device that displays various images. For example, the monitor 108 controls the image processing engine 104 to display a viewfinder at the time of moving image shooting and to reproduce and display a captured moving image.

次に、図2を参照しつつ、図1の圧縮処理部112の構成例を説明する。図2では、ハードウェアやソフトウェアの連携によって実現される機能ブロックで圧縮処理部112の各部を示している。なお、第1実施形態では、圧縮元の画像がYUV画像の動画像である場合を説明する。動画像の場合、YUV画像の各フレームがそれぞれ圧縮処理の対象となる。   Next, a configuration example of the compression processing unit 112 in FIG. 1 will be described with reference to FIG. In FIG. 2, each unit of the compression processing unit 112 is shown as a functional block realized by cooperation of hardware and software. In the first embodiment, a case where the compression source image is a moving image of a YUV image will be described. In the case of a moving image, each frame of the YUV image is an object of compression processing.

図2に示す第1実施形態での圧縮処理部112は、色成分分離部11、第1間引き部12、第2間引き部13、第1分離部14、第2分離部15、第1画像生成部16、第2画像生成部17、第1符号化部18、第2符号化部19、圧縮制御部20、多重化部21を有している。   The compression processing unit 112 in the first embodiment shown in FIG. 2 includes a color component separation unit 11, a first thinning unit 12, a second thinning unit 13, a first separation unit 14, a second separation unit 15, and a first image generation. Section 16, second image generation section 17, first encoding section 18, second encoding section 19, compression control section 20, and multiplexing section 21.

色成分分離部11は、入力されるYUV画像のフレームを、輝度成分(Y)のチャネルと色差成分(U,V)のチャネルとに分離する。色成分分離部11の出力は、第1間引き部12および第2間引き部13にそれぞれ接続されている。色成分分離部11は、第1間引き部12にYUV画像のYチャネル(Y面)を出力し、第2間引き部13にYUV画像のUチャネル(U面)およびVチャネル(V面)を出力する。   The color component separation unit 11 separates an input YUV image frame into a luminance component (Y) channel and a color difference component (U, V) channel. The output of the color component separation unit 11 is connected to the first thinning unit 12 and the second thinning unit 13, respectively. The color component separation unit 11 outputs the Y channel (Y plane) of the YUV image to the first thinning unit 12, and outputs the U channel (U plane) and the V channel (V plane) of the YUV image to the second thinning unit 13. To do.

なお、必要に応じて、色成分分離部11は、YUV画像の各チャネルの出力に2次元的なローパスフィルタ処理を施してもよい。これにより、例えば後述の間引きに起因する折り返し歪みの発生が抑制される。なお、ローパスフィルタは後述の間引きの特性に合わせて選択され、一例としてダイヤモンド型のローパスフィルタが適用される。   If necessary, the color component separation unit 11 may perform a two-dimensional low-pass filter process on the output of each channel of the YUV image. Thereby, for example, occurrence of aliasing distortion due to thinning described later is suppressed. The low-pass filter is selected in accordance with the thinning characteristics described later, and a diamond-type low-pass filter is applied as an example.

第1間引き部12は、間引き部の一例であって、YUV画像のYチャネルから標本点を抽出して輝度間引き画像を生成する。第1間引き部12は、Yチャネルにおいて奇数番目の行の標本点と偶数番目の行の標本点との位置が行方向(X方向)にずれるように、行方向に沿って標本点を離散的に抽出する。なお、第1間引き部12の出力は、第1分離部14に接続されている。   The first thinning unit 12 is an example of a thinning unit, and extracts a sample point from the Y channel of a YUV image to generate a luminance thinned image. The first decimation unit 12 discretely samples the sample points along the row direction so that the positions of the sample points of the odd-numbered rows and the sample points of the even-numbered rows in the Y channel are shifted in the row direction (X direction). To extract. Note that the output of the first thinning unit 12 is connected to the first separation unit 14.

一例として、入力画像がYUV4:4:4形式、YUV4:2:2形式、YUV4:2:0形式である場合の間引きについてそれぞれ説明する。なお、以下の説明では輝度の標本点を図中丸印(○)で示し、色差の標本点を図中バツ印(×)で示すことがある。   As an example, decimation when the input image is in YUV4: 4: 4 format, YUV4: 2: 2 format, and YUV4: 2: 0 format will be described. In the following description, the luminance sample point may be indicated by a circle (◯) in the figure, and the color difference sample point may be indicated by a cross (x) in the figure.

図3は、YUV4:4:4形式の画像での間引き例を示す図である。図3(a)は、間引き前における標本点の例を示しており、図3(b)は、輝度間引き画像での標本点の例を示している。図3(a)では、輝度(Y)の標本点と、色差(U,V)の標本点とを重畳させて示している。また、図3(a)に示すYUV4:4:4形式の画像では、輝度(Y)および色差(U,V)の標本点に間引きはない。   FIG. 3 is a diagram showing an example of thinning out an image in the YUV 4: 4: 4 format. FIG. 3A shows an example of sample points before thinning, and FIG. 3B shows an example of sample points in a luminance thinned image. In FIG. 3A, the sample point of luminance (Y) and the sample point of color difference (U, V) are shown superimposed. In addition, in the YUV 4: 4: 4 format image shown in FIG. 3A, there is no thinning out of the sample points of luminance (Y) and color difference (U, V).

入力画像がYUV4:4:4形式の場合、第1間引き部12は、Yチャネルの各行で標本点を1画素おきに離散的に抽出する。このとき、第1間引き部12は、奇数行の標本点と偶数行の標本点とが行方向(X方向)に1画素分ずれた状態となるように標本点を抽出する。したがって、図3(b)に示す輝度間引き画像では、間引き前の画像に対して、輝度の標本点が市松状に配置された状態となる。   When the input image is in YUV 4: 4: 4 format, the first thinning unit 12 discretely extracts sample points every other pixel in each row of the Y channel. At this time, the first thinning unit 12 extracts the sample points so that the odd-numbered sample points and the even-numbered sample points are shifted by one pixel in the row direction (X direction). Therefore, in the luminance thinned image shown in FIG. 3B, the luminance sample points are arranged in a checkered pattern with respect to the image before thinning.

図4は、YUV4:2:2形式の画像での間引き例を示す図である。図4(a)は、間引き前における標本点の例を示しており、図4(b)は、輝度間引き画像での標本点の例を示している。図4(a)では、輝度(Y)の標本点と、色差(U,V)の標本点とを重畳させて示している。また、図4(a)に示すYUV4:2:2形式の画像では、色差(U,V)の標本点が行方向(X方向)にのみ1/2間引かれている。   FIG. 4 is a diagram illustrating an example of thinning in an YUV 4: 2: 2 format image. FIG. 4A shows an example of sample points before thinning, and FIG. 4B shows an example of sample points in a luminance thinned image. In FIG. 4A, the sample point of luminance (Y) and the sample point of color difference (U, V) are shown superimposed. Further, in the YUV 4: 2: 2 format image shown in FIG. 4A, the sample points of the color difference (U, V) are thinned out by 1/2 only in the row direction (X direction).

入力画像がYUV4:2:2形式の場合においても、第1間引き部12は、Yチャネルの標本点をYUV4:4:4形式の場合と同様に抽出する。したがって、図4(b)に示す輝度間引き画像では、図3(b)と輝度の標本点の配置が同じになる。   Even when the input image is in the YUV 4: 2: 2 format, the first thinning unit 12 extracts the Y channel sample points in the same manner as in the YUV 4: 4: 4 format. Therefore, in the luminance thinned image shown in FIG. 4B, the arrangement of the luminance sample points is the same as in FIG.

図5は、YUV4:2:0形式の画像での間引きの一例を示す図である。図5(a)は、間引き前における標本点の例を示しており、図5(b)は、輝度間引き画像での標本点の例を示している。また、図6は、YUV4:2:0形式の画像での間引きの別例を示す図である。図6(a)は、間引き前における標本点の例を示しており、図6(b)は、輝度間引き画像での標本点の例を示している。   FIG. 5 is a diagram illustrating an example of thinning in an YUV 4: 2: 0 format image. FIG. 5 (a) shows an example of sample points before thinning, and FIG. 5 (b) shows an example of sample points in a luminance thinned image. FIG. 6 is a diagram showing another example of thinning in an YUV 4: 2: 0 format image. FIG. 6A shows an example of sample points before thinning, and FIG. 6B shows an example of sample points in a luminance thinned image.

図5(a)および図6(a)では、輝度(Y)の標本点と、色差(U,V)の標本点とを重畳させて示している。また、図5(a)および図6(a)に示すYUV4:2:0形式の画像では、色差(U,V)の標本点が行方向(X方向)および列方向(Y方向)にそれぞれ1/2間引かれている。なお、図5の場合には、色差(U,V)の標本点が輝度(Y)の標本点と重なる位置にある。一方、図6の場合には、色差(U,V)の標本点が列方向(Y方向)に0.5画素分ずれており、色差(U,V)の標本点が輝度(Y)の標本点とが重ならない。なお、図6(a)に示す色差(U,V)の標本点は、例えば、YUV4:4:4形式の画像から上下2つ分の標本点の色差を平均して生成すればよい。   In FIGS. 5A and 6A, the luminance (Y) sampling point and the color difference (U, V) sampling point are superimposed. Also, in the YUV 4: 2: 0 format images shown in FIGS. 5A and 6A, the sample points of the color difference (U, V) are respectively in the row direction (X direction) and the column direction (Y direction). 1/2 is thinned out. In the case of FIG. 5, the sample point of the color difference (U, V) is at a position where it overlaps the sample point of the luminance (Y). On the other hand, in the case of FIG. 6, the sample point of the color difference (U, V) is shifted by 0.5 pixels in the column direction (Y direction), and the sample point of the color difference (U, V) has the luminance (Y). The sample point does not overlap. Note that the color difference (U, V) sample points shown in FIG. 6A may be generated by, for example, averaging the color differences of two upper and lower sample points from a YUV 4: 4: 4 format image.

入力画像がYUV4:2:0形式の場合においても、第1間引き部12は、Yチャネルの標本点をYUV4:4:4形式の場合と同様に抽出する。したがって、図5(b)および図6(b)に示す輝度間引き画像では、図3(b)と輝度の標本点の配置がそれぞれ同じになる。   Even when the input image is in the YUV 4: 2: 0 format, the first thinning unit 12 extracts the Y channel sample points in the same manner as in the YUV 4: 4: 4 format. Therefore, in the luminance thinned images shown in FIGS. 5B and 6B, the arrangement of the luminance sample points is the same as in FIG. 3B.

第2間引き部13は、間引き部の一例であって、YUV画像のUチャネルおよびVチャネルから標本点を抽出して色差間引き画像を生成する。第2間引き部13は、UチャネルおよびVチャネルにおいて奇数番目の行の標本点と偶数番目の行の標本点との位置が行方向(X方向)にずれるように、行方向に沿って標本点を離散的に抽出する。上述の色差間引き画像はUチャネルおよびVチャネルでそれぞれ生成される。また、Uチャネルの色差間引き画像とVチャネルの色差間引き画像とは、標本点の抽出位置が同じとなる。なお、第2間引き部13の出力は、第2分離部15に接続されている。   The second thinning unit 13 is an example of a thinning unit, and generates a color difference thinned image by extracting sample points from the U channel and V channel of the YUV image. The second thinning unit 13 performs sampling points along the row direction so that the positions of the odd-numbered row sampling points and the even-numbered row sampling points in the U channel and the V channel are shifted in the row direction (X direction). Are discretely extracted. The above-described color difference thinned images are generated in the U channel and the V channel, respectively. The U-channel color difference thinned image and the V-channel color difference thinned image have the same sampling point extraction position. Note that the output of the second thinning unit 13 is connected to the second separation unit 15.

ここで、図3(c)は、図3(a)の入力画像に対応する色差間引き画像での標本点の例を示している。入力画像がYUV4:4:4形式の場合、第2間引き部13は、U,Vチャネルの各行で標本点を1画素おきに離散的に抽出する。このとき、第2間引き部13は、奇数行の標本点と偶数行の標本点とが行方向(X方向)に1画素分ずれた状態となるように標本点を抽出する。したがって、図3(c)に示す色差間引き画像では、色差の標本点が市松状に配置された状態となる。なお、入力画像がYUV4:4:4形式の場合、輝度間引き画像(図3(b))と色差間引き画像(図3(c))との標本点の位置が同じとなる。   Here, FIG. 3C shows an example of sample points in the color difference thinned image corresponding to the input image of FIG. When the input image is in the YUV 4: 4: 4 format, the second thinning unit 13 discretely extracts sample points every other pixel in each row of the U and V channels. At this time, the second thinning unit 13 extracts the sample points so that the odd-numbered sample points and the even-numbered sample points are shifted by one pixel in the row direction (X direction). Therefore, in the color difference thinning image shown in FIG. 3C, the color difference sample points are arranged in a checkered pattern. When the input image is in the YUV 4: 4: 4 format, the positions of the sample points of the luminance thinned image (FIG. 3B) and the color difference thinned image (FIG. 3C) are the same.

また、図4(c)は、図4(a)の入力画像に対応する色差間引き画像での標本点の例を示している。入力画像がYUV4:2:2形式の場合、第2間引き部13は、U,Vチャネルの各行で標本点を1つおきに離散的に抽出する。このとき、第2間引き部13は、奇数行の標本点と偶数行の標本点とが行方向(X方向)に1つずつずれた状態となるように標本点を抽出する。   FIG. 4C shows an example of sample points in the color difference thinned image corresponding to the input image of FIG. When the input image is in the YUV 4: 2: 2 format, the second thinning unit 13 discretely extracts every other sample point in each row of the U and V channels. At this time, the second thinning unit 13 extracts the sample points so that the odd-numbered sample points and the even-numbered sample points are shifted one by one in the row direction (X direction).

YUV4:2:2形式の入力画像では、色差の標本点が行方向(X方向)に1/2間引かれている。したがって、図3(c)に示す色差間引き画像では、間引き前の画像に対して、色差の標本点が行方向(X方向)に3画素おきに抽出される。また、図3(c)に示す色差間引き画像では、奇数行と偶数行との間で色差の標本点が2画素分ずつずれた状態となる。   In an input image of the YUV 4: 2: 2 format, the color difference sample points are thinned out in half in the row direction (X direction). Therefore, in the color difference thinned image shown in FIG. 3C, color difference sample points are extracted every three pixels in the row direction (X direction) with respect to the image before thinning. In the color difference thinning image shown in FIG. 3C, the color difference sample points are shifted by two pixels between the odd and even lines.

また、図5(c)は、図5(a)の入力画像に対応する色差間引き画像での標本点の例を示している。図6(c)は、図6(a)の入力画像に対応する色差間引き画像での標本点の例を示している。入力画像がYUV4:2:0形式の場合、第2間引き部13は、U,Vチャネルにおいて色差の標本点をもつ各行で標本点を1つおきに離散的に抽出する。このとき、第2間引き部13は、奇数番目の行の標本点と偶数番目の行の標本点とが行方向(X方向)に1つずつずれた状態となるように標本点を抽出する。   FIG. 5C shows an example of sample points in the color difference thinned image corresponding to the input image of FIG. FIG. 6C shows an example of sample points in the color difference thinned image corresponding to the input image of FIG. When the input image is in the YUV 4: 2: 0 format, the second thinning unit 13 discretely extracts every other sample point in each row having the color difference sample points in the U and V channels. At this time, the second thinning unit 13 extracts the sample points so that the sample points in the odd-numbered rows and the sample points in the even-numbered rows are shifted one by one in the row direction (X direction).

YUV4:2:0形式の入力画像では、色差の標本点が行方向(X方向)および列方向(Y方向)にそれぞれ1/2間引かれている。したがって、図5(c)に示す色差間引き画像では、色差の標本点をもつ行が1行おきに配置されている。また、図5(c)に示す色差間引き画像では、間引き前の画像に対して、色差の標本点が行方向(X方向)に3画素おきに抽出される。また、図5(c)に示す色差間引き画像では、奇数番目の行と偶数番目の行との間で色差の標本点が2画素分ずつずれた状態となる。   In the input image in the YUV 4: 2: 0 format, the color difference sample points are thinned out in half in the row direction (X direction) and in the column direction (Y direction). Therefore, in the color difference thinning image shown in FIG. 5C, every other row having color difference sample points is arranged. In the color difference thinned image shown in FIG. 5C, color difference sample points are extracted every three pixels in the row direction (X direction) with respect to the image before thinning. In the color difference thinning image shown in FIG. 5C, the color difference sample points are shifted by two pixels between the odd-numbered rows and the even-numbered rows.

なお、図6(c)の色差間引き画像は、色差の標本点が列方向(Y方向)に0.5画素分ずれている点を除いて、図5(c)の色差間引き画像と標本点のパターンが共通する。そのため、図6(c)に関する重複説明は省略する。   Note that the color difference thinned image in FIG. 6C is the same as the color difference thinned image in FIG. 5C except that the color difference sample points are shifted by 0.5 pixels in the column direction (Y direction). The pattern is common. Therefore, the overlapping description regarding FIG.

第1分離部14は、第1画像生成部16および第2画像生成部17にそれぞれ接続されている。第1分離部14は、輝度間引き画像のうちで奇数番目の行の情報を第1画像生成部16に出力し、輝度間引き画像のうちで偶数番目の行の情報を第2画像生成部17に出力する。   The first separation unit 14 is connected to the first image generation unit 16 and the second image generation unit 17, respectively. The first separation unit 14 outputs information on odd-numbered rows in the luminance thinned image to the first image generation unit 16, and outputs information on even-numbered rows in the luminance thinned image to the second image generation unit 17. Output.

第2分離部15は、第1画像生成部16および第2画像生成部17にそれぞれ接続されている。第2分離部15は、色差間引き画像のうちで奇数番目の行の情報を第1画像生成部16に出力し、色差間引き画像のうちで偶数番目の行の情報を第2画像生成部17に出力する。   The second separation unit 15 is connected to the first image generation unit 16 and the second image generation unit 17, respectively. The second separation unit 15 outputs information on odd-numbered rows in the color difference thinned image to the first image generation unit 16, and outputs information on even-numbered rows in the color difference thinned image to the second image generation unit 17. Output.

第1画像生成部16は、輝度間引き画像および色差間引き画像からそれぞれ抽出された奇数番目の行の情報を用いて第1画像を生成する。第1画像生成部16は、第1符号化部18に接続されている。   The first image generation unit 16 generates a first image using information on odd-numbered rows respectively extracted from the luminance thinned image and the color difference thinned image. The first image generation unit 16 is connected to the first encoding unit 18.

第2画像生成部17は、輝度間引き画像および色差間引き画像からそれぞれ抽出された偶数番目の行の情報を用いて第2画像を生成する。第2画像生成部17は、第2符号化部19に接続されている。   The second image generation unit 17 generates a second image using information on even-numbered rows respectively extracted from the luminance thinned image and the color difference thinned image. The second image generation unit 17 is connected to the second encoding unit 19.

ここで、第1画像および第2画像の例をそれぞれ説明する。第1画像および第2画像は、圧縮元の入力画像と同じデータ形式となるが、標本点の数はそれぞれ1/4となる。また、第1画像および第2画像は、間引きした画像の異なる行を抽出して生成されるため、両者の標本点のパターンが相違する。   Here, examples of the first image and the second image will be described. The first image and the second image have the same data format as the compression source input image, but the number of sample points is 1/4. In addition, since the first image and the second image are generated by extracting different rows of the thinned image, the patterns of the sample points are different.

図3(d)は、図3(a)に対応するYUV4:4:4形式の第1画像を示している。図3(e)は、図3(a)に対応するYUV4:4:4形式の第2画像を示している。図3の場合には、第1画像および第2画像のいずれでも輝度と色差の標本点の位置がそれぞれ一致する。また、第1画像と第2画像との間では、標本点の位置が行方向(X方向)および列方向(Y方向)に1画素ずつずれている。   FIG. 3D shows a first image in the YUV 4: 4: 4 format corresponding to FIG. FIG. 3E shows a second image in the YUV 4: 4: 4 format corresponding to FIG. In the case of FIG. 3, the positions of the luminance and color difference sample points are the same in both the first image and the second image. Further, between the first image and the second image, the position of the sample point is shifted by one pixel in the row direction (X direction) and the column direction (Y direction).

また、図4(d)は、図4(a)に対応するYUV4:2:2形式の第1画像を示している。図4(e)は、図4(a)に対応するYUV4:2:2形式の第2画像を示している。図4の場合には、第1画像と第2画像との間では、輝度の標本点が行方向(X方向)および列方向(Y方向)に1画素ずつずれている。また、第1画像と第2画像との間では、色差の標本点が行方向(X方向)に2画素、列方向(Y方向)に1画素ずれている。   FIG. 4D shows a first image in the YUV 4: 2: 2 format corresponding to FIG. FIG. 4E shows a second image in the YUV 4: 2: 2 format corresponding to FIG. In the case of FIG. 4, between the first image and the second image, the luminance sample points are shifted by one pixel in the row direction (X direction) and the column direction (Y direction). Further, between the first image and the second image, the sample point of the color difference is shifted by 2 pixels in the row direction (X direction) and 1 pixel in the column direction (Y direction).

また、図5(d)は、図5(a)に対応するYUV4:2:0形式の第1画像を示している。図5(e)は、図5(a)に対応するYUV4:2:0形式の第2画像を示している。図5の場合には、第1画像と第2画像との間では、輝度の標本点が行方向(X方向)および列方向(Y方向)に1画素ずつずれている。また、第1画像と第2画像との間では、色差の標本点が行方向(X方向)に2画素、列方向(Y方向)に2画素ずれている。   FIG. 5D shows a first image in the YUV 4: 2: 0 format corresponding to FIG. FIG. 5E shows a second image in the YUV 4: 2: 0 format corresponding to FIG. In the case of FIG. 5, between the first image and the second image, the luminance sample points are shifted by one pixel in the row direction (X direction) and the column direction (Y direction). Further, between the first image and the second image, the color difference sample points are shifted by two pixels in the row direction (X direction) and by two pixels in the column direction (Y direction).

また、図6(d)は、図6(a)に対応するYUV4:2:0形式の第1画像を示し、図6(e)は、図6(a)に対応するYUV4:2:0形式の第2画像を示している。図6の場合には、第1画像と第2画像との間では、輝度の標本点が行方向(X方向)および列方向(Y方向)に1画素ずつずれている。また、第1画像と第2画像との間では、色差の標本点が行方向(X方向)に2画素、列方向(Y方向)に2画素ずれている。なお、図6(d)の第1画像と、図6(e)の第2画像は、色差の標本点が列方向(Y方向)に0.5画素分ずれている点で、図5(d)、(e)とそれぞれ相違する。   6D shows a first image in the YUV 4: 2: 0 format corresponding to FIG. 6A, and FIG. 6E shows YUV 4: 2: 0 corresponding to FIG. 6A. A second image of the format is shown. In the case of FIG. 6, between the first image and the second image, the luminance sample points are shifted by one pixel in the row direction (X direction) and the column direction (Y direction). Further, between the first image and the second image, the color difference sample points are shifted by two pixels in the row direction (X direction) and by two pixels in the column direction (Y direction). Note that the first image in FIG. 6D and the second image in FIG. 6E are different in that the sample point of the color difference is shifted by 0.5 pixels in the column direction (Y direction). It differs from d) and (e).

第1符号化部18は、符号化部の一例であって、入力される第1画像を圧縮符号化する。例えば、第1符号化部18は、動画像の各フレームを所定サイズのブロック単位に分割し、動き補償予測を用いて動画像のデータを圧縮符号化する。なお、第1符号化部18の出力は、多重化部21に接続されている。以下の説明では、第1画像を符号化した情報を第1符号化情報とも称する。   The first encoding unit 18 is an example of an encoding unit, and compresses and encodes an input first image. For example, the first encoding unit 18 divides each frame of the moving image into blocks of a predetermined size, and compresses and encodes the moving image data using motion compensation prediction. Note that the output of the first encoding unit 18 is connected to the multiplexing unit 21. In the following description, information obtained by encoding the first image is also referred to as first encoded information.

第2符号化部19は、符号化部の一例であって、入力される第2画像を圧縮符号化する。第2符号化部19の構成は、第1符号化部18と同様である。なお、第2符号化部19の出力は、多重化部21に接続されている。以下の説明では、第2画像を符号化した情報を第2符号化情報とも称する。   The second encoding unit 19 is an example of an encoding unit, and compresses and encodes an input second image. The configuration of the second encoding unit 19 is the same as that of the first encoding unit 18. Note that the output of the second encoding unit 19 is connected to the multiplexing unit 21. In the following description, information obtained by encoding the second image is also referred to as second encoded information.

圧縮制御部20は、動画像の圧縮のときに、圧縮処理部112の各部の動作を統括的に制御する。なお、図2では、圧縮制御部20と各部を接続する信号線の図示は、多重化部21を除いて適宜省略する。   The compression control unit 20 comprehensively controls the operation of each unit of the compression processing unit 112 when compressing a moving image. In FIG. 2, illustration of the signal line connecting the compression control unit 20 and each unit is omitted as appropriate, except for the multiplexing unit 21.

また、圧縮制御部20は、第1画像、第2画像から間引き画像への復号方式を含む付帯情報を生成する。例えば、付帯情報は、圧縮元の画像のデータ形式や、輝度間引き画像および色差間引き画像での標本点の間引きパターンや、第1画像および第2画像での標本点の抽出パターンの情報を含む。   In addition, the compression control unit 20 generates incidental information including a decoding method from the first image and the second image to the thinned image. For example, the auxiliary information includes information on the data format of the compression source image, the thinning pattern of sample points in the luminance thinned image and the color difference thinned image, and the extraction pattern of the sample points in the first image and the second image.

多重化部21は、出力部の一例であって、第1符号化情報や第2符号化情報をそれぞれサブピクチャ単位で多重化し、ピクチャ単位で出力する。また、多重化部21は、上述の付帯情報を、例えば符号化された画像のヘッダ領域に付与する。多重化部21は、上述の付帯情報を動画像のシーケンス単位で付与してもよい。なお、以下の説明では、圧縮処理部112で生成される圧縮された動画像のデータを圧縮動画像情報と称することがある。   The multiplexing unit 21 is an example of an output unit, and multiplexes the first encoded information and the second encoded information in units of sub-pictures and outputs them in units of pictures. In addition, the multiplexing unit 21 adds the above-described incidental information to, for example, a header area of an encoded image. The multiplexing unit 21 may add the above-described supplementary information in units of moving image sequences. In the following description, the compressed moving image data generated by the compression processing unit 112 may be referred to as compressed moving image information.

次に、図7を参照しつつ、図2の符号化部(第1符号化部18、第2符号化部19)の構成例を説明する。図7では、ハードウェアやソフトウェアの連携によって実現される機能ブロックで符号化部の各部を示している。   Next, a configuration example of the encoding unit (the first encoding unit 18 and the second encoding unit 19) in FIG. 2 will be described with reference to FIG. In FIG. 7, each part of an encoding part is shown by the functional block implement | achieved by cooperation of hardware or software.

ここで、動き補償予測を行う画像圧縮符号化方式としては、例えば、ISO/IEC13818−2に規定されるMPEG−2ビデオなどが知られている。上述の画像圧縮符号化方式では、Iピクチャ、Pピクチャ、Bピクチャを用いてフレーム内またはフレーム間で圧縮符号化が行われる。Iピクチャは画面内のみで完結する符号化により得られる画面内符号化画像である。Pピクチャは参照画像最大1枚を用いる予測符号化により得られる画面間予測符号化画像である。Bピクチャは参照画像最大2枚を用いる予測符号化により得られる画面間双予測符号化画像である。   Here, as an image compression encoding method for performing motion compensation prediction, for example, MPEG-2 video defined in ISO / IEC13818-2 is known. In the above-described image compression coding system, compression coding is performed within a frame or between frames using I pictures, P pictures, and B pictures. An I picture is an intra-picture encoded image obtained by encoding that is completed only within the picture. A P picture is an inter-screen predictive encoded image obtained by predictive encoding using a maximum of one reference image. A B picture is an inter-screen bi-predictive encoded image obtained by predictive encoding using a maximum of two reference images.

符号化部(18、19)は、第1蓄積部31、減算部32、直交変換部33、量子化部34、可変長符号化部35、逆量子化部36、逆直交変換部37、加算部38、第2蓄積部39、予測情報生成部40、予測部41を有している。   The encoding unit (18, 19) includes a first accumulation unit 31, a subtraction unit 32, an orthogonal transformation unit 33, a quantization unit 34, a variable length coding unit 35, an inverse quantization unit 36, an inverse orthogonal transformation unit 37, an addition Unit 38, second storage unit 39, prediction information generation unit 40, and prediction unit 41.

第1蓄積部31は、入力される画像を蓄積する。例えば、第1符号化部18の場合、第1蓄積部31は第1画像を蓄積し、第2符号化部19の場合、第1蓄積部31は第2画像を蓄積する。第1蓄積部31に蓄積された画像は、符号化対象の画像として入力順に減算部32へ出力される。なお、符号化の完了した画像は第1蓄積部31から順次消去される。   The first accumulation unit 31 accumulates input images. For example, in the case of the first encoding unit 18, the first storage unit 31 stores the first image, and in the case of the second encoding unit 19, the first storage unit 31 stores the second image. The image accumulated in the first accumulation unit 31 is output to the subtraction unit 32 in the order of input as an image to be encoded. Note that the encoded image is sequentially deleted from the first storage unit 31.

減算部32は、PピクチャまたはBピクチャを生成するときには、入力された原画像と予測部41で生成された後述の予測値との差分信号(予測誤差値)を出力する。また、減算部32は、Iピクチャを生成するときには、入力された原画像の信号をそのまま出力する。   When generating a P picture or a B picture, the subtraction unit 32 outputs a difference signal (prediction error value) between the input original image and a prediction value (described later) generated by the prediction unit 41. Further, when generating the I picture, the subtracting unit 32 outputs the input original image signal as it is.

直交変換部33は、Iピクチャを生成するときには、減算部32をスルーして入力された原画像の信号に対して直交変換を行う。また、直交変換部33は、Pピクチャ又はBピクチャを生成するときには、上述の差分信号に対して直交変換を行う。   When generating the I picture, the orthogonal transform unit 33 performs orthogonal transform on the signal of the original image input through the subtraction unit 32. Further, when generating the P picture or the B picture, the orthogonal transform unit 33 performs orthogonal transform on the above-described difference signal.

量子化部34は、直交変換部33から入力されたブロック単位の周波数係数(直交変換係数)を量子化係数に変換する。量子化部34の出力は、可変長符号化部35および逆量子化部36にそれぞれ入力される。   The quantization unit 34 converts the frequency coefficient (orthogonal transform coefficient) in units of blocks input from the orthogonal transform unit 33 into a quantized coefficient. The output of the quantization unit 34 is input to the variable length encoding unit 35 and the inverse quantization unit 36, respectively.

可変長符号化部35は、量子化係数や、動きベクトル等の予測情報を可変長符号化し、動画像の符号化ビットストリームを外部へ出力する。   The variable length coding unit 35 performs variable length coding on prediction information such as a quantization coefficient and a motion vector, and outputs a coded bit stream of a moving image to the outside.

逆量子化部36は、ブロック単位で量子化係数を逆量子化して周波数係数を復号する。逆直交変換部37は、逆量子化部36で復号された周波数係数を逆直交変換して予測誤差値(または原画像の信号)を復号する。   The inverse quantization unit 36 inversely quantizes the quantization coefficient in units of blocks and decodes the frequency coefficient. The inverse orthogonal transform unit 37 performs inverse orthogonal transform on the frequency coefficient decoded by the inverse quantization unit 36 to decode a prediction error value (or an original image signal).

加算部38は、復号された予測誤差値と、予測部41で生成された後述の予測値とを加算する。そして、加算部38から出力されたピクチャの復号値(参照画像)は第2蓄積部39に蓄積される。なお、以後の動き補償予測で参照されない画像は第2蓄積部39から順次消去される。   The adding unit 38 adds the decoded prediction error value and a prediction value described later generated by the prediction unit 41. The decoded value (reference image) of the picture output from the adding unit 38 is stored in the second storage unit 39. Note that images that are not referred to in the subsequent motion compensation prediction are sequentially deleted from the second storage unit 39.

予測情報生成部40は、第2蓄積部39の参照画像を用いて、符号化対象の画像を予測するための予測情報(動きベクトルなど)を生成する。予測情報は、予測部41および可変長符号化部35に出力される。   The prediction information generation unit 40 uses the reference image of the second storage unit 39 to generate prediction information (such as a motion vector) for predicting the encoding target image. The prediction information is output to the prediction unit 41 and the variable length coding unit 35.

予測部41は、予測情報および参照画像に基づいて、符号化対象の画像をブロック単位で予測した予測値を出力する。この予測値は、減算部32および加算部38に出力される。   The prediction unit 41 outputs a prediction value obtained by predicting the image to be encoded in units of blocks based on the prediction information and the reference image. The predicted value is output to the subtraction unit 32 and the addition unit 38.

なお、或るブロックについて動き補償予測による予測誤差が所定条件より大きいと判断された場合、予測部41は、動き補償予測をせずにブロック内の画素を、所謂イントラマクロブロックとしてフレーム内圧縮符号化する。   When it is determined that the prediction error due to motion compensation prediction is greater than a predetermined condition for a certain block, the prediction unit 41 uses the pixels in the block as a so-called intra macroblock without performing motion compensation prediction. Turn into.

次に、図8を参照しつつ、図1の復号処理部113の構成例を説明する。図8では、ハードウェアやソフトウェアの連携によって実現される機能ブロックで復号処理部113の各部を示している。   Next, a configuration example of the decoding processing unit 113 in FIG. 1 will be described with reference to FIG. In FIG. 8, each unit of the decoding processing unit 113 is shown as a functional block realized by cooperation of hardware and software.

復号処理部113は、多重化分離部51、第1復号部52、第2復号部53、第1分離部54、第2分離部55、第1合成部56、第2合成部57、第1補間部58、第2補間部59、画像出力部60、復号制御部61を有している。なお、復号処理部113には、上述の圧縮動画像情報が入力される。   The decoding processor 113 includes a demultiplexer 51, a first decoder 52, a second decoder 53, a first separator 54, a second separator 55, a first combiner 56, a second combiner 57, a first An interpolation unit 58, a second interpolation unit 59, an image output unit 60, and a decoding control unit 61 are provided. Note that the above-described compressed moving image information is input to the decoding processing unit 113.

多重化分離部51は、第1復号部52、第2復号部53、復号制御部61に接続されている。多重化分離部51は、圧縮動画像情報から第1符号化情報、第2符号化情報および付帯情報をそれぞれ分離する。分離された第1符号化情報は第1復号部52に出力され、分離された第2符号化情報は第2復号部53に出力される。また、分離された付帯情報は復号制御部61に出力される。   The demultiplexing unit 51 is connected to the first decoding unit 52, the second decoding unit 53, and the decoding control unit 61. The multiplexing / separating unit 51 separates the first encoded information, the second encoded information, and the incidental information from the compressed video information. The separated first encoded information is output to the first decoding unit 52, and the separated second encoded information is output to the second decoding unit 53. The separated incidental information is output to the decoding control unit 61.

第1復号部52は、復号部の一例であって、第1符号化情報から第1画像(図3(d),図4(d),図5(d),図6(d))を復号する。第1復号部52の出力は第1分離部54に接続されている。   The first decoding unit 52 is an example of a decoding unit, and generates a first image (FIG. 3 (d), FIG. 4 (d), FIG. 5 (d), and FIG. 6 (d)) from the first encoded information. Decrypt. The output of the first decoding unit 52 is connected to the first separation unit 54.

第2復号部53は、復号部の一例であって、第2符号化情報から第2画像(図3(e),図4(e),図5(e),図6(e))を復号する。第2復号部53の出力は第2分離部55に接続されている。なお、第2復号部53の構成は、第1復号部52と同様である。   The 2nd decoding part 53 is an example of a decoding part, Comprising: A 2nd image (FIG.3 (e), FIG.4 (e), FIG.5 (e), FIG.6 (e)) is shown from 2nd encoding information. Decrypt. The output of the second decoding unit 53 is connected to the second separation unit 55. The configuration of the second decoding unit 53 is the same as that of the first decoding unit 52.

第1分離部54は、第1合成部56、第2合成部57に接続されている。第1分離部54は、入力された第1画像をYチャネルとU,Vチャネルとに分離する。第1画像のYチャネルは第1合成部56に出力され、第1画像のU,Vチャネルは第2合成部57に出力される。   The first separation unit 54 is connected to the first synthesis unit 56 and the second synthesis unit 57. The first separation unit 54 separates the input first image into a Y channel and a U, V channel. The Y channel of the first image is output to the first combining unit 56, and the U and V channels of the first image are output to the second combining unit 57.

第2分離部55は、第1合成部56、第2合成部57に接続されている。第2分離部55は、入力された第2画像をYチャネルとU,Vチャネルとに分離する。第2画像のYチャネルは第1合成部56に出力され、第2画像のU,Vチャネルは第2合成部57に出力される。   The second separation unit 55 is connected to the first synthesis unit 56 and the second synthesis unit 57. The second separation unit 55 separates the input second image into the Y channel and the U and V channels. The Y channel of the second image is output to the first combining unit 56, and the U and V channels of the second image are output to the second combining unit 57.

第1合成部56は、合成部の一例であって、付帯情報を用いて第1画像のYチャネルと第2画像のYチャネルとを合成する。これにより、第1合成部56は、輝度間引き画像(図3(b),図4(b),図5(b),図6(b))を復元する。なお、第1合成部56の出力は、第1補間部58に接続されている。   The first synthesizing unit 56 is an example of a synthesizing unit, and synthesizes the Y channel of the first image and the Y channel of the second image using the accompanying information. Thereby, the first synthesis unit 56 restores the luminance thinned image (FIG. 3B, FIG. 4B, FIG. 5B, FIG. 6B). Note that the output of the first synthesis unit 56 is connected to the first interpolation unit 58.

第2合成部57は、合成部の一例であって、付帯情報を用いて第1画像のUチャネルと第2画像のUチャネルとを合成する。また、第2合成部57は、付帯情報を用いて第1画像のVチャネルと第2画像のVチャネルとを合成する。これにより、第2合成部57は、上述の色差間引き画像(図3(c),図4(c),図5(c),図6(c))を復元する。なお、第2合成部57の出力は、第2補間部59に接続されている。   The second synthesizing unit 57 is an example of a synthesizing unit, and synthesizes the U channel of the first image and the U channel of the second image using incidental information. In addition, the second combining unit 57 combines the V channel of the first image and the V channel of the second image using the incidental information. Thereby, the second composition unit 57 restores the above-described color difference thinned image (FIG. 3C, FIG. 4C, FIG. 5C, FIG. 6C). The output of the second synthesis unit 57 is connected to the second interpolation unit 59.

第1補間部58は、補間部の一例であって、復元された輝度間引き画像の標本点をフレーム内で補間する。これにより、第1補間部58は、輝度間引き画像(Y)を圧縮元の画像のYチャネルと同じ形式の輝度補間画像(Y)に変換する。なお、第1補間部58の出力は、画像出力部60に接続されている。   The first interpolation unit 58 is an example of an interpolation unit, and interpolates the sample points of the restored luminance thinned image within the frame. Accordingly, the first interpolation unit 58 converts the luminance thinned image (Y) into a luminance interpolation image (Y) having the same format as the Y channel of the compression source image. Note that the output of the first interpolation unit 58 is connected to the image output unit 60.

第2補間部59は、補間部の一例であって、復元されたU,Vチャネルの色差間引き画像の標本点をそれぞれフレーム内補間する。これにより、第2補間部59は、色差間引き画像(U,V)を圧縮元の画像のU,Vチャネルと同じ形式の色差補間画像(U,V)にそれぞれ変換する。なお、第2補間部59の出力は、画像出力部60に接続されている。   The second interpolation unit 59 is an example of an interpolation unit, and interpolates the sample points of the restored U and V channel color difference thinned images. Thus, the second interpolation unit 59 converts the color difference thinned image (U, V) into a color difference interpolated image (U, V) having the same format as the U, V channels of the compression source image. Note that the output of the second interpolation unit 59 is connected to the image output unit 60.

画像出力部60は、同じフレームの輝度補間画像と色差補間画像とを対応付けて、1つの復号フレームとして出力する。輝度補間画像は圧縮元の画像のYチャネルと同じ画像サイズであり、色差補間画像は圧縮元の画像のU,Vチャネルとそれぞれ同じ画像サイズである。そのため、復号フレームのYUVの各成分は、いずれも圧縮元の画像と同じ画像サイズに復元される。   The image output unit 60 associates the luminance interpolation image and the color difference interpolation image of the same frame and outputs them as one decoded frame. The luminance interpolation image has the same image size as the Y channel of the compression source image, and the color difference interpolation image has the same image size as the U and V channels of the compression source image. Therefore, each YUV component of the decoded frame is restored to the same image size as the compression source image.

ここで、上述の輝度補間画像、色差補間画像、復号フレームの例をそれぞれ説明する。なお、復号時の各画像の図面において、補間された輝度の標本点は破線の丸印で示し、補間された色差の標本点は破線のバツ印で示す。   Here, examples of the above-described luminance interpolation image, color difference interpolation image, and decoded frame will be described. In the drawing of each image at the time of decoding, the interpolated luminance sample point is indicated by a dotted circle, and the interpolated color difference sample point is indicated by a broken cross.

図9(a)は、図3(a)に対応するYUV4:4:4形式の輝度補間画像を示している。図9(b)は、図3(a)に対応するYUV4:4:4形式の色差補間画像を示している。図9(c)は、図9(a)および図9(b)を用いた復号フレームを示している。   FIG. 9A shows a YUV 4: 4: 4 format luminance interpolation image corresponding to FIG. FIG. 9B shows a color difference interpolation image in the YUV 4: 4: 4 format corresponding to FIG. FIG. 9 (c) shows a decoded frame using FIG. 9 (a) and FIG. 9 (b).

また、図10(a)は、図4(a)に対応するYUV4:2:2形式の輝度補間画像を示している。図10(b)は、図4(a)に対応するYUV4:2:2形式の色差補間画像を示している。図10(c)は、図10(a)および図10(b)を用いた復号フレームを示している。   FIG. 10 (a) shows a YUV 4: 2: 2 format luminance interpolation image corresponding to FIG. 4 (a). FIG. 10B shows a YUV 4: 2: 2 format color difference interpolation image corresponding to FIG. FIG. 10 (c) shows a decoded frame using FIG. 10 (a) and FIG. 10 (b).

また、図11(a)は、図5(a)に対応するYUV4:2:0形式の輝度補間画像を示している。図11(b)は、図5(a)に対応するYUV4:2:0形式の色差補間画像を示している。図11(c)は、図11(a)および図11(b)を用いた復号フレームを示している。   FIG. 11A shows a luminance-interpolated image in the YUV 4: 2: 0 format corresponding to FIG. FIG. 11B shows a YUV 4: 2: 0 format color difference interpolation image corresponding to FIG. FIG.11 (c) has shown the decoding frame using Fig.11 (a) and FIG.11 (b).

また、図12(a)は、図6(a)に対応するYUV4:2:0形式の輝度補間画像を示している。図12(b)は、図6(a)に対応するYUV4:2:0形式の色差補間画像を示している。図12(c)は、図12(a)および図12(b)を用いた復号フレームを示している。   FIG. 12A shows a YUV 4: 2: 0 format luminance interpolation image corresponding to FIG. FIG. 12B shows a color difference interpolation image in the YUV 4: 2: 0 format corresponding to FIG. FIG. 12 (c) shows a decoded frame using FIG. 12 (a) and FIG. 12 (b).

復号制御部61は、動画像の復号のときに、復号処理部113の各部の動作を統括的に制御する。なお、図8では、復号制御部61と各部を接続する信号線の図示は、多重化分離部51を除いて適宜省略する。   The decoding control unit 61 comprehensively controls the operation of each unit of the decoding processing unit 113 when decoding a moving image. In FIG. 8, the illustration of the signal line connecting the decoding control unit 61 and each unit is omitted as appropriate, except for the demultiplexing unit 51.

また、復号制御部61は、圧縮動画像情報から分離された付帯情報を用いて、輝度間引き画像、色差間引き画像を復元する制御や、輝度補間画像、色差補間画像を生成する制御を実行する。   In addition, the decoding control unit 61 performs control for restoring the luminance thinned image and the color difference thinned image and control for generating the luminance interpolation image and the color difference interpolated image using the auxiliary information separated from the compressed moving image information.

次に、図13を参照しつつ、図8の復号部(第1復号部52、第2復号部53)の構成例を説明する。図13では、ハードウェアやソフトウェアの連携によって実現される機能ブロックで復号部の各部を示している。なお、図13に示す復号部52、53の機能ブロックは、図7で示した符号化部18、19の同名称の機能ブロックと共有化されていてもよい。   Next, a configuration example of the decoding unit (the first decoding unit 52 and the second decoding unit 53) in FIG. 8 will be described with reference to FIG. In FIG. 13, each unit of the decoding unit is shown as a functional block realized by cooperation of hardware and software. Note that the functional blocks of the decoding units 52 and 53 shown in FIG. 13 may be shared with the functional blocks of the same name of the encoding units 18 and 19 shown in FIG.

復号部(52、53)は、符号復号部71、逆量子化部72、逆直交変換部73、加算部74、第1蓄積部75、第2蓄積部76、予測部77を有している。   The decoding unit (52, 53) includes a code decoding unit 71, an inverse quantization unit 72, an inverse orthogonal transform unit 73, an addition unit 74, a first accumulation unit 75, a second accumulation unit 76, and a prediction unit 77. .

符号復号部71は、入力される動画像の符号化ビットストリームを復号し、量子化係数や、動きベクトル等の予測情報を出力する。なお、復号された量子化係数は逆量子化部72に入力され、復号された予測情報は予測部77に入力される。   The code decoding unit 71 decodes a coded bit stream of an input moving image and outputs prediction information such as a quantization coefficient and a motion vector. The decoded quantization coefficient is input to the inverse quantization unit 72, and the decoded prediction information is input to the prediction unit 77.

逆量子化部72は、ブロック単位で量子化係数を逆量子化して周波数係数を復号する。逆直交変換部73は、逆量子化部72で復号された周波数係数を逆直交変換して予測誤差値(または原画像の信号)を復号する。   The inverse quantization unit 72 inversely quantizes the quantization coefficient in units of blocks and decodes the frequency coefficient. The inverse orthogonal transform unit 73 performs inverse orthogonal transform on the frequency coefficient decoded by the inverse quantization unit 72 to decode a prediction error value (or an original image signal).

加算部74は、復号された予測誤差値と、予測部77で生成された予測値とを加算することで、復号された画像をブロック単位で出力する。そして、加算部74から出力された画像の復号値は第1蓄積部75および第2蓄積部76にそれぞれ入力される。   The addition unit 74 adds the decoded prediction error value and the prediction value generated by the prediction unit 77 to output a decoded image in units of blocks. The decoded value of the image output from the adding unit 74 is input to the first storage unit 75 and the second storage unit 76, respectively.

第1蓄積部75は、復号した第1画像または第2画像を後段の回路(第1分離部54または第2分離部55)に出力するまで蓄積する。なお、後段の回路への出力が完了した画像は第1蓄積部75から順次消去される。また、第2蓄積部76は、画像の復号値を参照画像として蓄積する。なお、以後の動き補償予測で参照されない画像は第2蓄積部76から順次消去される。   The first accumulation unit 75 accumulates the decoded first image or second image until it is output to the subsequent circuit (the first separation unit 54 or the second separation unit 55). Note that images that have been output to the subsequent circuit are sequentially deleted from the first storage unit 75. The second storage unit 76 stores the decoded image value as a reference image. Note that images that are not referred to in the subsequent motion compensation prediction are sequentially deleted from the second accumulation unit 76.

予測部77は、予測情報および参照画像に基づいて、復号対象の画像をブロック単位で予測した予測値を加算部74に出力する。   The prediction unit 77 outputs a prediction value obtained by predicting the decoding target image in units of blocks to the addition unit 74 based on the prediction information and the reference image.

(動画像の圧縮動作例)
以下、第1実施形態での動画像の圧縮動作例を説明する。
(Example of video compression)
Hereinafter, an example of a moving image compression operation in the first embodiment will be described.

第1実施形態での電子カメラ100が動画撮影モード下で撮影指示を受け付けると、画像処理エンジン104は撮像素子102を駆動させて動画撮影を開始する。撮像素子102から出力される動画像のフレームは、信号処理部103および画像処理部111で一連の信号処理と画像処理が施された後に、圧縮処理部112で圧縮符号化される。そして、圧縮処理部112で圧縮された圧縮動画像情報は、画像処理エンジン104の制御により、記録I/F107に接続された記憶媒体110に記録される。   When the electronic camera 100 according to the first embodiment receives a shooting instruction in the moving image shooting mode, the image processing engine 104 drives the image sensor 102 to start moving image shooting. A frame of a moving image output from the image sensor 102 is subjected to a series of signal processing and image processing by the signal processing unit 103 and the image processing unit 111, and then compression encoded by the compression processing unit 112. The compressed moving image information compressed by the compression processing unit 112 is recorded on the storage medium 110 connected to the recording I / F 107 under the control of the image processing engine 104.

図14は、圧縮処理部112での動画像の圧縮動作例を示す流れ図である。   FIG. 14 is a flowchart showing an example of a moving image compression operation in the compression processing unit 112.

ステップ#101:圧縮処理部112の圧縮制御部20は、輝度間引き画像および色差間引き画像での標本点の間引きパターンの設定や、第1画像および第2画像の合成パターンの設定を実行する。なお、#101の設定は動画像の最初のフレームで1回のみ実行される。   Step # 101: The compression control unit 20 of the compression processing unit 112 performs setting of a thinning pattern of sample points in the luminance thinned image and the color difference thinned image, and setting of a composite pattern of the first image and the second image. The setting of # 101 is executed only once in the first frame of the moving image.

ステップ#102:色成分分離部11は、必要に応じて、入力されるYUV画像のフレーム(図3(a),図4(a),図5(a),図6(a))にローパスフィルタ処理を施す。その後、色成分分離部11はYUV画像を輝度成分と色差成分とに分離する。YUV画像のYチャネルは第1間引き部12に出力され、YUV画像のU,Vチャネルは第2間引き部13に出力される。   Step # 102: The color component separation unit 11 performs low pass on the input YUV image frame (FIG. 3 (a), FIG. 4 (a), FIG. 5 (a), FIG. 6 (a)) as necessary. Apply filtering. Thereafter, the color component separation unit 11 separates the YUV image into a luminance component and a color difference component. The Y channel of the YUV image is output to the first thinning unit 12, and the U and V channels of the YUV image are output to the second thinning unit 13.

ステップ#103:第1間引き部12は、Yチャネルから標本点を抽出して輝度間引き画像(図3(b),図4(b),図5(b),図6(b))を生成する。   Step # 103: The first decimation unit 12 extracts sample points from the Y channel and generates luminance decimation images (FIG. 3 (b), FIG. 4 (b), FIG. 5 (b), and FIG. 6 (b)). To do.

ステップ#104:第2間引き部13は、U,Vチャネルから標本点を抽出して色差間引き画像(図3(c),図4(c),図5(c),図6(c))を生成する。なお、#103の処理と#104の処理は並列に実行されていてもよい。   Step # 104: The second thinning unit 13 extracts the sample points from the U and V channels and extracts the color difference thinned images (FIG. 3 (c), FIG. 4 (c), FIG. 5 (c), FIG. 6 (c)). Is generated. In addition, the process of # 103 and the process of # 104 may be performed in parallel.

ステップ#105:第1分離部14は、輝度間引き画像(#103)のうちで奇数番目の行の情報を第1画像生成部16に出力し、輝度間引き画像(#103)のうちで偶数番目の行の情報を第2画像生成部17に出力する。   Step # 105: The first separation unit 14 outputs information on odd-numbered rows in the luminance thinned image (# 103) to the first image generation unit 16, and even-numbered in the luminance thinned image (# 103). Is output to the second image generation unit 17.

ステップ#106:第2分離部15は、色差間引き画像(#104)のうちで奇数番目の行の情報を第1画像生成部16に出力し、色差間引き画像(#104)のうちで偶数番目の行の情報を第2画像生成部17に出力する。なお、#105の処理と#106の処理は並列に実行されていてもよい。   Step # 106: The second separation unit 15 outputs the information on the odd-numbered rows in the color difference thinned image (# 104) to the first image generation unit 16, and the even number in the color difference thinned image (# 104). Is output to the second image generation unit 17. In addition, the process of # 105 and the process of # 106 may be performed in parallel.

ステップ#107:第1画像生成部16は、輝度間引き画像および色差間引き画像からそれぞれ抽出された奇数番目の行の情報を用いて第1画像(図3(d),図4(d),図5(d),図6(d))を生成する。   Step # 107: The first image generation unit 16 uses the information on the odd-numbered rows extracted from the luminance thinned image and the color difference thinned image, respectively, to display the first image (FIG. 3D, FIG. 4D, FIG. 5 (d), FIG. 6 (d)) is generated.

ステップ#108:第2画像生成部17は、輝度間引き画像および色差間引き画像からそれぞれ抽出された偶数番目の行の情報を用いて第2画像(図3(e),図4(e),図5(e),図6(e))を生成する。なお、#107の処理と#108の処理は並列に実行されていてもよい。   Step # 108: The second image generation unit 17 uses the information of the even-numbered rows extracted from the luminance thinned image and the color difference thinned image, respectively, to generate the second image (FIG. 3 (e), FIG. 4 (e), FIG. 5 (e) and FIG. 6 (e)) are generated. In addition, the process of # 107 and the process of # 108 may be performed in parallel.

ステップ#109:圧縮制御部20は、#101の設定に基づいて上述の付帯情報を生成する。なお、圧縮制御部20は、付帯情報を符号化してもよい。   Step # 109: The compression control unit 20 generates the accompanying information described above based on the setting of # 101. Note that the compression control unit 20 may encode the accompanying information.

ステップ#110:第1符号化部18は、例えばMPEG−2ビデオのメインプロファイルに準拠して第1画像(#107)を圧縮符号化する。これにより、第1符号化情報が生成される。ここで、第1実施形態での第1符号化部18は、異なるフレームの第1画像の間で動き補償予測を行うが、第1画像と第2画像との間では動き補償予測を行わない。   Step # 110: The first encoding unit 18 compresses and encodes the first image (# 107) in accordance with, for example, the main profile of MPEG-2 video. Thereby, the first encoded information is generated. Here, the first encoding unit 18 in the first embodiment performs motion compensation prediction between the first images of different frames, but does not perform motion compensation prediction between the first image and the second image. .

ステップ#111:第2符号化部19は、例えばMPEG−2ビデオのメインプロファイルに準拠して第2画像(#108)を圧縮符号化する。これにより、第2符号化情報が生成される。ここで、第1実施形態での第2符号化部19は、異なるフレームの第2画像の間で動き補償予測を行うが、第1画像と第2画像との間では動き補償予測を行わない。なお、#110の処理と#111の処理は並列に実行されていてもよい。   Step # 111: The second encoding unit 19 compresses and encodes the second image (# 108) in accordance with, for example, the main profile of MPEG-2 video. Thereby, the second encoded information is generated. Here, the second encoding unit 19 in the first embodiment performs motion compensation prediction between second images of different frames, but does not perform motion compensation prediction between the first image and the second image. . In addition, the process of # 110 and the process of # 111 may be performed in parallel.

ここで、図15(a)〜(c)は、第1実施形態での動画像の符号化形式の例を示す図である。図15において「In」はn番目のIピクチャを示し、「Pn」はn番目のPピクチャを示し、「Bn」はn番目のBピクチャを示す。また、第1画像は下付き数字の「1」で示し、第2画像は下付き数字の「2」で示す。   Here, FIGS. 15A to 15C are diagrams illustrating examples of the encoding format of the moving image in the first embodiment. In FIG. 15, “In” indicates the nth I picture, “Pn” indicates the nth P picture, and “Bn” indicates the nth B picture. The first image is indicated by a subscript number “1”, and the second image is indicated by a subscript number “2”.

図15(a)は、動画像の各フレームをIピクチャとして符号化する例を示している。図15(a)の場合は、画面内予測符号化のみであり、異なる画像との間で画面間予測符号化は行われない。   FIG. 15A shows an example in which each frame of a moving image is encoded as an I picture. In the case of FIG. 15A, only intra prediction encoding is performed, and inter prediction encoding is not performed between different images.

また、図15(b)は、IピクチャとPピクチャとの組み合わせで動画像を符号化する例を示している。Pピクチャの符号化では、時間軸方向で直前(直近の過去)のIピクチャまたはPピクチャを参照して、第1画像間または第2画像間でそれぞれ独立に画面間予測符号化が行われる。   FIG. 15B shows an example in which a moving image is encoded with a combination of an I picture and a P picture. In encoding a P picture, inter-screen predictive encoding is performed independently between first images or between second images with reference to the immediately preceding (most recent past) I picture or P picture in the time axis direction.

また、図15(c)は、Iピクチャ、Pピクチャ、Bピクチャとの組み合わせで動画像を符号化する例を示している。図15(c)の場合、Iピクチャ、Pピクチャは2フレームおきに生成され、IピクチャまたはPピクチャの間に2フレーム分のBピクチャが挿入されている。Bピクチャの符号化では、時間軸方向で前後に隣り合うIピクチャおよびPピクチャを参照して、第1画像間または第2画像間でそれぞれ独立に画面間双予測符号化が行われる。   FIG. 15C shows an example in which a moving image is encoded with a combination of an I picture, a P picture, and a B picture. In the case of FIG. 15C, an I picture and a P picture are generated every two frames, and a B picture for two frames is inserted between the I picture and the P picture. In encoding a B picture, inter-picture bi-predictive encoding is performed independently between first images or between second images with reference to I and P pictures adjacent to each other in the time axis direction.

なお、Pピクチャを圧縮する場合、符号化部は、参照画像の候補のうちからブロックごとに参照画像を1つ選択し、その参照画像の復号値を用いて各ブロックの動き補償予測を行う。また、Bピクチャを圧縮する場合、符号化部は、参照画像の候補のうちからブロックごとに過去と未来の参照画像を1つずつ選択し、2つの参照画像の復号値を用いて各ブロックの動き補償予測を行う。   When compressing a P picture, the encoding unit selects one reference image for each block from among reference image candidates, and performs motion compensation prediction of each block using a decoded value of the reference image. In addition, when compressing a B picture, the encoding unit selects one past and future reference images for each block from among reference image candidates, and uses the decoded values of the two reference images for each block. Perform motion compensation prediction.

ステップ#112:多重化部21は、第1符号化情報と、第2符号化情報とをピクチャ単位で多重化するとともに、上述の付帯情報を付与して圧縮動画像情報を出力する。なお、圧縮動画像情報は、記憶媒体110に記録される。   Step # 112: The multiplexing unit 21 multiplexes the first encoded information and the second encoded information in units of pictures, adds the above-mentioned incidental information, and outputs compressed moving picture information. Note that the compressed moving image information is recorded in the storage medium 110.

ステップ#113:圧縮制御部20は、入力される動画像全体の圧縮が終了したか否かを判定する。上述の要件を満たす場合(YES側)、圧縮制御部20は圧縮動作を終了する。一方、上述の要件を満たさない場合(NO側)、#102に戻って次のフレームの圧縮が行われる。以上で、図14の説明を終了する。   Step # 113: The compression control unit 20 determines whether or not compression of the entire input moving image has been completed. When the above requirements are satisfied (YES side), the compression control unit 20 ends the compression operation. On the other hand, when the above requirement is not satisfied (NO side), the process returns to # 102 and the next frame is compressed. Above, description of FIG. 14 is complete | finished.

(動画像の復号動作例)
以下、第1実施形態での動画像の復号動作例を説明する。
(Example of video decoding operation)
Hereinafter, an example of a moving image decoding operation according to the first embodiment will be described.

第1実施形態での電子カメラ100が圧縮処理部112で圧縮された圧縮動画像情報の再生指示を受け付けると、画像処理エンジン104は記録I/F107に接続された記憶媒体110から圧縮動画像情報を取得する。そして、復号処理部113は圧縮動画像情報を復号する。そして、復号された動画像は、画像処理エンジン104の制御により、例えばモニタ108で再生表示される。   When the electronic camera 100 according to the first embodiment receives an instruction to reproduce the compressed moving image information compressed by the compression processing unit 112, the image processing engine 104 reads the compressed moving image information from the storage medium 110 connected to the recording I / F 107. To get. Then, the decoding processing unit 113 decodes the compressed moving image information. The decoded moving image is reproduced and displayed, for example, on the monitor 108 under the control of the image processing engine 104.

図16は、復号処理部113での動画像の復号動作例を示す流れ図である。   FIG. 16 is a flowchart illustrating an example of a moving image decoding operation in the decoding processing unit 113.

ステップ#201:復号処理部113は、記憶媒体110から圧縮動画像情報を取得する。   Step # 201: The decoding processing unit 113 acquires compressed moving image information from the storage medium 110.

ステップ#202:多重化分離部51は、圧縮動画像情報の1フレーム分の情報(第1符号化情報、第2符号化情報および付帯情報)を分離する。分離された第1符号化情報は第1復号部52に出力され、分離された第2符号化情報は第2復号部53に出力される。また、分離された付帯情報は復号制御部61に出力される。   Step # 202: The multiplexing / separating unit 51 separates information (first encoded information, second encoded information, and incidental information) for one frame of the compressed moving image information. The separated first encoded information is output to the first decoding unit 52, and the separated second encoded information is output to the second decoding unit 53. The separated incidental information is output to the decoding control unit 61.

ステップ#203:復号制御部61は、付帯情報を必要に応じて復号するとともに、付帯情報を参照する。これにより、復号制御部61は、輝度間引き画像および色差間引き画像での標本点の間引きパターンの情報や、第1画像および第2画像の合成パターンの情報を取得する。   Step # 203: The decoding control unit 61 decodes the incidental information as necessary and refers to the incidental information. Thereby, the decoding control unit 61 acquires information on the thinning pattern of the sample points in the luminance thinned image and the color difference thinned image, and information on the combined pattern of the first image and the second image.

ステップ#204:第1復号部52は、例えばMPEG−2ビデオのメインプロファイルに準拠して第1符号化情報から第1画像(図3(d),図4(d),図5(d),図6(d))を復号する。   Step # 204: The first decoding unit 52 converts the first image (FIG. 3 (d), FIG. 4 (d), FIG. 5 (d) from the first encoded information in accordance with, for example, the main profile of MPEG-2 video. , FIG. 6D) is decoded.

ステップ#205:第2復号部53は、例えばMPEG−2ビデオのメインプロファイルに準拠して第2符号化情報から第2画像(図3(e),図4(e),図5(e),図6(e))を復号する。なお、#204の処理と#205の処理は並列に実行されていてもよい。   Step # 205: The second decoding unit 53 obtains the second image (FIG. 3 (e), FIG. 4 (e), FIG. 5 (e) from the second encoded information in accordance with, for example, the main profile of MPEG-2 video. , FIG. 6 (e)) is decoded. Note that the process of # 204 and the process of # 205 may be executed in parallel.

ステップ#206:第1分離部54は、入力された第1画像(#204)をYチャネルとU,Vチャネルとに分離する。第1画像のYチャネルは第1合成部56に出力され、第1画像のU,Vチャネルは第2合成部57に出力される。   Step # 206: The first separation unit 54 separates the input first image (# 204) into the Y channel and the U and V channels. The Y channel of the first image is output to the first combining unit 56, and the U and V channels of the first image are output to the second combining unit 57.

ステップ#207:第2分離部55は、入力された第2画像(#205)をYチャネルとU,Vチャネルとに分離する。第2画像のYチャネルは第1合成部56に出力され、第2画像のU,Vチャネルは第2合成部57に出力される。なお、#206の処理と#207の処理は並列に実行されていてもよい。   Step # 207: The second separation unit 55 separates the input second image (# 205) into the Y channel and the U and V channels. The Y channel of the second image is output to the first combining unit 56, and the U and V channels of the second image are output to the second combining unit 57. Note that the process of # 206 and the process of # 207 may be executed in parallel.

ステップ#208:第1合成部56は、付帯情報を用いて第1画像のYチャネルと第2画像のYチャネルとを合成する。これにより、第1合成部56は、輝度間引き画像(図3(b),図4(b),図5(b),図6(b))を復元する。   Step # 208: The first combining unit 56 combines the Y channel of the first image and the Y channel of the second image using the accompanying information. Thereby, the first synthesis unit 56 restores the luminance thinned image (FIG. 3B, FIG. 4B, FIG. 5B, FIG. 6B).

例えば、第1合成部56は、第1画像からYチャネルの奇数番目の行の情報を取得し、第2画像からYチャネルの偶数番目の行の情報を取得する。そして、第1合成部56は、奇数番目の行の情報と偶数番目の行の情報とが列方向に交互に並ぶように並べ替えて輝度間引き画像を復元すればよい。   For example, the first combining unit 56 acquires information on odd-numbered rows of the Y channel from the first image, and acquires information on even-numbered rows of the Y channel from the second image. The first combining unit 56 may restore the luminance thinned image by rearranging the odd-numbered row information and the even-numbered row information so that they are alternately arranged in the column direction.

ステップ#209:第2合成部57は、付帯情報を用いて第1画像のU,Vチャネルと第2画像のU,Vチャネルとを合成する。これにより、第1合成部56は、U,Vチャネルの輝度間引き画像(図3(c),図4(c),図5(c),図6(c))をそれぞれ復元する。   Step # 209: The second combining unit 57 combines the U and V channels of the first image and the U and V channels of the second image using the accompanying information. As a result, the first combining unit 56 restores the U and V channel luminance thinned images (FIG. 3C, FIG. 4C, FIG. 5C, and FIG. 6C), respectively.

例えば、第2合成部57は、第1画像からU,Vチャネルの奇数番目の行の情報をそれぞれ取得し、第2画像からU,Vチャネルの偶数番目の行の情報をそれぞれ取得する。そして、第2合成部57は、奇数番目の行の情報と偶数番目の行の情報とが列方向に交互に並ぶように並べ替えて色差間引き画像を復元すればよい。なお、#208の処理と#209の処理は並列に実行されていてもよい。   For example, the second combining unit 57 acquires information on odd-numbered rows of the U and V channels from the first image, and acquires information on even-numbered rows of the U and V channels from the second image. Then, the second combining unit 57 may restore the color difference thinned image by rearranging the odd-numbered row information and the even-numbered row information so that they are alternately arranged in the column direction. Note that the process of # 208 and the process of # 209 may be executed in parallel.

ステップ#210:第1補間部58は、#208で復元された輝度間引き画像の標本点をフレーム内補間する。これにより、第1補間部58は、Yチャネルの輝度間引き画像を輝度補間画像(図9(a),図10(a),図11(a),図12(a))に変換する。   Step # 210: The first interpolation unit 58 inter-frame interpolates the sample points of the luminance thinned image restored in # 208. As a result, the first interpolation unit 58 converts the luminance thinned image of the Y channel into luminance interpolation images (FIG. 9A, FIG. 10A, FIG. 11A, and FIG. 12A).

図17は、補間部での補間処理の例を示す図である。一例として、図17の例では、輝度間引き画像において、標本点Y35、Y44、Y46、Y55に隣り合う標本点Y45をフレーム内補間する場合を考える。このとき、第1補間部52は、式(1)の演算により補間すべき標本点Y45の輝度成分を求めればよい。   FIG. 17 is a diagram illustrating an example of interpolation processing in the interpolation unit. As an example, in the example of FIG. 17, a case is considered in which intra-frame interpolation is performed on sample points Y45 adjacent to sample points Y35, Y44, Y46, and Y55 in the luminance thinned image. At this time, the first interpolation unit 52 may obtain the luminance component of the sample point Y45 to be interpolated by the calculation of Expression (1).

Figure 2019022225
Figure 2019022225

ここで、本明細書の記載において、「Sγh」は、標本点γでの水平方向の相関を示し、「Sγv」は、標本点γでの垂直方向の相関を示す。また、「Kγh」は、標本点γでの水平方向の重み付け値を示し、「Kγv」は、標本点γでの垂直方向の重み付け値を示す。   Here, in the description of the present specification, “Sγh” indicates the horizontal correlation at the sample point γ, and “Sγv” indicates the vertical correlation at the sample point γ. “Kγh” indicates a horizontal weighting value at the sample point γ, and “Kγv” indicates a vertical weighting value at the sample point γ.

ステップ#211:第2補間部59は、#209で復元された色差間引き画像の標本点をフレーム内補間する。これにより、第2補間部59は、U,Vチャネルの色差間引き画像をそれぞれ色差補間画像(図9(b),図10(b),図11(b),図12(b))に変換する。第2補間部59での補間処理は、第1補間部58での処理(図17参照)とほぼ同様であるので重複説明は省略する。なお、#210の処理と#211の処理は並列に実行されていてもよい。   Step # 211: The second interpolation unit 59 inter-frame interpolates the sample points of the color difference thinned image restored in # 209. As a result, the second interpolation unit 59 converts the U and V channel color difference thinned images into color difference interpolated images (FIG. 9B, FIG. 10B, FIG. 11B, and FIG. 12B), respectively. To do. Interpolation processing in the second interpolation unit 59 is substantially the same as the processing in the first interpolation unit 58 (see FIG. 17), and thus a duplicate description is omitted. In addition, the process of # 210 and the process of # 211 may be performed in parallel.

ステップ#212:画像出力部60は、同じフレームの輝度補間画像と色差補間画像とを対応付けて、1つの復号フレーム(図9(c),図10(c),図11(c),図12(c))として出力する。   Step # 212: The image output unit 60 associates the luminance interpolated image and the color difference interpolated image of the same frame with one decoded frame (FIG. 9 (c), FIG. 10 (c), FIG. 11 (c), FIG. 12 (c)).

ステップ#213:復号制御部61は、圧縮動画像情報全体の復号が終了したか否かを判定する。上述の要件を満たす場合(YES側)、復号制御部61は復号動作を終了する。一方、上述の要件を満たさない場合(NO側)、#201に戻って次のフレームの復号が行われる。以上で、図16の説明を終了する。   Step # 213: The decoding control unit 61 determines whether or not the decoding of the entire compressed moving image information has been completed. If the above requirement is satisfied (YES side), the decoding control unit 61 ends the decoding operation. On the other hand, when the above requirement is not satisfied (NO side), the process returns to # 201 and the next frame is decoded. This is the end of the description of FIG.

(第1実施形態の作用効果)
以下、第1実施形態における作用効果を述べる。第1実施形態の電子カメラ100は、動画像の圧縮時において、奇数番目の行の標本点と偶数番目の行の標本点との位置が行方向にずれるように、YUV画像のYチャネルとU,Vチャネルとでそれぞれ標本点を間引きする。また、電子カメラ100は、上述の間引き後の輝度間引き画像と色差間引き画像とからそれぞれ奇数番目の行の標本点を抽出して第1画像を生成する。また、電子カメラ100は、上述の間引き後の輝度間引き画像と色差間引き画像とからそれぞれ偶数番目の行の標本点を抽出して第2画像を生成する。そして、電子カメラ100は、第1画像を符号化して第1符号化情報を生成し、第2画像を符号化して第2符号化情報を生成する。第1画像および第2画像は、圧縮元の画像に比べて標本点が1/4になるため、間引き前と比べて画像のデータ量は小さくなる。
(Operational effects of the first embodiment)
Hereinafter, the operational effects of the first embodiment will be described. In the electronic camera 100 according to the first embodiment, when compressing a moving image, the Y channel of the YUV image and the U channel are arranged so that the positions of the sample points in the odd-numbered rows and the sample points in the even-numbered rows are shifted in the row direction. Sample points are thinned out for the V channel and V channel, respectively. In addition, the electronic camera 100 generates the first image by extracting the sample points in the odd-numbered rows from the luminance thinned image and the color difference thinned image after the thinning. In addition, the electronic camera 100 extracts the sample points in the even-numbered rows from the luminance thinned image and the color difference thinned image after the thinning, and generates a second image. Then, the electronic camera 100 encodes the first image to generate first encoded information, and encodes the second image to generate second encoded information. Since the first image and the second image have 1/4 the number of sample points compared to the compression source image, the data amount of the image is smaller than that before thinning.

また、例えば、斜め方向に間引きした画像の間隔を詰めた状態で圧縮する場合には、縦方向のエッジや横方向のエッジを含む画像では隣接する標本点との相関が低下し、圧縮時の符号化効率の低下や画質の劣化が生じうる。一方、第1実施形態では、斜め方向に間引きされた画像を第1画像および第2画像に分けて圧縮するので、上述の場合に比べて圧縮時の符号化効率の低下や画質の劣化を抑制できる。   Also, for example, when compression is performed in a state where the interval between images thinned in the diagonal direction is reduced, the correlation between adjacent sample points is reduced in an image including a vertical edge or a horizontal edge, and the compression Declining encoding efficiency and image quality may occur. On the other hand, in the first embodiment, since the image thinned out in the oblique direction is compressed separately into the first image and the second image, the reduction of the encoding efficiency and the deterioration of the image quality at the time of compression are suppressed as compared with the above case. it can.

また、第1実施形態の電子カメラ100は、圧縮動画像情報を復号するとき、第1画像および第2画像を並べ替えて輝度間引き画像と色差間引き画像とを復元する。そして、電子カメラ100は、輝度間引き画像と色差間引き画像をそれぞれ補間して、圧縮元の画像と同じ形式の復号フレームを出力する。なお、画像の間引きのパターンは、画像圧縮装置が圧縮動画像情報に付帯情報を付加することで、画像復号装置に対して明示的に告知できる。また、第1実施形態では、標本点のパターンの異なる2画像を用いて間引きした画像を復元し、この間引き画像を補間して復号フレームを生成するので、第1画像や第2画像をそのまま再生する場合と比べて画質が高くなる。   In addition, when decoding the compressed moving image information, the electronic camera 100 according to the first embodiment rearranges the first image and the second image to restore the luminance thinned image and the color difference thinned image. The electronic camera 100 then interpolates the luminance thinned image and the color difference thinned image, and outputs a decoded frame having the same format as the compression source image. Note that the image thinning pattern can be explicitly notified to the image decoding device by adding additional information to the compressed moving image information by the image compression device. Further, in the first embodiment, a thinned image is restored using two images having different sample point patterns, and a decoded frame is generated by interpolating the thinned image. Therefore, the first image and the second image are reproduced as they are. The image quality is higher than in the case where

また、第1実施形態の圧縮動画像情報は、上述の復号処理部113を有していない一般の復号装置でも、MPEG−2ビデオのメインプロファイルに準拠して第1画像または第2画像の画質で復号、再生できる。   In addition, the compressed moving image information of the first embodiment can be used for the image quality of the first image or the second image in accordance with the main profile of MPEG-2 video even in a general decoding device that does not include the decoding processing unit 113 described above. Can be decrypted and played.

また、第1実施形態の圧縮動画像情報は、第1符号化情報と第2符号化情報とがそれぞれ独立して圧縮されるので、一方の符号化情報のみを用いて第1画像または第2画像の画質で画像の復号、再生をすることができる。例えば、通信回線を用いて動画像を転送する場合、低速度の回線では一方の符号化情報のみを送信し、高速度の回線では圧縮動画像情報を送信する等の使い分けができる。   In the compressed moving image information according to the first embodiment, the first encoded information and the second encoded information are compressed independently of each other, so that only the first encoded information or the second encoded information is used. The image can be decoded and reproduced with the image quality. For example, when transferring a moving image using a communication line, only one encoded information is transmitted on a low speed line, and compressed moving image information is transmitted on a high speed line.

<第2実施形態の説明>
第2実施形態は、第1実施形態の変形例であって、圧縮処理部112、復号処理部113の構成のみ相違する。そのため、以下の説明では、第1実施形態と共通する要素には、同一符号を付して重複説明は省略する。
<Description of Second Embodiment>
The second embodiment is a modification of the first embodiment, and only the configuration of the compression processing unit 112 and the decoding processing unit 113 is different. Therefore, in the following description, elements common to the first embodiment are denoted by the same reference numerals, and redundant description is omitted.

図18は、第2実施形態での圧縮処理部112の構成例を示す図である。第2実施形態での圧縮処理部112は、色成分分離部11、第1間引き部12、第2間引き部13、第1分離部14、第2分離部15、第1画像生成部16、第2画像生成部17、圧縮制御部20、符号化処理部22を有している。   FIG. 18 is a diagram illustrating a configuration example of the compression processing unit 112 in the second embodiment. The compression processing unit 112 in the second embodiment includes a color component separation unit 11, a first thinning unit 12, a second thinning unit 13, a first separation unit 14, a second separation unit 15, a first image generation unit 16, A two-image generation unit 17, a compression control unit 20, and an encoding processing unit 22.

ここで、第2実施形態での圧縮処理部112のうち、色成分分離部11、第1間引き部12、第2間引き部13、第1分離部14、第2分離部15、第1画像生成部16、第2画像生成部17、圧縮制御部20の構成および機能は、第1実施形態と共通である。なお、第2実施形態での第1画像生成部16、第2画像生成部17の出力は、それぞれ符号化処理部22に接続されている。   Here, among the compression processing units 112 in the second embodiment, the color component separation unit 11, the first thinning unit 12, the second thinning unit 13, the first separation unit 14, the second separation unit 15, and the first image generation. The configurations and functions of the unit 16, the second image generation unit 17, and the compression control unit 20 are the same as those in the first embodiment. Note that the outputs of the first image generation unit 16 and the second image generation unit 17 in the second embodiment are connected to the encoding processing unit 22, respectively.

符号化処理部22は、符号化部および出力部の一例であって、入力される第1画像および第2画像を圧縮符号化する機能と、付帯情報を付与する機能とを有する。符号化処理部22に内蔵される符号化部は、図7と同様に構成される。そのため、符号化処理部22に含まれる符号化部の各要素については重複説明を省略する。また、第2実施形態での符号化処理部22は、第1画像と第2画像との間で画面間双予測符号化を行う。   The encoding processing unit 22 is an example of an encoding unit and an output unit, and has a function of compressing and encoding the input first image and second image and a function of adding incidental information. The encoding unit built in the encoding processing unit 22 is configured in the same manner as in FIG. Therefore, redundant description of each element of the encoding unit included in the encoding processing unit 22 is omitted. In addition, the encoding processing unit 22 in the second embodiment performs inter-screen bi-predictive encoding between the first image and the second image.

図19は、第2実施形態での復号処理部113の構成例を示す図である。第2実施形態での復号処理部113は、復号部62、第1分離部54、第2分離部55、第1合成部56、第2合成部57、第1補間部58、第2補間部59、画像出力部60、復号制御部61を有している。   FIG. 19 is a diagram illustrating a configuration example of the decryption processing unit 113 in the second embodiment. The decoding processing unit 113 in the second embodiment includes a decoding unit 62, a first separation unit 54, a second separation unit 55, a first synthesis unit 56, a second synthesis unit 57, a first interpolation unit 58, and a second interpolation unit. 59, an image output unit 60, and a decoding control unit 61.

ここで、第2実施形態での復号処理部113では、復号部62に圧縮動画像情報が入力される。復号部62は、図13と同様に構成される。そのため、復号部62の各要素については重複説明を省略する。また、復号部62は、画面間双予測符号化で符号化された第1画像および第2画像をそれぞれ復号する。そして、復号部62は、復号した第1画像を第1分離部54に出力し、復号した第2画像を第2分離部55に出力する。また、復号部62は、付帯情報を復号制御部61に出力する。   Here, in the decoding processing unit 113 in the second embodiment, the compressed moving image information is input to the decoding unit 62. The decoding unit 62 is configured in the same manner as in FIG. For this reason, redundant description of each element of the decoding unit 62 is omitted. In addition, the decoding unit 62 decodes each of the first image and the second image encoded by the inter-screen bi-predictive encoding. Then, the decoding unit 62 outputs the decoded first image to the first separation unit 54, and outputs the decoded second image to the second separation unit 55. Further, the decoding unit 62 outputs the incidental information to the decoding control unit 61.

なお、第2実施形態での復号処理部113のうち、第1分離部54、第2分離部55、第1合成部56、第2合成部57、第1補間部58、第2補間部59、画像出力部60、復号制御部61の構成および機能は、第1実施形態と共通である。   Of the decoding processing unit 113 in the second embodiment, the first separation unit 54, the second separation unit 55, the first synthesis unit 56, the second synthesis unit 57, the first interpolation unit 58, and the second interpolation unit 59. The configurations and functions of the image output unit 60 and the decoding control unit 61 are the same as those in the first embodiment.

(動画像の圧縮動作例)
以下、第2実施形態での動画像の圧縮動作例を説明する。図20は、第2実施形態の圧縮処理部112での動画像の圧縮動作例を示す流れ図である。なお、図20に示す#301から#308までの処理は、図14に示す#101から#109までの処理にそれぞれ対応するため、重複説明は省略する。
(Example of video compression)
An example of a moving image compression operation in the second embodiment will be described below. FIG. 20 is a flowchart illustrating an example of a moving image compression operation in the compression processing unit 112 according to the second embodiment. Note that the processing from # 301 to # 308 shown in FIG. 20 corresponds to the processing from # 101 to # 109 shown in FIG.

ステップ#310:符号化処理部22は、例えばMPEG−2ビデオのメインプロファイルに準拠して第1画像(#307)および第2画像(#308)を圧縮符号化する。これにより、第1符号化情報および第2符号化情報が生成される。   Step # 310: The encoding processing unit 22 compresses and encodes the first image (# 307) and the second image (# 308) in accordance with, for example, the main profile of MPEG-2 video. As a result, first encoded information and second encoded information are generated.

図21(a),(b)は、第2実施形態での動画像の符号化形式の例を示す図である。図21において「In」はn番目のIピクチャを示し、「Pn」はn番目のPピクチャを示し、「Bn」はn番目のBピクチャを示す。また、第1画像は下付き数字の「1」で示し、第2画像は下付き数字の「2」で示す。   FIGS. 21A and 21B are diagrams illustrating examples of moving image encoding formats according to the second embodiment. In FIG. 21, “In” indicates the nth I picture, “Pn” indicates the nth P picture, and “Bn” indicates the nth B picture. The first image is indicated by a subscript number “1”, and the second image is indicated by a subscript number “2”.

図21(a)は、IピクチャとPピクチャとの組み合わせで動画像を符号化する例を示している。図21(a)の場合には、時間軸方向で過去の第1画像および第2画像を参照して画面間予測符号化が行われる。   FIG. 21A shows an example in which a moving image is encoded by a combination of an I picture and a P picture. In the case of FIG. 21A, inter-screen prediction encoding is performed with reference to the past first image and second image in the time axis direction.

図21(a)の場合、Pピクチャとなる第1画像の動き補償予測では、それぞれ1フレーム過去の第1画像(Iピクチャ/Pピクチャ)または第2画像(Pピクチャ)が参照画像の候補となる。また、Pピクチャとなる第2画像の動き補償予測では、1フレーム過去の第2画像(Pピクチャ)または同じフレームから分離された第1画像(Iピクチャ/Pピクチャ)が参照画像の候補となる。   In the case of FIG. 21A, in the motion compensation prediction of the first image that is a P picture, the first image (I picture / P picture) or the second image (P picture) that is one frame past each is the reference image candidate. Become. In addition, in the motion compensation prediction of the second image to be a P picture, the second image (P picture) that is one frame past or the first image (I picture / P picture) separated from the same frame is a candidate for the reference image. .

また、図21(b)は、Iピクチャ、Pピクチャ、Bピクチャとの組み合わせで動画像を符号化する例を示している。図21(b)の場合、第1画像では、Iピクチャ、Pピクチャは2フレームおきに生成され、IピクチャまたはPピクチャの間に2フレーム分のBピクチャが挿入されている。また、第2画像では、Pピクチャのみが2フレームおきに生成され、Pピクチャの間に2フレーム分のBピクチャが挿入されている。   FIG. 21B shows an example in which a moving image is encoded with a combination of an I picture, a P picture, and a B picture. In the case of FIG. 21B, in the first image, an I picture and a P picture are generated every two frames, and a B picture for two frames is inserted between the I picture and the P picture. In the second image, only P pictures are generated every two frames, and B pictures for two frames are inserted between the P pictures.

図21(b)の場合、Pピクチャとなる第1画像、第2画像の動き補償予測では、直前のIピクチャまたはPピクチャのフレームに対応する第1画像(Iピクチャ/Pピクチャ)または第2画像(Pピクチャ)が参照画像の候補となる。   In the case of FIG. 21B, in the motion compensation prediction of the first image and the second image that are P pictures, the first picture (I picture / P picture) or the second picture corresponding to the frame of the immediately preceding I picture or P picture is used. An image (P picture) is a candidate for a reference image.

また、図21(b)の場合、Bピクチャとなる第1画像,第2画像の動き補償予測では、(1)過去側で直近のIピクチャまたはPピクチャのフレームから分離した第1画像または第2画像のうち1つと、(2)未来側で直近のIピクチャまたはPピクチャのフレームから分離した第1画像または第2画像のうち1つとが、それぞれ参照画像の候補となる。   In the case of FIG. 21B, in motion compensated prediction of the first image and the second image that are B pictures, (1) the first image or the first image separated from the frame of the most recent I picture or P picture on the past side. One of the two images and (2) one of the first image and the second image separated from the frame of the latest I picture or P picture on the future side are candidates for the reference image.

ところで、第1画像と第2画像で同じ位置の画素は圧縮元の画像では標本点の位置が相違する。   By the way, the positions of the sample points of the pixels at the same position in the first image and the second image are different in the original image.

この標本点の位置の相違に起因して、画像の静止部分では、それぞれ異なるフレームの第1画像間もしくは第2画像間で動き補償を伴わないフレーム間予測により、比較的小さなフレーム間予測誤差を符号化することができる。   Due to the difference in the position of the sample points, relatively small inter-frame prediction errors are caused in the still part of the image by inter-frame prediction without motion compensation between the first images or the second images of different frames. Can be encoded.

一方、画像の動き部分では、例えば、或るフレームの第1画像を動き補償予測する際に、異なるフレームの第1画像を参照して動き補償予測するよりも異なるフレームの第2画像を参照したほうが予測誤差を小さくできる場合や、或るフレームの第2画像を動き補償予測する際に、異なるフレームの第2画像よりも同じフレームの第1画像から動き補償予測したほうが予測誤差を小さくできる場合がある。前者のケースは、符号化対象の第1画像の動き部分が異なるフレームの第2画像の画素位置から動いた、もしくは、例えば、異なるフレームの第2画像の画素位置へ動く場合である。また、後者のケースは、符号化対象の第2画像の動き部分が絵柄の変化やオクージョンなどにより、異なるフレームの第2画像を参照する動き補償予測では予測誤差を小さくできない場合である。そのため、図21のように、第1画像、第2画像の参照画像をブロック単位で選択して動き補償予測することで、符号化効率を大幅に向上できる。   On the other hand, in the motion portion of an image, for example, when motion compensation prediction is performed on a first image of a certain frame, a second image of a different frame is referred to rather than referring to the first image of a different frame. When the prediction error can be made smaller, or when the second image of a certain frame is subjected to motion compensation prediction, the motion compensation prediction can be made smaller from the first image of the same frame than the second image of a different frame. There is. The former case is a case where the moving part of the first image to be encoded has moved from the pixel position of the second image in a different frame or, for example, moved to the pixel position of the second image in a different frame. The latter case is a case where the prediction error cannot be reduced by motion compensated prediction referring to the second image of a different frame due to a change in the pattern of the second image to be encoded or occlusion. Therefore, as shown in FIG. 21, by selecting the reference images of the first image and the second image in units of blocks and performing motion compensation prediction, the coding efficiency can be greatly improved.

なお、同じフレームの他方の画像を参照して動き補償予測する場合、標本点の位置の相違を補償すればよい。以下の説明では、図面では画像上で標本点(画素P)の配列を丸印で示す。また、予測先画像の注目画素の位置に対する予測元画像の参照画素の位置ズレを、動きベクトルMV[x,y]と称する。動きベクトルMVは、右方向のズレによりxが増加し、左方向のズレによりxが減少する。同様に、動きベクトルMVは、下方向のズレによりyが増加し、上方向のズレによりyが減少する。   In addition, when motion compensation prediction is performed with reference to the other image of the same frame, a difference in sample point position may be compensated. In the following description, the arrangement of sample points (pixels P) is indicated by circles on the image in the drawings. Further, the positional deviation of the reference pixel of the prediction source image with respect to the position of the target pixel of the prediction destination image is referred to as a motion vector MV [x, y]. In the motion vector MV, x increases due to a right shift, and x decreases due to a left shift. Similarly, in the motion vector MV, y increases due to a downward shift, and y decreases due to an upward shift.

図22は、或るフレームの第2画像を、同じフレームの第1画像を参照して動き補償予測する例である。図22は、予測先画像(第2画像)の注目画素P2xでの画素値を、注目画素に隣接する予測元画像(第1画像)の4画素(P1a〜P1d)の平均値で求める例を示している。図22の場合、注目画素の画素値を4つの隣接画素の平均で予測するため、予測元画像の復号値に含まれる符号化歪みを抑制できる。   FIG. 22 is an example of motion compensation prediction of a second image of a certain frame with reference to the first image of the same frame. FIG. 22 illustrates an example in which the pixel value at the target pixel P2x of the prediction destination image (second image) is obtained as an average value of four pixels (P1a to P1d) of the prediction source image (first image) adjacent to the target pixel. Show. In the case of FIG. 22, since the pixel value of the target pixel is predicted by the average of four adjacent pixels, the coding distortion included in the decoded value of the prediction source image can be suppressed.

図22の例では、色配列の左上に第1画像のP1画素、色配列の右下に第2画像のP2画素が配置されている。図22の場合、第1画像の画素P1aと第2画像の画素P2xを同じ位置の標本点として符号化する。そのため、図22の例では、動きベクトルMVは[0.5,0.5]となる。   In the example of FIG. 22, the P1 pixel of the first image is arranged at the upper left of the color arrangement, and the P2 pixel of the second image is arranged at the lower right of the color arrangement. In the case of FIG. 22, the pixel P1a of the first image and the pixel P2x of the second image are encoded as sample points at the same position. Therefore, in the example of FIG. 22, the motion vector MV is [0.5, 0.5].

上述した図22の動き補償予測は、絵柄の変化が比較的に少ないブロックで選択される確率が高い。動画像には動きのない部分も数多く含まれるため、第1画像と第2画像との圧縮符号化では、図22の予測が選択される頻度も高くなる。そのため、符号化処理部22は、図22の動き補償予測の場合に最短の符号を割り当てて、圧縮効率を高めてもよい。   In the motion compensated prediction of FIG. 22 described above, there is a high probability that a block with a relatively small change in pattern is selected. Since a moving image includes many portions having no motion, the frequency of selecting the prediction of FIG. 22 is high in the compression encoding of the first image and the second image. Therefore, the encoding processing unit 22 may assign the shortest code in the case of motion compensated prediction in FIG. 22 to increase the compression efficiency.

例えば、あるフレームの第2画像を、同じフレームの第1画像を参照して動き補償予測する場合、動きベクトルから[0.5,0.5]を一律に引く補正を行うと、MPEG−2ビデオなどで最短の符号割当となる[0,0]となるので、圧縮効率を高めることがで
きる。なお、上述の補正をしたデータを復号するときには、復号時に[0.5,0.5]を加算補正すればよい。
For example, when motion compensation prediction is performed on a second image of a certain frame with reference to the first image of the same frame, if correction is performed by uniformly subtracting [0.5, 0.5] from the motion vector, MPEG-2 Since [0, 0] is the shortest code allocation for video or the like, the compression efficiency can be increased. In addition, when decoding the corrected data, [0.5, 0.5] may be added and corrected at the time of decoding.

また、図4、図5、図6で説明したように、圧縮元の画像のデータ形式に応じて、第1画像と第2画像の間で輝度の標本点に対する色差の標本点の配置がそれぞれ異なる場合がある。そのため、符号化処理部22は、圧縮元の画像のデータ形式に応じて、U,Vチャネルで適用する動きベクトルの補正量を求める必要がある。   In addition, as described with reference to FIGS. 4, 5, and 6, the arrangement of the color difference sample points with respect to the luminance sample points is different between the first image and the second image according to the data format of the compression source image. May be different. Therefore, the encoding processing unit 22 needs to obtain the correction amount of the motion vector applied in the U and V channels according to the data format of the compression source image.

一例として、YUV4:2:2形式の第1画像及び第2画像(図4(d),(e))においてU,Vチャネルの動き補償予測を行う場合には、第1画像と第2画像で色差の標本点がYチャネル換算で水平方向に0.5画素ずれている。また、YUV4:2:0形式の第1画像及び第2画像(図5(d),(e))においてU,Vチャネルの動き補償予測を行う場合には、第1画像と第2画像で色差の標本点がYチャネル換算で水平方向および垂直方向に0.5画素ずれている。一般に、U,Vチャネルの動き補償予測は、Yチャネルの動きベクトルをデータ形式に応じてスケーリングした動きベクトルを用いる。上述のずれを配慮しないままだと、ずれた動きベクトルでU,Vチャネルは動き補償予測されるので符号化効率が低下する。U,Vチャネルの動き補償予測において、データ形式に応じて、上述のずれを補正(すなわち、動きベクトルを補正)することで符号化効率を向上できる。   As an example, when performing U-channel and V-channel motion compensation prediction in the first and second images in the YUV 4: 2: 2 format (FIGS. 4D and 4E), the first and second images are used. Thus, the sample point of the color difference is shifted by 0.5 pixel in the horizontal direction in terms of Y channel. In addition, when performing U- and V-channel motion compensation prediction in the first and second images in the YUV 4: 2: 0 format (FIGS. 5D and 5E), the first image and the second image are used. The sample point of the color difference is shifted by 0.5 pixels in the horizontal and vertical directions in terms of Y channel. In general, motion compensation prediction for U and V channels uses a motion vector obtained by scaling a Y channel motion vector according to a data format. If the above-mentioned shift is not taken into consideration, the U and V channels are motion-compensated and predicted with the shifted motion vector, so that the coding efficiency is lowered. In the motion compensation prediction of the U and V channels, the coding efficiency can be improved by correcting the above-described shift (that is, correcting the motion vector) according to the data format.

なお、第1画像と第2画像との動き補償予測での動きベクトルの補正は、予め圧縮方式で規格化してもよく、上述した動きベクトルの補正の要否を示す補正情報を符号化時に付与することで画像復号装置に対して明示してもよい。   Note that the correction of the motion vector in the motion compensated prediction between the first image and the second image may be standardized by a compression method in advance, and correction information indicating whether or not the above-described correction of the motion vector is necessary is provided at the time of encoding. By doing so, it may be clearly shown to the image decoding apparatus.

ステップ#311:符号化処理部22は、第1符号化情報、第2符号化情報と、上述の付帯情報とをピクチャ単位で多重化した圧縮動画像情報を出力する。なお、圧縮動画像情報は、記憶媒体110に記録される。   Step # 311: The encoding processing unit 22 outputs compressed moving image information obtained by multiplexing the first encoded information, the second encoded information, and the above-described incidental information in units of pictures. Note that the compressed moving image information is recorded in the storage medium 110.

ここで、#310において、第1画像と第2画像との動き補償予測を行った場合、圧縮制御部20は、上述した動きベクトルの補正の要否を示す補正情報を生成する。そして、#311での符号化処理部22は、上述の補正情報をさらに圧縮動画像情報に付与する。例えば、符号化処理部22は、MPEG−2ビデオのメインプロファイルに準拠して圧縮符号化する場合、ピクチャコーディングエクステンションに続くユーザデータの領域に上述の付帯情報や補正情報を含めることができる。   Here, when motion compensation prediction is performed on the first image and the second image in # 310, the compression control unit 20 generates correction information indicating whether or not the above-described motion vector needs to be corrected. Then, the encoding processing unit 22 in # 311 further adds the above-described correction information to the compressed moving image information. For example, the encoding processing unit 22 can include the above-described supplementary information and correction information in the user data area following the picture coding extension when compression encoding is performed in accordance with the main profile of MPEG-2 video.

ステップ#312:圧縮制御部20は、入力される動画像全体の圧縮が終了したか否かを判定する。上述の要件を満たす場合(YES側)、圧縮制御部20は圧縮動作を終了する。一方、上述の要件を満たさない場合(NO側)、#302に戻って次のフレームの圧縮が行われる。以上で、図20の説明を終了する。   Step # 312: The compression control unit 20 determines whether or not compression of the entire input moving image has been completed. When the above requirements are satisfied (YES side), the compression control unit 20 ends the compression operation. On the other hand, when the above requirement is not satisfied (NO side), the process returns to # 302 and the next frame is compressed. Above, description of FIG. 20 is complete | finished.

また、図23は、図20の#310での圧縮符号化処理の例を示す流れ図である。   FIG. 23 is a flowchart showing an example of the compression encoding process in # 310 of FIG.

ステップ#401:圧縮制御部20は、符号化の対象となる画像の種類(第1画像、第2画像)を識別する。また、圧縮制御部20は、符号化の対象となる画像の符号化形式(Iピクチャ、Pピクチャ、Bピクチャ)を決定する。   Step # 401: The compression control unit 20 identifies the type of image (first image, second image) to be encoded. In addition, the compression control unit 20 determines the encoding format (I picture, P picture, B picture) of an image to be encoded.

ステップ#402:圧縮制御部20は、符号化の対象となる画像と参照画像との組み合わせに応じて、圧縮時の動き補償予測での動きベクトルの補正の要否を決定する。   Step # 402: The compression control unit 20 determines whether or not it is necessary to correct a motion vector in motion compensation prediction at the time of compression according to a combination of an image to be encoded and a reference image.

例えば、第1画像同士、第2画像同士で画面間予測符号化をする場合、符号化の対象となる画像と参照画像との間で標本点の位置は一致する。しかし、第1画像と第2画像との間で画面間予測符号化をする場合、符号化の対象となる画像と参照画像との間で標本点の位置にズレが生じる。したがって、後者の場合には、圧縮制御部20は、動き補償予測で動きベクトルを補正する設定を行う。   For example, when inter-screen predictive coding is performed between the first images and between the second images, the positions of the sample points match between the image to be coded and the reference image. However, when inter-picture predictive encoding is performed between the first image and the second image, the sample point is displaced between the image to be encoded and the reference image. Therefore, in the latter case, the compression control unit 20 performs a setting for correcting the motion vector by motion compensation prediction.

また、画像の輝度面と色差面との間で標本点のサンプリングが異なる場合、輝度成分で動き補償予測に用いた動きベクトルを、色差成分の動き補償予測にそのまま適用できない。したがって、この場合にも、圧縮制御部20は、動き補償予測で動きベクトルを補正する設定を行う。   In addition, when sampling of sampling points is different between the luminance plane and the color difference plane of the image, the motion vector used for the motion compensation prediction with the luminance component cannot be directly applied to the motion compensation prediction of the color difference component. Therefore, also in this case, the compression control unit 20 performs a setting for correcting the motion vector in the motion compensation prediction.

ステップ#403:符号化処理部22は、符号化する画像のヘッダ領域の情報を符号化する。ここで、画像のヘッダ領域には、圧縮制御部20の制御により、符号化の対象となる画像の符号化形式(Iピクチャ、Pピクチャ、Bピクチャ)の情報や、付帯情報および補正情報が付与される。例えば、付帯情報には、符号化する画像が第1画像、第2画像のいずれであるかを示す識別子が含まれる。また、付帯情報には、圧縮元の画像のデータ形式を示す識別子や、輝度間引き画像や色差間引き画像での標本点の間引きパターンを示す識別子や、第1画像や第2画像での標本点の抽出パターンを示す識別子が含まれていてもよい。なお、補正情報は、例えば、上述した動きベクトルの補正の要否を示す識別子である。   Step # 403: The encoding processing unit 22 encodes information on the header area of the image to be encoded. Here, information on the encoding format (I picture, P picture, B picture) of the image to be encoded, auxiliary information, and correction information are added to the header area of the image under the control of the compression control unit 20. Is done. For example, the incidental information includes an identifier indicating whether the image to be encoded is a first image or a second image. The accompanying information includes an identifier indicating the data format of the compression source image, an identifier indicating the sampling point thinning pattern in the luminance thinned image and the color difference thinned image, and the sampling point in the first image and the second image. An identifier indicating the extraction pattern may be included. The correction information is, for example, an identifier that indicates whether the above-described motion vector correction is necessary.

また、例えば、#403での符号化処理部22は、MPEG−2ビデオのメインプロファイルに準拠して圧縮符号化する場合、ピクチャコーディングエクステンションに続くユーザデータの領域に上述の付帯情報や補正情報を含めればよい。   In addition, for example, when the encoding processing unit 22 in # 403 performs compression encoding in accordance with the main profile of MPEG-2 video, the above-described incidental information and correction information are added to the user data area following the picture coding extension. You can include it.

ステップ#404:符号化処理部22の予測情報生成部40は、PピクチャまたはBピクチャを生成する場合、参照画像を用いて、マクロブロックを動き補償予測する。また、予測情報生成部40は、Iピクチャを生成する場合には、マクロブロックの情報をスルー出力する。   Step # 404: When generating the P picture or the B picture, the prediction information generation unit 40 of the encoding processing unit 22 performs motion compensation prediction on the macroblock using the reference image. Further, when generating an I picture, the prediction information generation unit 40 outputs macro block information as a through output.

ステップ#405:符号化処理部22の予測部41は、PピクチャまたはBピクチャを生成する場合、動き補償予測(#404)で得たマクロブロックの予測値を出力する。また、予測部41は、Iピクチャを生成する場合、予測値としてゼロ値を出力する。そして、減算部32は、画像の原信号から予測値を減算して予測誤差を出力する。   Step # 405: When generating the P picture or the B picture, the prediction unit 41 of the encoding processing unit 22 outputs the prediction value of the macroblock obtained by the motion compensation prediction (# 404). In addition, when generating an I picture, the prediction unit 41 outputs a zero value as a prediction value. Then, the subtraction unit 32 subtracts the prediction value from the original image signal and outputs a prediction error.

ステップ#406:符号化処理部22の直交変換部33は、予測誤差(#405)を直交変換する。   Step # 406: The orthogonal transform unit 33 of the encoding processing unit 22 performs orthogonal transform on the prediction error (# 405).

ステップ#407:符号化処理部22の量子化部34は、予測誤差の直交変換係数(#406)を量子化する。   Step # 407: The quantization unit 34 of the encoding processing unit 22 quantizes the orthogonal transform coefficient (# 406) of the prediction error.

ステップ#408:符号化処理部22の可変長符号化部35は、動きベクトルや参照画像等を示す予測情報や、量子化係数を可変長符号化する。#408の段階で、1ブロック分の符号化情報が後段の回路に出力される。   Step # 408: The variable length coding unit 35 of the coding processing unit 22 performs variable length coding on prediction information indicating a motion vector, a reference image, and the like, and a quantization coefficient. In step # 408, encoded information for one block is output to the subsequent circuit.

ステップ#409:符号化処理部22の逆量子化部36は、量子化係数を逆量子化する。   Step # 409: The inverse quantization unit 36 of the encoding processing unit 22 performs inverse quantization on the quantization coefficient.

ステップ#410:符号化処理部22の逆直交変換部37は、逆量子化で求めた直交変換係数を逆直交変換して予測誤差を復号する。   Step # 410: The inverse orthogonal transform unit 37 of the encoding processing unit 22 performs inverse orthogonal transform on the orthogonal transform coefficient obtained by inverse quantization and decodes the prediction error.

ステップ#411:符号化処理部22の加算部38は、復号された予測誤差にマクロブロックの予測値を加算して、ピクチャの局部復号値を生成する。なお、上述の局部復号値は符号化処理部22の第2蓄積部39に蓄積される。   Step # 411: The adding unit 38 of the encoding processing unit 22 adds the predicted value of the macroblock to the decoded prediction error to generate a local decoded value of the picture. The above-described local decoded value is stored in the second storage unit 39 of the encoding processing unit 22.

ステップ#412:圧縮制御部20は、1フレームの符号化が完了したか否かを判定する。上述の要件を満たす場合(YES側)には、#311に処理が復帰する。一方、上述の要件を満たさない場合(NO側)には、#404に戻って符号化処理部22は上述の動作を繰り返す。上述のループにより、符号化対象の画像がブロック単位で符号化されることとなる。以上で、図23の説明を終了する。   Step # 412: The compression control unit 20 determines whether or not one frame has been encoded. If the above requirement is satisfied (YES side), the process returns to # 311. On the other hand, when the above requirement is not satisfied (NO side), the process returns to # 404 and the encoding processing unit 22 repeats the above operation. By the loop described above, the image to be encoded is encoded in units of blocks. Above, description of FIG. 23 is complete | finished.

また、図24は、図23の#404での動き補償予測の処理例を示す流れ図である。   FIG. 24 is a flowchart showing an example of motion compensation prediction processing in # 404 of FIG.

ステップ#501:符号化処理部22の予測情報生成部40は、マクロブロックの動きベクトル、予測モード、参照画像等の予測情報を生成する。   Step # 501: The prediction information generation unit 40 of the encoding processing unit 22 generates prediction information such as a macroblock motion vector, a prediction mode, and a reference image.

なお、第1画像と第2画像との間で動き補償予測を行う場合、#501での予測情報生成部40は、参照画像との画素位置のずれを補正するように、マクロブロックの動きベクトルをオフセット補正してもよい。   When motion compensation prediction is performed between the first image and the second image, the prediction information generation unit 40 in # 501 corrects the displacement of the pixel position from the reference image so as to correct the motion vector of the macroblock. May be offset corrected.

ステップ#502:符号化処理部22の予測情報生成部40は、マクロブロックをフレーム内符号化するか否か(すなわち、所謂イントラマクロブロックとして符号化するか否か)を判定する。例えば、動き補償予測しても所定条件より予測誤差を小さくできない場合などで、予測情報生成部40は、マクロブロックをフレーム内符号化すると判断する。上述の要件を満たす場合(YES側)には、図23の#405に処理が復帰する。なお、この場合には、予測情報生成部40はマクロブロックの情報をスルー出力する。一方、上述の要件を満たさない場合(NO側)には、#503に処理が移行する。   Step # 502: The prediction information generating unit 40 of the encoding processing unit 22 determines whether or not the macroblock is to be intraframe encoded (that is, whether or not to encode as a so-called intra macroblock). For example, in a case where the prediction error cannot be made smaller than a predetermined condition even if motion compensation prediction is performed, the prediction information generation unit 40 determines to encode the macroblock in the frame. If the above requirement is satisfied (YES side), the process returns to # 405 in FIG. In this case, the prediction information generation unit 40 outputs the macroblock information as a through output. On the other hand, if the above requirement is not satisfied (NO side), the process proceeds to # 503.

ステップ#503:符号化処理部22の予測情報生成部40は、上述の予測情報(#501)に基づいて、マクロブロックの輝度成分について動き補償予測を行う。   Step # 503: The prediction information generation unit 40 of the encoding processing unit 22 performs motion compensation prediction on the luminance component of the macroblock based on the above-described prediction information (# 501).

ステップ#504:符号化処理部22の予測情報生成部40は、マクロブロックの輝度成分の動きベクトルを、マクロブロックの色差成分に合わせて補正する。#504での予測情報生成部40は、画像の輝度面と色差面との標本点のサンプリングの違いに応じて動きベクトルを補正する。   Step # 504: The prediction information generation unit 40 of the encoding processing unit 22 corrects the motion vector of the luminance component of the macroblock according to the color difference component of the macroblock. The prediction information generation unit 40 in # 504 corrects the motion vector according to the sampling difference of the sample points on the luminance plane and the color difference plane of the image.

例えば、YUV4:4:4形式の画像では、輝度成分の標本点と色差成分の標本点の重心が一致する。そのため、予測情報生成部40は、YUV4:4:4形式の場合、マクロブロックの輝度成分の動きベクトルを色差成分の予測にそのまま適用する。また、YUV4:2:2形式の画像では、上述のようにU,Vチャネルの動きベクトルは、Yチャネル換算で水平方向に0.5画素のずれ(MV[0.5,0])となる。そのため、予測情報生成部40は、YUV4:2:2形式の場合、マクロブロックの輝度成分の動きベクトルを水平方向に0.5画素ずらして色差成分の予測に適用する。また、YUV4:2:0形式の画像では、上述のようにU,Vチャネルの動きベクトルは、Yチャネル換算で水平方向および垂直方向に0.5画素のずれ(MV[0.5,0.5])となる。そのため、予測情報生成部40は、YUV4:2:0形式の場合、マクロブロックの輝度成分の動きベクトルを水平方向および垂直方向にそれぞれ0.5画素ずらして色差成分の予測に適用する。   For example, in a YUV 4: 4: 4 format image, the centroids of the luminance component sample point and the color difference component sample point coincide. Therefore, in the case of the YUV 4: 4: 4 format, the prediction information generation unit 40 applies the motion vector of the luminance component of the macro block as it is to the prediction of the color difference component. In the YUV 4: 2: 2 format image, as described above, the motion vectors of the U and V channels are shifted by 0.5 pixels (MV [0.5, 0]) in the horizontal direction in terms of the Y channel. . Therefore, in the YUV 4: 2: 2 format, the prediction information generation unit 40 shifts the motion vector of the luminance component of the macroblock by 0.5 pixels in the horizontal direction and applies it to the prediction of the color difference component. In the YUV 4: 2: 0 format image, as described above, the motion vectors of the U and V channels are shifted by 0.5 pixels (MV [0.5, 0. 5]). Therefore, in the YUV 4: 2: 0 format, the prediction information generation unit 40 shifts the motion vector of the luminance component of the macroblock by 0.5 pixels in the horizontal direction and the vertical direction, and applies the prediction to the color difference component.

ステップ#505:符号化処理部22の予測情報生成部40は、上述の補正後の予測情報(#504)に基づいて、マクロブロックの色差成分について動き補償予測を行う。その後、図23の#405に処理が復帰する。以上で、図24の説明を終了する。   Step # 505: The prediction information generation unit 40 of the encoding processing unit 22 performs motion compensation prediction on the color difference component of the macroblock based on the corrected prediction information (# 504) described above. Thereafter, the processing returns to # 405 in FIG. Above, description of FIG. 24 is complete | finished.

(動画像の復号動作例)
以下、第2実施形態での動画像の復号動作例を説明する。図25は、第2実施形態の復号処理部113での動画像の復号動作例を示す流れ図である。
(Example of video decoding operation)
Hereinafter, an example of a moving image decoding operation according to the second embodiment will be described. FIG. 25 is a flowchart illustrating an example of a moving image decoding operation in the decoding processing unit 113 according to the second embodiment.

ステップ#601:復号処理部113は、記憶媒体110から圧縮動画像情報を取得する。   Step # 601: The decoding processing unit 113 acquires compressed moving image information from the storage medium 110.

ステップ#602:復号部62は、圧縮動画像情報のうちから付帯情報および補正情報を取得する。付帯情報および補正情報は、復号制御部61に出力される。   Step # 602: The decoding unit 62 acquires supplementary information and correction information from the compressed video information. The incidental information and correction information are output to the decoding control unit 61.

ステップ#603:復号制御部61は、付帯情報および補正情報を参照する。これにより、復号制御部61は、動きベクトルの補正の要否を示す情報や、輝度間引き画像および色差間引き画像での標本点の間引きパターンの情報や、第1画像および第2画像の合成パターンの情報を取得する。   Step # 603: The decoding control unit 61 refers to incidental information and correction information. Thereby, the decoding control unit 61 includes information indicating whether or not the motion vector needs to be corrected, information on the thinning pattern of the sample points in the luminance thinned image and the color difference thinned image, and the composite pattern of the first image and the second image. Get information.

ステップ#604:復号部62は、例えばMPEG−2ビデオのメインプロファイルに準拠して第1符号化情報から第1画像(図3(d),図4(d),図5(d),図6(d))を復号する。また、復号部62は、例えばMPEG−2ビデオのメインプロファイルに準拠して第2符号化情報から第2画像(図3(e),図4(e),図5(e),図6(e))を復号する。なお、圧縮時に第1画像と第2画像との間で動き補償予測が行われている場合、復号制御部61の制御により、復号部62は上述の補正情報に基づいて動きベクトルの補正を実行する。   Step # 604: The decoding unit 62 converts the first image (FIG. 3 (d), FIG. 4 (d), FIG. 5 (d), FIG. 6 (d)) is decoded. Also, the decoding unit 62 converts the second image (FIG. 3 (e), FIG. 4 (e), FIG. 5 (e), FIG. 6 () from the second encoded information in accordance with the main profile of MPEG-2 video, for example. e)) is decrypted. When motion compensation prediction is performed between the first image and the second image at the time of compression, the decoding unit 62 performs the correction of the motion vector based on the above-described correction information under the control of the decoding control unit 61. To do.

ステップ#605:第1分離部54は、入力された第1画像(#604)をYチャネルとU,Vチャネルとに分離する。第1画像のYチャネルは第1合成部56に出力され、第1画像のU,Vチャネルは第2合成部57に出力される。   Step # 605: The first separation unit 54 separates the input first image (# 604) into the Y channel and the U and V channels. The Y channel of the first image is output to the first combining unit 56, and the U and V channels of the first image are output to the second combining unit 57.

ステップ#606:第2分離部55は、入力された第2画像(#605)をYチャネルとU,Vチャネルとに分離する。第2画像のYチャネルは第1合成部56に出力され、第2画像のU,Vチャネルは第2合成部57に出力される。なお、#605の処理と#606の処理は並列に実行されていてもよい。   Step # 606: The second separation unit 55 separates the input second image (# 605) into the Y channel and the U and V channels. The Y channel of the second image is output to the first combining unit 56, and the U and V channels of the second image are output to the second combining unit 57. Note that the process of # 605 and the process of # 606 may be executed in parallel.

ステップ#607:第1合成部56は、付帯情報を用いて第1画像のYチャネルと第2画像のYチャネルとを合成する。なお、#607の処理は、図16の#208の処理に対応するので重複説明は省略する。   Step # 607: The first combining unit 56 combines the Y channel of the first image and the Y channel of the second image using the accompanying information. Note that the processing of # 607 corresponds to the processing of # 208 in FIG.

ステップ#608:第2合成部57は、付帯情報を用いて第1画像のU,Vチャネルと第2画像のU,Vチャネルとを合成する。なお、#608の処理は、図16の#209の処理に対応するので重複説明は省略する。   Step # 608: The second combining unit 57 combines the U and V channels of the first image and the U and V channels of the second image using the accompanying information. Note that the processing of # 608 corresponds to the processing of # 209 in FIG.

ステップ#609:第1補間部58は、#607で復元された輝度間引き画像の標本点をフレーム内補間する。なお、#609の処理は、図16の#210の処理に対応するので重複説明は省略する。   Step # 609: The first interpolation unit 58 inter-frame interpolates the sample points of the luminance thinned image restored in # 607. Note that the processing of # 609 corresponds to the processing of # 210 in FIG.

ステップ#610:第2補間部59は、#608で復元された色差間引き画像の標本点をフレーム内補間する。なお、#410の処理は、図16の#211の処理に対応するので重複説明は省略する。   Step # 610: The second interpolation unit 59 inter-frame interpolates the sample points of the color difference thinned image restored in # 608. Note that the processing of # 410 corresponds to the processing of # 211 in FIG.

ステップ#611:画像出力部60は、同じフレームの輝度補間画像と色差補間画像とを対応付けて、1つの復号フレーム(図9(c),図10(c),図11(c),図12(c))として出力する。   Step # 611: The image output unit 60 associates the luminance interpolated image and the color difference interpolated image of the same frame with one decoded frame (FIG. 9 (c), FIG. 10 (c), FIG. 11 (c), FIG. 12 (c)).

ステップ#612:復号制御部61は、圧縮動画像情報全体の復号が終了したか否かを判定する。上述の要件を満たす場合(YES側)、復号制御部61は復号動作を終了する。一方、上述の要件を満たさない場合(NO側)、#601に戻って次のフレームの復号が行われる。以上で、図25の説明を終了する。   Step # 612: The decoding control unit 61 determines whether or not the decoding of the entire compressed moving image information has been completed. If the above requirement is satisfied (YES side), the decoding control unit 61 ends the decoding operation. On the other hand, when the above requirement is not satisfied (NO side), the process returns to # 601 to decode the next frame. Above, description of FIG. 25 is complete | finished.

また、図26は、図25の#604での復号処理の例を示す流れ図である。   FIG. 26 is a flowchart showing an example of the decoding process in # 604 of FIG.

ステップ#701:復号制御部61は、#603で取得した情報に基づいて、復号する画像の符号化形式や、第1画像および第2画像間での動きベクトルの補正の要否や、輝度成分および色差成分間での動きベクトルの補正の要否を設定する。   Step # 701: Based on the information acquired in # 603, the decoding control unit 61 determines the encoding format of the image to be decoded, the necessity of correcting the motion vector between the first image and the second image, the luminance component, Sets whether or not to correct a motion vector between color difference components.

ステップ#702:復号部62の符号復号部71は、或るマクロブロックの可変長符号を復号し、動きベクトルや参照画像等を示す予測情報や、量子化係数を取得する。   Step # 702: The code decoding unit 71 of the decoding unit 62 decodes a variable length code of a certain macroblock, and obtains prediction information indicating a motion vector, a reference image, and the like, and a quantization coefficient.

ステップ#703:復号部62の逆量子化部72は、マクロブロックの量子化係数(#702)を逆量子化する。   Step # 703: The inverse quantization unit 72 of the decoding unit 62 inversely quantizes the quantization coefficient (# 702) of the macroblock.

ステップ#704:復号部62の逆直交変換部73は、逆量子化(#703)で求めた直交変換係数を逆直交変換して予測誤差を復号する。   Step # 704: The inverse orthogonal transform unit 73 of the decoding unit 62 performs inverse orthogonal transform on the orthogonal transform coefficient obtained by inverse quantization (# 703) to decode the prediction error.

ステップ#705:復号部62の予測部77は、PピクチャまたはBピクチャを復号する場合、予測情報を用いてマクロブロックを動き補償予測し、マクロブロックの予測値を出力する。また、予測部77は、Iピクチャを復号する場合には、予測値としてゼロ値を出力する。   Step # 705: When decoding the P picture or the B picture, the prediction unit 77 of the decoding unit 62 performs motion compensation prediction on the macroblock using the prediction information, and outputs a prediction value of the macroblock. Moreover, the prediction unit 77 outputs a zero value as a prediction value when decoding an I picture.

ステップ#706:復号部62の加算部74は、復号された予測誤差にマクロブロックの予測値を加算して、ピクチャの局部復号値を生成する。これにより、1つのマクロブロックの画像が復号された状態となる。なお、上述の局部復号値は第2蓄積部76に蓄積される。   Step # 706: The adding unit 74 of the decoding unit 62 adds the predicted value of the macroblock to the decoded prediction error to generate a local decoded value of the picture. As a result, one macroblock image is decoded. Note that the above-described local decoded value is stored in the second storage unit 76.

ステップ#707:復号制御部61は、1フレームの復号が完了したか否かを判定する。上述の要件を満たす場合(YES側)には、#605に処理が復帰する。一方、上述の要件を満たさない場合(NO側)には、#702に戻って復号部62は上述の動作を繰り返す。上述のループにより、符号化された画像がブロック単位で復号されることとなる。以上で、図26の説明を終了する。   Step # 707: The decoding control unit 61 determines whether or not one frame has been decoded. If the above requirement is satisfied (YES side), the process returns to # 605. On the other hand, when the above requirement is not satisfied (NO side), the process returns to # 702 and the decoding unit 62 repeats the above operation. According to the above loop, the encoded image is decoded in units of blocks. This is the end of the description of FIG.

また、図27は、図26の#705での動き補償予測の処理例を示す流れ図である。   FIG. 27 is a flowchart showing an example of motion compensation prediction processing in # 705 of FIG.

ステップ#801:復号部62の予測部77は、復号された予測情報(#702)に基づいて、マクロブロックの動きベクトル、予測モード、参照画像等を設定する。   Step # 801: The prediction unit 77 of the decoding unit 62 sets a macroblock motion vector, a prediction mode, a reference image, and the like based on the decoded prediction information (# 702).

ステップ#802:復号部62の予測部77は、復号するマクロブロックがフレーム内符号化されたイントラマクロブロックか否かを判定する。上述の要件を満たす場合(YES側)には、図26の#706に処理が復帰する。なお、#802のYES側の場合、上述のように予測部77は予測値としてゼロ値を出力する。一方、上述の要件を満たさない場合(NO側)には、#803に処理が移行する。   Step # 802: The prediction unit 77 of the decoding unit 62 determines whether or not the macroblock to be decoded is an intra macroblock that is intraframe-encoded. If the above requirement is satisfied (YES side), the process returns to # 706 in FIG. In the case of # 802 on the YES side, the prediction unit 77 outputs a zero value as the predicted value as described above. On the other hand, if the above requirement is not satisfied (NO side), the process proceeds to # 803.

ステップ#803:復号部62の予測部77は、上述の予測情報に基づいて、マクロブロックの輝度成分について動き補償予測を行う。なお、第1画像と第2画像との間で動きベクトルMVを相殺するように圧縮時にオフセット補正をした場合(#501)、#803での予測部77は、上述のオフセット分を除去する補正を行う。例えば、予測部77は、マクロブロックの輝度成分の動きベクトルに上述の動きベクトルMVを加えればよい。これにより、第1画像と第2画像との間の動き補償予測において、復号時に画像を正しく復元できる。   Step # 803: The prediction unit 77 of the decoding unit 62 performs motion compensation prediction on the luminance component of the macroblock based on the above prediction information. When offset correction is performed during compression so as to cancel out the motion vector MV between the first image and the second image (# 501), the prediction unit 77 in # 803 corrects to remove the above-described offset. I do. For example, the prediction unit 77 may add the above-described motion vector MV to the motion vector of the luminance component of the macroblock. Thereby, in motion compensation prediction between the first image and the second image, the image can be correctly restored at the time of decoding.

ステップ#804:復号部62の予測部77は、マクロブロックの輝度成分の動きベクトルを、マクロブロックの色差成分に合わせて補正する。#804での予測部77は、画像の輝度面と色差面との標本点のサンプリングの違いに応じて動きベクトルを補正する。なお、#804の処理は、図24の#504の逆処理であるので説明を省略する。なお、上述の#504で動きベクトルの補正が行われていない場合には、#804の処理は省略される。   Step # 804: The prediction unit 77 of the decoding unit 62 corrects the motion vector of the luminance component of the macroblock according to the color difference component of the macroblock. The prediction unit 77 in # 804 corrects the motion vector according to the sampling difference of the sample points on the luminance plane and the color difference plane of the image. Note that the processing of # 804 is the reverse processing of # 504 of FIG. If the motion vector is not corrected at # 504 described above, the process at # 804 is omitted.

ステップ#805:復号部62の予測部77は、上述の補正後の予測情報(#804)を用いて、マクロブロックの色差成分について動き補償予測を行う。その後、図26の#706に処理が復帰する。以上で、図27の説明を終了する。   Step # 805: The prediction unit 77 of the decoding unit 62 performs motion compensation prediction for the color difference component of the macroblock using the corrected prediction information (# 804) described above. Thereafter, the processing returns to # 706 in FIG. This is the end of the description of FIG.

(第2実施形態の作用効果)
以下、第2実施形態における作用効果を述べる。第2実施形態では、上述の第1実施形態での作用効果に加え、第1画像と第2画像との間で動き補償予測を行うことで、動画像全体での符号化効率を向上させることができる。また、第2実施形態において、第1画像と第2画像との間で動き補償予測をするときに、動きベクトルを補正することで符号化効率を向上させることができる。このとき、上述の動きベクトルについて補正の有無を表す補正情報を動画像圧縮装置が付与することで、映像復号装置側で復号時に動きベクトルを適切に補正させることができる。
(Operational effect of the second embodiment)
Hereinafter, operational effects in the second embodiment will be described. In the second embodiment, in addition to the effects of the first embodiment described above, the motion compensation prediction is performed between the first image and the second image, thereby improving the coding efficiency of the entire moving image. Can do. In the second embodiment, when motion compensation prediction is performed between the first image and the second image, the coding efficiency can be improved by correcting the motion vector. At this time, the moving image compression apparatus provides correction information indicating whether or not the above-described motion vector is corrected, so that the motion vector can be appropriately corrected at the video decoding apparatus side.

<第3実施形態の説明>
図28は、第3実施形態での装置構成例を示す図である。第3実施形態の装置は、上述の動画像圧縮装置、動画像復号装置として機能するコンピュータである。
<Description of Third Embodiment>
FIG. 28 is a diagram illustrating an example of a device configuration according to the third embodiment. The apparatus of the third embodiment is a computer that functions as the above-described moving image compression apparatus and moving image decoding apparatus.

図28に示すコンピュータ201は、データ読込部202、記憶装置203、CPU204、メモリ205および入出力I/F206、バス207を有している。データ読込部202、記憶装置203、CPU204、メモリ205および入出力I/F206は、バス207を介して相互に接続されている。さらに、コンピュータ201には、入出力I/F206を介して、入力デバイス208(キーボード、ポインティングデバイスなど)とモニタ209とがそれぞれ接続されている。なお、入出力I/F206は、入力デバイス208からの各種入力を受け付けるとともに、モニタ209に対して表示用のデータを出力する。   A computer 201 illustrated in FIG. 28 includes a data reading unit 202, a storage device 203, a CPU 204, a memory 205, an input / output I / F 206, and a bus 207. The data reading unit 202, the storage device 203, the CPU 204, the memory 205 and the input / output I / F 206 are connected to each other via a bus 207. Furthermore, an input device 208 (a keyboard, a pointing device, etc.) and a monitor 209 are connected to the computer 201 via an input / output I / F 206. The input / output I / F 206 receives various inputs from the input device 208 and outputs display data to the monitor 209.

データ読込部202は、未圧縮の動画像情報や、上述の圧縮動画像情報や、プログラムを外部から読み込むときに用いられる。データ読込部202は、例えば、着脱可能な記憶媒体からデータを取得する読込デバイス(光ディスク、磁気ディスク、光磁気ディスクの読込装置など)や、公知の通信規格に準拠して外部の装置と通信を行う通信デバイス(USBインターフェース、LANモジュール、無線LANモジュールなど)である。   The data reading unit 202 is used when reading uncompressed moving image information, the above-described compressed moving image information, and a program from the outside. For example, the data reading unit 202 communicates with a reading device (such as an optical disk, a magnetic disk, or a magneto-optical disk reading device) that acquires data from a removable storage medium, or an external device in accordance with a known communication standard. A communication device to perform (USB interface, LAN module, wireless LAN module, etc.).

記憶装置203は、例えば、ハードディスクや、不揮発性の半導体メモリなどの記憶媒体である。この記憶装置203には、上述のプログラムや、プログラムの実行に必要となる各種データが記憶されている。なお、記憶装置203には、データ読込部202から読み込んだ圧縮動画像情報などを記憶しておくこともできる。   The storage device 203 is a storage medium such as a hard disk or a non-volatile semiconductor memory. The storage device 203 stores the above-described program and various data necessary for executing the program. The storage device 203 can also store compressed moving image information read from the data reading unit 202.

CPU204は、コンピュータ201の各部を統括的に制御するプロセッサである。このCPU204は、プログラムの実行によって、第1実施形態または第2実施形態の画像処理部111、圧縮処理部112、復号処理部113として機能する。   The CPU 204 is a processor that comprehensively controls each unit of the computer 201. The CPU 204 functions as the image processing unit 111, the compression processing unit 112, and the decoding processing unit 113 of the first embodiment or the second embodiment by executing the program.

メモリ205は、プログラムでの各種演算結果を一時的に記憶する。このメモリ205は、例えば揮発性のSDRAMである。   The memory 205 temporarily stores various calculation results in the program. The memory 205 is, for example, a volatile SDRAM.

ここで、第3実施形態では、データ読込部202または記憶装置203から未圧縮の動画像情報を取得し、図14または図20に示す圧縮動作をCPU204が実施する。あるいは、データ読込部202または記憶装置203から上述の圧縮動画像情報を取得し、図16または図25に示す復号動作をCPU204が実施する。かかる第3実施形態においても、第1実施形態または第2実施形態とほぼ同様の効果を得ることができる。   Here, in the third embodiment, uncompressed moving image information is acquired from the data reading unit 202 or the storage device 203, and the compression operation shown in FIG. Alternatively, the above-described compressed moving image information is acquired from the data reading unit 202 or the storage device 203, and the CPU 204 performs the decoding operation shown in FIG. In the third embodiment, substantially the same effect as that of the first embodiment or the second embodiment can be obtained.

<実施形態の補足事項>
(補足1):上述の実施形態では、YUV4:4:4形式、YUV4:2:2形式、YUV4:2:0形式の画像を圧縮する場合を説明した。しかし、本発明の適用はこれらのデータ形式に限定されない。
<Supplementary items of the embodiment>
(Supplement 1): In the above-described embodiment, the case of compressing an image in the YUV 4: 4: 4 format, the YUV 4: 2: 2 format, and the YUV 4: 2: 0 format has been described. However, the application of the present invention is not limited to these data formats.

例えば、本発明をYUV4:0:0形式の画像に適用してもよい。この場合は、U,Vチャネルの情報がないモノクロ画像の場合である。したがって、圧縮元の画像のYチャネルのみを第1実施形態または第2実施形態と同様に符号化および復号化すればよい。   For example, the present invention may be applied to a YUV4: 0: 0 format image. This is the case of a monochrome image without U and V channel information. Therefore, only the Y channel of the compression source image needs to be encoded and decoded in the same manner as in the first embodiment or the second embodiment.

また、本発明の圧縮元の画像がRGB画像であってもよい。例えば、RGB4:4:4形式の画像の場合、Gを輝度面、R,Bを色差面とみなして第1実施形態または第2実施形態と同様に符号化および復号化すればよい。   The compression source image of the present invention may be an RGB image. For example, in the case of an RGB 4: 4: 4 format image, encoding and decoding may be performed in the same manner as in the first or second embodiment, assuming that G is a luminance plane and R and B are color difference planes.

(補足2):上述の実施形態では、MPEG−2ビデオのメインプロファイルに基づく圧縮符号化の例を説明した。しかし、本発明ではJPEG、AVC、その他の圧縮符号化を適用しても良いし、非圧縮符号化を適用しても良い。   (Supplement 2): In the above-described embodiment, an example of compression encoding based on the main profile of MPEG-2 video has been described. However, in the present invention, JPEG, AVC, or other compression encoding may be applied, or non-compression encoding may be applied.

(補足3):画像の間引きのパターンを示す付帯情報の付与は、上述の実施形態の例に限定されない。例えば、MPEG−2ビデオのテンポラルリファレンス情報から判断可能な間引きのパターンを示すフレーム運用規則を予め規定しておくことで、復号処理装置に対して画像の間引きのパターンを暗示的に告知することもできる。   (Supplement 3): The attachment of the incidental information indicating the pattern of image thinning is not limited to the example of the above-described embodiment. For example, by predefining a frame operation rule indicating a thinning pattern that can be determined from temporal reference information of MPEG-2 video, an image thinning pattern may be implicitly notified to the decoding processing apparatus. it can.

(補足4):上述の実施形態では、圧縮元の画像が動画像である場合を説明した。しかし、本発明は静止画像の圧縮にも勿論適用できる。   (Supplement 4): In the above-described embodiment, the case where the compression source image is a moving image has been described. However, the present invention is naturally applicable to still image compression.

以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図する。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物によることも可能である。   From the above detailed description, features and advantages of the embodiments will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments as described above without departing from the spirit and scope of the right. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and modifications, and there is no intention to limit the scope of the embodiments having the invention to those described above. It is also possible to use appropriate improvements and equivalents within the scope disclosed in.

11…色成分分離部、12…第1間引き部、13…第2間引き部、14…第1分離部、15…第2分離部、16…第1画像生成部、17…第2画像生成部、18…第1符号化部、19…第2符号化部、20…圧縮制御部、21…多重化部、22…符号化処理部、51…多重化分離部、52…第1復号部、53…第2復号部、54…第1分離部、55…第2分離部、56…第1合成部、57…第2合成部、58…第1補間部、59…第2補間部、60…画像出力部、61…復号制御部、62…復号部、100…電子カメラ、101…撮像光学系、102…撮像素子、103…信号処理部、104…画像処理エンジン、105…第1メモリ、106…第2メモリ、107…記録I/F、108…モニタ、109…操作部、110…記憶媒体、111…画像処理部、112…圧縮処理部、113…復号処理部、201…コンピュータ、202…データ読込部、203…記憶装置、204…CPU、205…メモリ、206…入出力I/F、207…バス、208…入力デバイス、209…モニタ DESCRIPTION OF SYMBOLS 11 ... Color component separation part, 12 ... 1st thinning part, 13 ... 2nd thinning part, 14 ... 1st separation part, 15 ... 2nd separation part, 16 ... 1st image generation part, 17 ... 2nd image generation part , 18 ... 1st encoding part, 19 ... 2nd encoding part, 20 ... Compression control part, 21 ... Multiplexing part, 22 ... Encoding process part, 51 ... Demultiplexing part, 52 ... 1st decoding part, 53 ... 2nd decoding part, 54 ... 1st separation part, 55 ... 2nd separation part, 56 ... 1st synthetic | combination part, 57 ... 2nd synthetic | combination part, 58 ... 1st interpolation part, 59 ... 2nd interpolation part, 60 DESCRIPTION OF SYMBOLS Image output part 61 ... Decoding control part 62 ... Decoding part 100 ... Electronic camera 101 ... Imaging optical system 102 ... Imaging element 103 ... Signal processing part 104 ... Image processing engine 105 ... 1st memory, 106 ... Second memory, 107 ... Recording I / F, 108 ... Monitor, 109 ... Operation unit, 110 ... Storage medium, 11 DESCRIPTION OF SYMBOLS ... Image processing part, 112 ... Compression processing part, 113 ... Decoding processing part, 201 ... Computer, 202 ... Data reading part, 203 ... Storage device, 204 ... CPU, 205 ... Memory, 206 ... Input / output I / F, 207 ... Bus 208 ... Input device 209 ... Monitor

Claims (8)

奇数番目の行の標本点と偶数番目の行の標本点との位置が行方向にずれるように、圧縮元の画像から行方向に沿って標本点を離散的に抽出して間引き画像を生成する間引き部と、
前記間引き画像から前記奇数番目の行の標本点を抽出して第1画像を生成する第1画像生成部と、
前記間引き画像から前記偶数番目の行の標本点を抽出して第2画像を生成する第2画像生成部と、
前記第1画像および前記第2画像をそれぞれ符号化する符号化部と、
前記第1画像の符号化情報および前記第2画像の符号化情報に、前記間引き画像への復号方式を示す付帯情報を対応付けて出力する出力部と、
を備える画像圧縮装置。
Generate a thinned image by discretely extracting sample points along the row direction from the original image so that the positions of the sample points on the odd-numbered rows and the sample points on the even-numbered rows are shifted in the row direction. A thinning part;
A first image generation unit that extracts the sample points of the odd-numbered rows from the thinned image and generates a first image;
A second image generation unit that extracts the sample points of the even-numbered rows from the thinned image and generates a second image;
An encoding unit for encoding each of the first image and the second image;
An output unit that outputs the encoded information of the first image and the encoded information of the second image in association with auxiliary information indicating a decoding method for the thinned image;
An image compression apparatus comprising:
請求項1に記載の画像圧縮装置において、
前記圧縮元の画像はカラー画像であって、
前記間引き部は、前記圧縮元の画像から色空間の成分別に異なるパターンで前記標本点を抽出して前記間引き画像を生成する画像圧縮装置。
The image compression apparatus according to claim 1.
The compression source image is a color image,
The thinning unit is an image compression device that extracts the sample points with different patterns for each component of color space from the compression source image to generate the thinned image.
請求項1または請求項2に記載の画像圧縮装置において、
前記圧縮元の画像は動画像であって、
前記間引き部は、前記動画像の各フレームでそれぞれ前記間引き画像を生成する画像圧縮装置。
The image compression apparatus according to claim 1 or 2,
The compression source image is a moving image,
The thinning unit is an image compression device that generates the thinned image in each frame of the moving image.
請求項3に記載の画像圧縮装置において、
前記符号化部は、異なるフレームから生成された複数の前記第1画像間の動き補償予測または異なるフレームから生成された複数の前記第2画像間の動き補償予測を行う画像圧縮装置。
The image compression apparatus according to claim 3.
The encoding unit is an image compression apparatus that performs motion compensation prediction between a plurality of first images generated from different frames or motion compensation prediction between a plurality of second images generated from different frames.
請求項1から請求項4のいずれか1項に記載の画像圧縮装置において、
前記符号化部は、前記第1画像と前記第2画像との間で動き補償予測を行う画像圧縮装置。
In the image compression device according to any one of claims 1 to 4,
The encoding unit is an image compression apparatus that performs motion compensation prediction between the first image and the second image.
請求項5に記載の画像圧縮装置において、
前記符号化部は、前記第1画像と前記第2画像との標本点の違いに応じて、前記動き補償予測のときに動きベクトルを補正する画像圧縮装置。
The image compression apparatus according to claim 5.
The encoding unit is an image compression device that corrects a motion vector at the time of motion compensation prediction according to a difference in sample points between the first image and the second image.
請求項1から請求項6のいずれか1項に記載の画像圧縮装置において、
前記圧縮元の画像は、YUV4:4:4形式、YUV4:2:2形式、YUV4:2:0形式、YUV4:0:0形式またはRGB4:4:4形式のいずれかである画像圧縮装置。
The image compression apparatus according to any one of claims 1 to 6,
The compression source image is an image compression device in any one of YUV4: 4: 4 format, YUV4: 2: 2 format, YUV4: 2: 0 format, YUV4: 0: 0 format, or RGB4: 4: 4 format.
奇数番目の行の標本点と偶数番目の行の標本点との位置が行方向にずれるように、圧縮元の画像から行方向に沿って標本点を離散的に抽出して間引き画像を生成する間引き処理と、
前記間引き画像から前記奇数番目の行の標本点を抽出して第1画像を生成する第1画像生成処理と、
前記間引き画像から前記偶数番目の行の標本点を抽出して第2画像を生成する第2画像生成処理と、
前記第1画像および前記第2画像をそれぞれ符号化する符号化処理と、
前記第1画像の符号化情報および前記第2画像の符号化情報に、前記間引き画像への復号方式を示す付帯情報を対応付けて出力する出力処理と、
をコンピュータに実行させるプログラム。
Generate a thinned image by discretely extracting sample points along the row direction from the original image so that the positions of the sample points on the odd-numbered rows and the sample points on the even-numbered rows are shifted in the row direction. Thinning process,
A first image generation process for generating a first image by extracting the sample points of the odd-numbered rows from the thinned image;
A second image generation process for extracting a sample point of the even-numbered row from the thinned image and generating a second image;
An encoding process for encoding each of the first image and the second image;
An output process in which the encoded information of the first image and the encoded information of the second image are associated with and output additional information indicating a decoding method for the thinned image;
A program that causes a computer to execute.
JP2018188616A 2018-10-03 2018-10-03 Image compression apparatus and program Pending JP2019022225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018188616A JP2019022225A (en) 2018-10-03 2018-10-03 Image compression apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018188616A JP2019022225A (en) 2018-10-03 2018-10-03 Image compression apparatus and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013009479A Division JP2014143488A (en) 2013-01-22 2013-01-22 Image compression apparatus, image decoder and program

Publications (1)

Publication Number Publication Date
JP2019022225A true JP2019022225A (en) 2019-02-07

Family

ID=65355162

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018188616A Pending JP2019022225A (en) 2018-10-03 2018-10-03 Image compression apparatus and program

Country Status (1)

Country Link
JP (1) JP2019022225A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110248192A (en) * 2019-06-12 2019-09-17 腾讯科技(深圳)有限公司 Encoder switching, decoder switching, screen sharing method and screen share system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110248192A (en) * 2019-06-12 2019-09-17 腾讯科技(深圳)有限公司 Encoder switching, decoder switching, screen sharing method and screen share system
CN110248192B (en) * 2019-06-12 2021-10-15 腾讯科技(深圳)有限公司 Encoder switching method, decoder switching method, screen sharing method and screen sharing system

Similar Documents

Publication Publication Date Title
TWI514892B (en) Image processing apparatus and image processing method
KR101963097B1 (en) Image processing device and image processing method
JP4819051B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, and stream data
US9854247B2 (en) Moving image compression device, moving image decoding device, image compression device, image decoding device, imaging device, and non-transitory medium storing program
KR101765429B1 (en) Image processing device and method, and recording medium
WO2019142821A1 (en) Encoder, decoder, encoding method, decoding method, encoding program, and decoding program
US10674110B2 (en) Image encoding apparatus, and control method thereof
JP2009253667A (en) Moving image processing device, moving image processing method, and moving image processing program
WO2016171006A1 (en) Encoding device and encoding method, and decoding device and decoding method
JP2019022225A (en) Image compression apparatus and program
WO2011010431A1 (en) Image processing device, image processing method, and image capturing device
JP6152642B2 (en) Moving picture compression apparatus, moving picture decoding apparatus, and program
JP5974691B2 (en) MOVING IMAGE COMPRESSION DEVICE, IMAGING DEVICE, AND PROGRAM
JPWO2010055675A1 (en) Video encoding apparatus and video decoding apparatus
JP2014143488A (en) Image compression apparatus, image decoder and program
JP2017200199A (en) Video compression device, video decoding device, and program
JP6890993B2 (en) Image coding device, image decoding device, its control method, and control program
JP2011041144A (en) Apparatus and program for processing image
JP5974692B2 (en) Moving picture decoding apparatus and program
JP2019036992A (en) Compressor, decoder, and program
WO2020188669A1 (en) Encoding device, decoding device, encoding method, decoding method, encoding program, and decoding program
WO2011161883A1 (en) Image processing device and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181005

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190618

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20190816

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20191210