JP2015195470A - encoding device, encoding method and encoding program - Google Patents

encoding device, encoding method and encoding program Download PDF

Info

Publication number
JP2015195470A
JP2015195470A JP2014071915A JP2014071915A JP2015195470A JP 2015195470 A JP2015195470 A JP 2015195470A JP 2014071915 A JP2014071915 A JP 2014071915A JP 2014071915 A JP2014071915 A JP 2014071915A JP 2015195470 A JP2015195470 A JP 2015195470A
Authority
JP
Japan
Prior art keywords
encoding
prediction
motion vector
image
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014071915A
Other languages
Japanese (ja)
Other versions
JP6291971B2 (en
Inventor
智規 久保田
Tomonori Kubota
智規 久保田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2014071915A priority Critical patent/JP6291971B2/en
Publication of JP2015195470A publication Critical patent/JP2015195470A/en
Application granted granted Critical
Publication of JP6291971B2 publication Critical patent/JP6291971B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To make reduction of a processing time and suppression of image quality deterioration compatible for generating encoded data which can be reproduced with a plurality of kinds of screen sizes or frame rates, from one moving image.SOLUTION: An encoding device includes: a search section which searches for a motion vector and/or a prediction direction for each first block included in each of a plurality of first images within a first moving image; an encoding section for encoding a second moving image generated from the first moving image; a conversion section for calculating a motion vector and/or a prediction direction estimated for each of second blocks included in each of a plurality of second images in the second moving image on the basis of the motion vector and/or the prediction direction obtained by the search, and calculating second cost indicating a prediction error estimated for each second block from first cost indicating a prediction error between a prediction image that is indicated by the motion vector and/or the prediction direction obtained by the search, and the first block; and a control section which makes the encoding section encode the second block of which the second cost being equal to or less than a predetermined first threshold is calculated, using the motion vector and/or the prediction direction obtained by the conversion section.

Description

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

動画像コンテンツを配信するサービスの分野において、利用者が動画像を視聴するために用いる様々な種類の端末装置に動画像データを配信するために、1つの動画像コンテンツを複数種類の画面サイズやフレームレートで符号化する技術がある。この種の技術では、例えば、テレビジョン受像機の画面サイズで符号化された第1の符号化データを、スマートホンなど別の画面サイズを持つ端末装置で視聴可能な第2の符号化データに変換するトランスコードが行われる場合がある。   In the field of services for distributing moving image content, in order to distribute moving image data to various types of terminal devices used by users to view moving images, a single moving image content can be divided into a plurality of types of screen sizes. There is a technique for encoding at a frame rate. In this type of technology, for example, first encoded data encoded with the screen size of a television receiver is converted into second encoded data that can be viewed on a terminal device having another screen size such as a smartphone. Transcoding to convert may be performed.

また、動画像を符号化する予測符号化モードを高い精度で特定するために、処理量の少ない予測処理で得たコストに基づいて画面内予測モード又は画面間予測モードを選択し、選択したモードで動画像を符号化する技術が提案されている(例えば、特許文献1参照)。   In addition, in order to specify a predictive coding mode for encoding a moving image with high accuracy, an intra-screen prediction mode or an inter-screen prediction mode is selected based on a cost obtained by a prediction process with a small amount of processing, and the selected mode is selected. A technique for encoding a moving image has been proposed (see, for example, Patent Document 1).

特開2007−243337号公報JP 2007-243337 A

ところで、動画像の符号化に用いる予測符号化モードを特定するための従来技術は、前段の予測処理の対象となる動画像と、後段の符号化処理の対象となる動画像とが同一であることを前提としている。したがって、後段の符号化処理で符号化される動画像と、前段の予測処理で用いられた動画像とで画面サイズやフレームレートが異なる場合に、上述の従来技術を用いて符号化に用いるモードを特定することは困難である。   By the way, in the conventional technique for specifying the prediction encoding mode used for encoding a moving image, the moving image that is the target of the preceding stage encoding process and the moving image that is the target of the subsequent stage encoding process are the same. It is assumed that. Therefore, when the video size encoded in the subsequent encoding process and the video image used in the preceding prediction process have different screen sizes and frame rates, the mode used for encoding using the above-described conventional technology It is difficult to specify.

一方、画面サイズやフレームレートが異なる複数種類の端末装置に動画像を提供するために、元の動画像データを端末装置の種類毎に符号化することで生成する場合、1種類の符号化データを生成するための時間に端末装置の種類の数を乗じた時間がかかってしまう。   On the other hand, when the original moving image data is generated by encoding each type of terminal device in order to provide moving images to a plurality of types of terminal devices having different screen sizes and frame rates, one type of encoded data It takes time to multiply the time for generating the number of types of terminal devices.

しかしながら、例えば、テレビジョン受像機用の符号化データをスマートホン用の符号化データに変換した場合に、変換で得られた動きベクトルが、画面サイズを縮小した画像について動き探索を行った場合に得られる動きベクトルから乖離してしまう場合がある。この場合に、トランスコードで得られた符号化データから復元される画像の画質は、画面サイズを縮小した後の画像についての動き探索で得られた動きベクトルを用いて符号化することで得られた符号化データから復元される画像の画質に比べて低下してしまう。   However, for example, when encoded data for a television receiver is converted into encoded data for a smartphone, the motion vector obtained by the conversion performs a motion search for an image with a reduced screen size. There is a case where it deviates from the obtained motion vector. In this case, the image quality of the image restored from the encoded data obtained by transcoding can be obtained by encoding using the motion vector obtained by the motion search for the image after reducing the screen size. The quality of the image restored from the encoded data is lowered.

本件開示の符号化装置、符号化方法及び符号化プログラムは、一つの動画像から複数種類の画面サイズやフレームレートで再生可能な符号化データを生成するための処理時間の低減と画質の劣化の抑制を両立させる技術を提供することを目的とする。   The encoding apparatus, encoding method, and encoding program disclosed herein reduce processing time and image quality degradation for generating encoded data that can be reproduced from a single moving image at a plurality of types of screen sizes and frame rates. It aims at providing the technology which makes suppression compatible.

一つの観点によれば、符号化装置は、第1の動画像に含まれる複数の第1画像のそれぞれを分割して得られる複数の第1ブロックのそれぞれについて、画面間予測及び画面内予測の少なくとも一方を行うことで、動きベクトル及び予測方向の少なくとも一方を探索する探索部と、第1の動画像から生成される、フレームレート及び画面サイズの少なくとも一方が第1の動画像と異なる第2の動画像に含まれる複数の第2画像のそれぞれを、第2画像を分割して得られる第2ブロックごとに符号化する符号化部と、探索部によって得られた動きベクトル及び予測方向の少なくとも一方を示す第1情報と、第1情報で示される予測画像と第1ブロックとの違いである予測誤差を示す第1コストとのそれぞれから、各第2画像に含まれる第2ブロックのそれぞれについて画面間予測及び画面内予測の少なくとも一方を行った場合に得ることが予想される動きベクトル及び予測方向の少なくとも一方を示す第2情報と、第2情報で示される予測画像と第2ブロックとの間に予想される予測誤差を示す第2コストとのそれぞれを求める変換部と、変換部で所定の第1閾値以下の第2コストが求められた第2ブロックを符号化する場合に、変換部で得られた第2情報を用いて符号化部に符号化させる制御部とを有する。   According to one aspect, the encoding device performs inter-screen prediction and intra-screen prediction for each of the plurality of first blocks obtained by dividing each of the plurality of first images included in the first moving image. A search unit that searches for at least one of a motion vector and a prediction direction by performing at least one, and a second generated at least one of a frame rate and a screen size that is generated from the first moving image is different from that of the first moving image. An encoding unit that encodes each of a plurality of second images included in the moving image for each second block obtained by dividing the second image, and at least a motion vector and a prediction direction obtained by the search unit From each of the first information indicating one and the first cost indicating the prediction error that is the difference between the predicted image indicated by the first information and the first block, the second block included in each second image. Second information indicating at least one of a motion vector and a prediction direction that are expected to be obtained when at least one of inter-screen prediction and intra-screen prediction is performed for each of the two, a predicted image indicated by the second information, and a second When encoding a conversion unit that obtains each of a second cost indicating a prediction error expected between the block and a second block for which the conversion unit obtains a second cost that is equal to or less than a predetermined first threshold. And a control unit that causes the encoding unit to encode using the second information obtained by the conversion unit.

また、別の観点によれば、符号化方法は、第1の動画像に含まれる複数の第1画像のそれぞれを分割して得られる複数の第1ブロックのそれぞれについて、画面間予測及び画面内予測の少なくとも一方を行うことで、動きベクトル及び予測方向の少なくとも一方を探索し、第1の動画像から生成される、フレームレート及び画面サイズの少なくとも一方が第1の動画像と異なる第2の動画像に含まれる複数の第2画像のそれぞれを、第2画像を分割して得られる第2ブロックごとに符号化する場合に、探索によって得られた動きベクトル及び予測方向の少なくとも一方を示す第1情報と、第1情報で示される予測画像と第1ブロックとの違いである予測誤差を示す第1コストとのそれぞれから、各第2画像に含まれる第2ブロックのそれぞれについて画面間予測及び画面内予測の少なくとも一方を行った場合に得ることが予想される動きベクトル及び予測方向の少なくとも一方を示す第2情報と、第2情報で示される予測画像と第2ブロックとの間に予想される予測誤差を示す第2コストとのそれぞれを求め、所定の第1閾値以下の第2コストが求められた第2ブロックを、第2ブロックについて得られた第2情報を用いて符号化する。   According to another aspect, the encoding method performs inter-screen prediction and intra-screen prediction for each of a plurality of first blocks obtained by dividing each of a plurality of first images included in the first moving image. By performing at least one of the predictions, at least one of the motion vector and the prediction direction is searched, and at least one of the frame rate and the screen size generated from the first moving image is different from the first moving image. When encoding each of the plurality of second images included in the moving image for each second block obtained by dividing the second image, the second image indicating at least one of the motion vector obtained by the search and the prediction direction. Each of the second block included in each second image from one information and a first cost indicating a prediction error that is a difference between the predicted image indicated by the first information and the first block. Second information indicating at least one of a motion vector and a prediction direction expected to be obtained when at least one of inter-screen prediction and intra-screen prediction is performed; a predicted image indicated by the second information; and a second block Each of the second cost indicating a prediction error expected during the period is obtained, and the second information obtained for the second block is used for the second block for which the second cost equal to or lower than the predetermined first threshold is obtained. To encode.

更に、別の観点によれば、符号化プログラムは、第1の動画像に含まれる複数の第1画像のそれぞれを分割して得られる複数の第1ブロックのそれぞれについて、画面間予測及び画面内予測の少なくとも一方を行うことで、動きベクトル及び予測方向の少なくとも一方を探索し、第1の動画像から生成される、フレームレート及び画面サイズの少なくとも一方が第1の動画像と異なる第2の動画像に含まれる複数の第2画像のそれぞれを、第2画像を分割して得られる第2ブロックごとに符号化する場合に、探索によって得られた動きベクトル及び予測方向の少なくとも一方を示す第1情報と、第1情報で示される予測画像と第1ブロックとの違いである予測誤差を示す第1コストとのそれぞれから、各第2画像に含まれる第2ブロックのそれぞれについて画面間予測及び画面内予測の少なくとも一方を行った場合に得ることが予想される動きベクトル及び予測方向の少なくとも一方を示す第2情報と、第2情報で示される予測画像と第2ブロックとの間に予想される予測誤差を示す第2コストとのそれぞれを求め、所定の第1閾値以下の第2コストが求められた第2ブロックを、第2ブロックについて得られた第2情報を用いて符号化する、処理をコンピュータに実行させる。   Further, according to another aspect, the encoding program performs inter-screen prediction and intra-screen prediction for each of the plurality of first blocks obtained by dividing each of the plurality of first images included in the first moving image. By performing at least one of the predictions, at least one of the motion vector and the prediction direction is searched, and at least one of the frame rate and the screen size generated from the first moving image is different from the first moving image. When encoding each of the plurality of second images included in the moving image for each second block obtained by dividing the second image, the second image indicating at least one of the motion vector obtained by the search and the prediction direction. 1 information and the first cost indicating the prediction error, which is the difference between the predicted image indicated by the first information and the first block, of the second block included in each second image. Second information indicating at least one of a motion vector and a prediction direction expected to be obtained when at least one of inter-screen prediction and intra-screen prediction is performed for each, a predicted image indicated by the second information, and a second The second information obtained for the second block is obtained with respect to each of the second costs indicating the prediction error expected between the blocks and the second block for which the second cost equal to or lower than the predetermined first threshold is obtained. The computer executes the process of encoding using.

本件開示の符号化装置、符号化方法及び符号化プログラムは、一つの動画像から複数種類の画面サイズやフレームレートで再生可能な符号化データを生成するための処理時間の低減と画質の劣化の抑制を両立させることができる。   The encoding apparatus, encoding method, and encoding program disclosed herein reduce processing time and image quality degradation for generating encoded data that can be reproduced from a single moving image at a plurality of types of screen sizes and frame rates. It is possible to achieve both suppression.

符号化装置の一実施形態を示す図である。It is a figure which shows one Embodiment of an encoding apparatus. 縮小画像のマクロブロックと縮小前のマクロブロックとの対応関係の例を示す図である。It is a figure which shows the example of the correspondence of the macroblock of a reduction image, and the macroblock before reduction. 図1に示した符号化装置の動作を示す図である。It is a figure which shows operation | movement of the encoding apparatus shown in FIG. 図1に示した変換部による動きベクトルの変換例を示す図である。It is a figure which shows the example of conversion of the motion vector by the conversion part shown in FIG. 図1に示した変換部による予測方向の変換例を示す図である。It is a figure which shows the example of a conversion of the prediction direction by the conversion part shown in FIG. 符号化装置の別実施形態を示す図である。It is a figure which shows another embodiment of an encoding apparatus. 図6に示した抑止部で第2閾値と比較される第2コストの差の例を示す図である。It is a figure which shows the example of the difference of the 2nd cost compared with a 2nd threshold value in the suppression part shown in FIG. 図6に示した符号化装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the encoding apparatus shown in FIG. 図8に示した符号化装置の動作を示す図である。It is a figure which shows operation | movement of the encoding apparatus shown in FIG.

以下、図面に基づいて、実施形態を説明する。   Hereinafter, embodiments will be described with reference to the drawings.

図1は、符号化装置の一実施形態を示す。図1に示した符号化装置10は、探索部11と、符号化部12と、変換部13と、制御部14とを含んでいる。   FIG. 1 shows an embodiment of an encoding device. The encoding apparatus 10 illustrated in FIG. 1 includes a search unit 11, an encoding unit 12, a conversion unit 13, and a control unit 14.

図1に示した探索部11および符号化部12は、動画像データベースDBに接続されており、動画像データベースDBに蓄積された動画像Vinを受ける。動画像Vinは、例えば、所定の時間間隔を置いて連続的に被写体を撮影することで得られる動画像であり、複数の画像を含んでいる。符号化部12は、配信装置DTに接続されており、符号化部12によって生成された符号化データC1〜Cn(nは、2以上の整数)は、配信装置DTを介してネットワークNWに送出され、n種類の端末装置UEのそれぞれに配信される。図1に示したテレビジョン装置UE1、パーソナルコンピュータUE2,タブレット型端末UE3及びスマートホンUE4は、符号化部12によって生成された符号化データC1〜Cnのそれぞれの配信を受けるn種類の端末装置UEの例である。   The search unit 11 and the encoding unit 12 illustrated in FIG. 1 are connected to the moving image database DB and receive the moving image Vin stored in the moving image database DB. The moving image Vin is, for example, a moving image obtained by continuously photographing a subject at a predetermined time interval, and includes a plurality of images. The encoding unit 12 is connected to the distribution device DT, and the encoded data C1 to Cn (n is an integer of 2 or more) generated by the encoding unit 12 is sent to the network NW via the distribution device DT. And distributed to each of the n types of terminal apparatuses UE. The television device UE1, the personal computer UE2, the tablet terminal UE3, and the smart phone UE4 illustrated in FIG. 1 receive n types of terminal devices UE that receive the respective distributions of the encoded data C1 to Cn generated by the encoding unit 12. It is an example.

なお、n種類の端末装置UEは、テレビジョン装置UE1、パーソナルコンピュータUE2,タブレット型端末UE3及びスマートホンUE4に限られず、動画像を再生する機能を有する端末装置であればよく、例えば、携帯電話や携帯型ゲーム機等でもよい。また、符号化装置10に含まれる符号化部12によって生成された符号化データC1〜Cnのそれぞれは、配信装置DTにより、同じ種類の複数の端末装置UEに並行して配信されてもよい。また、動画像データベースDB、符号化装置10および配信装置DTは、図1に示したように、それぞれ個別の装置としてもよいし、一つの装置として一体化されてもよい。   Note that the n types of terminal devices UE are not limited to the television device UE1, the personal computer UE2, the tablet terminal UE3, and the smart phone UE4, and may be any terminal device that has a function of reproducing moving images. Or a portable game machine. Also, each of the encoded data C1 to Cn generated by the encoding unit 12 included in the encoding device 10 may be distributed in parallel to a plurality of terminal devices UE of the same type by the distribution device DT. In addition, the moving image database DB, the encoding device 10, and the distribution device DT may be individual devices as shown in FIG. 1, or may be integrated as one device.

図1に示した符号化装置10において、探索部11は、例えば、動画像Vinに含まれる複数の画像のそれぞれを分割して得られるマクロブロック毎に、画面間予測及び画面内予測の少なくとも一方により、動きベクトル及び予測方向の少なくとも一方を探索する。ここで、動画像Vinに含まれる複数の画像のそれぞれは、探索部11による探索の対象となる第1画像の一例である。また、動画像Vin中の各画像に含まれるマクロブロックは、第1画像を分割して得られる複数の第1ブロックの一例である。   In the encoding device 10 illustrated in FIG. 1, the search unit 11 performs, for example, at least one of inter-screen prediction and intra-screen prediction for each macroblock obtained by dividing each of a plurality of images included in the moving image Vin. Thus, at least one of the motion vector and the prediction direction is searched. Here, each of the plurality of images included in the moving image Vin is an example of a first image to be searched by the search unit 11. The macroblock included in each image in the moving image Vin is an example of a plurality of first blocks obtained by dividing the first image.

なお、探索部11は、例えば、H.264規格に基づいて、各マクロブロックを分割したサブブロック毎に画面内予測及び画面間予測を行うことにより、各サブブロックの動きベクトル及び予測方向を探索してもよい。   The search unit 11 is, for example, H.264. Based on the H.264 standard, the motion vector and the prediction direction of each sub block may be searched by performing intra prediction and inter prediction for each sub block obtained by dividing each macro block.

以下では、説明の簡単のため、探索部11において、動画像Vinに含まれる各画像のマクロブロック毎に、動画像Vinにおいてマクロブロックを含む画像より前に撮影された画像を参照画像とする画面間予測で動きベクトルを探索する場合について説明する。例えば、動画像Vinに含まれる各画像に撮影順を示す画像番号が与えられる場合に、探索部11では、画像番号kの画像に含まれる各マクロブロックの動きベクトルを、画像番号k−1の画像を参照画像とする画面間予測を行うことで探索する。   In the following, for simplicity of explanation, the search unit 11 uses, for each macroblock of each image included in the moving image Vin, a screen in which an image taken before the image including the macroblock in the moving image Vin is used as a reference image. A case where a motion vector is searched by inter prediction will be described. For example, when an image number indicating the shooting order is given to each image included in the moving image Vin, the search unit 11 uses the motion vector of each macroblock included in the image of the image number k as the image number k−1. Search is performed by performing inter-screen prediction using an image as a reference image.

この場合に、探索部11は、動画像Vinに含まれる各画像のマクロブロックに順次に注目し、注目するマクロブロックを含む画像の撮影順で一つ前の画像である参照画像において、注目するマクロブロックに類似する箇所を探索する。そして、参照画像において注目するマクロブロックに対応する位置を基準として、探索で特定した箇所の位置を示す動きベクトルを求め、求めた動きベクトル及び参照画像を示す情報を含む第1情報を変換部13に渡す。また、探索部11は、例えば、参照画像における探索で特定した箇所の画像と注目するマクロブロックとの差分の絶対値の総和を、動きベクトルで示される予測画像と注目するマクロブロックとの違いである予測誤差を示す第1コストとして変換部13に渡す。   In this case, the search unit 11 sequentially pays attention to the macroblocks of each image included in the moving image Vin, and pays attention to the reference image that is the previous image in the shooting order of the image including the target macroblock. Search for a place similar to a macroblock. Then, with reference to the position corresponding to the macroblock of interest in the reference image, a motion vector indicating the position of the location specified by the search is obtained, and the first information including the obtained motion vector and information indicating the reference image is converted into the conversion unit 13. To pass. In addition, the search unit 11 determines, for example, the sum of absolute values of differences between the image of the location specified by the search in the reference image and the macroblock of interest by the difference between the predicted image indicated by the motion vector and the macroblock of interest. The first cost indicating a certain prediction error is passed to the conversion unit 13.

図1に示した符号化部12は、例えば、配信先の端末装置UEの種類毎に設定された符号化条件に基づいて動画像Vinから生成される、動画像Vinとはフレームレート及び画面サイズの少なくとも一方が異なる第2の動画像を符号化する。符号化部12は、例えば、符号化部12の内部において、符号化条件で示されたフレームレートに応じて動画像Vinに含まれる画像を間引くとともに、符号化条件で示される画面サイズに従って画像のそれぞれを縮小することで、第2の動画像を生成する。そして、符号化部12は、制御部14からの指示に従って、第2の動画像に含まれる複数の第2画像である縮小された画像のそれぞれにおけるマクロブロック毎に画面間予測を行うことで得られる情報と変換部13で得られる情報との何れかを用いた符号化を行う。ここで、配信先の端末装置UEの種類毎の符号化条件で示された画面サイズに従って縮小された画像は、動画像Vinとはフレームレート及び画面サイズの少なくとも一方が異なる第2の動画像に含まれる第2画像の一例である。また、縮小された画像に含まれる各マクロブロックは、第2画像を分割することで得られる複数の第2ブロックの一例である。   The encoding unit 12 illustrated in FIG. 1 generates, for example, a moving image Vin based on an encoding condition set for each type of terminal device UE as a distribution destination. The moving image Vin includes a frame rate and a screen size. A second moving image in which at least one of them is different is encoded. For example, the encoding unit 12 thins out an image included in the moving image Vin in accordance with the frame rate indicated by the encoding condition, and also performs image processing according to the screen size indicated by the encoding condition. A second moving image is generated by reducing each of them. Then, in accordance with an instruction from the control unit 14, the encoding unit 12 obtains by performing inter-screen prediction for each macroblock in each of the reduced images that are the plurality of second images included in the second moving image. Encoding using either the information obtained or the information obtained by the conversion unit 13 is performed. Here, the image reduced according to the screen size indicated by the encoding condition for each type of the terminal device UE as the distribution destination is a second moving image that is different from the moving image Vin in at least one of the frame rate and the screen size. It is an example of the 2nd image contained. Each macroblock included in the reduced image is an example of a plurality of second blocks obtained by dividing the second image.

なお、端末装置UEの種類毎の符号化条件で設定される第1画像と第2画像とのサイズの比率は、端末装置UEのそれぞれに搭載された表示部で表示可能な画像のサイズ等に基づいて、画像の縦方向と横方向とでそれぞれ独立に設定されてもよい。   In addition, the ratio of the size of the first image and the second image set in the encoding condition for each type of the terminal device UE is the size of the image that can be displayed on the display unit mounted on each of the terminal devices UE. Based on this, the vertical direction and the horizontal direction of the image may be set independently.

以下の説明では、配信先の端末装置UEの種類毎に設定された符号化条件で示される画面サイズに従って縮小された画像は、縮小画像と称される場合がある。また、以下では、説明の簡単のため、符号化部12において、動画像Vinからの画像の間引きが行われず、動画像Vinに含まれる全ての画像が符号化条件で指定された画面サイズに基づいて縮小される場合について説明する。また、符号化条件で指定された第1画像に対する第2画像のサイズの比率を縮小率と称する。   In the following description, an image reduced according to the screen size indicated by the encoding condition set for each type of terminal apparatus UE as a distribution destination may be referred to as a reduced image. In the following description, for simplification of description, the encoding unit 12 does not perform image thinning from the moving image Vin, and all images included in the moving image Vin are based on the screen size specified by the encoding condition. Will be described. Further, the ratio of the size of the second image to the first image designated by the encoding condition is referred to as a reduction ratio.

図1に示した変換部13は、探索部11から受けた第1情報に含まれる動きベクトルから、縮小画像のマクロブロック毎に、撮影順で一つ前の縮小画像を参照画像とした画面間予測で求められることが予想される動きベクトルを示す第2情報を求める。例えば、変換部13は、符号化条件で指定された縮小率に基づいて、縮小画像のマクロブロック毎に、当該マクロブロックに対応付けられる縮小前のマクロブロックを特定する。そして、変換部13は、例えば、特定したマクロブロックのそれぞれについて求められた動きベクトルを、指定された縮小率を用いて縮小し、縮小された動きベクトルの何れかを選択することで、縮小画像のマクロブロックの動きベクトルを求める。なお、変換部13において、縮小画像のマクロブロック毎に予想される動きベクトルを求める手法は、縮小画像のマクロブロックに対応して特定された縮小前のマクロブロックの動きベクトルを縮小したベクトルの何れかを選択する手法に限られない。例えば、変換部13は、縮小画像のマクロブロックに対応して特定された縮小前のマクロブロックの動きベクトルを縮小したベクトルに重みを付けて平均することで得られたベクトルを、縮小画像のマクロブロックの動きベクトルとして求めてもよい。縮小画像のマクロブロックについて予想される動きベクトルを、重み付平均により求める場合に用いる重みとして好適な例は、図2を用いて後述される。   The conversion unit 13 illustrated in FIG. 1 uses a motion vector included in the first information received from the search unit 11 to display a screen between screens using a reduced image that is the previous reduced image in the shooting order for each macroblock of the reduced image. Second information indicating a motion vector expected to be obtained by prediction is obtained. For example, the conversion unit 13 specifies, for each macroblock of the reduced image, the pre-reduction macroblock associated with the macroblock based on the reduction ratio specified by the encoding condition. Then, for example, the conversion unit 13 reduces the motion vector obtained for each of the specified macroblocks using the specified reduction ratio, and selects any one of the reduced motion vectors, thereby reducing the reduced image. The motion vector of the macroblock is obtained. The conversion unit 13 obtains a motion vector predicted for each macroblock of the reduced image by any of vectors obtained by reducing the motion vector of the macroblock before reduction specified corresponding to the macroblock of the reduced image. It is not restricted to the method of selecting. For example, the conversion unit 13 weights and averages a vector obtained by weighting a motion vector of a macroblock before reduction specified corresponding to the macroblock of the reduced image and reducing the macroblock of the reduced image. You may obtain | require as a motion vector of a block. An example suitable as a weight used when a motion vector predicted for a macroblock of a reduced image is obtained by weighted averaging will be described later with reference to FIG.

また、変換部13は、例えば、探索部11から受けた第1コストから、縮小画像のマクロブロック毎に、第2情報として求めた動きベクトルで示される予測画像と縮小画像のマクロブロックとの間に予想される予測誤差を示す第2コストを求める。例えば、変換部13は、縮小画像のマクロブロックに対応付けられる縮小前のマクロブロックの動きベクトルと縮小画像のマクロブロックについて求められた動きベクトルとの方向の違いに応じて大きくなる、1以上の値を持つ係数を求める。そして、変換部13は、例えば、縮小前のマクロブロックのそれぞれに対応して探索部11から受けた第1コストに、求めた係数及び縮小率を乗じ、係数及び縮小率が乗じられた第1コストを互いに加算することで第2コストを求める。   For example, the conversion unit 13 determines, for each macroblock of the reduced image, between the predicted image indicated by the motion vector obtained as the second information and the macroblock of the reduced image from the first cost received from the search unit 11. A second cost indicating a prediction error expected is obtained. For example, the conversion unit 13 increases in accordance with the difference in direction between the motion vector of the macroblock before reduction associated with the macroblock of the reduced image and the motion vector obtained for the macroblock of the reduced image. Find a coefficient with a value. Then, for example, the conversion unit 13 multiplies the first cost received from the search unit 11 corresponding to each of the macroblocks before reduction by the obtained coefficient and reduction rate, and first multiplied by the coefficient and reduction rate. The second cost is obtained by adding the costs to each other.

ここで、縮小画像のマクロブロックに対応して特定される縮小前のマクロブロックは、例えば、図2を用いて後述するように、縮小前の画像において互いに隣接しているので、特定された各マクロブロックの動きベクトルは互いに類似している場合が多い。そして、特定された各マクロブロックの動きベクトルが互いに類似している場合に、これらの動きベクトルを画像の縮小率で縮小したベクトルは、縮小画像のマクロブロックについて実際に画面間予測を行った場合に得られる動きベクトルに類似する可能性が高い。即ち、特定された各マクロブロックの動きベクトルが互いに類似している場合に、変換部13により特定された各マクロブロックの動きベクトルから求められる動きベクトルは、縮小画像のマクロブロックについて実際に画面間予測を行った場合とほぼ同等となる。   Here, the macroblocks before reduction specified corresponding to the macroblocks of the reduced image are adjacent to each other in the image before reduction as described later with reference to FIG. 2, for example. The motion vectors of macroblocks are often similar to each other. When the motion vectors of the identified macroblocks are similar to each other, the vectors obtained by reducing these motion vectors at the image reduction rate are actually obtained when inter-screen prediction is performed for the macroblocks of the reduced image Is likely to be similar to the motion vector obtained. That is, when the motion vectors of the specified macroblocks are similar to each other, the motion vector obtained from the motion vector of each macroblock specified by the conversion unit 13 is actually between the screens for the macroblock of the reduced image. This is almost the same as when the prediction is made.

また、以上に説明した変換部13によって縮小画像のマクロブロック毎に求められる第2コストは、縮小画像のマクロブロックに対応付けられた縮小前のマクロブロックの動きベクトルが互いに類似している場合に、他の場合に比べて小さい値となる。即ち、変換部13によって求められた第2コストが小さいほど、変換部13によって第2情報として求められた動きベクトルは、縮小画像のマクロブロックの動きベクトルとして確からしい。   In addition, the second cost obtained for each macroblock of the reduced image by the conversion unit 13 described above is when the motion vectors of the macroblocks before reduction associated with the macroblock of the reduced image are similar to each other. The value is smaller than in other cases. That is, as the second cost obtained by the conversion unit 13 is smaller, the motion vector obtained as the second information by the conversion unit 13 is more likely as the motion vector of the macroblock of the reduced image.

そこで、図1に示した制御部14は、縮小画像のマクロブロック毎に変換部13から受けた第2コストが所定の第1閾値以下である場合に、第2情報で示される動きベクトルと、縮小画像についての画面間予測で実際に得られる動きベクトルとが類似すると判断する。ここで、制御部14において第2コストと比較される第1閾値は、例えば、画面間予測で得られる予測誤差の平均値程度に設定される。なお、第1閾値の値は、符号化部12によって生成される符号化データの配信先となる端末装置UE毎に、個々の端末装置UEについて予め設定された画質や処理速度についての仕様を達成可能な値に設定されてもよい。   Therefore, the control unit 14 illustrated in FIG. 1, when the second cost received from the conversion unit 13 for each macroblock of the reduced image is equal to or less than a predetermined first threshold, the motion vector indicated by the second information, It is determined that the motion vector actually obtained by the inter-screen prediction for the reduced image is similar. Here, the 1st threshold value compared with the 2nd cost in control part 14 is set as the average value of the prediction error obtained by inter-screen prediction, for example. Note that the first threshold value achieves specifications for image quality and processing speed that are set in advance for each terminal device UE for each terminal device UE that is a distribution destination of encoded data generated by the encoding unit 12. It may be set to a possible value.

そして、制御部14は、第2コストが所定の第1閾値以下である場合に、符号化部12に対して、変換部13から受けた第2情報で示される動きベクトルを用いた符号化処理の実行を指示する。この場合に、符号化部12は、縮小画像のマクロブロックについて動きベクトルを求める処理を省略し、変換部13による変換で得られた動きベクトルを用いて、縮小画像のマクロブロックを符号化する。変換部13において説明したように、第2コストが小さいほど、変換部13によって第2情報として求められた動きベクトルは、縮小画像のマクロブロックの動きベクトルとして確からしい。したがって、制御部14は、第2コストが第1閾値以下である場合に、第2情報で示される動きベクトルを用いた符号化を符号化部12に行わせることで、縮小画像のマクロブロックの符号化に確からしい動きベクトルを用いさせることができる。   Then, the control unit 14 uses the motion vector indicated by the second information received from the conversion unit 13 to the encoding unit 12 when the second cost is equal to or lower than the predetermined first threshold. Is instructed to execute. In this case, the encoding unit 12 omits the process of obtaining the motion vector for the macroblock of the reduced image, and encodes the macroblock of the reduced image using the motion vector obtained by the conversion by the conversion unit 13. As described in the conversion unit 13, the smaller the second cost is, the more likely the motion vector obtained as the second information by the conversion unit 13 is as the motion vector of the macroblock of the reduced image. Therefore, when the second cost is equal to or lower than the first threshold, the control unit 14 causes the encoding unit 12 to perform encoding using the motion vector indicated by the second information, thereby reducing the macroblock of the reduced image. Probable motion vectors can be used for encoding.

一方、第2コストが第1閾値よりも大きい場合に、制御部14は、変換部13で得られた第2情報に含まれる動きベクトルは、縮小画像のマクロブロックについて画面間予測を行うことで得られる動きベクトルと異なっている可能性があると判断する。この場合に、制御部14は、符号化部12に対して、縮小画像のマクロブロックについての画面間予測の実行を指示し、画面間予測で得られた動きベクトルを用いた符号化を実行させる。   On the other hand, when the second cost is greater than the first threshold, the control unit 14 performs inter-screen prediction on the macroblock of the reduced image for the motion vector included in the second information obtained by the conversion unit 13. It is determined that the obtained motion vector may be different. In this case, the control unit 14 instructs the encoding unit 12 to execute inter-screen prediction on the macroblock of the reduced image, and executes encoding using the motion vector obtained by the inter-screen prediction. .

ここで、縮小画像のマクロブロックと縮小前の画像におけるマクロブロックとの対応関係について、図2を用いて説明する。   Here, the correspondence between the macroblock of the reduced image and the macroblock in the image before reduction will be described with reference to FIG.

図2は、縮小画像のマクロブロックと縮小前のマクロブロックとの対応関係の例を示す。図2(A)は、縮小前の画像における4つのマクロブロックMB11,MB12,MB21,MB22が、縮小画像の一つのマクロブロックmb11に対応付けられる場合を示す。また、図2(B)は、縮小前の画像における4つのマクロブロックMB11,MB12,MB21,MB22のそれぞれの一部を含む領域Rが、縮小画像において一つのマクロブロックmb11に対応付けられる場合を示す。   FIG. 2 shows an example of a correspondence relationship between a macroblock of a reduced image and a macroblock before reduction. FIG. 2A shows a case where four macroblocks MB11, MB12, MB21, and MB22 in the image before reduction are associated with one macroblock mb11 in the reduction image. FIG. 2B shows a case where a region R including a part of each of the four macroblocks MB11, MB12, MB21, and MB22 in the image before reduction is associated with one macroblock mb11 in the reduction image. Show.

図2(A)の例は、図1に示した変換部13により、マクロブロックMB11〜MB22のうち、左上のマクロブロックMB11の動きベクトルVp11を縮小したベクトルVcが、マクロブロックmb11の動きベクトルとして選択される場合を示す。なお、図2(A)において、実線の矢印Vp12,Vp21,Vp22のそれぞれは、図1に示した探索部11により、マクロブロックMB12,MB21,MB22のそれぞれについて求められた動きベクトルを示す。また、図2(A)に示したマクロブロックMB12,MB21,MB22において、マクロブロックmb11の動きベクトルVcに相当するベクトルを点線の矢印で示した。   In the example of FIG. 2A, the vector Vc obtained by reducing the motion vector Vp11 of the macroblock MB11 in the upper left among the macroblocks MB11 to MB22 by the conversion unit 13 illustrated in FIG. 1 is used as the motion vector of the macroblock mb11. Indicates when it is selected. In FIG. 2A, solid arrows Vp12, Vp21, and Vp22 indicate motion vectors obtained for the macroblocks MB12, MB21, and MB22, respectively, by the search unit 11 shown in FIG. Also, in the macroblocks MB12, MB21, and MB22 shown in FIG. 2A, vectors corresponding to the motion vector Vc of the macroblock mb11 are indicated by dotted arrows.

この場合に、変換部13により、例えば、動きベクトルVp11〜Vp22のそれぞれについて、動きベクトルVcとの方向の違いの大きさを示す係数が求められ、マクロブロックmb11の第2コストを求める処理に用いられる。図2(A)の例では、マクロブロックMB11〜MB22のそれぞれの全体がマクロブロックmb11に対応付けられている。この場合に、変換部13は、動きベクトルVp11〜Vp22のそれぞれにつき求めた方向の違いを示す係数及び画像の縮小率と、マクロブロックMB11〜MB22のそれぞれの第1コストとの積の総和を、マクロブロックmb11の第2コストとして求める。   In this case, for example, for each of the motion vectors Vp11 to Vp22, the conversion unit 13 obtains a coefficient indicating the magnitude of the difference in direction from the motion vector Vc, and uses it for the process of obtaining the second cost of the macroblock mb11. It is done. In the example of FIG. 2A, each of the macroblocks MB11 to MB22 is associated with the macroblock mb11. In this case, the conversion unit 13 calculates the sum of the products of the coefficient indicating the difference in direction and the image reduction ratio obtained for each of the motion vectors Vp11 to Vp22 and the first cost of each of the macroblocks MB11 to MB22. Obtained as the second cost of the macroblock mb11.

一方、図2(B)の例は、縮小前のマクロブロックMB11〜MB22のそれぞれにおいて、マクロブロックmb11に対応付けられた部分の占める割合が互いに異なる場合を示す。この場合に、変換部13は、マクロブロックMB11〜MB22のそれぞれにおいて領域Rに含まれる部分の面積と一つのマクロブロックの面積との比等を示す重みを用いた加重平均により、マクロブロックmb11の動きベクトルVcを求めてもよい。なお、図2(B)に示したマクロブロックMB11,MB12,MB21,MB22において、点線の矢印Vcは、変換部13により、動きベクトルVp11〜Vp22の加重平均で求められたマクロブロックmb11の動きベクトルを示す。また、この場合に、変換部13は、動きベクトルVcの算出で用いた重みを用いて、第2コストの算出を行うことが望ましい。   On the other hand, the example of FIG. 2B shows a case where the proportions of the portions associated with the macroblock mb11 are different from each other in the macroblocks MB11 to MB22 before the reduction. In this case, the conversion unit 13 performs the weighted average using the weight indicating the ratio between the area of the portion included in the region R and the area of one macroblock in each of the macroblocks MB11 to MB22, and the macroblock mb11 The motion vector Vc may be obtained. In the macroblocks MB11, MB12, MB21, and MB22 shown in FIG. 2B, the dotted arrow Vc indicates the motion vector of the macroblock mb11 obtained by the weighting average of the motion vectors Vp11 to Vp22 by the conversion unit 13. Indicates. In this case, it is preferable that the conversion unit 13 calculates the second cost using the weight used in the calculation of the motion vector Vc.

図1に示した符号化装置10において、制御部14は、変換部13によって縮小画像のマクロブロック毎に求められた第2コストが第1閾値以下である場合に、第2情報で示される動きベクトルを用いて縮小画像のマクロブロックを符号化させる。これにより、変換部13により、縮小画像のマクロブロックの動きベクトルとして確からしい動きベクトルが得られた場合に、符号化部12における画面間予測処理を省略させ、符号化処理の高速化を図ることができる。以上で説明したように、縮小画像の任意のマクロブロックについて求められた第2コストが第1閾値以下の場合に、変換部13で求められた第2情報で示される動きベクトルは、当該マクロブロックについての画面間予測で得られる動きベクトルとほぼ同等である。したがって、第1閾値以下の第2コストが得られた場合に、縮小画像のマクロブロックを第2情報で示される動きベクトルを用いて符号化することで、縮小画像のマクロブロックについて画面間予測を行った場合と同様の画質で再生可能な符号化データが得られる。即ち、図1に示した符号化装置10は、一つの動画像Vinから複数種類の画面サイズやフレームレートで再生可能な符号化データを生成する符号化処理のための処理時間の低減と画質の劣化の抑制を両立させることができる。   In the encoding device 10 illustrated in FIG. 1, the control unit 14 performs the movement indicated by the second information when the second cost obtained for each macroblock of the reduced image by the conversion unit 13 is equal to or less than the first threshold. The macroblock of the reduced image is encoded using the vector. As a result, when a probable motion vector is obtained as the motion vector of the macroblock of the reduced image by the conversion unit 13, the inter-screen prediction process in the encoding unit 12 is omitted, and the encoding process is speeded up. Can do. As described above, when the second cost obtained for an arbitrary macroblock of the reduced image is equal to or smaller than the first threshold, the motion vector indicated by the second information obtained by the conversion unit 13 is the macroblock. Is almost equivalent to the motion vector obtained by the inter-screen prediction. Therefore, when the second cost equal to or lower than the first threshold is obtained, the inter-frame prediction is performed on the macroblock of the reduced image by encoding the macroblock of the reduced image using the motion vector indicated by the second information. Encoded data that can be reproduced with the same image quality as that obtained is obtained. That is, the encoding apparatus 10 shown in FIG. 1 reduces the processing time and the image quality for encoding processing for generating encoded data that can be reproduced at a plurality of types of screen sizes and frame rates from one moving image Vin. It is possible to achieve both suppression of deterioration.

図3は、図1に示した符号化装置10の動作を示す。図3に示したステップS301〜ステップS306の処理は、図1に示した符号化装置10の動作を示すとともに、符号化方法および符号化プログラムの例を示す。例えば、図3に示す処理は、符号化装置10に搭載されたプロセッサが符号化プログラムを実行することで実現される。なお、図3に示す処理は、符号化装置10に搭載されるハードウェアによって実行されてもよい。   FIG. 3 shows the operation of the encoding apparatus 10 shown in FIG. The processing of step S301 to step S306 shown in FIG. 3 shows the operation of the encoding device 10 shown in FIG. 1, and shows an example of the encoding method and the encoding program. For example, the processing illustrated in FIG. 3 is realized by a processor installed in the encoding device 10 executing an encoding program. Note that the processing illustrated in FIG. 3 may be executed by hardware installed in the encoding device 10.

ステップS301において、探索部11は、動画像Vinに含まれる縮小前の画像に基づいて、縮小前の画像におけるマクロブロック毎の第1情報及び第1コストとして、例えば、動きベクトル及び予測誤差を求める。   In step S301, the search unit 11 obtains, for example, a motion vector and a prediction error as the first information and the first cost for each macroblock in the image before reduction based on the image before reduction included in the moving image Vin. .

ステップS302において、変換部13は、ステップS301の処理で得られた動きベクトル及び予測誤差に基づいて、縮小画像の各マクロブロックについて予想される動きベクトルを示す第2情報及び予想される予測誤差を示す第2コストを求める。変換部13は、ステップS302の処理において、図2で説明したように、縮小画像の各マクロブロックに対応付けられる縮小前のマクロブロックについて得られた動きベクトル及び予測誤差を用いる。なお、縮小画像の各マクロブロックと縮小前のマクロブロックとの対応関係は、動画像Vinに含まれる各画像から縮小画像を生成する際の縮小率に基づいて特定される。   In step S302, the conversion unit 13 calculates the second information indicating the predicted motion vector and the predicted prediction error for each macroblock of the reduced image based on the motion vector and the prediction error obtained in the process of step S301. The second cost shown is determined. In the process of step S302, the conversion unit 13 uses the motion vector and the prediction error obtained for the macroblock before reduction associated with each macroblock of the reduced image, as described in FIG. Note that the correspondence between each macroblock of the reduced image and the macroblock before the reduction is specified based on a reduction ratio when a reduced image is generated from each image included in the moving image Vin.

以下に説明するステップS303〜ステップS306の各処理は、縮小画像に含まれる各マクロブロックを順次に注目するマクロブロックとし、変換部13、制御部14および符号化部12により、注目するマクロブロック毎に実行される。   In each of the processes in steps S303 to S306 described below, each macroblock included in the reduced image is set as a macroblock to be noticed in order, and each macroblock to be noticed is converted by the conversion unit 13, the control unit 14, and the encoding unit 12. To be executed.

ステップS303において、制御部14は、注目するマクロブロックについて、ステップS302の処理で得られた第2コストが第1閾値以下であるか否かを判定する。   In step S303, the control unit 14 determines whether or not the second cost obtained in the process of step S302 is equal to or less than the first threshold for the macro block of interest.

ステップS302の処理で第1閾値以下の値を持つ第2コストが得られた場合に(ステップS303の肯定判定(YES))、制御部14は、ステップS302の処理で得られた動きベクトルは注目するマクロブロックの動きベクトルとして確からしいと判断する。この場合に、制御部14は、ステップS304の処理に進む。   When the second cost having a value equal to or smaller than the first threshold value is obtained in the process of step S302 (Yes determination in step S303), the control unit 14 pays attention to the motion vector obtained in the process of step S302. It is determined that the motion vector of the macro block is likely. In this case, the control unit 14 proceeds to the process of step S304.

ステップS304において、制御部14は、注目するマクロブロックの動きベクトルとして、ステップS302の処理で得られた動きベクトルを符号化部12に渡し、渡した動きベクトルを用いた符号化処理を符号化部12に実行させる。この場合に、符号化部12において、第1閾値以下の値を持つ第2コストが得られたマクロブロックについて動きベクトルを探索する処理は省略される。   In step S304, the control unit 14 passes the motion vector obtained in the process of step S302 as the motion vector of the target macroblock to the encoding unit 12, and performs the encoding process using the passed motion vector. 12 is executed. In this case, the encoding unit 12 omits the process of searching for a motion vector for a macroblock for which a second cost having a value equal to or smaller than the first threshold is obtained.

一方、ステップS302で得られた第2コストが第1閾値よりも大きい場合に(ステップS303の否定判定(NO))、制御部14は、ステップS302で得られた動きベクトルは注目するマクロブロックの動きベクトルとして確からしくないと判断する。この場合に、制御部14は、ステップS305の処理に進む。   On the other hand, when the second cost obtained in step S302 is larger than the first threshold value (No determination in step S303 (NO)), the control unit 14 determines that the motion vector obtained in step S302 is the macro block of interest. It is determined that the motion vector is not accurate. In this case, the control unit 14 proceeds to the process of step S305.

ステップS305において、制御部14は、注目するマクロブロックについて、符号化部12に例えば画面間予測処理による動きベクトルの探索を実行させる。   In step S305, the control unit 14 causes the encoding unit 12 to execute, for example, a motion vector search by inter-screen prediction processing for the macro block of interest.

そして、ステップS306において、符号化部12は、ステップS305で実行した画面間予測処理等で得られた動きベクトルを用いて、注目するマクロブロックを符号化する。   In step S306, the encoding unit 12 encodes the macro block of interest using the motion vector obtained by the inter-screen prediction process or the like executed in step S305.

以上に説明したように、図1に示した符号化装置10は、変換部13の処理で予想された縮小画像のマクロブロックの動きベクトルが確からしいとされた場合に、予想された動きベクトルを用いて縮小画像のマクロブロックを符号化する。ここで、人物や風景を撮影した動画像は、階調の変化が緩やかな箇所を多く含んでいる。そして、階調変化が緩やかな箇所に含まれるマクロブロックに対応付けられた縮小画像のマクロブロックについては、図2で説明した変換部13の処理により、確からしい動きベクトルを予想することができる。したがって、図1に示した符号化装置10は、人物や風景を撮影した動画像に含まれる階調の変化が緩やかな箇所に対応付けられる縮小画像のマクロブロックについての動きベクトルの探索を省略することで、符号化処理を高速化することが可能である。一方、予想された動きベクトルが確からしくないとされた場合に、符号化装置10の符号化部12は、制御部14からの指示に応じて、縮小画像のマクロブロックについての動き探索で得られた動きベクトルを用いて符号化処理を行う。したがって、図1に示した符号化装置10によって得られる符号化データは、予想された動きベクトルの確からしさにかかわらず予想された動きベクトルを用いて符号化を行った場合に比べて、高い画質の動画像を再生可能である。即ち、図1に示した符号化装置10は、元の動画像Vinを符号化して得られる符号化データを用いて、動画像Vinとは画面サイズ等が異なる第2の動画像を再生するための符号化データを生成する用途において、画質の維持と符号化処理の高速化を両立できる。   As described above, the encoding apparatus 10 shown in FIG. 1 determines the predicted motion vector when the motion vector of the macroblock of the reduced image predicted by the processing of the conversion unit 13 is likely. Used to encode a macroblock of a reduced image. Here, a moving image in which a person or a landscape is photographed includes many portions where the gradation change is gentle. Then, with respect to the macroblock of the reduced image associated with the macroblock included in the portion where the gradation change is gradual, a probable motion vector can be predicted by the processing of the conversion unit 13 described in FIG. Therefore, the encoding apparatus 10 illustrated in FIG. 1 omits the search for a motion vector for a macroblock of a reduced image that is associated with a portion where a gradation change is moderately included in a moving image obtained by photographing a person or a landscape. Thus, it is possible to speed up the encoding process. On the other hand, when it is determined that the predicted motion vector is not accurate, the encoding unit 12 of the encoding device 10 can obtain the motion search for the macroblock of the reduced image in accordance with an instruction from the control unit 14. Encoding processing is performed using the obtained motion vector. Therefore, the encoded data obtained by the encoding device 10 shown in FIG. 1 has a higher image quality than when encoding using the predicted motion vector regardless of the likelihood of the predicted motion vector. Can be played back. That is, the encoding apparatus 10 shown in FIG. 1 uses the encoded data obtained by encoding the original moving image Vin to reproduce the second moving image having a screen size or the like different from that of the moving image Vin. In the application for generating the encoded data, it is possible to maintain both the image quality and the speed of the encoding process.

なお、図1〜図3で説明した動画像Vinの各画像を縮小した縮小画像についての符号化処理は、動画像Vinについて得られた符号化データから、配信先の端末装置UEの仕様で動画像を再生可能な符号化データを生成するトランスコードの一例である。図1に示した符号化装置10は、図2に示した例に限らず、様々なサイズ比で縮小された縮小画像を含む動画像や、様々なフレームレートに従って動画像Vinの画像を間引いて得られる動画像に対応する符号化データを生成することが可能である。即ち、図1に示した符号化装置10は、例えば、テレビジョン受像機である端末装置UE1の仕様に合わせて生成された符号化データに対するトランスコードを行うことで、他の端末装置UEで再生可能な複数種類の符号化データを生成する用途において有用である。   The encoding process for the reduced image obtained by reducing each image of the moving image Vin described with reference to FIGS. 1 to 3 is performed based on the specification of the distribution destination terminal device UE from the encoded data obtained for the moving image Vin. It is an example of the transcode which produces | generates the encoding data which can reproduce | regenerate an image. The coding apparatus 10 illustrated in FIG. 1 is not limited to the example illustrated in FIG. 2, and a moving image including a reduced image reduced at various size ratios and a moving image Vin according to various frame rates are thinned out. It is possible to generate encoded data corresponding to the obtained moving image. That is, the encoding apparatus 10 illustrated in FIG. 1 performs reproduction on the encoded data generated in conformity with the specification of the terminal apparatus UE1 that is a television receiver, for example, so that the other terminal apparatus UE reproduces the encoded data. This is useful in applications where multiple types of encoded data are possible.

また、図1に示した探索部11は、動画像Vinに含まれる各画像におけるマクロブロックのそれぞれを、例えばH.264規格で規定された複数種類のパーテーションタイプ(分割タイプ)で分割したブロック毎に画面間予測及び画面内予測を行ってもよい。この場合に、図1に示した変換部13は、縮小画像におけるマクロブロックを分割する分割タイプ毎に、探索部11での画面間予測及び画面内予測の結果から、分割されたブロックそれぞれについて予想される動きベクトル及び予測方向を求めてもよい。   In addition, the search unit 11 illustrated in FIG. 1 selects each macroblock in each image included in the moving image Vin, for example, H.264. Inter-screen prediction and intra-screen prediction may be performed for each block divided by a plurality of types of partition types (divided types) defined in the H.264 standard. In this case, the conversion unit 13 illustrated in FIG. 1 predicts each divided block from the results of inter-screen prediction and intra-screen prediction in the search unit 11 for each division type for dividing the macroblock in the reduced image. The motion vector to be performed and the prediction direction may be obtained.

図4は、図1に示した変換部13による動きベクトルの変換例を示す。なお、図4に示す要素のうち、図2に示した要素と同等のものは、同一の符号で示すとともに要素の説明を省略する場合がある。   FIG. 4 shows an example of motion vector conversion by the conversion unit 13 shown in FIG. Note that among the elements shown in FIG. 4, elements equivalent to those shown in FIG. 2 are denoted by the same reference numerals and description of the elements may be omitted.

図4(A)は、図1に示した探索部11により、図2(A)に示したマクロブロックMB11,MB12,MB21,MB22のそれぞれについて得られた動きベクトルの例を示す。また、図4(B)は、図4(A)に示したマクロブロックMB11〜MB22のそれぞれについて得られた動きベクトルに基づいて、図1に示した変換部13により、縮小画像のマクロブロックmb11の動きベクトルとして予想されるベクトルの例を示す。   FIG. 4A shows an example of motion vectors obtained for each of the macroblocks MB11, MB12, MB21, and MB22 shown in FIG. 2A by the search unit 11 shown in FIG. Also, FIG. 4B shows a reduced image macroblock mb11 by the conversion unit 13 shown in FIG. 1 based on the motion vectors obtained for each of the macroblocks MB11 to MB22 shown in FIG. The example of the vector estimated as a motion vector of is shown.

図4(A)に示した実線の矢印Vp11及び破線の矢印Vf11のそれぞれは、マクロブロックMB11について、例えば、撮影順で一つ前の画像と一つ後の画像とのそれぞれを参照画像とする画面間予測で求められた動きベクトルである。同様に、図4(A)に示した実線の矢印Vp12及び破線の矢印Vf12のそれぞれは、マクロブロックMB12について、撮影順で一つ前の画像と一つ後の画像とをそれぞれ前側参照画像及び後側参照画像として用いた画面間予測で求められた動きベクトルである。また、図4(A)に示した実線の矢印Vp21及び破線の矢印Vf21のそれぞれは、マクロブロックMB21について、撮影順で一つ前の画像と一つ後の画像とをそれぞれ前側参照画像及び後側参照画像として用いた画面間予測で求められた動きベクトルである。そして、図4(A)に示した実線の矢印Vp22及び破線の矢印Vf22のそれぞれは、マクロブロックMB22について、撮影順で一つ前の画像と一つ後の画像とをそれぞれ前側参照画像及び後側参照画像として用いた画面間予測で求められた動きベクトルである。   Each of the solid-line arrow Vp11 and the broken-line arrow Vf11 shown in FIG. 4A indicates, for example, each of the previous image and the next image in the shooting order for the macroblock MB11. This is a motion vector obtained by inter-screen prediction. Similarly, each of the solid-line arrow Vp12 and the broken-line arrow Vf12 shown in FIG. 4A indicates the previous reference image and the next image in the shooting order for the macroblock MB12, respectively. It is a motion vector calculated | required by the inter-screen prediction used as a back side reference image. Also, each of the solid-line arrow Vp21 and the broken-line arrow Vf21 shown in FIG. 4A indicates the front reference image and the rear image for the macroblock MB21, respectively, one image before and one image in the shooting order. This is a motion vector obtained by inter-screen prediction used as a side reference image. The solid line arrow Vp22 and the broken line arrow Vf22 shown in FIG. 4 (A) respectively indicate the previous reference image and the subsequent image for the macroblock MB22 in the shooting order. This is a motion vector obtained by inter-screen prediction used as a side reference image.

また、図4(B)に示した矩形Typ1,Typ2,Typ3,Typ4のそれぞれは、各分割タイプで分割されたマクロブロックmb11を示す。なお、図4(B)の例では、マクロブロックmb11を分割しない場合を分割タイプTyp1として示し、横方向に2分割する場合を分割タイプTyp2として示している。また、図4(B)の例では、マクロブロックmb11を縦方向に2分割する場合を分割タイプTyp3として示し、縦方向及び横方向にそれぞれ2分割する場合を分割タイプTyp4として示している。   Each of the rectangles Typ1, Typ2, Typ3, and Typ4 illustrated in FIG. 4B indicates a macroblock mb11 that is divided according to each division type. In the example of FIG. 4B, the case where the macroblock mb11 is not divided is shown as a division type Typ1, and the case where it is divided into two in the horizontal direction is shown as a division type Typ2. In the example of FIG. 4B, a case where the macroblock mb11 is divided into two in the vertical direction is shown as a division type Typ3, and a case where the macroblock mb11 is divided into two in the vertical direction and the horizontal direction is shown as a division type Typ4.

そして、図4(B)において実線で示した矢印Vpc11,Vpc12,Vpc21,Vpc22のそれぞれは、図4(A)に示した縮小前の動きベクトルVp11,Vp12,Vp21,Vp22のそれぞれを縮小したベクトルを示す。同様に、図4(B)において実線で示した矢印Vfc11,Vfc12,Vfc21,Vfc22のそれぞれは、図4(A)に示した縮小前の動きベクトルVf11,Vf12,Vf21,Vf22のそれぞれを縮小したベクトルを示す。   The arrows Vpc11, Vpc12, Vpc21, and Vpc22 indicated by solid lines in FIG. 4B are vectors obtained by reducing the respective motion vectors Vp11, Vp12, Vp21, and Vp22 before reduction shown in FIG. Indicates. Similarly, arrows Vfc11, Vfc12, Vfc21, and Vfc22 indicated by solid lines in FIG. 4B reduce the respective motion vectors Vf11, Vf12, Vf21, and Vf22 before reduction shown in FIG. Indicates a vector.

図4(B)の例は、図2の例と同様に、変換部13により、各分割タイプで分割されたブロックの動きベクトルを、当該ブロックに対応付けられる縮小前のマクロブロックのうち、左上に位置するマクロブロックの動きベクトルに基づいて決定する場合を示す。例えば、図4(B)に分割タイプTyp1として示した縮小画像のマクロブロックmb11の動きベクトルVpc11,Vfc11は、変換部13により、動きベクトルVp11,Vf11のそれぞれを縮小することで得られている。同様に、図4(B)にて、分割タイプTyp2でマクロブロックmb11を分割した場合の上側のブロックの動きベクトルVpc11,Vfc11は、変換部13により、動きベクトルVp11,Vf11のそれぞれを縮小することで得られている。一方、図4(B)にて、分割タイプTyp2でマクロブロックmb11を分割した場合の下側のブロックの動きベクトルVpc21,Vfc21は、変換部13により、動きベクトルVp21,Vf21のそれぞれを縮小することで得られている。また、図4(B)で、分割タイプTyp3でマクロブロックmb11を分割した場合の左側のブロックの動きベクトルVpc11,Vfc11は、変換部13により、動きベクトルVp11,Vf11のそれぞれを縮小することで求められる。一方、図4(B)で、分割タイプTyp3でマクロブロックmb11を分割した場合の右側のブロックの動きベクトルVpc12,Vfc12は、変換部13により、動きベクトルVp12,Vf12のそれぞれを縮小することで求められる。そして、図4(B)で、分割タイプTyp4でマクロブロックmb11を分割した場合の左上のブロックの動きベクトルVpc11,Vfc11は、変換部13により、動きベクトルVp11,Vf11のそれぞれを縮小することで求められる。また、図4(B)で、分割タイプTyp4でマクロブロックmb11を分割した場合の右上のブロックの動きベクトルVpc12,Vfc12は、変換部13により、動きベクトルVp12,Vf12のそれぞれを縮小することで求められる。また、図4(B)で、分割タイプTyp4でマクロブロックmb11を分割した場合の左下のブロックの動きベクトルVpc21,Vfc21は、変換部13により、動きベクトルVp21,Vf21のそれぞれを縮小することで求められる。そして、図4(B)で、分割タイプTyp4でマクロブロックmb11を分割した場合の右下のブロックの動きベクトルVpc22,Vfc22は、変換部13により、動きベクトルVp22,Vf22のそれぞれを縮小することで求められる。   In the example of FIG. 4B, as in the example of FIG. 2, the motion vector of the block divided by each division type by the conversion unit 13 is displayed in the upper left of the macroblocks before reduction associated with the block. The case where it determines based on the motion vector of the macroblock located in is shown. For example, the motion vectors Vpc11 and Vfc11 of the macroblock mb11 of the reduced image shown as the division type Typ1 in FIG. 4B are obtained by reducing each of the motion vectors Vp11 and Vf11 by the conversion unit 13. Similarly, in FIG. 4B, when the macroblock mb11 is divided by the division type Typ2, the motion vectors Vpc11 and Vfc11 of the upper block when the macroblock mb11 is divided are reduced by the conversion unit 13 respectively. Is obtained. On the other hand, in FIG. 4B, when the macroblock mb11 is divided by the division type Typ2, the motion vectors Vpc21 and Vfc21 of the lower block when the macroblock mb11 is divided are reduced by the conversion unit 13, respectively. Is obtained. Also, in FIG. 4B, the motion vectors Vpc11 and Vfc11 of the left block when the macroblock mb11 is divided by the division type Typ3 are obtained by reducing the motion vectors Vp11 and Vf11 by the conversion unit 13, respectively. It is done. On the other hand, in FIG. 4B, the motion vectors Vpc12 and Vfc12 of the right block when the macroblock mb11 is divided by the division type Typ3 are obtained by reducing each of the motion vectors Vp12 and Vf12 by the conversion unit 13. It is done. 4B, the motion vectors Vpc11 and Vfc11 of the upper left block when the macro block mb11 is divided by the division type Typ4 are obtained by reducing the motion vectors Vp11 and Vf11 by the conversion unit 13, respectively. It is done. In FIG. 4B, the motion vectors Vpc12 and Vfc12 of the upper right block when the macro block mb11 is divided by the division type Typ4 are obtained by reducing each of the motion vectors Vp12 and Vf12 by the conversion unit 13. It is done. In FIG. 4B, the motion vectors Vpc21 and Vfc21 of the lower left block when the macroblock mb11 is divided by the division type Typ4 are obtained by reducing each of the motion vectors Vp21 and Vf21 by the conversion unit 13. It is done. In FIG. 4B, the motion vector Vpc22, Vfc22 of the lower right block when the macroblock mb11 is divided by the division type Typ4 is reduced by the conversion unit 13 by reducing the motion vectors Vp22, Vf22, respectively. Desired.

また、変換部13は、図2で説明したようにして、図4(B)に示した各分割タイプTyp1〜Typ4でマクロブロックmb11を分割した各ブロックについて求めた動きベクトルで示される予測画像と各ブロックとの予測誤差の総和を第2コストとして求める。図4を用いて説明したようにして、変換部13は、分割タイプが異なる画面間予測モード毎に、縮小画像の各マクロブロックについての第2コストを求めることができる。   Further, as described with reference to FIG. 2, the conversion unit 13 performs the prediction image indicated by the motion vector obtained for each block obtained by dividing the macroblock mb11 with each of the division types Typ1 to Typ4 illustrated in FIG. The sum of prediction errors with each block is obtained as the second cost. As described with reference to FIG. 4, the conversion unit 13 can obtain the second cost for each macroblock of the reduced image for each inter-screen prediction mode having a different division type.

図5は、図1に示した変換部13による予測方向の変換例を示す。なお、図5に示す要素のうち、図2及び図4に示した要素と同等のものは、同一の符号で示すとともに要素の説明を省略する場合がある。   FIG. 5 shows a conversion example of the prediction direction by the conversion unit 13 shown in FIG. Note that among the elements shown in FIG. 5, elements equivalent to those shown in FIGS. 2 and 4 are denoted by the same reference numerals and description of the elements may be omitted.

図5(A)は、図1に示した探索部11により、図2(A)に示したマクロブロックMB11,MB12,MB21,MB22のそれぞれについて画面内予測を行うことで得られた予測方向の例を示す。また、図5(B)は、図5(A)に示したマクロブロックMB11〜MB22のそれぞれについて得られた予測方向に基づいて、図1に示した変換部13により、縮小画像のマクロブロックmb11の予測方向として予想される方向の例を示す。   FIG. 5A shows a prediction direction obtained by performing intra prediction for each of the macroblocks MB11, MB12, MB21, and MB22 shown in FIG. 2A by the search unit 11 shown in FIG. An example is shown. FIG. 5B shows a reduced image macroblock mb11 by the conversion unit 13 shown in FIG. 1 based on the prediction directions obtained for each of the macroblocks MB11 to MB22 shown in FIG. An example of a predicted direction as the predicted direction is shown.

図5(A)に示した破線の矢印Vr11、Vr12,Vr21,Vr22のそれぞれは、探索部11によるマクロブロックMB11、MB12,MB21,MB22のそれぞれについての画面内予測で他の方向よりも予測誤差が少ないとされた予測方向を示す。探索部11により、H.264規格で規定された画面内予測が行われる場合に、予測方向Vr11、Vr12,Vr21,Vr22のそれぞれは、H.264規格で規定された9つの方向の一つとなる。   The broken arrows Vr11, Vr12, Vr21, and Vr22 shown in FIG. 5A indicate prediction errors in the intra prediction for each of the macroblocks MB11, MB12, MB21, and MB22 by the search unit 11 as compared with other directions. This indicates the prediction direction in which there are few. By the search unit 11, When the intra prediction specified in the H.264 standard is performed, each of the prediction directions Vr11, Vr12, Vr21, and Vr22 is H.264. One of nine directions defined by the H.264 standard.

図5(B)の例は、各分割タイプでマクロブロックmb11を分割して得られるブロックの予測方向を、当該ブロックに対応付けられる縮小前のマクロブロックのうち、左上に位置するマクロブロックについて得られた予測方向とする場合を示している。   In the example of FIG. 5B, the prediction direction of the block obtained by dividing the macroblock mb11 by each division type is obtained for the macroblock located at the upper left among the macroblocks before reduction associated with the block. In this case, the predicted direction is set.

例えば、図5(B)に分割タイプTyp1として示した例で、変換部13により、マクロブロックmb11の予測方向として得られる方向は、図5(A)に示したマクロブロックMB11について得られた予測方向Vr11となる。同様に、図5(B)にて分割タイプTyp2でマクロブロックmb11を分割した場合の上側のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB11について得られた予測方向Vr11となる。一方、図5(B)にて分割タイプTyp2でマクロブロックmb11を分割した場合の下側のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB21について得られた予測方向Vr21となる。また、図5(B)にて分割タイプTyp3でマクロブロックmb11を分割した場合の左側のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB11について得られた予測方向Vr11となる。一方、図5(B)にて分割タイプTyp3でマクロブロックmb11を分割した場合の右側のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB12について得られた予測方向Vr12となる。そして、図5(B)にて分割タイプTyp4でマクロブロックmb11を分割した場合の左上のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB11について得られた予測方向Vr11となる。また、図5(B)にて分割タイプTyp4でマクロブロックmb11を分割した場合の右上のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB12について得られた予測方向Vr12となる。また、図5(B)にて分割タイプTyp4でマクロブロックmb11を分割した場合の左下のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB21について得られた予測方向Vr21となる。そして、図5(B)にて分割タイプTyp4でマクロブロックmb11を分割した場合の右下のブロックについて、変換部13により予測方向として得られる方向は、図5(A)に示したマクロブロックMB22について得られた予測方向Vr22となる。   For example, in the example shown as the division type Typ1 in FIG. 5B, the direction obtained as the prediction direction of the macroblock mb11 by the conversion unit 13 is the prediction obtained for the macroblock MB11 shown in FIG. The direction is Vr11. Similarly, for the upper block when the macroblock mb11 is divided by the division type Typ2 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macroblock MB11 shown in FIG. 5A. Is the predicted direction Vr11 obtained for. On the other hand, for the lower block when the macroblock mb11 is divided by the division type Typ2 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macroblock MB21 shown in FIG. Is the predicted direction Vr21 obtained for. Further, for the left block when the macroblock mb11 is divided by the division type Typ3 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macroblock MB11 shown in FIG. The obtained prediction direction Vr11. On the other hand, for the right block when the macroblock mb11 is divided by the division type Typ3 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macroblock MB12 shown in FIG. The obtained prediction direction Vr12 is obtained. Then, for the upper left block when the macroblock mb11 is divided with the division type Typ4 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macroblock MB11 shown in FIG. The obtained prediction direction Vr11. Further, for the upper right block when the macro block mb11 is divided by the division type Typ4 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macro block MB12 shown in FIG. The obtained prediction direction Vr12 is obtained. Further, for the lower left block when the macroblock mb11 is divided by the division type Typ4 in FIG. 5B, the direction obtained as the prediction direction by the conversion unit 13 is the macroblock MB21 shown in FIG. The obtained prediction direction Vr21 is obtained. The direction obtained as the prediction direction by the conversion unit 13 for the lower right block when the macroblock mb11 is divided by the division type Typ4 in FIG. 5B is the macroblock MB22 shown in FIG. 5A. Is the predicted direction Vr22 obtained for.

また、変換部13は、図5(B)に分割タイプTyp1として示したマクロブロックmb11について予想された予測方向Vr11を用いてマクロブロックmb11を画面内符号化した場合に、予想される予測誤差を示す第2コストを次のようにして求める。例えば、変換部13は、マクロブロックMB11〜MB22のそれぞれについて画面内予測を行った際に予測方向Vr11について得た予測誤差を探索部11から受け、受けた予測誤差に縮小率に応じた係数を乗じた上で互いに加算することで第2コストを求める。ここで、マクロブロックMB11〜MB22のそれぞれについて画面内予測を行った際に予測方向Vr11について得た予測誤差は、第1コストの一例である。   Further, the conversion unit 13 calculates an expected prediction error when the macroblock mb11 is intra-coded using the predicted direction Vr11 predicted for the macroblock mb11 shown as the division type Typ1 in FIG. The second cost shown is obtained as follows. For example, the conversion unit 13 receives from the search unit 11 the prediction error obtained for the prediction direction Vr11 when performing intra-screen prediction for each of the macroblocks MB11 to MB22, and applies a coefficient corresponding to the reduction rate to the received prediction error. The second cost is obtained by multiplying and adding each other. Here, the prediction error obtained for the prediction direction Vr11 when the intra-frame prediction is performed for each of the macroblocks MB11 to MB22 is an example of the first cost.

同様にして、変換部13は、マクロブロックmb11を分割タイプTyp2〜Typ4のそれぞれで分割した各ブロックについて予想される予測誤差を求め、求めた予測誤差から、分割タイプTyp2〜Typ4のそれぞれでの第2コストを求めることができる。即ち、変換部13は、分割タイプが異なる画面内符号化モード毎に、縮小前のマクロブロックについて得られた第1コストから、縮小画像の各マクロブロックについての第2コストを求めることができる。   Similarly, the conversion unit 13 obtains an expected prediction error for each block obtained by dividing the macroblock mb11 by each of the division types Typ2 to Typ4, and from the obtained prediction error, the conversion unit 13 obtains a prediction error for each division type Typ2 to Typ4. 2 costs can be determined. That is, the conversion unit 13 can determine the second cost for each macroblock of the reduced image from the first cost obtained for the macroblock before reduction for each intra-screen coding mode with different division types.

図4及び図5で説明したように、図1に示した変換部13は、例えば、H.264規格で規定された分割タイプのそれぞれで縮小画像のマクロブロックを分割して画面間予測及び画面内予測を行った場合について、それぞれ第2コストを求めることができる。即ち、変換部13は、画面間予測と画面内予測とから選択される予測手法と選択された予測手法で用いられる分割タイプとの組み合わせで示される複数のモード毎に、当該モードでの予測誤差を示す第2コストを求めることができる。   As described with reference to FIGS. 4 and 5, the conversion unit 13 illustrated in FIG. The second cost can be obtained for each case where the macroblock of the reduced image is divided by each of the division types defined in the H.264 standard and the inter-screen prediction and the intra-screen prediction are performed. That is, the conversion unit 13 predicts a prediction error in each mode for each of a plurality of modes indicated by a combination of a prediction method selected from inter-screen prediction and intra-screen prediction and a division type used in the selected prediction method. 2nd cost which shows can be calculated | required.

そして、複数のモードの何れかについて求められた第2コストが第1閾値以下である場合に、制御部14は、第2コストが第1閾値以下とされたモードについて得られた動きベクトルあるいは予測方向を用いた符号化処理を符号化部12に実行させてもよい。これにより、符号化部12において、例えば、H.264規格に従う符号化処理を行う場合にも、符号化データから再生される動画像の画質を維持しつつ、符号化処理にかかる時間の短縮を図ることができる。   And when the 2nd cost calculated | required about any of several modes is below a 1st threshold value, the control part 14 is a motion vector or prediction obtained about the mode by which the 2nd cost was below the 1st threshold value. You may make the encoding part 12 perform the encoding process using a direction. Thereby, in the encoding part 12, for example, H.264. Even when encoding processing conforming to the H.264 standard is performed, the time required for encoding processing can be shortened while maintaining the quality of a moving image reproduced from encoded data.

ところで、例えばH.264規格に従った符号化処理によって動画像を符号化した際に得られる各モードの符号化データの量と、変換部13により各モードについて求められる第2コストとの間には大まかな相関関係がある。なぜなら、最終的な符号化データの量は、予測誤差を直交変換した係数を量子化することで得られる情報量と、動きベクトルや予測方向を示す情報をエントロピー符号化することで得られる情報量との和であり、前者の情報量は後者に比べて大きいからである。しかしながら、複数のモードのそれぞれについて求められた第2コストの差が小さい場合には、動きベクトルなどの情報をエントロピー符号化することで得られる情報量の大きさにより、最終的な符号化データの量を最小とするモードが逆転してしまう可能性がある。   By the way, for example, H.H. A rough correlation between the amount of encoded data of each mode obtained when encoding a moving image by encoding processing according to the H.264 standard and the second cost obtained for each mode by the conversion unit 13 There is. This is because the amount of final encoded data is the amount of information obtained by quantizing the coefficient obtained by orthogonally transforming the prediction error, and the amount of information obtained by entropy coding the information indicating the motion vector and the prediction direction. This is because the amount of information of the former is larger than that of the latter. However, when the difference in the second cost obtained for each of the plurality of modes is small, the final encoded data of the final encoded data depends on the amount of information obtained by entropy encoding information such as motion vectors. The mode that minimizes the amount may be reversed.

図6及び図7では、最終的な符号化データの量が複数のモード間で逆転する可能性を考慮して、トランスコードによって得られる動きベクトルあるいは予測方向を採用するか否かを判断する手法が説明される。   6 and 7, a method for determining whether to adopt a motion vector or a prediction direction obtained by transcoding in consideration of the possibility that the final amount of encoded data is reversed between a plurality of modes. Is explained.

図6は、符号化装置の別実施形態を示す。なお、図6に示す構成要素のうち、図1に示した構成要素と同等のものは、同一の符号で示すとともに構成要素の説明を省略する場合がある。   FIG. 6 shows another embodiment of the encoding device. 6 that are equivalent to the components shown in FIG. 1 are denoted by the same reference numerals and description of the components may be omitted.

図6に示した符号化装置10aは、探索部11aと、符号化部12aと、変換部13aと、制御部14aとを含む。探索部11aは、図1に示した探索部11に相当する構成要素であり、動画像データベースDBから符号化処理の対象となる動画像Vinを受ける。同様に、符号化部12aは、図1に示した符号化部12に相当する構成要素であり、動画像データベースDBから符号化処理の対象となる動画像Vinを受ける。また、符号化部12aは、制御部14aからの指示に従って、受けた動画像Vinから、画面サイズやフレームレートなどが異なるn種類の符号化条件のそれぞれで再生可能な符号化データC1〜Cnを生成する。そして、符号化部12aで生成された符号化データC1〜Cnは、配信装置DTを介して、例えば、図1に示した端末装置UE1〜UE4などに配信される。   The encoding apparatus 10a illustrated in FIG. 6 includes a search unit 11a, an encoding unit 12a, a conversion unit 13a, and a control unit 14a. The search unit 11a is a component corresponding to the search unit 11 illustrated in FIG. 1 and receives a moving image Vin to be encoded from the moving image database DB. Similarly, the encoding unit 12a is a component corresponding to the encoding unit 12 illustrated in FIG. 1, and receives a moving image Vin to be encoded from the moving image database DB. In addition, the encoding unit 12a, according to an instruction from the control unit 14a, generates encoded data C1 to Cn that can be reproduced from the received moving image Vin under n types of encoding conditions having different screen sizes, frame rates, and the like. Generate. The encoded data C1 to Cn generated by the encoding unit 12a is distributed to, for example, the terminal devices UE1 to UE4 illustrated in FIG. 1 via the distribution device DT.

探索部11aは、例えば、H.264規格などに従って、図4及び図5で説明したモードごとに、動画像Vinに含まれる各画像における各マクロブロックの動きベクトルあるいは予測方向を示す第1情報と、予測誤差を示す第1コストとを求める。探索部11aによってモード毎に求められた第1情報及び第1コストは、変換部13aに渡される。   The search unit 11a is, for example, H.264. In accordance with the H.264 standard or the like, for each mode described in FIGS. 4 and 5, first information indicating the motion vector or prediction direction of each macroblock in each image included in the moving image Vin, and a first cost indicating a prediction error, Ask for. The first information and the first cost obtained for each mode by the search unit 11a are passed to the conversion unit 13a.

変換部13aは、図1に示した変換部13に相当する構成要素である。変換部13aは、探索部11aから受けた第1情報に基づいて、n種類の符号化条件のそれぞれに従ってサイズ等が変換された画像におけるマクロブロック毎に、図4及び図5で説明した各モードで予想される動きベクトルまたは予測方向を示す第2情報を求める。また、変換部13aは、変換部13aは、探索部11aから受けた第1コストに基づいて、各符号化条件に従ってサイズ等が変換された画像におけるマクロブロック毎に、図4及び図5で説明した各モードで予想される予測誤差を示す第2コストを求める。   The conversion unit 13a is a component corresponding to the conversion unit 13 illustrated in FIG. Based on the first information received from the search unit 11a, the conversion unit 13a performs each mode described in FIG. 4 and FIG. 5 for each macroblock in the image in which the size and the like are converted according to each of the n types of encoding conditions. To obtain second information indicating a motion vector or a prediction direction expected in step (b). Further, the conversion unit 13a is described in FIG. 4 and FIG. 5 for each macroblock in the image whose size and the like are converted according to each encoding condition based on the first cost received from the search unit 11a. The second cost indicating the prediction error expected in each mode is obtained.

図6に示した制御部14aは、図1に示した制御部14に相当する構成要素であり、選択部141と抑止部142とを含む。   The control unit 14 a illustrated in FIG. 6 is a component corresponding to the control unit 14 illustrated in FIG. 1, and includes a selection unit 141 and a suppression unit 142.

選択部141は、例えば、各符号化条件に対応して予め設定された第1閾値(Th1)を配信装置DTから受ける。また、選択部141は、受けた第1閾値Th1のそれぞれと、同じ符号化条件に従ってサイズ等が変換された画像のマクロブロックについて変換部13aによりモード毎に求められた第2コストとを比較する。例えば、選択部141は、スマートホンなどである端末装置UE3の画面サイズ等に応じて設定された第1閾値Th1と、端末装置UE3の画面サイズ等に縮小された縮小画像のマクロブロックについて求められた各モードの第2コストとを比較する。そして、選択部141は、何れかのモードについて変換部13aで求められた第2コストが第1閾値Th1以下である場合に、第2コストが第1閾値Th1以下とされたモードで求められた動きベクトル又は予測方向を示す第2情報を選択する。例えば、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた第2コストのそれぞれが第1閾値Th1以下である場合に、選択部141は、2つのモードのそれぞれでの動きベクトルを示す第2情報を選択する。選択部141によって選択された第2情報は、対応する第2コストとともに抑止部142に渡される。   For example, the selection unit 141 receives a first threshold (Th1) set in advance corresponding to each encoding condition from the distribution device DT. In addition, the selection unit 141 compares each received first threshold Th1 with the second cost obtained for each mode by the conversion unit 13a for the macroblock of the image whose size or the like is converted according to the same encoding condition. . For example, the selection unit 141 is obtained for the first threshold Th1 set according to the screen size of the terminal device UE3 such as a smart phone, and the macroblock of the reduced image reduced to the screen size of the terminal device UE3. The second cost of each mode is compared. Then, when the second cost obtained by the conversion unit 13a for any mode is equal to or less than the first threshold Th1, the selection unit 141 is obtained in the mode in which the second cost is equal to or less than the first threshold Th1. The second information indicating the motion vector or the prediction direction is selected. For example, when each of the second costs obtained by the conversion unit 13a for the modes in which inter-screen prediction is performed for each of the division types Typ1 and Typ4 is equal to or less than the first threshold Th1, the selection unit 141 may The second information indicating the motion vector at is selected. The second information selected by the selection unit 141 is passed to the suppression unit 142 together with the corresponding second cost.

抑止部142は、符号化条件毎に設定された第1閾値を用いた選択で、少なくとも一つの第2情報が選択された場合に、変換部13で求められた第2コストの中で、他の第2コストよりも小さい2つの第2コストの差を求める。例えば、選択部141により、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて求められた第2情報が選択された場合に、選択された2つのモードに対応して求められた第2コストは他の第2コストよりも小さい2つの第2コストとなる。この場合に、抑止部142は、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて求められた2つの第2コストの差を求める。そして、抑止部142は、求めた第2コストの差が、予め設定された第2閾値(Th2)よりも大きい場合に、選択部141によって選択された第2情報を符号化部12aに渡す。この場合に、符号化部12aにより、第2情報で示される動きベクトル又は予測方向を用いた符号化処理が実行される。一方、求めた第2コストの差が第2閾値Th2以下である場合に、抑止部142は、例えば、選択部141で選択された第2情報を符号化部12aに渡さずに廃棄することで、符号化部12aによる利用を抑止する。   In the second cost obtained by the conversion unit 13, when the suppression unit 142 selects at least one second information by using the first threshold set for each encoding condition, A difference between two second costs smaller than the second cost is obtained. For example, when the selection unit 141 selects the second information obtained for the mode in which inter-screen prediction is performed for each of the division types Typ1 and Typ4, the second information obtained corresponding to the two selected modes is selected. The cost is two second costs that are smaller than the other second costs. In this case, the suppression unit 142 obtains the difference between the two second costs obtained for the modes in which inter-screen prediction is performed for each of the division types Typ1 and Typ4. And the suppression part 142 passes the 2nd information selected by the selection part 141 to the encoding part 12a, when the difference of the calculated | required 2nd cost is larger than the 2nd threshold value (Th2) preset. In this case, the encoding unit 12a performs an encoding process using the motion vector or the prediction direction indicated by the second information. On the other hand, when the obtained second cost difference is equal to or smaller than the second threshold Th2, the suppression unit 142 discards the second information selected by the selection unit 141 without passing it to the encoding unit 12a, for example. The use by the encoding unit 12a is suppressed.

抑止部142において用いられる第2閾値Th2は、例えば、動きベクトルや予測方向を示す情報をエントロピー符号化した場合に得られる符号量のばらつき程度の値に予め設定されることが望ましい。また、予め設定された第2閾値Th2は、制御部14aに含まれるメモリなどの記憶部に保持されていてもよい。   For example, the second threshold Th2 used in the suppression unit 142 is preferably set in advance to a value of the degree of variation in the code amount obtained when entropy coding is performed on information indicating a motion vector or a prediction direction. The preset second threshold Th2 may be held in a storage unit such as a memory included in the control unit 14a.

図7は、図6に示した抑止部142で第2閾値Th2と比較される第2コストの差の例を示す。図7(A)は、図6に示した選択部141によって選択された2つのモードに対応する第2コストの差が第2閾値Th2よりも大きい場合を示す。また、図7(B)は、図6に示した選択部141によって選択された2つのモードに対応する第2コストの差が第2閾値Th2以下である場合を示す。なお、図7(A),(B)に示した棒グラフにおいて、横軸mdは、選択部141によって第2情報が選択されたモードを示し、縦軸Ctは、選択されたモードについて変換部13aで求められた第2コストの大きさを示す。   FIG. 7 shows an example of the difference in the second cost compared with the second threshold Th2 by the suppression unit 142 shown in FIG. FIG. 7A shows a case where the difference between the second costs corresponding to the two modes selected by the selection unit 141 shown in FIG. 6 is larger than the second threshold Th2. FIG. 7B illustrates a case where the difference between the second costs corresponding to the two modes selected by the selection unit 141 illustrated in FIG. 6 is equal to or less than the second threshold Th2. In the bar graphs shown in FIGS. 7A and 7B, the horizontal axis md indicates the mode in which the second information is selected by the selection unit 141, and the vertical axis Ct indicates the conversion unit 13a for the selected mode. The size of the second cost obtained in the above is shown.

図7(A)に示した白色の矩形Cpa1,Cpa4のそれぞれは、例えば、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた第2コストの例を示す。また、図7(A)に示した網掛けされた矩形Cta1,Cta4のそれぞれは、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた動きベクトルを用いた符号化によって生成される符号量の例を示す。なお、図7(A)において、矢印dは、分割タイプTyp1で画面間予測を行うモードの第2コストCpa1と分割タイプTyp4で画面間予測を行うモードの第2コストCpa4との差を示す。   Each of the white rectangles Cpa1 and Cpa4 illustrated in FIG. 7A represents an example of the second cost obtained by the conversion unit 13a for the mode in which inter-screen prediction is performed with each of the division types Typ1 and Typ4, for example. Each of the shaded rectangles Cta1 and Cta4 shown in FIG. 7A is a code using the motion vector obtained by the conversion unit 13a for the mode in which inter-screen prediction is performed with each of the division types Typ1 and Typ4. The example of the code amount produced | generated by digitization is shown. In FIG. 7A, an arrow d indicates a difference between the second cost Cpa1 in the mode in which inter-screen prediction is performed with the division type Typ1 and the second cost Cpa4 in the mode in which inter-screen prediction is performed with the division type Typ4.

符号量Cta1は、分割タイプTyp1で画面間予測を行うモードについて変換部13aで求められた動きベクトルを用いた場合の予測誤差を示す情報の量と、動きベクトル等をエントロピー符号化した情報の量との和で示される。同様に、符号量Cta4は、分割タイプTyp4で画面間予測を行うモードについて変換部13aで求められた動きベクトルを用いた場合の予測誤差を示す情報の量と、動きベクトル等をエントロピー符号化した情報の量との和で示される。   The code amount Cta1 is the amount of information indicating a prediction error when the motion vector obtained by the conversion unit 13a is used for the mode in which inter-screen prediction is performed with the division type Typ1, and the amount of information obtained by entropy encoding the motion vector and the like. It is indicated by the sum of Similarly, the code amount Cta4 is obtained by entropy encoding the amount of information indicating the prediction error when using the motion vector obtained by the conversion unit 13a in the mode in which inter-screen prediction is performed with the division type Typ4, the motion vector, etc. It is shown as the sum of the amount of information.

ここで、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた動きベクトルを用いた場合の予測誤差は、変換部13aにより、同じモードについて求められた第2コストとほぼ同等である。一方、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた動きベクトル等をエントロピー符号化することで得られる符号化情報の量は、第2コストの大きさにかかわらず、所定の範囲で変動する。   Here, the prediction error when the motion vector obtained by the conversion unit 13a is used for the mode in which the inter-screen prediction is performed in each of the division types Typ1 and Typ4 is the second cost obtained by the conversion unit 13a for the same mode. Is almost equivalent. On the other hand, the amount of encoded information obtained by entropy encoding the motion vector and the like obtained by the conversion unit 13a for the modes in which inter-screen prediction is performed in each of the division types Typ1 and Typ4 is the second cost. Regardless, it varies within a predetermined range.

図7(A)の例では、第2コストCpa1と第2コストCpa4との差dは、符号化された動きベクトル等を示す情報の量のばらつきと同程度に設定された第2閾値Th2よりも大きい。このため、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードでの動きベクトル等を示す符号化情報の量の違いにかかわらず、第2コストCpa1,Cpa4の大小関係は符号量Cta1,Cta4の大小関係において維持されている。   In the example of FIG. 7A, the difference d between the second cost Cpa1 and the second cost Cpa4 is based on the second threshold value Th2 set to the same degree as the variation in the amount of information indicating the encoded motion vector or the like. Is also big. For this reason, the magnitude relationship of the second costs Cpa1, Cpa4 is the code amount Cta1, Cta4 regardless of the difference in the amount of encoded information indicating the motion vector or the like in the inter-frame prediction mode in each of the division types Typ1, Typ4. Is maintained in a large and small relationship.

したがって、選択部141によって選択された2つのモードに対応する第2コストの差が第2閾値Th2よりも大きい場合に、第2コストが他のモードよりも小さいモードは、他のモードを用いた符号化よりも少ない情報量で符号化可能なベストモードを示す。即ち、この場合に、選択部141による選択で得られた第2情報で示される動きベクトル等を用いた符号化処理を符号化部12aに実行させることで、画質の維持と符号化処理の高速化を両立させつつ、更に、生成される符号量を低減できる。   Therefore, when the difference between the second costs corresponding to the two modes selected by the selection unit 141 is larger than the second threshold Th2, the mode in which the second cost is smaller than the other modes uses the other mode. The best mode in which encoding can be performed with a smaller amount of information than encoding is shown. That is, in this case, by causing the encoding unit 12a to execute the encoding process using the motion vector indicated by the second information obtained by the selection by the selection unit 141, the image quality can be maintained and the encoding process can be performed at high speed. In addition, the amount of generated code can be further reduced.

一方、図7(B)に示した白色の矩形Cpb1,Cpb4のそれぞれは、例えば、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた第2コストの別例を示す。また、図7(B)に示した網掛けされた矩形Ctb1,Ctb4のそれぞれは、分割タイプTyp1,Typ4のそれぞれで画面間予測を行うモードについて変換部13aで求められた動きベクトルを用いた符号化によって生成される符号量の別例を示す。なお、図7(B)において、矢印dは、分割タイプTyp1で画面間予測を行うモードの第2コストCpb1と分割タイプTyp4で画面間予測を行うモードの第2コストCpb4との差を示す。   On the other hand, each of the white rectangles Cpb1 and Cpb4 shown in FIG. 7B is another example of the second cost obtained by the conversion unit 13a for the mode in which inter-screen prediction is performed with each of the division types Typ1 and Typ4. Indicates. Also, each of the shaded rectangles Ctb1 and Ctb4 shown in FIG. 7B is a code using the motion vector obtained by the conversion unit 13a for the mode in which inter-screen prediction is performed with each of the division types Typ1 and Typ4. Another example of the code amount generated by the conversion is shown. In FIG. 7B, the arrow d indicates the difference between the second cost Cpb1 in the mode in which inter-screen prediction is performed with the division type Typ1 and the second cost Cpb4 in the mode in which inter-screen prediction is performed with the division type Typ4.

図7(B)の例では、第2コストCpb1と第2コストCpb4との差dは、動きベクトル等をエントロピー符号化した情報の量のばらつきと同程度に設定された第2閾値Th2よりも小さい。このため、分割タイプTyp4を用いたモードの動きベクトル等の符号量が分割タイプTyp1を用いたモードの動きベクトル等の符号量よりも大きい場合に、符号量Ctb4が符号量Ctb1よりも大きくなる場合がある。つまり、複数のモードについて得られた第2コストの差が第2閾値Th2よりも小さい場合には、第2コストが第1閾値以下であっても、第2コストが最小となるモードがベストモードであるとは限らない。したがって、この場合に、図6に示した抑止部142により、選択部141で選択された第2情報を廃棄し、符号化部12aに、動きベクトル等の探索を実行させることで、パラメータを示す符号化情報の量を含めた最終的な符号量を低減することができる。   In the example of FIG. 7B, the difference d between the second cost Cpb1 and the second cost Cpb4 is larger than the second threshold Th2 set to be approximately the same as the variation in the amount of information obtained by entropy encoding motion vectors and the like. small. For this reason, the code amount Ctb4 is larger than the code amount Ctb1 when the code amount such as the motion vector of the mode using the division type Typ4 is larger than the code amount such as the motion vector of the mode using the division type Typ1. There is. That is, when the difference between the second costs obtained for a plurality of modes is smaller than the second threshold Th2, the mode in which the second cost is the smallest is the best mode even if the second cost is equal to or less than the first threshold. Not necessarily. Therefore, in this case, the suppression unit 142 illustrated in FIG. 6 discards the second information selected by the selection unit 141, and causes the encoding unit 12a to perform a search for a motion vector or the like to indicate the parameter. The final code amount including the amount of encoded information can be reduced.

即ち、図6に示した抑止部142を有する制御部14は、動きベクトル等のパラメータを示す符号化情報の量のばらつきを考慮しない場合に比べて、符号化部12aによって生成される符号化データの量を低減することができる。したがって、図6に示した符号化装置10aは、例えば、符号化データの伝送に利用可能な帯域に制限がある場合のように、符号化データの量を抑制することが望まれる用途において有用である。   That is, the control unit 14 having the suppression unit 142 illustrated in FIG. 6 has encoded data generated by the encoding unit 12a as compared to a case where variation in the amount of encoded information indicating parameters such as motion vectors is not considered. The amount of can be reduced. Therefore, the encoding apparatus 10a shown in FIG. 6 is useful in applications where it is desired to suppress the amount of encoded data, for example, when there is a limit to the band that can be used for transmission of encoded data. is there.

図1及び図6に示した本件開示の符号化装置10は、コンピュータ装置等を用いて実現することができる。   The encoding device 10 of the present disclosure shown in FIGS. 1 and 6 can be realized using a computer device or the like.

図8は、図6に示した符号化装置10aのハードウェア構成の一例を示す。なお、図8に示した構成要素のうち、図6に示した構成要素と同等のものについては、同一の符号を付して示し、その説明は省略する。   FIG. 8 illustrates an example of a hardware configuration of the encoding device 10a illustrated in FIG. 8 that are the same as those shown in FIG. 6 are given the same reference numerals, and descriptions thereof are omitted.

コンピュータ装置20は、プロセッサ21と、メモリ22と、ストレージ装置23と、ネットワークインタフェース24と、ビデオインタフェース25と、符号化エンジン26と、光学ドライブ装置27とを含んでいる。図8に示したプロセッサ21と、メモリ22と、ストレージ装置23と、ネットワークインタフェース24と、ビデオインタフェース25と、符号化エンジン26と、光学ドライブ装置27とは、バスを介して互いに接続されている。また、プロセッサ21、メモリ22、ストレージ装置23、ビデオインタフェース25及び符号化エンジン26は、符号化装置10aに含まれる。一方、プロセッサ21、メモリ22、ストレージ装置23及びネットワークインタフェース24は、配信装置DTに含まれる。即ち、図8に示した例は、符号化装置10aと配信装置DTとを一つの装置とした場合のハードウェア構成を示す。   The computer device 20 includes a processor 21, a memory 22, a storage device 23, a network interface 24, a video interface 25, an encoding engine 26, and an optical drive device 27. The processor 21, memory 22, storage device 23, network interface 24, video interface 25, encoding engine 26, and optical drive device 27 shown in FIG. 8 are connected to each other via a bus. . Further, the processor 21, the memory 22, the storage device 23, the video interface 25, and the encoding engine 26 are included in the encoding device 10a. On the other hand, the processor 21, the memory 22, the storage device 23, and the network interface 24 are included in the distribution device DT. That is, the example illustrated in FIG. 8 illustrates a hardware configuration in the case where the encoding device 10a and the distribution device DT are one device.

図8に示したコンピュータ装置20は、ネットワークインタフェース24を介してインターネットなどのネットワークNWに接続されており、ネットワークNWに接続されたサーバ装置SV及び端末装置UEとの間で情報の授受が可能である。   The computer apparatus 20 shown in FIG. 8 is connected to a network NW such as the Internet via a network interface 24, and information can be exchanged between the server apparatus SV and the terminal apparatus UE connected to the network NW. is there.

また、図8に示したビデオインタフェース25は、例えば、ビデオカメラCAMに接続されており、ビデオカメラCAMで撮影された動画像を、符号化装置10aによる符号化の対象となる動画像Vinとして取得する。   The video interface 25 shown in FIG. 8 is connected to, for example, the video camera CAM, and acquires a moving image shot by the video camera CAM as a moving image Vin to be encoded by the encoding device 10a. To do.

符号化エンジン26は、図6に示した探索部11a及び符号化部12aに相当する構成要素である。符号化エンジン26は、プロセッサ21からの指示に応じて、例えば、H.264規格等に従って動画像Vinを符号化するための処理として、画面間予測による動きベクトルの探索及び画面内予測による予測方向の探索を含む処理を実行する。なお、図6に示した探索部11a及び符号化部12aの機能は、プロセッサ21がプログラムを実行することで実現されてもよい。   The encoding engine 26 is a component corresponding to the search unit 11a and the encoding unit 12a illustrated in FIG. In response to an instruction from the processor 21, the encoding engine 26 is, for example, H.264. As a process for encoding the moving image Vin in accordance with the H.264 standard or the like, a process including a motion vector search by inter-screen prediction and a prediction direction search by intra-screen prediction is executed. Note that the functions of the search unit 11a and the encoding unit 12a illustrated in FIG. 6 may be realized by the processor 21 executing a program.

また、図8に示した光学ドライブ装置27は、光ディスクなどのリムーバブルディスク28を装着可能であり、装着したリムーバブルディスク28に記録された情報の読出および記録を行う。   Further, the optical drive device 27 shown in FIG. 8 can be mounted with a removable disk 28 such as an optical disk, and reads and records information recorded on the mounted removable disk 28.

図8に示したメモリ22は、コンピュータ装置20のオペレーティングシステムとともに、プロセッサ21が、後述する図9に示す符号化処理を実行するためのアプリケーションプログラムを格納している。なお、図9に示す符号化処理を実行するためのアプリケーションプログラムは、例えば、光ディスクなどのリムーバブルディスク28に記録して頒布することができる。そして、リムーバブルディスク28を光学ドライブ装置27に装着して読み込み処理を行うことにより、符号化処理を実行するためのアプリケーションプログラムを、メモリ22およびストレージ装置23に格納させてもよい。また、ネットワークインタフェース24を介して、符号化処理を実行するためのアプリケーションプログラムをダウンロードし、ダウンロードしたアプリケーションプログラムをメモリ22およびストレージ装置23に読み込ませてもよい。   The memory 22 illustrated in FIG. 8 stores an application program for the processor 21 to execute an encoding process illustrated in FIG. Note that the application program for executing the encoding process shown in FIG. 9 can be recorded and distributed on a removable disk 28 such as an optical disk, for example. Then, the application program for executing the encoding process may be stored in the memory 22 and the storage device 23 by attaching the removable disk 28 to the optical drive device 27 and performing the reading process. Alternatively, an application program for executing the encoding process may be downloaded via the network interface 24, and the downloaded application program may be read into the memory 22 and the storage device 23.

そして、プロセッサ21は、メモリ22に格納されたアプリケーションプログラムを実行することにより、図6に示した変換部13a及び制御部14aの機能を果たす。   Then, the processor 21 performs the functions of the conversion unit 13a and the control unit 14a illustrated in FIG. 6 by executing the application program stored in the memory 22.

つまり、図6に示した符号化装置10aは、例えば、図8に示したコンピュータ装置20に含まれるプロセッサ21とメモリ22とストレージ装置23とビデオインタフェース25と符号化エンジン26との協働によって実現することができる。   That is, the encoding device 10a illustrated in FIG. 6 is realized by the cooperation of the processor 21, the memory 22, the storage device 23, the video interface 25, and the encoding engine 26 included in the computer device 20 illustrated in FIG. can do.

図9は、図8に示した符号化装置10aの動作を示す。図9に示したステップS311〜ステップS322の各処理は、符号化処理のためのアプリケーションプログラムに含まれる処理の一例である。また、ステップS311〜ステップS322の各処理は、図8に示したプロセッサ21及びプロセッサ21からの指示に応じて動作する符号化エンジン26によって実行される。   FIG. 9 shows the operation of the encoding device 10a shown in FIG. Each process of step S311 to step S322 illustrated in FIG. 9 is an example of a process included in the application program for the encoding process. In addition, each process of step S311 to step S322 is executed by the processor 21 shown in FIG. 8 and the encoding engine 26 that operates according to an instruction from the processor 21.

ステップS311において、プロセッサ21は、ビデオインタフェース25から受けた動画像Vinを符号化エンジン26に渡し、動画像Vinの各画像におけるマクロブロック毎に、図4、図5で説明した各モードの画面間予測及び画面内予測処理を実行させる。プロセッサ21は、例えば、ビデオインタフェース25を介してビデオカメラCAMから1以上のGOP(Group of Picture)を受ける毎に、ステップS311の処理を実行する。プロセッサ21は、ステップS311の処理の過程において、符号化エンジン26で画面間予測処理を行うことで得られた各モードの動きベクトル及び予測誤差を示す情報を、例えば、ストレージ装置23に蓄積し、以降の処理で利用してもよい。同様に、プロセッサ21は、符号化エンジン26で画面内予測処理を行うことで得られた各モードの予測方向及び予測誤差とを示す情報をストレージ装置23に蓄積し、以降の処理で利用してもよい。   In step S311, the processor 21 passes the moving image Vin received from the video interface 25 to the encoding engine 26, and for each macroblock in each image of the moving image Vin, between the screens of the modes described in FIGS. Prediction and in-screen prediction processing are executed. For example, each time the processor 21 receives one or more GOPs (Group of Picture) from the video camera CAM via the video interface 25, the processor 21 executes the process of step S311. In the process of step S311, the processor 21 stores, for example, in the storage device 23, information indicating the motion vector and prediction error of each mode obtained by performing the inter-screen prediction process in the encoding engine 26, It may be used in subsequent processing. Similarly, the processor 21 accumulates information indicating the prediction direction and prediction error of each mode obtained by performing the intra-screen prediction processing in the encoding engine 26 in the storage device 23 and uses it in the subsequent processing. Also good.

ステップS312において、プロセッサ21は、配信先となる端末装置UEに対応して予め設定されたn種類の符号化条件毎に、ステップS311の処理で受けた動画像Vinの画像のサイズ及びフレームレートを変換した動画像を生成する。例えば、プロセッサ21は、n種類の符号化条件を順次に選択し、選択した符号化条件で指定されたフレームレートに従って動画像Vinから画像を間引く。そして、プロセッサ21は、間引き後に残された画像のそれぞれを、選択した符号化条件で指定された縮小率で縮小することにより第2の動画像を生成する。   In step S312, the processor 21 determines the size and frame rate of the moving image Vin received in the process of step S311 for each of n types of encoding conditions set in advance corresponding to the terminal device UE that is the distribution destination. Generate converted video. For example, the processor 21 sequentially selects n types of encoding conditions, and thins out images from the moving image Vin in accordance with the frame rate specified by the selected encoding conditions. Then, the processor 21 generates a second moving image by reducing each of the images remaining after the thinning out at a reduction rate specified by the selected encoding condition.

ステップS313において、プロセッサ21は、図2で説明したようにして、ステップS312の処理で生成された第2の動画像に含まれる縮小画像における各マクロブロックに、縮小前の動画像Vinに含まれる画像におけるマクロブロックを対応付ける。   In step S313, as described with reference to FIG. 2, the processor 21 includes each macroblock in the reduced image included in the second moving image generated by the process in step S312 included in the moving image Vin before reduction. Associate macroblocks in the image.

ステップS314において、プロセッサ21は、図4、図5で説明したようにして、縮小画像のマクロブロック毎に、画面間予測及び画面内予測の各モードで予想される、動きベクトルあるいは予測方向を示す第2情報及び予測誤差を示す第2コストを求める。   In step S314, the processor 21 indicates, for each macroblock of the reduced image, a motion vector or a prediction direction predicted in each mode of inter-screen prediction and intra-screen prediction, as described with reference to FIGS. The second information indicating the second information and the prediction error is obtained.

ステップS315において、プロセッサ21は、ステップS314の処理で、図6において説明した第1閾値Th1以下の第2コストが求められたモードがあるか否かを判定する。   In step S315, the processor 21 determines whether or not there is a mode in which the second cost equal to or less than the first threshold Th1 described in FIG. 6 is obtained in the process of step S314.

少なくとも一つのモードについて、ステップS314の処理で第1閾値以下の第2コストが求められた場合に(ステップS315の肯定判定(YES))、プロセッサ21は、ステップS316に進む。   For at least one mode, when the second cost equal to or lower than the first threshold is obtained in the process of step S314 (Yes determination in step S315), the processor 21 proceeds to step S316.

ステップS316において、プロセッサ21は、ステップS314の処理で各モードについて求められた第2コストの中で、他の第2コストよりも小さい値を持つ2つの第2コストの差を求め、求めた差が図7で説明した第2閾値以下であるか否かを判定する。   In step S316, the processor 21 obtains a difference between two second costs having a smaller value than the other second costs among the second costs obtained for each mode in the process of step S314, and obtains the obtained difference. Is less than or equal to the second threshold described with reference to FIG.

図7(A)の例のように、他の第2コストよりも小さい値を持つ2つの第2コストの差が第2閾値Th2よりも大きい場合に(ステップS316の否定判定(NO))、プロセッサ21は、ステップS317の処理を実行する。   As in the example of FIG. 7A, when the difference between two second costs having a value smaller than the other second costs is larger than the second threshold Th2 (No determination in step S316 (NO)). The processor 21 executes the process of step S317.

ステップS317において、プロセッサ21は、例えば、ステップS314の処理で最も小さい第2コストが得られたモードに対応する第2情報を符号化エンジン26に渡し、第2情報で示されるパラメータ用いた符号化を符号化エンジン26に実行させる。例えば、図7(A)の例では、プロセッサ21は、分割タイプTyp4を用いた画面間予測で得られた動きベクトルおよび参照画像を示す第2情報を符号化エンジン26に渡す。この場合に、符号化エンジン26は、縮小画像のマクロブロックについての画面間予測処理及び画面内予測処理を省略し、プロセッサ21から受けた第2情報で示される動きベクトル及び参照画像を用いた符号化処理を実行する。   In step S317, for example, the processor 21 passes the second information corresponding to the mode in which the smallest second cost is obtained in the process of step S314 to the encoding engine 26, and performs encoding using the parameter indicated by the second information. Is executed by the encoding engine 26. For example, in the example of FIG. 7A, the processor 21 passes the motion vector obtained by the inter-frame prediction using the division type Typ4 and the second information indicating the reference image to the encoding engine 26. In this case, the encoding engine 26 omits the inter-screen prediction process and the intra-screen prediction process for the macroblock of the reduced image, and uses the motion vector and the reference image indicated by the second information received from the processor 21. Execute the conversion process.

一方、ステップS314の処理で第1閾値以下の値を持つ第2コストが求められなかった場合に(ステップS315の否定判定(NO))、プロセッサ21は、ステップS318及びステップS319の処理を実行する。また、ステップS316の処理で、他の第2コストよりも小さい値を持つ2つの第2コストの差が第2閾値Th2以下であるとされた場合に(ステップS316の肯定判定(YES))、プロセッサ21は、ステップS318及びステップS319の処理を実行する。   On the other hand, when the second cost having a value equal to or less than the first threshold value is not obtained in the process of step S314 (No determination in step S315 (NO)), the processor 21 executes the processes of step S318 and step S319. . Further, when it is determined in the process of step S316 that the difference between the two second costs having a value smaller than the other second costs is equal to or less than the second threshold Th2 (Yes determination in step S316 (YES)), The processor 21 executes the processes of step S318 and step S319.

ステップS318において、プロセッサ21は、符号化エンジン26に、縮小画像のマクロブロックについての画面間予測及び画面内予測を実行させる。   In step S318, the processor 21 causes the encoding engine 26 to perform inter-screen prediction and intra-screen prediction for the macroblock of the reduced image.

ステップS319において、プロセッサ21は、ステップS318における画面間予測及び画面内予測で得られた情報を用いた符号化を、符号化エンジン26に実行させる。   In step S319, the processor 21 causes the encoding engine 26 to perform encoding using the information obtained by the inter-screen prediction and the intra-screen prediction in step S318.

以上に説明したステップS316の処理の終了後、あるいは、ステップS318及びステップS319の処理の終了後に、プロセッサ21は、ステップS320の処理を実行する。   After the process of step S316 described above is completed, or after the processes of step S318 and step S319 are completed, the processor 21 executes the process of step S320.

ステップS320において、プロセッサ21は、縮小画像の全てのマクロブロックについて、ステップS314〜ステップS319で説明した符号化処理を実行したか否かを判定する。   In step S320, the processor 21 determines whether or not the encoding process described in steps S314 to S319 has been executed for all macroblocks of the reduced image.

符号化が完了していないマクロブロックがある場合に(ステップS320の否定判定(NO))、プロセッサ21は、ステップS314に戻り、新たなマクロブロックについての符号化処理を開始する。   When there is a macroblock for which encoding has not been completed (No at Step S320 (NO)), the processor 21 returns to Step S314 and starts encoding processing for a new macroblock.

一方、縮小画像に含まれる全てのマクロブロックについての符号化処理が完了した場合に(ステップS320の肯定判定(YES))、プロセッサ21は、ステップS321の処理に進む。   On the other hand, when the encoding process for all macroblocks included in the reduced image is completed (Yes in step S320), the processor 21 proceeds to the process in step S321.

ステップS321において、プロセッサ21は、ステップS312の処理で符号化条件に基づく変換によって生成された動画像に含まれる全ての縮小画像についての符号化が完了したか否かを判定する。   In step S321, the processor 21 determines whether or not the encoding has been completed for all the reduced images included in the moving image generated by the conversion based on the encoding condition in the process of step S312.

符号化が完了していない縮小画像がある場合に(ステップS321の否定判定(NO))、プロセッサ21は、ステップS313に戻り、新たな縮小画像についての符号化処理を開始する。   When there is a reduced image for which encoding has not been completed (No in step S321 (NO)), the processor 21 returns to step S313 and starts encoding processing for a new reduced image.

一方、符号化条件に基づく変換によって生成された動画像に含まれる全ての縮小画像についての符号化処理が完了した場合に(ステップS321の肯定判定(YES))、プロセッサ21は、ステップS322の処理に進む。   On the other hand, when the encoding process has been completed for all the reduced images included in the moving image generated by the conversion based on the encoding condition (Yes in step S321 (YES)), the processor 21 performs the process in step S322. Proceed to

ステップS322において、プロセッサ21は、予め設定されたn種類の符号化条件のそれぞれで変換された動画像の全てについての符号化処理が完了したか否かを判定する。   In step S322, the processor 21 determines whether or not the encoding process has been completed for all moving images converted under each of n types of preset encoding conditions.

符号化が完了していない符号化条件がある場合に(ステップS321の否定判定(NO))、プロセッサ21は、ステップS312に戻り、新たな符号化条件で変換された動画像についての符号化処理を開始する。   When there is an encoding condition for which encoding has not been completed (No in step S321 (NO)), the processor 21 returns to step S312 and performs an encoding process for a moving image converted under the new encoding condition. To start.

一方、n種類の符号化条件のそれぞれに基づく変換によって生成された動画像の全てについての符号化処理が完了した場合に(ステップS322の肯定判定(YES))、プロセッサ21は、処理を終了する。   On the other hand, when the encoding process for all the moving images generated by the conversion based on each of the n types of encoding conditions is completed (Yes in step S322 (YES)), the processor 21 ends the process. .

以上に説明した処理を実行することで、図8に示した符号化装置10aは、例えば、ビデオカメラCAMによる撮影で得られる動画像Vinから、各種類の符号化条件に従って変換された動画像に対応する符号化データをほぼリアルタイムで生成することができる。これにより、図8に示した配信装置DTは、ビデオカメラCAMによる撮影で得られる動画像Vinまたは動画像Vinを端末装置UEのそれぞれの画面サイズなどに合わせて変換した動画像を、各端末装置UEにほぼリアルタイムで配信することが可能となる。   By executing the processing described above, the encoding device 10a illustrated in FIG. 8 converts, for example, a moving image Vin obtained by shooting with the video camera CAM into a moving image converted according to each type of encoding condition. Corresponding encoded data can be generated in near real time. Accordingly, the distribution device DT illustrated in FIG. 8 converts the moving image Vin obtained by shooting by the video camera CAM or the moving image Vin according to the screen size of the terminal device UE to each terminal device. Distribution to the UE in near real time is possible.

以上の詳細な説明により、実施形態の特徴点及び利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で、前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更を容易に想到できるはずである。したがって、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物に拠ることも可能である。   From the above detailed description, features and advantages of the embodiment 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. Any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and changes. Therefore, there is no intention to limit the scope of the inventive embodiments to those described above, and appropriate modifications and equivalents included in the scope disclosed in the embodiments can be used.

10,10a…符号化装置;11,11a…探索部;12,12a…符号化部;13,13a…変換部;14,14a…制御部;141…選択部;142…抑止部;20…コンピュータ装置;21…プロセッサ;22…メモリ;23…ストレージ装置;24…ネットワークインタフェース;25…ビデオインタフェース;26…符号化エンジン;27…光学ドライブ装置;28…リムーバブルディスク;DB…動画像データベース;DT…配信装置;NW…ネットワーク;UE,UE1,UE2,UE3,UE4…端末装置;SV…サーバ装置;CAM…ビデオカメラ
DESCRIPTION OF SYMBOLS 10,10a ... Encoding apparatus; 11, 11a ... Search part; 12, 12a ... Encoding part; 13, 13a ... Conversion part; 14, 14a ... Control part; 141 ... Selection part; 142 ... Deterrence part; 21; Processor; 22 ... Memory; 23 ... Storage device; 24 ... Network interface; 25 ... Video interface; 26 ... Encoding engine; 27 ... Optical drive device; 28 ... Removable disk; DB ... Video database; Distribution device; NW ... Network; UE, UE1, UE2, UE3, UE4 ... Terminal device; SV ... Server device; CAM ... Video camera

Claims (5)

第1の動画像に含まれる複数の第1画像のそれぞれを分割して得られる複数の第1ブロックのそれぞれについて、画面間予測及び画面内予測の少なくとも一方を行うことで、動きベクトル及び予測方向の少なくとも一方を探索する探索部と、
前記第1の動画像から生成される、フレームレート及び画面サイズの少なくとも一方が前記第1の動画像と異なる第2の動画像に含まれる複数の第2画像のそれぞれを、前記第2画像を分割して得られる第2ブロックごとに符号化する符号化部と、
前記探索部によって得られた動きベクトル及び予測方向の少なくとも一方を示す第1情報と、前記第1情報で示される予測画像と前記第1ブロックとの違いである予測誤差を示す第1コストとのそれぞれから、前記各第2画像に含まれる前記第2ブロックのそれぞれについて画面間予測及び画面内予測の少なくとも一方を行った場合に得ることが予想される動きベクトル及び予測方向の少なくとも一方を示す第2情報と、前記第2情報で示される予測画像と前記第2ブロックとの間に予想される予測誤差を示す第2コストとのそれぞれを求める変換部と、
前記変換部で所定の第1閾値以下の第2コストが求められた前記第2ブロックを符号化する場合に、前記変換部で得られた第2情報を用いて前記符号化部に符号化させる制御部と
を備えたことを特徴とする符号化装置。
By performing at least one of inter-screen prediction and intra-screen prediction for each of the plurality of first blocks obtained by dividing each of the plurality of first images included in the first moving image, the motion vector and the prediction direction A search unit that searches for at least one of
Each of a plurality of second images included in a second moving image that is generated from the first moving image and has at least one of a frame rate and a screen size different from that of the first moving image is defined as the second image. An encoding unit for encoding each second block obtained by the division;
First information indicating at least one of a motion vector and a prediction direction obtained by the search unit, and a first cost indicating a prediction error that is a difference between the predicted image indicated by the first information and the first block A first indicating at least one of a motion vector and a prediction direction expected to be obtained when performing at least one of inter-frame prediction and intra-screen prediction for each of the second blocks included in each of the second images. A conversion unit for obtaining each of two information and a second cost indicating a prediction error predicted between the prediction image indicated by the second information and the second block;
When encoding the second block for which a second cost equal to or lower than a predetermined first threshold is encoded by the conversion unit, the encoding unit is encoded using the second information obtained by the conversion unit. An encoding device comprising: a control unit.
請求項1に記載の符号化装置において、
前記変換部は、画面間予測及び画面内予測の少なくとも一方を用いた探索において、前記第2ブロックを少なくとも一つの第3ブロックに分割する種類が異なる複数のモードのそれぞれで、前記動きベクトル及び前記予測方向の少なくとも一方を示す第3情報を含む第2情報と、前記第3情報で示される箇所と前記第3ブロックとの違いの大きさを示す第3コストの和で示される第2コストとを求め、
前記制御部は、前記変換部により前記複数のモードのそれぞれで求められた前記第2コストのうち、他の第2コストよりも小さい二つの第2コストの差が前記第1閾値よりも小さい第2閾値以下である場合に、前記符号化部による前記第2情報の利用を抑止する抑止部を有する
ことを特徴とする符号化装置。
The encoding device according to claim 1, wherein
In the search using at least one of inter-frame prediction and intra-screen prediction, the conversion unit is configured to divide the second block into at least one third block in each of a plurality of different modes, and the motion vector and the Second information including third information indicating at least one of the prediction directions, a second cost indicated by a sum of third costs indicating a difference between the location indicated by the third information and the third block; Seeking
The control unit has a second difference between the second costs obtained by the conversion unit in each of the plurality of modes, the difference between two second costs being smaller than the other second costs is smaller than the first threshold value. An encoding apparatus comprising: a suppression unit that suppresses the use of the second information by the encoding unit when the threshold value is 2 or less.
請求項2に記載の符号化装置において、
前記抑止部は、前記第2閾値として、前記符号化部におけるエントロピー符号化により前記第2情報を符号化した場合に生成される符号量の分散を示す値を用いる
ことを特徴とする符号化装置。
The encoding device according to claim 2,
The said suppression part uses the value which shows dispersion | distribution of the code amount produced | generated when the said 2nd information is encoded by the entropy encoding in the said encoding part as said 2nd threshold value. .
第1の動画像に含まれる複数の第1画像のそれぞれを分割して得られる複数の第1ブロックのそれぞれについて、画面間予測及び画面内予測の少なくとも一方を行うことで、動きベクトル及び予測方向の少なくとも一方を探索し、
前記第1の動画像から生成される、フレームレート及び画面サイズの少なくとも一方が前記第1の動画像と異なる第2の動画像に含まれる複数の第2画像のそれぞれを、前記第2画像を分割して得られる第2ブロックごとに符号化する場合に、
前記探索によって得られた動きベクトル及び予測方向の少なくとも一方を示す第1情報と、前記第1情報で示される予測画像と前記第1ブロックとの違いである予測誤差を示す第1コストとのそれぞれから、前記各第2画像に含まれる前記第2ブロックのそれぞれについて画面間予測及び画面内予測の少なくとも一方を行った場合に得ることが予想される動きベクトル及び予測方向の少なくとも一方を示す第2情報と、前記第2情報で示される予測画像と前記第2ブロックとの間に予想される予測誤差を示す第2コストとのそれぞれを求め、
所定の第1閾値以下の第2コストが求められた前記第2ブロックを、前記第2ブロックについて得られた第2情報を用いて符号化する
ことを特徴とする符号化方法。
By performing at least one of inter-screen prediction and intra-screen prediction for each of the plurality of first blocks obtained by dividing each of the plurality of first images included in the first moving image, the motion vector and the prediction direction Explore at least one of
Each of a plurality of second images included in a second moving image that is generated from the first moving image and has at least one of a frame rate and a screen size different from that of the first moving image is defined as the second image. When encoding every second block obtained by dividing,
First information indicating at least one of a motion vector and a prediction direction obtained by the search, and a first cost indicating a prediction error that is a difference between the predicted image indicated by the first information and the first block, respectively. To the second block indicating at least one of a motion vector and a prediction direction expected to be obtained when at least one of inter-frame prediction and intra-screen prediction is performed for each of the second blocks included in each of the second images. Each of the information and a second cost indicating a prediction error predicted between the predicted image indicated by the second information and the second block;
An encoding method comprising: encoding the second block for which a second cost equal to or less than a predetermined first threshold is obtained using second information obtained for the second block.
第1の動画像に含まれる複数の第1画像のそれぞれを分割して得られる複数の第1ブロックのそれぞれについて、画面間予測及び画面内予測の少なくとも一方を行うことで、動きベクトル及び予測方向の少なくとも一方を探索し、
前記第1の動画像から生成される、フレームレート及び画面サイズの少なくとも一方が前記第1の動画像と異なる第2の動画像に含まれる複数の第2画像のそれぞれを、前記第2画像を分割して得られる第2ブロックごとに符号化する場合に、
前記探索によって得られた動きベクトル及び予測方向の少なくとも一方を示す第1情報と、前記第1情報で示される予測画像と前記第1ブロックとの違いである予測誤差を示す第1コストとのそれぞれから、前記各第2画像に含まれる前記第2ブロックのそれぞれについて画面間予測及び画面内予測の少なくとも一方を行った場合に得ることが予想される動きベクトル及び予測方向の少なくとも一方を示す第2情報と、前記第2情報で示される予測画像と前記第2ブロックとの間に予想される予測誤差を示す第2コストとのそれぞれを求め、
所定の第1閾値以下の第2コストが求められた前記第2ブロックを、前記第2ブロックについて得られた第2情報を用いて符号化する、
処理をコンピュータに実行させることを特徴とする符号化プログラム。
By performing at least one of inter-screen prediction and intra-screen prediction for each of the plurality of first blocks obtained by dividing each of the plurality of first images included in the first moving image, the motion vector and the prediction direction Explore at least one of
Each of a plurality of second images included in a second moving image that is generated from the first moving image and has at least one of a frame rate and a screen size different from that of the first moving image is defined as the second image. When encoding every second block obtained by dividing,
First information indicating at least one of a motion vector and a prediction direction obtained by the search, and a first cost indicating a prediction error that is a difference between the predicted image indicated by the first information and the first block, respectively. To the second block indicating at least one of a motion vector and a prediction direction expected to be obtained when at least one of inter-frame prediction and intra-screen prediction is performed for each of the second blocks included in each of the second images. Each of the information and a second cost indicating a prediction error predicted between the predicted image indicated by the second information and the second block;
The second block for which the second cost equal to or lower than a predetermined first threshold is obtained is encoded using the second information obtained for the second block.
An encoding program for causing a computer to execute processing.
JP2014071915A 2014-03-31 2014-03-31 Encoding apparatus, encoding method, and encoding program Active JP6291971B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014071915A JP6291971B2 (en) 2014-03-31 2014-03-31 Encoding apparatus, encoding method, and encoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014071915A JP6291971B2 (en) 2014-03-31 2014-03-31 Encoding apparatus, encoding method, and encoding program

Publications (2)

Publication Number Publication Date
JP2015195470A true JP2015195470A (en) 2015-11-05
JP6291971B2 JP6291971B2 (en) 2018-03-14

Family

ID=54434166

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014071915A Active JP6291971B2 (en) 2014-03-31 2014-03-31 Encoding apparatus, encoding method, and encoding program

Country Status (1)

Country Link
JP (1) JP6291971B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002374536A (en) * 2001-06-15 2002-12-26 Victor Co Of Japan Ltd Encoder
JP2003309851A (en) * 2002-04-16 2003-10-31 Mitsubishi Electric Corp Video data converter and video data converting method
JP2004023444A (en) * 2002-06-17 2004-01-22 Hitachi Ltd Moving picture encoding apparatus, and moving picture recording and reproducing apparatus
JP2007243337A (en) * 2006-03-06 2007-09-20 Nec Corp Moving image encoding method, moving image encoding device, program, and medium
JP2014017621A (en) * 2012-07-06 2014-01-30 Kddi Corp Video compression format converter, video compression format conversion method and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002374536A (en) * 2001-06-15 2002-12-26 Victor Co Of Japan Ltd Encoder
JP2003309851A (en) * 2002-04-16 2003-10-31 Mitsubishi Electric Corp Video data converter and video data converting method
JP2004023444A (en) * 2002-06-17 2004-01-22 Hitachi Ltd Moving picture encoding apparatus, and moving picture recording and reproducing apparatus
JP2007243337A (en) * 2006-03-06 2007-09-20 Nec Corp Moving image encoding method, moving image encoding device, program, and medium
JP2014017621A (en) * 2012-07-06 2014-01-30 Kddi Corp Video compression format converter, video compression format conversion method and program

Also Published As

Publication number Publication date
JP6291971B2 (en) 2018-03-14

Similar Documents

Publication Publication Date Title
US20230118198A1 (en) Image encoder and related non-transitory computer readable medium for image decoding
KR102625609B1 (en) Image encoding device, image decoding device, image encoding method and image decoding method
US8842926B2 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
US8571106B2 (en) Digital video compression acceleration based on motion vectors produced by cameras
KR102059066B1 (en) Motion vector field coding method and decoding method, and coding and decoding apparatuses
US8831101B2 (en) Method and system for determining a metric for comparing image blocks in motion compensated video coding
US11611758B2 (en) Image encoder, image decoder, image encoding method, and image decoding method
JP2014521272A (en) Method and apparatus for reframing and encoding video signals
US20160057415A1 (en) Image encoding method, image encoding apparatus, and related encoding medium, image decoding method, image decoding apparatus, and related decoding medium
CN111800653A (en) Video decoding method, system, device and computer readable storage medium
CN110495168A (en) Code device, decoding apparatus, coding method and coding/decoding method
US20220030241A1 (en) Encoder, decoder, encoding method, and decoding method
JP2007228519A (en) Image encoding device and image encoding method
JP6291971B2 (en) Encoding apparatus, encoding method, and encoding program
US9491455B2 (en) Picture encoding method, picture decoding method, picture encoding apparatus, picture decoding apparatus, picture encoding program, and picture decoding program
CN110495179A (en) Code device, decoding apparatus, coding method and coding/decoding method
KR102287277B1 (en) Encoding apparatus and control method thereof
KR101407719B1 (en) Multi-view image coding method and apparatus using variable GOP prediction structure, multi-view image decoding apparatus and recording medium storing program for performing the method thereof
JP2009296363A (en) Motion vector search apparatus, and motion vector search method
JP2005341093A (en) Contents adaptating apparatus, contents adaptation system, and contents adaptation method
JP2022523440A (en) Null tile coding in video coding
KR102235314B1 (en) Video encoding/decoding method and apparatus using paddding in video codec
JP2012222460A (en) Moving image encoding apparatus, moving image encoding method, and program
CN117812268A (en) Video transcoding method, device, equipment and medium
CN112714312A (en) Encoding mode selection method, device and readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170110

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20170803

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20170803

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171017

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171212

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180129

R150 Certificate of patent or registration of utility model

Ref document number: 6291971

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150