JP3962053B2 - Video re-encoding device - Google Patents

Video re-encoding device Download PDF

Info

Publication number
JP3962053B2
JP3962053B2 JP2004330692A JP2004330692A JP3962053B2 JP 3962053 B2 JP3962053 B2 JP 3962053B2 JP 2004330692 A JP2004330692 A JP 2004330692A JP 2004330692 A JP2004330692 A JP 2004330692A JP 3962053 B2 JP3962053 B2 JP 3962053B2
Authority
JP
Japan
Prior art keywords
encoding
video
frame
encoded data
data
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.)
Expired - Fee Related
Application number
JP2004330692A
Other languages
Japanese (ja)
Other versions
JP2005094800A (en
Inventor
晋一郎 古藤
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2004330692A priority Critical patent/JP3962053B2/en
Publication of JP2005094800A publication Critical patent/JP2005094800A/en
Application granted granted Critical
Publication of JP3962053B2 publication Critical patent/JP3962053B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は動画像再符号化装置に係り、特にMPEG2方式等の符号化によって得られた動画像データを復号化し、得られた動画像信号を直接またはグラフィックスオーバレイや特殊再生処理等を適宜施した後に再符号化する動画像再符号化装置に関する。   The present invention relates to a moving image re-encoding device, and in particular, decodes moving image data obtained by encoding such as the MPEG2 system, and appropriately applies the obtained moving image signal directly or graphics overlay or special reproduction processing. The present invention relates to a moving image re-encoding device that performs re-encoding after the operation.

DVD(ディジタルバーサタイルディスクまたはディジタルビデオディスク)システムのようなディジタル映像システムの再生装置では、再生信号から得られる圧縮された動画像データ、音声データ、副映像データ等が多重化された多重化データに対し、各データの分離および復号化が行われる。動画像データを復号化して得られた動画像信号(映像信号)は、副映像や再生装置固有のGUI(グラフィカルユーザインタフェース)のオーバレイ処理が施された後、D/A変換されてアナログ出力される。また、音声データを復号化して得られた音声信号は、D/A変換されてアナログ出力されるか、或いはディジタル信号のまま出力される。   In a playback device of a digital video system such as a DVD (digital versatile disc or digital video disc) system, compressed moving image data, audio data, sub-video data, etc. obtained from a playback signal are multiplexed into multiplexed data. On the other hand, each data is separated and decoded. The moving image signal (video signal) obtained by decoding the moving image data is subjected to D / A conversion and analog output after being subjected to an overlay process of a sub-picture or a GUI (graphical user interface) unique to the playback device. The Also, the audio signal obtained by decoding the audio data is D / A converted and output as an analog signal or is output as a digital signal.

近年、IEEE1394等の家庭内でのディジタルインタフェースが規格化され、またディジタル放送に向けたディジタルTVの開発も進んでいる。このような家庭内での映像機器および機器間のインタフェースのディジタル化により、従来ではアナログ信号に頼っていた家庭内での映像機器間の映像信号伝送も、ディジタル化が可能になりつつある。   In recent years, digital interfaces in homes such as IEEE 1394 have been standardized, and development of digital TVs for digital broadcasting is also progressing. Due to the digitization of video equipment in the home and the interface between the equipment, video signal transmission between video equipment in the home, which has conventionally relied on analog signals, is becoming possible.

一方、ディジタル映像およびディジタル音声の符号化方式は、アプリケーション毎に様々な規格が存在しており、それらの規格間での互換が十分にとられていないのが実情である。例えば、DVDの記録フォーマット、DVCR(ディジタルビデオカセットレコーダ)等のディジタルビデオカメラ用途のフォーマット、ディジタル放送フォーマット等のいずれもが互換性を有していない。ディジタル放送についても、米国方式(ATSC)、ヨーロッパ方式(DVB)、および日本方式等、地域毎に方式が異なっており、それらの方式間でディジタルデータの互換性は保証されないものとなっている。従って、様々なディジタル映像機器間をディジタルインタフェースで接続するためには、符号化方式の変換を含むデータフォーマットの変換を各アプリケーションに合わせて行う必要が生じる。   On the other hand, there are various standards for digital video and digital audio encoding methods for each application, and the actual situation is that the standards are not sufficiently compatible. For example, the DVD recording format, the digital video camera format such as DVCR (Digital Video Cassette Recorder), and the digital broadcast format are not compatible. As for digital broadcasting, the US system (ATSC), the European system (DVB), and the Japanese system have different systems for each region, and compatibility of digital data is not guaranteed between these systems. Therefore, in order to connect various digital video equipment with a digital interface, it is necessary to perform conversion of a data format including conversion of an encoding method in accordance with each application.

データフォーマットの変換方法は、大きく以下の2つに分類できる。第1の変換方法は、符号化データであるディジタルデータレベルでのデータフォーマット変換処理である。この方法では、変換前の符号化データの符号化方式に依存して変換の自由度が大きく制限される場合がある。例えば、MPEG2方式の符号化により得られた動画像データに対して特殊再生やエフェクト処理、或いは映像のミキシング等のディジタル処理を行うことは、非常に大きな制約を伴うことになる。また、異なる符号化方式へのディジタルデータレベルでの変換は、多くの場合、実現困難となる。   Data format conversion methods can be broadly classified into the following two types. The first conversion method is data format conversion processing at a digital data level that is encoded data. In this method, the degree of freedom of conversion may be greatly limited depending on the encoding method of encoded data before conversion. For example, performing digital processing such as special reproduction, effect processing, or video mixing on moving image data obtained by MPEG-2 encoding is extremely restrictive. Also, conversion at different digital data levels at the digital data level is often difficult to implement.

データフォーマットの第2の変換方法は、符号化データを復号化してベースバンド信号とし、このベースバンド信号を再度所望の符号化方式で符号化(これを再符号化という)するというものである。この場合、データフォーマット変換の自由度は大きなものとなり、特殊再生やエフェクト処理、或いは映像のミキシング等のディジタル等はベースバンド信号上で行うことが可能であり、何ら制約を受けなくなる。但し、多くの符号化方式が非可逆変換であるために、この方法では変換を繰り返すたびに画質や音質が低下する。また、高能率の再符号化を行うためには、ディジタル映像機器に付加的な符号化装置を実装する必要があり、特にMPEG2エンコーダのような動き補償を伴う符号化装置の追加は、各ディジタル映像機器の大幅なコスト増を招く。   The second data format conversion method is to decode the encoded data into a baseband signal, and encode the baseband signal again with a desired encoding method (this is called re-encoding). In this case, the degree of freedom of data format conversion becomes great, and special reproduction, effect processing, digital such as video mixing, etc. can be performed on the baseband signal, and there are no restrictions. However, since many encoding methods are irreversible conversions, the image quality and the sound quality are deteriorated each time the conversion is repeated in this method. In addition, in order to perform highly efficient re-encoding, it is necessary to install an additional encoding device in the digital video equipment. In particular, the addition of an encoding device with motion compensation such as an MPEG2 encoder is required for each digital device. Incurs significant cost increase for video equipment.

上述したように、異なるデータフォーマットのディジタル映像機器間をディジタル接続するために、符号化方式の変換を含むデータフォーマットの変換を行う場合、従来の符号化データ(ディジタルデータ)レベルで変換を行う方法では、特殊再生、エフェクト処理、映像ミキシングといった処理の自由度が小さいという問題点があり、また符号化データを復号化してベースバンド信号レベルで特殊再生、エフェクト処理、映像ミキシングなどの処理を行って所望の符号化方式で再符号化する方法は、画質の劣化やディジタル映像機器のコスト増を招くという問題点があった。   As described above, in order to digitally connect digital video equipment having different data formats, when performing conversion of a data format including conversion of an encoding method, a method of performing conversion at a conventional encoded data (digital data) level However, there is a problem that the degree of freedom of processing such as special reproduction, effect processing, and video mixing is small, and the encoded data is decoded and special reproduction, effect processing, video mixing, etc. are performed at the baseband signal level. The method of re-encoding with a desired encoding method has a problem in that the image quality is deteriorated and the cost of digital video equipment is increased.

本発明は、ベースバンド信号レベルでの処理により特殊再生その他の処理の自由度を持ち、且つ符号化方式を含むデータフォーマット変換による画質劣化を抑え、さらに付加的な再符号化のためのコストを大幅に低下させることが可能な動画像再符号化装置を提供することを目的とする。   The present invention has a degree of freedom for special reproduction and other processing by processing at the baseband signal level, suppresses image quality deterioration due to data format conversion including an encoding method, and further reduces the cost for additional re-encoding. An object of the present invention is to provide a moving image re-encoding device that can be significantly reduced.

上記課題を解決するため、本発明は符号化された動画像データを復号化して得られるベースバンド信号である動画像信号に対して、早送り、スロー、ポーズ等の特殊再生処理、副映像或いはGUIのオーバレイ等の処理を施し、さらに復号時に動画像符号化データから抽出された各種符号化パラメータの情報、特殊再生およびオーバレイ処理等の情報を基に最適な符号化パラメータの決定を行い、低コストで高画質な再符号化を実現可能としたものである。   In order to solve the above-described problems, the present invention provides a special reproduction process such as fast-forward, slow, pause, sub-picture or GUI for a video signal which is a baseband signal obtained by decoding encoded video data. Low-cost, by determining the optimal encoding parameters based on various encoding parameter information extracted from the video encoded data at the time of decoding, information on special reproduction and overlay processing, etc. This makes it possible to realize high-quality re-encoding.

すなわち、本発明に係る第1の動画像再符号化装置は、動画像信号を動き補償予測符号化して得られた第1の符号化データを復号化して動画像信号を得る復号化手段と、前記第1の符号化データから、少なくとも動きベクトル、符号化モードおよび量子化ステップの情報を含む符号化パラメータを抽出する符号化パラメータ抽出手段と、前記復号化手段により得られた動画像信号を前記符号化パラメータ抽出手段により抽出された符号化パラメータに従って再符号化して第2の符号化データを得る再符号化手段とを有し、前記再符号化手段は、(a)前記抽出された符号化パラメータと同一の符号化パラメータを用いた符号化、(b)既定の動きベクトルを用いた動き補償予測符号化、および(c)イントラ符号化のいずれかの一つの符号化モードをマクロブロック毎に選択する符号化モード選択手段を有することを特徴とする。   That is, a first moving image re-encoding device according to the present invention includes decoding means for decoding a first encoded data obtained by motion compensation predictive encoding a moving image signal to obtain a moving image signal; Coding parameter extraction means for extracting a coding parameter including at least information about a motion vector, a coding mode and a quantization step from the first coded data; and a moving image signal obtained by the decoding means Re-encoding means for re-encoding in accordance with the encoding parameter extracted by the encoding parameter extraction means to obtain second encoded data, wherein the re-encoding means comprises (a) the extracted encoding Coding using the same coding parameter as the parameter, (b) Motion compensation prediction coding using a predetermined motion vector, and (c) Intra coding Characterized in that it has a coding mode selecting means for selecting over de each macroblock.

この第1の動画像再符号化装置では、再符号化において通常の符号化装置では多くのリソースを必要とする動きベクトル検出回路が不要となり、大幅なコスト低下を実現することが可能となる。   In the first moving image re-encoding device, a motion vector detection circuit that requires a large amount of resources is not required for re-encoding, and a significant cost reduction can be realized.

また、復号化により得られた動画像信号である映像信号に何ら処理が加えられていない領域では、再符号化の符号化モードとして基本的に(a)が自動的に選択され、第1の符号化データと全ての符号化パラメータを一致させることによって、再符号化に伴う画質劣化を最小限に抑えることが可能となる。一方、映像信号に何らかの処理が施された領域では、再符号化の符号化モードとして(b)の既定の動きベクトルを用いた予測符号化か、或いは(c)のフレーム内符号化が選択される場合がある。映像信号に対する処理内容に応じて、既定の動きベクトルの値を設定することにより、動きベクトル検出回路を必要とすることなく符号化効率の高い予測符号化を行うことが可能となる。   Also, in a region where no processing is applied to the video signal that is a moving image signal obtained by decoding, (a) is automatically automatically selected as the re-encoding encoding mode, and the first By matching the encoded data with all the encoding parameters, it is possible to minimize image quality degradation due to re-encoding. On the other hand, in a region where some processing has been performed on the video signal, (b) predictive coding using a predetermined motion vector or (c) intraframe coding is selected as a re-coding mode. There is a case. By setting a predetermined motion vector value according to the processing content for the video signal, it is possible to perform predictive coding with high coding efficiency without requiring a motion vector detection circuit.

本発明に係る第2の動画像再符号化装置は、前記復号化手段により得られた動画像信号の映像フレーム或いは映像フィールドに対応して副映像信号或いはGUI(Graphical User Interface)画像信号を生成する手段と、前記映像フレーム或いは映像フィールドに対して前記副映像信号或いは前記GUI画像信号のオーバレイ処理を順次施す手段とをさらに有し、前記再符号化手段は、前記符号化パラメータ抽出手段により抽出された符号化パラメータを一時記憶する記憶手段を有し、前記オーバレイ処理が施された映像フレーム或いは映像フィールドを該記憶手段に記憶された前記符号化パラメータを用いて再符号化することを特徴とする。   The second moving image re-encoding device according to the present invention generates a sub-video signal or a GUI (Graphical User Interface) image signal corresponding to the video frame or video field of the moving image signal obtained by the decoding means. And means for sequentially performing overlay processing of the sub-picture signal or the GUI image signal on the video frame or video field, and the re-encoding means is extracted by the encoding parameter extracting means. Storage means for temporarily storing the encoded parameters, and re-encoding the video frame or video field subjected to the overlay processing using the encoding parameters stored in the storage means, To do.

MPEG2等の動画像符号化では、フレーム間の前方および後方予測が存在するため、符号化および復号化のフレーム順序と、表示のフレーム順序が一般に一致しない。これらのフレーム順序の違いは、符号化装置および復号化装置それぞれでのフレームの並べ替え処理により吸収される。グラフィックスオーバレイ等を表示順序で行うシステムでは、復号化のタイミングで再符号化することが困難となる。この場合、再符号化は復号化およびグラフィックオーバレイ処理後に行うため、一定の復号化から再符号化までの間に所定の遅延が発生する。しかし、抽出した符号化パラメータを一時記憶して、抽出した符号化パラメータも同様に遅延させることにより、第1の符号化データと同一の符号化パラメータを用いた再符号化が可能となる。   In moving picture coding such as MPEG2, there are forward and backward predictions between frames, so that the frame order of encoding and decoding generally does not match the frame order of display. These differences in the frame order are absorbed by the frame rearrangement processing in each of the encoding device and the decoding device. In a system that performs graphics overlay and the like in display order, it becomes difficult to re-encode at the timing of decoding. In this case, since re-encoding is performed after decoding and graphic overlay processing, a predetermined delay occurs between certain decoding and re-encoding. However, by temporarily storing the extracted encoding parameter and delaying the extracted encoding parameter in the same manner, re-encoding using the same encoding parameter as the first encoded data becomes possible.

本発明に係る第3の動画像再符号化装置は、第1の動画像再符号化装置において、前記復号化手段により得られた動画像信号の映像フレーム或いは映像フィールドの復号化順序に対応して副映像信号或いはGUI画像信号を生成する手段と、前記映像フレーム或いは映像フィールドに対して前記副映像信号或いは前記GUI画像信号のオーバレイ処理を順次施す手段とをさらに有し、前記再符号化手段は、前記オーバレイ処理が施された映像フレーム或いは映像フィールドを前記復号化順序に従って再符号化することを特徴とする。   A third video re-encoding device according to the present invention corresponds to the decoding order of video frames or video fields of a video signal obtained by the decoding means in the first video re-coding device. Means for generating a sub-video signal or GUI image signal, and means for sequentially performing overlay processing of the sub-video signal or GUI image signal on the video frame or video field, and the re-encoding means The method is characterized in that the video frame or video field subjected to the overlay processing is re-encoded according to the decoding order.

上述したように、MPEG2等の符号化と表示のフレーム順の違いのため、復号化および再符号化でフレーム並べ替えによる遅延が発生し、また再符号化のために通常の符号化と同様のフレーム並べ替えのためのフレームメモリを必要とする。これに対し、本発明に係る第3の動画像再符号化装置では、復号化される順序で、復号化とほぼ同時に副映像やGUIのオーバレイ処理を行い、さらに再符号化処理を復号化およびオーバレイ処理と同時に行うことが可能であるため、フレーム並べ替えに伴う遅延量を最小化することが可能となり、また、再符号化手段でのフレーム並べ替えのためのメモリを必要としない構成とすることが可能となる。再符号化手段では、予測符号化のための参照画像用のフレームメモリだけを持てばよいことになる。   As described above, because of the difference in the frame order of encoding and display such as MPEG2, delay due to frame rearrangement occurs in decoding and re-encoding, and the same as normal encoding for re-encoding Requires frame memory for frame rearrangement. On the other hand, in the third moving image re-encoding device according to the present invention, the sub-picture and GUI overlay processing is performed almost simultaneously with the decoding in the decoding order, and the re-encoding processing is further decoded and Since it can be performed simultaneously with overlay processing, it is possible to minimize the amount of delay associated with frame rearrangement, and the configuration does not require a memory for frame rearrangement by the re-encoding means. It becomes possible. The re-encoding means need only have a reference image frame memory for predictive encoding.

本発明に係る第4の動画像再符号化装置は、上述した第1乃至第3の動画像再符号化装置において、前記符号化パラメータ抽出手段が前記第1の符号化データから前記符号化パラメータとしてさらにフレーム/フィールド適応直交変換タイプを抽出し、前記再符号化手段がフレーム/フィールド適応直交変換手段を有し、前記符号化モード選択手段により(a)前記符号化パラメータと同一の符号化パラメータを用いた符号化モードが選択されたマクロブロックについては前記第1の符号化データから抽出されたフレーム/フィールド適応直交変換タイプを選択し、前記符号化モード選択手段により(b)既定の動きベクトルを用いた動き補償予測符号化、および(c)イントラ符号化のいずれかの符号化モードが選択されたマクロブロックについては最適なフレーム/フィールド適応直交変換タイプを選択して、前記フレーム/フィールド適応直交変換手段によりそれぞれ直交変換を施すことを特徴とする。   The fourth moving image re-encoding device according to the present invention is the above-described first to third moving image re-encoding device, wherein the encoding parameter extracting means uses the first encoded data as the encoding parameter. Further, a frame / field adaptive orthogonal transform type is extracted, and the re-encoding means has a frame / field adaptive orthogonal transform means, and the encoding mode selection means (a) encodes the same encoding parameter as the encoding parameter. For a macroblock for which a coding mode using is selected, a frame / field adaptive orthogonal transform type extracted from the first coded data is selected, and (b) a predetermined motion vector is selected by the coding mode selection means. And a macroblock in which any coding mode of (c) intra-coding is selected. For by selecting an optimal frame / field adaptive orthogonal transform type, and characterized by applying orthogonal transformation respectively by the frame / field adaptive orthogonal transform means.

上述したように、映像信号に何ら処理が加えられていない領域では、第1の符号化データと全ての符号化パラメータを一致させることにより、再符号化に伴う画質劣化を最小限に抑えることが可能となる。しかし、映像信号に特殊再生やオーバレイ等の処理を施された部分では、必ずしも第1の符号化データと全ての符号化パラメータを一致させることが、最適ではない。このような部分は、自動的に(b)の既定の動きベクトルによる予測符号化、または(c)のイントラ符号化が選択される頻度が高くなる。従って、(b)または(c)が選択されたマクロブロックでは、フィールド/フレーム適応直交変換(MPEG2等ではDCT(離散コサイン変換)について、最適なタイプの再選択を行い、選択されたタイプでの符号化を行うことで、符号化効率を向上させることが可能となる。   As described above, in a region where no processing is applied to the video signal, it is possible to minimize image quality degradation due to re-encoding by matching the first encoded data with all the encoding parameters. It becomes possible. However, it is not always optimal to match the first encoded data with all the encoding parameters in a portion where the special reproduction or overlay processing is applied to the video signal. In such a portion, the frequency of automatically selecting the predictive coding based on the predetermined motion vector (b) or the intra coding (c) increases. Therefore, in the macroblock for which (b) or (c) is selected, the optimum type is re-selected for the field / frame adaptive orthogonal transform (DCT (discrete cosine transform) in MPEG2 etc.) and the selected type is used. By performing the encoding, it is possible to improve the encoding efficiency.

本発明に係る第5の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、特に(b)の既定の動きベクトルがゼロベクトルであることを特徴としている。   The fifth moving image re-encoding device according to the present invention is characterized in that, in the first to fourth moving image re-encoding devices, the predetermined motion vector (b) is a zero vector.

早送り、スロー、こま送りといった特殊再生では、同一フレームの映像が複数回の表示されることがあり、また字幕等の副映像の表示では、連続する数フレーム間に渡って画面内の同一の位置に副映像が表示される場合が多い。いずれもゼロベクトルを用いた動き補償を用いることで、動きベクトル検出回路が無くとも効率的な予測符号化を実現することが可能となる。   In special playback such as fast forward, slow, and top feed, the same frame of video may be displayed multiple times, and subtitles such as subtitles are displayed at the same position on the screen over several consecutive frames. Sub-pictures are often displayed on the screen. In any case, by using motion compensation using a zero vector, efficient predictive coding can be realized without a motion vector detection circuit.

本発明に係る第6の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、特に(b)の既定の動きベクトルが前記副映像信号或いは前記GUI画像の表示位置およびその動き量から決定されることを特徴とする。   The sixth moving image re-encoding device according to the present invention is the first to fourth moving image re-encoding device, in particular, the predetermined motion vector (b) is the display position of the sub-picture signal or the GUI image. And the amount of movement thereof.

映像信号にオーバレイされる高度な副映像やGUI画像では、静止画像を映像フレーム内で時間的に移動さすることが可能な場合がある。第6の動画像再符号化装置では、オーバレイされる領域のマクロブロック位置に応じてオーバレイされる画像の動き量から最適な動きベクトルを算出することが可能となり、(b)の既定の動きベクトルの値に最適な動きベクトル値に設定させることにより、符号化効率を向上させることが可能となる。   In advanced sub-pictures and GUI images that are overlaid on video signals, it may be possible to move a still picture in time within a video frame. In the sixth moving image re-encoding device, it is possible to calculate an optimal motion vector from the amount of motion of the overlaid image according to the macroblock position of the overlaid region, and the default motion vector of (b) It is possible to improve the encoding efficiency by setting the optimal motion vector value to the value of.

本発明に係る第7の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記符号化モード選択手段が前記副映像信号或いは前記GUI画像信号の表示位置およびその動き量、前記復号化手段により得られた動画像信号の各マクロブロックに対する面積比およびミキシング比率の少なくとも一つを用いて前記符号化モードの選択を行うことを特徴とする。   In a seventh moving image re-encoding device according to the present invention, in the first to fourth moving image re-encoding devices, the encoding mode selecting means displays the display position of the sub-picture signal or the GUI image signal and The encoding mode is selected by using at least one of a motion amount, an area ratio of each moving image signal obtained by the decoding means to each macroblock, and a mixing ratio.

第1乃至第4の動画像再符号化装置では、(a)前記符号化パラメータと同一の符号化パラメータを用いた符号化、(b)既定の動きベクトルを用いた動き補償予測符号化、(c)イントラ符号化のいずれかをマクロブロック毎に選択するため、例えば(a)の符号化における動き補償予測誤差電力、(b)の符号化における動き補償予測誤差電力、および(c)の符号化における符号化対象マクロブロックの信号電力等を算出し、それぞれを比較して最適モードを決定する必要がある。   In the first to fourth moving image re-encoding devices, (a) encoding using the same encoding parameter as the encoding parameter, (b) motion compensated predictive encoding using a predetermined motion vector, ( c) In order to select one of the intra codings for each macroblock, for example, the motion compensation prediction error power in the encoding of (a), the motion compensation prediction error power in the encoding of (b), and the code of (c) It is necessary to calculate the signal power and the like of the encoding target macroblock in the encoding, and to determine the optimum mode by comparing them.

ここで、第6の動画像再符号化装置では、(a)と(b)の符号化モードの比較を誤差電力ではなくオーバレイ比率を用いて行い、そこで選択された符号化モードと(c)のイントラ符号化とを予測誤差電力等を用いて比較する構成とすることができる。オーバレイ比率は、マクロブロック内に占めるオーバレイ画素の面積比および映像信号とのミキシングが施される場合は、そのミキシング比利率等から決定される。オーバレイ比率が閾値以上であれば、(b)のモードを選択し、そうでなければ(a)のモードを選択する構成とすることができる。これにより、誤差および信号電力算出回数を各マクロブロック毎に3回から2回に削減することが可能となる。   Here, in the sixth moving image re-encoding apparatus, the comparison between the encoding modes (a) and (b) is performed using the overlay ratio instead of the error power, and the selected encoding mode and (c) The intra coding can be compared using prediction error power or the like. The overlay ratio is determined based on the area ratio of the overlay pixels in the macroblock and the mixing ratio interest rate when mixing with the video signal is performed. If the overlay ratio is equal to or higher than the threshold, the mode (b) can be selected, and if not, the mode (a) can be selected. As a result, the number of errors and signal power calculations can be reduced from 3 to 2 for each macroblock.

本発明に係る第8の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記再符号化手段が前記復号化手段により得られた動画像信号の少なくとも一部に対して拡大或いは縮小の解像度変換を行う解像度変換手段と、前記解像度変換手段の変換比率に応じて、前記第1の符号化データより抽出された動きベクトル或いは前記既定の動きベクトルに対するスケーリングを施すスケーリング手段とを有し、前記符号化モード選択手段が前記スケーリングが施された後の動きベクトルを用いて前記符号化モードの選択を行うことを特徴とする。   An eighth moving image re-encoding device according to the present invention is the first to fourth moving image re-encoding devices, wherein the re-encoding unit obtains at least a part of the moving image signal obtained by the decoding unit. Resolution conversion means for performing resolution conversion for enlargement or reduction, and scaling for the motion vector extracted from the first encoded data or the predetermined motion vector according to the conversion ratio of the resolution conversion means A scaling unit, and the encoding mode selection unit selects the encoding mode using a motion vector after the scaling is performed.

復号後に解像度変換がなされて映像信号を再符号化出力をする場合、第1の符号化データの動きベクトルおよび符号化パラメータは、そのままでは使用かることができない。しかし、動きベクトル情報については、解像度変換比率に応じて適宜スケーリングすることにより、再符号化時に動きベクトル検出を行わなくとも、ほぼ適切な動きベクトルを得ることが可能となる。   When the resolution conversion is performed after decoding and the video signal is re-encoded and output, the motion vector and the encoding parameter of the first encoded data cannot be used as they are. However, by appropriately scaling the motion vector information according to the resolution conversion ratio, it is possible to obtain a substantially appropriate motion vector without performing motion vector detection at the time of re-encoding.

本発明に係る第9の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記再符号化手段が前記復号化手段により得られた動画像信号の少なくとも一部に対して表示フレームレート或いは表示フィールドレートの変換を行うレート変換手段と、前記レート変換の変換比率に応じて、前記第1の符号化データより抽出された動きベクトル或いは前記既定の動きベクトルに対するスケーリングを施すスケーリング手段とを有し、前記符号化モード選択手段が前記スケーリングが施された後の動きベクトルを用いて前記符号化モードの選択を行うことを特徴とする。   According to a ninth moving image re-encoding device of the present invention, in the first to fourth moving image re-encoding devices, at least a part of the moving image signal obtained by the re-encoding unit by the decoding unit. A rate conversion means for converting a display frame rate or a display field rate with respect to a motion vector extracted from the first encoded data or a scaling with respect to the predetermined motion vector according to a conversion ratio of the rate conversion And the encoding mode selection unit selects the encoding mode using a motion vector after the scaling is performed.

復号化された映像信号に対して、フレーム或いはフィールドの間引き、繰り返し表示、補間等により、フレーム周波数やフィールド周波数の変換が行われた後に、再符号化し出力される場合、第1符号化データから抽出された動きベクトルおよび符号化パラメータをそのまま使用すると、画質劣化を引き起こす場合がある。これらのフレーム或いはフィールド周波数の変換に対応して、抽出された動きベクトルに対する、スケーリングを含む変換処理を施すことにより、上記画質劣化を抑えることが可能となる。   When the decoded video signal is re-encoded and output after frame frequency or field frequency conversion is performed by frame or field thinning, repeated display, interpolation, or the like, the first encoded data is used. If the extracted motion vector and encoding parameter are used as they are, image quality deterioration may be caused. Corresponding to these frame or field frequency conversions, the extracted motion vector is subjected to conversion processing including scaling, whereby the image quality deterioration can be suppressed.

本発明に係る第10の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記再符号化手段が前記復号化手段が持つ早送り、スロー、こま送りおよび一時停止の少なくとも一つを含む特殊再生機能に関連する再生パラメータに応じて、前記第1の符号化データより抽出された動きベクトルに対して変換を施す動きベクトル変換手段を有し、前記符号化モード選択手段が前記動きベクトル変換手段による変換後の動きベクトルを用いて前記符号化モードの選択を行うことを特徴とする。   According to a tenth moving image re-encoding device of the present invention, in the first to fourth moving image re-encoding devices, the re-encoding unit has fast-forwarding, slowing, top-feeding, and pausing that the decoding unit has. Motion vector conversion means for converting a motion vector extracted from the first encoded data in accordance with a playback parameter related to a special playback function including at least one of the encoding mode selection and the encoding mode selection The means selects the coding mode using the motion vector converted by the motion vector conversion means.

特殊再生時には、インターレース画像の片フィールドを削除し、残ったフィールドを連続して表示する場合や、復号化するフレーム或いはフィールドの間引きや、復号化されたフレーム或いはフィールドの複数回表示等の処理が行われる。第10の動画像再符号化装置では、これらの特殊再生処理に応じて動きベクトルの変換を行うことで、特殊再生画像を再符号化する際の画質劣化を抑制することが可能となる。   During special playback, processing such as deleting one field of the interlaced image and displaying the remaining fields continuously, thinning the frame or field to be decoded, or displaying the decoded frame or field multiple times, etc. Done. In the tenth moving image re-encoding device, it is possible to suppress deterioration in image quality when re-encoding a special reproduction image by performing motion vector conversion according to these special reproduction processes.

本発明に係る第11の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記再符号化手段が前記第1の符号化データからフレーム或いはマクロブロック単位の符号化データを抽出するデータ抽出手段と、前記データ抽出手段により抽出された符号化データについて、少なくとも表示順序および表示フィールドの構成に関連するデータを含む所定のヘッダデータを変更するヘッダデータ変更手段と、前記第2の符号化データの一部を前記データ抽出手段により抽出されかつ前記ヘッダデータ変更手段により前記ヘッダデータが変更された符号化データに置き換えるデータ置き換え手段とを有することを特徴とする。   In an eleventh moving image re-encoding device according to the present invention, in the first to fourth moving image re-encoding devices, the re-encoding means encodes a frame or macroblock unit code from the first encoded data. Data extraction means for extracting encoded data; and header data changing means for changing predetermined header data including at least data related to the display order and the configuration of the display field for the encoded data extracted by the data extraction means; Data replacement means for extracting a part of the second encoded data by the data extraction means and replacing the header data with the encoded data in which the header data has been changed by the header data change means.

符号化画像フレームおよび符号化フレームに関連する参照画像フレームのそれぞれについて、復号後に何ら処理を加えられずに再符号化されるフレーム或いは領域については、第1の符号化データと同一の符号化パラメータを用いて再符号化することにより、再符号化に伴う画質の低下は、十分小さいものとなる。しかし、復号化処理あるいは再符号化処理における演算精度に起因する、丸め、リミッタ処理等の影響で、完全可逆とはならない場合がある。   For each of the encoded image frame and the reference image frame related to the encoded frame, the same encoding parameter as that of the first encoded data is used for a frame or a region that is re-encoded without any processing after decoding. By re-encoding using, the degradation of image quality due to re-encoding is sufficiently small. However, it may not be completely reversible due to the influence of rounding, limiter processing, etc. due to the calculation accuracy in the decoding process or the re-encoding process.

第11の動画像再符号化装置では、再符号化された第2の符号化データのうち、上記の様に映像信号に何ら処理が施されていない領域については、該当する第1の符号化データと置き換えて出力することで、演算精度に起因する僅かな画質劣化をも、完全に除去することが可能となる。また、特殊再生処理やフレームレート変換等の処理がなされている場合は、出力される符号化データの正当性を満たすために、必要に応じて、第1の符号化データのうち、ヘッダ領域の表示順序や表示フィールド構成を示す所定データの値を、適宜変更を行うことで、第1の符号化データを再符号化データとして出力することが可能となる。   In the eleventh moving image re-encoding device, in the re-encoded second encoded data, the region in which no processing is performed on the video signal as described above, the corresponding first encoding By substituting with data and outputting, it is possible to completely remove even slight image quality degradation caused by calculation accuracy. In addition, when processing such as special reproduction processing or frame rate conversion is performed, in order to satisfy the validity of the output encoded data, the header area of the first encoded data is included as necessary. It is possible to output the first encoded data as re-encoded data by appropriately changing the value of the predetermined data indicating the display order and the display field configuration.

本発明に係る第12の動画像再符号化装置は、第11の動画像再符号化装置において、前記符号化データ置き換え手段が前記第1の符号化データから抽出された動きベクトルと、前記副映像信号或いは前記GUI画像信号の表示位置およびその動き量から、符号化データの置き換えをマクロブロック単位で行うことを特徴とする。   A twelfth moving image re-encoding device according to the present invention is the eleventh moving image re-encoding device, wherein the encoded data replacement means extracts the motion vector extracted from the first encoded data, The coded data is replaced in units of macroblocks from the display position of the video signal or the GUI image signal and the amount of movement thereof.

この第12の動画像再符号化装置では、オーバレイ処理される領域と、復号化された動画像の各マクロブロックが動き補償予測符号化において参照する領域のいずれも特定することが可能である。これらの情報から、オーバレイ処理の影響を受けるマクロブロックと、受けないマクロブロックを判別することが可能となり、第1の符号化データをそのまま出力するか、或いは再符号化された第2の符号化データを出力するかを、マクロブロック毎に切り替えて再符号化出力することが可能となる。   In the twelfth moving image re-encoding apparatus, it is possible to specify both the region to be subjected to overlay processing and the region to which each macroblock of the decoded moving image refers in the motion compensated prediction encoding. From these pieces of information, it becomes possible to discriminate macroblocks that are affected by overlay processing and macroblocks that are not affected, and output the first encoded data as it is or re-encoded second encoding Whether to output data can be switched for each macroblock and re-encoded.

本発明に係る第13の動画像再符号化装置は、第11の動画像再符号化装置において、前記符号化データ置き換え手段がインターレース動画像信号の早送り、スロー、こま送りおよび一時停止の少なくとも一つを含む特殊再生時には、第2の符号化データを選択して出力し、通常再生およびプログレッシブ動画像信号の特殊再生時には、前記データ抽出手段により抽出されかつ前記ヘッダデータ変更手段により前記ヘッダデータが変更された符号化データを選択して出力することを特徴とする。   In a thirteenth moving image re-encoding device according to the present invention, in the eleventh moving image re-encoding device, the encoded data replacement means is at least one of fast-forwarding, slowing, top-feeding, and pausing of interlaced moving image signals. The second encoded data is selected and output at the time of special reproduction including one, and the header data is extracted by the data extraction means and the header data is changed by the header data changing means at the time of normal reproduction and special reproduction of the progressive video signal. The changed encoded data is selected and output.

ここで、インターレース動画像信号とは、フレーム内の偶数ラインと奇数ラインの映像がフレーム周期の半分の時間だけ離れた時刻の映像であるものであり、プログレッシブ動画像信号とは、フレーム内の偶数ラインと奇数ラインの映像が同時刻の映像であるものである。   Here, the interlaced video signal is a video at a time when the video of the even-numbered line and the odd-numbered line in the frame are separated by a half time of the frame period, and the progressive video signal is the even-numbered video in the frame. The video of the line and the odd line is the video at the same time.

スロー再生やこま送りでは、同一の映像フレームを繰り返し表示する処理が行われる。また、早送り再生においても、符号化データの転送レートに応じて、フレーム間引きと同一の映像フレームの繰り返し表示が組み合わせて行われる場合がある。このように、同一映像フレームが繰り返し表示される場合、インターレースされたフレームで、動きのある映像を表示する場合、偶数ラインと奇数ラインとで映像に動きがあるため、表示がギクシャクした動きをすることになる。通常は、偶数ラインまたは奇数ラインのいずれかを、選択して繰り返し表示することにより、表示をスムーズに行う処理が行われる。しかし、インターレースされた動画像信号の動き補償予測符号化データでは、片方のライン(すなわちフィールド)の映像のみを符号化データレベルで抽出することは困難である。   In slow playback and top feed, processing for repeatedly displaying the same video frame is performed. Also, in fast-forward playback, the same video frame repeated display as frame thinning may be performed in combination depending on the transfer rate of encoded data. In this way, when the same video frame is repeatedly displayed, when a moving image is displayed in an interlaced frame, the display moves jerky because there is a motion in the even and odd lines. It will be. Usually, processing for smoothly displaying is performed by selecting and repeatedly displaying either even lines or odd lines. However, with motion-compensated predictive encoded data of interlaced video signals, it is difficult to extract only one line (ie, field) video at the encoded data level.

このような場合は、本発明に従い特殊再生処理後のベースバンド動画像信号を符号化して得られた第2の符号化データを出力することにより、滑らかな表示を実現することが可能となる。また、プログレッシブ画像ではフレーム内での映像の動きが存在しないため、第1の符号化データの並べ替えおよびヘッダデータの変更修正等により、特殊再生を実現することが可能となる。この両者を適応的に組み合わせて出力することにより、再符号化に伴う画質劣化を最小化し、且つ特殊再生時の画像の乱れも防ぐことが可能となる。   In such a case, smooth display can be realized by outputting the second encoded data obtained by encoding the baseband moving image signal after the special reproduction processing according to the present invention. In addition, since there is no video motion within a frame in a progressive image, special reproduction can be realized by rearranging the first encoded data and changing / modifying header data. By adaptively combining the two and outputting, it is possible to minimize image quality degradation accompanying re-encoding and to prevent image disturbance during special reproduction.

本発明に係る第14の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記再符号化手段が前記第1の符号化データとは異なるフレーム間予測構造で再符号化を行うものであって、該再符号化時のフレーム間予測構造に応じて、前記第1の符号化データより抽出された動きベクトルに対するスケーリングを施す手段を有し、前記符号化モード選択手段が前記スケーリング後の動きベクトルを用いて前記符号化モードの選択を行うことを特徴とする。   A fourteenth moving image re-encoding device according to the present invention is the first to fourth moving image re-encoding devices, wherein the re-encoding means has an inter-frame prediction structure different from that of the first encoded data. Means for performing re-encoding, and means for performing scaling on a motion vector extracted from the first encoded data in accordance with an inter-frame prediction structure at the time of re-encoding, wherein the encoding mode The selection unit selects the encoding mode using the scaled motion vector.

このように再符号化部のコストや遅延時間を削減するために、再符号化時のフレーム間予測構造を第1の符号化データと異ならせた場合でも、第1の符号化データから抽出された動きベクトルを予測構造の違いを考慮してスケーリングすることで、再符号化時に新たに動きベクトルの検出を行うことなく、動き補償予測を用いた予測符号化による再符号化を行うことが可能となる。   In this way, in order to reduce the cost and delay time of the re-encoding unit, even if the inter-frame prediction structure at the time of re-encoding is different from that of the first encoded data, it is extracted from the first encoded data. Can be re-encoded by predictive coding using motion compensated prediction without re-detecting a new motion vector at the time of re-encoding. It becomes.

本発明に係る第5の動画像再符号化装置は、第1乃至第4の動画像再符号化装置において、前記第1の符号化データにおける符号化フレームに対応した、前記復号化された映像フレーム或いは映像フィールドの境界に合わせて、前記オーバレイ処理される前記副映像信号或いは前記GUI画像信号の表示を切り替える手段を有することを特徴とする。   A fifth moving image re-encoding device according to the present invention is the first to fourth moving image re-encoding devices, wherein the decoded video corresponding to the encoded frame in the first encoded data is used. According to another aspect of the invention, there is provided means for switching display of the sub-video signal or the GUI image signal subjected to the overlay processing in accordance with a boundary of a frame or a video field.

オーバレイ処理後の映像信号を第1の符号化データと同一のフレーム構成で再符号化した場合、再符号化により得られた符号化データを復号化したとき、表示される副映像或いはGUI画像が不自然な時間変化を伴った映像の乱れを発生する場合がある。   When the video signal after overlay processing is re-encoded with the same frame configuration as the first encoded data, when the encoded data obtained by re-encoding is decoded, the displayed sub-video or GUI image is In some cases, the image may be disturbed with an unnatural time change.

第15の動画像再符号化装置では、副映像信号或いはGUI画像の変化点を符号化フレームを構成するフィールドの境界にシフトすることにより、オーバレイ処理された映像信号を第1の符号化データと同一のフレーム構成で再符号化しても、再符号化されたデータを復号化した映像信号の表示時に副映像信号やGUI画像の時間的な乱れが発生することがなく、スムーズな映像を表示することが可能となる。   The fifteenth moving image re-encoding device shifts the change point of the sub-video signal or the GUI image to the boundary of the field constituting the encoded frame, thereby converting the overlay-processed video signal into the first encoded data. Even when re-encoding with the same frame configuration, sub-video signals and GUI images are not disturbed in time when a video signal obtained by decoding the re-encoded data is displayed, and a smooth video is displayed. It becomes possible.

本発明によれば符号化された動画像データの復号時に動きベクトル、符号化モード、量子化ステップを含む符号化パラメータを抽出し、復号化されたベースバンド映像信号に対して、副映像或いはGUIのオーバレイ等の処理を施し、処理が施されていないフレーム或いは領域については、抽出された符号化パラメータを用いて再符号化するか、あるいは、元の符号化データの一部を修正して出力し、オーバレイ処理等の施された領域については、各処理内容に応じて動きベクトルの変換および生成を行って再符号化することで、オーバレイ処理の自由度が高く、高画質で低コストな再符号化を実現することができる。   According to the present invention, a coding parameter including a motion vector, a coding mode, and a quantization step is extracted at the time of decoding the encoded moving image data, and a sub-picture or GUI is extracted from the decoded baseband video signal. For frames or regions that have been subjected to processing such as overlay and have not been processed, either re-encode using the extracted encoding parameters, or modify part of the original encoded data and output However, for regions that have undergone overlay processing, etc., re-encoding is performed by converting and generating motion vectors according to the contents of each processing, so that the degree of freedom of overlay processing is high, and high-quality and low-cost re-encoding is performed. Encoding can be realized.

従って、本発明の動画像再符号化装置により、方式の異なるディジタル映像システム間のディジタル接続をスムーズに行うことが可能となる。   Therefore, the moving image re-encoding device of the present invention makes it possible to smoothly perform digital connection between digital video systems of different systems.

以下、図面を参照して本発明の実施の形態を説明する。
[第1の実施形態]
図1に、本発明に係る第1の実施形態に係る動画像再符号化装置を含むシステムの構成を示す。このシステムは、従来のDVDプレーヤ等のディジタル映像音声再生装置に、アナログ映像及びアナログ音声出力に加えて、IEEE1394バスへのディジタル出力インタフェースを持つ構成となっている。ここで、図中の破線28で囲んだ部分が従来のディジタル映像音声再生装置に対して付加される再符号化部である。
Embodiments of the present invention will be described below with reference to the drawings.
[First Embodiment]
FIG. 1 shows the configuration of a system including a moving image re-encoding device according to the first embodiment of the present invention. In this system, a digital video / audio reproduction device such as a conventional DVD player has a digital output interface to the IEEE1394 bus in addition to analog video and analog audio output. Here, a portion surrounded by a broken line 28 in the figure is a re-encoding unit added to the conventional digital video / audio reproduction device.

光ディスク50は例えばDVDディスクであり、音声データ、符号化された動画像データ、副映像データ、ナビゲーションデータ等が多重化されて記録されている。この光ディスク50から再生される信号はデータ分離器10に入力され、音声データ51、動画像データ52、副映像データ53、ナビゲーションデータ54の各データが分離される。分離された各データ51,52,53,54は、バッファメモリ11,12,13,14をそれぞれ経由して、オーディオデコーダ15、ビデオデコーダ16、副映像デコーダ17により復号化される。   The optical disk 50 is, for example, a DVD disk, and audio data, encoded moving image data, sub-picture data, navigation data, and the like are multiplexed and recorded. A signal reproduced from the optical disc 50 is input to the data separator 10, and the audio data 51, moving image data 52, sub-video data 53, and navigation data 54 are separated. The separated data 51, 52, 53, and 54 are decoded by the audio decoder 15, the video decoder 16, and the sub-picture decoder 17 through the buffer memories 11, 12, 13, and 14, respectively.

ビデオデコーダ16により動画像データを復号化して得られた動画像信号56に対して、副映像デコーダ17により副映像データを復号化して得られた副映像信号57と、再生装置がGUI(Graphical User Interface)画像発生器20によりユーザのオペレーション60に対応して独自に発生させるGUI画像信号59とが加算器19を介して映像オーバレイ処理部(OSD)18によってオーバレイ(合成)処理される。   With respect to the moving picture signal 56 obtained by decoding the moving picture data by the video decoder 16, a sub-picture signal 57 obtained by decoding the sub-picture data by the sub-picture decoder 17 and a reproduction apparatus by a GUI (Graphical User Interface) The GUI image signal 59 uniquely generated by the image generator 20 in response to the user's operation 60 is subjected to overlay (synthesis) processing by the video overlay processing unit (OSD) 18 via the adder 19.

図3に、復号化により得られた動画像信号56に対するオーバレイ画像の例を示す。図3(a)は動画像信号56のフレーム(動画像フレーム)を示し、図3(b)はオーバレイ後の動画像フレームを示している。図3(b)における字幕部分111は、ビットマップ映像として符号化された副映像信号であり、副映像デコーダ17により復号化されたものであって、DVDシステムでサブピクチャと呼ばれるものである。また、図3(b)における時刻表示110は、光ディスク50には記録されておらず、再生装置自体が発生する時刻を映像上にグラフィックとしてオーバレイしたものである。図1に説明を戻すと、オーディオデコーダ15で音声データを復号化して得られた音声信号55と、映像オーバレイ処理部18でオーバレイ処理された動画像信号58は、それぞれD/A変換器29,30によりアナログ信号61,62に変換されて外部へ出力される。さらに、これらの音声信号55とオーバレイ処理後の動画像信号58は、それぞれオーディオエンコーダ21、ビデオエンコーダ22により再符号化される。この再符号化により得られた音声データおよび動画像データは、それぞれバッファメモリ24,25を経由して、多重化部26によりトランスポートストリームに多重化され、さらにIEEE1394インタフェース27からディジタル出力される。   FIG. 3 shows an example of an overlay image for the moving image signal 56 obtained by decoding. 3A shows a frame (moving image frame) of the moving image signal 56, and FIG. 3B shows a moving image frame after overlay. A subtitle portion 111 in FIG. 3B is a sub-picture signal encoded as a bitmap picture, decoded by the sub-picture decoder 17 and called a sub-picture in the DVD system. Also, the time display 110 in FIG. 3B is not recorded on the optical disc 50, but is a graphic overlay of the time generated by the playback device itself on the video. Returning to FIG. 1, the audio signal 55 obtained by decoding the audio data by the audio decoder 15 and the moving image signal 58 overlay-processed by the video overlay processing unit 18 are respectively converted into the D / A converter 29, 30 is converted into analog signals 61 and 62 and output to the outside. Further, the audio signal 55 and the moving image signal 58 after the overlay processing are re-encoded by the audio encoder 21 and the video encoder 22, respectively. Audio data and moving image data obtained by this re-encoding are multiplexed into a transport stream by the multiplexing unit 26 via the buffer memories 24 and 25, respectively, and further digitally output from the IEEE 1394 interface 27.

また、ビデオデコーダ16からは、復号化と同時にマクロブロック毎の動きベクトル、符号化モード、量子化ステップ等の復号化前の動画像データ52に含まれる符号化パラメータ64が抽出され、この符号化パラメータ64はデータメモリ31に一時記憶される。ビデオエンコーダ22には、データメモリ31に一時記憶された符号化パラメータデータから、再符号化を行う画像フレームおよびマクロブロックに対応する符号化パラメータが読み出され、外部から与えられる既定の動きベクトル情報65と共に入力される。   The video decoder 16 extracts a coding parameter 64 included in the moving image data 52 before decoding such as a motion vector for each macroblock, a coding mode, and a quantization step simultaneously with the decoding. The parameter 64 is temporarily stored in the data memory 31. The video encoder 22 reads out encoding parameters corresponding to image frames and macroblocks to be re-encoded from the encoding parameter data temporarily stored in the data memory 31, and provides predetermined motion vector information given from the outside. 65 is input together.

(ビデオエンコーダ22の第1の構成例)
図2は、図1における再符号化のためのビデオエンコーダ22の第1の構成例を示した図である。図中、図1と同一の符号を付与した構成要素は、図1と同一の構成要素を示している。このビデオエンコーダ22は、MPEG2等に代表される動き補償予測直交変換符号化方式に基づいており、動き補償部70、動き補償モード(符号化モード)およびDCTタイプ決定部72、DCTおよび量子化部74、逆量子化および逆DCT部75、フレームメモリ23、レート制御部73、可変長符号化部76から構成される。
(First Configuration Example of Video Encoder 22)
FIG. 2 is a diagram showing a first configuration example of the video encoder 22 for re-encoding in FIG. In the figure, components given the same reference numerals as those in FIG. 1 indicate the same components as those in FIG. This video encoder 22 is based on a motion compensated predictive orthogonal transform coding system represented by MPEG2 or the like, and includes a motion compensation unit 70, a motion compensation mode (coding mode) and a DCT type determination unit 72, a DCT and a quantization unit. 74, an inverse quantization and inverse DCT unit 75, a frame memory 23, a rate control unit 73, and a variable length coding unit 76.

このビデオエンコーダ22は、通常のMPEG2エンコーダ等の動画像符号化装置で必要な動きベクトル検出回路が無いことが特徴となっている。通常の動画像符号化装置では、マクロブロック毎に動きベクトルを検出するために、膨大なブロックマッチング演算を必要とする。一般に、動きベクトル検出回路が符号化装置全体に占めるハードウェアリソースは非常に高い比率を占めるが、ビデオエンコーダ22ではこのようなハードウェア規模の大きい動きベクトル検出部が不要である。すなわち、本実施形態では復号化前の動画像データ52から抽出した動きベクトル64と、外部から与えられる既定の動きベクトル65との両者を用いて動き補償を行う。   The video encoder 22 is characterized in that it does not have a motion vector detection circuit necessary for a moving picture coding apparatus such as a normal MPEG2 encoder. In a normal moving image encoding apparatus, a huge block matching operation is required to detect a motion vector for each macroblock. In general, the hardware resources that the motion vector detection circuit occupies in the entire coding apparatus occupy a very high ratio, but the video encoder 22 does not require such a large hardware motion vector detection unit. That is, in this embodiment, motion compensation is performed using both the motion vector 64 extracted from the moving image data 52 before decoding and the predetermined motion vector 65 given from the outside.

次に、動き補償モードおよびDCTタイプ決定部72により、それぞれの動き補償による予測誤差信号のパワーまたは大きさと、符号化対象画像信号のパワーまたは大きさから、動きベクトル64,65のいずれを用いるか、或いはイントラ符号化を行うかをマクロブロック毎に決定する。   Next, the motion compensation mode and DCT type determination unit 72 uses which of the motion vectors 64 and 65 is used based on the power or magnitude of the prediction error signal by each motion compensation and the power or magnitude of the encoding target image signal. Alternatively, whether to perform intra coding is determined for each macroblock.

次に、復号化前の動画像データ52から抽出した動きベクトル64による予測符号化が選択されたマクロブロックについては、後述するDCTタイプを復号化前の動画像データ52から抽出したDCTタイプと一致させ、また、それ以外の場合は、最適なDCTタイプの検出を行う。   Next, for a macroblock for which predictive encoding using the motion vector 64 extracted from the video data 52 before decoding is selected, the DCT type described later matches the DCT type extracted from the video data 52 before decoding. In other cases, optimal DCT type detection is performed.

レート制御部73では、量子化部74で使用するマクロブロック毎の量子化ステップの決定を行う。すなわち、まず復号化前の動画像データ52から抽出した動きベクトル64による予測符号化が選択されたマクロブロックについては、出力ビットレートの制約を受けない場合は、動画像データ52から抽出した量子化ステップをそのまま利用し、出力ビットレートの制約を受ける場合は、所望のビットレートとなるように、発生符号量80を参照して量子化ステップを決定する。また、外部からの既定の動きベクトル65が選択された、或いはイントラ符号化が選択されたマクロブロックについては、出力ビットレートの制約を受けない場合は、動画像データ52から抽出した量子化ステップ、または予め定められた所定の量子化ステップを用い、出力ビットレートの制約を受ける場合は、所望のビットレートとなるように、発生符号量80を参照して量子化ステップを決定する。   The rate control unit 73 determines a quantization step for each macroblock used in the quantization unit 74. That is, for a macroblock for which predictive encoding using the motion vector 64 extracted from the moving image data 52 before decoding is selected, the quantization extracted from the moving image data 52 is not subject to the output bit rate restriction. When the steps are used as they are and the output bit rate is restricted, the quantization step is determined with reference to the generated code amount 80 so that the desired bit rate is obtained. For a macroblock for which a predetermined external motion vector 65 is selected or for which intra coding is selected, a quantization step extracted from the moving image data 52 when the output bit rate is not limited, Alternatively, when a predetermined predetermined quantization step is used and the output bit rate is restricted, the quantization step is determined with reference to the generated code amount 80 so as to obtain a desired bit rate.

(動画像再符号化装置の動作)
図4は、本実施形態に係る動画像再符号化装置の動作タイミング例を示している。ここでは、復号化および再符号化がいずれもMEPG2に準拠しているものとする。図中のIはイントラ符号化ピクチャ(Iピクチャ)、Pは前方予測符号化ピクチャ(Pピクチャ)、Bは双方向予測符号化ピクチャ(Bピクチャ)を示し、添え字の数字は、各フレームの表示される順序を示している。
(Operation of video re-encoding device)
FIG. 4 shows an example of operation timing of the video re-encoding device according to the present embodiment. Here, both decoding and re-encoding are based on MPEG2. In the figure, I represents an intra-coded picture (I picture), P represents a forward predictive coded picture (P picture), B represents a bi-directional predictive coded picture (B picture), and the subscript number represents the number of each frame. The order of display is shown.

図4において、参照符号101(Video DTS)は各フレームが復号化されるタイミングを示しており、その時刻はDTS(Decoding Time Stamp:復号時刻管理情報)として符号化データ中に記述されている。MPEG2では、Bピクチャのフレーム間予測のために、一般に符号化および復号化される順序と表示される順序が異なる。図4の例では、参照符号101(Video DTS)が各フレームの主映像が表示されるタイミングであり、その時刻はPTS(Presentation Time Stamp:再生出力時刻管理情報)として、符号化データ中に記述されている。MPEG2では、BピクチャのPTSは同フレームのDTSと一致し、IピクチャおよびPピクチャのPTSは、次に復号されるIピクチャまたはPピクチャのDTSと一致する。   In FIG. 4, reference numeral 101 (Video DTS) indicates the timing at which each frame is decoded, and the time is described in the encoded data as DTS (Decoding Time Stamp: decoding time management information). In MPEG2, the order of encoding and decoding is generally different from the order of display for inter-frame prediction of B pictures. In the example of FIG. 4, reference numeral 101 (Video DTS) is the timing at which the main video of each frame is displayed, and the time is described in the encoded data as PTS (Presentation Time Stamp: reproduction output time management information). Has been. In MPEG2, the PTS of the B picture matches the DTS of the same frame, and the PTS of the I picture and the P picture matches the DTS of the I picture or P picture to be decoded next.

また、DVDでは主映像信号にマッピングされる副映像信号は表示順で復号され、その時刻DTSは副映像の表示時刻PTSと一致する。図4中の参照符号102(SP DTS)は、各動画像フレームに対応する副映像信号の復号および表示のタイミングを示している。副映像信号は、復号と同時に主映像信号にオーバレイされる。図4中の参照符号103(OSD)は、オーバレイ処理のタイミングを示している。   In the DVD, the sub video signal mapped to the main video signal is decoded in the display order, and the time DTS coincides with the sub video display time PTS. Reference numeral 102 (SP DTS) in FIG. 4 indicates the decoding and display timing of the sub-video signal corresponding to each moving image frame. The sub video signal is overlaid on the main video signal simultaneously with decoding. Reference numeral 103 (OSD) in FIG. 4 indicates the timing of overlay processing.

図4の例では、各動画像フレーム毎に対応する副映像信号がオーバレイ後の映像信号として復号および表示されているが、副映像フレームは全ての動画像フレームに対して存在していなくともよく、また、同一の副映像信号を一定時間繰り返して表示したり、或いは副映像信号内の一部をナビゲーション処理に従ってハイライトする等の処理も可能となっている。   In the example of FIG. 4, the sub video signal corresponding to each moving image frame is decoded and displayed as a video signal after overlay, but the sub video frame may not exist for all moving image frames. Also, it is possible to repeatedly display the same sub-video signal for a certain period of time, or to highlight a part of the sub-video signal according to the navigation process.

アナログ映像信号の出力は、オーバレイ処理と同時に開始可能となり、従って図4中の参照符号104(Display(Analog))がアナログ映像信号として表示されるタイミングを示している。   The output of the analog video signal can be started at the same time as the overlay processing. Therefore, reference numeral 104 (Display (Analog)) in FIG. 4 indicates the timing at which the analog video signal is displayed.

一方、オーバレイ処理後の映像信号をI,P,Bの各ピクチャタイプを含む第1の符号化と同様のパラメータで再符号化するためには、参照符号100で示される復号順序と同様の順序で再符号化を行う必要がある。従って、最初に復号されるフレームI2が表示される時刻から再符号化を開始することが可能となる。図4中の参照符号105(Video Re-encoding)は、オーバレイ処理後の映像信号の再符号化タイミングを示している。再符号化された動画像データは、同様に再符号化された音声信号とともに多重化されて、ディジタルデータとして出力される。   On the other hand, in order to re-encode the video signal after overlay processing with the same parameters as the first encoding including each picture type of I, P, and B, the same order as the decoding order indicated by reference numeral 100 Need to be re-encoded. Therefore, re-encoding can be started from the time when the frame I2 to be decoded first is displayed. Reference numeral 105 (Video Re-encoding) in FIG. 4 indicates the re-encoding timing of the video signal after overlay processing. The re-encoded moving image data is multiplexed together with the re-encoded audio signal and output as digital data.

図示しない受信側では、符号化されたディジタルデータについて送受信バッファ遅延および伝送路の遅延の後にデータの復号化が行われ、さらに復号化に伴うフレーム並べ替えが行われた後に表示が行われる。図4中の参照符号106(Video Re-decoding)が受信側での復号化タイミングを示し、また参照符号107(Display(Digital))が表示されるタイミングを示している。   On the receiving side (not shown), the encoded digital data is decoded after transmission / reception buffer delay and transmission path delay, and further displayed after frame rearrangement accompanying decoding is performed. Reference numeral 106 (Video Re-decoding) in FIG. 4 indicates the decoding timing on the receiving side, and reference numeral 107 (Display (Digital)) is displayed.

[第2の実施形態]
図5は、本発明に係る第2の実施形態に係る動画像再符号化装置を含むシステムの構成を示すブロック図である。図5において図1に示した第1の実施形態と同一の構成要素については、同一の参照符号を付与して第1の実施形態との相違点を説明する。
[Second Embodiment]
FIG. 5 is a block diagram showing a configuration of a system including a moving image re-encoding device according to the second embodiment of the present invention. In FIG. 5, the same components as those in the first embodiment shown in FIG. 1 are given the same reference numerals, and differences from the first embodiment will be described.

本実施形態の第1の実施形態との構成上の違いは、映像オーバレイ処理部18の出力映像信号58とフレームメモリ23からの出力映像信号66のいずれかを選択するセレクタ67が付加され、符号化パラメータの一時記憶用のデータメモリ31が除去され、また副映像データ53およびナビゲーションデータ54用のバッファメモリ32,33がFIFO(First In First Out)メモリからRAM(ランダムアクセスメモリ)に変更されている点、および音声データ51、動画像データ51用のバッファメモリ11,12の容量が大きくなる点にある。   The difference between the present embodiment and the first embodiment is that a selector 67 for selecting either the output video signal 58 of the video overlay processing unit 18 or the output video signal 66 from the frame memory 23 is added. The data memory 31 for temporary storage of the conversion parameters is removed, and the buffer memories 32 and 33 for the sub-picture data 53 and the navigation data 54 are changed from FIFO (First In First Out) memory to RAM (Random Access Memory). And the capacity of the buffer memories 11 and 12 for the audio data 51 and the moving image data 51 is increased.

さらに、動作上の違いは、オーバレイ処理部18の処理が第1の実施例のように表示されるフレームの順序ではなく、動画像データ52が復号化されるフレームの順序でなされる点が異なる。   Further, the difference in operation is that the processing of the overlay processing unit 18 is performed not in the order of frames displayed as in the first embodiment but in the order of frames in which the moving image data 52 is decoded. .

(動画像再符号化装置の動作)
以下、図6を用いて本実施形態の動作を説明する。
(Operation of video re-encoding device)
Hereinafter, the operation of the present embodiment will be described with reference to FIG.

図6は、本実施形態の動作タイミングを示した図であり、第1の実施形態の動作タイミングを示した図4に対応する。図6において、参照符号120,121,122は、それぞれ図4の参照符号100,101,102に対応する動画像データの復号化タイミング、動画像データの表示タイミング、副映像の復号化および表示のタイミングをそれぞれ示している。   FIG. 6 is a diagram showing the operation timing of the present embodiment, and corresponds to FIG. 4 showing the operation timing of the first embodiment. 6, reference numerals 120, 121, and 122 denote moving image data decoding timing, moving image data display timing, sub-picture decoding and display corresponding to the reference numerals 100, 101, and 102 in FIG. Each timing is shown.

第1の実施形態では、図4中に示したタイミング100,101,102に従って、復号および表示がなされたのに対して、本実施形態では参照符号123〜126に示すタイミングで復号化および再符号化処理がなされて、アナログ映像像信号およびディジタル映像データが出力される。   In the first embodiment, decoding and display are performed according to the timings 100, 101, and 102 shown in FIG. 4, whereas in this embodiment, decoding and re-encoding are performed at the timings indicated by reference numerals 123 to 126. The analog video image signal and digital video data are output.

まず、各動画像データの復号の開始は、本来のDTSではなく、最初に復号される動画像フレームI2のPTSのタイミングまで遅延させて行われる。復号開始時刻の遅延時間に応じて、光ディスク50から読み出された動画像データ52は、バッファメモリ12に追加された容量分を利用して蓄積される。音声データ51、副映像データ53、ナビゲーションデータ54も同様である。図6中の参照符号123が本実施形態における動画像データの復号化タイミングである。   First, the decoding of each moving image data is not delayed from the original DTS, but is delayed until the PTS timing of the moving image frame I2 to be decoded first. Depending on the delay time of the decoding start time, the moving image data 52 read from the optical disc 50 is accumulated using the capacity added to the buffer memory 12. The same applies to the audio data 51, the sub-video data 53, and the navigation data 54. The reference numeral 123 in FIG. 6 is the moving image data decoding timing in the present embodiment.

次に、本来は表示されるフレーム順序でオーバレイ処理される副映像信号の復号化およびオーバレイ処理を動画像フレームが復号化される順序に従って行う。図6中の参照符号124は、副映像信号の復号化および復号化された動画像フレームに対するオーバレイ処理のタイミングを示している。副映像の復号化順序が本来の復号化順序と異なるため、副映像データ53、ナビゲーションデータ54は、バッファメモリ32、33からそれぞれ必要なデータをランダムアクセスして読み出される。   Next, the decoding and overlay processing of the sub-picture signal that is originally subjected to the overlay processing in the order of the displayed frames is performed according to the order in which the moving image frames are decoded. Reference numeral 124 in FIG. 6 indicates the decoding timing of the sub-picture signal and the overlay processing timing for the decoded moving image frame. Since the sub-picture decoding order is different from the original decoding order, the sub-picture data 53 and the navigation data 54 are read from the buffer memories 32 and 33 by randomly accessing necessary data.

アナログ信号系62へ送るアナログ映像出力68は、オーバレイ処理された映像信号58と、エンコーダ22に入力されてフレームメモリ23に記録された映像信号66とをセレクタ67で切り替えて出力する。セレクタ67は、出力すべき動画像フレームがBピクチャの場合は映像信号58を選択し、IピクチャまたはPピクチャの場合はフレームメモリ23から読み出された映像信号66を選択する。これにより、復号化順で出力される動画像信号58を表示順に並べ替えてアナログ出力することが可能となる。図6中の参照符号125が、アナログ映像信号の出力タイミングを示している。   The analog video output 68 to be sent to the analog signal system 62 is switched by the selector 67 between the video signal 58 subjected to overlay processing and the video signal 66 input to the encoder 22 and recorded in the frame memory 23. The selector 67 selects the video signal 58 when the moving picture frame to be output is a B picture, and selects the video signal 66 read from the frame memory 23 when the moving picture frame is an I picture or P picture. As a result, the moving picture signals 58 output in the decoding order can be rearranged in the display order and output in analog form. Reference numeral 125 in FIG. 6 indicates the output timing of the analog video signal.

一方、オーバレイ処理部18から復号化順で出力される映像信号58は、再符号化部34に入力され、入力された順序、すなわち復号化の順序で再符号化が行われる。再符号化用のエンコーダは22は、第1の実施形態と基本構成は同じであり、第1の符号化データから抽出された符号化パラメータ64、外部から与えられる既定の動きベクトル65を用いてマクロブロック毎に適応的に符号化される。本実施形態では、復号化と同時に再符号化がなされるため、図1の符号化パラメータを一時記憶するためのデータメモリ31は不要となる。また、再符号化のためのフレーム並べ替えが不要であるため、第1の実施形態で必要としたフレーム並べ替えのためのフレームメモリを必要とせず、さらに復号化開始からの遅延量を第1の実施形態より小さくすることが可能となる。図6中の参照符号127および128は、受信側で再符号化されたデータを入力して復号化および表示するタイミングを示している。   On the other hand, the video signal 58 output from the overlay processing unit 18 in the decoding order is input to the re-encoding unit 34, and re-encoding is performed in the input order, that is, the decoding order. The encoder for re-encoding 22 has the same basic configuration as that of the first embodiment, and uses an encoding parameter 64 extracted from the first encoded data and a predetermined motion vector 65 given from the outside. Each macroblock is adaptively encoded. In the present embodiment, since re-encoding is performed simultaneously with decoding, the data memory 31 for temporarily storing the encoding parameters in FIG. 1 is not necessary. Further, since frame rearrangement for re-encoding is not required, the frame memory for frame rearrangement required in the first embodiment is not required, and the delay amount from the start of decoding is set to the first amount. It becomes possible to make it smaller than the embodiment. Reference numerals 127 and 128 in FIG. 6 indicate timings when data re-encoded on the receiving side is input, decoded, and displayed.

(フレーム/フィールド適応DTCおよびDCTタイプについて)
図7は、直交変換の代表例として、MPEG2等で用いられているDCT(離散コサイン変換)のタイプを説明する図である。MPEG2では、フレーム内の16画素×16ラインから構成されるマクロブロックを8画素×8ラインから構成される4つの輝度ブロックと2つの色差ブロックに分割して、それぞれDCT処理する。ここで、輝度ブロックをフレームラインから構成されるブロックとするか、各フィールドのラインから構成されるブロックとするかが、マクロブロック毎に変更可能である。
(For frame / field adaptive DTC and DCT types)
FIG. 7 is a diagram for explaining a DCT (discrete cosine transform) type used in MPEG2 or the like as a representative example of orthogonal transform. In MPEG2, a macroblock composed of 16 pixels × 16 lines in a frame is divided into four luminance blocks composed of 8 pixels × 8 lines and two color difference blocks, and each is subjected to DCT processing. Here, whether the luminance block is a block composed of frame lines or a block composed of lines of each field can be changed for each macroblock.

このように輝度ブロックをフレームラインから構成されるブロックとするか、各フィールドのラインから構成されるブロックとするかをマクロブロック毎に変更することをフレーム/フィールド適応DCTと呼び、いずれのブロックを輝度ブロックとするかを示す情報をDCTタイプという。図7(a)は、フレーム構成のマクロブロックを示しており、(b)はフレームブロックへの分割、(c)はフィールドブロックへの分割を示している。   In this way, changing a luminance block to be a block composed of frame lines or a block composed of lines of each field for each macroblock is called a frame / field adaptive DCT, and which block is Information indicating whether to make a luminance block is called a DCT type. FIG. 7A shows a macro block having a frame configuration, FIG. 7B shows division into frame blocks, and FIG. 7C shows division into field blocks.

上述した本発明に係る第1のおよび第2の実施形態において、第1の符号化データから抽出された動きベクトルを用いて再符号化されるマクロブロックについては、上述のDCTタイプについても第1の符号化データから抽出されたDCTタイプを用い、既定の動きベクトル、あるいはイントラ符号化が選択されたマクロブロックについては、いずれのDCTタイプを用いるかを適応的に選択する構成となっている。これらのDCTタイプの判断は、図2における動き補償モードおよびDCTタイプ決定部72によって行われる。DCTタイプの適応選択は、隣接するフレーム内でのライン間の相関と同一フィールド内の隣接するライン間の相関を算出し、フレーム内ライン相関が大きければフレームブロックのDCTを、またフィールド内ライン相関が大きければフィールドブロックのDCTをそれぞれ選択する構成となっている。   In the first and second embodiments of the present invention described above, the macroblock re-encoded using the motion vector extracted from the first encoded data is also the first DCT type. The DCT type extracted from the encoded data is used to adaptively select which DCT type to use for a predetermined motion vector or a macroblock for which intra coding is selected. The determination of these DCT types is performed by the motion compensation mode and DCT type determination unit 72 in FIG. In the DCT type adaptive selection, the correlation between lines in adjacent frames and the correlation between adjacent lines in the same field are calculated. If the intra-frame line correlation is large, the DCT of the frame block and the intra-field line correlation are calculated. Is larger, each field block DCT is selected.

(既定の動きベクトルの与え方について)
次に、図1、図2および図5における既定の動きベクトル65の指定方法について説明する。
既定の動きベクトルの第1の指定方法では、既定の動きベクトルとして大きさゼロのベクトルを与える。復号化された映像信号にオーバレイ処理される字幕等の副映像やGUI画像等は、一般に一定期間静止して表示される場合が多い。そのようなオーバレイ処理された領域は、第1の符号化データから抽出された動きベクトルよりも、動き量がゼロの動きベクトルによる予測符号化を行うことで、符号化効率が向上することになる。また、オーバレイ画像の表示あるいは非表示が切り替わるフレームでは、フレーム間の予測効率が一般に低下し、そのような部分では予測符号化ではなく、イントラ符号化を行えばよい。
(How to give default motion vector)
Next, a method for specifying the default motion vector 65 in FIGS. 1, 2 and 5 will be described.
In the first designation method of the default motion vector, a vector having a size of zero is given as the default motion vector. In general, sub-pictures such as subtitles and GUI images that are subjected to overlay processing on a decoded video signal are generally displayed stationary for a certain period. In such an area subjected to overlay processing, encoding efficiency is improved by performing predictive encoding with a motion vector having a motion amount of zero, rather than a motion vector extracted from the first encoded data. . In addition, in a frame where display or non-display of an overlay image is switched, prediction efficiency between frames generally decreases. In such a portion, intra coding may be performed instead of prediction coding.

従って、第1の符号化データから抽出された動きベクトルによる動き補償予測符号化、ゼロベクトルによる予測符号化、イントラ符号化の中から、最適なものをマクロブロック毎に選択することにより、オーバレイ処理がなされた場合でも、自動的に最適な符号化モードが選択されることになる。   Therefore, by selecting the optimum one for each macroblock from among motion compensated predictive coding using the motion vector extracted from the first coded data, predictive coding using zero vector, and intra coding, overlay processing is performed. Even when the above is performed, the optimum encoding mode is automatically selected.

既定の動きベクトルの第2の指定方法では、既定の動きベクトルがオーバレイ処理される画像の表示位置および動き量から決定される。前者は画面内のどの位置に副映像あるいはGUI画像がオーバレイされたかを示し、後者はオーバレイされた画像が時間的に動く場合の動き量を示している。   In the second method for specifying a predetermined motion vector, the predetermined motion vector is determined from the display position and the amount of motion of the image to be overlaid. The former indicates at which position in the screen the sub-picture or the GUI image is overlaid, and the latter indicates the amount of movement when the overlaid image moves in time.

図8に、オーバレイ処理の時間変化の例を示す。図8では、時間の進行に伴い(a)→(b)→(c)の順で変化する。図8(b)でオーバレイ表示が開始され、時刻110と字幕111の表示が行われる。字幕111は水平方向にスクロールし、図8(c)のフレームでは字幕113,114に示されるように左に動く。時刻110,112の表示位置は固定であり、この位置に対応するマクロブロックの符号化では、既定の動きベクトル65をゼロベクトルとする。また、スクロールする字幕111,113,114については、そのスクロール量を既定の動きベクトルとして与える。このようにすることで、時間的に平行移動を伴うオーバレイ画像についても、再符号化時の予測効率を向上させて、符号化効率を向上させることが可能となる。   FIG. 8 shows an example of the time change of overlay processing. In FIG. 8, it changes in order of (a)-> (b)-> (c) with progress of time. In FIG. 8B, overlay display is started, and time 110 and subtitle 111 are displayed. The subtitle 111 scrolls in the horizontal direction and moves to the left as shown in the subtitles 113 and 114 in the frame of FIG. The display positions at times 110 and 112 are fixed, and in the encoding of the macroblock corresponding to these positions, a predetermined motion vector 65 is set as a zero vector. For the subtitles 111, 113, and 114 to be scrolled, the scroll amount is given as a predetermined motion vector. By doing in this way, it is possible to improve the encoding efficiency by improving the prediction efficiency at the time of re-encoding even for an overlay image that involves temporal parallel translation.

(第2の動き補償モード判定方法について)
次に、図2の動き補償モードおよびDCTタイプ判定部72における第2動き補償モード判定方法について説明する。
動きモードの判定は、第1の符号化データから抽出された動きベクトル64と既定の動きベクトル65とから、より予測効率の高い動きベクトルを選択するものである。先の説明では、予測誤差のより小さくなるベクトルを用いる方式としたが、その場合、符号化対象マクロブロック画像の読み出し、それぞれの動きベクトルに応じた参照マクロブロック画像の読み出し、およびそれぞれの予測誤差の演算を行う必要がある。
(Second motion compensation mode determination method)
Next, the second motion compensation mode determination method in the motion compensation mode and DCT type determination unit 72 of FIG. 2 will be described.
The motion mode is determined by selecting a motion vector with higher prediction efficiency from the motion vector 64 extracted from the first encoded data and the predetermined motion vector 65. In the above description, a method using a vector having a smaller prediction error is used. In this case, however, the encoding target macroblock image is read, the reference macroblock image is read according to each motion vector, and each prediction error is determined. It is necessary to perform the operation.

一方、第2の動き補償モード判定方法では、各マクロブロック毎にマクロブロックに占めるオーバレイ画像の面積比および映像信号とのミキシング比率から、いずれの動きベクトルを用いるかの選択を行う。これにより、符号化モード決定のための演算量を削減することが可能となる。   On the other hand, in the second motion compensation mode determination method, which motion vector is used is selected for each macroblock from the area ratio of the overlay image in the macroblock and the mixing ratio with the video signal. Thereby, it is possible to reduce the amount of calculation for determining the encoding mode.

図9は、符号化モード決定の例を説明する図である。図9において、111がオーバレイ処理される部分であり、130および131は再符号化時のマクロブロックの一部を拡大したものである。マクロブロック131は、大部分の画素がオーバレイ処理されるため、本来の映像信号がほとんど上書きされてしまう。このようなマクロブロックでは、第1の符号化データから抽出された動きベクトルよりも、オーバレイされる画像に合わせた既定の動きベクトルを用いる方が予測効率を向上させることが可能となる。   FIG. 9 is a diagram illustrating an example of encoding mode determination. In FIG. 9, reference numeral 111 denotes a portion to be subjected to overlay processing, and reference numerals 130 and 131 denote enlarged macroblocks at the time of re-encoding. Since most of the pixels in the macro block 131 are subjected to overlay processing, the original video signal is almost overwritten. In such a macroblock, it is possible to improve the prediction efficiency by using a predetermined motion vector that matches the overlaid image, rather than a motion vector extracted from the first encoded data.

一方、マクロブロック130に示すように、マクロブロック内に占めるオーバレイ領域の比率が低い場合は、第1の符号化データから抽出された動きベクトルを用いることで、符号化効率を維持することが可能となる。また、オーバレイ処理が全く施されないマクロブロックについても、第1の符号化データから抽出された動きベクトルを用いる。   On the other hand, as shown in the macro block 130, when the ratio of the overlay area in the macro block is low, it is possible to maintain the encoding efficiency by using the motion vector extracted from the first encoded data. It becomes. A motion vector extracted from the first encoded data is also used for a macroblock that is not subjected to overlay processing at all.

さらに、オーバレイ処理が画素の上書きではなく、復号化された映像信号とのミキシング処理である場合については、マクロブロック内のオーバレイ処理される面積とミキシング比率との積を用いて、動きベクトルの選択を決定する。   Furthermore, when the overlay processing is not pixel overwriting but mixing with the decoded video signal, the motion vector is selected using the product of the area to be overlaid in the macroblock and the mixing ratio. To decide.

(動きベクトルスケーリング機能を有するビデオエンコーダ22について)
図10は、図1および図5におけるビデオエンコーダ22の第2の構成例を示した図である。図10で、図2と同一の符号は、図2と同一の構成要素を示している。
(About the video encoder 22 having a motion vector scaling function)
FIG. 10 is a diagram illustrating a second configuration example of the video encoder 22 in FIGS. 1 and 5. 10, the same reference numerals as those in FIG. 2 denote the same components as those in FIG.

図2に示したビデオエンコーダ22の第1の構成例との違いは、動きベクトル64,65に対する動きベクトルスケーリング部77が付加された点にある。図10のビデオエンコーダは、復号化部による動画像データの復号化およびオーバレイ処理に、映像信号の全部または一部が解像度変換、つまり拡大あるいは縮小されて出力される場合や、フレーム周波数(フレームレート)或いはフィールド周波数(フィールドレート)が変換されて出力される場合等に対応可能となっている。   The difference from the first configuration example of the video encoder 22 shown in FIG. 2 is that a motion vector scaling unit 77 for the motion vectors 64 and 65 is added. The video encoder shown in FIG. 10 uses a case where all or part of a video signal is output after resolution conversion, that is, enlargement or reduction, for decoding of moving image data and overlay processing by a decoding unit, or a frame frequency (frame rate). ) Or when the field frequency (field rate) is converted and output.

すなわち、拡大あるいは縮小の解像度変換が施された動画像信号の再符号化に際しては、動きベクトル64,65も動きベクトルスケーリング部77により映像の解像度変換の比率(拡大あるいは縮小比率)に対応してスケーリング処理されて用いられる。   That is, when re-encoding a moving image signal that has been subjected to enlargement or reduction resolution conversion, the motion vectors 64 and 65 correspond to the video resolution conversion ratio (enlargement or reduction ratio) by the motion vector scaling unit 77. Used after scaling.

図11は、復号化およびオーバレイ処理された映像フレーム140の左下の部分を水平垂直ともに2倍にした拡大表示画像が出力される例である。映像フレーム140におけるマクロブロック142は、拡大された映像フレームでは4つのマクロブロック143として再符号化されることになる。この場合、マクロブロック142に対応した動きベクトルの値を水平、垂直方向ともに2倍にスケーリングし、スケーリングされた動きベクトルを4つのマクロブロック143それぞれに適応して再符号化する構成となる。   FIG. 11 shows an example in which an enlarged display image is output in which the lower left portion of the decoded and overlaid video frame 140 is doubled both horizontally and vertically. The macroblock 142 in the video frame 140 is re-encoded as four macroblocks 143 in the enlarged video frame. In this case, the motion vector value corresponding to the macroblock 142 is scaled twice in both the horizontal and vertical directions, and the scaled motion vector is adapted to each of the four macroblocks 143 and re-encoded.

また、表示フレームレート或いは表示フィールドレートの変換が施された動画像信号の再符号化に際しては、入力される動きベクトル64,65も、動きベクトルスケーリング部77により表示フレームレート或いは表示フィールドレートの変換比率に対応してスケーリング処理されて用いられる。   In addition, when re-encoding a moving image signal that has undergone display frame rate or display field rate conversion, input motion vectors 64 and 65 are also converted by the motion vector scaling unit 77 into display frame rate or display field rate. It is used after being scaled according to the ratio.

すなわち、図12(a)に示す復号化された映像信号が1フレームずつ間引かれて図12(b)のように出力される場合等では、第1の符号化データから検出された動きベクトル200,201のうち201を水平および垂直ともに2倍にスケーリングした動きベクトル202を用いて、図22(b)の映像信号の再符号化を行う。   That is, in the case where the decoded video signal shown in FIG. 12A is thinned out frame by frame and output as shown in FIG. 12B, the motion vector detected from the first encoded data is used. The video signal shown in FIG. 22B is re-encoded using the motion vector 202 obtained by scaling 201 out of 200 and 201 both horizontally and vertically.

(特殊再生について)
次に、本発明に係る第1のおよび第2の実施形態において、さらに早送り、逆再生、ポーズ、スロー再生等の特殊再生機能を有する場合の動作について説明する。
(About special playback)
Next, in the first and second embodiments according to the present invention, the operation in the case of having special playback functions such as fast forward, reverse playback, pause, slow playback and the like will be described.

図13は、早送り再生の例であり、符号化された動画像データから、Iピクチャの部分のみを抽出して、間欠的に復号化を行い、復号化を行わないタイミングではその直前に復号化されたフレームの映像を出力する。図13では、Iピクチャが15フレーム間隔で符号化されており、これを5フレーム周期で復号化することで、3倍速の早送り再生を実現している。図13中の斜線を施した出力フレームでは、その直前に復号化したIピクチャの映像を繰り返し出力する。この場合、再符号化に際しては、斜線を施したフレームは、Iピクチャではなく、Pピクチャとして再符号化することができる。本来Iピクチャであるために、一般に第1の符号化データが動きベクトル情報を持っていない。しかし、ゼロベクトルを用いた動き補償で予測誤差がゼロになるため、自動的にゼロベクトルの動き補償モードが選択されることになり、再符号化時の符号化効率が非常に高いものとなり、再符号化後の伝送ビットレートを低下させることが可能となる。   FIG. 13 shows an example of fast-forward playback, in which only the I picture portion is extracted from the encoded moving image data and is decoded intermittently. Output the video of the specified frame. In FIG. 13, I pictures are encoded at 15-frame intervals, and decoding is performed at a cycle of 5 frames to realize triple-speed fast-forward playback. In the output frame indicated by hatching in FIG. 13, the video of the I picture decoded immediately before is output repeatedly. In this case, when re-encoding, the hatched frame can be re-encoded as a P picture instead of an I picture. Since it is originally an I picture, the first encoded data generally does not have motion vector information. However, since the prediction error becomes zero by motion compensation using the zero vector, the motion compensation mode of the zero vector is automatically selected, and the encoding efficiency at the time of re-encoding becomes very high. It becomes possible to reduce the transmission bit rate after re-encoding.

図14は3倍速の逆再生の例であり、図13の早送りと同様にIピクチャのみ復号化し、その際に復号化するフレームの順序を時間的に逆にすることで、逆再生が行われる。   FIG. 14 shows an example of reverse playback at 3 × speed, and reverse playback is performed by decoding only the I picture and reversing the order of frames to be decoded at that time in the same manner as fast forward in FIG. .

図15はポーズ動作の例を示しており、図15の例では、フレームI2の復号化後に同フレームを繰り返し表示することによりポーズ状態となる。この場合も、再符号化時には、図13と同様に斜線を施したフレームは、Pピクチャとして再符号化し、ゼロベクトルによる予測符号化が自動選択される。   FIG. 15 shows an example of a pause operation. In the example of FIG. 15, a pause state is obtained by repeatedly displaying the same frame after decoding the frame I2. Also in this case, at the time of re-encoding, the hatched frame is re-encoded as a P picture in the same way as in FIG. 13, and predictive encoding with a zero vector is automatically selected.

図16は、別の早送り再生の実現方法を示している。図16では、IピクチャおよびPピクチャのみの符号化データを復号化して出力するものであり、図中の網掛けで示したフレームは、その直前のフレームの映像を繰り返して出力するものである。従って、図16の例では1.5倍速のなだらかな早送り再生が実現できる。ここで、斜線を施したフレームについては、図13と同様にゼロベクトルを用いたPピクチャとして再符号化する。また、斜線を施していないフレームについては、第1の符号化データから抽出される動きベクトルおよび符号化パラメータを用いて再符号化することにより、符号化効率の低下を伴わずに再符号化することが可能である。   FIG. 16 shows another method for realizing fast-forward playback. In FIG. 16, encoded data of only an I picture and a P picture is decoded and output, and a frame indicated by hatching in the figure repeatedly outputs an image of the immediately preceding frame. Therefore, in the example of FIG. 16, it is possible to realize gentle fast-forward playback at 1.5 times speed. Here, the hatched frame is re-encoded as a P picture using a zero vector, as in FIG. In addition, a frame that is not shaded is re-encoded without reducing the encoding efficiency by re-encoding using the motion vector and encoding parameter extracted from the first encoded data. It is possible.

図17は、スロー再生の実現例を示している。図17の例では、全ての符号化された動画像データの復号化をフレーム周期の整数倍のタイミングで行い、復号化をしていない時は同一の表示フレームを繰り返し表示する。図17中の斜線を施したフレームが繰り返し表示されるフレームである。ここでは、3フレーム毎に復号化を行い、1/3倍速のスロー再生が実現される。図17でOutput1で示した信号がアナログ出力の映像信号となる。一方、スロー再生時の再符号化出力は、フレーム間予測の構造を考慮して、図17のOutput2で示したフレーム構成となる。   FIG. 17 shows an implementation example of slow playback. In the example of FIG. 17, decoding of all encoded moving image data is performed at a timing that is an integral multiple of the frame period, and the same display frame is repeatedly displayed when decoding is not performed. The hatched frame in FIG. 17 is a frame that is repeatedly displayed. Here, decoding is performed every three frames to realize slow reproduction at 1/3 speed. The signal indicated by Output1 in FIG. 17 is an analog output video signal. On the other hand, the re-encoded output at the time of slow reproduction has a frame configuration indicated by Output 2 in FIG. 17 in consideration of the inter-frame prediction structure.

ここで、B0やB1のフレームは、同一の動画像フレームを繰り返しBピクチャとして再符号化しており、またP2*はI2と同一の動画像フレームをPピクチャとして再符号化したもので、そのとき参照画像と予測画像が一致するため、ゼロベクトルの動き補償予測符号化をすることにより、予測誤差信号は常にゼロとなり符号化効率の非常に高い符号化が行われる。Output2として再符号化された動画像データは、受信側では通常の復号化手順に従ってフレームの並べ替えが行われ、Output1と同様の1/3倍速の映像として再生される。   Here, the B0 and B1 frames are re-encoded as the same moving image frame as a B picture, and P2 * is the same moving image frame as I2 as a P picture. Since the reference image matches the predicted image, by performing motion compensation predictive coding of the zero vector, the prediction error signal is always zero and coding with very high coding efficiency is performed. The moving image data re-encoded as Output 2 is subjected to frame rearrangement according to a normal decoding procedure on the receiving side, and is reproduced as a 1/3 speed video similar to Output 1.

図13〜図17の再符号化時には、第1の符号化データから抽出された動きベクトル、またはゼロベクトルを用いた動き補償予測符号化を行い、フレームの繰り返し数に応じて、各符号化フレームの表示順を示すヘッダデータ(MPEG2では、temporal_referenceと呼ばれる)の書き換えを行う。   At the time of re-encoding in FIGS. 13 to 17, motion-compensated predictive encoding using a motion vector extracted from the first encoded data or a zero vector is performed, and each encoded frame is determined according to the number of frame repetitions. The header data indicating the display order (referred to as temporal_reference in MPEG2) is rewritten.

また、MPEG2では3:2プルダウンと呼ばれる符号化フレームレートから表示フレームレートへの変換を行うレート変換部があり、各符号化フレームが3フィールド期間表示されるか、或いは2フィールド期間表示されるかを示すフラグ(MPEG2では、repeat_first_fieldと呼ばれる)と、各フレームがトップフィールドから表示されるか、或いはボトムフィールドから表示されるかを示すフラグ(MPEG2では、top_field_first)によって制御される。復号後の映像信号の表示では、トップフィールドとボトムフィールドが必ず交互に表示されるように、これらのフラグが正しく設定される必要がある。図13〜図17の例では、復号化されたフレームがさらに繰り返し表示されるため、その表示においてトップフィールドとボトムフィールドが必ず交互に表示されるように、上記のヘッダデータのフラグについても、繰り返しの表示構造に応じて適宜修正して書き換えを行う。   Also, in MPEG2, there is a rate conversion unit that performs conversion from an encoded frame rate to a display frame rate called 3: 2 pulldown, and whether each encoded frame is displayed for 3 field periods or 2 field periods. And a flag indicating whether each frame is displayed from the top field or the bottom field (top_field_first in MPEG2). In displaying the decoded video signal, these flags need to be set correctly so that the top field and the bottom field are always displayed alternately. In the examples of FIGS. 13 to 17, since the decoded frame is repeatedly displayed, the above header data flag is also repeatedly displayed so that the top field and the bottom field are always displayed alternately. Rewrite with appropriate modification according to the display structure.

上記の特殊再生において、符号化された動画像データがインターレースされた映像である場合については、復号化された映像信号をそのまま上記の通り出力した場合、図13〜図17に示した繰り返しフレームの再生において、動きのぎくしゃくした映像となってしまう場合がある。なぜならば、インターレースされたフレームにおいては、同一フレームの第2フィールドは第1フィールドよりも1フィールド時間経過した映像であり、再び第1フィールドが繰り返して表示されると、表示される映像が過去の映像に戻り、時間が前後してしまうからである。通常は、このような動きの不自然さが出ないようにするため、同一フレーム内で第1フィールド或いは第2フィールドのうち一つのフィールド選択して、第1フィールドと第2フィールドで同一のフィールド画像を出力する方法がとられる。この場合、第1の符号化データの各マクロブロックと再符号化時の各マクロブロックとは必ずしも一致しなくなる。   In the special reproduction described above, when the encoded moving image data is an interlaced video, if the decoded video signal is output as it is as described above, the repetitive frame shown in FIGS. In playback, there may be a jerky image of movement. This is because, in an interlaced frame, the second field of the same frame is an image that has passed one field time from the first field, and when the first field is displayed again, the displayed image is displayed in the past. This is because the time will go back and forth. Usually, in order to prevent such an unnatural movement, one of the first field and the second field is selected in the same frame, and the same field is used in the first field and the second field. A method of outputting an image is taken. In this case, each macroblock of the first encoded data does not always match each macroblock at the time of re-encoding.

このように、インターレース画像の特殊再生時に同一フィールドの繰り返しによりフレームを構成する場合は、図18に示す方法を用いて再符号化を行う。図18において、0,1,2,3はフィールド番号を示し、(a),(b)および(c),(d)は、第1の符号化データのおける連続する符号化フレームを示している。また、(a’),(b’)および(c’),(d)は、同符号化データを復号化した映像フレームの再符号化時の構成を示している。図18(a)および(b)のフレームは、インターレースフレームである。この場合、再符号化されるフレーム(a’)および(b’)は、(a)および(b)のトップフィールドである0および2をそれぞれ繰り返し表示したフィールドでフレームを構成する。   As described above, when a frame is formed by repeating the same field during special reproduction of an interlaced image, re-encoding is performed using the method shown in FIG. In FIG. 18, 0, 1, 2, and 3 indicate field numbers, and (a), (b), (c), and (d) indicate consecutive encoded frames in the first encoded data. Yes. Also, (a ′), (b ′), (c ′), and (d) show configurations at the time of re-encoding a video frame obtained by decoding the encoded data. The frames shown in FIGS. 18A and 18B are interlaced frames. In this case, the re-encoded frames (a ′) and (b ′) form a frame with fields in which 0 and 2 which are the top fields of (a) and (b) are repeatedly displayed.

すなわち、復号化された映像フィールドは、0→1→2→3のフィールド順となるが、実際のアナログ表示および再符号化されるフィールドは0→0→2→2の順で構成される。この時、第1の符号化データが図18(a)におけるフィールド2がフィールド0からの動き補償予測がなされている場合は、第1の符号化における動きベクトル220を用いて第2の符号化における動き補償予測符号化をフレームマクロブロックを単位として行う。つまり、図18の再符号化時に用いられる動きベクトル223は、220のフィールドを単位とした動きベクトルをそのままフレームを単位とした動きベクトルに変換したものとなる。また、第1の符号化において、フィールド2がフィールド1からの動き補償予測による符号化がなされている場合、つまり図18において動きベクトル221を用いて符号化がなされてる場合は、この動きベクトル221の値を垂直および水平方向にそれぞれ2倍にスケーリングして、再符号化のための動きベクトル223を生成する。これにより、1フィールド間隔の時間における動き量を示す動きベクトル221を1フレーム間隔の動き量を示す動きベクトル223に変換することが可能となる。   That is, the decoded video field is in the field order of 0 → 1 → 2 → 3, but the actual analog display and re-encoded field is configured in the order of 0 → 0 → 2 → 2. At this time, if the first encoded data is subjected to motion compensation prediction from field 0 in field 2 in FIG. 18A, the second encoding is performed using the motion vector 220 in the first encoding. Motion-compensated predictive coding is performed in units of frame macroblocks. That is, the motion vector 223 used at the time of re-encoding in FIG. 18 is obtained by converting a motion vector with 220 fields as a unit into a motion vector with a frame as it is. In the first encoding, when the field 2 is encoded by the motion compensated prediction from the field 1, that is, when the encoding is performed using the motion vector 221 in FIG. Is scaled twice in the vertical and horizontal directions to generate a motion vector 223 for re-encoding. As a result, it is possible to convert the motion vector 221 indicating the amount of motion at the time of one field interval into the motion vector 223 indicating the amount of motion at one frame interval.

また、図18の(c)および(d)のように、第1の符号化データがインターレースされていないフレーム画像(プログレッシブ画像)で、フレームマクロブロックによる動き補償がなされている場合は、再符号化においても第1の符号化データの動きベクトル222をそのまま再符号化時の動きベクトル224として用い、またフィールド構成も第1の符号化データの0、1、2、3と同様にして再符号化を行う。   In addition, as shown in FIGS. 18C and 18D, when the first encoded data is a frame image that is not interlaced (progressive image) and motion compensation is performed using a frame macroblock, re-encoding is performed. In the encoding, the motion vector 222 of the first encoded data is used as it is as the motion vector 224 at the time of re-encoding, and the field configuration is re-encoded in the same manner as 0, 1, 2, 3 of the first encoded data. Do.

さらに、上記の各特殊再生処理のように、ぎくしゃくした動きを防ぐために、同一フィールドの繰り返しによるフレームを構成する場合、フレーム内の垂直相関が高くなるため、DCTタイプとしては常にフレームブロックを輝度ブロックとするDCTを選択することで、符号化効率を向上させることが可能となる。   Further, in the case of constructing a frame by repeating the same field to prevent jerky movement as in each of the special reproduction processes described above, since the vertical correlation in the frame becomes high, the DCT type always uses a frame block as a luminance block. It is possible to improve the encoding efficiency by selecting the DCT.

[第3の実施形態]
図19は、本発明に係る第3の実施形態に係る動画像再符号化装置のシステム構成を示す図である。図中、図1および図2と同一の符号を付与した構成要素は図1および図2の構成要素と同一のものであるため、説明を省略する。
[Third Embodiment]
FIG. 19 is a diagram showing a system configuration of a moving image re-encoding device according to the third embodiment of the present invention. In the figure, the components given the same reference numerals as those in FIGS. 1 and 2 are the same as the components in FIGS.

本実施形態の第1および第2の実施形態との特徴的な違いは、再符号化部28において、第1の符号化データ150を入力して変換処理する変換処理部151と、ビデオエンコーダ22から出力なされる符号化データと変換処理部151からの変換処理後の第1の符号化データとを選択するセレクタ152が付加され、このセレクタ152の出力が再符号化により得られた動画像データとして出力される構成となっている点である。   The characteristic difference between the present embodiment and the first and second embodiments is that the re-encoding unit 28 receives the first encoded data 150 and performs conversion processing, and the video encoder 22. Is added to the selector 152 for selecting the encoded data output from the first encoding data and the first encoded data after the conversion processing from the conversion processing unit 151, and the output of the selector 152 is the moving image data obtained by re-encoding. It is the point which becomes the composition outputted as.

すなわち、本実施形態では第1の符号化データを復号化して得られた映像信号に対して何ら処理を施さずにアナログ出力する場合は、この映像信号を再符号化した符号化データではなく、対応する第1の符号化データをそのまま出力し、また、オーバレイ処理や特殊再生のために、復号化により得られた映像信号に処理が施されている場合は、この処理後の映像信号を再符号化した符号化データを選択して出力する構成となっている。   That is, in this embodiment, when analog output is performed without performing any processing on the video signal obtained by decoding the first encoded data, it is not encoded data obtained by re-encoding the video signal, The corresponding first encoded data is output as it is, and when the video signal obtained by decoding is processed for overlay processing or special reproduction, the video signal after this processing is replayed. The encoded encoded data is selected and output.

また、出力する符号化データの切り替えは、フレーム単位またはマクロブロック単位に行う。マクロブロック単位の切り替えでは、符号化対象マクロブロックおよび同マクロブロックの動き補償予測の参照画像領域がオーバレイ処理の影響を受けない場合は、対応する第1の符号化データをそのまま出力し、それ以外の場合は、再符号化により得られた動画像データを選択する。   In addition, switching of encoded data to be output is performed in units of frames or macro blocks. When the macroblock unit is switched, if the encoding target macroblock and the reference image area of motion compensation prediction of the macroblock are not affected by the overlay process, the corresponding first encoded data is output as it is, and otherwise In this case, the moving image data obtained by re-encoding is selected.

さらに、図13〜図17に示した特殊再生処理において、同一フィールドの繰り返しによるフレームの生成がなされない場合は、再符号化された動画像データではなく、第1の符号化データを用いて、上述した表示順序やフィールド構成に関連するヘッダ領域のデータの書き換えをデータ変換処理部151で行い、それを出力する。   Furthermore, in the special reproduction processing shown in FIGS. 13 to 17, when the frame is not generated by repeating the same field, the first encoded data is used instead of the re-encoded moving image data. The data conversion processing unit 151 rewrites data in the header area related to the display order and field configuration described above, and outputs it.

図20のフローチャートに、本実施形態における図19中のセレクタ152の動作を示す。すなわち、特殊再生(トリック再生)である場合で(ステップS1でYes)、インターレースされていないフレーム、つまりプログレッシブフレームであって(ステップS2でYes)、復号化された映像信号に対して、オーバレイ等の画素処理がなされていない場合(ステップS3でYes)、或いは通常再生で復号化された映像信号にオーバレイ等の画素処理がなされていない場合は、第1の符号化データ(ストリーム処理出力)を選択して出力し(ステップS4)、その他の場合(ステップS2でNoまたはステップS3でNo)は、再符号化された符号化データを選択して出力する(ステップS5)。   The flowchart of FIG. 20 shows the operation of the selector 152 in FIG. 19 in the present embodiment. That is, in the case of special playback (trick playback) (Yes in step S1), an uninterlaced frame, that is, a progressive frame (Yes in step S2), an overlay or the like is applied to the decoded video signal. If the pixel processing is not performed (Yes in step S3), or if pixel processing such as overlay is not performed on the video signal decoded by normal reproduction, the first encoded data (stream processing output) is used. In other cases (No in step S2 or No in step S3), the re-encoded encoded data is selected and output (step S5).

(フレーム間予測構造に応じた動きベクトルスケーリングについて)
図21に、本発明の実施形態に係る再符号化時のフレーム間予測構造に応じた動きベクトルスケーリングの例を示す。図21(a)は、第1の符号化データにおけるフレーム間予測構造を示しており、I0,B1,B2,P3,…は、それぞれフレーム構造のIピクチャ、Bピクチャ、Pピクチャを表示順に表わしている。図21(b)は、フレーム構造のIピクチャおよび連続するフレーム構造のPピクチャを用いた再符号化時のフレーム間予測構造を示している。さらに、図21(c)は、フィールド構造のIピクチャおよび連続するフィールド構造のPピクチャを用いた再符号化のフィールド間予測構造を示している。図中500〜521で示した矢印は、第1の符号化および再符号化の動きベクトルを示しており、矢印の始点は符号化対象画像であり、矢印の終点が参照画像となる。
(About motion vector scaling according to inter-frame prediction structure)
FIG. 21 shows an example of motion vector scaling according to the inter-frame prediction structure at the time of re-encoding according to the embodiment of the present invention. FIG. 21A shows the inter-frame prediction structure in the first encoded data, and I0, B1, B2, P3,... Represent the I picture, B picture, and P picture of the frame structure in the display order, respectively. ing. FIG. 21B shows an inter-frame prediction structure at the time of re-encoding using an I picture having a frame structure and a P picture having a continuous frame structure. Further, FIG. 21C shows an inter-field prediction structure of re-encoding using an I picture having a field structure and a P picture having a continuous field structure. The arrows indicated by 500 to 521 in the figure indicate the first encoding and re-encoding motion vectors, the starting point of the arrow is the encoding target image, and the end point of the arrow is the reference image.

本実施形態では、図21(a)のフレーム構造のIピクチャ、PピクチャおよびBピクチャの組み合わせで動画像信号を符号化して得られた第1の符号化データの復号化を行い、この復号化により得られた動画像信号を図21(b)または(c)に示した予測構造で再符号化することにより、再符号化時のフレーム並べ替えが不要となる。従って、再符号化におけるフレーム並べ替えのためのフレームメモリを必要とせず、また再符号化の遅延量を小さくすることが可能となる。   In the present embodiment, the first encoded data obtained by encoding the moving image signal with the combination of the I picture, P picture, and B picture having the frame structure of FIG. By re-encoding the moving image signal obtained by the above-described prediction structure shown in FIG. 21B or FIG. 21C, frame rearrangement at the time of re-encoding becomes unnecessary. Therefore, a frame memory for frame rearrangement in re-encoding is not required, and the re-encoding delay amount can be reduced.

さらに、図21(c)の例では、フィールド構造のピクチャによる符号化を行っているため、フィールド/フレーム変換のためのフィールドメモリや再符号化時の遅延量をさらに削減することが可能となる。   Furthermore, in the example of FIG. 21 (c), since encoding is performed using a field structure picture, it is possible to further reduce the field memory for field / frame conversion and the delay amount during re-encoding. .

ただし、図21(b)や(c)ではフレーム間予測構造が第1の符号化データと異なるため、第1の符号化データから抽出された動きベクトル500〜505は、そのまま再符号化時に用いることができない。しかし、第1の符号化データから抽出された動きベクトルを予測構造の違いを考慮してスケーリングすることにより、再符号化時にも利用することが可能となる。   However, since the inter-frame prediction structure is different from the first encoded data in FIGS. 21B and 21C, the motion vectors 500 to 505 extracted from the first encoded data are used as they are when re-encoding. I can't. However, by scaling the motion vector extracted from the first encoded data in consideration of the difference in the prediction structure, it can be used at the time of re-encoding.

図21(b)において、P1,P2,P3のフレームはそれぞれ図21(a)のB1,B2,P3に対応しており、動きベクトル510としては第1の符号化データの動きベクトル500をそのまま用いることができる。また、動きベクトル511,512としては、第1の符号化データの動きベクトル501,502をそれぞれ1/2倍および1/3倍にスケーリングしたものを用いることが可能となる。   In FIG. 21B, the frames P1, P2, and P3 correspond to B1, B2, and P3 in FIG. 21A, respectively. As the motion vector 510, the motion vector 500 of the first encoded data is used as it is. Can be used. In addition, as the motion vectors 511 and 512, the motion vectors 501 and 502 of the first encoded data can be scaled to 1/2 times and 1/3 times, respectively.

また、図21(c)のようにフィールド構造の予測符号化では、MPEG2符号化の場合、直前の同相フィールドまたは逆相フィールドのいずれかを参照画像として用いることが可能である。ここで、i0およびp1は図21(a)のI0のフレームを構成するフィールドに対応し、またp2およびp3は図21(b)のB1を構成するフィールドに対応する。従って、動きベクトル520としては第1の符号化データの動きベクトル500を利用することができ、また動きベクトル521としては、第1の符号化データの動きベクトル500を1/2倍にスケーリングしたものを利用することが可能となる。   Further, in the field structure predictive coding as shown in FIG. 21C, in the case of MPEG2 coding, either the immediately preceding in-phase field or reversed-phase field can be used as a reference image. Here, i0 and p1 correspond to the fields constituting the frame I0 in FIG. 21A, and p2 and p3 correspond to the fields constituting B1 in FIG. 21B. Therefore, the motion vector 500 of the first encoded data can be used as the motion vector 520, and the motion vector 500 of the first encoded data is scaled to ½ times as the motion vector 521. Can be used.

すなわち、再符号化部のコストや遅延時間を削減するために、再符号化時のフレーム間予測構造が第1の符号化データと異なる場合でも、第1の符号化データから抽出された動きベクトルを予測構造の違いを考慮してスケーリングすることで、再符号化時に新たに動きベクトルの検出を行わなくとも、動き補償予測を用いた予測符号化による再符号化を行うことが可能となる。   That is, in order to reduce the cost and delay time of the re-encoding unit, even when the inter-frame prediction structure at the time of re-encoding is different from the first encoded data, the motion vector extracted from the first encoded data Is scaled in consideration of the difference in the prediction structure, it is possible to perform re-encoding by predictive encoding using motion compensated prediction without newly detecting a motion vector at the time of re-encoding.

(副映像信号或いはGUI画像の表示切り替えについて)
次に、本発明の実施形態に係る副映像信号或いはGUI画像の表示切り替え方法について説明する。
フレームレート24Hzの映画を標準テレビのフレームレート29.97Hzのインターレース画像として表示する手法として、3:2プルダウンと呼ばれる手法がある。3:2プルダウンは、映画の1フレームを各フレーム毎に3フィールド期間表示するか、2フィールド期間表示するかを交互に切り替えることにより、フレームレート29.97Hzで表示することを可能としている。3フィールド期間の表示では、3フィールド目に表示される映像は、同一フレーム内の先頭フィールドを繰り返して表示したものとなる。MPEG2符号化では、3:2プルダウンに対応した符号化が可能となっている。つまり、映画等の符号化において、フレームレート24Hzのフレーム画像を単位とした符号化を行い、その符号化フレームが3フィールド期間表示されるフレームか、或いは2フィールド期間表示されるフレームかを符号化データ中のフラグで示し、復号化装置内で符号化フレームレート24Hzから表示フレームレート29.97Hzへと変換される。
(About sub-picture signal or GUI image display switching)
Next, a display switching method for sub-video signals or GUI images according to the embodiment of the present invention will be described.
As a technique for displaying a movie with a frame rate of 24 Hz as an interlaced image with a standard television frame rate of 29.97 Hz, there is a technique called 3: 2 pull-down. 3: 2 pull-down makes it possible to display a frame of a movie at a frame rate of 29.97 Hz by alternately switching between displaying one frame of a movie for each frame for three field periods or two field periods. In the display of the three-field period, the video displayed in the third field is a display in which the first field in the same frame is repeatedly displayed. In MPEG2 encoding, encoding corresponding to 3: 2 pull-down is possible. In other words, in the encoding of movies and the like, encoding is performed in units of frame images with a frame rate of 24 Hz, and the encoded frame is encoded as a frame that is displayed for a period of 3 fields or a frame that is displayed for a period of 2 fields. This is indicated by a flag in the data, and is converted from a coding frame rate of 24 Hz to a display frame rate of 29.97 Hz in the decoding device.

図22は、本発明の実施形態に係る副映像信号或いはGUI画像の表示切り替えの例を示す図である。図22(a)は表示フィールド番号を示しており、(b)は3:2プルダウン処理に対応した符号化フレームの構成を示している。図22の例では、フィールド0、1で構成されるフレームが最初の符号化フレームとなり、フィールド2,3,4で構成されるフレームが2番目の符号化フレームとなる。ここで、フィールド4は符号化時に削除され、復号化後はフィールド2が繰り返しフィールド4のタイミングで表示されるものとなる。図22(b)で点線で示したフィールドは、3:2プルダウンによりリピートされたフィールドであり、図22(c)が復号化後のフィールド構成となる。   FIG. 22 is a diagram showing an example of display switching of the sub-video signal or GUI image according to the embodiment of the present invention. FIG. 22A shows display field numbers, and FIG. 22B shows the structure of an encoded frame corresponding to 3: 2 pull-down processing. In the example of FIG. 22, the frame composed of fields 0 and 1 is the first encoded frame, and the frame composed of fields 2, 3, and 4 is the second encoded frame. Here, field 4 is deleted at the time of encoding, and after decoding, field 2 is repeatedly displayed at the timing of field 4. A field indicated by a dotted line in FIG. 22B is a field repeated by 3: 2 pull-down, and FIG. 22C shows a field configuration after decoding.

図22(d)は、副映像信号またはGUI画像の切り替えタイミングを示したものであり、この例ではフィールド0からフィールド7までは第1の副映像またはGUI画像が静止表示され、またフィールド8からフィールド16までは第2の副映像またはGUI画像が静止表示される。ここで、副映像信号またはGUI画像信号の切り替えとは、表示自体のオン・オフや、映像信号とのミキシング比率を段階的に変化させて、副映像またはGUI画像をフェード表示する場合のミキシング比率の変化点などを意味する。   FIG. 22D shows the switching timing of the sub-video signal or GUI image. In this example, the first sub-video or GUI image is displayed statically from field 0 to field 7, and from field 8. Up to field 16, the second sub-picture or GUI image is displayed statically. Here, the switching of the sub-video signal or the GUI image signal is a mixing ratio when the sub-video or the GUI image is faded and displayed by turning on / off the display itself or changing the mixing ratio with the video signal stepwise. It means the change point of

図22(d)の例では、フィールド7の時刻では第1の副映像またはGUI画像がオーバレイ表示され、また、フィールド9の時刻では第2の副映像またはGUI画像がオーバレイ表示される。従って、本来フィールド7の映像と同一の映像が表示されるフィールド9の映像が、オーバレイ処理後には、フィールド7の時刻の映像と一致しなくなる。   In the example of FIG. 22D, the first sub-video or GUI image is displayed in an overlay manner at the time of the field 7, and the second sub-video or GUI image is displayed as an overlay at the time of the field 9. Therefore, the video of the field 9 that originally displays the same video as the video of the field 7 does not match the video of the time of the field 7 after the overlay processing.

このオーバレイ処理後の映像信号を第1の符号化データと同一のフレーム構成で再符号化した場合、つまり、フィールド9の時刻の映像をフィールド7の映像の繰り返しとみなして再符号化した場合、再符号化により得られた符号化データを復号化したとき、表示される副映像或いはGUI画像は、図22(e)の順序で表示されることになり、不自然な時間変化を伴った映像の乱れを発生することになる。   When the video signal after the overlay processing is re-encoded with the same frame configuration as the first encoded data, that is, when the video at the time of field 9 is regarded as a repetition of the video of field 7, When the encoded data obtained by re-encoding is decoded, the displayed sub-video or GUI image is displayed in the order shown in FIG. 22 (e), and the video is accompanied by an unnatural time change. Will be disturbed.

一方、図22(f)または(g)に示すように、副映像信号またはGUI画像の変化点を図22(a)で示した符号化フレームを構成するフィールドの境界にシフトすれば、オーバレイ処理された映像信号を第1の符号化データと同一のフレーム構成で再符号化しても、再符号化されたデータを復号化した映像信号の表示時に副映像信号またはGUI画像の時間的な乱れが発生することがなく、スムーズな映像を表示することが可能となる。   On the other hand, as shown in FIG. 22 (f) or (g), if the change point of the sub-picture signal or GUI image is shifted to the boundary of the field constituting the encoded frame shown in FIG. Even if the encoded video signal is re-encoded with the same frame configuration as the first encoded data, the sub-video signal or the GUI image is temporally disturbed when the video signal obtained by decoding the re-encoded data is displayed. It is possible to display a smooth image without occurrence.

本発明の第1の実施形態に係る動画像再符号化装置を含むシステムの構成を示すブロック図1 is a block diagram showing the configuration of a system including a moving image re-encoding device according to a first embodiment of the present invention. 同実施形態における再符号化のためのビデオエンコーダの構成例を示すブロック図FIG. 3 is a block diagram showing a configuration example of a video encoder for re-encoding in the embodiment グラフィックスオーバレイ画像の例を示す図Diagram showing an example of a graphics overlay image 同実施形態に係る動画像再符号化装置の動作タイミング例を示す図The figure which shows the example of operation timing of the moving image re-encoding apparatus which concerns on the same embodiment 本発明の第2の実施形態に係る動画像再符号化装置を含むシステムの構成を示すブロック図The block diagram which shows the structure of the system containing the moving image re-encoding apparatus which concerns on the 2nd Embodiment of this invention. 同実施形態に係る動画像再符号化装置の動作タイミング例を示す図The figure which shows the example of operation timing of the moving image re-encoding apparatus which concerns on the same embodiment MPEGに関するDCTタイプを説明する図Diagram explaining DCT type related to MPEG グラフィックスオーバレイ画像の例を示す図Diagram showing an example of a graphics overlay image グラフィックスオーバレイ画像の例を示す図Diagram showing an example of a graphics overlay image 本発明における再符号化のためのビデオエンコーダの他の構成例を示すブロック図The block diagram which shows the other structural example of the video encoder for the re-encoding in this invention グラフィックスオーバレイ画像の例を示す図Diagram showing an example of a graphics overlay image フレームレート変換に伴う動きベクトルスケーリングの例を示す図The figure which shows the example of the motion vector scaling accompanying frame rate conversion 本発明に係る早送り再生の例を示す図The figure which shows the example of the fast-forward reproduction | regeneration which concerns on this invention 本発明に係る早送り逆再生の例を示す図The figure which shows the example of the fast-forward reverse play based on this invention 本発明に係るポーズ再生の例を示す図The figure which shows the example of the pause reproduction | regeneration based on this invention 本発明に係る早送り再生の例を示す図The figure which shows the example of the fast-forward reproduction | regeneration which concerns on this invention 本発明に係るスロー再生の例を示す図The figure which shows the example of the slow reproduction which concerns on this invention 本発明に係わる動きベクトルスケーリングの例を示す図The figure which shows the example of the motion vector scaling concerning this invention 本発明の第3の実施形態に係る動画像再符号化装置を含むシステムの構成を示すブロック図The block diagram which shows the structure of the system containing the moving image re-encoding apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第2の実施形態に係る制御フローチャートを示す図The figure which shows the control flowchart which concerns on the 2nd Embodiment of this invention. 本発明の実施形態に係る動きベクトルスケーリングの例を示す図The figure which shows the example of the motion vector scaling which concerns on embodiment of this invention 本発明の実施形態に係る副映像信号或いはGUI画像の表示切り替えの例を示す図The figure which shows the example of the display switching of a sub video signal or a GUI image which concerns on embodiment of this invention.

符号の説明Explanation of symbols

10…データ分離部
11…音声データバッファメモリ
12…動画像データバッファメモリ
13…副映像データバッファメモリ
14…ナビゲーションデータバッファメモリ
15…オーディオデコーダ
16…ビデオデコーダ
17…副映像デコーダ
18…映像オーバレイ処理部
20…GUI画像信号発生部
21…オーディオエンコーダ
22…ビデオエンコーダ
23…フレームメモリ
24…音声データバッファメモリ
25…動画像データバッファメモリ
26…多重化部
27…IEEE1394インタフェース
28…再符号化部
29…音声信号用D/A変換器
30…映像信号用D/A変換器
50…光ディスク装置
67…映像信号セレクタ
70…動き補償部
72…動き補償モードおよびDCTタイプ決定部
73…レート制御部
74…DCTおよび量子化部
75…逆量子化および逆DCT部
76…可変長符号化部
151…動画像データ変換部
152…動画像符号化データセレクタ
DESCRIPTION OF SYMBOLS 10 ... Data separation part 11 ... Audio | voice data buffer memory 12 ... Moving image data buffer memory 13 ... Sub video data buffer memory 14 ... Navigation data buffer memory 15 ... Audio decoder 16 ... Video decoder 17 ... Sub video decoder 18 ... Video overlay processing part DESCRIPTION OF SYMBOLS 20 ... GUI image signal generation part 21 ... Audio encoder 22 ... Video encoder 23 ... Frame memory 24 ... Audio | voice data buffer memory 25 ... Moving image data buffer memory 26 ... Multiplexer 27 ... IEEE1394 interface 28 ... Re-encoding part 29 ... Audio | voice Signal D / A Converter 30 ... Video Signal D / A Converter 50 ... Optical Disc Device 67 ... Video Signal Selector 70 ... Motion Compensation Unit 72 ... Motion Compensation Mode and DCT Type Determination Unit 73 ... Rate Control Unit 74 ... DC T and quantization unit 75 ... inverse quantization and inverse DCT unit 76 ... variable length coding unit 151 ... moving image data conversion unit 152 ... moving image coded data selector

Claims (7)

動画像信号を動き補償予測符号化して得られた第1の符号化データを復号化して動画像信号を得る復号化手段と、
前記第1の符号化データから、少なくとも動きベクトルおよび符号化モードの情報を含む符号化パラメータを抽出する符号化パラメータ抽出手段と、
前記復号化手段により得られた動画像信号の映像フレーム或いは映像フィールドにオーバレイ処理される副映像信号或いはGUI画像信号を生成する手段と、
前記映像フレーム或いは映像フィールドに対して前記副映像信号或いは前記GUI画像信号のオーバレイ処理を順次施す手段と、
前記オーバレイ処理が施された映像フレーム或いは映像フィールドを再符号化して第2の符号化データを得る再符号化手段とを具備し、
前記再符号化手段は、(a)前記抽出された符号化パラメータ中の動きベクトルを用いた第1の動き補償予測符号化モードにおける動き補償予測誤差の大きさ、(b)外部から与えられる、前記副映像信号或いは前記GUI画像信号の表示位置およびその動き量から決定される動きベクトルを用いた第2の動き補償予測符号化モードにおける動き補償予測誤差の大きさ、および(c)イントラ符号化モードにおける符号化対象マクロブロックの信号の大きさを比較し、その比較結果に従って前記第1動き補償予測符号化モード、第2の動き補償予測符号化モードおよび前記イントラ符号化モードのいずれか一つの符号化モードをマクロブロック毎に選択する符号化モード選択手段を有し、選択した符号化モードに従って前記再符号化を行うことを特徴とする動画像再符号化装置。
Decoding means for decoding a first encoded data obtained by performing motion compensation prediction encoding of a moving image signal to obtain a moving image signal;
Coding parameter extraction means for extracting a coding parameter including at least a motion vector and coding mode information from the first coded data;
Means for generating a sub-video signal or GUI image signal to be overlaid on a video frame or video field of the video signal obtained by the decoding means;
Means for sequentially performing overlay processing of the sub-video signal or the GUI image signal on the video frame or video field;
Re-encoding means for re-encoding the video frame or video field subjected to the overlay processing to obtain second encoded data;
The re-encoding means is (a) a magnitude of a motion compensation prediction error in the first motion compensation prediction encoding mode using a motion vector in the extracted encoding parameter, and (b) given from the outside. A magnitude of motion compensation prediction error in the second motion compensation prediction coding mode using a motion vector determined from a display position of the sub-picture signal or the GUI image signal and a motion amount thereof; and (c) intra coding. The signal size of the encoding target macroblock in the mode is compared, and according to the comparison result, any one of the first motion compensation prediction encoding mode, the second motion compensation prediction encoding mode, and the intra encoding mode is selected. An encoding mode selection unit that selects an encoding mode for each macroblock, and performs the re-encoding according to the selected encoding mode; Video transcoder according to claim.
前記再符号化手段は、前記符号化パラメータ抽出手段により抽出された符号化パラメータを一時記憶する記憶手段をさらに有し、前記第1の動き補償予測符号化モードでは該記憶手段に記憶された前記符号化パラメータ中の動きベクトルを用いて前記再符号化を行うことを特徴とする請求項1記載の動画像再符号化装置。   The re-encoding unit further includes a storage unit that temporarily stores the encoding parameter extracted by the encoding parameter extraction unit, and the storage unit stores the storage unit in the first motion compensation prediction encoding mode. The moving image re-encoding apparatus according to claim 1, wherein the re-encoding is performed using a motion vector in an encoding parameter. 前記副映像信号或いはGUI画像信号を生成する手段は、前記復号化手段により得られた動画像信号の映像フレーム或いは映像フィールドの復号化順序に対応して前記副映像信号或いはGUI画像信号を生成し、前記再符号化手段は、前記オーバレイ処理が施された映像フレーム或いは映像フィールドを前記復号化順序に従って再符号化することを特徴とする請求項1記載の動画像再符号化装置。   The means for generating the sub video signal or the GUI image signal generates the sub video signal or the GUI image signal corresponding to the decoding order of the video frame or video field of the moving image signal obtained by the decoding means. 2. The moving image re-encoding apparatus according to claim 1, wherein the re-encoding unit re-encodes the video frame or the video field subjected to the overlay processing in accordance with the decoding order. 前記符号化パラメータ抽出手段は、前記第1の符号化データから前記符号化パラメータとしてさらにフレーム/フィールド適応直交変換タイプを抽出し、
前記再符号化手段は、フレーム/フィールド適応直交変換手段を有し、前記符号化モード選択手段により(a)前記符号化パラメータと同一の符号化パラメータを用いた符号化モードが選択されたマクロブロックについては前記第1の符号化データから抽出されたフレーム/フィールド適応直交変換タイプを選択し、前記符号化モード選択手段により(b)既定の動きベクトルを用いた動き補償予測符号化、および(c)イントラ符号化のいずれかの符号化モードが選択されたマクロブロックについては最適なフレーム/フィールド適応直交変換タイプを選択して、前記フレーム/フィールド適応直交変換手段によりそれぞれ直交変換を施すことを特徴とする請求項1乃至3のいずれか1項記載の動画像再符号化装置。
The encoding parameter extraction means further extracts a frame / field adaptive orthogonal transform type as the encoding parameter from the first encoded data,
The re-encoding unit includes a frame / field adaptive orthogonal transform unit, and (a) a macroblock in which an encoding mode using the same encoding parameter as the encoding parameter is selected by the encoding mode selection unit For the frame / field adaptive orthogonal transform type extracted from the first encoded data, and (b) motion compensated predictive encoding using a predetermined motion vector by the encoding mode selection means, and (c ) For a macroblock for which any coding mode of intra coding is selected, an optimum frame / field adaptive orthogonal transform type is selected, and orthogonal transform is performed by the frame / field adaptive orthogonal transform means. The moving image re-encoding device according to any one of claims 1 to 3.
動画像信号を動き補償予測符号化して得られた第1の符号化データを復号化して動画像信号を得る復号化手段と、
前記第1の符号化データから、少なくとも動きベクトルおよび符号化モードの情報を含む符号化パラメータを抽出する符号化パラメータ抽出手段と、
前記復号化手段により得られた動画像信号の映像フレーム或いは映像フィールドにオーバレイ処理されるべき副映像信号或いはGUI画像信号を生成する手段と、
前記映像フレーム或いは映像フィールドに対して前記副映像信号或いは前記GUI画像信号のオーバレイ処理を順次施す手段と、
前記オーバレイ処理が施された映像フレーム或いは映像フィールドを再符号化して第2の符号化データを得る再符号化手段とを具備し、
前記再符号化手段は、前記映像フレーム或いは映像フィールドに対する前記副映像信号或いは前記GUI画像信号のオーバレイ比率が閾値に満たない場合に選択される(a)前記抽出された符号化パラメータと同一の符号化パラメータを用いた符号化モードにおける動き補償予測信号の大きさ、及び前記オーバレイ比率が前記閾値以上の場合に選択される(b)既定の動きベクトルを用いた動き補償予測符号化モードにおける動き補償予測誤差信号の大きさと、(c)イントラ符号化モードにおける符号化対象マクロブロックの信号の大きさを比較し、その比較結果に従って前記(a)の符号化モードまたは(b)の動き補償予測符号化モードと前記(c)のイントラ符号化モードのいずれか一つの符号化モードをマクロブロック毎に選択する符号化モード選択手段を有し、選択した符号化モードに従って前記再符号化を行うことを特徴とする動画像再符号化装置。
Decoding means for decoding a first encoded data obtained by performing motion compensation prediction encoding of a moving image signal to obtain a moving image signal;
Coding parameter extraction means for extracting a coding parameter including at least a motion vector and coding mode information from the first coded data;
Means for generating a sub-video signal or GUI image signal to be overlaid on the video frame or video field of the video signal obtained by the decoding means;
Means for sequentially performing overlay processing of the sub-video signal or the GUI image signal on the video frame or video field;
Re-encoding means for re-encoding the video frame or video field subjected to the overlay processing to obtain second encoded data;
The re-encoding means is selected when an overlay ratio of the sub-video signal or the GUI image signal to the video frame or video field is less than a threshold value. (A) The same code as the extracted encoding parameter (B) Motion compensation in motion compensated prediction coding mode using a predetermined motion vector selected when the size of the motion compensated prediction signal in the coding mode using the encoding parameter and the overlay ratio are equal to or greater than the threshold value The magnitude of the prediction error signal and (c) the magnitude of the signal of the macroblock to be coded in the intra coding mode are compared, and the coding mode of (a) or the motion compensated prediction code of (b) is compared according to the comparison result. One of the coding mode and the intra coding mode (c) is selected for each macroblock. It has a coding mode selecting means, the moving picture re-encoding apparatus and performs the re-encoding according to the selected coding mode.
前記再符号化手段は、前記第1の符号化データからフレーム或いはマクロブロック単位の符号化データを抽出するデータ抽出手段と、前記第1の符号化データが早送り、スロー、こま送りおよび一時停止の少なくとも一つを含む特殊再生処理またはフレームレート変換の処理がなされている場合に、前記データ抽出手段により抽出された符号化データについて少なくとも表示順序および表示フィールドの構成に関連するデータを含むヘッダデータを変更して、前記特殊再生処理によるフレームの繰り返し表示の際にもトップフィールドとボトムフィールドとが交互に表示されるという条件を満たす第3の符号化データを得るヘッダデータ変更手段と、前記第2の符号化データの一部を前記第3の符号化データに置き換えるデータ置き換え手段とを有し、
前記符号化データ置き換え手段は、前記再生装置におけるインターレース動画像信号の早送り、スロー、こま送りおよび一時停止の少なくとも一つを含む特殊再生時には、前記第2の符号化データを選択して出力し、前記再生装置における24Hzから29.97Hzへのフレームレート変換を伴う通常再生、および、プログレッシブ動画像信号の早送り、スロー、こま送りおよび一時停止の少なくとも一つを含む特殊再生時には、前記第3の符号化データを選択して出力することを特徴とする請求項1乃至5のいずれか1項動画像再符号化装置。
The re-encoding means includes data extraction means for extracting encoded data in units of frames or macroblocks from the first encoded data, and the first encoded data is fast-forwarded, thrown, top-fed, and paused. When special reproduction processing or frame rate conversion processing including at least one has been performed, the encoded data extracted by the data extraction means includes header data including at least data related to the display order and display field configuration. Changing the header data changing means to obtain third encoded data that satisfies the condition that the top field and the bottom field are alternately displayed even when the frame is repeatedly displayed by the special reproduction processing; Replacement means for replacing a part of the encoded data with the third encoded data Have,
The encoded data replacement means selects and outputs the second encoded data at the time of special reproduction including at least one of fast-forward, slow, top-feed, and pause of an interlaced video signal in the playback device, In the normal reproduction with frame rate conversion from 24 Hz to 29.97 Hz in the reproduction apparatus and special reproduction including at least one of fast-forwarding, slowing, top-feeding, and pause of the progressive video signal, the third code 6. The moving image re-encoding apparatus according to claim 1, wherein the encoded data is selected and output.
前記オーバレイ処理される前記副映像信号或いは前記GUI画像信号を変えるタイミングを、前記第1の符号化データにおける符号化フレームに対応する、前記復号化された映像フレーム或いは映像フィールドの境界にシフトする手段をさらに具備することを特徴とする請求項1乃至6のいずれか1項記載の動画像再符号化装置。 Means for shifting the timing of changing the sub-video signal or the GUI image signal to be subjected to the overlay processing to the boundary of the decoded video frame or video field corresponding to the encoded frame in the first encoded data The moving image re-encoding device according to claim 1, further comprising:
JP2004330692A 2004-11-15 2004-11-15 Video re-encoding device Expired - Fee Related JP3962053B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004330692A JP3962053B2 (en) 2004-11-15 2004-11-15 Video re-encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004330692A JP3962053B2 (en) 2004-11-15 2004-11-15 Video re-encoding device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP04352799A Division JP3789048B2 (en) 1999-02-22 1999-02-22 Video re-encoding device

Publications (2)

Publication Number Publication Date
JP2005094800A JP2005094800A (en) 2005-04-07
JP3962053B2 true JP3962053B2 (en) 2007-08-22

Family

ID=34464348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004330692A Expired - Fee Related JP3962053B2 (en) 2004-11-15 2004-11-15 Video re-encoding device

Country Status (1)

Country Link
JP (1) JP3962053B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4498207B2 (en) * 2005-05-10 2010-07-07 キヤノン株式会社 Video processing apparatus and video processing method
BRPI0717900A2 (en) 2006-12-06 2013-10-29 Nec Corp "PTT SERVER, PTT COMMUNICATION SYSTEM, PTT COMMUNICATION METHOD AND PROGRAM TO MAKE A PTT SERVER PERFORM PTT COMMUNICATION"
JP7378035B2 (en) * 2018-09-12 2023-11-13 パナソニックIpマネジメント株式会社 Conversion device, decoding device, conversion method and decoding method
CN110191371A (en) * 2019-05-31 2019-08-30 北京金山云网络技术有限公司 Object insertion method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
JP2005094800A (en) 2005-04-07

Similar Documents

Publication Publication Date Title
JP3789048B2 (en) Video re-encoding device
KR100384825B1 (en) Trick play stream derivation for pre-recorded digital video recording
JP3639517B2 (en) Moving picture decoding apparatus and moving picture decoding method
AU2007313700B2 (en) Performing trick play functions in a digital video recorder with efficient use of resources
KR20010022752A (en) Trick play signal generation for a digital video recorder
JP4983317B2 (en) Frame rate conversion system, frame rate conversion method, receiver
JPH089319A (en) Method and device for recording and device for reproducing digital video signal
JP2001028748A (en) Data reproduction transmitter and data reproduction transmission method
JP4931034B2 (en) Decoding device, decoding method, program, and program recording medium
WO2001015442A1 (en) System and method for performing interlaced-to-progressive conversion using interframe motion data
JP2004521559A (en) Method and apparatus for generating a video signal
KR101007838B1 (en) Information processing device and recording medium
KR100995032B1 (en) Apparatus of video decoding device having picture freeze and method of the same
KR101154743B1 (en) Encoder apparatus, encoding method, decoder apparatus, decoding method, recording medium, and playback apparatus
JP3962053B2 (en) Video re-encoding device
JP4821511B2 (en) VIDEO PROCESSING METHOD, VIDEO PROCESSING PROGRAM, VIDEO PROCESSING DEVICE, AND REPRODUCTION METHOD, REPRODUCTION PROGRAM, AND REPRODUCTION DEVICE
WO2001045402A1 (en) Image reproducing method and image processing method, and image reproducing device, image processing device, and television receiver capable of using the methods
JP5115549B2 (en) Decoding method, decoder and decoding apparatus
JP4320509B2 (en) Video re-encoding apparatus and method
JP4569847B2 (en) Data reconstruction device and data reconstruction method
JP2000308016A (en) Still picture reproducing device for recording medium
JP3708745B2 (en) Moving picture decoding apparatus and moving picture decoding method
JP2011015243A (en) Playback apparatus and playback method
JP2003169296A (en) Method for reproducing moving picture
JP2011091592A (en) Image encoder, code converter, image recorder, image reproduction device, image encoding method, and integrated circuit

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061121

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070220

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070420

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: 20070515

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070517

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110525

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees