JP6598376B2 - Encoding apparatus and encoding method - Google Patents
Encoding apparatus and encoding method Download PDFInfo
- Publication number
- JP6598376B2 JP6598376B2 JP2016195086A JP2016195086A JP6598376B2 JP 6598376 B2 JP6598376 B2 JP 6598376B2 JP 2016195086 A JP2016195086 A JP 2016195086A JP 2016195086 A JP2016195086 A JP 2016195086A JP 6598376 B2 JP6598376 B2 JP 6598376B2
- Authority
- JP
- Japan
- Prior art keywords
- frame
- encoding
- frames
- encoded
- inter
- 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.)
- Active
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、符号化装置、及び、符号化方法に関する。 The present invention relates to an encoding device and an encoding method.
ネットワークを通じて動画像コンテンツを転送する際に、ネットワークにおける通信量を削減する圧縮技術が使用される。圧縮技術では、送信装置がコンテンツを構成するフレームを圧縮符号化してネットワークに送信し、圧縮符号化されたデータを受信装置が受信して復号することでコンテンツを復元する。 When moving image content is transferred through a network, a compression technique that reduces the amount of communication in the network is used. In the compression technique, a transmission device compresses and encodes a frame constituting the content, transmits the frame to a network, and the reception device receives and decodes the compressed and encoded data to restore the content.
圧縮技術における圧縮率を向上させる差分符号化方式がある。差分符号化方式では、コンテンツに含まれるフレームの一部をキーフレームとしてフレーム内符号化する。また、コンテンツに含まれるフレームの上記一部を除く残部を差分フレームとして、上記キーフレームからの差分を符号化、つまり、フレーム間符号化する。 There are differential encoding schemes that improve the compression rate in compression techniques. In the differential encoding method, intra-frame encoding is performed using a part of the frame included in the content as a key frame. Further, the remaining part excluding the part of the frame included in the content is set as a difference frame, and the difference from the key frame is encoded, that is, inter-frame encoded.
特許文献1は、圧縮符号化技術において、キーフレームの符号化処理量の急激な上昇を抑制するとともに、フレーム内符号化されたフレームと、フレーム間符号化されたフレームとの再生中に現れる差異をより小さくする技術を開示する。 Japanese Patent Laid-Open No. 2004-228688 suppresses a rapid increase in the coding processing amount of a key frame in a compression coding technique, and also shows a difference that appears during reproduction between an intra-frame coded frame and an inter-frame coded frame. Disclosed is a technique for making the size smaller.
特許文献1が開示する技術は、キーフレームの他にキーGOB(ブロック領域)という概念を導入したことで、キーフレームの符号化処理量の急激な上昇を抑制する効果が期待される一方、符号化されたデータのデータサイズには無頓着である。例えば、映像内の動きが激しい場合、フレーム間符号化されたフレームのデータサイズが、フレーム内符号化されたフレームのデータサイズを超えることがある。
The technology disclosed in
そのため、符号化により生成されるデータサイズが比較的大きくなることで、ネットワークの通信量を圧迫したり、ネットワークにおいて生じ得る通信ロスにより再生装置で再生されるコンテンツに乱れが生じたりするという問題がある。 For this reason, there is a problem that the data size generated by the encoding becomes relatively large, and the amount of communication on the network is reduced, or the content played back by the playback device is disturbed due to a communication loss that may occur in the network. is there.
本発明は、上記問題を解決するためになされたものであり、符号化データのサイズを削減する符号化装置等を提供することを目的とする。 The present invention has been made to solve the above problem, and an object thereof is to provide an encoding device or the like that reduces the size of encoded data.
上記課題を解決するために、本発明の一態様に係る符号化装置は、一連のフレームに含まれるフレームを、フレーム内符号化又はフレーム間符号化する符号化部と、(a)前記一連のフレームのうちの第一フレームを前記符号化部がフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、(b)前記一連のフレームのうちの第三フレームを前記符号化部がフレーム間符号化した場合には、既にフレーム間符号化されたフレームのうち前記第三フレームを終端とする連続した第一所定数のフレームそれぞれのデータサイズが第一閾値以上であるとき、前記一連のフレームのうち前記第三フレームの次の第四フレームをフレーム内符号化するよう制御する、制御部とを備える。 In order to solve the above problem, an encoding apparatus according to an aspect of the present invention includes an encoding unit that performs intra-frame encoding or inter-frame encoding on a frame included in a series of frames, and (a) the series of frames. When the encoding unit intra-frame-encodes the first frame of the frames, the second frame next to the first frame in the series of frames is controlled to be inter-frame encoded, and (b ) When the encoding unit performs inter-frame encoding on the third frame of the series of frames, a first predetermined number of consecutive frames that end with the third frame among frames that have already been inter-frame encoded. A control unit that controls the fourth frame following the third frame to be intra-coded when the data size of each of the frames is equal to or greater than a first threshold; Provided.
これによれば、符号化装置は、フレーム内符号化した後のフレームをフレーム間符号化することで符号化データのサイズを削減する。また、符号化装置は、フレーム間符号化されたフレームのデータサイズが連続して比較的大きいときには、その後のフレームをフレーム内符号化することでフレームのデータサイズを削減する。フレーム間符号化されたフレームのデータサイズは、フレーム内の画像全体の動きが比較的大きい場合には、フレーム内符号化されたフレームのデータサイズより大きくなることがある。このとき、新たなフレームをフレーム内符号化すれば、そのフレームのデータサイズは、フレーム間符号化された場合よりも小さくなる。これらの制御により、符号化装置は、符号化データのサイズを削減することができる。 According to this, the encoding device reduces the size of the encoded data by inter-frame encoding the frame after intra-frame encoding. In addition, when the data size of the inter-frame encoded frame is relatively large continuously, the encoding device reduces the data size of the frame by intra-frame encoding the subsequent frames. The data size of an inter-frame encoded frame may be larger than the data size of an intra-frame encoded frame when the motion of the entire image in the frame is relatively large. At this time, if a new frame is encoded in the frame, the data size of the frame becomes smaller than that in the case of inter-frame encoding. With these controls, the encoding device can reduce the size of the encoded data.
また、前記制御部は、(c)前記(b)において、フレーム間符号化された前記フレームのそれぞれの前記データサイズが前記第一閾値以上であるとき、前記一連のフレームのうち前記第四フレームを始端とする連続した第二所定数のフレームをフレーム内符号化するよう制御してもよい。 In addition, in (c) and (b), when the data size of each of the frames that are interframe-coded is equal to or larger than the first threshold, the control unit is configured to perform the fourth frame of the series of frames. Control may be performed so that a second predetermined number of consecutive frames starting from the frame are intra-coded.
これによれば、符号化装置は、フレーム間符号化されたフレームのデータサイズが連続して比較的大きいときには、その後の連続した所定数のフレームをフレーム内符号化する。コンテンツの一連のフレームにおいて、フレーム内の画像全体が連続的に移動する場合(例えば、スクロールがある場合、又は、撮影時に継続的に手ぶれがあった場合)には、フレーム間符号化されたフレームのデータサイズが連続して比較的大きくなり、フレーム間符号化による差分符号化の効果が比較的小さくなる。その場合、符号化装置は、新たなフレーム以降の所定数のフレーム内符号化することで、それらのフレームのデータサイズを、フレーム間符号化された場合よりも小さくすることができる。 According to this, when the data size of the inter-frame encoded frame is continuously relatively large, the encoding apparatus performs intra-frame encoding on a predetermined number of subsequent frames. In a series of frames of content, when the entire image in the frame moves continuously (for example, when there is scrolling or when there is continuous camera shake at the time of shooting), an inter-frame encoded frame Therefore, the effect of differential encoding by inter-frame encoding becomes relatively small. In that case, the encoding apparatus can make the data size of those frames smaller than the case of inter-frame encoding by performing a predetermined number of intra-frame encodings after the new frame.
また、前記制御部は、前記(c)において、前記第二所定数のフレームを再生順に順次にフレーム内符号化し、前記第二所定数のフレームのうちの第五フレームをフレーム内符号化した時点において、フレーム内符号化された前記第五フレームのデータサイズが、前記一連のフレームのうち前記第五フレームの直前にフレーム内符号化された第六フレームのデータサイズから第三所定値以上変化した場合には、前記第五フレームの次の第七フレームをフレーム間符号化するよう制御してもよい。 In addition, in the step (c), the control unit sequentially encodes the second predetermined number of frames in the order of reproduction and sequentially encodes a fifth frame of the second predetermined number of frames. , The data size of the fifth frame that is intra-encoded is changed by a third predetermined value or more from the data size of the sixth frame that is intra-encoded immediately before the fifth frame in the series of frames. In such a case, control may be performed so that the seventh frame next to the fifth frame is inter-coded.
これによれば、符号化装置は、フレーム内の画像全体が連続的に移動することでフレーム内符号化を続けて行っているときに、符号化されたフレームのデータサイズが比較的大きく変化した場合には、フレーム内符号化を続けることを中止し、フレームをフレーム間符号化する。上記のようにデータサイズが比較的大きく変化する一因は、フレーム内のシーンが切り替えられたことによる場合がある。このような場合には、その後、フレーム内の画像全体の連続的な移動がなくなる可能性があるので、フレーム内符号化を中止して、フレーム間符号化を行うことで、符号化データのサイズを削減することができる。 According to this, in the encoding device, when the intra-frame encoding is continuously performed by continuously moving the entire image in the frame, the data size of the encoded frame changes relatively large. In some cases, the intra-frame encoding is stopped and the frame is inter-frame encoded. One reason for the relatively large change in data size as described above may be that the scene in the frame has been switched. In such a case, there is a possibility that the continuous movement of the entire image in the frame may be lost after that, so that the size of the encoded data can be reduced by stopping the intra-frame encoding and performing the inter-frame encoding. Can be reduced.
また、前記制御部は、前記(a)において、前記第一フレームを前記符号化部がフレーム内符号化した場合には、前記一連のフレームのうちの前記第二フレーム以降のフレームを、再生順に順次にフレーム間符号化するよう制御し、前記第二フレーム以降のフレームのうちの第八フレームをフレーム間符号化した時点において、フレーム間符号化された前記第八フレームのデータサイズが第二閾値以上であるときには、前記一連のフレームのうち前記第八フレームの次の第九フレームをフレーム内符号化するよう制御してもよい。 In addition, in the step (a), when the encoding unit encodes the first frame in the frame, the control unit converts the frames after the second frame in the series of frames in a reproduction order. Control is performed so that interframe coding is performed sequentially, and when the eighth frame of the second and subsequent frames is interframe-coded, the data size of the eighth frame that is interframe-coded is the second threshold value. When it is above, control may be performed so that the ninth frame after the eighth frame in the series of frames is intra-coded.
これによれば、符号化装置は、フレーム間符号化されたフレームのデータサイズが比較的大きい場合に、新たなフレームをフレーム内符号化する。フレーム間符号化されたフレームとキーフレームとの差分が比較的大きい場合に、新たなフレームを新たなキーフレームとしてフレーム内符号化することで、それ以降のフレームと新たなキーフレームとの差分を比較的小さくすることができるからである。 According to this, the encoding apparatus performs intra-frame encoding of a new frame when the data size of the inter-frame encoded frame is relatively large. When the difference between the inter-frame encoded frame and the key frame is relatively large, the difference between the subsequent frames and the new key frame is calculated by intra-frame encoding using the new frame as the new key frame. This is because it can be made relatively small.
また、前記符号化装置は、さらに、前記符号化部がフレーム内符号化又はフレーム間符号化することで生成した符号化データを送信する送信部と、前記符号化データに含まれるフレームがフレーム間符号化されたフレームであって、かつ、当該フレームのデータサイズが第三閾値以上である場合には、前記送信部が当該フレームを送信することを禁止する送信制御部とを備えてもよい。 The encoding apparatus further includes: a transmission unit that transmits encoded data generated by the encoding unit performing intra-frame encoding or inter-frame encoding; and a frame included in the encoded data is transmitted between frames. When the frame is an encoded frame and the data size of the frame is greater than or equal to a third threshold value, a transmission control unit that prohibits the transmission unit from transmitting the frame may be provided.
これによれば、符号化装置は、フレーム間符号化されたフレームのうち、データサイズが比較的大きいフレームを送信することを禁止することで、ネットワークにおける通信量を抑制することができる。なお、このようにフレームの送信を禁止すると、復号装置によりこのフレームを再生することはできなくなるが、1フレームの再生がなくなる程度であれば、コンテンツの再生に大きな影響を与えないと考えられる。 According to this, the encoding device can suppress the amount of communication in the network by prohibiting transmission of a frame having a relatively large data size among frames that are inter-frame encoded. If the frame transmission is prohibited in this manner, the frame cannot be reproduced by the decoding device. However, it is considered that the reproduction of the content is not greatly affected as long as one frame is not reproduced.
また、本発明の一態様に係る符号化装置は、一連のフレームに含まれるフレームを、フレーム内符号化又はフレーム間符号化する符号化部と、(d)前記一連のフレームのうちの第一フレームを前記符号化部がフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、(e)前記一連のフレームのうちの第三フレームを前記符号化部がフレーム間符号化した場合には、前記第三フレームを含む連続した所定数のフレーム間符号化されたフレームのそれぞれのデータサイズが第一閾値以上であるとき、前記第三フレームをフレーム内符号化するよう制御する、制御部とを備える。 An encoding apparatus according to an aspect of the present invention includes an encoding unit that performs intraframe encoding or interframe encoding on a frame included in a series of frames, and (d) a first of the series of frames. When the encoding unit encodes the frame within the frame, control is performed so that the second frame next to the first frame among the series of frames is inter-coded, and (e) the sequence of frames When the encoding unit performs inter-frame encoding on the third frame, the data size of each of a predetermined number of consecutive inter-frame encoded frames including the third frame is greater than or equal to the first threshold. A control unit that controls the third frame to be intra-coded.
これによれば、符号化装置は、フレーム内符号化の後にはフレーム間符号化をすることで符号化データのサイズを削減する。また、符号化装置は、フレーム間符号化されたフレームのデータサイズが連続して比較的大きいときに、その符号化したフレームを改めてフレーム内符号化することでフレームのデータサイズを削減する。これらの制御により、符号化装置は、符号化データのサイズを削減することができる。 According to this, the encoding apparatus reduces the size of encoded data by performing inter-frame encoding after intra-frame encoding. Further, the encoding device reduces the data size of the frame by performing intra-frame encoding on the encoded frame again when the data size of the inter-frame encoded frame is relatively large continuously. With these controls, the encoding device can reduce the size of the encoded data.
また、本発明の一態様に係る符号化方法は、一連のフレームに含まれるフレームを、フレーム内符号化又はフレーム間符号化する符号化ステップと、(a)前記一連のフレームのうちの第一フレームを前記符号化ステップでフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、(b)前記一連のフレームのうちの第三フレームを前記符号化ステップでフレーム間符号化した場合には、既にフレーム間符号化されたフレームのうち前記第三フレームを終端とする連続した第一所定数のフレームそれぞれのデータサイズが第一閾値以上であるとき、前記一連のフレームのうち前記第三フレームの次の第四フレームをフレーム内符号化するよう制御する、制御ステップとを含む。 An encoding method according to an aspect of the present invention includes an encoding step of intra-frame encoding or inter-frame encoding of frames included in a series of frames, and (a) a first of the series of frames. When the frame is intra-frame encoded in the encoding step, control is performed so that the second frame next to the first frame in the series of frames is inter-coded, and (b) When the third frame is inter-frame encoded in the encoding step, the data size of each of the first predetermined number of consecutive frames ending with the third frame among the frames already inter-frame encoded Is greater than or equal to the first threshold value, a control step for controlling the fourth frame following the third frame to be intra-coded in the series of frames. Including the door.
これにより、上記符号化装置と同様の効果を奏する。 Thereby, there exists an effect similar to the said encoding apparatus.
また、本発明の一態様に係る符号化方法は、一連のフレームに含まれるフレームを、フレーム内符号化又はフレーム間符号化する符号化ステップと、(d)前記一連のフレームのうちの第一フレームを前記符号化ステップでフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、(e)前記一連のフレームのうちの第三フレームを前記符号化ステップでフレーム間符号化した場合には、前記第三フレームを含む連続した所定数のフレーム間符号化されたフレームのそれぞれのデータサイズが第一閾値以上であるとき、前記第三フレームをフレーム内符号化するよう制御する、制御ステップとを含む。 An encoding method according to an aspect of the present invention includes an encoding step of intra-frame encoding or inter-frame encoding of frames included in a series of frames, and (d) a first of the series of frames. When the frame is intra-frame encoded in the encoding step, control is performed so that the second frame next to the first frame in the series of frames is inter-coded, and (e) the series of frames When the third frame is inter-frame encoded in the encoding step, the data size of each of a predetermined number of consecutive inter-frame encoded frames including the third frame is greater than or equal to the first threshold. A control step for controlling the third frame to be intra-coded.
これにより、上記符号化装置と同様の効果を奏する。 Thereby, there exists an effect similar to the said encoding apparatus.
本発明にかかる符号化装置等は、符号化データのサイズを削減することができる。 The encoding apparatus according to the present invention can reduce the size of encoded data.
以下、実施の形態について、図面を参照しながら具体的に説明する。 Hereinafter, embodiments will be specifically described with reference to the drawings.
以下で説明する実施の形態は、いずれも本発明の好ましい一具体例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置及び接続形態、ステップ、ステップの順序などは、一例であり、本発明を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、本発明の最上位概念を示す独立請求項に記載されていない構成要素については、より好ましい形態を構成する任意の構成要素として説明される。なお、同一の構成要素には同一の符号を付し、説明を省略する場合がある。 Each of the embodiments described below shows a preferred specific example of the present invention. The numerical values, shapes, materials, constituent elements, arrangement positions and connecting forms of the constituent elements, steps, order of steps, and the like shown in the following embodiments are merely examples, and are not intended to limit the present invention. In addition, among the constituent elements in the following embodiments, constituent elements that are not described in the independent claims indicating the highest concept of the present invention are described as optional constituent elements that constitute a more preferable embodiment. In addition, the same code | symbol is attached | subjected to the same component and description may be abbreviate | omitted.
(実施の形態)
本実施の形態において、符号化データのサイズを削減する符号化装置等について説明する。
(Embodiment)
In the present embodiment, an encoding apparatus and the like that reduce the size of encoded data will be described.
図1は、本実施の形態に係るコンテンツ再生システムSの構成を示す構成図である。 FIG. 1 is a configuration diagram showing a configuration of a content reproduction system S according to the present embodiment.
図1に示されるように、コンテンツ再生システムSは、送信装置1と再生装置2とを備える。送信装置1と再生装置2とは、ネットワーク3により通信可能に接続されている。
As shown in FIG. 1, the content reproduction system S includes a
コンテンツ再生システムSは、送信装置1が保有している動画像コンテンツ(以降、単にコンテンツともいう)を、1以上の再生装置2により再生するコンテンツ再生システムである。
The content reproduction system S is a content reproduction system in which moving image content (hereinafter also simply referred to as content) held by the
送信装置1は、コンテンツを保有しており、コンテンツをネットワーク3を通じて再生装置2に送信する送信装置である。送信装置1は、コンテンツを圧縮符号化(以降、単に符号化ともいう)する符号化装置10を備える。符号化装置10は、符号化によりコンテンツのデータ量を削減した符号化データを生成し、生成した符号化データをネットワーク3に送信する。
The
再生装置2は、ネットワーク3を通じて送信装置1からコンテンツを受信し、受信したコンテンツを再生する再生装置である。再生装置2は、送信装置1が保有している動画コンテンツをもとに符号化装置10が生成した符号化データを、ネットワーク3を通じて受信する。再生装置2は、符号化データを復号する復号装置20を備える。復号装置20は、ネットワーク3から受信した符号化データを復号することでコンテンツを復元し、復元したコンテンツを再生装置2により再生する。
The
ネットワーク3は、送信装置1と再生装置2とを通信可能に接続するネットワークである。ネットワーク3は、具体的には、IEEE802.11a、b、g、n規格等に適合する無線LAN(Local Area Network)、又は、IEEE802.3規格等に適合する有線LANである。
The
なお、コンテンツ再生システムSは、2以上の再生装置2を備えていてもよい。その場合、2以上の再生装置2それぞれがネットワーク3に接続し、送信装置1が送信する符号化データを受信することができることを要する。送信装置1は、再生装置2が2以上存在する場合には、2以上の再生装置2それぞれに対してユニキャスト送信してもよいし、2以上の再生装置2が受信できるようにブロードキャスト送信してもよい。
The content reproduction system S may include two or
図2は、本実施の形態に係る符号化装置10のハードウェア構成を示すブロック図である。なお、復号装置20も、符号化装置10と同じハードウェア構成を有する。
FIG. 2 is a block diagram showing a hardware configuration of
図2に示されるように、符号化装置10は、CPU11と、メインメモリ12と、ストレージ13とを備える。
As shown in FIG. 2, the
CPU11は、メインメモリ12又はストレージ13に格納された制御プログラムを実行するプロセッサである。符号化装置10が実行する処理は、CPU11が制御プログラムを実行することで実現され得る。
The
メインメモリ12は、CPU11が制御プログラムを実行するときに使用するワークエリアとして用いられる揮発性の記憶領域である。
The
ストレージ13は、コンテンツを構成するフレームのデータを記憶している不揮発性の記憶装置である。なお、ストレージ13は、例えばHDD(Hard Disk Drive)、又は、SSD(Solid State Drive)等であり、符号化装置10に内蔵されたものであってもよいし、USB(Universal Serial Bus)規格等により外付けされるものであってもよい。
The
以降において、本実施の形態に係る符号化装置及び復号装置の構成について詳細に説明する。 Hereinafter, configurations of the encoding device and the decoding device according to the present embodiment will be described in detail.
図3は、本実施の形態に係る符号化装置10の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of
図3に示されるように、符号化装置10は、フレーム保持部100と、取得部101と、ブロッキングフィルタ102と、変換部103と、差分部104と、量子化部105と、符号化部106と、逆量子化部107と、参照用保持部108とを備える。
As illustrated in FIG. 3, the
フレーム保持部100は、符号化対象のコンテンツを構成するフレームのデータを保持している記憶部である。フレーム保持部100は、例えばメインメモリ12等により実現される。
The
取得部101は、符号化対象フレームを取得する処理部である。取得部101は、フレーム保持部100に格納されているコンテンツに含まれるフレームのうちの符号化対象フレームを読み出すことで取得する。符号化対象フレームは、例えば、コンテンツを構成する複数のフレームのうち、符号化装置10が管理している現在時刻情報に対応付けられるフレームが順次割り当てられる。
The
ブロッキングフィルタ102は、取得部101が取得した符号化対象フレームに含まれる処理単位であるブロック境界に対してブロッキングフィルタ処理を施す処理部である。ブロッキングフィルタ処理は、変換処理(後述)の処理単位であるブロックの境界で生じ得る不連続性を抑制するために、変換処理の前に施すべき処理である。
The blocking
変換部103は、ブロッキングフィルタ102がブロッキングフィルタ処理を施した後のフレームに対してブロックごとに変換処理を施す処理部である。変換処理の一例は、周波数変換処理である。周波数変換は、符号化対象フレームを、基底となる複数の三角関数の足し合わせとして表現する場合の係数(周波数係数)に変換する。なお、変換処理は、次数変換(例えば、アダマール変換)処理等を採用することもできる。
The
差分部104は、変換部103が変換処理を施した後の符号化対象フレーム(周波数係数)と、参照用保持部108が保持している参照用フレームとの差分を算出することで、差分フレームを生成する処理部である。差分部104は、上記差分を算出する前に、参照用保持部108から参照用フレームを読み出す。差分部104は、符号化対象フレームがキーフレームでない場合に上記差分を算出し、キーフレームである場合には上記差分を算出しない。なお、符号化対象フレームがキーフレームであるか、又は、キーフレームでないかは、差分部104が変換部103から符号化対象フレームを取得した時点までに決定されていてもよいし、何らかの制御に基づいて差分部104が決定してもよい。この制御には、例えば、後述する変形例における制御部111による制御がある。
The
差分部104が参照用フレームを読み出すタイミングは、取得部101がフレーム保持部100から符号化対象フレームを読み出すタイミングより後になる。なぜなら、取得部101がフレーム保持部100から符号化対象フレームを読み出した後に、ブロッキングフィルタ102及び変換部103の処理が実行され、その後に、差分部104が参照用フレームを読み出すからである。言い換えれば、ブロッキングフィルタ102及び変換部103が、取得部101による符号化対象フレームの読み出しに対して、差分部104による参照用フレームの読み出しを遅延させる遅延部として機能するとも言える。
The timing at which the
量子化部105は、変換部103が変換処理を施した後の符号化対象フレーム、又は、差分部104が生成した差分フレームを量子化する(つまり、上記フレームを量子化係数に変換する)処理部である。
The
符号化部106は、量子化部105が量子化したフレームを符号化することで符号化データを生成する処理部である。符号化部106が生成した符号化データが、符号化装置10が送信するコンテンツデータに相当する。
The
逆量子化部107は、量子化部105による量子化後のフレームを逆量子化する処理部である。逆量子化部107は、量子化部105による量子化後のフレームがキーフレームである場合に逆量子化を行う。逆量子化部107は、逆量子化したフレームを参照用フレームとして参照用保持部108に格納する。
The
参照用保持部108は、逆量子化部107が逆量子化した後のキーフレームを参照用フレームとして保持する記憶部である。参照用保持部108が保持するキーフレームは、差分部104に参照され、差分を算出する処理に用いられる。参照用保持部108は、例えばメインメモリ12により実現される。
The
以上のように構成された符号化装置10の処理について説明する。
Processing of the
図4は、本実施の形態に係る符号化装置10の処理を示すフロー図である。
FIG. 4 is a flowchart showing processing of the
ステップS101において、取得部101は、符号化対象フレームをフレーム保持部100から読み出すことで取得する。
In step S <b> 101, the
ステップS102において、ブロッキングフィルタ102は、取得部101が取得した符号化対象フレームにおけるブロック境界に対してブロッキングフィルタ処理を施す。
In step S <b> 102, the blocking
ステップS103において、変換部103は、ブロッキングフィルタ102によるブロッキングフィルタ処理後のフレームに対してブロックごとに変換処理を施す。
In step S <b> 103, the
ステップS104において、符号化装置10は、符号化対象フレームがキーフレームであるか否かに応じて処理を分岐する。符号化対象フレームがキーフレームである場合(ステップS104でYes)にはステップS105に進み、そうでない場合(ステップS104でNo)には、ステップS111に進む。
In step S104, the
ステップS105において、量子化部105は、変換部103が変換処理を施した後の符号化対象フレームに量子化処理を施す。
In step S105, the
ステップS106において、逆量子化部107は、量子化部105による量子化後のキーフレームに逆量子化処理を施す。
In step S <b> 106, the
ステップS107において、逆量子化部107は、ステップS106で逆量子化したフレームを参照用保持部108に格納する。
In step S107, the
ステップS111において、差分部104は、変換部103が変換処理を施した後の符号化対象フレームと、参照用保持部108から読み出した参照用フレームとの差分を、差分フレームとして生成する。
In step S111, the
ステップS112において、量子化部105は、差分部104が変換処理を施した後の差分フレームを量子化する。
In step S112, the
ステップS108において、符号化部106は、量子化部105が量子化したキーフレームを符号化して符号化データを生成する。生成された符号化データは、送信装置1により再生装置2に送信される。
In step S108, the
図5は、本実施の形態に係る復号装置20の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of
図5に示されるように、復号装置20は、復号部201と、加算部202と、逆量子化部203と、参照用保持部204と、逆変換部205と、デブロッキングフィルタ206と、生成部207とを備える。
As illustrated in FIG. 5, the
復号部201は、符号化装置10が送信したコンテンツデータである符号化データを復号対象フレームとして受信して復号する処理部である。復号部201が復号により生成するフレームは、符号化部106による符号化の対象となった元データである符号化対象フレーム(量子化係数)である。
The
加算部202は、復号部201が復号した復号対象フレームと、参照用保持部204が保持している参照用フレームとを加算することで、加算フレーム(量子化係数)を生成する処理部である。加算部202は、上記の加算処理をする前に、参照用保持部204から参照用フレームを読み出す。加算部202が生成した加算フレームは、変換部103が符号化対象フレームに基づいて生成した周波数係数である。
The
逆量子化部203は、加算部202が加算処理により生成した加算フレームを逆量子化することで、復号対象フレーム(周波数係数)を算出する処理部である。逆量子化部203の処理は、符号化装置10の逆量子化部107と同じである。
The
参照用保持部204は、逆量子化部203が生成した復号対象フレームのうちのキーフレームを、参照用フレームとして保持する記憶部である。参照用保持部204が保持するキーフレームは、加算部202に参照され、加算の処理に用いられる。参照用保持部204は、例えばメインメモリ12等により実現される。
The
逆変換部205は、逆量子化部203が逆量子化により生成した復号対象フレーム(周波数係数)に対して、逆変換処理を施す処理部である。逆変換処理は、符号化装置10の変換部103による変換とは逆の変換を行う。具体的には、逆変換処理は、変換部103が周波数変換を行う場合には逆周波数変換処理であり、変換部103が次数変換を行う場合には逆次数変換処理である。
The
デブロッキングフィルタ206は、逆変換部205が逆変換処理を施した後の復号対象フレームにおけるブロック境界に対してデブロッキングフィルタ処理を施す処理部である。
The
生成部207は、デブロッキングフィルタ206によるデブロッキングフィルタ処理が施された加算フレームを取得し、取得した加算フレームに属性情報等を付加することでフレームを生成し、後段の処理に渡す処理部である。
The generation unit 207 is a processing unit that acquires an addition frame that has been subjected to deblocking filter processing by the
以上のように構成された復号装置20の処理について説明する。
Processing of the
図6は、本実施の形態に係る復号装置20の処理を示すフロー図である。
FIG. 6 is a flowchart showing processing of the
ステップS201において、復号部201は、符号化データを受信して復号することで復号対象フレームを取得する。
In step S201, the
ステップS202において、復号装置20は、復号対象フレームがキーフレームであるか否かに応じて処理を分岐する。復号対象フレームがキーフレームである場合(ステップS202でYes)にはステップS203に進み、そうでない場合(ステップS202でNo)には、ステップS211に進む。
In step S202, the
ステップS203において、逆量子化部203は、復号対象フレームであるキーフレームを逆量子化する。
In step S203, the
ステップS204において、逆量子化部203は、ステップS203で逆量子化したキーフレームを参照用保持部204に格納する。
In step S204, the
ステップS205において、逆変換部205は、逆量子化部203が逆量子化した加算フレームに対して、逆変換処理を施す。
In step S <b> 205, the
ステップS206において、デブロッキングフィルタ206は、逆変換部205が逆変換処理を施した後の加算フレームにおけるブロック境界に対してデブロッキングフィルタ処理を施す。
In step S206, the
ステップS207において、生成部207は、フレームを生成し、後段の処理に渡す。 In step S207, the generation unit 207 generates a frame and passes it to a subsequent process.
ステップS211において、加算部202は、復号部201が復号により生成したフレームと、参照用保持部204から読み込んだ参照用フレームとを加算することで、加算フレームを生成する。
In step S211, the
ステップS212において、逆量子化部203は、加算部202が加算処理により生成した加算フレームを逆量子化する。
In step S212, the
以降において、本実施の形態に係る符号化装置において、符号化データのサイズを削減する技術についてより詳細に説明する。より具体的には、本実施の形態に係る符号化装置は、符号化処理結果に応じて、新たなフレームをフレーム内符号化するか、又は、フレーム間符号化するか、言い換えれば、どのフレームをキーフレームとするかを適切に決定することで、符号化データのサイズを削減する。 Hereinafter, a technique for reducing the size of encoded data in the encoding apparatus according to the present embodiment will be described in more detail. More specifically, the encoding apparatus according to the present embodiment performs an intraframe encoding or an interframe encoding on a new frame according to the encoding processing result, in other words, which frame By appropriately determining whether to be a key frame, the size of the encoded data is reduced.
図7は、本実施の形態に係る符号化装置の構成をより詳しく示すブロック図である。図8は、本実施の形態に係る制御部111により検出される、コンテンツにおけるスクロールの一例の説明図である。図9は、本実施の形態に係る制御部111により検出される、コンテンツにおけるシーン切替の一例の説明図である。
FIG. 7 is a block diagram showing in more detail the configuration of the coding apparatus according to the present embodiment. FIG. 8 is an explanatory diagram of an example of scrolling in content detected by the
図7に示されるように、符号化装置10Aは、フレーム保持部100と、取得部101と、ブロッキングフィルタ102と、変換部103と、差分部104Aと、量子化部105と、符号化部106と、逆量子化部107と、参照用保持部108と、制御部111と、切替部112とを備える。
As illustrated in FIG. 7, the
ここで、フレーム保持部100と、取得部101と、ブロッキングフィルタ102と、変換部103と、量子化部105と、符号化部106と、逆量子化部107と、参照用保持部108とについては、上記符号化装置10の同名の構成要素と同じ機能を有するので、詳細な説明を省略する。
Here, the
差分部104Aは、上記符号化装置10における差分部104と同様、変換部103が変換処理を施した後の符号化対象フレームと、参照用保持部108が保持している参照用フレームとの差分を、差分フレームとして生成する処理部である。差分部104Aが変換部103からフレームを取得する時点では、このフレームがキーフレームであるか又は差分フレームであるかは決定されておらず、後段の制御部111により切替部112の状態が制御されることで、このフレームがキーフレームになるか、差分フレームになるかが決定される。差分部104Aに入力されたフレームがフレーム間符号化される(差分フレームになる)場合には、後段の切替部112を通じて量子化部105に提供される。一方、差分部104Aに入力されたフレームがフレーム内符号化される(キーフレームになる)場合には、差分部104Aに入力されたフレームが量子化部105に提供され、差分部104Aが生成した差分フレームは後段の処理に使われない。
Similar to the
制御部111は、符号化部106が符号化により生成した符号化データに基づく判定を行い、判定結果に応じて新たな符号化対象フレームの符号化を制御する処理部である。具体的には、制御部111は、コンテンツに含まれる一連のフレームのうちの第一フレームを符号化部106がフレーム内符号化した場合には、一連のフレームのうち第一フレームの次の第二フレームをフレーム間符号化するよう制御する。また、制御部111は、一連のフレームのうちの第三フレームを符号化部106がフレーム間符号化した場合には、既にフレーム間符号化されたフレームのうち第三フレームを終端とする連続した第一所定数のフレームそれぞれのデータサイズが第一閾値以上であるとき、一連のフレームのうち第三フレームの次の第四フレームをフレーム内符号化するよう制御する。ここで、制御部111は、フレーム間符号化されたフレームのそれぞれのデータサイズが第一閾値以上であるとき、一連のフレームのうち第四フレームを始端とする連続した第二所定数のフレームをフレーム内符号化するよう制御してもよい。また、制御部111は、第一フレームを符号化部106がフレーム内符号化した場合には、一連のフレームのうちの第二フレーム以降のフレームを、再生順に順次にフレーム間符号化するよう制御し、第二フレーム以降のフレームのうちの第八フレームをフレーム間符号化した時点において、フレーム間符号化された第八フレームのデータサイズが第二閾値以上であるときには、一連のフレームのうち第八フレームの次の第九フレームをフレーム内符号化するよう制御してもよい。
The
制御部111は、符号化部106が符号化により生成した符号化データ(又は、当該符号化データの複製)を取得して、符号化データに含まれるフレームがキーフレームであるか否かを示す情報と、符号化データのデータサイズとを得る。そして、上記情報と上記データサイズとに基づく判定を行い、符号化装置10Aが次に符号化する新たな符号化対象フレームを、フレーム内符号化するか、又は、フレーム間符号化するか(言い換えれば、どのフレームをキーフレームにし、どのフレームを差分フレームにするか)を決定する。そして、制御部111は、決定結果に応じて、切替部112の状態を制御する。
The
制御部111による判定は、主としてフレームにおけるスクロール検出とシーン切替検出とに基づいてなされる。ここでは、スクロールとは、フレームに含まれる画素が全体的に一の方向に移動することを言い、例えばコンピュータグラフィックスにより生成された文字列画像がフレーム内で上下方向又は左右方向に移動すること、カメラにより撮影されたコンテンツにおいて、カメラの撮影方向が左右方向又は上下方向に振れる(パン、チルト、又は、手ぶれ)ことでフレーム内の画像がカメラの向きと反対方向に移動すること、などをいう(図8参照)。制御部111は、フレームをフレーム間符号化した場合に、フレーム間符号化されたフレームのデータサイズが、閾値Aを超えることが所定値B回継続したことを、スクロールとして検出する。スクロールを検出した場合、制御部111は、連続する所定値A個のフレームをフレーム内符号化する。上記閾値Aは、上記第一閾値に相当する。また、所定値B及び所定値Aは、それぞれ、第一所定数及び第二所定数に相当する。
The determination by the
なお、閾値Aは、例えば過去の最新のフレーム内符号化されたフレームのデータサイズとすることができる。所定値Bは、1以上の自然数をとることができ、符号化されたフレームのデータサイズが突発的に大きくなってもスクロールを検出しないフレーム連続数に基づいて任意に定められ得る。所定値Bについては後で詳しく説明する。 The threshold A can be the data size of the latest intra-frame encoded frame, for example. The predetermined value B can take a natural number of 1 or more, and can be arbitrarily determined based on the number of consecutive frames in which no scroll is detected even if the data size of the encoded frame suddenly increases. The predetermined value B will be described in detail later.
また、シーン切替とは、連続するフレームの内容が不連続に切り替わることを言い、例えば、映画又はドラマなどにおける異なる場面への変更、又は、実写に基づくシーンからアニメーション若しくはコンピュータグラフィックスにより生成されたシーンへの変更等をいう(図9参照)。制御部111は、複数のフレームを連続してフレーム内符号化している場合において、フレーム内符号化されたフレームのデータサイズが所定値C以上変化したことを、シーン切替として検出する。上記所定値Cは、第三所定値に相当する。
In addition, scene switching means that the contents of continuous frames are switched discontinuously. For example, a change to a different scene in a movie or a drama, or a scene based on a live action is generated by animation or computer graphics. This refers to changes to the scene (see FIG. 9). The
また、制御部111は、イントラモードとインターモードとの2つの符号化モードのいずれかで、コンテンツに含まれる一連のフレームをフレーム内符号化又はフレーム間符号化するよう制御する。ここで、イントラモードとは、一連のフレームそれぞれをフレーム内符号化する符号化モードである。また、インターモードとは、一連のフレームのうちの一部のフレームをフレーム内符号化し、上記一部を除くフレームについては、フレーム内符号化したフレームからの差分を符号化する(つまり、フレーム間符号化する)符号化モードである。制御部111は、符号化部106が生成した符号化データに含まれるフレームがキーフレームであるか否かを示す情報と、符号化データのデータサイズとに基づいて、符号化モードをイントラモードとインターモードとに相互に切り替える。符号化モードを切り替えるための条件等については後で詳しく説明する。
In addition, the
なお、制御部111は、スクロール検出処理において、上記説明におけるスクロールの検出よりも早期にスクロールを検出することもできる。上記のとおり、制御部111は、スクロールが検出された後には所定数のフレームがフレーム内符号化され、その後のフレームがフレーム間符号化されるよう制御する。ここで、コンテンツにおけるスクロールが継続的に発生している場合には、所定数のフレームがフレーム内符号化された後にもスクロールが発生していることが想定される。そこで、所定数のフレームがフレーム内符号化された後には、連続して所定値D個(ここでD<B)のフレーム間符号化されたフレームのデータサイズが閾値Aを超えている場合に、スクロールが発生していることを検出する。このように早期にスクロールを検出することで、フレーム間符号化によるデータサイズの上昇を抑えることができる利点がある。
Note that the
切替部112は、後段の量子化部105に提供されるフレームを、変換部103が変換処理を施した後のフレームとするか、又は、差分部104Aが差分処理により生成した差分フレームとするかを切り替える切替部である。切替部112が、変換部103が変換処理を施した後のフレームを量子化部105に提供する状態、つまり、図9において端子aと端子cとが接続される状態を状態Aという。また、切替部112が、差分部104Aが差分処理により生成した差分フレームを量子化部105に提供する状態、つまり、図面において端子bと端子cとが接続される状態を状態Bという。切替部112が状態Aをとるか、状態Bをとるかは、制御部111により制御される。
Whether the
なお、上記の差分部104A及び切替部112の動作は、上記符号化装置10の差分部104による、符号化対象フレームがキーフレームでない場合に上記差分を算出し、キーフレームである場合には上記差分を算出しないという動作と同様である。つまり、差分部104A及び切替部112は、上記符号化装置10の差分部104を、2つの構成要素に分けてより具体的に記載したものである。
Note that the operations of the
以上のように構成された符号化装置10Aの処理についてフロー図を用いて説明する。
The processing of the
図10は、本実施の形態に係る符号化装置10Aの処理を示すフロー図である。
FIG. 10 is a flowchart showing processing of the
図10に示されるように、符号化装置10Aは、符号化処理S301を実行し、符号化処理S301によって生成された符号化データを送信する送信処理S302を行う。その後、実行した符号化処理S301の結果に応じて符号化制御処理S303を実行する。送信処理S302と符号化制御処理S303とはどちらが先でもよい。
As illustrated in FIG. 10, the
符号化処理S301及び符号化制御処理S303について、以下で詳しく説明する。 The encoding process S301 and the encoding control process S303 will be described in detail below.
図11は、実施の形態に係る符号化装置10Aの符号化処理S301を示すフロー図である。
FIG. 11 is a flowchart showing an encoding process S301 of the
図11におけるステップS101からS108の処理については、図4に示されるステップS101からS108の処理と実質的に同じである。ここで、ステップS104Aは、ステップS104の処理の内容をより具体的にしたものである。 The processing of steps S101 to S108 in FIG. 11 is substantially the same as the processing of steps S101 to S108 shown in FIG. Here, step S104A is a more specific content of the process of step S104.
ステップS104Aにおいて、制御部111は、符号化対象フレームをフレーム内符号化するか又はフレーム間符号化するかを、切替部112の状態に応じて切り替える。すなわち、切替部112が状態Aである場合(ステップS104Aで「フレーム内符号化」)には、符号化対象フレームをフレーム内符号化する一連の処理(ステップS105〜S107)を行う。一方、切替部112が状態Bである場合(ステップS104Aで「フレーム間符号化」)には、符号化対象フレームをフレーム間符号化する一連の処理(ステップS111〜S112)を行う。
In step S <b> 104 </ b> A, the
図12Aは、実施の形態に係る符号化装置10Aの符号化制御処理S303を示す第一のフロー図である。図12Bは、実施の形態に係る符号化装置10Aの符号化制御処理S303を示す第二のフロー図である。
FIG. 12A is a first flowchart illustrating an encoding control process S303 of the
図12Aに示されるように、ステップS401において、制御部111は、符号化部106により符号化されたフレームがキーフレームであるか否か、言い換えれば、符号化部106がフレームをフレーム内符号化したか、又は、フレーム間符号化したかを判定する。符号化部106により符号化されたフレームがキーフレームであると判定した場合(ステップS401でYes)には、ステップS402に進み、そうでない場合(ステップS401でNo)には、端子Aを経て、ステップS431(図12B参照)に進む。
As shown in FIG. 12A, in step S401, the
ステップS402において、制御部111は、現時点の符号化モードがイントラモードであるか、又は、インターモードであるかに基づいて処理を分岐する。現時点の符号化モードがイントラモードである場合(ステップS402で「イントラモード」)には、ステップS403に進み、現時点の符号化モードがインターモードである場合(ステップS402で「インターモード」)には、ステップS421に進む。
In step S402, the
ステップS403において、制御部111は、符号化されたフレームにおいてシーン切替が検出されたか否かを判定する。シーン切替が検出された場合(ステップS403でYes)にはステップS411に進み、そうでない場合(ステップS403でNo)には、ステップS404に進む。
In step S403, the
ステップS404において、制御部111は、カウンタAをインクリメント(1加算)する。
In step S404, the
ステップS405において、制御部111は、カウンタAが所定値A以上であるか否かを判定する。カウンタAが所定値A以上であると判定した場合にはステップS411に進み、そうでない場合にはステップS406に進む。
In step S405, the
ステップS406において、制御部111は、一連のフレームのうちの次のフレームをフレーム内符号化するよう制御する。具体的には、制御部111は、切替部112を状態Aに維持する。
In step S406, the
ステップS407において、制御部111は、符号化されたフレーム(キーフレーム)のデータサイズを、後の処理のために保存する。ステップS407の処理を終えたら、本フロー図に示される一連の処理を終了する。
In step S407, the
ステップS411において、制御部111は、イントラモードからインターモードに遷移する。
In step S411, the
ステップS412において、制御部は、一連のフレームのうちの次のフレームをフレーム間符号化するよう制御する。具体的には、制御部111は、切替部112を状態Bに変更する。ステップS412の処理を終えたらステップS407に進む。
In step S412, the control unit controls to inter-code the next frame of the series of frames. Specifically, the
ステップS421において、制御部111は、一連のフレームのうちの次のフレームをフレーム間符号化するよう制御する。具体的には、制御部111は、切替部112を状態Bに変更する。ステップS421の処理を終えたら、本フロー図に示される一連の処理を終了する。
In step S421, the
図12Bに示されるように、ステップS431において、制御部111は、符号化部106が符号化により生成した符号化データのデータサイズが閾値Aより大きいか否かを判定する。符号化データのデータサイズが閾値Aより大きいと判定した場合(ステップS431でYes)にはステップS432に進み、そうでない場合(ステップS431でNo)には、ステップS451に進む。
As illustrated in FIG. 12B, in step S431, the
ステップS432において、制御部111は、カウンタBをインクリメントする。
In step S432, the
ステップS433において、制御部111は、カウンタBが所定値B以上であるか否かを判定する。カウンタBが所定値B以上である場合(ステップS433でYes)にはステップS435に進み、そうでない場合(ステップS433でNo)には、ステップS441に進む。
In step S433, the
ステップS434において、制御部111は、インターモードからイントラモードに遷移する。
In step S434, the
ステップS435において、制御部111は、一連のフレームのうちの次のフレームをフレーム内符号化するよう制御する。具体的には、制御部111は、切替部112を状態Aに変更する。ステップS421の処理を終えたら、端子Bを経て、本フロー図に示される一連の処理を終了する。
In step S435, the
ステップS441において、制御部111は、『現時点の符号化モードであるインターモードがステップS405の条件「カウンタA≧所定値A」の成立によりインターモードから変更されたものであり、かつ、カウンタBが所定値D以上である』との条件を満たすか否かを判定する。この条件を満たすと、スクロールが早期に検出されたことになる。上記条件を満たすと判定した場合(ステップS441でYes)にはステップS442に進み、そうでない場合(ステップS441でNo)にはステップS435に進む。
In step S441, the
ステップS442において、制御部111は、インターモードからイントラモードに遷移する。ステップS442の処理を終えたらステップS435に進む。
In step S442, the
ステップS451において、制御部111は、符号化データのデータサイズが閾値B(第二閾値に相当)より大きいか否かを判定する。符号化データのデータサイズが閾値Bより大きいと判定した場合(ステップS451でYes)にはステップS452に進み、そうでない場合(ステップS451でNo)にはステップS453に進む。
In step S451, the
ステップS452において、制御部111は、一連のフレームのうちの次のフレームをフレーム内符号化するよう制御する。具体的には、制御部111は、切替部112を状態Aに変更する。ステップS452の処理を終えたら、端子Bを経て、本フロー図に示される一連の処理を終了する。
In step S452, the
ステップS453において、制御部111は、一連のフレームのうちの次のフレームをフレーム間符号化するよう制御する。具体的には、制御部111は、切替部112を状態Bに維持する。ステップS453の処理を終えたら、端子Bを経て、本フロー図に示される一連の処理を終了する。
In step S453, the
以上の一連の処理により、符号化装置10Aは、スクロール検出及びシーン検出に基づいて、符号化データのサイズを削減することができる。
Through the series of processes described above, the
以降では、符号化装置10Aが行うスクロール検出及びシーン検出に基づく符号化データのデータサイズの削減効果についてのシミュレーション評価を、スクロール検出及びシーン検出に関わる処理とともに説明する。なお、以降の説明におけるグラフでは、一連のフレームを再生順に並べた場合のフレーム(フレームナンバ)を横軸に示し、フレームそれぞれが符号化されて生成されるフレームサイズを縦軸に示す。また、グラフ上の各モードでのデータサイズ等に対応するシンボルを結ぶ直線は、同種のシンボルの推移を分かりやすく示すための説明用の直線である。データサイズ等は、横軸の整数値に対応する各シンボルだけが意味をもち、直線のうち、隣接する整数値の間の部分は意味をもたないものとする。
In the following, simulation evaluation of the effect of reducing the data size of encoded data based on scroll detection and scene detection performed by the
なお、以下において、「スクロール検出モード」という動作態様を用いて説明する。スクロール検出モードとは、図12A及び図12Bのフロー図において、シーン切替検出処理に含まれるステップS403を除外したものに相当する。スクロール検出モードのフロー図を図13に示す。図13に示される各処理ステップは、図12A又は図12Bの同名の処理ステップと同じ処理を行うものであるので、詳細な説明を省略する。 In the following description, an operation mode called “scroll detection mode” is used. The scroll detection mode corresponds to a state in which step S403 included in the scene switching detection process is excluded from the flowcharts of FIGS. 12A and 12B. A flowchart of the scroll detection mode is shown in FIG. Each processing step shown in FIG. 13 performs the same processing as the processing step of the same name in FIG. 12A or FIG.
まず、スクロール検出についてのシミュレーション結果を説明する。 First, simulation results for scroll detection will be described.
図14〜図17は、本実施の形態に係る符号化装置10Aによるスクロール検出の効果を説明する説明図である。 14-17 is explanatory drawing explaining the effect of the scroll detection by 10 A of encoding apparatuses based on this Embodiment.
まず、図14を参照しながら、イントラモードのみの場合と、インターモードのみの場合とについて説明する。ここで、「イントラモードのみ」とは、常にイントラモードで動作し、イントラモードから他のモードに遷移しない動作態様をいう。また、「インターモードのみ」とは、常にインターモードで動作し、インターモードから他のモードに遷移しない動作態様をいう。 First, the case of only the intra mode and the case of only the inter mode will be described with reference to FIG. Here, “intra mode only” means an operation mode that always operates in the intra mode and does not transition from the intra mode to another mode. “Inter mode only” refers to an operation mode that always operates in the inter mode and does not transition from the inter mode to another mode.
図14は、フレーム内の画像の動きが比較的少ない場合の、イントラモードのみ、及び、インターモードのみのそれぞれの場合における、符号化データのデータサイズを示している。 FIG. 14 shows the data size of the encoded data in each of the intra mode only and the inter mode only when the motion of the image in the frame is relatively small.
イントラモードのみの場合では、符号化されたフレーム1のデータサイズが約300バイトであり、フレームナンバが進むにつれて徐々にデータサイズが上昇している。このデータサイズの上昇は、フレームに含まれる画像の内容に依存したものであり、一般に、フレームに含まれる画像の動きが徐々に激しくなった場合などにこのようなデータサイズの上昇が観測される。
In the case of only the intra mode, the data size of the encoded
インターモードのみの場合では、まず、フレーム1がキーフレームとしてフレーム内符号化される。その後、フレーム2以降のフレームが再生順に順次に、過去の最新のキーフレームであるフレーム1からの差分を用いてフレーム間符号化される。フレーム2以降のフレームが再生順に順次にフレーム間符号化されると、符号化されたフレームのデータサイズが徐々に上昇している。また、図14には、各フレームについての閾値Bを示す破線が描かれている。ここでは、閾値Bは、当該フレームの直前のキーフレームのデータサイズの4/5としている。
In the case of only the inter mode, first,
符号化されたフレームのデータサイズが閾値Bを超えないとき(フレーム2〜6)は、そのフレームの次のフレームはフレーム間符号化される(ステップS451でNo、ステップS453)。そして、符号化されたフレーム7のデータサイズが閾値Bを超えると、その次のフレーム8はフレーム内符号化される(ステップS451でYes、ステップS452)。
When the data size of the encoded frame does not exceed the threshold B (frames 2 to 6), the next frame of the frame is inter-frame encoded (No in step S451, step S453). When the data size of the encoded
図14に示されるように、符号化装置10Aは、上記コンテンツを符号化する場合には、イントラモードのみで符号化するより、インターモードのみで符号化する方が、データサイズを小さくすることができる。
As shown in FIG. 14, when encoding the content, the
なお、図14のインターモードのみの符号化モードにおけるフレーム7が第八フレームに相当し、フレーム8が第九フレームに相当する。
14 corresponds to the eighth frame, and
図15は、フレーム内でスクロールが発生している場合の、イントラモードのみ、及び、インターモードのみのそれぞれの場合における符号化データのデータサイズを示している。 FIG. 15 shows the data size of the encoded data in each of the intra mode only and the inter mode only when scrolling occurs in the frame.
イントラモードのみの場合では、符号化されたフレーム1のデータサイズが約300バイトであり、フレームナンバが進むにつれて徐々にデータサイズが上昇している。図14での説明と同様、このデータサイズの上昇は、フレームに含まれる画像の内容に依存したものである。
In the case of only the intra mode, the data size of the encoded
インターモードのみの場合では、まず、フレーム1がキーフレームとしてフレーム内符号化され、その後、フレーム2以降のフレームが再生順に順次に、フレーム1からの差分を用いてフレーム間符号化される。また、図15には、各フレームについての閾値Aを示す破線が描かれている。ここでは、閾値Aは、当該フレームの直前のキーフレームのデータサイズとしている。
In the case of only the inter mode, first, the
ここで、符号化されたフレーム2のデータサイズが閾値Aを超えると、その次のフレーム3はフレーム内符号化される(ステップS431でYes、ステップS435)。その後、フレーム4がフレーム内符号化され、そのデータサイズが閾値を超えることで、その次のフレーム5がフレーム内符号化される。以降同様に繰り返される。
If the data size of the encoded
図15に示されるように、スクロールが発生しているコンテンツを符号化する場合には、符号化装置10Aは、インターモードのみで符号化するより、イントラモードのみで符号化する方が、データサイズを小さくすることができる。
As shown in FIG. 15, when encoding content in which scrolling has occurred, the
すなわち、コンテンツにスクロールが発生しているか否かに応じて、イントラモードのみ、及び、インターモードのみ、のうち、データサイズを小さくすることができる符号化モードが用いられる。 In other words, depending on whether scrolling has occurred in the content, an encoding mode in which the data size can be reduced among the intra mode only and the inter mode only is used.
図16は、図15と同じコンテンツである(フレーム内でスクロールが発生している)場合の、インターモードのみ、及び、インターモードにおいてスクロール検出に基づいてイントラモードに遷移するモード(以降、スクロール検出モードともいう)のそれぞれの場合における符号化データのデータサイズを示している。なお、スクロール検出処理に用いられる所定値B(図12BのステップS433)を2としている。 FIG. 16 shows only the inter mode when the content is the same as FIG. 15 (scrolling is occurring in the frame), and a mode for transitioning to the intra mode based on scroll detection in the inter mode (hereinafter, scroll detection). The data size of the encoded data in each case) is also shown. The predetermined value B (step S433 in FIG. 12B) used for the scroll detection process is set to 2.
インターモードのみの場合の符号化フレームのデータサイズは、図15で示したものと同一である。 The data size of the encoded frame in the case of only the inter mode is the same as that shown in FIG.
スクロール検出モードの場合では、フレーム4まではインターモードのみのデータサイズと同じであるが、フレーム5からはイントラモードのみのデータサイズと同じになる。
In the case of the scroll detection mode, the data size up to frame 4 is the same as the data size only in the inter mode, but the data size from
これは、フレーム4をフレーム間符号化した時点において、既にフレーム間符号化されたフレームのうちフレーム4を終端とする連続した2個のフレーム(つまり、フレーム2及び4)それぞれのデータサイズが閾値Aを超えていることに基づいて、インターモードからイントラモードに遷移したことによる。
This is because, when the
このように、インターモードにおいてスクロール検出に基づいてイントラモードに遷移するようにすると、インターモードのみの場合よりもデータサイズの総量を小さくすることができる効果がある。 As described above, in the inter mode, when the mode is changed to the intra mode based on the scroll detection, there is an effect that the total amount of the data size can be made smaller than that in the case of only the inter mode.
なお、図16のスクロール検出モードにおけるフレーム1、2、4及び5が、それぞれ、第一フレーム、第二フレーム、第三フレーム及び第四フレームに相当する。 Note that frames 1, 2, 4, and 5 in the scroll detection mode of FIG. 16 correspond to the first frame, the second frame, the third frame, and the fourth frame, respectively.
なお、スクロール検出処理において所定値Bを1とは異なる値に設定することができることによる効果を以下で説明する。 The effect of being able to set the predetermined value B to a value different from 1 in the scroll detection process will be described below.
図17は、コンテンツ内で突発的に大きな動きが生じた場合における、イントラモードのみ、スクロール検出モード(所定値B=1)、及び、スクロール検出モード(所定値B=2)での符号化データのデータサイズを示している。突発的な大きな動きは、フレーム6で生じたとする。なお、「スクロール検出モード(所定値B=1)」との記載は、スクロール検出モードであって、所定値Bを1とするものを意味する。以降でもこの記載を用いる。
FIG. 17 shows encoded data in only the intra mode, the scroll detection mode (predetermined value B = 1), and the scroll detection mode (predetermined value B = 2) when a sudden large movement occurs in the content. Indicates the data size. Assume that a sudden large movement occurs in the
スクロール検出モード(所定値B=1)では、フレーム6における1回のデータサイズの上昇に基づいて、インターモードからイントラモードへ遷移し、それ以降のフレームをイントラモードで符号化する。
In the scroll detection mode (predetermined value B = 1), the transition from the inter mode to the intra mode is performed based on a single increase in the data size in the
一方、スクロール検出モード(所定値B=2)では、フレーム6における1回のデータサイズの上昇だけでは、イントラモードへ遷移せず、それ以降のフレームをインターモードで符号化する。
On the other hand, in the scroll detection mode (predetermined value B = 2), the transition to the intra mode is not made only by a single increase in the data size in the
コンテンツ内の動きが突発的であれば、その後のコンテンツ内の動きの大きさは、突発的な上昇の前と同程度になると予想される。よって、一回だけのデータサイズの上昇があってもインターモードを維持する方が望ましい。スクロール検出モード(所定値B=2)では、一回だけのデータサイズの上昇があってもインターモードを維持することができる効果がある。 If the movement in the content is sudden, the magnitude of the subsequent movement in the content is expected to be about the same as before the sudden increase. Therefore, it is desirable to maintain the inter mode even if the data size increases only once. In the scroll detection mode (predetermined value B = 2), there is an effect that the inter mode can be maintained even if the data size is increased only once.
なお、所定値Bの大きさは、突発的にデータサイズが大きくなることを許容するフレームの連続数に応じて任意に、例えば5又は30というように、定めることができる。 Note that the size of the predetermined value B can be determined arbitrarily, for example, 5 or 30, depending on the number of consecutive frames that allow the data size to suddenly increase.
次に、シーン切替検出の効果について説明する。 Next, the effect of scene change detection will be described.
図18〜図20は、本実施の形態に係る符号化装置10Aによるシーン切替検出の効果を説明する説明図である。 18-20 is explanatory drawing explaining the effect of the scene switch detection by 10 A of encoding apparatuses based on this Embodiment.
図18は、コンテンツ中にシーン切替が含まれている場合の、イントラモードのみ、及び、インターモードのみのそれぞれ場合における、符号化データのデータサイズを示している。シーン切替はフレーム10に含まれているとする。また、シーン切替の前のフレーム1〜9ではコンテンツ中にスクロールが含まれており、シーン切替の後のフレーム11以降には、スクロールが含まれていないとする。
FIG. 18 shows the data size of the encoded data in the case of only the intra mode and the inter mode when scene switching is included in the content. It is assumed that scene switching is included in the
イントラモードのみの場合では、符号化されたフレーム1のデータサイズが約300バイトであり、フレームナンバが進むにつれて徐々にデータサイズが上昇している。また、シーン切替を含むフレーム10でデータサイズが一段と上昇している。
In the case of only the intra mode, the data size of the encoded
インターモードのみの場合では、シーン切替の前のフレームについては、フレーム間符号化されたフレーム2、4、6、8及び10のデータサイズが、当該フレームの直前のキーフレームのデータサイズを超えている。
In the case of only the inter mode, for the frame before the scene change, the data size of the
上記の、イントラモードのみの場合、及び、インターモードのみの場合それぞれのデータサイズは、削減することができる余地がある。具体的には、イントラモードのみの場合に着目すると、フレーム12以降のフレームをフレーム間符号化すればデータサイズを削減できる余地がある。また、インターモードのみの場合に着目すると、フレーム2、4、6、8及び10をフレーム内符号化すればデータサイズを削減できる余地がある。
In the case of only the intra mode and the case of only the inter mode, there is room for reducing the respective data sizes. Specifically, focusing on the case of the intra mode only, there is room for reducing the data size by inter-frame encoding the frames after
図19では、コンテンツ中にシーン切替が含まれている場合の、イントラモードのみ、インターモードのみ、及び、スクロール検出モードのそれぞれ場合における、符号化データのデータサイズを示している。シーン切替の位置等は図18と同じである。また、イントラモードのみ、及び、インターモードのみのグラフは、図18と同じである。 FIG. 19 shows the data size of the encoded data in each of the intra mode only, the inter mode only, and the scroll detection mode when scene switching is included in the content. The scene switching position and the like are the same as those in FIG. Further, the graph of only the intra mode and the inter mode is the same as that in FIG.
スクロール検出モードでは、インターモードのみの場合に比べて、フレーム6以降(より具体的にはフレーム6及び8)のデータサイズが削減されている。しかしながら、シーン切替の後(具体的にはフレーム12以降)にインターモードのみの場合よりデータサイズが大きくなる現象が生じている。これは、スクロール検出モードにおいてスクロール検出後には、スクロールが含まれているか否かに関わらずフレームをフレーム内符号化することを続けるので、フレーム間符号化する場合よりデータサイズが大きくなることが原因である。 In the scroll detection mode, the data size after frame 6 (more specifically, frames 6 and 8) is reduced compared to the case of only the inter mode. However, after scene switching (specifically, after frame 12), a phenomenon occurs in which the data size becomes larger than in the case of only the inter mode. This is because, after the scroll is detected in the scroll detection mode, since the frame is continuously encoded regardless of whether the scroll is included or not, the data size becomes larger than the case of the inter-frame encoding. It is.
図20では、コンテンツ中にシーン切替が含まれている場合の、スクロール検出モード及びシーン切替検出モードのそれぞれの場合における、符号化データのデータサイズを示している。シーン切替の位置等は図18と同じである。スクロール検出モードのグラフは、図18と同じである。なお、シーン切替検出モードとは、図12A及び図12Bに示されるフロー図に示されるすべての処理を行うモードをいう。 FIG. 20 shows the data size of the encoded data in each of the scroll detection mode and the scene change detection mode when scene switching is included in the content. The scene switching position and the like are the same as those in FIG. The graph of the scroll detection mode is the same as FIG. The scene switching detection mode is a mode in which all processes shown in the flowcharts shown in FIGS. 12A and 12B are performed.
図20に示されるシーン切替検出モードでは、シーン切替を検出した時点(つまりフレーム10を符号化した時点)でインターモードに遷移し、その次のフレーム11をフレーム間符号化する(ステップS403でYes、ステップS411、S412)。これにより、シーン切替後にフレーム内符号化を継続する。これにより、フレーム内符号化を継続することでフレーム間符号化をするよりデータサイズが大きくなること(図19参照)を回避することができる効果がある。
In the scene switching detection mode shown in FIG. 20, when the scene switching is detected (that is, when the
なお、図20のシーン検出モードにおけるフレーム10、9及び11が、それぞれ、第五フレーム、第六フレーム及び第七フレームに相当する。 Note that frames 10, 9, and 11 in the scene detection mode of FIG. 20 correspond to a fifth frame, a sixth frame, and a seventh frame, respectively.
次に、スクロール検出の早期判定の効果について説明する。 Next, the effect of the early determination of scroll detection will be described.
図21及び図22は、本実施の形態に係る符号化装置10Aによるスクロール検出の早期判定の効果を説明する説明図である。
21 and 22 are explanatory diagrams for explaining the effect of early determination of scroll detection by the
図21は、フレーム内でスクロールが発生している場合の、イントラモードのみ、及び、スクロール検出モードのそれぞれの場合における符号化データのデータサイズを示している。コンテンツは、図15におけるものと同じである。ここで、ステップS405(図12A)の所定値Aを5としている。 FIG. 21 shows the data size of the encoded data in each of the intra mode only and the scroll detection mode when scrolling occurs in the frame. The content is the same as in FIG. Here, the predetermined value A in step S405 (FIG. 12A) is set to 5.
この場合、符号化部106は、スクロール検出モードにおいて連続してフレーム間符号化されたフレーム(フレーム2及び4)のデータサイズが閾値Aを超えていることに基づいてインターモードからイントラモードに遷移し、フレーム5〜9の5個のフレームをフレーム内符号化する。その後、インターモードに遷移し(S405でYes、S411)、連続してフレーム間符号化されたフレーム(フレーム10及び12)が閾値Aを超えていることに基づいてインターモードからイントラモードに遷移し、フレーム13以降のフレームをフレーム内符号化する。
In this case, the
ここで、スクロールが継続的に発生している場合には、インターモードからイントラモードへの遷移を早期に行うことで、符号化されたフレームのデータサイズを抑制することができる。より具体的には、フレーム12をフレーム内符号化をすれば、当該フレームをフレーム間符号化する場合より、データサイズを小さくすることができる。
Here, when scrolling occurs continuously, the data size of the encoded frame can be suppressed by making an early transition from the inter mode to the intra mode. More specifically, if the
図22は、コンテンツ内でスクロールが発生している場合の、イントラモードのみ、スクロール検出モード、及び、スクロール早期検出モードのそれぞれの場合における符号化データのデータサイズを示している。コンテンツは、図15におけるものと同じである。ここで、ステップS441(図12B)の所定値Dを1としている。 FIG. 22 shows the data size of the encoded data in each of the intra mode only, the scroll detection mode, and the scroll early detection mode when scrolling occurs in the content. The content is the same as in FIG. Here, the predetermined value D in step S441 (FIG. 12B) is set to 1.
図22において、イントラモードでフレーム5〜9をフレーム内符号化した後、イントラモードに遷移すると、次のフレーム10をフレーム間符号化した時点で、データサイズが閾値Aを超える。これによりスクロールを早期検出する条件を満たす(S441でYes)ことでイントラモードに遷移しフレーム11以降をフレーム内符号化する。
In FIG. 22, when the
これにより、符号化部106は、フレーム12をフレーム内符号化する。これにより、フレーム12をフレーム間符号化するスクロール検出モードの場合より、データサイズを小さくすることができる効果がある。
Thereby, the
なお、符号化装置10Aは、さらに、符号化部106がフレーム内符号化又はフレーム間符号化することで生成した符号化データを送信する送信部(不図示)を備えてもよい。その場合に、さらに、符号化データに含まれるフレームがフレーム間符号化されたフレームであって、かつ、当該フレームのデータサイズが閾値以上である場合には、送信部が当該フレームを送信することを禁止する送信制御部(不図示)を備えてもよい。上記閾値は、例えば、送信部がその直前に送信したフレームのデータサイズに応じて定められるものとすることができ、より具体的には、送信部がその直前に送信したフレームのデータサイズの2倍とすることができる。
Note that the
このようなフレームの送信を禁止すると、復号装置によりこのフレームを再生することはできなくなるが、1フレームの再生がなくなる程度であれば、コンテンツの再生に大きな影響を与えないと考えられる。これにより、復号装置で再生されるコンテンツへの影響を抑えるとともに、ネットワークにおける通信量を抑制することができる。 If the transmission of such a frame is prohibited, this frame cannot be reproduced by the decoding device, but it is considered that the reproduction of the content is not greatly affected as long as one frame is not reproduced. As a result, it is possible to suppress the influence on the content played back by the decryption device and to suppress the traffic on the network.
(実施の形態の変形例)
本変形例において、符号化データのサイズを削減する符号化装置等において、さらにデータサイズの圧縮効果を高める技術について説明する。
(Modification of the embodiment)
In the present modification, a technique for further enhancing the data size compression effect in an encoding device or the like that reduces the size of encoded data will be described.
図23は、実施の形態の変形例に係る符号化装置10Bの構成を示すブロック図である。
FIG. 23 is a block diagram illustrating a configuration of an
図23に示されるように、符号化装置10Bは、フレーム保持部100と、取得部101と、ブロッキングフィルタ102と、変換部103と、差分部104Aと、量子化部105と、符号化部106と、逆量子化部107と、参照用保持部108と、制御部111Aと、切替部112と、再符号化用保持部121と、切替部122とを備える。
As illustrated in FIG. 23, the
ここで、制御部111A、再符号化用保持部121及び切替部122を除く構成要素については、上記実施の形態の同名の構成要素と同じ機能を有するので、詳細な説明を省略する。
Here, since the constituent elements excluding the
制御部111Aは、コンテンツに含まれる一連のフレームのうちの第一フレームを符号化部106がフレーム内符号化した場合には、一連のフレームのうち第一フレームの次の第二フレームをフレーム間符号化するよう制御する。また、制御部111Aは、一連のフレームのうちの第三フレームを符号化部106がフレーム間符号化した場合には、第三フレームを含む連続した所定数のフレーム間符号化されたフレームのそれぞれのデータサイズが第一閾値以上であるとき、第三フレームをフレーム内符号化するよう制御する。
When the
制御部111Aは、上記実施の形態における切替部112の制御に加えて、切替部122、量子化部105及び符号化部106の制御を行う。制御部111Aは、上記実施の形態における制御部111と同様に、符号化部106が生成した符号化データに含まれるフレームがキーフレームであるか否かを示す情報と、符号化データのデータサイズとを得る。そして、上記情報と上記データサイズとに基づく判定を行い、符号化装置10Bが次に符号化する新たな符号化対象フレームを、フレーム内符号化するか、若しくは、フレーム間符号化するか、又は、符号化部106が既に符号化したフレームを改めてフレーム内符号化するかを決定する。そして、制御部111Aは、決定結果に応じて、切替部112及び切替部122の状態を制御する。また、改めてフレームをフレーム内符号化すると決定した場合には、量子化部105及び符号化部106に処理を実行させる。
The
再符号化用保持部121は、変換部103が変換処理を施した符号化対象フレームを保持する記憶部である。再符号化用保持部121が保持するフレームは、コンテンツに含まれる一連のフレームのうち、変換部103が出力するフレームの1つ前のフレームである。
The
切替部122は、差分部104A及び切替部112に提供されるフレームを、変換部103が変換処理を施した後のフレームとするか、又は、再符号化用保持部121が保持しているフレームとするかを切り替える切替部である。切替部122が、再符号化用保持部121が保持しているフレームを差分部104A及び切替部112に提供する状態、つまり、図23において端子dと端子fとが接続される状態を状態Dという。また、切替部122が、差分部104Aが差分処理により生成した差分フレームを差分部104A及び切替部112に提供する状態、つまり、図面において端子eと端子fとが接続される状態を状態Eという。切替部122が状態Dをとるか、状態Eをとるかは、制御部111Aにより制御される。
The
図24は、本変形例の変形例に係る符号化装置10Bの処理を示すフロー図である。
FIG. 24 is a flowchart showing processing of the
図24に示されるように、符号化装置10Bは、符号化処理S301を実行し、実行した符号化処理S301の結果に応じて符号化制御処理S303Aを実行する。そして、符号化処理S301及び符号化制御処理S303Aにより生成された符号化フレームを送信する送信処理S302を行う。
As illustrated in FIG. 24, the
符号化処理S301及び送信処理S302については、上記実施の形態におけるものと同じであるので説明を省略する。符号化制御処理S303Aについて、以下で詳しく説明する。 Since the encoding process S301 and the transmission process S302 are the same as those in the above embodiment, the description thereof is omitted. The encoding control process S303A will be described in detail below.
図25は、本変形例に係る符号化装置10Bの処理を示すフロー図である。
FIG. 25 is a flowchart showing processing of the
ステップS501において、制御部111Aは、符号化部106により符号化されたフレームがキーフレームであるか否か、言い換えれば、符号化部106がフレームをフレーム内符号化したか、又は、フレーム間符号化したかを判定する。符号化部106により符号化されたフレームがキーフレームであると判定した場合(ステップS501でYes)には、ステップS502に進み、そうでない場合(ステップS501でNo)にはステップS511に進む。
In step S501, the
ステップS502において、制御部111Aは、符号化されたフレーム(キーフレーム)のデータサイズを、後の処理のために保存する。ステップS502の処理を終えたら、本フロー図に示される一連の処理を終了する。
In step S502,
ステップS511において、制御部111Aは、符号化部106が符号化により生成した符号化データのデータサイズが閾値Aより大きいか否かを判定する。符号化データのデータサイズが閾値Aより大きいと判定した場合(ステップS502でYes)にはステップS512に進み、そうでない場合(ステップS502でNo)には、ステップS521に進む。
In step S511, the
ステップS512において、制御部111Aは、符号化部106が符号化したフレーム(つまり、ステップS501で判定の対象となったフレーム)を、改めて、フレーム内符号化するよう制御する。具体的には、制御部111Aは、切替部122を状態Dにし、切替部112を状態Aにしたうえで、量子化部105及び符号化部106により各処理を実行させる。ステップS512の処理を終えたら、本フロー図に示される一連の処理を終了する。この後に行われる送信処理では、上記ステップS512で新たにフレーム内符号化により生成されたフレームが送信される。
In step S512, the
ステップS521において、制御部111Aは、符号化データのデータサイズが閾値Bより大きいか否かを判定する。符号化データのデータサイズが閾値Bより大きいと判定した場合(ステップS521でYes)にはステップS522に進み、そうでない場合(ステップS521でNo)にはステップS523に進む。
In step S521, the
ステップS522において、制御部111Aは、一連のフレームのうちの次のフレームをフレーム内符号化するよう制御する。具体的には、制御部111Aは、切替部122を状態Eにし、切替部112を状態Aに変更する。ステップS522の処理を終えたら、本フロー図に示される一連の処理を終了する。
In step S522,
ステップS523において、制御部111Aは、一連のフレームのうちの次のフレームをフレーム間符号化するよう制御する。具体的には、制御部111Aは、切替部122を状態Eにし、切替部112を状態Bに変更する。ステップS523の処理を終えたら、本フロー図に示される一連の処理を終了する。
In step S523, the
これにより、符号化装置10Bは、符号化データのサイズを削減する符号化装置等において、さらにデータサイズの圧縮効果を高めることができる。
Accordingly, the
以上のように本実施の形態に係る符号化装置は、フレーム内符号化した後のフレームをフレーム間符号化することで符号化データのサイズを削減する。また、符号化装置は、フレーム間符号化されたフレームのデータサイズが連続して比較的大きいときには、その後のフレームをフレーム内符号化することでフレームのデータサイズを削減する。フレーム間符号化されたフレームのデータサイズは、フレーム内の画像全体の動きが比較的大きい場合には、フレーム内符号化されたフレームのデータサイズより大きくなることがある。このとき、新たなフレームをフレーム内符号化すれば、そのフレームのデータサイズは、フレーム間符号化された場合よりも小さくなる。これらの制御により、符号化装置は、符号化データのサイズを削減することができる。 As described above, the encoding apparatus according to the present embodiment reduces the size of encoded data by inter-frame encoding a frame after intra-frame encoding. In addition, when the data size of the inter-frame encoded frame is relatively large continuously, the encoding device reduces the data size of the frame by intra-frame encoding the subsequent frames. The data size of an inter-frame encoded frame may be larger than the data size of an intra-frame encoded frame when the motion of the entire image in the frame is relatively large. At this time, if a new frame is encoded in the frame, the data size of the frame becomes smaller than that in the case of inter-frame encoding. With these controls, the encoding device can reduce the size of the encoded data.
また、符号化装置は、フレーム間符号化されたフレームのデータサイズが連続して比較的大きいときには、その後の連続した所定数のフレームをフレーム内符号化する。コンテンツの一連のフレームにおいて、フレーム内の画像全体が連続的に移動する場合(例えば、スクロールがある場合、又は、撮影時に継続的に手ぶれがあった場合)には、フレーム間符号化されたフレームのデータサイズが連続して比較的大きくなり、フレーム間符号化による差分符号化の効果が比較的小さくなる。その場合、符号化装置は、新たなフレーム以降の所定数のフレーム内符号化することで、それらのフレームのデータサイズを、フレーム間符号化された場合よりも小さくすることができる。 Further, when the data size of the inter-frame encoded frames is continuously relatively large, the encoding apparatus performs intra-frame encoding on a predetermined number of subsequent frames. In a series of frames of content, when the entire image in the frame moves continuously (for example, when there is scrolling or when there is continuous camera shake at the time of shooting), an inter-frame encoded frame Therefore, the effect of differential encoding by inter-frame encoding becomes relatively small. In that case, the encoding apparatus can make the data size of those frames smaller than the case of inter-frame encoding by performing a predetermined number of intra-frame encodings after the new frame.
また、符号化装置は、フレーム内の画像全体が連続的に移動することでフレーム内符号化を続けて行っているときに、符号化されたフレームのデータサイズが比較的大きく変化した場合には、フレーム内符号化を続けることを中止し、フレームをフレーム間符号化する。上記のようにデータサイズが比較的大きく変化する一因は、フレーム内のシーンが切り替えられたことによる場合がある。このような場合には、その後、フレーム内の画像全体の連続的な移動がなくなる可能性があるので、フレーム内符号化を中止して、フレーム間符号化を行うことで、符号化データのサイズを削減することができる。 In addition, when the data size of the encoded frame changes relatively greatly when the encoding device continues the intra-frame encoding by continuously moving the entire image in the frame, Then, the intra-frame encoding is stopped and the frame is inter-frame encoded. One reason for the relatively large change in data size as described above may be that the scene in the frame has been switched. In such a case, there is a possibility that the continuous movement of the entire image in the frame may be lost after that, so that the size of the encoded data can be reduced by stopping the intra-frame encoding and performing the inter-frame encoding. Can be reduced.
また、符号化装置は、フレーム間符号化されたフレームのデータサイズが比較的大きい場合に、新たなフレームをフレーム内符号化する。フレーム間符号化されたフレームとキーフレームとの差分が比較的大きい場合に、新たなフレームを新たなキーフレームとしてフレーム内符号化することで、それ以降のフレームと新たなキーフレームとの差分を比較的小さくすることができるからである。 The encoding device encodes a new frame in the frame when the data size of the inter-frame encoded frame is relatively large. When the difference between the inter-frame encoded frame and the key frame is relatively large, the difference between the subsequent frames and the new key frame is calculated by intra-frame encoding using the new frame as the new key frame. This is because it can be made relatively small.
また、符号化装置は、フレーム間符号化されたフレームのうち、データサイズが比較的大きいフレームを送信することを禁止することで、ネットワークにおける通信量を抑制することができる。なお、このようにフレームの送信を禁止すると、復号装置によりこのフレームを再生することはできなくなるが、1フレームの再生がなくなる程度であれば、コンテンツの再生に大きな影響を与えないと考えられる。 In addition, the encoding device can suppress the amount of communication in the network by prohibiting transmission of a frame having a relatively large data size among the frames that are inter-frame encoded. If the frame transmission is prohibited in this manner, the frame cannot be reproduced by the decoding device. However, it is considered that the reproduction of the content is not greatly affected as long as one frame is not reproduced.
また、符号化装置は、フレーム内符号化の後にはフレーム間符号化をすることで符号化データのサイズを削減する。また、符号化装置は、フレーム間符号化されたフレームのデータサイズが連続して比較的大きいときに、その符号化したフレームを改めてフレーム内符号化することでフレームのデータサイズを削減する。これらの制御により、符号化装置は、符号化データのサイズを削減することができる。 Also, the encoding device reduces the size of encoded data by performing inter-frame encoding after intra-frame encoding. Further, the encoding device reduces the data size of the frame by performing intra-frame encoding on the encoded frame again when the data size of the inter-frame encoded frame is relatively large continuously. With these controls, the encoding device can reduce the size of the encoded data.
以上、本発明の符号化装置、及び、コンテンツ再生システム等について、実施の形態に基づいて説明したが、本発明は、この実施の形態に限定されるものではない。本発明の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態に施したものや、異なる実施の形態における構成要素を組み合わせて構築される形態も、本発明の範囲内に含まれる。 As described above, the encoding apparatus, the content reproduction system, and the like of the present invention have been described based on the embodiment. However, the present invention is not limited to this embodiment. Unless it deviates from the meaning of this invention, the form which carried out the various deformation | transformation which those skilled in the art can think to this embodiment, and the structure constructed | assembled combining the component in different embodiment is also contained in the scope of the present invention. .
本発明は、符号化データのサイズを削減する符号化装置及びコンテンツ再生システム等に利用可能である。具体的には、公共スペース又は商業施設などにおいて複数設置され、画像等を再生する再生装置、及び、再生装置にコンテンツを提供する送信装置などに利用可能である。 The present invention can be used for an encoding apparatus and a content reproduction system that reduce the size of encoded data. Specifically, it is installed in a public space or a commercial facility, and can be used for a playback device that plays back images and the like, a transmission device that provides content to the playback device, and the like.
1 送信装置
2 再生装置
3 ネットワーク
10、10A、10B 符号化装置
11 CPU
12 メインメモリ
13 ストレージ
20 復号装置
100 フレーム保持部
101 取得部
102 ブロッキングフィルタ
103 変換部
104、104A 差分部
105 量子化部
106 符号化部
107、203 逆量子化部
108、204 参照用保持部
111、111A 制御部
112、122 切替部
121 再符号化用保持部
201 復号部
202 加算部
205 逆変換部
206 デブロッキングフィルタ
207 生成部
S コンテンツ再生システム
DESCRIPTION OF
12
Claims (8)
(a)前記一連のフレームのうちの第一フレームを前記符号化部がフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、
(b)前記一連のフレームのうちの第三フレームを前記符号化部がフレーム間符号化した場合には、既にフレーム間符号化されたフレームのうち前記第三フレームを終端とする連続した第一所定数のフレームそれぞれのデータサイズが第一閾値以上であるとき、前記一連のフレームのうち前記第三フレームの次の第四フレームをフレーム内符号化するよう制御する、制御部とを備える
符号化装置。 An encoding unit for intra-frame encoding or inter-frame encoding of frames included in a series of frames;
(A) When the encoding unit encodes the first frame in the series of frames, the second frame next to the first frame in the series of frames is inter-frame encoded. Control and
(B) When the encoding unit performs inter-frame encoding on a third frame of the series of frames, a continuous first frame that ends with the third frame among frames that have already been inter-frame encoded. A control unit that controls, when the data size of each of the predetermined number of frames is equal to or larger than a first threshold, to intra-frame encode a fourth frame next to the third frame in the series of frames. apparatus.
(c)前記(b)において、フレーム間符号化された前記フレームのそれぞれの前記データサイズが前記第一閾値以上であるとき、前記一連のフレームのうち前記第四フレームを始端とする連続した第二所定数のフレームをフレーム内符号化するよう制御する
請求項1に記載の符号化装置。 The controller is
(C) In (b), when the data size of each of the frames subjected to inter-frame coding is equal to or larger than the first threshold value, a continuous second frame starting from the fourth frame in the series of frames. The encoding apparatus according to claim 1, wherein control is performed so that two predetermined number of frames are intra-frame encoded.
前記第二所定数のフレームを再生順に順次にフレーム内符号化し、
前記第二所定数のフレームのうちの第五フレームをフレーム内符号化した時点において、フレーム内符号化された前記第五フレームのデータサイズが、前記一連のフレームのうち前記第五フレームの直前にフレーム内符号化された第六フレームのデータサイズから第三所定値以上変化した場合には、前記第五フレームの次の第七フレームをフレーム間符号化するよう制御する
請求項2に記載の符号化装置。 The control unit in (c),
Sequentially encoding the second predetermined number of frames in the order of playback;
When the fifth frame of the second predetermined number of frames is intra-frame encoded, the data size of the fifth frame that is intra-frame encoded is immediately before the fifth frame of the series of frames. 3. The code according to claim 2, wherein when the data size of the sixth frame that has been intra-frame encoded has changed by a third predetermined value or more, the seventh frame that follows the fifth frame is controlled to be inter-coded. Device.
前記第一フレームを前記符号化部がフレーム内符号化した場合には、前記一連のフレームのうちの前記第二フレーム以降のフレームを、再生順に順次にフレーム間符号化するよう制御し、
前記第二フレーム以降のフレームのうちの第八フレームをフレーム間符号化した時点において、フレーム間符号化された前記第八フレームのデータサイズが第二閾値以上であるときには、前記一連のフレームのうち前記第八フレームの次の第九フレームをフレーム内符号化するよう制御する
請求項1〜3のいずれか1項に記載の符号化装置。 In the control unit (a),
When the encoding unit intra-encodes the first frame, the second and subsequent frames of the series of frames are controlled to be sequentially inter-frame encoded in the reproduction order,
When the data size of the eighth frame inter-coded at the time when the eighth frame of the frames after the second frame is inter-frame encoded is greater than or equal to the second threshold, The encoding device according to any one of claims 1 to 3, wherein control is performed so that the ninth frame following the eighth frame is intra-frame encoded.
前記符号化部がフレーム内符号化又はフレーム間符号化することで生成した符号化データを送信する送信部と、
前記符号化データに含まれるフレームがフレーム間符号化されたフレームであって、かつ、当該フレームのデータサイズが第三閾値以上である場合には、前記送信部が当該フレームを送信することを禁止する送信制御部とを備える
請求項1〜4のいずれか1項に記載の符号化装置。 The encoding device further includes:
A transmission unit that transmits encoded data generated by the encoding unit performing intraframe encoding or interframe encoding; and
When the frame included in the encoded data is an inter-frame encoded frame and the data size of the frame is greater than or equal to a third threshold, the transmission unit is prohibited from transmitting the frame. The encoding apparatus of any one of Claims 1-4 provided with the transmission control part to perform.
(d)前記一連のフレームのうちの第一フレームを前記符号化部がフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、
(e)前記一連のフレームのうちの第三フレームを前記符号化部がフレーム間符号化した場合には、前記第三フレームを含む連続した所定数のフレーム間符号化されたフレームのそれぞれのデータサイズが第一閾値以上であるとき、前記第三フレームをフレーム内符号化するよう制御する、制御部とを備える
符号化装置。 An encoding unit for intra-frame encoding or inter-frame encoding of frames included in a series of frames;
(D) When the encoding unit encodes the first frame of the series of frames, the second frame next to the first frame of the series of frames is inter-frame encoded. Control and
(E) When the encoding unit performs inter-frame encoding on the third frame of the series of frames, each data of a predetermined number of consecutive inter-frame encoded frames including the third frame And a control unit that controls the third frame to be subjected to intra-frame encoding when the size is equal to or larger than a first threshold.
(a)前記一連のフレームのうちの第一フレームを前記符号化ステップでフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、
(b)前記一連のフレームのうちの第三フレームを前記符号化ステップでフレーム間符号化した場合には、既にフレーム間符号化されたフレームのうち前記第三フレームを終端とする連続した第一所定数のフレームそれぞれのデータサイズが第一閾値以上であるとき、前記一連のフレームのうち前記第三フレームの次の第四フレームをフレーム内符号化するよう制御する、制御ステップとを含む
符号化方法。 An encoding step of intra-frame encoding or inter-frame encoding of frames included in a series of frames;
(A) When the first frame of the series of frames is intra-frame encoded in the encoding step, the second frame next to the first frame of the series of frames is inter-frame encoded. Control and
(B) When the third frame of the series of frames is inter-frame encoded in the encoding step, a continuous first frame ending with the third frame among the frames already inter-frame encoded. And a control step of controlling the fourth frame next to the third frame in the series of frames when the data size of each of the predetermined number of frames is equal to or greater than a first threshold value. Method.
(d)前記一連のフレームのうちの第一フレームを前記符号化ステップでフレーム内符号化した場合には、前記一連のフレームのうち前記第一フレームの次の第二フレームをフレーム間符号化するよう制御し、
(e)前記一連のフレームのうちの第三フレームを前記符号化ステップでフレーム間符号化した場合には、前記第三フレームを含む連続した所定数のフレーム間符号化されたフレームのそれぞれのデータサイズが第一閾値以上であるとき、前記第三フレームをフレーム内符号化するよう制御する、制御ステップとを含む
符号化方法。 An encoding step of intra-frame encoding or inter-frame encoding of frames included in a series of frames;
(D) When the first frame of the series of frames is intra-coded in the encoding step, the second frame next to the first frame of the series of frames is inter-frame encoded. Control and
(E) When a third frame of the series of frames is inter-frame encoded in the encoding step, each data of a consecutive predetermined number of inter-frame encoded frames including the third frame And a control step of controlling the third frame to be intra-coded when the size is equal to or larger than a first threshold.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016195086A JP6598376B2 (en) | 2016-09-30 | 2016-09-30 | Encoding apparatus and encoding method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016195086A JP6598376B2 (en) | 2016-09-30 | 2016-09-30 | Encoding apparatus and encoding method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018061075A JP2018061075A (en) | 2018-04-12 |
| JP6598376B2 true JP6598376B2 (en) | 2019-10-30 |
Family
ID=61907698
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016195086A Active JP6598376B2 (en) | 2016-09-30 | 2016-09-30 | Encoding apparatus and encoding method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6598376B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPWO2022185649A1 (en) * | 2021-03-01 | 2022-09-09 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05176292A (en) * | 1991-02-21 | 1993-07-13 | Nec Home Electron Ltd | Compression and recording device for moving picture data |
| JP3840020B2 (en) * | 1999-12-14 | 2006-11-01 | 株式会社東芝 | Video encoding device |
| JP2003087794A (en) * | 2001-09-07 | 2003-03-20 | Marine System Associates Inc | Encoding system |
| JP2010050616A (en) * | 2008-08-20 | 2010-03-04 | Sony Corp | Recording device and recording method, reproduction device and reproduction method, program, and recording/reproducing device |
| JP5906430B2 (en) * | 2011-01-24 | 2016-04-20 | パナソニックIpマネジメント株式会社 | Video transmission terminal and video transmission system |
-
2016
- 2016-09-30 JP JP2016195086A patent/JP6598376B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2018061075A (en) | 2018-04-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7690659B2 (en) | METHOD AND APPARATUS FOR VIDEO CODING - Patent application | |
| CN113302932B (en) | Video encoding and decoding methods, devices and storage media | |
| JP7169372B2 (en) | Improved decoder-side motion vector derivation and refinement | |
| JP4643454B2 (en) | Moving picture decoding apparatus and moving picture decoding method | |
| JP2022509703A (en) | Video decoding methods and equipment, and computer programs | |
| CN112055971A (en) | Method and device for most probable mode derivation | |
| WO2014162871A1 (en) | Block size determination method, video encoding device, and program | |
| US20160309144A9 (en) | Method and device for encoding/decoding motion vector | |
| JP7221390B2 (en) | Video decoding and encoding method, apparatus and program | |
| JP2022511843A (en) | Methods, equipment and computer programs for video coding | |
| CN101682776A (en) | Moving image converting apparatus, moving image converting method, and moving image converting program | |
| JP6598376B2 (en) | Encoding apparatus and encoding method | |
| CN113796082B (en) | Video decoding method, device, computer equipment and storage medium | |
| JP2017535171A (en) | An apparatus and method for cutting several encoded video streams without prior decoding. | |
| JP6708882B2 (en) | Encoding device and encoding method | |
| WO2013114826A1 (en) | Image decoding device | |
| JP4702943B2 (en) | Image processing apparatus and method | |
| JP2018056957A (en) | Encoding device, decoding device, encoding method, and decoding method | |
| JP6694086B2 (en) | Video coding device, video decoding device, video coding method, video decoding method, and program | |
| JP6438376B2 (en) | Video encoding apparatus, video decoding apparatus, video encoding method, video decoding method, video encoding program, and video decoding program | |
| KR101852859B1 (en) | Method of providing random access for moving picture based on random accessable P-frame | |
| JP5061355B2 (en) | Image encoding method, apparatus and program, and image processing apparatus | |
| HK40079741B (en) | Video encoding and decoding methods and apparatus, electronic device, and computer storage medium | |
| JP4676474B2 (en) | Image coding method | |
| HK40048498B (en) | Video encoding and decoding method and apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190531 |
|
| A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20190531 |
|
| A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20190905 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190905 |
|
| 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: 20190917 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190930 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6598376 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |